@tesouro/embedded-components-react 0.2.276 → 0.2.281

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 (69) hide show
  1. package/README.md +17 -14
  2. package/dist/experimental/WidgetSuite.d.ts +9 -1
  3. package/dist/experimental/index.d.ts +9 -1
  4. package/dist/index.css +3 -0
  5. package/dist/index.d.ts +46 -23
  6. package/dist/index.js +54 -53
  7. package/dist/lib/AcceptDisclosuresWidget.d.ts +9 -1
  8. package/dist/lib/BalancesWidget.d.ts +8 -0
  9. package/dist/lib/BankAccountOnboardingWidget.d.ts +9 -1
  10. package/dist/lib/BankAccountsWidget.d.ts +9 -1
  11. package/dist/lib/BillPayWidget.d.ts +8 -0
  12. package/dist/lib/CardDetailsWidget.d.ts +9 -1
  13. package/dist/lib/CardsWidget.d.ts +9 -1
  14. package/dist/lib/ChartOfAccountsWidget.d.ts +9 -1
  15. package/dist/lib/CounterpartsWidget.d.ts +9 -1
  16. package/dist/lib/CreateCardWidget.d.ts +9 -1
  17. package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +9 -1
  18. package/dist/lib/ExpenseManagementWidget.d.ts +9 -1
  19. package/dist/lib/ExpenseRequirementsWidget.d.ts +9 -1
  20. package/dist/lib/HelpWidget.d.ts +9 -1
  21. package/dist/lib/InsightsWidget.d.ts +8 -0
  22. package/dist/lib/InvoicingWidget.d.ts +9 -1
  23. package/dist/lib/LinkedAccountsWidget.d.ts +9 -1
  24. package/dist/lib/ProductsWidget.d.ts +9 -1
  25. package/dist/lib/ProfileWidget.d.ts +9 -1
  26. package/dist/lib/ReceiptMatchWidget.d.ts +9 -1
  27. package/dist/lib/ReceivablesWidget.d.ts +9 -1
  28. package/dist/lib/SettingsWidget.d.ts +9 -1
  29. package/dist/lib/TagsWidget.d.ts +9 -1
  30. package/dist/lib/TeamWidget.d.ts +9 -1
  31. package/dist/lib/TransfersWidget.d.ts +8 -0
  32. package/dist/lib/WidgetProvider.d.ts +25 -2
  33. package/dist/lib/WidgetProvider.js +8 -7
  34. package/dist/lib/WidgetProviderPublic.d.ts +8 -0
  35. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +3 -2
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +54 -53
  37. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +3 -2
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +4 -3
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +3 -2
  40. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +3 -2
  41. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +3 -2
  42. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +3 -2
  43. package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js +30 -29
  44. package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/feature/dist/lib/ExpenseApprovalPoliciesWidgetFeature.js +2 -1
  45. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +3 -2
  46. package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/feature/dist/lib/ReceiptMatchWidget.js +7 -6
  47. package/dist/libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js +2 -1
  48. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +5 -4
  49. package/dist/libs/tesouro-embedded-components-react/help-widget/feature/dist/index3.js +3 -2
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +3 -2
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +5 -4
  52. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +3 -2
  53. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js +3 -2
  54. package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +3 -2
  55. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +3 -2
  56. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +24 -4
  57. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +5 -5
  58. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +69 -67
  59. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +158 -132
  60. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js +7 -4
  61. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js +20 -0
  62. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/labels.js +6 -1
  63. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  64. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +9 -9
  65. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js +19 -18
  66. package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index11.js +3 -2
  67. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +3 -2
  68. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +3 -2
  69. package/package.json +1 -1
@@ -111,7 +111,7 @@ function b({ onEdit: r, onDelete: o, onAdd: b, screenLabels: x, formLabels: S, d
111
111
  })
112
112
  ] })] });
113
113
  }
