@tesouro/embedded-components-react 0.5.225 → 0.5.227

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +21 -21
  2. package/dist/index.d.ts +23 -2
  3. package/dist/index.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +23 -2
  5. package/dist/lib/ReceivablesWidget.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +41 -39
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index12.js +2 -2
  8. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +2 -2
  9. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +150 -147
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +46 -51
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +130 -128
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +31 -32
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js +2 -2
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +2 -2
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index3.js +2 -2
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js +36 -37
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index2.js +2 -2
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +2 -2
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index2.js +6 -10
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index3.js +2 -2
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index4.js +2 -2
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index5.js +2 -2
  27. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +2 -2
  28. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +2 -2
  29. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +2 -2
  30. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +154 -150
  31. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +2 -2
  32. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +2 -2
  33. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +2 -2
  34. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +151 -149
  35. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +4 -4
  36. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +4 -4
  37. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +2 -2
  38. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +2 -2
  39. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +2 -2
  40. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +2 -2
  41. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +2 -2
  42. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +2 -2
  43. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +2 -2
  44. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +2 -2
  46. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +2 -2
  47. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +2 -2
  48. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +1 -0
  49. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +89 -87
  50. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +133 -130
  51. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +36 -34
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +4 -4
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +50 -36
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +6 -6
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +2 -2
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +40 -39
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +51 -32
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +20 -1
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +17 -202
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +220 -31
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +32 -145
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +126 -44
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +145 -117
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +46 -58
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +113 -87
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +58 -116
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +98 -225
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +111 -27
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +225 -462
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +34 -41
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +627 -34
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +39 -77
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +34 -112
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +75 -310
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +124 -0
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +324 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index6.js +20 -15
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +56 -53
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +33 -29
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +184 -162
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +1 -3
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +78 -69
  84. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +2 -2
  85. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +209 -207
  86. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +10 -5
  87. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +10 -5
  88. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +11 -6
  89. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +2 -2
  90. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +2 -2
  91. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +2 -2
  92. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +2 -2
  93. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +2 -2
  94. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +30 -28
  95. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +28 -26
  96. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +37 -34
  97. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +28 -26
  98. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +37 -34
  99. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +294 -292
  100. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +58 -58
  101. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -48
  102. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +4 -4
  103. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +2 -2
  104. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +4 -4
  105. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +7 -6
  106. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +20 -19
  107. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -39
  108. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +14 -13
  109. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/allPages.js +1 -1
  110. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +16 -15
  111. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +7 -5
  112. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +7 -5
  113. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -2
  114. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +7 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -29
  116. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/organizationStatus.js +10 -0
  117. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +26 -27
  118. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +2 -2
  119. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +210 -199
  120. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +60 -52
  121. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -32
  122. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +2 -2
  123. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +2 -2
  124. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +2 -2
  125. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js +2 -2
  126. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js +2 -2
  127. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -34
  128. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +33 -22
  129. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +2 -2
  130. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +43 -32
  131. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +138 -127
  132. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/deriveOrganizationStatus.js +6 -0
  133. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +1 -1
  134. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  135. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index10.js +2 -2
  136. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +2 -2
  137. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +2 -2
  138. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +2 -2
  139. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +2 -2
  140. package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +2 -2
  141. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +60 -58
  142. package/package.json +1 -1
@@ -13,214 +13,225 @@ import { useDesignSystemEnsurer as te, useFrameworkRenderer as ne } from "../../
13
13
  import { HostIsolationScope as re } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
14
14
  import { ErrorState as s } from "../../../../ui/dist/lib/ErrorState/ErrorState.js";
15
15
  import "../../../../ui/dist/index.js";
