@adyen/kyc-components 3.32.2 → 3.32.4
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.
|
@@ -21317,10 +21317,16 @@ function PayoutVerificationMethod(props) {
|
|
|
21317
21317
|
}
|
|
21318
21318
|
}, [forms, hasSelectedMethod, data.payoutVerificationMethod, handleNextClick, enablePreferInstantVerificationMethodFlow]);
|
|
21319
21319
|
useEffect(() => {
|
|
21320
|
-
if (!enablePreferInstantVerificationMethodFlow) return;
|
|
21321
|
-
|
|
21322
|
-
|
|
21320
|
+
if (!enablePreferInstantVerificationMethodFlow || !bankVerificationVendors) return;
|
|
21321
|
+
let timeout;
|
|
21322
|
+
if (!bankVerificationVendors[data.bankCountry]) {
|
|
21323
|
+
timeout = setTimeout(() => {
|
|
21324
|
+
selectVerificationMethod("manualVerification");
|
|
21325
|
+
}, 50);
|
|
21323
21326
|
}
|
|
21327
|
+
return () => {
|
|
21328
|
+
clearTimeout(timeout);
|
|
21329
|
+
};
|
|
21324
21330
|
}, [bankVerificationVendors, enablePreferInstantVerificationMethodFlow]);
|
|
21325
21331
|
const getProviderDisplayName = (providerName2) => providerName2.charAt(0).toUpperCase() + providerName2.slice(1);
|
|
21326
21332
|
const {
|
|
@@ -32094,6 +32100,7 @@ const useBankConfigurationHandlers = ({
|
|
|
32094
32100
|
}
|
|
32095
32101
|
setLoadingStatus("loading");
|
|
32096
32102
|
(async () => {
|
|
32103
|
+
setBankVerificationVendorsResponse(void 0);
|
|
32097
32104
|
const bankVerificationVendorsResponse2 = callBankVerificationVendorsUpfront ? await handleGetBankVerificationVendors(bankAccountCountry) : [];
|
|
32098
32105
|
setBankVerificationVendorsResponse(bankVerificationVendorsResponse2);
|
|
32099
32106
|
setUseFreshProviderRedirectUrl(false);
|
|
@@ -32111,8 +32118,12 @@ const useBankConfigurationHandlers = ({
|
|
|
32111
32118
|
capabilities,
|
|
32112
32119
|
country: bankAccountCountry
|
|
32113
32120
|
});
|
|
32114
|
-
if (!callBankVerificationVendorsUpfront
|
|
32115
|
-
|
|
32121
|
+
if (!callBankVerificationVendorsUpfront) return configuration;
|
|
32122
|
+
if (!((_a = bankVerificationVendorsResponse == null ? void 0 : bankVerificationVendorsResponse[0]) == null ? void 0 : _a.name)) {
|
|
32123
|
+
return {
|
|
32124
|
+
...configuration,
|
|
32125
|
+
bankVerificationProviders: {}
|
|
32126
|
+
};
|
|
32116
32127
|
}
|
|
32117
32128
|
return {
|
|
32118
32129
|
...configuration,
|
|
@@ -36641,8 +36652,11 @@ const logger$h = createLogger("AcceptTermsOfService");
|
|
|
36641
36652
|
function AcceptTermsOfServiceComponent({
|
|
36642
36653
|
legalEntityId,
|
|
36643
36654
|
modalView,
|
|
36655
|
+
/* triggered when X button clicked, or at the end, on Finish button click */
|
|
36644
36656
|
onClose,
|
|
36645
|
-
onUnmount
|
|
36657
|
+
onUnmount,
|
|
36658
|
+
/* triggered on every document signed, typically multiple times */
|
|
36659
|
+
onAccept
|
|
36646
36660
|
}) {
|
|
36647
36661
|
const {
|
|
36648
36662
|
isModalView,
|
|
@@ -36665,6 +36679,10 @@ function AcceptTermsOfServiceComponent({
|
|
|
36665
36679
|
const [legalEntity, setLegalEntity] = useState();
|
|
36666
36680
|
const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
|
|
36667
36681
|
const [serviceAgreementAcceptanceInfos, setServiceAgreementAcceptanceInfos] = useState([]);
|
|
36682
|
+
const [stepsData, setStepsData] = useState({
|
|
36683
|
+
unAcceptedTermsOfServiceTypes: [],
|
|
36684
|
+
acceptedTermsOfServices: []
|
|
36685
|
+
});
|
|
36668
36686
|
if (modalView) {
|
|
36669
36687
|
setIsModalView(true);
|
|
36670
36688
|
}
|
|
@@ -36690,10 +36708,32 @@ function AcceptTermsOfServiceComponent({
|
|
|
36690
36708
|
const handleSign = useCallback(
|
|
36691
36709
|
// @ts-ignore-error:next-line ts does not infer type correctly
|
|
36692
36710
|
async (...params) => {
|
|
36693
|
-
await acceptServiceAgreement2(...params);
|
|
36711
|
+
const serviceAgreement = await acceptServiceAgreement2(...params);
|
|
36694
36712
|
await Promise.all([fetchLegalEntity(), fetchUnsigned(), fetchSigned()]);
|
|
36713
|
+
const paramAllowList = {
|
|
36714
|
+
type: serviceAgreement.type,
|
|
36715
|
+
acceptedBy: serviceAgreement.acceptedBy,
|
|
36716
|
+
id: serviceAgreement.id,
|
|
36717
|
+
language: serviceAgreement.language,
|
|
36718
|
+
termsOfServiceDocumentId: serviceAgreement.termsOfServiceDocumentId
|
|
36719
|
+
};
|
|
36720
|
+
const {
|
|
36721
|
+
acceptedTermsOfServices
|
|
36722
|
+
} = stepsData;
|
|
36723
|
+
acceptedTermsOfServices.push(paramAllowList);
|
|
36724
|
+
const unAcceptedTermsOfServiceTypes = serviceAgreementTypes;
|
|
36725
|
+
setStepsData({
|
|
36726
|
+
...stepsData,
|
|
36727
|
+
unAcceptedTermsOfServiceTypes,
|
|
36728
|
+
acceptedTermsOfServices
|
|
36729
|
+
});
|
|
36730
|
+
onAccept == null ? void 0 : onAccept({
|
|
36731
|
+
...stepsData,
|
|
36732
|
+
unAcceptedTermsOfServiceTypes,
|
|
36733
|
+
acceptedTermsOfServices
|
|
36734
|
+
});
|
|
36695
36735
|
},
|
|
36696
|
-
[acceptServiceAgreement2, fetchLegalEntity, fetchSigned, fetchUnsigned]
|
|
36736
|
+
[acceptServiceAgreement2, fetchLegalEntity, fetchSigned, fetchUnsigned, onAccept, serviceAgreementTypes, stepsData]
|
|
36697
36737
|
);
|
|
36698
36738
|
useEffect(() => {
|
|
36699
36739
|
(async () => {
|
|
@@ -40204,7 +40244,7 @@ const ConfigurationApiProvider = ({
|
|
|
40204
40244
|
isEmbeddedDropin,
|
|
40205
40245
|
loadingContext
|
|
40206
40246
|
} = authContext;
|
|
40207
|
-
const sdkVersion = "3.32.
|
|
40247
|
+
const sdkVersion = "3.32.4";
|
|
40208
40248
|
useAnalytics({
|
|
40209
40249
|
onUserEvent,
|
|
40210
40250
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40891,7 +40931,7 @@ const DebugModal = ({
|
|
|
40891
40931
|
};
|
|
40892
40932
|
const copyToClipboard = async () => {
|
|
40893
40933
|
const toCopy = {
|
|
40894
|
-
sdkVersion: "3.32.
|
|
40934
|
+
sdkVersion: "3.32.4",
|
|
40895
40935
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40896
40936
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40897
40937
|
};
|
|
@@ -40930,7 +40970,7 @@ const DebugModal = ({
|
|
|
40930
40970
|
children: [jsxs("div", {
|
|
40931
40971
|
className: "adyen-kyc-debug-modal__meta",
|
|
40932
40972
|
children: [jsxs("span", {
|
|
40933
|
-
children: ["SDK version: ", "3.32.
|
|
40973
|
+
children: ["SDK version: ", "3.32.4"]
|
|
40934
40974
|
}), jsxs("span", {
|
|
40935
40975
|
children: ["rootLegalEntityId: ", rootLegalEntityId]
|
|
40936
40976
|
})]
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
+
import type { ServiceAgreementType } from '../../Dropins/ServiceAgreementDropinComponent/types';
|
|
1
2
|
interface AcceptTermsOfServiceProps {
|
|
2
3
|
legalEntityId: string;
|
|
3
4
|
modalView?: boolean;
|
|
4
5
|
onClose?(): void;
|
|
5
6
|
onUnmount?(): void;
|
|
7
|
+
onAccept?(data: OnAcceptPayload): void;
|
|
6
8
|
}
|
|
7
|
-
|
|
9
|
+
interface OnAcceptPayload {
|
|
10
|
+
unAcceptedTermsOfServiceTypes: string[];
|
|
11
|
+
acceptedTermsOfServices: AcceptedTermsOfService[];
|
|
12
|
+
}
|
|
13
|
+
/** Params of a step we expose to merchants, some that BE returns get left out */
|
|
14
|
+
interface AcceptedTermsOfService {
|
|
15
|
+
acceptedBy: string;
|
|
16
|
+
id: string;
|
|
17
|
+
language: string;
|
|
18
|
+
termsOfServiceDocumentId: string;
|
|
19
|
+
type: ServiceAgreementType;
|
|
20
|
+
}
|
|
21
|
+
export declare function AcceptTermsOfServiceComponent({ legalEntityId, modalView, onClose, onUnmount, onAccept, }: AcceptTermsOfServiceProps): import("preact").JSX.Element;
|
|
8
22
|
export {};
|