114
- function x({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: l, analytics: u, errorFallback: d, onError: f, ...p }) {
114
+ function x({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: l, analytics: u, disclosuresAcceptance: d, errorFallback: f, onError: p, ...m }) {
115
115
  return /* @__PURE__ */ _(r, {
116
116
  widgetName: o,
117
117
  baseUrl: e,
@@ -123,9 +123,10 @@ function x({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gat
123
123
  implementation: c,
124
124
  uiFramework: l,
125
125
  analytics: u,
126
- errorFallback: d,
127
- onError: f,
128
- children: /* @__PURE__ */ _(b, { ...p })
126
+ disclosuresAcceptance: d,
127
+ errorFallback: f,
128
+ onError: p,
129
+ children: /* @__PURE__ */ _(b, { ...m })
129
130
  });
130
131
  }
131
132
  //#endregion
@@ -29,7 +29,7 @@ function u({ faq: n = o, bankName: a, ...u }) {
29
29
  ...u
30
30
  });
31
31
  }
32
- function d({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: d, errorFallback: f, onError: p, analytics: m, ...h }) {
32
+ function d({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: d, errorFallback: f, onError: p, analytics: m, disclosuresAcceptance: h, ...g }) {
33
33
  return /* @__PURE__ */ l(n, {
34
34
  widgetName: a,
35
35
  baseUrl: e,
@@ -43,7 +43,8 @@ function d({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gat
43
43
  errorFallback: f,
44
44
  onError: p,
45
45
  analytics: m,
46
- children: /* @__PURE__ */ l(u, { ...h })
46
+ disclosuresAcceptance: h,
47
+ children: /* @__PURE__ */ l(u, { ...g })
47
48
  });
48
49
  }
49
50
  //#endregion
@@ -212,7 +212,7 @@ function S({ counterpartFormLabels: t, counterpartMessageLabels: a, defaultTab:
212
212
  })
213
213
  ] });
214
214
  }
215
- function C({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, ...p }) {
215
+ function C({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, ...m }) {
216
216
  return /* @__PURE__ */ b(t, {
217
217
  widgetName: a,
218
218
  baseUrl: e,
@@ -226,7 +226,8 @@ function C({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gat
226
226
  errorFallback: u,
227
227
  onError: d,
228
228
  analytics: f,
229
- children: /* @__PURE__ */ b(S, { ...p })
229
+ disclosuresAcceptance: p,
230
+ children: /* @__PURE__ */ b(S, { ...m })
230
231
  });
231
232
  }
232
233
  //#endregion
@@ -19,7 +19,7 @@ function c(n) {
19
19
  i(r.Mounted);
20
20
  }, [i]), /* @__PURE__ */ o(t, { ...n });
21
21
  }
22
- function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a, gatewayRouting: l, linkComponent: u, errorFallback: d, onError: f, finopsThemeColors: p, analytics: m, pageTitleComponent: h = s, uiFramework: g, ..._ }) {
22
+ function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a, gatewayRouting: l, linkComponent: u, errorFallback: d, onError: f, finopsThemeColors: p, analytics: m, disclosuresAcceptance: h, pageTitleComponent: g = s, uiFramework: _, ...v }) {
23
23
  return /* @__PURE__ */ o(n, {
24
24
  widgetName: i,
25
25
  baseUrl: e,
@@ -32,10 +32,11 @@ function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a, gat
32
32
  onError: f,
33
33
  finopsThemeColors: p,
34
34
  analytics: m,
35
- uiFramework: g,
35
+ disclosuresAcceptance: h,
36
+ uiFramework: _,
36
37
  children: /* @__PURE__ */ o(c, {
37
- ..._,
38
- pageTitleComponent: h
38
+ ...v,
39
+ pageTitleComponent: g
39
40
  })
40
41
  });
41
42
  }
@@ -22,7 +22,7 @@ function c({ labels: t, featureLabels: n }) {
22
22
  ...c
23
23
  })] });
24
24
  }