16
- import { getGlobalSnapshot as c, subscribeToGlobal as ie } from "./globalStore.js";
17
- import { EmbeddedAnalyticsEvent as l } from "../analytics/events.js";
18
- import { configureEmbeddedClient as ae } from "../analytics/client.js";
19
- import { generateCorrelationId as oe } from "../analytics/ids.js";
20
- import { WidgetContext as se } from "./WidgetContext.js";
21
- import { noop as ce, resolveOrgId as le, useAuthEpoch as ue } from "./utils.js";
22
- import { useWidgetFetch as de } from "./useWidgetFetch.js";
23
- import { deriveWidgetInitState as fe, useWidgetInitPublisher as pe } from "./useWidgetInitPublisher.js";
24
- import { useAnalyticsTrack as u } from "../analytics/hooks.js";
25
- import { resolveProviderLabels as me } from "./labels.js";
26
- import { WidgetErrorBoundary as he } from "./WidgetErrorBoundary.js";
27
- import { DISCLOSURES_REQUIRED_TEST_ID as d, hasRenderableAcceptanceSurface as f, resolveDisclosuresBlockedReason as p, shouldGateOnDisclosuresAcceptance as ge } from "./isDisclosuresAcceptanceRequired.js";
28
- import { useContext as _e, useEffect as m, useMemo as h, useRef as g, useState as _, useSyncExternalStore as ve } from "react";
29
- import { jsx as v } from "react/jsx-runtime";
30
- import { QueryClient as ye, QueryClientProvider as be } from "@tanstack/react-query";
16
+ import { getGlobalSnapshot as ie, subscribeToGlobal as ae } from "./globalStore.js";
17
+ import { EmbeddedAnalyticsEvent as c } from "../analytics/events.js";
18
+ import { configureEmbeddedClient as oe } from "../analytics/client.js";
19
+ import { generateCorrelationId as se } from "../analytics/ids.js";
20
+ import { WidgetContext as ce } from "./WidgetContext.js";
21
+ import { noop as le, resolveOrgId as ue, useAuthEpoch as de } from "./utils.js";
22
+ import { useWidgetFetch as fe } from "./useWidgetFetch.js";
23
+ import { deriveOrganizationStatus as pe } from "./deriveOrganizationStatus.js";
24
+ import { deriveWidgetInitState as me, useWidgetInitPublisher as he } from "./useWidgetInitPublisher.js";
25
+ import { useAnalyticsTrack as l } from "../analytics/hooks.js";
26
+ import { resolveProviderLabels as ge } from "./labels.js";
27
+ import { WidgetErrorBoundary as _e } from "./WidgetErrorBoundary.js";
28
+ import { DISCLOSURES_REQUIRED_TEST_ID as u, hasRenderableAcceptanceSurface as d, resolveDisclosuresBlockedReason as f, shouldGateOnDisclosuresAcceptance as ve } from "./isDisclosuresAcceptanceRequired.js";
29
+ import { useContext as ye, useEffect as p, useMemo as m, useRef as h, useState as g, useSyncExternalStore as be } from "react";
30
+ import { jsx as _ } from "react/jsx-runtime";
31
+ import { QueryClient as xe, QueryClientProvider as Se } from "@tanstack/react-query";
31
32
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js
32
- function y({ children: ne, baseUrl: s, widgetToken: l, organizationId: u, configClient: d, gatewayRouting: f, linkComponent: p, uiFramework: y, implementation: b, errorFallback: Se, onError: Ce, analytics: x, disclosuresAcceptance: we, providerLabels: Te, widgetName: S }) {
33
- let C = _e(se), Ee = ve(ie, c, c), w = C?.resolved ?? Ee, De = C?.refetch ?? ce, Oe = C?.loading ?? !1, ke = C?.error ?? null, T = s ?? w.baseUrl, E = l === void 0 ? w.widgetToken : l, Ae = C ? C.cascadeOrgId : Ee.organizationId, D = u === void 0 ? Ae : u, O = d ?? w.configClient, k = f ?? w.gatewayRouting, A = p ?? w.linkComponent, j = y ?? w.uiFramework, M = b ?? w.implementation, N = we ?? C?.disclosuresAcceptance, P = Te ?? C?.providerLabels, je = h(() => me(P), [P]), F = C === null, I = F ? x !== !1 : C.analytics.enabled, [Me] = _(oe), L = F ? Me : C.analytics.rootCorrelationId, [Ne] = _(oe), R = S === void 0 ? C?.analytics.widgetName : S, z = S === void 0 ? C?.analytics.widgetInstanceId : Ne, B = g({
34
- enabled: I,
35
- organizationId: D,
36
- rootCorrelationId: L,
37
- widgetName: R,
38
- widgetInstanceId: z
39
- }), Pe = g(!1);
40
- m(() => {
41
- F || x === void 0 || Pe.current || (Pe.current = !0, console.warn("[tesouro-embedded] `analytics` on a nested WidgetProvider is ignored in v1. Set it on the outermost RootWidgetProvider or standalone WidgetProvider instead."));
42
- }, [x, F]), m(() => {
43
- if (!F || !I || !("window" in globalThis)) return;
33
+ function v({ children: ne, baseUrl: s, widgetToken: c, organizationId: l, configClient: u, gatewayRouting: d, linkComponent: f, uiFramework: v, implementation: y, errorFallback: we, onError: Te, analytics: b, disclosuresAcceptance: Ee, providerLabels: De, widgetName: x }) {
34
+ let S = ye(ce), Oe = be(ae, ie, ie), C = S?.resolved ?? Oe, ke = S?.refetch ?? le, Ae = S?.loading ?? !1, je = S?.error ?? null, w = s ?? C.baseUrl, T = c === void 0 ? C.widgetToken : c, Me = S ? S.cascadeOrgId : Oe.organizationId, E = l === void 0 ? Me : l, D = u ?? C.configClient, O = d ?? C.gatewayRouting, k = f ?? C.linkComponent, A = v ?? C.uiFramework, j = y ?? C.implementation, M = Ee ?? S?.disclosuresAcceptance, N = De ?? S?.providerLabels, Ne = m(() => ge(N), [N]), P = S === null, F = P ? b !== !1 : S.analytics.enabled, [Pe] = g(se), I = P ? Pe : S.analytics.rootCorrelationId, [Fe] = g(se), L = x === void 0 ? S?.analytics.widgetName : x, R = x === void 0 ? S?.analytics.widgetInstanceId : Fe, z = h({
35
+ enabled: F,
36
+ organizationId: E,
37
+ rootCorrelationId: I,
38
+ widgetName: L,
39
+ widgetInstanceId: R
40
+ }), B = h(!1);
41
+ p(() => {
42
+ P || b === void 0 || B.current || (B.current = !0, console.warn("[tesouro-embedded] `analytics` on a nested WidgetProvider is ignored in v1. Set it on the outermost RootWidgetProvider or standalone WidgetProvider instead."));
43
+ }, [b, P]), p(() => {
44
+ if (!P || !F || !("window" in globalThis)) return;
44
45
  let e = !1;
45
46
  return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
46
47
  e || t();
47
48
  }), () => {
48
49
  e = !0;
49
50
  };
50
- }, [F, I]);
51
- let V = te(o(j));
52
- m(() => {
51
+ }, [P, F]);
52
+ let V = te(o(A));
53
+ p(() => {
53
54
  V && V().catch(() => {});
54
55
  }, [V]);
55
- let Fe = C === null || s !== void 0 || l !== void 0 || u !== void 0 || d != null || f !== void 0 || S !== void 0, Ie = g(E);
56
- Ie.current = E;
57
- let Le = g(null), Re = h(() => e(Le), []), ze = a(), Be = ue(E), H = h(() => {
58
- if (!Fe) return null;
59
- let e = ae(r(T), {
60
- tokenRef: Ie,
61
- analyticsContextRef: B,
62
- clientSecretRef: Le,
63
- gatewayRouting: k
56
+ let Ie = S === null || s !== void 0 || c !== void 0 || l !== void 0 || u != null || d !== void 0 || x !== void 0, Le = h(T);
57
+ Le.current = T;
58
+ let Re = h(null), ze = m(() => e(Re), []), Be = a(), Ve = de(T), H = m(() => {
59
+ if (!Ie) return null;
60
+ let e = oe(r(w), {
61
+ tokenRef: Le,
62
+ analyticsContextRef: z,
63
+ clientSecretRef: Re,
64
+ gatewayRouting: O
64
65
  });
65
- return O ? O(e) : e;
66
+ return D ? D(e) : e;
66
67
  }, [
67
- Fe,
68
- T,
69
- O,
70
- k
71
- ]), U = C === null || s !== void 0 || l !== void 0, Ve = U ? Be : ze.authEpoch, { result: W, loading: G, error: K, clearedForAuthChange: He, initStaleForToken: q, initReplacementPending: Ue, refetch: We } = de(U ? H : null, U ? E : void 0, B), Ge = U ? We : De, Ke = U ? G : Oe, qe = U ? K : ke, Je = C?.resolved.initResponse, Ye = !U || !He && !K && !W && !!E && !G, J = Ye ? Je : W ?? void 0, Y = Ye ? U || (C?.initResponseStaleForToken ?? !1) : q, Xe = C === null, Ze = h(() => Xe ? fe({
72
- hasToken: !!E,
68
+ Ie,
69
+ w,
70
+ D,
71
+ O
72
+ ]), U = S === null || s !== void 0 || c !== void 0, He = U ? Ve : Be.authEpoch, { result: W, loading: G, error: K, clearedForAuthChange: Ue, initStaleForToken: q, initReplacementPending: We, refetch: Ge } = fe(U ? H : null, U ? T : void 0, z), Ke = U ? Ge : ke, qe = U ? G : Ae, Je = U ? K : je, Ye = S?.resolved.initResponse, Xe = !U || !Ue && !K && !W && !!T && !G, J = Xe ? Ye : W ?? void 0, Y = Xe ? U || (S?.initResponseStaleForToken ?? !1) : q, Ze = S === null, Qe = m(() => Ze ? me({
73
+ hasToken: !!T,
73
74
  loading: G,
74
75
  error: K,
75
76
  initResponse: W ?? void 0,
76
77
  initStaleForToken: q
77
78
  }) : null, [
78
- Xe,
79
- E,
79
+ Ze,
80
+ T,
80
81
  G,
81
82
  K,
82
83
  W,
83
84
  q
84
85
  ]);
85
- pe(Ze, E);
86
- let X = le(D, Y ? void 0 : J?.organizationId), Qe = D === void 0 && (U ? Ue : ze.organizationPending), Z = h(() => ({
87
- enabled: I,
86
+ he(Qe, T);
87
+ let X = ue(E, Y ? void 0 : J?.organizationId), $e = pe({
88
+ organizationId: X,
89
+ cascadeOrgId: E,
90
+ ownsFetch: U,
91
+ parentStatus: Be.organizationStatus,
92
+ hasToken: !!T,
93
+ loading: G,
94
+ error: K,
95
+ hasResult: !!W,
96
+ initReplacementPending: We
97
+ }), Z = m(() => ({
98
+ enabled: F,
88
99
  organizationId: X,
89
- rootCorrelationId: L,
90
- widgetName: R,
91
- widgetInstanceId: z
100
+ rootCorrelationId: I,
101
+ widgetName: L,
102
+ widgetInstanceId: R
92
103
  }), [
93
- I,
104
+ F,
94
105
  X,
106
+ I,
95
107
  L,
96
- R,
97
- z
108
+ R
98
109
  ]);
99
- B.current = Z;
100
- let [Q] = _(() => C === null ? new ye({ defaultOptions: {
110
+ z.current = Z;
111
+ let [Q] = g(() => S === null ? new xe({ defaultOptions: {
101
112
  queries: {
102
113
  retry: !1,
103
114
  refetchOnWindowFocus: !1
104
115
  },
105
116
  mutations: { retry: !1 }
106
117
  } }) : null);
107
- m(() => {
118
+ p(() => {
108
119
  if (!Q) return;
109
120
  let e = Q;
110
121
  return t(e), () => n(e);
111
122
  }, [Q]);
112
- let $e = h(() => ({
123
+ let et = m(() => ({
113
124
  baseUrl: s,
114
- widgetToken: l,
115
- organizationId: u,
116
- configClient: d,
117
- gatewayRouting: f,
118
- linkComponent: p,
119
- uiFramework: y,
120
- implementation: b
125
+ widgetToken: c,
126
+ organizationId: l,
127
+ configClient: u,
128
+ gatewayRouting: d,
129
+ linkComponent: f,
130
+ uiFramework: v,
131
+ implementation: y
121
132
  }), [
122
133
  s,
134
+ c,
123
135
  l,
124
136
  u,
125
137
  d,
126
138
  f,
127
- p,
128
- y,
129
- b
130
- ]), et = h(() => ({
131
- baseUrl: T,
132
- widgetToken: E,
139
+ v,
140
+ y
141
+ ]), tt = m(() => ({
142
+ baseUrl: w,
143
+ widgetToken: T,
133
144
  organizationId: X,
134
- configClient: O,
135
- gatewayRouting: k,
136
- linkComponent: A,
137
- uiFramework: j,
138
- implementation: M,
145
+ configClient: D,
146
+ gatewayRouting: O,
147
+ linkComponent: k,
148
+ uiFramework: A,
149
+ implementation: j,
139
150
  initResponse: J
140
151
  }), [
152
+ w,
141
153
  T,
142
- E,
143
154
  X,
155
+ D,
144
156
  O,
145
157
  k,
146
158
  A,
147
159
  j,
148
- M,
149
160
  J
150
- ]), tt = h(() => ({
151
- resolved: et,
152
- own: $e,
153
- refetch: Ge,
154
- loading: Ke,
155
- error: qe,
161
+ ]), nt = m(() => ({
162
+ resolved: tt,
163
+ own: et,
164
+ refetch: Ke,
165
+ loading: qe,
166
+ error: Je,
156
167
  analytics: Z,
157
- cascadeOrgId: D,
168
+ cascadeOrgId: E,
158
169
  initResponseStaleForToken: Y,
159
- disclosuresAcceptance: N,
160
- providerLabels: P
170
+ disclosuresAcceptance: M,
171
+ providerLabels: N
161
172
  }), [
173
+ tt,
162
174
  et,
163
- $e,
164
- Ge,
165
175
  Ke,
166
176
  qe,
177
+ Je,
167
178
  Z,
168
- D,
179
+ E,
169
180
  Y,
170
- N,
171
- P
172
- ]), nt = /* @__PURE__ */ v(se.Provider, {
173
- value: tt,
174
- children: /* @__PURE__ */ v(ee, {
175
- linkComponent: A,
176
- uiFramework: j,
177
- children: /* @__PURE__ */ v(re, { children: /* @__PURE__ */ v(he, {
178
- resetKeys: [E],
179
- errorFallback: Se,
180
- onError: Ce,
181
- labels: je,
182
- children: ge(J, S) ? /* @__PURE__ */ v(xe, {
183
- disclosuresAcceptance: N,
181
+ M,
182
+ N
183
+ ]), rt = /* @__PURE__ */ _(ce.Provider, {
184
+ value: nt,
185
+ children: /* @__PURE__ */ _(ee, {
186
+ linkComponent: k,
187
+ uiFramework: A,
188
+ children: /* @__PURE__ */ _(re, { children: /* @__PURE__ */ _(_e, {
189
+ resetKeys: [T],
190
+ errorFallback: we,
191
+ onError: Te,
192
+ labels: Ne,
193
+ children: ve(J, x) ? /* @__PURE__ */ _(Ce, {
194
+ disclosuresAcceptance: M,
184
195
  initStaleForToken: Y,
185
- labels: je
196
+ labels: Ne
186
197
  }) : ne
187
198
  }) })
188
199
  })
189
- }), $ = H ? /* @__PURE__ */ v(i, {
200
+ }), $ = H ? /* @__PURE__ */ _(i, {
190
201
  client: H,
191
202
  organizationId: X,
192
- widgetToken: E,
193
- installClientSecret: Re,
194
- authEpoch: Ve,
195
- organizationPending: Qe,
196
- children: nt
197
- }) : nt;
198
- return Q ? /* @__PURE__ */ v(be, {
203
+ widgetToken: T,
204
+ installClientSecret: ze,
205
+ authEpoch: He,
206
+ organizationStatus: $e,
207
+ children: rt
208
+ }) : rt;
209
+ return Q ? /* @__PURE__ */ _(Se, {
199
210
  client: Q,
200
211
  children: $
201
212
  }) : $;
202
213
  }
203
- function xe({ disclosuresAcceptance: e, initStaleForToken: t, labels: n }) {
204
- let r = ne("error-state") ?? s, i = u(), a = f(e), o = p({
214
+ function Ce({ disclosuresAcceptance: e, initStaleForToken: t, labels: n }) {
215
+ let r = ne("error-state") ?? s, i = l(), a = d(e), o = f({
205
216
  initStaleForToken: t,
206
217
  hasAcceptanceSurface: a
207
218
  });
208
- return m(() => {
209
- i(l.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
210
- }, [o, i]), t ? /* @__PURE__ */ v(r, {
219
+ return p(() => {
220
+ i(c.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
221
+ }, [o, i]), t ? /* @__PURE__ */ _(r, {
211
222
  title: n.disclosuresRefreshingTitle,
212
223
  description: n.disclosuresRefreshingDescription,
213
- testId: d,
224
+ testId: u,
214
225
  className: "ttw:w-full ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:py-7 ttw:text-card-foreground ttw:shadow-sm"
215
- }) : a ? /* @__PURE__ */ v("div", {
216
- "data-testid": d,
226
+ }) : a ? /* @__PURE__ */ _("div", {
227
+ "data-testid": u,
217
228
  className: "ttw:w-full",
218
229
  children: e
219
- }) : /* @__PURE__ */ v(r, {
230
+ }) : /* @__PURE__ */ _(r, {
220
231
  title: n.disclosuresRequiredTitle,
221
- testId: d,
232
+ testId: u,
222
233
  className: "ttw:w-full ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:py-7 ttw:text-card-foreground ttw:shadow-sm"
223
234
  });
224
235
  }
225
236
  //#endregion
226
- export { y as WidgetProvider, y as default };
237
+ export { v as WidgetProvider, v as default };
@@ -0,0 +1,6 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/deriveOrganizationStatus.js
2
+ function e({ organizationId: e, cascadeOrgId: t, ownsFetch: n, parentStatus: r, hasToken: i, loading: a, error: o, hasResult: s, initReplacementPending: c }) {
3
+ return i ? e ? "known" : t === void 0 ? n ? c ? "rotating" : a || !s && !o ? "pending" : o ? "failed" : "none" : r : "none" : "pending";
4
+ }
5
+ //#endregion
6
+ export { e as deriveOrganizationStatus };
@@ -54,7 +54,7 @@ function c(c, l, u) {
54
54
  error: g,
55
55
  clearedForAuthChange: v,
56
56
  initStaleForToken: k,
57
- initReplacementPending: k && !S,
57
+ initReplacementPending: k && D.current === c && !S,
58
58
  refetch: O
59
59
  };
60
60
  }
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.225", n = "54e5365966515fd9cadb3ae58894792a1d0fa7c5", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.227", n = "5d413a6fc2962d365de306d5d524882f6212437a", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -10,7 +10,7 @@ import "../../../data-access/dist/index.js";
10
10
  import { useQuery as i } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index10.js
12
12
  function a(a, { enabled: o = !0 } = {}) {
13
- let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(c && l && a) && o, p = e({
13
+ let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l && a) && o, p = e({
14
14
  query: { measure_unit_id: a ?? "" },
15
15
  client: s,
16
16
  headers: r(c)
@@ -18,7 +18,7 @@ function a(a, { enabled: o = !0 } = {}) {
18
18
  return i({
19
19
  ...t(p, {
20
20
  authEpoch: u,
21
- organizationPending: d
21
+ organizationStatus: d
22
22
  }),
23
23
  enabled: f
24
24
  });
@@ -10,7 +10,7 @@ import "../../../data-access/dist/index.js";
10
10
  import { useQuery as i } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js
12
12
  function a({ enabled: a, ...o } = {}) {
13
- let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(c && l) && (a === !0 || a === void 0), p = e({
13
+ let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l) && (a === !0 || a === void 0), p = e({
14
14
  query: o,
15
15
  client: s,
16
16
  headers: r(c)
@@ -18,7 +18,7 @@ function a({ enabled: a, ...o } = {}) {
18
18
  return i({
19
19
  ...t(p, {
20
20
  authEpoch: u,
21
- organizationPending: d
21
+ organizationStatus: d
22
22
  }, { carryWithinOrg: !0 }),
23
23
  enabled: f
24
24
  });
@@ -12,7 +12,7 @@ import { queryOptions as a, useQuery as o } from "@tanstack/react-query";
12
12
  //#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js
13
13
  var s = 100;
14
14
  function c({ enabled: c, ...l } = {}) {
15
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationPending: m } = r(), h = i(d), g = a({
15
+ let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationStatus: m } = r(), h = i(d), g = a({
16
16
  queryKey: [...t({
17
17
  client: u,
18
18
  headers: h,
@@ -45,7 +45,7 @@ function c({ enabled: c, ...l } = {}) {
45
45
  return o({
46
46
  ...n(g, {
47
47
  authEpoch: p,
48
- organizationPending: m
48
+ organizationStatus: m
49
49
  }),
50
50
  enabled: !!(d && f) && (c === !0 || c === void 0)
51
51
  });
@@ -10,7 +10,7 @@ import "../../../data-access/dist/index.js";
10
10
  import { useQuery as i } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js
12
12
  function a(a, { enabled: o = !0 } = {}) {
13
- let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(c && l && a) && o, p = e({
13
+ let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l && a) && o, p = e({
14
14
  client: s,
15
15
  headers: r(c),
16
16
  path: { product_id: a ?? "" }
@@ -18,7 +18,7 @@ function a(a, { enabled: o = !0 } = {}) {
18
18
  return i({
19
19
  ...t(p, {
20
20
  authEpoch: u,
21
- organizationPending: d
21
+ organizationStatus: d
22
22
  }),
23
23
  enabled: f
24
24
  });
@@ -10,14 +10,14 @@ import "../../../data-access/dist/index.js";
10
10
  import { useQuery as i } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js
12
12
  function a({ enabled: a = !0 } = {}) {
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
  });
17
17
  return i({
18
18
  ...t(f, {
19
19
  authEpoch: l,
20
- organizationPending: u
20
+ organizationStatus: u
21
21
  }),
22
22
  enabled: d
23
23
  });
@@ -14,7 +14,7 @@ import { useQueries as s } from "@tanstack/react-query";
14
14
  //#region ../../libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js
15
15
  var c = 25;
16
16
  function l({ enabled: l, transfersPerAccount: u = c } = {}) {
17
- let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = n(), g = r(f), _ = !!(f && p) && (l === !0 || l === void 0), v = a({ enabled: _ }), y = o(() => [...v.data?.data?.map((e) => e.id).filter(Boolean) ?? []].sort(), [v.data?.data]), b = s({ queries: y.map((n) => ({
17
+ let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = n(), g = r(f), _ = !!(f && p) && (l === !0 || l === void 0), v = a({ enabled: _ }), y = o(() => [...v.data?.data?.map((e) => e.id).filter(Boolean) ?? []].sort(), [v.data?.data]), b = s({ queries: y.map((n) => ({
18
18
  ...t(e({
19
19
  client: d,
20
20
  headers: g,
@@ -22,7 +22,7 @@ function l({ enabled: l, transfersPerAccount: u = c } = {}) {
22
22
  query: { limit: u }
23
23
  }), {
24
24
  authEpoch: m,
25
- organizationPending: h
25
+ organizationStatus: h
26
26
  }),
27
27
  enabled: _
28
28
  })) });