@tesouro/embedded-components-react 0.2.323 → 0.2.325

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 (39) hide show
  1. package/README.md +20 -25
  2. package/dist/experimental/WidgetSuite.d.ts +5 -5
  3. package/dist/experimental/index.d.ts +5 -5
  4. package/dist/index.css +53 -0
  5. package/dist/index.d.ts +21 -41
  6. package/dist/lib/AcceptDisclosuresWidget.d.ts +14 -34
  7. package/dist/lib/BalancesWidget.d.ts +5 -5
  8. package/dist/lib/BankAccountOnboardingWidget.d.ts +5 -5
  9. package/dist/lib/BankAccountsWidget.d.ts +5 -5
  10. package/dist/lib/BillPayWidget.d.ts +5 -5
  11. package/dist/lib/CardDetailsWidget.d.ts +5 -5
  12. package/dist/lib/CardsWidget.d.ts +5 -5
  13. package/dist/lib/ChartOfAccountsWidget.d.ts +5 -5
  14. package/dist/lib/CounterpartsWidget.d.ts +5 -5
  15. package/dist/lib/CreateCardWidget.d.ts +5 -5
  16. package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +5 -5
  17. package/dist/lib/ExpenseManagementWidget.d.ts +5 -5
  18. package/dist/lib/ExpenseRequirementsWidget.d.ts +5 -5
  19. package/dist/lib/HelpWidget.d.ts +5 -5
  20. package/dist/lib/InsightsWidget.d.ts +5 -5
  21. package/dist/lib/InvoicingWidget.d.ts +5 -5
  22. package/dist/lib/LinkedAccountsWidget.d.ts +5 -5
  23. package/dist/lib/ProductsWidget.d.ts +5 -5
  24. package/dist/lib/ProfileWidget.d.ts +5 -5
  25. package/dist/lib/ReceiptMatchWidget.d.ts +5 -5
  26. package/dist/lib/ReceivablesWidget.d.ts +5 -5
  27. package/dist/lib/SettingsWidget.d.ts +5 -5
  28. package/dist/lib/TagsWidget.d.ts +5 -5
  29. package/dist/lib/TeamWidget.d.ts +5 -5
  30. package/dist/lib/TransfersWidget.d.ts +5 -5
  31. package/dist/lib/WidgetProvider.d.ts +12 -12
  32. package/dist/lib/WidgetProviderPublic.d.ts +5 -5
  33. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +57 -68
  34. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -4
  35. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +79 -80
  36. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js +1 -4
  37. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js +1 -1
  39. package/package.json +2 -1
@@ -650,11 +650,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
650
650
  */
651
651
  onError?: (error: unknown, info: ErrorInfo) => void;
652
652
  /**
653
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
654
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
655
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
656
- * path still uses invite-link `invitationToken`/`userId` on the host
657
- * landing page. WidgetProvider cannot import the widget itself (cycle).
653
+ * Accept surface shown when the caller owes disclosures — an INVITED
654
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
655
+ * activate) or an ACTIVE user who owes a new version. Pass
656
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
657
+ * WidgetProvider cannot import the widget itself (cycle).
658
658
  */
659
659
  disclosuresAcceptance?: ReactNode;
660
660
  }
@@ -589,11 +589,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
589
589
  */
590
590
  onError?: (error: unknown, info: ErrorInfo) => void;
591
591
  /**
592
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
593
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
594
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
595
- * path still uses invite-link `invitationToken`/`userId` on the host
596
- * landing page. WidgetProvider cannot import the widget itself (cycle).
592
+ * Accept surface shown when the caller owes disclosures — an INVITED
593
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
594
+ * activate) or an ACTIVE user who owes a new version. Pass
595
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
596
+ * WidgetProvider cannot import the widget itself (cycle).
597
597
  */
598
598
  disclosuresAcceptance?: ReactNode;
599
599
  }
@@ -598,11 +598,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
598
598
  */
599
599
  onError?: (error: unknown, info: ErrorInfo) => void;