25
- function l({ baseUrl: e, widgetToken: r, organizationId: i, configClient: a, gatewayRouting: s, linkComponent: l, implementation: u, uiFramework: d, errorFallback: f, onError: p, analytics: m, ...h }) {
25
+ function l({ baseUrl: e, widgetToken: r, organizationId: i, configClient: a, gatewayRouting: s, linkComponent: l, implementation: u, uiFramework: d, errorFallback: f, onError: p, analytics: m, disclosuresAcceptance: h, ...g }) {
26
26
  return /* @__PURE__ */ o(t, {
27
27
  widgetName: n,
28
28
  baseUrl: e,
@@ -36,7 +36,8 @@ function l({ baseUrl: e, widgetToken: r, organizationId: i, configClient: a, gat
36
36
  errorFallback: f,
37
37
  onError: p,
38
38
  analytics: m,
39
- children: /* @__PURE__ */ o(c, { ...h })
39
+ disclosuresAcceptance: h,
40
+ children: /* @__PURE__ */ o(c, { ...g })
40
41
  });
41
42
  }
42
43
  //#endregion
@@ -103,7 +103,7 @@ function h({ pageSizeOptions: t = o, screenLabels: a, formLabels: h, detailsLabe
103
103
  })
104
104
  ] });
105
105
  }
106
- function g({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, ...m }) {
106
+ function g({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: m, ...g }) {
107
107
  return /* @__PURE__ */ p(t, {
108
108
  widgetName: a,
109
109
  baseUrl: e,
@@ -117,7 +117,8 @@ function g({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gat
117
117
  errorFallback: u,
118
118
  onError: d,
119
119
  analytics: f,
120
- children: /* @__PURE__ */ p(h, { ...m })
120
+ disclosuresAcceptance: m,
121
+ children: /* @__PURE__ */ p(h, { ...g })
121
122
  });
122
123
  }
123
124
  //#endregion
@@ -100,7 +100,7 @@ function v({ labels: t, featureLabels: o, contactUrl: v }) {
100
100
  isError: k
101
101
  });
102
102
  }
103
- function y({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: p, ...m }) {
103
+ function y({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: p, disclosuresAcceptance: m, ...h }) {
104
104
  return /* @__PURE__ */ f(t, {
105
105
  widgetName: o,
106
106
  baseUrl: e,
@@ -114,7 +114,8 @@ function y({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gat
114
114
  errorFallback: u,
115
115
  onError: d,
116
116
  analytics: p,
117
- children: /* @__PURE__ */ f(v, { ...m })
117
+ disclosuresAcceptance: m,
118
+ children: /* @__PURE__ */ f(v, { ...h })
118
119
  });
119
120
  }
120
121
  //#endregion
@@ -112,7 +112,7 @@ function C({ labels: t, featureLabels: o, acceptInviteRedirectUri: m, helpContac
112
112
  onSectionChange: W
113
113
  });
114
114
  }
115
- function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: s, uiFramework: c, errorFallback: l, onError: u, finopsThemeColors: d, analytics: f, ...p }) {
115
+ function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: s, uiFramework: c, errorFallback: l, onError: u, finopsThemeColors: d, analytics: f, disclosuresAcceptance: p, ...h }) {
116
116
  return /* @__PURE__ */ b(o, {
117
117
  widgetName: m,
118
118
  baseUrl: e,
@@ -127,7 +127,8 @@ function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
127
127
  onError: u,
128
128
  finopsThemeColors: d,
129
129
  analytics: f,
130
- children: /* @__PURE__ */ b(C, { ...p })
130
+ disclosuresAcceptance: p,
131
+ children: /* @__PURE__ */ b(C, { ...h })
131
132
  });
132
133
  }
133
134
  //#endregion
