@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
@@ -1,9 +1,11 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js
2
- function e(e, t) {
2
+ var e = (e) => e;
3
+ function t(t, n) {
3
4
  return {
4
- ...e,
5
- queryKey: [...e.queryKey, { authEpoch: t }]
5
+ placeholderData: e,
6
+ ...t,
7
+ queryKey: [...t.queryKey, { authEpoch: n }]
6
8
  };
7
9
  }
8
10
  //#endregion
9
- export { e as withAuthEpoch };
11
+ export { t as withAuthEpoch };
@@ -11,10 +11,10 @@ import { WidgetProvider as l } from "./lib/WidgetProvider/WidgetProvider.js";
11
11
  import { WidgetTokenRefreshProvider as u } from "./lib/WidgetProvider/WidgetTokenRefreshProvider.js";
12
12
  import { useOptionalWidgetToken as d, useWidgetToken as f } from "./lib/WidgetProvider/useWidgetToken.js";
13
13
  import { RefreshingRootWidgetProvider as p } from "./lib/WidgetProvider/RefreshingRootWidgetProvider.js";
14
- import { useOwnWidgetConfig as m, useRefetchWidget as h, useWidgetConfig as g, useWidgetError as _, useWidgetLoading as v } from "./lib/WidgetProvider/hooks.js";
14
+ import { useOwnWidgetConfig as m, useRefetchWidget as h, useWidgetConfig as g, useWidgetError as _, useWidgetInitStaleForToken as v, useWidgetLoading as y } from "./lib/WidgetProvider/hooks.js";
15
15
  import "./lib/WidgetProvider/index.js";
16
- import { getNaicsOptions as y } from "./lib/naicsCodeMap.js";
17
- import { CardProgram as b } from "./lib/card/cardProgram.js";
18
- import { CARD_STATUS_LABELS_EN as x, CARD_STATUS_TONE as S, CARD_TYPE_LABELS_EN as C } from "./lib/card/cardPresentation.js";
16
+ import { getNaicsOptions as b } from "./lib/naicsCodeMap.js";
17
+ import { CardProgram as x } from "./lib/card/cardProgram.js";
18
+ import { CARD_STATUS_LABELS_EN as S, CARD_STATUS_TONE as C, CARD_TYPE_LABELS_EN as w } from "./lib/card/cardPresentation.js";
19
19
  import "./lib/analytics/index.js";
20
- export { x as CARD_STATUS_LABELS_EN, S as CARD_STATUS_TONE, C as CARD_TYPE_LABELS_EN, b as CardProgram, t as Implementation, p as RefreshingRootWidgetProvider, s as RootWidgetProvider, l as WidgetProvider, u as WidgetTokenRefreshProvider, e as cloneEmbeddedClient, n as getGlobalWidgetConfig, a as getGlobalWidgetInitState, y as getNaicsOptions, r as setGlobalWidgetConfig, o as subscribeToGlobalWidgetInitState, i as updateGlobalWidgetConfig, c as useAnalyticsTrack, d as useOptionalWidgetToken, m as useOwnWidgetConfig, h as useRefetchWidget, g as useWidgetConfig, _ as useWidgetError, v as useWidgetLoading, f as useWidgetToken };
20
+ export { S as CARD_STATUS_LABELS_EN, C as CARD_STATUS_TONE, w as CARD_TYPE_LABELS_EN, x as CardProgram, t as Implementation, p as RefreshingRootWidgetProvider, s as RootWidgetProvider, l as WidgetProvider, u as WidgetTokenRefreshProvider, e as cloneEmbeddedClient, n as getGlobalWidgetConfig, a as getGlobalWidgetInitState, b as getNaicsOptions, r as setGlobalWidgetConfig, o as subscribeToGlobalWidgetInitState, i as updateGlobalWidgetConfig, c as useAnalyticsTrack, d as useOptionalWidgetToken, m as useOwnWidgetConfig, h as useRefetchWidget, g as useWidgetConfig, _ as useWidgetError, v as useWidgetInitStaleForToken, y as useWidgetLoading, f as useWidgetToken };
@@ -3,7 +3,7 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { WidgetTokenRefreshContext as e } from "./WidgetTokenRefreshContext.js";
6
- import { createWidgetTokenManager as t } from "../../../../util/dist/index12.js";
6
+ import { createWidgetTokenManager as t } from "../../../../util/dist/lib/widgetTokenManager.js";
7
7
  import { useEffect as n, useMemo as r, useRef as i } from "react";
8
8
  import { jsx as a } from "react/jsx-runtime";
9
9
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js
@@ -12,13 +12,16 @@ function s() {
12
12
  return i(n)?.own ?? null;
13
13
  }
14
14
  function c() {
15
- return i(n)?.refetch ?? r;
15
+ return i(n)?.initResponseStaleForToken ?? !1;
16
16
  }
17
17
  function l() {
18
- return i(n)?.loading ?? !1;
18
+ return i(n)?.refetch ?? r;
19
19
  }
20
20
  function u() {
21
+ return i(n)?.loading ?? !1;
22
+ }
23
+ function d() {
21
24
  return i(n)?.error ?? null;
22
25
  }
23
26
  //#endregion
24
- export { s as useOwnWidgetConfig, c as useRefetchWidget, o as useWidgetConfig, u as useWidgetError, l as useWidgetLoading };
27
+ export { s as useOwnWidgetConfig, l as useRefetchWidget, o as useWidgetConfig, d as useWidgetError, c as useWidgetInitStaleForToken, u as useWidgetLoading };
@@ -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.2.254", n = "c1c7c5e52df18c550e730176711a1949f6c73ea5", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.2.256", n = "92eb36f8b554b495b2b78067fa7b86326c571f92", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -5,53 +5,80 @@
5
5
  import { useEmbedApi as e } from "../../../../data-access/dist/lib/EmbedApiContext.js";
6
6
  import "../../../../data-access/dist/index.js";
7
7
  import { useOptionalWidgetToken as t } from "../../../../feature/dist/lib/WidgetProvider/useWidgetToken.js";
8
- import { useWidgetConfig as n, useWidgetError as r } from "../../../../feature/dist/lib/WidgetProvider/hooks.js";
8
+ import { useWidgetConfig as n, useWidgetError as r, useWidgetInitStaleForToken as i } from "../../../../feature/dist/lib/WidgetProvider/hooks.js";
9
9
  import "../../../../feature/dist/index.js";
10
- import { MoniteProvider as i } from "../../../../../monite-sdk/dist/index605.js";
10
+ import { MoniteProvider as a } from "../../../../../monite-sdk/dist/index605.js";
11
11
  import "../../../../../monite-sdk/dist/index.js";
12
- import { useMemo as a } from "react";
13
- import { jsx as o } from "react/jsx-runtime";
12
+ import { useMemo as o, useState as s } from "react";
13
+ import { jsx as c } from "react/jsx-runtime";
14
14
  //#region ../../libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js
15
- var s = 0;
16
- function c(e) {
15
+ var l = 0;
16
+ function u(e) {
17
17
  return e instanceof Error ? e : Error(String(e));
18
18
  }
19
- function l({ finopsThemeColors: l, children: u }) {
20
- let { baseUrl: d, organizationId: f, initResponse: p, widgetToken: m } = n(), { client: h } = e(), g = r(), _ = t(), v = _ !== null, y = _?.state, b = _?.refresh, x = _?.getState;
21
- if (g) throw g;
22
- if (y?.status === "error") throw y.error instanceof Error ? y.error : Error(String(y.error));
23
- let S = p?.userId ?? null, C = v ? y?.status === "ready" : !!m, w = a(() => {
24
- let e = h.getConfig();
19
+ function d({ finopsThemeColors: d, children: f }) {
20
+ let { baseUrl: p, organizationId: m, initResponse: h, widgetToken: g } = n(), { client: _ } = e(), v = t(), y = v !== null, b = v?.state, x = v?.refresh, S = v?.getState, C = y && b?.status === "ready" ? b.widgetToken : g ?? null, w = y && b?.status === "ready" ? b.exp : void 0, T = i(), [E, D] = s(() => ({
21
+ organizationId: m,
22
+ widgetToken: C,
23
+ widgetTokenExp: w
24
+ }));
25
+ !T && (E.organizationId !== m || E.widgetToken !== C || E.widgetTokenExp !== w) && D({
26
+ organizationId: m,
27
+ widgetToken: C,
28
+ widgetTokenExp: w
29
+ });
30
+ let O = T ? E.organizationId : m, k = T ? E.widgetToken : C, A = T ? E.widgetTokenExp : w, j = r();
31
+ if (j) throw j;
32
+ if (b?.status === "error") throw b.error instanceof Error ? b.error : Error(String(b.error));
33
+ let M = h?.userId ?? null, N = y ? b?.status === "ready" : !!g, P = o(() => {
34
+ let e = _.getConfig();
25
35
  return async (t, n) => {
26
36
  let r = t instanceof Request ? t : new Request(t, n);
27
- for (let t of h.interceptors.request.fns) t && (r = await t(r, e));
37
+ for (let t of _.interceptors.request.fns) t && (r = await t(r, e));
38
+ if (T) {
39
+ if (!k) throw Error("MoniteWrapper.fetch: widget token is not ready during init refresh");
40
+ r = new Request(r), r.headers.has("X-Client-Secret") ? (r.headers.delete("Authorization"), r.headers.set("X-Widget-Token", k)) : (r.headers.set("Authorization", `Bearer ${k}`), r.headers.has("X-Widget-Token") && r.headers.set("X-Widget-Token", k));
41
+ }
28
42
  return globalThis.fetch(r);
29
43
  };
30
- }, [h]), T = a(() => !d || !f ? null : {
31
- apiUrl: d,
32
- entityId: f,
33
- fetch: w,
44
+ }, [
45
+ _,
46
+ T,
47
+ k
48
+ ]), F = o(() => !p || !O ? null : {
49
+ apiUrl: p,
50
+ entityId: O,
51
+ fetch: P,
34
52
  fetchToken: async () => {
35
- if (!v) {
36
- if (!m) throw Error("MoniteWrapper.fetchToken: widget token is not ready");
53
+ if (T) {
54
+ if (!k) throw Error("MoniteWrapper.fetchToken: widget token is not ready during init refresh");
55
+ let e = Date.now() / 1e3;
56
+ return {
57
+ access_token: k,
58
+ expires_in: A === void 0 ? l : Math.max(0, A - e),
59
+ token_type: "Bearer"
60
+ };
61
+ }
62
+ if (!y) {
63
+ if (!g) throw Error("MoniteWrapper.fetchToken: widget token is not ready");
37
64
  return {
38
- access_token: m,
39
- expires_in: s,
65
+ access_token: g,
66
+ expires_in: l,
40
67
  token_type: "Bearer"
41
68
  };
42
69
  }
43
- if (!b || !x) throw Error("MoniteWrapper.fetchToken: token refresh provider is unavailable");
70
+ if (!x || !S) throw Error("MoniteWrapper.fetchToken: token refresh provider is unavailable");
44
71
  let e = !1, t = () => {
45
- let e = x();
46
- if (e.status === "error") throw c(e.error);
72
+ let e = S();
73
+ if (e.status === "error") throw u(e.error);
47
74
  return e;
48
75
  }, n = (e) => {
49
76
  if (e.status !== "ready") throw Error("MoniteWrapper.fetchToken: widget token is not ready after refresh()");
50
77
  return e;
51
- }, r = x();
52
- if (r.status === "error") throw c(r.error);
53
- if (r.status !== "ready" && (await b(), e = !0, r = t()), r = n(r), r.exp === void 0 && !e && (await b(), r = n(t())), r.exp === void 0 && r.lastError !== void 0) throw c(r.lastError);
54
- let i = Date.now() / 1e3, a = r.exp === void 0 ? s : Math.max(0, r.exp - i);
78
+ }, r = S();
79
+ if (r.status === "error") throw u(r.error);
80
+ if (r.status !== "ready" && (await x(), e = !0, r = t()), r = n(r), r.exp === void 0 && !e && (await x(), r = n(t())), r.exp === void 0 && r.lastError !== void 0) throw u(r.lastError);
81
+ let i = Date.now() / 1e3, a = r.exp === void 0 ? l : Math.max(0, r.exp - i);
55
82
  return {
56
83
  access_token: r.widgetToken,
57
84
  expires_in: a,
@@ -59,22 +86,25 @@ function l({ finopsThemeColors: l, children: u }) {
59
86
  };
60
87
  }
61
88
  }, [
62
- d,
89
+ p,
90
+ S,
91
+ y,
92
+ T,
93
+ P,
94
+ k,
95
+ A,
96
+ O,
63
97
  x,
64
- v,
65
- w,
66
- f,
67
- b,
68
- m
69
- ]), E = a(() => new Set(p?.scopes ?? []), [p?.scopes]), D = a(() => {
70
- if (!l) return;
98
+ g
99
+ ]), I = o(() => new Set(h?.scopes ?? []), [h?.scopes]), L = o(() => {
100
+ if (!d) return;
71
101
  let e = {};
72
- return l.primary && (e.primary = l.primary), l.primaryForeground && (e.primaryForeground = l.primaryForeground), Object.keys(e).length > 0 ? { colors: e } : void 0;
73
- }, [l]);
74
- return !C || !T || !p || !d || !f ? null : /* @__PURE__ */ o(i, {
75
- monite: T,
76
- theme: D,
77
- userPermissions: E,
102
+ return d.primary && (e.primary = d.primary), d.primaryForeground && (e.primaryForeground = d.primaryForeground), Object.keys(e).length > 0 ? { colors: e } : void 0;
103
+ }, [d]);
104
+ return !N || !F || !h || !p || !O ? null : /* @__PURE__ */ c(a, {
105
+ monite: F,
106
+ theme: L,
107
+ userPermissions: I,
78
108
  componentSettings: {
79
109
  receivables: {
80
110
  bankAccountCountries: ["US"],
@@ -87,8 +117,8 @@ function l({ finopsThemeColors: l, children: u }) {
87
117
  availableAPDocuments: []
88
118
  }
89
119
  },
90
- children: u
91
- }, S ?? "no-user");
120
+ children: f
121
+ }, M ?? "no-user");
92
122
  }
93
123
  //#endregion
94
- export { l as MoniteWrapper };
124
+ export { d as MoniteWrapper };
@@ -1,4 +1,4 @@
1
- import "../../../util/dist/index14.js";
1
+ import "../../../util/dist/lib/apiErrors.js";
2
2
  import { PRODUCT_MESSAGE_LABELS_EN as e } from "./lib/labels.js";
3
3
  import { EMPTY_PRODUCT_FORM_VALUES as t, buildProductDetailsView as n, buildProductRows as r, getCurrencyOptions as i, hasSelectedText as a } from "./lib/helpers.js";
4
4
  import { ProductFormSheet as o } from "../../ui/dist/index3.js";
@@ -2,7 +2,7 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { extractApiErrorMessage as e } from "../../../../util/dist/index14.js";
5
+ import { extractApiErrorMessage as e } from "../../../../util/dist/lib/apiErrors.js";
6
6
  import { PRODUCT_MESSAGE_LABELS_EN as t } from "./labels.js";
7
7
  import { formatPrice as n, validateMeasureUnit as r } from "./helpers.js";
8
8
  import { MeasureUnitsManager as i } from "../../../ui/dist/index4.js";
@@ -2,7 +2,7 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { extractApiErrorMessage as e } from "../../../../util/dist/index14.js";
5
+ import { extractApiErrorMessage as e } from "../../../../util/dist/lib/apiErrors.js";
6
6
  import { EMPTY_PRODUCT_FORM_VALUES as t, getCurrencyOptions as n, hasProductFormErrors as r, productFormValuesToRequest as i, productFormValuesToUpdateRequest as a, productToFormValues as o, validateProductForm as s } from "./helpers.js";
7
7
  import { useCreateProductMutation as c } from "../../../data-access/dist/index5.js";
8
8
  import { useUpdateProductMutation as l } from "../../../data-access/dist/index6.js";
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index3.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/amountOutputToMajorUnits.js
2
2
  var e = [
3
3
  "BIF",
4
4
  "CLP",
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index14.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/apiErrors.js
2
2
  function e(e) {
3
3
  return typeof e == "object" && !!e;
4
4
  }
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index2.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/coerceAmountValueToMinorUnits.js
2
2
  function e(e) {
3
3
  if (e == null) return 0;
4
4
  if (typeof e == "number") return Number.isFinite(e) ? Math.round(e) : 0;
@@ -0,0 +1,13 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/formatCalendarDate.js
2
+ function e(e) {
3
+ if (!e) return "";
4
+ let [t, n, r] = e.split("-").map(Number);
5
+ return !t || !n || !r ? e : new Date(Date.UTC(t, n - 1, r)).toLocaleDateString("en-US", {
6
+ month: "short",
7
+ day: "numeric",
8
+ year: "numeric",
9
+ timeZone: "UTC"
10
+ });
11
+ }
12
+ //#endregion
13
+ export { e as formatCalendarDate };
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index4.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/formatMoneyExact.js
2
2
  function e(e) {
3
3
  return new Intl.NumberFormat("en", {
4
4
  style: "currency",
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index5.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/formatPhoneDisplay.js
2
2
  function e(e, t = "-") {
3
3
  let n = e?.trim();
4
4
  if (!n) return t;
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index6.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/getInitials.js
2
2
  function e(e) {
3
3
  let t = e.split(/\s+/).filter(Boolean);
4
4
  return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index7.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/normalizeAmountOutputCurrencyCode.js
2
2
  function e(e) {
3
3
  return e?.trim() || "USD";
4
4
  }
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index8.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/parseAmountOutputMajorUnits.js
2
2
  function e(e) {
3
3
  let t = e?.value, n = typeof t == "string" ? parseFloat(t) : t ?? 0;
4
4
  return Number.isFinite(n) ? n / 100 : 0;
@@ -1,5 +1,5 @@
1
- import { minorExponentForCurrency as e } from "./index3.js";
2
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index9.js
1
+ import { minorExponentForCurrency as e } from "./amountOutputToMajorUnits.js";
2
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/parseDecimalAmountToMinorUnits.js
3
3
  var t = /^(?:\d{1,3}(?:,\d{3})+(?:\.\d+)?|\d+(?:\.\d+)?|\.\d+)$/;
4
4
  function n(e) {
5
5
  let n = e.trim();
@@ -1,6 +1,6 @@
1
- import { normalizeAmountOutputCurrencyCode as e } from "./index7.js";
2
- import { parseAmountOutputMajorUnits as t } from "./index8.js";
3
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index10.js
1
+ import { normalizeAmountOutputCurrencyCode as e } from "./normalizeAmountOutputCurrencyCode.js";
2
+ import { parseAmountOutputMajorUnits as t } from "./parseAmountOutputMajorUnits.js";
3
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/sumAmountOutputsMajorUnits.js
4
4
  function n(n, r) {
5
5
  let i = e(r), a = n.reduce((n, r) => e(r?.currencyCode) === i ? n + t(r) : n, 0);
6
6
  return Math.round(a * 100) / 100;
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index11.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/usStates.js
2
2
  var e = [
3
3
  { abbreviation: "AL" },
4
4
  { abbreviation: "AK" },
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index13.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/widgetDomEvents.js
2
2
  var e = "tesouro-new-external-bank-account-linked-success", t = "tesouro-new-embedded-bank-account-created-success";
3
3
  function n(e) {
4
4
  typeof window > "u" || window.dispatchEvent(new CustomEvent(e));
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/index12.js
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/widgetTokenManager.js
2
2
  function e(e) {
3
3
  let { fetcher: t } = e, n = e.leadSeconds ?? 60, r = { status: "loading" }, i = /* @__PURE__ */ new Set(), a = 0, o = 0, s = 0, c = !1, l, u, d, f = () => {
4
4
  i.forEach((e) => e());
@@ -2,7 +2,7 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { extractApiErrorMessage as e } from "../../../shared/util/dist/index14.js";
5
+ import { extractApiErrorMessage as e } from "../../../shared/util/dist/lib/apiErrors.js";
6
6
  import { EMPTY_FORM_VALUES as t } from "./index3.js";
7
7
  import { buildKeywordsByTagId as n, computeNextOcrAutoTagging as r, getCategoryOptions as i, hasFormErrors as a, isDuplicateTagNameError as o, validateTagForm as s } from "./index5.js";
8
8
  import { useCreateTagMutation as c } from "../../data-access/dist/index4.js";
@@ -1,4 +1,4 @@
1
- import { getInitials as e } from "../../../shared/util/dist/index6.js";
1
+ import { getInitials as e } from "../../../shared/util/dist/lib/getInitials.js";
2
2
  import { filterRolesForOrganization as t, isRoleVisibleForOrganization as n } from "../../../../shared/util-validation/dist/index6.js";
3
3
  import { sortRolesBySortOrdinal as r } from "../../../../shared/util-validation/dist/index22.js";
4
4
  import { bareRoleKey as i, resolveOrganizationRoleDescription as a, resolveOrganizationRoleDisplayName as o, resolveOrganizationRoleIcon as s, resolveOrganizationRoleKeyForUser as c, rolesForMemberOrganization as l, stripRoleNamespace as u, toRoleDisplayOptions as d } from "./index9.js";
@@ -1,4 +1,4 @@
1
- import { getInitials as e } from "../../../shared/util/dist/index6.js";
1
+ import { getInitials as e } from "../../../shared/util/dist/lib/getInitials.js";
2
2
  //#region ../../libs/tesouro-embedded-components-react/team-widget/feature/dist/index4.js
3
3
  function t(e) {
4
4
  let t = e.name?.trim();
@@ -4,10 +4,10 @@
4
4
  "use client";
5
5
  import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
6
  import "../../../shared/ui/dist/index.js";
7
- import { coerceAmountValueToMinorUnits as t } from "../../../shared/util/dist/index2.js";
8
- import { amountOutputToMajorUnits as n, minorExponentForCurrency as r } from "../../../shared/util/dist/index3.js";
9
- import { currencySymbolForCode as i, formatMoneyExact as a } from "../../../shared/util/dist/index4.js";
10
- import { parseDecimalAmountToMinorUnits as o } from "../../../shared/util/dist/index9.js";
7
+ import { coerceAmountValueToMinorUnits as t } from "../../../shared/util/dist/lib/coerceAmountValueToMinorUnits.js";
8
+ import { amountOutputToMajorUnits as n, minorExponentForCurrency as r } from "../../../shared/util/dist/lib/amountOutputToMajorUnits.js";
9
+ import { currencySymbolForCode as i, formatMoneyExact as a } from "../../../shared/util/dist/lib/formatMoneyExact.js";
10
+ import { parseDecimalAmountToMinorUnits as o } from "../../../shared/util/dist/lib/parseDecimalAmountToMinorUnits.js";
11
11
  import { TRANSFERS_ANALYTICS_EVENTS as s } from "./index2.js";
12
12
  import { useCreateBookTransferMutation as c } from "../../data-access/dist/index7.js";
13
13
  import { useCreateAchMoneyMovementMutation as l } from "../../data-access/dist/index8.js";
@@ -5,7 +5,7 @@
5
5
  import { Scope as e } from "../../../shared/data-access/dist/lib/scopes.js";
6
6
  import "../../../shared/data-access/dist/index.js";
7
7
  import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
8
- import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as n, TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as r } from "../../../shared/util/dist/index13.js";
8
+ import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as n, TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as r } from "../../../shared/util/dist/lib/widgetDomEvents.js";
9
9
  import { useWidgetConfig as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
10
  import "../../../shared/feature/dist/index.js";
11
11
  import { DEFAULT_FEATURE_LABELS as a } from "./index3.js";