@adyen/kyc-components 2.41.3 → 2.42.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 +54 -88
- 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
|
@@ -460,7 +460,6 @@ const depositSlip = "Deposit slip";
|
|
|
460
460
|
const screenshotOfOnlineBankingEnviroment = "Screenshot of online banking environment";
|
|
461
461
|
const officialEmailOrALetterFromYourBank = "Official email or a letter from your bank";
|
|
462
462
|
const check = "Check";
|
|
463
|
-
const releveDidentiteBancaire = "Relevé d'Identité Bancaire (RIB)";
|
|
464
463
|
const successFullyRemovedDecisionMaker = "Successfully removed a decision maker";
|
|
465
464
|
const failedToRemoveDecisionMaker = "Failed to remove a decision maker";
|
|
466
465
|
const chamberOfCommerceExtract = "Chamber of Commerce extract";
|
|
@@ -843,21 +842,21 @@ const getYourBusinessVerifiedDetails = "Get your business's verified details ins
|
|
|
843
842
|
const enterTheDetailsYourself = "Enter the details yourself";
|
|
844
843
|
const youAlsoHaveToUploadSomeSupportingDocuments = "You'll also have to upload some supporting documents.";
|
|
845
844
|
const verificationMethod = "Verification method";
|
|
846
|
-
const
|
|
847
|
-
const
|
|
848
|
-
const instantVerificationDescription = "
|
|
845
|
+
const verifyViaMobileBankingAppOrWebsite = "Verify via mobile banking app or website";
|
|
846
|
+
const uploadABankStatement = "Upload a bank statement";
|
|
847
|
+
const instantVerificationDescription = "Log in to your bank account and get instantly verified.";
|
|
849
848
|
const couldNotEstablishBankConnection = "We couldn't establish a connection with your bank";
|
|
850
849
|
const sorryAnErrorOccurred = "We are sorry, an error has occurred";
|
|
851
850
|
const ranIntoTechnicalError = "We ran into a technical error";
|
|
852
851
|
const failedInitializeInstantVerification = "Failed to initialize instant account verification process";
|
|
853
852
|
const couldNotCompleteAccountCheck = "We couldn't complete the account check";
|
|
854
853
|
const tryAgainOrManualAccountDetails = "Please try again later or provide account details manually.";
|
|
855
|
-
const manualVerificationDescription = "
|
|
854
|
+
const manualVerificationDescription = "You also have to provide the bank account details.";
|
|
856
855
|
const poweredBy = "Powered by";
|
|
857
856
|
const youSuccessfullyVerifiedAccount = "You’ve successfully verified your bank account.";
|
|
858
857
|
const verifyBankAccountAgain = "Verify bank account again";
|
|
859
858
|
const accountName = "Account name";
|
|
860
|
-
const
|
|
859
|
+
const mayTakeAFewDays = "May take a few days";
|
|
861
860
|
const instant = "Instant";
|
|
862
861
|
const isOurTrustedPartnerHelpingSpeedUpSetup = "%{provider} is our trusted partner helping speed up your account setup by instantly verifying your bank account.";
|
|
863
862
|
const howDoesVerificationWithOurPartnerWorks = "How does verification with our partner %{provider} work?";
|
|
@@ -1723,7 +1722,6 @@ const defaultTrans = {
|
|
|
1723
1722
|
screenshotOfOnlineBankingEnviroment,
|
|
1724
1723
|
officialEmailOrALetterFromYourBank,
|
|
1725
1724
|
check,
|
|
1726
|
-
releveDidentiteBancaire,
|
|
1727
1725
|
successFullyRemovedDecisionMaker,
|
|
1728
1726
|
failedToRemoveDecisionMaker,
|
|
1729
1727
|
chamberOfCommerceExtract,
|
|
@@ -2114,8 +2112,8 @@ const defaultTrans = {
|
|
|
2114
2112
|
enterTheDetailsYourself,
|
|
2115
2113
|
youAlsoHaveToUploadSomeSupportingDocuments,
|
|
2116
2114
|
verificationMethod,
|
|
2117
|
-
|
|
2118
|
-
|
|
2115
|
+
verifyViaMobileBankingAppOrWebsite,
|
|
2116
|
+
uploadABankStatement,
|
|
2119
2117
|
instantVerificationDescription,
|
|
2120
2118
|
couldNotEstablishBankConnection,
|
|
2121
2119
|
sorryAnErrorOccurred,
|
|
@@ -2128,7 +2126,7 @@ const defaultTrans = {
|
|
|
2128
2126
|
youSuccessfullyVerifiedAccount,
|
|
2129
2127
|
verifyBankAccountAgain,
|
|
2130
2128
|
accountName,
|
|
2131
|
-
|
|
2129
|
+
mayTakeAFewDays,
|
|
2132
2130
|
instant,
|
|
2133
2131
|
isOurTrustedPartnerHelpingSpeedUpSetup,
|
|
2134
2132
|
howDoesVerificationWithOurPartnerWorks,
|
|
@@ -10507,72 +10505,40 @@ function DocumentGuidance({
|
|
|
10507
10505
|
useEffect(() => {
|
|
10508
10506
|
setGuidancePrefix(getDocumentGuidancePrefix(type));
|
|
10509
10507
|
}, [type]);
|
|
10508
|
+
const documentGuidanceItems = useMemo(() => [{
|
|
10509
|
+
type: "valid",
|
|
10510
|
+
translationKey: "good"
|
|
10511
|
+
}, {
|
|
10512
|
+
type: "invalid-cut",
|
|
10513
|
+
translationKey: "notCutOff"
|
|
10514
|
+
}, {
|
|
10515
|
+
type: "invalid-blur",
|
|
10516
|
+
translationKey: "notBlurry"
|
|
10517
|
+
}, guidancePrefix === "generic-document" ? {
|
|
10518
|
+
type: "invalid-expired",
|
|
10519
|
+
translationKey: "notExpired"
|
|
10520
|
+
} : {
|
|
10521
|
+
type: "invalid-glare",
|
|
10522
|
+
translationKey: "noGlare"
|
|
10523
|
+
}], [guidancePrefix]);
|
|
10510
10524
|
return jsx("div", {
|
|
10511
10525
|
className: cx("adl-document-guidance", className),
|
|
10512
|
-
children:
|
|
10526
|
+
children: jsx("div", {
|
|
10513
10527
|
className: "adl-document-guidance__container",
|
|
10514
|
-
children:
|
|
10515
|
-
className: "adl-document-guidance__item",
|
|
10516
|
-
children: [jsx("svg", {
|
|
10517
|
-
width: "100%",
|
|
10518
|
-
role: "img",
|
|
10519
|
-
children: jsx("use", {
|
|
10520
|
-
href: `#adl-${guidancePrefix}-valid`
|
|
10521
|
-
})
|
|
10522
|
-
}), jsx("span", {
|
|
10523
|
-
className: "adl-document-guidance__description",
|
|
10524
|
-
children: i18n.get("good")
|
|
10525
|
-
})]
|
|
10526
|
-
}), jsxs("div", {
|
|
10527
|
-
className: "adl-document-guidance__item",
|
|
10528
|
-
children: [jsx("svg", {
|
|
10529
|
-
width: "100%",
|
|
10530
|
-
role: "img",
|
|
10531
|
-
children: jsx("use", {
|
|
10532
|
-
href: `#adl-${guidancePrefix}-invalid-cut`
|
|
10533
|
-
})
|
|
10534
|
-
}), jsx("span", {
|
|
10535
|
-
className: "adl-document-guidance__description",
|
|
10536
|
-
children: i18n.get("notCutOff")
|
|
10537
|
-
})]
|
|
10538
|
-
}), jsxs("div", {
|
|
10528
|
+
children: documentGuidanceItems.map((item) => jsxs("div", {
|
|
10539
10529
|
className: "adl-document-guidance__item",
|
|
10540
10530
|
children: [jsx("svg", {
|
|
10541
10531
|
width: "100%",
|
|
10532
|
+
height: "100%",
|
|
10542
10533
|
role: "img",
|
|
10543
10534
|
children: jsx("use", {
|
|
10544
|
-
href: `#adl-${guidancePrefix}
|
|
10535
|
+
href: `#adl-${guidancePrefix}-${item.type}`
|
|
10545
10536
|
})
|
|
10546
10537
|
}), jsx("span", {
|
|
10547
10538
|
className: "adl-document-guidance__description",
|
|
10548
|
-
children: i18n.get(
|
|
10539
|
+
children: i18n.get(item.translationKey)
|
|
10549
10540
|
})]
|
|
10550
|
-
}
|
|
10551
|
-
className: "adl-document-guidance__item",
|
|
10552
|
-
children: guidancePrefix === "generic-document" ? jsxs(Fragment, {
|
|
10553
|
-
children: [jsx("svg", {
|
|
10554
|
-
width: "100%",
|
|
10555
|
-
role: "img",
|
|
10556
|
-
children: jsx("use", {
|
|
10557
|
-
href: `#adl-${guidancePrefix}-invalid-expired`
|
|
10558
|
-
})
|
|
10559
|
-
}), jsx("span", {
|
|
10560
|
-
className: "adl-document-guidance__description",
|
|
10561
|
-
children: i18n.get("notExpired")
|
|
10562
|
-
})]
|
|
10563
|
-
}) : jsxs(Fragment, {
|
|
10564
|
-
children: [jsx("svg", {
|
|
10565
|
-
width: "100%",
|
|
10566
|
-
role: "img",
|
|
10567
|
-
children: jsx("use", {
|
|
10568
|
-
href: `#adl-${guidancePrefix}-invalid-glare`
|
|
10569
|
-
})
|
|
10570
|
-
}), jsx("span", {
|
|
10571
|
-
className: "adl-document-guidance__description",
|
|
10572
|
-
children: i18n.get("noGlare")
|
|
10573
|
-
})]
|
|
10574
|
-
})
|
|
10575
|
-
})]
|
|
10541
|
+
}, item.type))
|
|
10576
10542
|
})
|
|
10577
10543
|
});
|
|
10578
10544
|
}
|
|
@@ -11104,7 +11070,8 @@ function ListItem({
|
|
|
11104
11070
|
const ADDRESS_SCHEMA = ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
|
|
11105
11071
|
const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
|
|
11106
11072
|
const COUNTRIES_WITH_STATES_DATASET = [CountryCodes.Australia, CountryCodes.Brazil, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates];
|
|
11107
|
-
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
|
|
11073
|
+
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom, CountryCodes.France];
|
|
11074
|
+
const COUNTRIES_WITH_COMMA_SEPARATED = [CountryCodes.Spain];
|
|
11108
11075
|
const ADDRESS_SCHEMAS = {
|
|
11109
11076
|
[CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
|
|
11110
11077
|
[CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
|
|
@@ -12018,8 +11985,12 @@ function Address(props) {
|
|
|
12018
11985
|
houseNumberOrName,
|
|
12019
11986
|
street: street2
|
|
12020
11987
|
}) => {
|
|
12021
|
-
const
|
|
12022
|
-
const
|
|
11988
|
+
const isHouseNumberFirst = COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country);
|
|
11989
|
+
const needsComma = COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country);
|
|
11990
|
+
let formattedAddress = isHouseNumberFirst ? `${houseNumberOrName} ${street2}` : `${street2} ${houseNumberOrName}`;
|
|
11991
|
+
if (needsComma) {
|
|
11992
|
+
formattedAddress = formattedAddress.replace(" ", ", ");
|
|
11993
|
+
}
|
|
12023
11994
|
handleChangeFor("address", "input")(formattedAddress);
|
|
12024
11995
|
};
|
|
12025
11996
|
const setFieldsData = (address2, field) => {
|
|
@@ -17149,7 +17120,6 @@ var BankDocumentTypes = /* @__PURE__ */ ((BankDocumentTypes2) => {
|
|
|
17149
17120
|
BankDocumentTypes2["SCREENSHOT_OF_BANK"] = "screenshotOfOnlineBankingEnviroment";
|
|
17150
17121
|
BankDocumentTypes2["OFFICIAL_EMAIL"] = "officialEmailOrALetterFromYourBank";
|
|
17151
17122
|
BankDocumentTypes2["CHECK"] = "check";
|
|
17152
|
-
BankDocumentTypes2["RELEVE_DIDENTITE"] = "releveDidentiteBancaire";
|
|
17153
17123
|
return BankDocumentTypes2;
|
|
17154
17124
|
})(BankDocumentTypes || {});
|
|
17155
17125
|
const bankDocumentOptions = [{
|
|
@@ -17167,9 +17137,6 @@ const bankDocumentOptions = [{
|
|
|
17167
17137
|
}, {
|
|
17168
17138
|
id: "check",
|
|
17169
17139
|
name: "check"
|
|
17170
|
-
}, {
|
|
17171
|
-
id: "releveDidentiteBancaire",
|
|
17172
|
-
name: "releveDidentiteBancaire"
|
|
17173
17140
|
}];
|
|
17174
17141
|
var BankDocumentRequirement = /* @__PURE__ */ ((BankDocumentRequirement2) => {
|
|
17175
17142
|
BankDocumentRequirement2["ACCOUNT_NAME_INDIVIDUAL"] = "bankAccountNameIndividual";
|
|
@@ -17420,19 +17387,13 @@ function BankDocument(props) {
|
|
|
17420
17387
|
}
|
|
17421
17388
|
});
|
|
17422
17389
|
}, [data, valid, errors, fieldProblems]);
|
|
17423
|
-
const getBankDocumentOptions = () => {
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
|
|
17427
|
-
|
|
17428
|
-
|
|
17429
|
-
|
|
17430
|
-
name
|
|
17431
|
-
}) => ({
|
|
17432
|
-
id: id2,
|
|
17433
|
-
name: i18n.get(name)
|
|
17434
|
-
}));
|
|
17435
|
-
};
|
|
17390
|
+
const getBankDocumentOptions = () => bankDocumentOptions.map(({
|
|
17391
|
+
id: id2,
|
|
17392
|
+
name
|
|
17393
|
+
}) => ({
|
|
17394
|
+
id: id2,
|
|
17395
|
+
name: i18n.get(name)
|
|
17396
|
+
}));
|
|
17436
17397
|
const documentsModifiers = useMemo(() => {
|
|
17437
17398
|
var _a2, _b2;
|
|
17438
17399
|
return {
|
|
@@ -19436,7 +19397,7 @@ const regions = {
|
|
|
19436
19397
|
const getAllowedBankCountries = (country2) => Object.values(regions).find((countriesInARegion) => countriesInARegion.includes(country2)) ?? [country2];
|
|
19437
19398
|
const makePayoutVerificationMethodsMetadata = (svgPath, instantVerificationProvider) => ({
|
|
19438
19399
|
instantVerification: {
|
|
19439
|
-
name: "
|
|
19400
|
+
name: "verifyViaMobileBankingAppOrWebsite",
|
|
19440
19401
|
subtitle: "instant",
|
|
19441
19402
|
description: "instantVerificationDescription",
|
|
19442
19403
|
iconComponentDesktop: `${svgPath}/instant-verification-desktop.svg`,
|
|
@@ -19447,8 +19408,8 @@ const makePayoutVerificationMethodsMetadata = (svgPath, instantVerificationProvi
|
|
|
19447
19408
|
} : void 0
|
|
19448
19409
|
},
|
|
19449
19410
|
manualVerification: {
|
|
19450
|
-
name: "
|
|
19451
|
-
subtitle: "
|
|
19411
|
+
name: "uploadABankStatement",
|
|
19412
|
+
subtitle: "mayTakeAFewDays",
|
|
19452
19413
|
description: "manualVerificationDescription",
|
|
19453
19414
|
iconComponentDesktop: `${svgPath}/manual-verification-desktop.svg`,
|
|
19454
19415
|
iconComponentMobile: `${svgPath}/manual-verification-mobile.svg`
|
|
@@ -20310,6 +20271,11 @@ const PER_COUNTRY_DECISION_MAKER_REQUIREMENTS_OVERRIDES = {
|
|
|
20310
20271
|
roleTypes: [DecisionMakerType.DIRECTOR],
|
|
20311
20272
|
min: 1,
|
|
20312
20273
|
max: Infinity
|
|
20274
|
+
}],
|
|
20275
|
+
GB: [...DEFAULT_DECISION_MAKER_REQUIREMENTS, {
|
|
20276
|
+
roleTypes: [DecisionMakerType.DIRECTOR],
|
|
20277
|
+
min: 1,
|
|
20278
|
+
max: Infinity
|
|
20313
20279
|
}]
|
|
20314
20280
|
};
|
|
20315
20281
|
const getDecisionMakerRequirements = (country2) => {
|
|
@@ -33703,7 +33669,7 @@ const ConfigurationApiProvider = ({
|
|
|
33703
33669
|
isEmbeddedDropin,
|
|
33704
33670
|
loadingContext
|
|
33705
33671
|
} = authContext;
|
|
33706
|
-
const sdkVersion = "2.
|
|
33672
|
+
const sdkVersion = "2.42.0";
|
|
33707
33673
|
useAnalytics({
|
|
33708
33674
|
onUserEvent,
|
|
33709
33675
|
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
|
+
}
|