@@ -2945,7 +2945,8 @@ var Go = e.object({
2945
2945
  "status",
2946
2946
  "document_id",
2947
2947
  "currency",
2948
- "counterpart_name"
2948
+ "counterpart_name",
2949
+ "scheduled_payment_date"
2949
2950
  ]), Zo = e.enum([
2950
2951
  "created_at",
2951
2952
  "status",
@@ -5580,6 +5581,7 @@ var Dd = e.object({
5580
5581
  payment_terms: ms.optional(),
5581
5582
  project_id: e.uuid().optional(),
5582
5583
  purchase_order_id: e.uuid().optional(),
5584
+ scheduled_payment_date: e.iso.date().optional(),
5583
5585
  sender: e.email().optional(),
5584
5586
  source_of_payable_data: zu,
5585
5587
  status: j,
@@ -7591,7 +7593,13 @@ e.discriminatedUnion("type", [
7591
7593
  tag_ids__not_in: e.array(e.uuid()).optional(),
7592
7594
  has_tags: e.boolean().optional(),
7593
7595
  origin: A.optional(),
7594
- has_file: e.boolean().optional()
7596
+ has_file: e.boolean().optional(),
7597
+ scheduled_payment_date: e.iso.date().optional(),
7598
+ scheduled_payment_date__gt: e.iso.date().optional(),
7599
+ scheduled_payment_date__lt: e.iso.date().optional(),
7600
+ scheduled_payment_date__gte: e.iso.date().optional(),
7601
+ scheduled_payment_date__lte: e.iso.date().optional(),
7602
+ has_scheduled_payment: e.boolean().optional()
7595
7603
  }), e.object({ "x-organization-id": e.uuid() }), e.object({
7596
7604
  dimension: fl.optional(),
7597
7605
  metric: gl,
@@ -8231,7 +8239,13 @@ e.discriminatedUnion("type", [
8231
8239
  tag_ids__not_in: e.array(e.uuid()).optional(),
8232
8240
  has_tags: e.boolean().optional(),
8233
8241
  origin: A.optional(),
8234
- has_file: e.boolean().optional()
8242
+ has_file: e.boolean().optional(),
8243
+ scheduled_payment_date: e.iso.date().optional(),
8244
+ scheduled_payment_date__gt: e.iso.date().optional(),
8245
+ scheduled_payment_date__lt: e.iso.date().optional(),
8246
+ scheduled_payment_date__gte: e.iso.date().optional(),
8247
+ scheduled_payment_date__lte: e.iso.date().optional(),
8248
+ has_scheduled_payment: e.boolean().optional()
8235
8249
  }), e.object({ "x-organization-id": e.uuid() }), e.object({ "x-organization-id": e.uuid() }), e.object({
8236
8250
  created_at__gt: e.iso.datetime().optional(),
8237
8251
  created_at__lt: e.iso.datetime().optional(),
@@ -8281,7 +8295,13 @@ e.discriminatedUnion("type", [
8281
8295
  tag_ids__not_in: e.array(e.uuid()).optional(),
8282
8296
  has_tags: e.boolean().optional(),
8283
8297
  origin: A.optional(),
8284
- has_file: e.boolean().optional()
8298
+ has_file: e.boolean().optional(),
8299
+ scheduled_payment_date: e.iso.date().optional(),
8300
+ scheduled_payment_date__gt: e.iso.date().optional(),
8301
+ scheduled_payment_date__lt: e.iso.date().optional(),
8302
+ scheduled_payment_date__gte: e.iso.date().optional(),
8303
+ scheduled_payment_date__lte: e.iso.date().optional(),
8304
+ has_scheduled_payment: e.boolean().optional()
8285
8305
  }), e.object({ "x-organization-id": e.uuid() }), e.object({ "x-organization-id": e.uuid() }), e.object({ "x-organization-id": e.uuid() }), e.object({ payable_id: e.uuid() }), e.void(), e.object({ "x-organization-id": e.uuid() }), e.object({ payable_id: e.uuid() }), e.object({ "x-organization-id": e.uuid() }), e.object({ payable_id: e.uuid() }), e.object({ "x-organization-id": e.uuid() }), e.object({ payable_id: e.uuid() }), e.object({ "x-organization-id": e.uuid() }), e.object({ payable_id: e.uuid() }), e.object({ "x-organization-id": e.uuid() }), e.object({ payable_id: e.uuid() }), e.object({ "x-organization-id": e.uuid() }), e.object({ payable_id: e.uuid() }), e.object({ "x-organization-id": e.uuid() }), e.object({ payable_id: e.uuid() }), e.object({
8286
8306
  order: E.optional().default("asc"),
8287
8307
  limit: e.int().gte(1).lte(100).optional().default(100),
@@ -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 _, useWidgetInitStaleForToken as v, useWidgetLoading as y } from "./lib/WidgetProvider/hooks.js";
14
+ import { useDisclosuresAcceptanceSurface as m, useOwnWidgetConfig as h, useRefetchWidget as g, useWidgetConfig as _, useWidgetError as v, useWidgetInitStaleForToken as y, useWidgetLoading as b } from "./lib/WidgetProvider/hooks.js";
15
15
  import "./lib/WidgetProvider/index.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";
16
+ import { getNaicsOptions as x } from "./lib/naicsCodeMap.js";
17
+ import { CardProgram as S } from "./lib/card/cardProgram.js";
18
+ import { CARD_STATUS_LABELS_EN as C, CARD_STATUS_TONE as w, CARD_TYPE_LABELS_EN as T } from "./lib/card/cardPresentation.js";
19
19
  import "./lib/analytics/index.js";
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 };
20
+ export { C as CARD_STATUS_LABELS_EN, w as CARD_STATUS_TONE, T as CARD_TYPE_LABELS_EN, S 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, x as getNaicsOptions, r as setGlobalWidgetConfig, o as subscribeToGlobalWidgetInitState, i as updateGlobalWidgetConfig, c as useAnalyticsTrack, m as useDisclosuresAcceptanceSurface, d as useOptionalWidgetToken, h as useOwnWidgetConfig, g as useRefetchWidget, _ as useWidgetConfig, v as useWidgetError, y as useWidgetInitStaleForToken, b as useWidgetLoading, f as useWidgetToken };
@@ -3,88 +3,88 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { registerQueryClient as e, unregisterQueryClient as t } from "../../../../data-access/dist/lib/clientRegistry.js";
6
- import { createEmbeddedClient as n } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
7
- import { EmbedApiProvider as r } from "../../../../data-access/dist/lib/EmbedApiContext.js";
6
+ import { createEmbeddedClient as ee } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
7
+ import { EmbedApiProvider as n } from "../../../../data-access/dist/lib/EmbedApiContext.js";
8
8
  import "../../../../data-access/dist/index.js";
9
- import { getGlobalSnapshot as i, subscribeToGlobal as a } from "./globalStore.js";
10
- import { configureEmbeddedClient as ee } from "../analytics/client.js";
11
- import { generateCorrelationId as te } from "../analytics/ids.js";
9
+ import { getGlobalSnapshot as r, subscribeToGlobal as i } from "./globalStore.js";
10
+ import { configureEmbeddedClient as te } from "../analytics/client.js";
11
+ import { generateCorrelationId as a } from "../analytics/ids.js";
12
12
  import { WidgetContext as ne } from "./WidgetContext.js";
13
13
  import { resolveOrgId as re, useAuthEpoch as ie } from "./utils.js";
14
14
  import { useWidgetFetch as ae } from "./useWidgetFetch.js";
15
- import { deriveWidgetInitState as oe, useWidgetInitPublisher as o } from "./useWidgetInitPublisher.js";
16
- import { resolveUIFramework as se } from "../../../../ui/dist/lib/UIContext/UIContext.js";
15
+ import { deriveWidgetInitState as oe, useWidgetInitPublisher as se } from "./useWidgetInitPublisher.js";
16
+ import { resolveUIFramework as o } from "../../../../ui/dist/lib/UIContext/UIContext.js";
17
17
  import { UIProvider as s } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
18
18
  import { useDesignSystemEnsurer as c } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
19
19
  import "../../../../ui/dist/index.js";
20
- import { useEffect as l, useMemo as u, useRef as d, useState as f, useSyncExternalStore as ce } from "react";
21
- import { jsx as p } from "react/jsx-runtime";
22
- import { QueryClient as m, QueryClientProvider as h } from "@tanstack/react-query";
20
+ import { useEffect as l, useMemo as u, useRef as d, useState as f, useSyncExternalStore as p } from "react";
21
+ import { jsx as m } from "react/jsx-runtime";
22
+ import { QueryClient as h, QueryClientProvider as ce } from "@tanstack/react-query";
23
23
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js
24
- function g({ children: g, baseUrl: _, widgetToken: v, organizationId: y, configClient: b, gatewayRouting: x, linkComponent: S, uiFramework: C, implementation: w, analytics: T, unstable_initResponseOverride: E }) {
25
- let D = ce(a, i, i), O = _ ?? D.baseUrl, k = v === void 0 ? D.widgetToken : v, A = y === void 0 ? D.organizationId : y, j = b ?? D.configClient, M = x ?? D.gatewayRouting, N = S ?? D.linkComponent, P = C ?? D.uiFramework, F = w ?? D.implementation, I = T !== !1, [L] = f(te), R = d({
26
- enabled: I,
27
- organizationId: A,
28
- rootCorrelationId: L
29
- }), [z] = f(() => new m({ defaultOptions: {
24
+ function g({ children: g, baseUrl: _, widgetToken: v, organizationId: y, configClient: b, gatewayRouting: x, linkComponent: S, uiFramework: C, implementation: w, analytics: T, unstable_initResponseOverride: E, disclosuresAcceptance: D }) {
25
+ let O = p(i, r, r), k = _ ?? O.baseUrl, A = v === void 0 ? O.widgetToken : v, j = y === void 0 ? O.organizationId : y, M = b ?? O.configClient, N = x ?? O.gatewayRouting, P = S ?? O.linkComponent, F = C ?? O.uiFramework, I = w ?? O.implementation, L = T !== !1, [R] = f(a), z = d({
26
+ enabled: L,
27
+ organizationId: j,
28
+ rootCorrelationId: R
29
+ }), [B] = f(() => new h({ defaultOptions: {
30
30
  queries: {
31
31
  retry: !1,
32
32
  refetchOnWindowFocus: !1
33
33
  },
34
34
  mutations: { retry: !1 }
35
35
  } }));
36
- l(() => (e(z), () => t(z)), [z]);
37
- let B = d(k);
38
- B.current = k;
39
- let V = ie(k), H = u(() => {
40
- let e = ee(n(O), {
41
- tokenRef: B,
42
- analyticsContextRef: R,
43
- gatewayRouting: M
36
+ l(() => (e(B), () => t(B)), [B]);
37
+ let V = d(A);
38
+ V.current = A;
39
+ let H = ie(A), U = u(() => {
40
+ let e = te(ee(k), {
41
+ tokenRef: V,
42
+ analyticsContextRef: z,
43
+ gatewayRouting: N
44
44
  });
45
- return j ? j(e) : e;
45
+ return M ? M(e) : e;
46
46
  }, [
47
- O,
48
- j,
49
- M
47
+ k,
48
+ M,
49
+ N
50
50
  ]);
51
51
  l(() => {
52
- if (!I || !("window" in globalThis)) return;
52
+ if (!L || !("window" in globalThis)) return;
53
53
  let e = !1;
54
54
  return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
55
55
  e || t();
56
56
  }), () => {
57
57
  e = !0;
58
58
  };
59
- }, [I]);
60
- let U = c(se(P));
59
+ }, [L]);
60
+ let W = c(o(F));
61
61
  l(() => {
62
- U && U().catch(() => {});
63
- }, [U]);
64
- let { result: W, loading: G, error: K, initStaleForToken: le, refetch: q } = ae(E ? null : H, k, R), J = k ? E ?? W ?? void 0 : void 0, Y = !E && le, X = re(A, Y ? void 0 : J?.organizationId), ue = u(() => oe({
65
- hasToken: !!k,
62
+ W && W().catch(() => {});
63
+ }, [W]);
64
+ let { result: le, loading: G, error: K, initStaleForToken: ue, refetch: q } = ae(E ? null : U, A, z), J = A ? E ?? le ?? void 0 : void 0, Y = !E && ue, X = re(j, Y ? void 0 : J?.organizationId), de = u(() => oe({
65
+ hasToken: !!A,
66
66
  loading: G,
67
67
  error: K,
68
68
  initResponse: J,
69
69
  initStaleForToken: Y
70
70
  }), [
71
- k,
71
+ A,
72
72
  G,
73
73
  K,
74
74
  J,
75
75
  Y
76
76
  ]);
77
- o(ue, k);
77
+ se(de, A);
78
78
  let Z = u(() => ({
79
- enabled: I,
79
+ enabled: L,
80
80
  organizationId: X,
81
- rootCorrelationId: L
81
+ rootCorrelationId: R
82
82
  }), [
83
- I,
83
+ L,
84
84
  X,
85
- L
85
+ R
86
86
  ]);
87
- R.current = Z;
87
+ z.current = Z;
88
88
  let Q = u(() => ({
89
89
  baseUrl: _,
90
90
  widgetToken: v,
@@ -104,34 +104,35 @@ function g({ children: g, baseUrl: _, widgetToken: v, organizationId: y, configC
104
104
  C,
105
105
  w
106
106
  ]), $ = u(() => ({
107
- baseUrl: O,
108
- widgetToken: k,
107
+ baseUrl: k,
108
+ widgetToken: A,
109
109
  organizationId: X,
110
- configClient: j,
111
- gatewayRouting: M,
112
- linkComponent: N,
113
- uiFramework: P,
114
- implementation: F,
110
+ configClient: M,
111
+ gatewayRouting: N,
112
+ linkComponent: P,
113
+ uiFramework: F,
114
+ implementation: I,
115
115
  initResponse: J
116
116
  }), [
117
- O,
118
117
  k,
118
+ A,
119
119
  X,
120
- j,
121
120
  M,
122
121
  N,
123
122
  P,
124
123
  F,
124
+ I,
125
125
  J
126
- ]), de = u(() => ({
126
+ ]), fe = u(() => ({
127
127
  resolved: $,
128
128
  own: Q,
129
129
  refetch: q,
130
130
  loading: G,
131
131
  error: K,
132
132
  analytics: Z,
133
- cascadeOrgId: A,
134
- initResponseStaleForToken: Y
133
+ cascadeOrgId: j,
134
+ initResponseStaleForToken: Y,
135
+ disclosuresAcceptance: D
135
136
  }), [
136
137
  $,
137
138
  Q,
@@ -139,21 +140,22 @@ function g({ children: g, baseUrl: _, widgetToken: v, organizationId: y, configC
139
140
  G,
140
141
  K,
141
142
  Z,
142
- A,
143
- Y
143
+ j,
144
+ Y,
145
+ D
144
146
  ]);
145
- return /* @__PURE__ */ p(h, {
146
- client: z,
147
- children: /* @__PURE__ */ p(r, {
148
- client: H,
147
+ return /* @__PURE__ */ m(ce, {
148
+ client: B,
149
+ children: /* @__PURE__ */ m(n, {
150
+ client: U,
149
151
  organizationId: X,
150
- widgetToken: k,
151
- authEpoch: V,
152
- children: /* @__PURE__ */ p(ne.Provider, {
153
- value: de,
154
- children: /* @__PURE__ */ p(s, {
155
- linkComponent: N,
156
- uiFramework: P,
152
+ widgetToken: A,
153
+ authEpoch: H,
154
+ children: /* @__PURE__ */ m(ne.Provider, {
155
+ value: fe,
156
+ children: /* @__PURE__ */ m(s, {
157
+ linkComponent: P,
158
+ uiFramework: F,
157
159
  children: g
158
160
  })
159
161
  })