600
600
  /**
601
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
602
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
603
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
604
- * path still uses invite-link `invitationToken`/`userId` on the host
605
- * landing page. WidgetProvider cannot import the widget itself (cycle).
601
+ * Accept surface shown when the caller owes disclosures — an INVITED
602
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
603
+ * activate) or an ACTIVE user who owes a new version. Pass
604
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
605
+ * WidgetProvider cannot import the widget itself (cycle).
606
606
  */
607
607
  disclosuresAcceptance?: ReactNode;
608
608
  }
@@ -589,11 +589,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
589
589
  */
590
590
  onError?: (error: unknown, info: ErrorInfo) => void;
591
591
  /**
592
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
593
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
594
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
595
- * path still uses invite-link `invitationToken`/`userId` on the host
596
- * landing page. WidgetProvider cannot import the widget itself (cycle).
592
+ * Accept surface shown when the caller owes disclosures — an INVITED
593
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
594
+ * activate) or an ACTIVE user who owes a new version. Pass
595
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
596
+ * WidgetProvider cannot import the widget itself (cycle).
597
597
  */
598
598
  disclosuresAcceptance?: ReactNode;
599
599
  }
@@ -673,11 +673,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
673
673
  */
674
674
  onError?: (error: unknown, info: ErrorInfo) => void;
675
675
  /**
676
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
677
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
678
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
679
- * path still uses invite-link `invitationToken`/`userId` on the host
680
- * landing page. WidgetProvider cannot import the widget itself (cycle).
676
+ * Accept surface shown when the caller owes disclosures — an INVITED
677
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
678
+ * activate) or an ACTIVE user who owes a new version. Pass
679
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
680
+ * WidgetProvider cannot import the widget itself (cycle).
681
681
  */
682
682
  disclosuresAcceptance?: ReactNode;
683
683
  }
@@ -625,11 +625,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
625
625
  */
626
626
  onError?: (error: unknown, info: ErrorInfo) => void;
627
627
  /**
628
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
629
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
630
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
631
- * path still uses invite-link `invitationToken`/`userId` on the host
632
- * landing page. WidgetProvider cannot import the widget itself (cycle).
628
+ * Accept surface shown when the caller owes disclosures — an INVITED
629
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
630
+ * activate) or an ACTIVE user who owes a new version. Pass
631
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
632
+ * WidgetProvider cannot import the widget itself (cycle).
633
633
  */
634
634
  disclosuresAcceptance?: ReactNode;
635
635
  }
@@ -619,11 +619,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
619
619
  */
620
620
  onError?: (error: unknown, info: ErrorInfo) => void;
621
621
  /**
622
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
623
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
624
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
625
- * path still uses invite-link `invitationToken`/`userId` on the host
626
- * landing page. WidgetProvider cannot import the widget itself (cycle).
622
+ * Accept surface shown when the caller owes disclosures — an INVITED
623
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
624
+ * activate) or an ACTIVE user who owes a new version. Pass
625
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
626
+ * WidgetProvider cannot import the widget itself (cycle).
627
627
  */
628
628
  disclosuresAcceptance?: ReactNode;
629
629
  }
@@ -657,11 +657,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
657
657
  */
658
658
  onError?: (error: unknown, info: ErrorInfo) => void;
659
659
  /**
660
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
661
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
662
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
663
- * path still uses invite-link `invitationToken`/`userId` on the host
664
- * landing page. WidgetProvider cannot import the widget itself (cycle).
660
+ * Accept surface shown when the caller owes disclosures — an INVITED
661
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
662
+ * activate) or an ACTIVE user who owes a new version. Pass
663
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
664
+ * WidgetProvider cannot import the widget itself (cycle).
665
665
  */
666
666
  disclosuresAcceptance?: ReactNode;
667
667
  }
@@ -589,11 +589,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
589
589
  */
590
590
  onError?: (error: unknown, info: ErrorInfo) => void;
