@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.
- package/README.md +20 -25
- package/dist/experimental/WidgetSuite.d.ts +5 -5
- package/dist/experimental/index.d.ts +5 -5
- package/dist/index.css +53 -0
- package/dist/index.d.ts +21 -41
- package/dist/lib/AcceptDisclosuresWidget.d.ts +14 -34
- package/dist/lib/BalancesWidget.d.ts +5 -5
- package/dist/lib/BankAccountOnboardingWidget.d.ts +5 -5
- package/dist/lib/BankAccountsWidget.d.ts +5 -5
- package/dist/lib/BillPayWidget.d.ts +5 -5
- package/dist/lib/CardDetailsWidget.d.ts +5 -5
- package/dist/lib/CardsWidget.d.ts +5 -5
- package/dist/lib/ChartOfAccountsWidget.d.ts +5 -5
- package/dist/lib/CounterpartsWidget.d.ts +5 -5
- package/dist/lib/CreateCardWidget.d.ts +5 -5
- package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +5 -5
- package/dist/lib/ExpenseManagementWidget.d.ts +5 -5
- package/dist/lib/ExpenseRequirementsWidget.d.ts +5 -5
- package/dist/lib/HelpWidget.d.ts +5 -5
- package/dist/lib/InsightsWidget.d.ts +5 -5
- package/dist/lib/InvoicingWidget.d.ts +5 -5
- package/dist/lib/LinkedAccountsWidget.d.ts +5 -5
- package/dist/lib/ProductsWidget.d.ts +5 -5
- package/dist/lib/ProfileWidget.d.ts +5 -5
- package/dist/lib/ReceiptMatchWidget.d.ts +5 -5
- package/dist/lib/ReceivablesWidget.d.ts +5 -5
- package/dist/lib/SettingsWidget.d.ts +5 -5
- package/dist/lib/TagsWidget.d.ts +5 -5
- package/dist/lib/TeamWidget.d.ts +5 -5
- package/dist/lib/TransfersWidget.d.ts +5 -5
- package/dist/lib/WidgetProvider.d.ts +12 -12
- package/dist/lib/WidgetProviderPublic.d.ts +5 -5
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +57 -68
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +79 -80
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js +1 -1
- 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
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
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
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
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
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
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
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
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
|
}
|
package/dist/lib/HelpWidget.d.ts
CHANGED
|
@@ -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
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
*
|
|
680
|
-
*
|
|
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
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
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
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
*
|
|
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
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
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
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
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
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
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
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
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
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
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
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
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
|
}
|
package/dist/lib/TagsWidget.d.ts
CHANGED
|
@@ -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
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
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
|
}
|
package/dist/lib/TeamWidget.d.ts
CHANGED
|
@@ -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
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
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
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
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
|
|
892
|
-
* Pass `<AcceptDisclosuresWidget
|
|
893
|
-
*
|
|
894
|
-
*
|
|
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
|
|
976
|
-
*
|
|
977
|
-
*
|
|
978
|
-
*
|
|
979
|
-
*
|
|
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
|
|
1107
|
-
* owe
|
|
1108
|
-
*
|
|
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
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
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
|
}
|
package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js
CHANGED
|
@@ -29,106 +29,95 @@ function x(e, t, n) {
|
|
|
29
29
|
n.providerAttributionSuffix
|
|
30
30
|
] });
|
|
31
31
|
}
|
|
32
|
-
function S({
|
|
33
|
-
let
|
|
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
|
-
|
|
39
|
-
}, [
|
|
40
|
-
title:
|
|
41
|
-
description: u(
|
|
42
|
-
retryLabel:
|
|
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
|
-
|
|
41
|
+
b();
|
|
45
42
|
},
|
|
46
43
|
testId: "accept-disclosures-load-error"
|
|
47
44
|
});
|
|
48
|
-
let
|
|
49
|
-
documents:
|
|
50
|
-
vspName:
|
|
51
|
-
bankName:
|
|
52
|
-
labels:
|
|
45
|
+
let x = i({
|
|
46
|
+
documents: g?.documents,
|
|
47
|
+
vspName: l?.vspName,
|
|
48
|
+
bankName: l?.bankName,
|
|
49
|
+
labels: t
|
|
53
50
|
});
|
|
54
|
-
if (!
|
|
55
|
-
let
|
|
56
|
-
if (
|
|
57
|
-
let
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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({
|
|
70
|
-
let [
|
|
71
|
-
|
|
72
|
-
}, []),
|
|
73
|
-
if (!(!
|
|
74
|
-
|
|
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 (!
|
|
77
|
-
await
|
|
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
|
-
|
|
75
|
+
p(i.disclosuresUpdatedFallback), s();
|
|
85
76
|
return;
|
|
86
77
|
}
|
|
87
|
-
|
|
78
|
+
p(u(e) ?? i.acceptErrorFallback);
|
|
88
79
|
return;
|
|
89
80
|
}
|
|
90
81
|
try {
|
|
91
|
-
await
|
|
82
|
+
await o?.();
|
|
92
83
|
} catch (e) {
|
|
93
|
-
|
|
84
|
+
p(u(e) ?? i.acceptErrorFallback);
|
|
94
85
|
return;
|
|
95
86
|
}
|
|
96
|
-
|
|
87
|
+
T(), S(!0);
|
|
97
88
|
} finally {
|
|
98
|
-
|
|
89
|
+
v(!1);
|
|
99
90
|
}
|
|
100
91
|
}
|
|
101
92
|
}, [
|
|
102
|
-
|
|
103
|
-
n,
|
|
104
|
-
C,
|
|
93
|
+
w,
|
|
105
94
|
e,
|
|
106
|
-
f,
|
|
107
95
|
b,
|
|
108
|
-
s.acceptErrorFallback,
|
|
109
|
-
s.disclosuresUpdatedFallback,
|
|
110
96
|
c,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
...
|
|
118
|
-
title:
|
|
119
|
-
agreementCheckboxAriaLabel:
|
|
106
|
+
...t,
|
|
107
|
+
title: n.title,
|
|
108
|
+
agreementCheckboxAriaLabel: n.agreementCheckboxAriaLabel
|
|
120
109
|
},
|
|
121
|
-
providerAttribution: x(
|
|
122
|
-
agreementText:
|
|
123
|
-
disclosureLinks:
|
|
124
|
-
isAgreed:
|
|
125
|
-
onAgreedChange:
|
|
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
|
-
|
|
116
|
+
D();
|
|
128
117
|
},
|
|
129
|
-
isSubmitting:
|
|
130
|
-
isAccepted:
|
|
131
|
-
errorMessage:
|
|
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
|
-
...
|
|
39
|
-
|
|
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({
|