@adyen/kyc-components 3.15.3 → 3.16.0
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/es/adyen-kyc-components.es.js +56 -89
- package/dist/style.css +1 -0
- package/dist/types/components/BankDocument/types.d.ts +1 -2
- package/dist/types/components/internal/Address/constants.d.ts +1 -0
- package/dist/types/components/internal/DocumentGuidance/DocumentGuidance.d.ts +1 -1
- package/dist/types/components/internal/DocumentGuidance/{type.d.ts → types.d.ts} +5 -0
- package/package.json +1 -1
|
@@ -464,7 +464,6 @@ const depositSlip = "Deposit slip";
|
|
|
464
464
|
const screenshotOfOnlineBankingEnviroment = "Screenshot of online banking environment";
|
|
465
465
|
const officialEmailOrALetterFromYourBank = "Official email or a letter from your bank";
|
|
466
466
|
const check = "Check";
|
|
467
|
-
const releveDidentiteBancaire = "Relevé d'Identité Bancaire (RIB)";
|
|
468
467
|
const successFullyRemovedDecisionMaker = "Successfully removed a decision maker";
|
|
469
468
|
const failedToRemoveDecisionMaker = "Failed to remove a decision maker";
|
|
470
469
|
const chamberOfCommerceExtract = "Chamber of Commerce extract";
|
|
@@ -849,21 +848,21 @@ const getYourBusinessVerifiedDetails = "Get your business's verified details ins
|
|
|
849
848
|
const enterTheDetailsYourself = "Enter the details yourself";
|
|
850
849
|
const youAlsoHaveToUploadSomeSupportingDocuments = "You'll also have to upload some supporting documents.";
|
|
851
850
|
const verificationMethod = "Verification method";
|
|
852
|
-
const
|
|
853
|
-
const
|
|
854
|
-
const instantVerificationDescription = "
|
|
851
|
+
const verifyViaMobileBankingAppOrWebsite = "Verify via mobile banking app or website";
|
|
852
|
+
const uploadABankStatement = "Upload a bank statement";
|
|
853
|
+
const instantVerificationDescription = "Log in to your bank account and get instantly verified.";
|
|
855
854
|
const couldNotEstablishBankConnection = "We couldn't establish a connection with your bank";
|
|
856
855
|
const sorryAnErrorOccurred = "We are sorry, an error has occurred";
|
|
857
856
|
const ranIntoTechnicalError = "We ran into a technical error";
|
|
858
857
|
const failedInitializeInstantVerification = "Failed to initialize instant account verification process";
|
|
859
858
|
const couldNotCompleteAccountCheck = "We couldn't complete the account check";
|
|
860
859
|
const tryAgainOrManualAccountDetails = "Please try again later or provide account details manually.";
|
|
861
|
-
const manualVerificationDescription = "
|
|
860
|
+
const manualVerificationDescription = "You also have to provide the bank account details.";
|
|
862
861
|
const poweredBy = "Powered by";
|
|
863
862
|
const youSuccessfullyVerifiedAccount = "You’ve successfully verified your bank account.";
|
|
864
863
|
const verifyBankAccountAgain = "Verify bank account again";
|
|
865
864
|
const accountName = "Account name";
|
|
866
|
-
const
|
|
865
|
+
const mayTakeAFewDays = "May take a few days";
|
|
867
866
|
const instant = "Instant";
|
|
868
867
|
const isOurTrustedPartnerHelpingSpeedUpSetup = "%{provider} is our trusted partner helping speed up your account setup by instantly verifying your bank account.";
|
|
869
868
|
const howDoesVerificationWithOurPartnerWorks = "How does verification with our partner %{provider} work?";
|
|
@@ -1746,7 +1745,6 @@ const defaultTrans = {
|
|
|
1746
1745
|
screenshotOfOnlineBankingEnviroment,
|
|
1747
1746
|
officialEmailOrALetterFromYourBank,
|
|
1748
1747
|
check,
|
|
1749
|
-
releveDidentiteBancaire,
|
|
1750
1748
|
successFullyRemovedDecisionMaker,
|
|
1751
1749
|
failedToRemoveDecisionMaker,
|
|
1752
1750
|
chamberOfCommerceExtract,
|
|
@@ -2139,8 +2137,8 @@ const defaultTrans = {
|
|
|
2139
2137
|
enterTheDetailsYourself,
|
|
2140
2138
|
youAlsoHaveToUploadSomeSupportingDocuments,
|
|
2141
2139
|
verificationMethod,
|
|
2142
|
-
|
|
2143
|
-
|
|
2140
|
+
verifyViaMobileBankingAppOrWebsite,
|
|
2141
|
+
uploadABankStatement,
|
|
2144
2142
|
instantVerificationDescription,
|
|
2145
2143
|
couldNotEstablishBankConnection,
|
|
2146
2144
|
sorryAnErrorOccurred,
|
|
@@ -2153,7 +2151,7 @@ const defaultTrans = {
|
|
|
2153
2151
|
youSuccessfullyVerifiedAccount,
|
|
2154
2152
|
verifyBankAccountAgain,
|
|
2155
2153
|
accountName,
|
|
2156
|
-
|
|
2154
|
+
mayTakeAFewDays,
|
|
2157
2155
|
instant,
|
|
2158
2156
|
isOurTrustedPartnerHelpingSpeedUpSetup,
|
|
2159
2157
|
howDoesVerificationWithOurPartnerWorks,
|
|
@@ -10563,72 +10561,40 @@ function DocumentGuidance({
|
|
|
10563
10561
|
useEffect(() => {
|
|
10564
10562
|
setGuidancePrefix(getDocumentGuidancePrefix(type));
|
|
10565
10563
|
}, [type]);
|
|
10564
|
+
const documentGuidanceItems = useMemo(() => [{
|
|
10565
|
+
type: "valid",
|
|
10566
|
+
translationKey: "good"
|
|
10567
|
+
}, {
|
|
10568
|
+
type: "invalid-cut",
|
|
10569
|
+
translationKey: "notCutOff"
|
|
10570
|
+
}, {
|
|
10571
|
+
type: "invalid-blur",
|
|
10572
|
+
translationKey: "notBlurry"
|
|
10573
|
+
}, guidancePrefix === "generic-document" ? {
|
|
10574
|
+
type: "invalid-expired",
|
|
10575
|
+
translationKey: "notExpired"
|
|
10576
|
+
} : {
|
|
10577
|
+
type: "invalid-glare",
|
|
10578
|
+
translationKey: "noGlare"
|
|
10579
|
+
}], [guidancePrefix]);
|
|
10566
10580
|
return jsx("div", {
|
|
10567
10581
|
className: cx("adl-document-guidance", className),
|
|
10568
|
-
children:
|
|
10582
|
+
children: jsx("div", {
|
|
10569
10583
|
className: "adl-document-guidance__container",
|
|
10570
|
-
children:
|
|
10571
|
-
className: "adl-document-guidance__item",
|
|
10572
|
-
children: [jsx("svg", {
|
|
10573
|
-
width: "100%",
|
|
10574
|
-
role: "img",
|
|
10575
|
-
children: jsx("use", {
|
|
10576
|
-
href: `#adl-${guidancePrefix}-valid`
|
|
10577
|
-
})
|
|
10578
|
-
}), jsx("span", {
|
|
10579
|
-
className: "adl-document-guidance__description",
|
|
10580
|
-
children: i18n.get("good")
|
|
10581
|
-
})]
|
|
10582
|
-
}), jsxs("div", {
|
|
10583
|
-
className: "adl-document-guidance__item",
|
|
10584
|
-
children: [jsx("svg", {
|
|
10585
|
-
width: "100%",
|
|
10586
|
-
role: "img",
|
|
10587
|
-
children: jsx("use", {
|
|
10588
|
-
href: `#adl-${guidancePrefix}-invalid-cut`
|
|
10589
|
-
})
|
|
10590
|
-
}), jsx("span", {
|
|
10591
|
-
className: "adl-document-guidance__description",
|
|
10592
|
-
children: i18n.get("notCutOff")
|
|
10593
|
-
})]
|
|
10594
|
-
}), jsxs("div", {
|
|
10584
|
+
children: documentGuidanceItems.map((item) => jsxs("div", {
|
|
10595
10585
|
className: "adl-document-guidance__item",
|
|
10596
10586
|
children: [jsx("svg", {
|
|
10597
10587
|
width: "100%",
|
|
10588
|
+
height: "100%",
|
|
10598
10589
|
role: "img",
|
|
10599
10590
|
children: jsx("use", {
|
|
10600
|
-
href: `#adl-${guidancePrefix}
|
|
10591
|
+
href: `#adl-${guidancePrefix}-${item.type}`
|
|
10601
10592
|
})
|
|
10602
10593
|
}), jsx("span", {
|
|
10603
10594
|
className: "adl-document-guidance__description",
|
|
10604
|
-
children: i18n.get(
|
|
10595
|
+
children: i18n.get(item.translationKey)
|
|
10605
10596
|
})]
|
|
10606
|
-
}
|
|
10607
|
-
className: "adl-document-guidance__item",
|
|
10608
|
-
children: guidancePrefix === "generic-document" ? jsxs(Fragment, {
|
|
10609
|
-
children: [jsx("svg", {
|
|
10610
|
-
width: "100%",
|
|
10611
|
-
role: "img",
|
|
10612
|
-
children: jsx("use", {
|
|
10613
|
-
href: `#adl-${guidancePrefix}-invalid-expired`
|
|
10614
|
-
})
|
|
10615
|
-
}), jsx("span", {
|
|
10616
|
-
className: "adl-document-guidance__description",
|
|
10617
|
-
children: i18n.get("notExpired")
|
|
10618
|
-
})]
|
|
10619
|
-
}) : jsxs(Fragment, {
|
|
10620
|
-
children: [jsx("svg", {
|
|
10621
|
-
width: "100%",
|
|
10622
|
-
role: "img",
|
|
10623
|
-
children: jsx("use", {
|
|
10624
|
-
href: `#adl-${guidancePrefix}-invalid-glare`
|
|
10625
|
-
})
|
|
10626
|
-
}), jsx("span", {
|
|
10627
|
-
className: "adl-document-guidance__description",
|
|
10628
|
-
children: i18n.get("noGlare")
|
|
10629
|
-
})]
|
|
10630
|
-
})
|
|
10631
|
-
})]
|
|
10597
|
+
}, item.type))
|
|
10632
10598
|
})
|
|
10633
10599
|
});
|
|
10634
10600
|
}
|
|
@@ -11160,7 +11126,8 @@ function ListItem({
|
|
|
11160
11126
|
const ADDRESS_SCHEMA = ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
|
|
11161
11127
|
const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
|
|
11162
11128
|
const COUNTRIES_WITH_STATES_DATASET = [CountryCodes.Australia, CountryCodes.Brazil, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates];
|
|
11163
|
-
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
|
|
11129
|
+
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom, CountryCodes.France];
|
|
11130
|
+
const COUNTRIES_WITH_COMMA_SEPARATED = [CountryCodes.Spain];
|
|
11164
11131
|
const ADDRESS_SCHEMAS = {
|
|
11165
11132
|
[CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
|
|
11166
11133
|
[CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
|
|
@@ -12074,8 +12041,12 @@ function Address(props) {
|
|
|
12074
12041
|
houseNumberOrName,
|
|
12075
12042
|
street: street2
|
|
12076
12043
|
}) => {
|
|
12077
|
-
const
|
|
12078
|
-
const
|
|
12044
|
+
const isHouseNumberFirst = COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country);
|
|
12045
|
+
const needsComma = COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country);
|
|
12046
|
+
let formattedAddress = isHouseNumberFirst ? `${houseNumberOrName} ${street2}` : `${street2} ${houseNumberOrName}`;
|
|
12047
|
+
if (needsComma) {
|
|
12048
|
+
formattedAddress = formattedAddress.replace(" ", ", ");
|
|
12049
|
+
}
|
|
12079
12050
|
handleChangeFor("address", "input")(formattedAddress);
|
|
12080
12051
|
};
|
|
12081
12052
|
const setFieldsData = (address2, field) => {
|
|
@@ -17320,7 +17291,6 @@ var BankDocumentTypes = /* @__PURE__ */ ((BankDocumentTypes2) => {
|
|
|
17320
17291
|
BankDocumentTypes2["SCREENSHOT_OF_BANK"] = "screenshotOfOnlineBankingEnviroment";
|
|
17321
17292
|
BankDocumentTypes2["OFFICIAL_EMAIL"] = "officialEmailOrALetterFromYourBank";
|
|
17322
17293
|
BankDocumentTypes2["CHECK"] = "check";
|
|
17323
|
-
BankDocumentTypes2["RELEVE_DIDENTITE"] = "releveDidentiteBancaire";
|
|
17324
17294
|
return BankDocumentTypes2;
|
|
17325
17295
|
})(BankDocumentTypes || {});
|
|
17326
17296
|
const bankDocumentOptions = [{
|
|
@@ -17338,9 +17308,6 @@ const bankDocumentOptions = [{
|
|
|
17338
17308
|
}, {
|
|
17339
17309
|
id: "check",
|
|
17340
17310
|
name: "check"
|
|
17341
|
-
}, {
|
|
17342
|
-
id: "releveDidentiteBancaire",
|
|
17343
|
-
name: "releveDidentiteBancaire"
|
|
17344
17311
|
}];
|
|
17345
17312
|
var BankDocumentRequirement = /* @__PURE__ */ ((BankDocumentRequirement2) => {
|
|
17346
17313
|
BankDocumentRequirement2["ACCOUNT_NAME_INDIVIDUAL"] = "bankAccountNameIndividual";
|
|
@@ -17591,19 +17558,13 @@ function BankDocument(props) {
|
|
|
17591
17558
|
}
|
|
17592
17559
|
});
|
|
17593
17560
|
}, [data, valid, errors, fieldProblems]);
|
|
17594
|
-
const getBankDocumentOptions = () => {
|
|
17595
|
-
|
|
17596
|
-
|
|
17597
|
-
|
|
17598
|
-
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
name
|
|
17602
|
-
}) => ({
|
|
17603
|
-
id: id2,
|
|
17604
|
-
name: i18n.get(name)
|
|
17605
|
-
}));
|
|
17606
|
-
};
|
|
17561
|
+
const getBankDocumentOptions = () => bankDocumentOptions.map(({
|
|
17562
|
+
id: id2,
|
|
17563
|
+
name
|
|
17564
|
+
}) => ({
|
|
17565
|
+
id: id2,
|
|
17566
|
+
name: i18n.get(name)
|
|
17567
|
+
}));
|
|
17607
17568
|
const documentsModifiers = useMemo(() => {
|
|
17608
17569
|
var _a2, _b2;
|
|
17609
17570
|
return {
|
|
@@ -19611,7 +19572,7 @@ const regions = {
|
|
|
19611
19572
|
const getAllowedBankCountries = (country2) => Object.values(regions).find((countriesInARegion) => countriesInARegion.includes(country2)) ?? [country2];
|
|
19612
19573
|
const makePayoutVerificationMethodsMetadata = (svgPath, instantVerificationProvider) => ({
|
|
19613
19574
|
instantVerification: {
|
|
19614
|
-
name: "
|
|
19575
|
+
name: "verifyViaMobileBankingAppOrWebsite",
|
|
19615
19576
|
subtitle: "instant",
|
|
19616
19577
|
description: "instantVerificationDescription",
|
|
19617
19578
|
iconComponentDesktop: `${svgPath}/instant-verification-desktop.svg`,
|
|
@@ -19622,8 +19583,8 @@ const makePayoutVerificationMethodsMetadata = (svgPath, instantVerificationProvi
|
|
|
19622
19583
|
} : void 0
|
|
19623
19584
|
},
|
|
19624
19585
|
manualVerification: {
|
|
19625
|
-
name: "
|
|
19626
|
-
subtitle: "
|
|
19586
|
+
name: "uploadABankStatement",
|
|
19587
|
+
subtitle: "mayTakeAFewDays",
|
|
19627
19588
|
description: "manualVerificationDescription",
|
|
19628
19589
|
iconComponentDesktop: `${svgPath}/manual-verification-desktop.svg`,
|
|
19629
19590
|
iconComponentMobile: `${svgPath}/manual-verification-mobile.svg`
|
|
@@ -20507,6 +20468,11 @@ const PER_COUNTRY_DECISION_MAKER_REQUIREMENTS_OVERRIDES = {
|
|
|
20507
20468
|
roleTypes: [DecisionMakerType.DIRECTOR],
|
|
20508
20469
|
min: 1,
|
|
20509
20470
|
max: Infinity
|
|
20471
|
+
}],
|
|
20472
|
+
GB: [...DEFAULT_DECISION_MAKER_REQUIREMENTS, {
|
|
20473
|
+
roleTypes: [DecisionMakerType.DIRECTOR],
|
|
20474
|
+
min: 1,
|
|
20475
|
+
max: Infinity
|
|
20510
20476
|
}]
|
|
20511
20477
|
};
|
|
20512
20478
|
const getDecisionMakerRequirements = (country2) => {
|
|
@@ -26883,8 +26849,9 @@ const TaskItemStatus = ({
|
|
|
26883
26849
|
return jsx(Status, {
|
|
26884
26850
|
className: "adl-status--finished",
|
|
26885
26851
|
iconStatusClass: "adl-status__icon--finished",
|
|
26886
|
-
icon: "
|
|
26852
|
+
icon: "checkmark-small",
|
|
26887
26853
|
text: statusLabel || i18n.get("signed"),
|
|
26854
|
+
size,
|
|
26888
26855
|
showText
|
|
26889
26856
|
});
|
|
26890
26857
|
case TaskStatus.ERROR:
|
|
@@ -34622,7 +34589,7 @@ const ConfigurationApiProvider = ({
|
|
|
34622
34589
|
isEmbeddedDropin,
|
|
34623
34590
|
loadingContext
|
|
34624
34591
|
} = authContext;
|
|
34625
|
-
const sdkVersion = "3.
|
|
34592
|
+
const sdkVersion = "3.16.0";
|
|
34626
34593
|
useAnalytics({
|
|
34627
34594
|
onUserEvent,
|
|
34628
34595
|
legalEntityId: rootLegalEntityId,
|
package/dist/style.css
CHANGED
|
@@ -18,8 +18,7 @@ export declare enum BankDocumentTypes {
|
|
|
18
18
|
DEPOSIT_SLIP = "depositSlip",
|
|
19
19
|
SCREENSHOT_OF_BANK = "screenshotOfOnlineBankingEnviroment",
|
|
20
20
|
OFFICIAL_EMAIL = "officialEmailOrALetterFromYourBank",
|
|
21
|
-
CHECK = "check"
|
|
22
|
-
RELEVE_DIDENTITE = "releveDidentiteBancaire"
|
|
21
|
+
CHECK = "check"
|
|
23
22
|
}
|
|
24
23
|
export interface DocumentsModifiers {
|
|
25
24
|
rootEntityType: LegalEntityType;
|
|
@@ -3,5 +3,6 @@ import type { AddressLabels, AddressSchemas } from './types';
|
|
|
3
3
|
export declare const ADDRESS_SCHEMA: readonly ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
|
|
4
4
|
export declare const COUNTRIES_WITH_STATES_DATASET: CountryCode[];
|
|
5
5
|
export declare const COUNTRIES_WITH_HOUSE_NUMBER_FIRST: CountryCode[];
|
|
6
|
+
export declare const COUNTRIES_WITH_COMMA_SEPARATED: CountryCode[];
|
|
6
7
|
export declare const ADDRESS_SCHEMAS: AddressSchemas;
|
|
7
8
|
export declare const LABELS: AddressLabels;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './_document-guidance.component.scss';
|
|
2
|
-
import type { DocumentGuidanceProps } from './
|
|
2
|
+
import type { DocumentGuidanceProps } from './types';
|
|
3
3
|
declare function DocumentGuidance({ type, className }: DocumentGuidanceProps): import("preact").JSX.Element;
|
|
4
4
|
export default DocumentGuidance;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { DocumentType } from '../../../core/models/api/document';
|
|
2
|
+
import type { Translatable } from '../../../language/types';
|
|
2
3
|
export interface DocumentGuidanceProps {
|
|
3
4
|
type?: DocumentType;
|
|
4
5
|
className?: string;
|
|
5
6
|
}
|
|
7
|
+
export interface DocumentGuidanceItem {
|
|
8
|
+
type: string;
|
|
9
|
+
translationKey: Translatable;
|
|
10
|
+
}
|