591
591
  /**
592
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
593
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
594
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
595
- * path still uses invite-link `invitationToken`/`userId` on the host
596
- * landing page. WidgetProvider cannot import the widget itself (cycle).
592
+ * Accept surface shown when the caller owes disclosures — an INVITED
593
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
594
+ * activate) or an ACTIVE user who owes a new version. Pass
595
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
596
+ * WidgetProvider cannot import the widget itself (cycle).
597
597
  */
598
598
  disclosuresAcceptance?: ReactNode;
599
599
  }
@@ -602,11 +602,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
602
602
  */
603
603
  onError?: (error: unknown, info: ErrorInfo) => void;
604
604
  /**
605
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
606
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
607
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
608
- * path still uses invite-link `invitationToken`/`userId` on the host
609
- * landing page. WidgetProvider cannot import the widget itself (cycle).
605
+ * Accept surface shown when the caller owes disclosures — an INVITED
606
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
607
+ * activate) or an ACTIVE user who owes a new version. Pass
608
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
609
+ * WidgetProvider cannot import the widget itself (cycle).
610
610
  */
611
611
  disclosuresAcceptance?: ReactNode;
612
612
  }
@@ -589,11 +589,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
589
589
  */
590
590
  onError?: (error: unknown, info: ErrorInfo) => void;
591
591
  /**
592
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
593
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
594
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
595
- * path still uses invite-link `invitationToken`/`userId` on the host
596
- * landing page. WidgetProvider cannot import the widget itself (cycle).
592
+ * Accept surface shown when the caller owes disclosures — an INVITED
593
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
594
+ * activate) or an ACTIVE user who owes a new version. Pass
595
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
596
+ * WidgetProvider cannot import the widget itself (cycle).
597
597
  */
598
598
  disclosuresAcceptance?: ReactNode;
599
599
  }
@@ -596,11 +596,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
596
596
  */
597
597
  onError?: (error: unknown, info: ErrorInfo) => void;
598
598
  /**
599
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
600
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
601
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
602
- * path still uses invite-link `invitationToken`/`userId` on the host
603
- * landing page. WidgetProvider cannot import the widget itself (cycle).
599
+ * Accept surface shown when the caller owes disclosures — an INVITED
600
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
601
+ * activate) or an ACTIVE user who owes a new version. Pass
602
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
603
+ * WidgetProvider cannot import the widget itself (cycle).
604
604
  */
605
605
  disclosuresAcceptance?: ReactNode;
606
606
  }
@@ -608,11 +608,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
608
608
  */
609
609
  onError?: (error: unknown, info: ErrorInfo) => void;
610
610
  /**
611
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
612
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
613
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
614
- * path still uses invite-link `invitationToken`/`userId` on the host
615
- * landing page. WidgetProvider cannot import the widget itself (cycle).
611
+ * Accept surface shown when the caller owes disclosures — an INVITED
612
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
613
+ * activate) or an ACTIVE user who owes a new version. Pass
614
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
615
+ * WidgetProvider cannot import the widget itself (cycle).
616
616
  */
617
617
  disclosuresAcceptance?: ReactNode;
618
618
  }
@@ -589,11 +589,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
589
589
  */
590
590
  onError?: (error: unknown, info: ErrorInfo) => void;
591
591
  /**
592
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
593
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
594
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
595
- * path still uses invite-link `invitationToken`/`userId` on the host
596
- * landing page. WidgetProvider cannot import the widget itself (cycle).
592
+ * Accept surface shown when the caller owes disclosures — an INVITED
593
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
594
+ * activate) or an ACTIVE user who owes a new version. Pass
595
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
596
+ * WidgetProvider cannot import the widget itself (cycle).
597
597
  */
598
598
  disclosuresAcceptance?: ReactNode;
599
599
  }
@@ -589,11 +589,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
589
589
  */
590
590
  onError?: (error: unknown, info: ErrorInfo) => void;
