@tesouro/embedded-components-react 0.3.16 → 0.3.18
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/dist/index.d.ts +22 -1
- package/dist/index.js +10 -10
- package/dist/lib/AcceptDisclosuresWidget.d.ts +11 -1
- package/dist/lib/AcceptDisclosuresWidget.js +1 -1
- package/dist/lib/BalancesWidget.js +1 -1
- package/dist/lib/BankAccountOnboardingWidget.d.ts +21 -21
- package/dist/lib/BankAccountOnboardingWidget.js +1 -1
- package/dist/lib/CardsWidget.js +1 -1
- package/dist/lib/ExpenseApprovalPoliciesWidget.js +1 -1
- package/dist/lib/ExpenseManagementWidget.js +1 -1
- package/dist/lib/InsightsWidget.js +1 -1
- package/dist/lib/ReceiptMatchWidget.js +1 -1
- package/dist/lib/TransfersWidget.js +1 -1
- package/dist/lib/UploadReceiptWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +10 -140
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js +152 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index4.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index5.js +15 -64
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index6.js +75 -0
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/BalancesWidget.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/SingleBalance/SingleBalance.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js +109 -169
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +170 -63
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +73 -81
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +77 -101
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +110 -83
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +91 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +7 -28
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +26 -320
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +341 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index9.js +29 -100
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +14 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +42 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +80 -77
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +14 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +23 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsHeader.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +4 -23
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +23 -24
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index5.js +24 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index6.js +28 -55
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +54 -209
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +206 -81
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +95 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardFaceSwatch.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +31 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +1 -255
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +253 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +2 -71
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +73 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +7 -218
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +219 -79
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +2 -47
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +49 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleCard.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleForm.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ExpenseApprovalsPage.js +11 -8
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +12 -14
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js +21 -62
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index12.js +73 -0
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/InsightsWidget.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +67 -46
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/testIds.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +151 -135
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index14.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +17 -15
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +16 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index9.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +21 -20
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +18 -99
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +116 -19
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/ReviewTransferStep.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModal.js +13 -11
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -94,6 +94,15 @@ interface DisclosureLink {
|
|
|
94
94
|
href: string;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
interface AcceptDisclosuresWidgetTestIds {
|
|
98
|
+
root?: string;
|
|
99
|
+
providerAttribution?: string;
|
|
100
|
+
disclosureLinks?: string;
|
|
101
|
+
agreeCheckbox?: string;
|
|
102
|
+
agreementText?: string;
|
|
103
|
+
acceptButton?: string;
|
|
104
|
+
error?: string;
|
|
105
|
+
}
|
|
97
106
|
interface AcceptDisclosuresWidgetProps$1 {
|
|
98
107
|
/**
|
|
99
108
|
* Attribution line under the title (e.g. “Banking services for Nail It! are
|
|
@@ -116,6 +125,7 @@ interface AcceptDisclosuresWidgetProps$1 {
|
|
|
116
125
|
/** Inline error shown under Accept; omit or empty when there is no error. */
|
|
117
126
|
errorMessage?: string;
|
|
118
127
|
labels?: PartialDeep$6<AcceptDisclosuresWidgetLabels>;
|
|
128
|
+
testIds?: AcceptDisclosuresWidgetTestIds;
|
|
119
129
|
}
|
|
120
130
|
|
|
121
131
|
type AuthToken = string | undefined;
|
|
@@ -1450,7 +1460,7 @@ type CardStatus = CreditCardStatus;
|
|
|
1450
1460
|
*/
|
|
1451
1461
|
type CardType = CreditCardType;
|
|
1452
1462
|
|
|
1453
|
-
type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage';
|
|
1463
|
+
type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage' | 'testIds';
|
|
1454
1464
|
type InnerProps = Omit<AcceptDisclosuresWidgetProps$1, UiOwnedProps> & {
|
|
1455
1465
|
/**
|
|
1456
1466
|
* Called after the atomic accept succeeds and before init refresh is kicked.
|
|
@@ -1734,6 +1744,12 @@ interface NoPolicyBannerLabels {
|
|
|
1734
1744
|
CreateRule: string;
|
|
1735
1745
|
}
|
|
1736
1746
|
|
|
1747
|
+
interface NoPolicyBannerTestIds {
|
|
1748
|
+
root?: string;
|
|
1749
|
+
createRuleButton?: string;
|
|
1750
|
+
/** The disabled-reason wrapper shown in place of the button. */
|
|
1751
|
+
createRuleBlocked?: string;
|
|
1752
|
+
}
|
|
1737
1753
|
interface NoPolicyBannerProps {
|
|
1738
1754
|
onCreateRule: () => void;
|
|
1739
1755
|
disabled?: boolean;
|
|
@@ -1749,6 +1765,7 @@ interface NoPolicyBannerProps {
|
|
|
1749
1765
|
*/
|
|
1750
1766
|
hasUnlistedRules?: boolean;
|
|
1751
1767
|
labels?: Partial<NoPolicyBannerLabels>;
|
|
1768
|
+
testIds?: NoPolicyBannerTestIds;
|
|
1752
1769
|
}
|
|
1753
1770
|
|
|
1754
1771
|
interface GapCoverageAlertLabels {
|
|
@@ -1772,11 +1789,15 @@ interface GapRange {
|
|
|
1772
1789
|
*/
|
|
1773
1790
|
blockedReason?: string;
|
|
1774
1791
|
}
|
|
1792
|
+
interface GapCoverageAlertTestIds {
|
|
1793
|
+
root?: string;
|
|
1794
|
+
}
|
|
1775
1795
|
interface GapCoverageAlertProps {
|
|
1776
1796
|
gaps: GapRange[];
|
|
1777
1797
|
onSelectGap: (id: string) => void;
|
|
1778
1798
|
disabled?: boolean;
|
|
1779
1799
|
labels?: Partial<GapCoverageAlertLabels>;
|
|
1800
|
+
testIds?: GapCoverageAlertTestIds;
|
|
1780
1801
|
}
|
|
1781
1802
|
|
|
1782
1803
|
/**
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { WidgetTokenRefreshProvider as p } from "./libs/tesouro-embedded-compone
|
|
|
11
11
|
import { useWidgetToken as m } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetToken.js";
|
|
12
12
|
import { RefreshingRootWidgetProvider as h } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RefreshingRootWidgetProvider.js";
|
|
13
13
|
import { useDisclosuresAcceptanceSurface as g, useOwnWidgetConfig as _, useRefetchWidget as v, useWidgetConfig as y, useWidgetError as b, useWidgetLoading as x } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
14
|
-
import { AcceptDisclosuresWidget as S } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/
|
|
14
|
+
import { AcceptDisclosuresWidget as S } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js";
|
|
15
15
|
import "./lib/AcceptDisclosuresWidget.js";
|
|
16
16
|
import { BankAccountsWidget as C } from "./libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js";
|
|
17
17
|
import "./lib/BankAccountsWidget.js";
|
|
@@ -22,26 +22,26 @@ import { CardDetailsWidget as E } from "./libs/tesouro-embedded-components-react
|
|
|
22
22
|
import { CardFormatValue as D } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index3.js";
|
|
23
23
|
import { CREATE_CARD_FEATURE_LABELS_EN as O, resolveCreateCardFeatureLabels as k } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index4.js";
|
|
24
24
|
import { CreateCardWidget as A } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js";
|
|
25
|
-
import { CardsWidget as j } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/
|
|
25
|
+
import { CardsWidget as j } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js";
|
|
26
26
|
import "./lib/CardsWidget.js";
|
|
27
27
|
import "./lib/CardDetailsWidget.js";
|
|
28
28
|
import "./lib/CreateCardWidget.js";
|
|
29
29
|
import "./lib/CounterpartsWidget.js";
|
|
30
|
-
import { ExpenseApprovalPoliciesWidget as M } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
31
|
-
import { UploadReceiptWidget as N } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
30
|
+
import { ExpenseApprovalPoliciesWidget as M } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js";
|
|
31
|
+
import { UploadReceiptWidget as N } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js";
|
|
32
32
|
import { ExpenseRequirementsWidget as P } from "./libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js";
|
|
33
|
-
import { ExpenseManagementWidget as F } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
34
|
-
import { ReceiptMatchWidget as I } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
33
|
+
import { ExpenseManagementWidget as F } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js";
|
|
34
|
+
import { ReceiptMatchWidget as I } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js";
|
|
35
35
|
import "./lib/ExpenseManagementWidget.js";
|
|
36
36
|
import "./lib/ExpenseApprovalPoliciesWidget.js";
|
|
37
37
|
import "./lib/ExpenseRequirementsWidget.js";
|
|
38
38
|
import { BALANCES_WIDGET_LABELS_EN as L } from "./libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/labels.js";
|
|
39
|
-
import { BalancesWidget as R } from "./libs/tesouro-embedded-components-react/balances-widget/feature/dist/
|
|
39
|
+
import { BalancesWidget as R } from "./libs/tesouro-embedded-components-react/balances-widget/feature/dist/index6.js";
|
|
40
40
|
import "./lib/BalancesWidget.js";
|
|
41
41
|
import { INSIGHTS_FEATURE_LABELS_EN as z } from "./libs/tesouro-embedded-components-react/insights-widget/feature/dist/index3.js";
|
|
42
42
|
import { INSIGHTS_WIDGET_LABELS_EN as B } from "./libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/labels.js";
|
|
43
43
|
import { SINGLE_INSIGHT_LABELS_EN as V } from "./libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/labels.js";
|
|
44
|
-
import { InsightsWidget as H } from "./libs/tesouro-embedded-components-react/insights-widget/feature/dist/
|
|
44
|
+
import { InsightsWidget as H } from "./libs/tesouro-embedded-components-react/insights-widget/feature/dist/index12.js";
|
|
45
45
|
import "./lib/InsightsWidget.js";
|
|
46
46
|
import { CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN as U } from "./libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index5.js";
|
|
47
47
|
import { ACCOUNT_DELETE_DIALOG_LABELS_EN as W, ACCOUNT_FORM_SHEET_LABELS_EN as G, CHART_OF_ACCOUNTS_LABELS_EN as K } from "./libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js";
|
|
@@ -63,7 +63,7 @@ import { ADDITIONAL_OWNERS_LABELS_EN as re } from "./libs/tesouro-embedded-compo
|
|
|
63
63
|
import { BUSINESS_DETAILS_LABELS_EN as ie } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js";
|
|
64
64
|
import { PERSONAL_DETAILS_LABELS_EN as ae } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js";
|
|
65
65
|
import { RESULT_LABELS_EN as oe } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js";
|
|
66
|
-
import { BankAccountOnboardingWidget as se } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/
|
|
66
|
+
import { BankAccountOnboardingWidget as se } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js";
|
|
67
67
|
import "./lib/BankAccountOnboardingWidget.js";
|
|
68
68
|
import { ProductsWidget as ce } from "./libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js";
|
|
69
69
|
import "./lib/ProductsWidget.js";
|
|
@@ -80,7 +80,7 @@ import "./lib/TagsWidget.js";
|
|
|
80
80
|
import "./lib/TeamWidget.js";
|
|
81
81
|
import { DEFAULT_FEATURE_LABELS as me } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index3.js";
|
|
82
82
|
import { TRANSFERS_WIDGET_LABELS_EN as he } from "./libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js";
|
|
83
|
-
import { TransfersWidget as ge } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/
|
|
83
|
+
import { TransfersWidget as ge } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js";
|
|
84
84
|
import "./lib/TransfersWidget.js";
|
|
85
85
|
import "./lib/UploadReceiptWidget.js";
|
|
86
86
|
import { WidgetProvider as _e } from "./lib/WidgetProviderPublic.js";
|
|
@@ -93,6 +93,15 @@ interface DisclosureLink {
|
|
|
93
93
|
href: string;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
interface AcceptDisclosuresWidgetTestIds {
|
|
97
|
+
root?: string;
|
|
98
|
+
providerAttribution?: string;
|
|
99
|
+
disclosureLinks?: string;
|
|
100
|
+
agreeCheckbox?: string;
|
|
101
|
+
agreementText?: string;
|
|
102
|
+
acceptButton?: string;
|
|
103
|
+
error?: string;
|
|
104
|
+
}
|
|
96
105
|
interface AcceptDisclosuresWidgetProps$1 {
|
|
97
106
|
/**
|
|
98
107
|
* Attribution line under the title (e.g. “Banking services for Nail It! are
|
|
@@ -115,6 +124,7 @@ interface AcceptDisclosuresWidgetProps$1 {
|
|
|
115
124
|
/** Inline error shown under Accept; omit or empty when there is no error. */
|
|
116
125
|
errorMessage?: string;
|
|
117
126
|
labels?: PartialDeep<AcceptDisclosuresWidgetLabels>;
|
|
127
|
+
testIds?: AcceptDisclosuresWidgetTestIds;
|
|
118
128
|
}
|
|
119
129
|
|
|
120
130
|
type AuthToken = string | undefined;
|
|
@@ -713,7 +723,7 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
|
|
|
713
723
|
disclosuresAcceptance?: ReactNode;
|
|
714
724
|
}
|
|
715
725
|
|
|
716
|
-
type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage';
|
|
726
|
+
type UiOwnedProps = 'providerAttribution' | 'agreementText' | 'disclosureLinks' | 'isAgreed' | 'onAgreedChange' | 'onAccept' | 'isSubmitting' | 'isAccepted' | 'errorMessage' | 'testIds';
|
|
717
727
|
type InnerProps = Omit<AcceptDisclosuresWidgetProps$1, UiOwnedProps> & {
|
|
718
728
|
/**
|
|
719
729
|
* Called after the atomic accept succeeds and before init refresh is kicked.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as e } from "../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/index.js";
|
|
3
|
-
import { AcceptDisclosuresWidget as t } from "../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/
|
|
3
|
+
import { AcceptDisclosuresWidget as t } from "../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js";
|
|
4
4
|
import "../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index.js";
|
|
5
5
|
export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, t as AcceptDisclosuresWidget };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BALANCES_WIDGET_LABELS_EN as e } from "../libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/labels.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/balances-widget/ui/dist/index.js";
|
|
3
|
-
import { BalancesWidget as t } from "../libs/tesouro-embedded-components-react/balances-widget/feature/dist/
|
|
3
|
+
import { BalancesWidget as t } from "../libs/tesouro-embedded-components-react/balances-widget/feature/dist/index6.js";
|
|
4
4
|
import "../libs/tesouro-embedded-components-react/balances-widget/feature/dist/index.js";
|
|
5
5
|
export { e as BALANCES_WIDGET_LABELS_EN, t as BalancesWidget };
|
|
@@ -2,6 +2,27 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react';
|
|
3
3
|
import { FallbackProps } from 'react-error-boundary';
|
|
4
4
|
|
|
5
|
+
type LinkComponentProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
type LinkComponent = ComponentType<LinkComponentProps>;
|
|
9
|
+
/**
|
|
10
|
+
* The UI frameworks a widget's UI layer can render with.
|
|
11
|
+
*
|
|
12
|
+
* - `shadcn` — the shadcn/Tailwind implementation. This is the default and the
|
|
13
|
+
* implicit fallback, so existing consumers that select nothing keep rendering
|
|
14
|
+
* shadcn.
|
|
15
|
+
* - `tecton` — the Tecton implementation.
|
|
16
|
+
*
|
|
17
|
+
* Declared as an `as const` object (not a TypeScript `enum`) per repo
|
|
18
|
+
* convention.
|
|
19
|
+
*/
|
|
20
|
+
declare const UIFramework: {
|
|
21
|
+
readonly Shadcn: "shadcn";
|
|
22
|
+
readonly Tecton: "tecton";
|
|
23
|
+
};
|
|
24
|
+
type UIFramework = (typeof UIFramework)[keyof typeof UIFramework];
|
|
25
|
+
|
|
5
26
|
declare const USStateAbbreviation: {
|
|
6
27
|
readonly Alabama: "AL";
|
|
7
28
|
readonly Alaska: "AK";
|
|
@@ -598,27 +619,6 @@ type EmbeddedClient = Client;
|
|
|
598
619
|
type ExtractLiterals<T> = T extends string ? string extends T ? never : T : never;
|
|
599
620
|
type BaseUrl = ExtractLiterals<ClientOptions['baseUrl']>;
|
|
600
621
|
|
|
601
|
-
type LinkComponentProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
602
|
-
children?: ReactNode;
|
|
603
|
-
};
|
|
604
|
-
type LinkComponent = ComponentType<LinkComponentProps>;
|
|
605
|
-
/**
|
|
606
|
-
* The UI frameworks a widget's UI layer can render with.
|
|
607
|
-
*
|
|
608
|
-
* - `shadcn` — the shadcn/Tailwind implementation. This is the default and the
|
|
609
|
-
* implicit fallback, so existing consumers that select nothing keep rendering
|
|
610
|
-
* shadcn.
|
|
611
|
-
* - `tecton` — the Tecton implementation.
|
|
612
|
-
*
|
|
613
|
-
* Declared as an `as const` object (not a TypeScript `enum`) per repo
|
|
614
|
-
* convention.
|
|
615
|
-
*/
|
|
616
|
-
declare const UIFramework: {
|
|
617
|
-
readonly Shadcn: "shadcn";
|
|
618
|
-
readonly Tecton: "tecton";
|
|
619
|
-
};
|
|
620
|
-
type UIFramework = (typeof UIFramework)[keyof typeof UIFramework];
|
|
621
|
-
|
|
622
622
|
/**
|
|
623
623
|
* The implementation a widget renders with.
|
|
624
624
|
*
|
|
@@ -3,6 +3,6 @@ import { BUSINESS_DETAILS_LABELS_EN as t } from "../libs/tesouro-embedded-compon
|
|
|
3
3
|
import { PERSONAL_DETAILS_LABELS_EN as n } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js";
|
|
4
4
|
import { RESULT_LABELS_EN as r } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js";
|
|
5
5
|
import "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js";
|
|
6
|
-
import { BankAccountOnboardingWidget as i } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/
|
|
6
|
+
import { BankAccountOnboardingWidget as i } from "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js";
|
|
7
7
|
import "../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js";
|
|
8
8
|
export { e as ADDITIONAL_OWNERS_LABELS_EN, t as BUSINESS_DETAILS_LABELS_EN, i as BankAccountOnboardingWidget, n as PERSONAL_DETAILS_LABELS_EN, r as RESULT_LABELS_EN };
|
package/dist/lib/CardsWidget.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CardsWidget as e } from "../libs/tesouro-embedded-components-react/cards-widget/feature/dist/
|
|
1
|
+
import { CardsWidget as e } from "../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index.js";
|
|
3
3
|
export { e as CardsWidget };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ExpenseApprovalPoliciesWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
1
|
+
import { ExpenseApprovalPoliciesWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js";
|
|
3
3
|
export { e as ExpenseApprovalPoliciesWidget };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ExpenseManagementWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
1
|
+
import { ExpenseManagementWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js";
|
|
3
3
|
export { e as ExpenseManagementWidget };
|
|
@@ -2,6 +2,6 @@ import { INSIGHTS_FEATURE_LABELS_EN as e } from "../libs/tesouro-embedded-compon
|
|
|
2
2
|
import { INSIGHTS_WIDGET_LABELS_EN as t } from "../libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/labels.js";
|
|
3
3
|
import { SINGLE_INSIGHT_LABELS_EN as n } from "../libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/labels.js";
|
|
4
4
|
import "../libs/tesouro-embedded-components-react/insights-widget/ui/dist/index.js";
|
|
5
|
-
import { InsightsWidget as r } from "../libs/tesouro-embedded-components-react/insights-widget/feature/dist/
|
|
5
|
+
import { InsightsWidget as r } from "../libs/tesouro-embedded-components-react/insights-widget/feature/dist/index12.js";
|
|
6
6
|
import "../libs/tesouro-embedded-components-react/insights-widget/feature/dist/index.js";
|
|
7
7
|
export { e as INSIGHTS_FEATURE_LABELS_EN, t as INSIGHTS_WIDGET_LABELS_EN, r as InsightsWidget, n as SINGLE_INSIGHT_LABELS_EN };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReceiptMatchWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
1
|
+
import { ReceiptMatchWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js";
|
|
3
3
|
export { e as ReceiptMatchWidget };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_FEATURE_LABELS as e } from "../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index3.js";
|
|
2
2
|
import { TRANSFERS_WIDGET_LABELS_EN as t } from "../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js";
|
|
3
3
|
import "../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/index.js";
|
|
4
|
-
import { TransfersWidget as n } from "../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/
|
|
4
|
+
import { TransfersWidget as n } from "../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js";
|
|
5
5
|
import "../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index.js";
|
|
6
6
|
export { e as TRANSFERS_FEATURE_LABELS_EN, t as TRANSFERS_WIDGET_LABELS_EN, n as TransfersWidget };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { UploadReceiptWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
1
|
+
import { UploadReceiptWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js";
|
|
3
3
|
export { e as UploadReceiptWidget };
|
package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AcceptDisclosuresWidget as e } from "./
|
|
1
|
+
import { AcceptDisclosuresWidget as e } from "./index5.js";
|
|
2
2
|
export { e as AcceptDisclosuresWidget };
|
package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js
CHANGED
|
@@ -1,142 +1,12 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { AcceptDisclosuresWidgetAnalyticsEvent as e, WIDGET_NAME as t } from "./index2.js";
|
|
6
|
-
import { mergeAcceptDisclosuresWidgetLabels as n } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
7
|
-
import { AcceptDisclosuresWidget as r } from "../../ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
|
|
8
|
-
import "../../ui/dist/index.js";
|
|
9
|
-
import { resolveAcceptDisclosuresContent as i } from "./index3.js";
|
|
10
|
-
import { useAcceptWidgetDisclosures as a } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
|
|
11
|
-
import { useDisclosuresQuery as o } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
|
|
12
|
-
import "../../data-access/dist/index.js";
|
|
13
|
-
import { ErrorState as s } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
14
|
-
import "../../../shared/ui/dist/index.js";
|
|
15
|
-
import { useAnalyticsTrack as c } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
16
|
-
import { WidgetProvider as l } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
17
|
-
import { extractApiErrorMessage as u } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
18
|
-
import { useRefetchWidget as d, useWidgetConfig as f, useWidgetInitStaleForToken as p } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
19
|
-
import "../../../shared/feature/dist/index.js";
|
|
20
|
-
import { useCallback as m, useEffect as h, useRef as g, useState as _ } from "react";
|
|
21
|
-
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
22
1
|
//#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
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 });
|
|
34
|
-
if (h(() => {
|
|
35
|
-
a(e.Mounted);
|
|
36
|
-
}, [a]), _) return /* @__PURE__ */ y(s, {
|
|
37
|
-
title: m.loadErrorTitle,
|
|
38
|
-
description: u(v) ?? m.loadErrorFallback,
|
|
39
|
-
retryLabel: m.loadErrorRetryLabel,
|
|
40
|
-
onRetry: () => {
|
|
41
|
-
b();
|
|
42
|
-
},
|
|
43
|
-
testId: "accept-disclosures-load-error"
|
|
44
|
-
});
|
|
45
|
-
let x = i({
|
|
46
|
-
documents: g?.documents,
|
|
47
|
-
vspName: l?.vspName,
|
|
48
|
-
bankName: l?.bankName,
|
|
49
|
-
labels: t
|
|
50
|
-
});
|
|
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("|")}`;
|
|
55
|
-
return /* @__PURE__ */ y(C, {
|
|
56
|
-
displayedVersion: S,
|
|
57
|
-
labelOverrides: t,
|
|
58
|
-
content: x,
|
|
59
|
-
labels: m,
|
|
60
|
-
onAccepted: r,
|
|
61
|
-
onDisclosuresVersionChanged: b
|
|
62
|
-
}, w);
|
|
63
|
-
}
|
|
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);
|
|
70
|
-
try {
|
|
71
|
-
if (!C.current) try {
|
|
72
|
-
await w({ displayedVersion: e }), C.current = !0;
|
|
73
|
-
} catch (e) {
|
|
74
|
-
if (e instanceof Error && e.name === "DisclosuresVersionChangedError") {
|
|
75
|
-
p(i.disclosuresUpdatedFallback), s();
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
p(u(e) ?? i.acceptErrorFallback);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
try {
|
|
82
|
-
await o?.();
|
|
83
|
-
} catch (e) {
|
|
84
|
-
p(u(e) ?? i.acceptErrorFallback);
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
T(), S(!0);
|
|
88
|
-
} finally {
|
|
89
|
-
v(!1);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}, [
|
|
93
|
-
w,
|
|
94
|
-
e,
|
|
95
|
-
b,
|
|
96
|
-
c,
|
|
97
|
-
h,
|
|
98
|
-
i.acceptErrorFallback,
|
|
99
|
-
i.disclosuresUpdatedFallback,
|
|
100
|
-
o,
|
|
101
|
-
s,
|
|
102
|
-
T
|
|
103
|
-
]);
|
|
104
|
-
return /* @__PURE__ */ y(r, {
|
|
105
|
-
labels: {
|
|
106
|
-
...t,
|
|
107
|
-
title: n.title,
|
|
108
|
-
agreementCheckboxAriaLabel: n.agreementCheckboxAriaLabel
|
|
109
|
-
},
|
|
110
|
-
providerAttribution: x(n.vspName, n.bankName, i),
|
|
111
|
-
agreementText: n.agreementText,
|
|
112
|
-
disclosureLinks: n.disclosureLinks,
|
|
113
|
-
isAgreed: c,
|
|
114
|
-
onAgreedChange: E,
|
|
115
|
-
onAccept: () => {
|
|
116
|
-
D();
|
|
117
|
-
},
|
|
118
|
-
isSubmitting: h,
|
|
119
|
-
isAccepted: b,
|
|
120
|
-
errorMessage: f
|
|
121
|
-
});
|
|
122
|
-
}
|
|
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 }) {
|
|
124
|
-
return /* @__PURE__ */ y(l, {
|
|
125
|
-
widgetName: t,
|
|
126
|
-
baseUrl: e,
|
|
127
|
-
widgetToken: n,
|
|
128
|
-
organizationId: r,
|
|
129
|
-
configClient: i,
|
|
130
|
-
gatewayRouting: a,
|
|
131
|
-
linkComponent: o,
|
|
132
|
-
implementation: s,
|
|
133
|
-
uiFramework: c,
|
|
134
|
-
errorFallback: u,
|
|
135
|
-
onError: d,
|
|
136
|
-
analytics: f,
|
|
137
|
-
disclosuresAcceptance: p,
|
|
138
|
-
children: /* @__PURE__ */ y(S, { ...m })
|
|
139
|
-
});
|
|
140
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
root: "accept-disclosures-widget-root",
|
|
4
|
+
providerAttribution: "accept-disclosures-provider-attribution",
|
|
5
|
+
disclosureLinks: "accept-disclosures-links",
|
|
6
|
+
agreeCheckbox: "accept-disclosures-agree-checkbox",
|
|
7
|
+
agreementText: "accept-disclosures-agreement-text",
|
|
8
|
+
acceptButton: "accept-disclosures-accept-button",
|
|
9
|
+
error: "accept-disclosures-error"
|
|
10
|
+
};
|
|
141
11
|
//#endregion
|
|
142
|
-
export {
|
|
12
|
+
export { e as acceptDisclosuresWidgetTestIds };
|
package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { AcceptDisclosuresWidgetAnalyticsEvent as e, WIDGET_NAME as t } from "./index2.js";
|
|
6
|
+
import { mergeAcceptDisclosuresWidgetLabels as n } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
7
|
+
import { AcceptDisclosuresWidget as r } from "../../ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
|
|
8
|
+
import "../../ui/dist/index.js";
|
|
9
|
+
import { resolveAcceptDisclosuresContent as i } from "./index3.js";
|
|
10
|
+
import { acceptDisclosuresWidgetTestIds as a } from "./index4.js";
|
|
11
|
+
import { useAcceptWidgetDisclosures as o } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
|
|
12
|
+
import { useDisclosuresQuery as s } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
|
|
13
|
+
import "../../data-access/dist/index.js";
|
|
14
|
+
import { ErrorState as c } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
15
|
+
import "../../../shared/ui/dist/index.js";
|
|
16
|
+
import { useAnalyticsTrack as l } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
17
|
+
import { WidgetProvider as u } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
18
|
+
import { extractApiErrorMessage as d } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
19
|
+
import { useRefetchWidget as f, useWidgetConfig as p, useWidgetInitStaleForToken as m } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
20
|
+
import "../../../shared/feature/dist/index.js";
|
|
21
|
+
import { useCallback as h, useEffect as g, useRef as _, useState as v } from "react";
|
|
22
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
23
|
+
//#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js
|
|
24
|
+
function S(e, t, n) {
|
|
25
|
+
return /* @__PURE__ */ x(y, { children: [
|
|
26
|
+
n.providerAttributionPrefix,
|
|
27
|
+
/* @__PURE__ */ b("strong", { children: e }),
|
|
28
|
+
n.providerAttributionMiddle,
|
|
29
|
+
t,
|
|
30
|
+
n.providerAttributionSuffix
|
|
31
|
+
] });
|
|
32
|
+
}
|
|
33
|
+
function C({ labels: t, onAccepted: r }) {
|
|
34
|
+
let a = l(), { initResponse: o } = p(), u = m(), f = n(t), { data: h, isError: _, error: v, refetch: y } = s({ userId: o?.userId ?? void 0 });
|
|
35
|
+
if (g(() => {
|
|
36
|
+
a(e.Mounted);
|
|
37
|
+
}, [a]), _) return /* @__PURE__ */ b(c, {
|
|
38
|
+
title: f.loadErrorTitle,
|
|
39
|
+
description: d(v) ?? f.loadErrorFallback,
|
|
40
|
+
retryLabel: f.loadErrorRetryLabel,
|
|
41
|
+
onRetry: () => {
|
|
42
|
+
y();
|
|
43
|
+
},
|
|
44
|
+
testId: "accept-disclosures-load-error"
|
|
45
|
+
});
|
|
46
|
+
let x = i({
|
|
47
|
+
documents: h?.documents,
|
|
48
|
+
vspName: o?.vspName,
|
|
49
|
+
bankName: o?.bankName,
|
|
50
|
+
labels: t
|
|
51
|
+
});
|
|
52
|
+
if (!x) return null;
|
|
53
|
+
let S = h?.version ?? null;
|
|
54
|
+
if (u) return null;
|
|
55
|
+
let C = `${`user:${o?.userId ?? ""}`}:${S}:${x.vspName}:${x.bankName}:${x.agreementText}:${x.disclosureLinks.map((e) => e.href).join("|")}`;
|
|
56
|
+
return /* @__PURE__ */ b(w, {
|
|
57
|
+
displayedVersion: S,
|
|
58
|
+
labelOverrides: t,
|
|
59
|
+
content: x,
|
|
60
|
+
labels: f,
|
|
61
|
+
onAccepted: r,
|
|
62
|
+
onDisclosuresVersionChanged: y
|
|
63
|
+
}, C);
|
|
64
|
+
}
|
|
65
|
+
function w({ displayedVersion: e, labelOverrides: t, content: n, labels: i, onAccepted: s, onDisclosuresVersionChanged: c }) {
|
|
66
|
+
let [l, u] = v(!1), [p, m] = v(), [g, y] = v(!1), [x, C] = v(!1), w = _(!1), { mutateAsync: T } = o(), E = f(), D = h((e) => {
|
|
67
|
+
m(void 0), u(e);
|
|
68
|
+
}, []), O = h(async () => {
|
|
69
|
+
if (!(!l || g || x)) {
|
|
70
|
+
m(void 0), y(!0);
|
|
71
|
+
try {
|
|
72
|
+
if (!w.current) try {
|
|
73
|
+
await T({ displayedVersion: e }), w.current = !0;
|
|
74
|
+
} catch (e) {
|
|
75
|
+
if (e instanceof Error && e.name === "DisclosuresVersionChangedError") {
|
|
76
|
+
m(i.disclosuresUpdatedFallback), c();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
m(d(e) ?? i.acceptErrorFallback);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
try {
|
|
83
|
+
await s?.();
|
|
84
|
+
} catch (e) {
|
|
85
|
+
m(d(e) ?? i.acceptErrorFallback);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
E(), C(!0);
|
|
89
|
+
} finally {
|
|
90
|
+
y(!1);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}, [
|
|
94
|
+
T,
|
|
95
|
+
e,
|
|
96
|
+
x,
|
|
97
|
+
l,
|
|
98
|
+
g,
|
|
99
|
+
i.acceptErrorFallback,
|
|
100
|
+
i.disclosuresUpdatedFallback,
|
|
101
|
+
s,
|
|
102
|
+
c,
|
|
103
|
+
E
|
|
104
|
+
]);
|
|
105
|
+
return /* @__PURE__ */ b(r, {
|
|
106
|
+
labels: {
|
|
107
|
+
...t,
|
|
108
|
+
title: n.title,
|
|
109
|
+
agreementCheckboxAriaLabel: n.agreementCheckboxAriaLabel
|
|
110
|
+
},
|
|
111
|
+
providerAttribution: S(n.vspName, n.bankName, i),
|
|
112
|
+
agreementText: n.agreementText,
|
|
113
|
+
disclosureLinks: n.disclosureLinks,
|
|
114
|
+
isAgreed: l,
|
|
115
|
+
onAgreedChange: D,
|
|
116
|
+
onAccept: () => {
|
|
117
|
+
O();
|
|
118
|
+
},
|
|
119
|
+
isSubmitting: g,
|
|
120
|
+
isAccepted: x,
|
|
121
|
+
errorMessage: p,
|
|
122
|
+
testIds: {
|
|
123
|
+
root: a.root,
|
|
124
|
+
providerAttribution: a.providerAttribution,
|
|
125
|
+
disclosureLinks: a.disclosureLinks,
|
|
126
|
+
agreeCheckbox: a.agreeCheckbox,
|
|
127
|
+
agreementText: a.agreementText,
|
|
128
|
+
acceptButton: a.acceptButton,
|
|
129
|
+
error: a.error
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function T({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: d, analytics: f, disclosuresAcceptance: p, ...m }) {
|
|
134
|
+
return /* @__PURE__ */ b(u, {
|
|
135
|
+
widgetName: t,
|
|
136
|
+
baseUrl: e,
|
|
137
|
+
widgetToken: n,
|
|
138
|
+
organizationId: r,
|
|
139
|
+
configClient: i,
|
|
140
|
+
gatewayRouting: a,
|
|
141
|
+
linkComponent: o,
|
|
142
|
+
implementation: s,
|
|
143
|
+
uiFramework: c,
|
|
144
|
+
errorFallback: l,
|
|
145
|
+
onError: d,
|
|
146
|
+
analytics: f,
|
|
147
|
+
disclosuresAcceptance: p,
|
|
148
|
+
children: /* @__PURE__ */ b(C, { ...m })
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
export { T as AcceptDisclosuresWidget };
|