591
591
  /**
592
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
593
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
594
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
595
- * path still uses invite-link `invitationToken`/`userId` on the host
596
- * landing page. WidgetProvider cannot import the widget itself (cycle).
592
+ * Accept surface shown when the caller owes disclosures — an INVITED
593
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
594
+ * activate) or an ACTIVE user who owes a new version. Pass
595
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
596
+ * WidgetProvider cannot import the widget itself (cycle).
597
597
  */
598
598
  disclosuresAcceptance?: ReactNode;
599
599
  }
@@ -589,11 +589,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
589
589
  */
590
590
  onError?: (error: unknown, info: ErrorInfo) => void;
591
591
  /**
592
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
593
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
594
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
595
- * path still uses invite-link `invitationToken`/`userId` on the host
596
- * landing page. WidgetProvider cannot import the widget itself (cycle).
592
+ * Accept surface shown when the caller owes disclosures — an INVITED
593
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
594
+ * activate) or an ACTIVE user who owes a new version. Pass
595
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
596
+ * WidgetProvider cannot import the widget itself (cycle).
597
597
  */
598
598
  disclosuresAcceptance?: ReactNode;
599
599
  }
@@ -888,10 +888,10 @@ interface RootWidgetProviderProps extends WidgetProviderBaseProps {
888
888
  */
889
889
  unstable_initResponseOverride?: WidgetInitResponse;
890
890
  /**
891
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
892
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
893
- * credentials) so gated widgets have somewhere to accept. Cascades to
894
- * nested WidgetProviders.
891
+ * Accept surface shown when the caller owes disclosures — INVITED or
892
+ * an ACTIVE user who owes a new version. Pass `<AcceptDisclosuresWidget />`
893
+ * so gated widgets have somewhere to accept. Cascades to nested
894
+ * WidgetProviders.
895
895
  */
896
896
  disclosuresAcceptance?: ReactNode;
897
897
  }
@@ -972,11 +972,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
972
972
  */
973
973
  onError?: (error: unknown, info: ErrorInfo) => void;
974
974
  /**
975
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
976
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
977
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
978
- * path still uses invite-link `invitationToken`/`userId` on the host
979
- * landing page. WidgetProvider cannot import the widget itself (cycle).
975
+ * Accept surface shown when the caller owes disclosures — an INVITED
976
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
977
+ * activate) or an ACTIVE user who owes a new version. Pass
978
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
979
+ * WidgetProvider cannot import the widget itself (cycle).
980
980
  */
981
981
  disclosuresAcceptance?: ReactNode;
982
982
  }
@@ -1103,9 +1103,9 @@ declare function useWidgetConfig(): WidgetConfig;
1103
1103
  */
1104
1104
  declare function useOwnWidgetConfig(): WidgetConfigInput | null;
1105
1105
  /**
1106
- * Host-supplied AcceptDisclosuresWidget (or equivalent) for ACTIVE users who
1107
- * owe a new disclosure version. `undefined` outside a provider or when the
1108
- * host has not passed `disclosuresAcceptance`.
1106
+ * Host-supplied AcceptDisclosuresWidget (or equivalent) for callers who
1107
+ * owe disclosures. `undefined` outside a provider or when the host has
1108
+ * not passed `disclosuresAcceptance`.
1109
1109
  */
1110
1110
  declare function useDisclosuresAcceptanceSurface(): ReactNode | undefined;
1111
1111
  /**
@@ -588,11 +588,11 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
588
588
  */
589
589
  onError?: (error: unknown, info: ErrorInfo) => void;
590
590
  /**
591
- * Accept surface shown when an ACTIVE user owes a new disclosure version.
592
- * Pass `<AcceptDisclosuresWidget disclosureLinks={…} />` (no invite
593
- * credentials). Cascades like `linkComponent`. Omit on INVITED — that
594
- * path still uses invite-link `invitationToken`/`userId` on the host
595
- * landing page. WidgetProvider cannot import the widget itself (cycle).
591
+ * Accept surface shown when the caller owes disclosures — an INVITED
592
+ * teammate (including `NOT_REQUIRED` orgs, who still need Accept to
593
+ * activate) or an ACTIVE user who owes a new version. Pass
594
+ * `<AcceptDisclosuresWidget />`. Cascades like `linkComponent`.
595
+ * WidgetProvider cannot import the widget itself (cycle).
596
596
  */
597
597
  disclosuresAcceptance?: ReactNode;
598
598
  }
@@ -29,106 +29,95 @@ function x(e, t, n) {
29
29
  n.providerAttributionSuffix
30
30
  ] });
31
31
  }
32
- function S({ invitationToken: t, userId: r, labels: a, onAccepted: l }) {
33
- let d = c(), { initResponse: m } = f(), g = p(), _ = n(a), { data: v, isError: b, error: x, refetch: S } = o({
34
- invitationToken: t,
35
- userId: r
36
- });
32
+ function S({ labels: t, onAccepted: r }) {
33
+ let a = c(), { initResponse: l } = f(), d = p(), m = n(t), { data: g, isError: _, error: v, refetch: b } = o({ userId: l?.userId ?? void 0 });
37
34
  if (h(() => {
38
- d(e.Mounted);
39
- }, [d]), b) return /* @__PURE__ */ y(s, {
40
- title: _.loadErrorTitle,
41
- description: u(x) ?? _.loadErrorFallback,
42
- retryLabel: _.loadErrorRetryLabel,
35
+ a(e.Mounted);
36
+ }, [a]), _) return /* @__PURE__ */ y(s, {
37
+ title: m.loadErrorTitle,
38
+ description: u(v) ?? m.loadErrorFallback,
39
+ retryLabel: m.loadErrorRetryLabel,
43
40
  onRetry: () => {
44
- S();
41
+ b();
45
42
  },
46
43
  testId: "accept-disclosures-load-error"
47
44
  });
48
- let w = i({
49
- documents: v?.documents,
50
- vspName: m?.vspName,
51
- bankName: m?.bankName,
52
- labels: a
45
+ let x = i({
46
+ documents: g?.documents,
47
+ vspName: l?.vspName,
48
+ bankName: l?.bankName,
49
+ labels: t
53
50
  });
54
- if (!w) return null;
55
- let T = v?.version ?? null, E = !!(t && r);
56
- if (!E && g) return null;
57
- let D = `${E ? `invite:${t}:${r}` : `user:${m?.userId ?? ""}`}:${T}:${w.vspName}:${w.bankName}:${w.agreementText}:${w.disclosureLinks.map((e) => e.href).join("|")}`;
51
+ if (!x) return null;
52
+ let S = g?.version ?? null;
53
+ if (d) return null;
54
+ let w = `${`user:${l?.userId ?? ""}`}:${S}:${x.vspName}:${x.bankName}:${x.agreementText}:${x.disclosureLinks.map((e) => e.href).join("|")}`;
58
55
  return /* @__PURE__ */ y(C, {
59
- invitationToken: t,
60
- userId: r,
61
- displayedVersion: T,
62
- labelOverrides: a,
63
- content: w,
64
- labels: _,
65
- onAccepted: l,
66
- onDisclosuresVersionChanged: S
67
- }, D);
56
+ displayedVersion: S,
57
+ labelOverrides: t,
58
+ content: x,
59
+ labels: m,
60
+ onAccepted: r,
61
+ onDisclosuresVersionChanged: b
62
+ }, w);
68
63
  }
69
- function C({ invitationToken: e, userId: t, displayedVersion: n, labelOverrides: i, content: o, labels: s, onAccepted: c, onDisclosuresVersionChanged: l }) {
70
- let [f, p] = _(!1), [h, v] = _(), [b, S] = _(!1), [C, w] = _(!1), T = g(!1), { mutateAsync: E } = a(), D = d(), O = m((e) => {
71
- v(void 0), p(e);
72
- }, []), k = m(async () => {
73
- if (!(!f || b || C)) {
74
- v(void 0), S(!0);
64
+ function C({ displayedVersion: e, labelOverrides: t, content: n, labels: i, onAccepted: o, onDisclosuresVersionChanged: s }) {
65
+ let [c, l] = _(!1), [f, p] = _(), [h, v] = _(!1), [b, S] = _(!1), C = g(!1), { mutateAsync: w } = a(), T = d(), E = m((e) => {
66
+ p(void 0), l(e);
67
+ }, []), D = m(async () => {
68
+ if (!(!c || h || b)) {
69
+ p(void 0), v(!0);
75
70
  try {
76
- if (!T.current) try {
77
- await E({
78
- invitationToken: e,
79
- userId: t,
80
- displayedVersion: n
81
- }), T.current = !0;
71
+ if (!C.current) try {
72
+ await w({ displayedVersion: e }), C.current = !0;
82
73
  } catch (e) {
83
74
  if (e instanceof Error && e.name === "DisclosuresVersionChangedError") {
84
- v(s.disclosuresUpdatedFallback), l();
75
+ p(i.disclosuresUpdatedFallback), s();
85
76
  return;
86
77
  }
87
- v(u(e) ?? s.acceptErrorFallback);
78
+ p(u(e) ?? i.acceptErrorFallback);
88
79
  return;
89
80
  }
90
81
  try {
91
- await c?.();
82
+ await o?.();
92
83
  } catch (e) {
93
- v(u(e) ?? s.acceptErrorFallback);
84
+ p(u(e) ?? i.acceptErrorFallback);
94
85
  return;
95
86
  }
96
- D(), w(!0);
87
+ T(), S(!0);
97
88
  } finally {
98
- S(!1);
89
+ v(!1);
99
90
  }
100
91
  }
101
92
  }, [
102
- E,
103
- n,
104
- C,
93
+ w,
105
94
  e,
106
- f,
107
95
  b,
108
- s.acceptErrorFallback,
109
- s.disclosuresUpdatedFallback,
110
96
  c,
111
- l,
112
- D,
113
- t
97
+ h,
98
+ i.acceptErrorFallback,
99
+ i.disclosuresUpdatedFallback,
100
+ o,
101
+ s,
102
+ T
114
103
  ]);
115
104
  return /* @__PURE__ */ y(r, {
116
105
  labels: {
117
- ...i,
118
- title: o.title,
119
- agreementCheckboxAriaLabel: o.agreementCheckboxAriaLabel
106
+ ...t,
107
+ title: n.title,
108
+ agreementCheckboxAriaLabel: n.agreementCheckboxAriaLabel
120
109
  },
121
- providerAttribution: x(o.vspName, o.bankName, s),
122
- agreementText: o.agreementText,
123
- disclosureLinks: o.disclosureLinks,
124
- isAgreed: f,
125
- onAgreedChange: O,
110
+ providerAttribution: x(n.vspName, n.bankName, i),
111
+ agreementText: n.agreementText,
112
+ disclosureLinks: n.disclosureLinks,
113
+ isAgreed: c,
114
+ onAgreedChange: E,
126
115
  onAccept: () => {
127
- k();
116
+ D();
128
117
  },
129
- isSubmitting: b,
130
- isAccepted: C,
131
- errorMessage: h
118
+ isSubmitting: h,
119
+ isAccepted: b,
120
+ errorMessage: f
132
121
  });
133
122
  }
134
123
  function w({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, ...m }) {
@@ -35,10 +35,8 @@ function c({ invitationToken: a, userId: c, enabled: l } = {}) {
35
35
  return n;
36
36
  }, h = ["getDisclosures", {
37
37
  baseUrl: u.getConfig().baseUrl,
38
- ...p ? {
39
- userId: p.userId,
40
- invitationTokenFingerprint: i(p.invitationToken)
41
- } : {}
38
+ ...c ? { userId: c } : {},
39
+ ...p ? { invitationTokenFingerprint: i(p.invitationToken) } : {}
42
40
  }];
43
41
  o = h;
44
42
  let { queryKey: g } = n({