@adyen/kyc-components 2.12.0 → 2.13.1
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 +148 -86
- package/dist/style.css +4 -2
- package/dist/types/components/TaskIntros/TaskIntro.d.ts +2 -2
- package/dist/types/components/TaskIntros/types.d.ts +1 -1
- package/dist/types/components/TrustRegistrationDetails/types.d.ts +1 -0
- package/dist/types/components/internal/Address/utils.d.ts +1 -1
- package/dist/types/core/Context/ExperimentContext/types.d.ts +11 -3
- package/dist/types/core/Context/SettingsContext/types.d.ts +14 -10
- package/dist/types/core/models/api/legal-arrangement.d.ts +1 -0
- package/dist/types/core/models/api/trust-types-value.d.ts +1 -1
- package/dist/types/language/config.d.ts +14 -13
- package/dist/types/utils/decision-maker-roles.d.ts +1 -1
- package/dist/types/utils/entity-status-util.d.ts +2 -2
- package/dist/types/utils/formatting/stripNonAlphanumeric.d.ts +1 -0
- package/dist/types/utils/isValueMasked.d.ts +1 -0
- package/dist/types/utils/trust-util.d.ts +1 -1
- package/package.json +1 -1
|
@@ -149,7 +149,8 @@ const entityType = "Entity type";
|
|
|
149
149
|
const registrationDetails = "Registration details";
|
|
150
150
|
const registeredAddress = "Registered address";
|
|
151
151
|
const registrationAddress = "Registration address";
|
|
152
|
-
const registeredAddressHeaderDescription = "The address
|
|
152
|
+
const registeredAddressHeaderDescription = "The address as it appears on your company's official registration documents.";
|
|
153
|
+
const registeredAddressHeaderDescription__NL = "The address registered to your company with the Chamber of Commerce.";
|
|
153
154
|
const registeredAddressHeaderDescription__US = "Your address as it appears on your Secretary of State Registration.";
|
|
154
155
|
const registeredAddressTrustHeaderDescription = "The address registered to your trust";
|
|
155
156
|
const operationalAddress = "Operational address";
|
|
@@ -224,9 +225,10 @@ const byClickingSubmitReview = "By clicking 'Submit review', you confirm that al
|
|
|
224
225
|
const nameAndCountry = "Name and country";
|
|
225
226
|
const companyCountry = "Where is your business located?";
|
|
226
227
|
const legalCompanyName = "Legal name of the company";
|
|
227
|
-
const legalCompanyNameHelper = "Enter the name exactly as it is on your
|
|
228
|
+
const legalCompanyNameHelper = "Enter the name exactly as it is on your company's official registration documents.";
|
|
228
229
|
const legalCompanyNameHelper__AU = "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC)";
|
|
229
|
-
const
|
|
230
|
+
const legalCompanyNameHelper__NL = "Enter the name exactly as it is on your Chamber of Commerce registration.";
|
|
231
|
+
const legalCompanyNameHelper__US = "Enter the name exactly as it is on on your Secretary of State registration.";
|
|
230
232
|
const legalCompanyNameHelper__SG = "Enter the name exactly as it is on your Accounting and Corporate Regulatory Authority (ACRA) BizFile";
|
|
231
233
|
const legalCompanyNameHelper__HK = "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation";
|
|
232
234
|
const accountDetailsDescription = "Provide a few details about you to start accepting live payments.";
|
|
@@ -505,6 +507,9 @@ const unlistedPublicUnitTrust = "Unlisted public unit trust";
|
|
|
505
507
|
const countryOfEstablishment = "Country of establishment";
|
|
506
508
|
const nameOfTrustAgreement = "Name of trust agreement";
|
|
507
509
|
const typeOfTrustAgreement = "Type of trust agreement";
|
|
510
|
+
const objectOfCharitableTrust = "Object of charitable trust";
|
|
511
|
+
const objectOfTrust = "Object of trust";
|
|
512
|
+
const pleaseProvideThePurposeOfCharitableTrust = "Please provide the purpose of your charitable trust";
|
|
508
513
|
const weFoundTheFollowingIssues = "We found the following issues:";
|
|
509
514
|
const reviewTheInformationBelowAndCorrectMistakesOr = "Review the information below and correct any mistakes, or";
|
|
510
515
|
const uploadTheRequestedDocuments = "upload the requested documents";
|
|
@@ -1039,35 +1044,31 @@ const firstNameOfSettlor = "First name of settlor";
|
|
|
1039
1044
|
const lastNameOfSettlor = "Last name of settlor";
|
|
1040
1045
|
const enterSettlorsFirstNameExactlyAsItAppearsInID = "Enter the settlor's first name(s) exactly as it appears on their identity document";
|
|
1041
1046
|
const enterSettlorsLastNameExactlyAsItAppearsInID = "Enter the settlor's last name(s) exactly as it appears on their identity document";
|
|
1042
|
-
const taskIntroPrologueTitle = "Before you
|
|
1043
|
-
const taskIntroPrologueDescriptionP1 = "
|
|
1044
|
-
const taskIntroPrologueDescriptionP2 = "
|
|
1047
|
+
const taskIntroPrologueTitle = "Before you begin...";
|
|
1048
|
+
const taskIntroPrologueDescriptionP1 = "We'll ask for some details about your business as part of financial regulations.";
|
|
1049
|
+
const taskIntroPrologueDescriptionP2 = "Our advice? Have these details on hand so you can get verified quickly.";
|
|
1045
1050
|
const taskIntroCompanyTitle = "Company details";
|
|
1046
|
-
const taskIntroCompanyDescriptionP1 = "
|
|
1047
|
-
const taskIntroCompanyDescriptionP2 = "
|
|
1048
|
-
const
|
|
1049
|
-
const
|
|
1050
|
-
const
|
|
1051
|
-
const
|
|
1052
|
-
const
|
|
1053
|
-
const
|
|
1054
|
-
const
|
|
1055
|
-
const taskIntroIndividualTitle = "
|
|
1056
|
-
const taskIntroIndividualDescriptionP1 = "
|
|
1057
|
-
const taskIntroIndividualDescriptionP2 = "
|
|
1058
|
-
const taskIntroIndividualDescriptionP3 = "For the ID you can choose:";
|
|
1051
|
+
const taskIntroCompanyDescriptionP1 = "For example, your company name and registration number.";
|
|
1052
|
+
const taskIntroCompanyDescriptionP2 = "Where to find this information";
|
|
1053
|
+
const taskIntroCompanyDescriptionLI1 = "Your company registration document";
|
|
1054
|
+
const taskIntroDecisionMakerTitle = "Decision-makers";
|
|
1055
|
+
const taskIntroDecisionMakerDescriptionP1 = "For example, the name and address of important people in your company.";
|
|
1056
|
+
const taskIntroDecisionMakerDescriptionP2 = "Where to find this information";
|
|
1057
|
+
const taskIntroDecisionMakerDescriptionLI1 = "Driver's license";
|
|
1058
|
+
const taskIntroDecisionMakerDescriptionLI2 = "Passport";
|
|
1059
|
+
const taskIntroDecisionMakerDescriptionLI3 = "ID document";
|
|
1060
|
+
const taskIntroIndividualTitle = "Personal details";
|
|
1061
|
+
const taskIntroIndividualDescriptionP1 = "For example, your name and residential address.";
|
|
1062
|
+
const taskIntroIndividualDescriptionP2 = "Where to find this information";
|
|
1059
1063
|
const taskIntroIndividualDescriptionLI1 = "Driver's license";
|
|
1060
1064
|
const taskIntroIndividualDescriptionLI2 = "Passport";
|
|
1061
1065
|
const taskIntroIndividualDescriptionLI3 = "ID document";
|
|
1062
|
-
const taskIntroPayoutTitle = "
|
|
1063
|
-
const
|
|
1064
|
-
const
|
|
1065
|
-
const taskIntroPayoutIndividualDescriptionP1 = "We'll have to verify the details of the bank account where we'll be sending the funds.";
|
|
1066
|
-
const taskIntroPayoutIndividualDescriptionP2 = "This account should be in your name.";
|
|
1066
|
+
const taskIntroPayoutTitle = "Bank account details";
|
|
1067
|
+
const taskIntroPayoutDescriptionP1 = "For example, the account holder name and account number.";
|
|
1068
|
+
const taskIntroPayoutDescriptionP2 = "This is the bank account you use to send or receive funds.";
|
|
1067
1069
|
const taskIntroEpilogueTitle = "Why do we need this information?";
|
|
1068
|
-
const taskIntroEpilogueDescriptionP1 = "We
|
|
1069
|
-
const taskIntroEpilogueDescriptionP2 = "
|
|
1070
|
-
const taskIntroEpilogueDescriptionP3 = "We'll use your information exclusively for these purposes.";
|
|
1070
|
+
const taskIntroEpilogueDescriptionP1 = "We check all this information against official records to verify your identity and comply with financial regulations.";
|
|
1071
|
+
const taskIntroEpilogueDescriptionP2 = "Your information will be used only for these purposes.";
|
|
1071
1072
|
const defaultTrans = {
|
|
1072
1073
|
close,
|
|
1073
1074
|
individual,
|
|
@@ -1206,6 +1207,7 @@ const defaultTrans = {
|
|
|
1206
1207
|
registeredAddress,
|
|
1207
1208
|
registrationAddress,
|
|
1208
1209
|
registeredAddressHeaderDescription,
|
|
1210
|
+
registeredAddressHeaderDescription__NL,
|
|
1209
1211
|
registeredAddressHeaderDescription__US,
|
|
1210
1212
|
registeredAddressTrustHeaderDescription,
|
|
1211
1213
|
operationalAddress,
|
|
@@ -1282,6 +1284,7 @@ const defaultTrans = {
|
|
|
1282
1284
|
legalCompanyName,
|
|
1283
1285
|
legalCompanyNameHelper,
|
|
1284
1286
|
legalCompanyNameHelper__AU,
|
|
1287
|
+
legalCompanyNameHelper__NL,
|
|
1285
1288
|
legalCompanyNameHelper__US,
|
|
1286
1289
|
legalCompanyNameHelper__SG,
|
|
1287
1290
|
legalCompanyNameHelper__HK,
|
|
@@ -1566,6 +1569,9 @@ const defaultTrans = {
|
|
|
1566
1569
|
countryOfEstablishment,
|
|
1567
1570
|
nameOfTrustAgreement,
|
|
1568
1571
|
typeOfTrustAgreement,
|
|
1572
|
+
objectOfCharitableTrust,
|
|
1573
|
+
objectOfTrust,
|
|
1574
|
+
pleaseProvideThePurposeOfCharitableTrust,
|
|
1569
1575
|
weFoundTheFollowingIssues,
|
|
1570
1576
|
reviewTheInformationBelowAndCorrectMistakesOr,
|
|
1571
1577
|
uploadTheRequestedDocuments,
|
|
@@ -2118,29 +2124,25 @@ const defaultTrans = {
|
|
|
2118
2124
|
taskIntroCompanyTitle,
|
|
2119
2125
|
taskIntroCompanyDescriptionP1,
|
|
2120
2126
|
taskIntroCompanyDescriptionP2,
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2127
|
+
taskIntroCompanyDescriptionLI1,
|
|
2128
|
+
taskIntroDecisionMakerTitle,
|
|
2129
|
+
taskIntroDecisionMakerDescriptionP1,
|
|
2130
|
+
taskIntroDecisionMakerDescriptionP2,
|
|
2131
|
+
taskIntroDecisionMakerDescriptionLI1,
|
|
2132
|
+
taskIntroDecisionMakerDescriptionLI2,
|
|
2133
|
+
taskIntroDecisionMakerDescriptionLI3,
|
|
2128
2134
|
taskIntroIndividualTitle,
|
|
2129
2135
|
taskIntroIndividualDescriptionP1,
|
|
2130
2136
|
taskIntroIndividualDescriptionP2,
|
|
2131
|
-
taskIntroIndividualDescriptionP3,
|
|
2132
2137
|
taskIntroIndividualDescriptionLI1,
|
|
2133
2138
|
taskIntroIndividualDescriptionLI2,
|
|
2134
2139
|
taskIntroIndividualDescriptionLI3,
|
|
2135
2140
|
taskIntroPayoutTitle,
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
taskIntroPayoutIndividualDescriptionP1,
|
|
2139
|
-
taskIntroPayoutIndividualDescriptionP2,
|
|
2141
|
+
taskIntroPayoutDescriptionP1,
|
|
2142
|
+
taskIntroPayoutDescriptionP2,
|
|
2140
2143
|
taskIntroEpilogueTitle,
|
|
2141
2144
|
taskIntroEpilogueDescriptionP1,
|
|
2142
|
-
taskIntroEpilogueDescriptionP2
|
|
2143
|
-
taskIntroEpilogueDescriptionP3
|
|
2145
|
+
taskIntroEpilogueDescriptionP2
|
|
2144
2146
|
};
|
|
2145
2147
|
const FALLBACK_LOCALE = "en-US";
|
|
2146
2148
|
const defaultTranslation = defaultTrans;
|
|
@@ -7504,13 +7506,10 @@ const FLOWS_THAT_HIDE_REGISTRATION_NUMBER = [{
|
|
|
7504
7506
|
const companyRegistrationDetailsFields = ["tradingName", "sameNameAsLegalName", ...businessRegistrationNumberFields, "stockExchangeMIC", "stockISIN", ...vatNumberFields, ...taxIdFields, "dateOfIncorporation"];
|
|
7505
7507
|
function CompanyRegistrationDetailsComponent(props) {
|
|
7506
7508
|
var _a, _b;
|
|
7507
|
-
const {
|
|
7508
|
-
contextCountry
|
|
7509
|
-
} = useCoreContext();
|
|
7510
7509
|
const {
|
|
7511
7510
|
i18n
|
|
7512
7511
|
} = useI18nContext();
|
|
7513
|
-
const hideOptionalRegistrationNumberField = FLOWS_THAT_HIDE_REGISTRATION_NUMBER.some((f) => f.country ===
|
|
7512
|
+
const hideOptionalRegistrationNumberField = FLOWS_THAT_HIDE_REGISTRATION_NUMBER.some((f) => f.country === props.country && f.companyType.includes(props.companyType));
|
|
7514
7513
|
const stateRef = useRef({
|
|
7515
7514
|
setState: null
|
|
7516
7515
|
});
|
|
@@ -8215,6 +8214,9 @@ const countryConfig$4 = {
|
|
|
8215
8214
|
registrationNumber: {
|
|
8216
8215
|
label: "chamberOfCommerceRegistrationNumber"
|
|
8217
8216
|
},
|
|
8217
|
+
legalCompanyName: {
|
|
8218
|
+
helperText: "legalCompanyNameHelper__NL"
|
|
8219
|
+
},
|
|
8218
8220
|
exemptedFromVat: {
|
|
8219
8221
|
label: "vatNumberExempted"
|
|
8220
8222
|
},
|
|
@@ -8443,6 +8445,9 @@ const trustBase = {
|
|
|
8443
8445
|
trustType: {
|
|
8444
8446
|
rule: "REQUIRED"
|
|
8445
8447
|
},
|
|
8448
|
+
objectOfTrust: {
|
|
8449
|
+
rule: "trustTypeHasDescription"
|
|
8450
|
+
},
|
|
8446
8451
|
legalName: {
|
|
8447
8452
|
rule: "REQUIRED"
|
|
8448
8453
|
},
|
|
@@ -10826,9 +10831,6 @@ const CompanyRegistrationDocumentFormID = companyForms.companyRegistrationDocume
|
|
|
10826
10831
|
const CompanyTaxDocumentFormID = companyForms.companyTaxDocument.formId;
|
|
10827
10832
|
const companyDocumentForms = [CompanyRegistrationDocumentFormID, CompanyTaxDocumentFormID];
|
|
10828
10833
|
function CompanyComponent(props) {
|
|
10829
|
-
const {
|
|
10830
|
-
contextCountry
|
|
10831
|
-
} = useCoreContext();
|
|
10832
10834
|
const {
|
|
10833
10835
|
i18n
|
|
10834
10836
|
} = useI18nContext();
|
|
@@ -10892,7 +10894,7 @@ function CompanyComponent(props) {
|
|
|
10892
10894
|
...companyRegistrationAddressFormProps,
|
|
10893
10895
|
heading: i18n.get("registeredAddress"),
|
|
10894
10896
|
description: i18n.get("registeredAddressHeaderDescription", {
|
|
10895
|
-
localizeFor:
|
|
10897
|
+
localizeFor: props.country
|
|
10896
10898
|
}),
|
|
10897
10899
|
id: CompanyRegistrationAddressFormID,
|
|
10898
10900
|
country: props.country,
|
|
@@ -11432,7 +11434,7 @@ const hasMinRequiredDecisionMakerCount = (legalEntityResponse) => {
|
|
|
11432
11434
|
var TrustTypes = /* @__PURE__ */ ((TrustTypes2) => {
|
|
11433
11435
|
TrustTypes2["BUSINESS_TRUST"] = "businessTrust";
|
|
11434
11436
|
TrustTypes2["CASH_MANAGEMENT_TRUST"] = "cashManagementTrust";
|
|
11435
|
-
TrustTypes2["
|
|
11437
|
+
TrustTypes2["CHARITABLE_TRUST"] = "charitableTrust";
|
|
11436
11438
|
TrustTypes2["CORPORATE_UNIT_TRUST"] = "corporateUnitTrust";
|
|
11437
11439
|
TrustTypes2["DECEASED_ESTATE"] = "deceasedEstate";
|
|
11438
11440
|
TrustTypes2["DISCRETIONARY_INVESTMENT_TRUST"] = "discretionaryInvestmentTrust";
|
|
@@ -11458,7 +11460,7 @@ const trustTypeOptions = [{
|
|
|
11458
11460
|
id: TrustTypes.CASH_MANAGEMENT_TRUST,
|
|
11459
11461
|
name: "cashManagementTrust"
|
|
11460
11462
|
}, {
|
|
11461
|
-
id: TrustTypes.
|
|
11463
|
+
id: TrustTypes.CHARITABLE_TRUST,
|
|
11462
11464
|
name: "charitableTrust"
|
|
11463
11465
|
}, {
|
|
11464
11466
|
id: TrustTypes.CORPORATE_UNIT_TRUST,
|
|
@@ -11509,7 +11511,7 @@ const trustTypeOptions = [{
|
|
|
11509
11511
|
id: TrustTypes.UNLISTED_PUBLIC_UNIT_TRUST,
|
|
11510
11512
|
name: "unlistedPublicUnitTrust"
|
|
11511
11513
|
}];
|
|
11512
|
-
const nzSpecificTrustTypes = [TrustTypes.DISCRETIONARY_TRUST, TrustTypes.FAMILY_TRUST, TrustTypes.
|
|
11514
|
+
const nzSpecificTrustTypes = [TrustTypes.DISCRETIONARY_TRUST, TrustTypes.FAMILY_TRUST, TrustTypes.CHARITABLE_TRUST, TrustTypes.BUSINESS_TRUST, TrustTypes.OTHER_TRUST];
|
|
11513
11515
|
const auSpecificTrustTypes = [TrustTypes.CASH_MANAGEMENT_TRUST, TrustTypes.CORPORATE_UNIT_TRUST, TrustTypes.DECEASED_ESTATE, TrustTypes.DISCRETIONARY_INVESTMENT_TRUST, TrustTypes.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST, TrustTypes.DISCRETIONARY_TRADING_TRUST, TrustTypes.FIRST_HOME_SAVER_ACCOUNTS_TRUST, TrustTypes.FIXED_TRUST, TrustTypes.FIXED_UNIT_TRUST, TrustTypes.HYBRID_TRUST, TrustTypes.LISTED_PUBLIC_UNIT_TRUST, TrustTypes.OTHER_TRUST, TrustTypes.POOLED_SUPERANNUATION_TRUST, TrustTypes.PUBLIC_TRADING_TRUST, TrustTypes.UNLISTED_PUBLIC_UNIT_TRUST];
|
|
11514
11516
|
const countryToTrustTypes = {
|
|
11515
11517
|
[CountryCodes.Australia]: auSpecificTrustTypes,
|
|
@@ -12216,12 +12218,15 @@ const mapCompanyToLegalEntity = (data) => {
|
|
|
12216
12218
|
return requestObj;
|
|
12217
12219
|
};
|
|
12218
12220
|
const mapLegalEntityToTrust = (legalEntity) => {
|
|
12219
|
-
var _a, _b, _c;
|
|
12221
|
+
var _a, _b, _c, _d;
|
|
12220
12222
|
let trustCompData;
|
|
12221
12223
|
if (legalEntity == null ? void 0 : legalEntity.trust) {
|
|
12222
12224
|
trustCompData = formatObject(legalEntity, trustComponentsKeyMapping);
|
|
12223
12225
|
trustCompData.trustRegistrationDetails.country = legalEntity.trust.countryOfGoverningLaw;
|
|
12224
|
-
if ((_a = legalEntity.trust) == null ? void 0 : _a.
|
|
12226
|
+
if ((_a = legalEntity.trust) == null ? void 0 : _a.description) {
|
|
12227
|
+
trustCompData.trustRegistrationDetails.objectOfTrust = legalEntity.trust.description;
|
|
12228
|
+
}
|
|
12229
|
+
if ((_b = legalEntity.trust) == null ? void 0 : _b.principalPlaceOfBusiness) {
|
|
12225
12230
|
trustCompData.trustRegistrationAddress.operationalAddressIsSame = operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME;
|
|
12226
12231
|
} else {
|
|
12227
12232
|
if (!trustCompData.trustRegistrationAddress) {
|
|
@@ -12236,10 +12241,10 @@ const mapLegalEntityToTrust = (legalEntity) => {
|
|
|
12236
12241
|
const {
|
|
12237
12242
|
country: country2
|
|
12238
12243
|
} = legalEntity.trust.registeredAddress;
|
|
12239
|
-
trustCompData.trustRegistrationDetails.taxId = (
|
|
12244
|
+
trustCompData.trustRegistrationDetails.taxId = (_c = taxInformation.find((info) => info.country === country2)) == null ? void 0 : _c.number;
|
|
12240
12245
|
trustCompData.trustRegistrationDetails.exemptedFromTax = false;
|
|
12241
12246
|
}
|
|
12242
|
-
if ((
|
|
12247
|
+
if ((_d = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _d.length) {
|
|
12243
12248
|
trustCompData = {
|
|
12244
12249
|
...trustCompData,
|
|
12245
12250
|
...mapApiDocumentToTrustDocument(legalEntity == null ? void 0 : legalEntity.id)
|
|
@@ -12249,6 +12254,7 @@ const mapLegalEntityToTrust = (legalEntity) => {
|
|
|
12249
12254
|
return trustCompData;
|
|
12250
12255
|
};
|
|
12251
12256
|
const mapTrustToLegalEntity = (data) => {
|
|
12257
|
+
var _a;
|
|
12252
12258
|
const requestObj = {
|
|
12253
12259
|
...formatObject(data, trustApiKeyMapping)
|
|
12254
12260
|
};
|
|
@@ -12259,6 +12265,9 @@ const mapTrustToLegalEntity = (data) => {
|
|
|
12259
12265
|
entity: requestObj.trust
|
|
12260
12266
|
});
|
|
12261
12267
|
}
|
|
12268
|
+
if ((_a = data.trustRegistrationDetails) == null ? void 0 : _a.objectOfTrust) {
|
|
12269
|
+
requestObj.trust.description = data.trustRegistrationDetails.objectOfTrust;
|
|
12270
|
+
}
|
|
12262
12271
|
requestObj.type = LegalEntityType.TRUST;
|
|
12263
12272
|
return requestObj;
|
|
12264
12273
|
};
|
|
@@ -16931,11 +16940,24 @@ function BankAccountFormat(props) {
|
|
|
16931
16940
|
})
|
|
16932
16941
|
});
|
|
16933
16942
|
}
|
|
16943
|
+
var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
|
|
16944
|
+
ExperimentNames2["EnableTrustFlow"] = "EnableTrustFlow";
|
|
16945
|
+
ExperimentNames2["OnlyAllowAlphanumericBankAccountNumbers"] = "OnlyAllowAlphanumericBankAccountNumbers";
|
|
16946
|
+
return ExperimentNames2;
|
|
16947
|
+
})(ExperimentNames || {});
|
|
16948
|
+
const stripNonAlphanumeric = (value) => value.replaceAll(/[^0-9a-zA-Z]/g, "");
|
|
16949
|
+
const isValueMasked = (value) => {
|
|
16950
|
+
var _a;
|
|
16951
|
+
return typeof value === "string" && !!((_a = value.match(/[*]{2,}/)) == null ? void 0 : _a.length);
|
|
16952
|
+
};
|
|
16934
16953
|
const bankAccountNumberFields = ["bankAccountNumber"];
|
|
16935
16954
|
function BankAccountNumber(props) {
|
|
16936
16955
|
const {
|
|
16937
16956
|
i18n
|
|
16938
16957
|
} = useI18nContext();
|
|
16958
|
+
const {
|
|
16959
|
+
isExperimentEnabled
|
|
16960
|
+
} = useExperimentsContext();
|
|
16939
16961
|
const {
|
|
16940
16962
|
dataStoreId,
|
|
16941
16963
|
validators
|
|
@@ -16956,6 +16978,11 @@ function BankAccountNumber(props) {
|
|
|
16956
16978
|
rules: validators,
|
|
16957
16979
|
defaultData: props.data,
|
|
16958
16980
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors,
|
|
16981
|
+
formatters: {
|
|
16982
|
+
bankAccountNumber: isExperimentEnabled(ExperimentNames.OnlyAllowAlphanumericBankAccountNumbers) ? {
|
|
16983
|
+
formatter: (v) => v && !isValueMasked(v) ? stripNonAlphanumeric(v) : v
|
|
16984
|
+
} : void 0
|
|
16985
|
+
},
|
|
16959
16986
|
maskedFields: props.maskedFields
|
|
16960
16987
|
});
|
|
16961
16988
|
useEffect(() => {
|
|
@@ -16976,22 +17003,22 @@ function BankAccountNumber(props) {
|
|
|
16976
17003
|
children: [jsx(StateContextSetter, {
|
|
16977
17004
|
stateRef
|
|
16978
17005
|
}), jsx(Field, {
|
|
16979
|
-
name: "bankAccountNumber",
|
|
16980
|
-
label: formUtils.getLabel("bankAccountNumber"),
|
|
16981
17006
|
classNameModifiers: ["bankAccountNumber"],
|
|
16982
17007
|
errorMessage: formUtils.getErrorMessage("bankAccountNumber", errors, fieldProblems) || "",
|
|
16983
17008
|
isValid: valid.bankAccountNumber,
|
|
17009
|
+
label: formUtils.getLabel("bankAccountNumber"),
|
|
17010
|
+
name: "bankAccountNumber",
|
|
16984
17011
|
children: (childProps) => jsx(InputText, {
|
|
16985
17012
|
...childProps,
|
|
16986
|
-
name: "bankAccountNumber",
|
|
16987
|
-
value: data.bankAccountNumber,
|
|
16988
|
-
readonly: formUtils.isReadOnly("bankAccountNumber"),
|
|
16989
|
-
classNameModifiers: ["bankAccountNumber"],
|
|
16990
|
-
onInput: handleChangeFor("bankAccountNumber", "input"),
|
|
16991
|
-
onBlur: handleChangeFor("bankAccountNumber", "blur"),
|
|
16992
17013
|
"aria-required": true,
|
|
17014
|
+
"aria-invalid": !valid.bankAccountNumber,
|
|
16993
17015
|
"aria-label": formUtils.getLabel("bankAccountNumber"),
|
|
16994
|
-
|
|
17016
|
+
classNameModifiers: ["bankAccountNumber"],
|
|
17017
|
+
name: "bankAccountNumber",
|
|
17018
|
+
onBlur: handleChangeFor("bankAccountNumber", "blur"),
|
|
17019
|
+
onInput: handleChangeFor("bankAccountNumber", "input"),
|
|
17020
|
+
readonly: formUtils.isReadOnly("bankAccountNumber"),
|
|
17021
|
+
value: data.bankAccountNumber
|
|
16995
17022
|
})
|
|
16996
17023
|
})]
|
|
16997
17024
|
});
|
|
@@ -18636,13 +18663,17 @@ const trustRegistrationDetailsValidations = {
|
|
|
18636
18663
|
modes: ["blur"],
|
|
18637
18664
|
validate: (legalName) => !!legalName,
|
|
18638
18665
|
errorMessage: "fieldIsRequired"
|
|
18666
|
+
},
|
|
18667
|
+
objectOfTrust: {
|
|
18668
|
+
modes: ["blur"],
|
|
18669
|
+
validate: (objectOfTrust2) => !!objectOfTrust2,
|
|
18670
|
+
errorMessage: "fieldIsRequired"
|
|
18639
18671
|
}
|
|
18640
18672
|
};
|
|
18641
|
-
const trustRegistrationDetailsFields = ["legalName", "country", "trustType", "taxId", "registrationNumber"];
|
|
18673
|
+
const trustRegistrationDetailsFields = ["legalName", "country", "trustType", "objectOfTrust", "taxId", "registrationNumber"];
|
|
18642
18674
|
const ALLOWED_TRUST_COUNTRIES = [CountryCodes.Australia, CountryCodes.NewZealand];
|
|
18643
18675
|
function TrustRegistrationDetailsComponent(props) {
|
|
18644
18676
|
var _a;
|
|
18645
|
-
console.log("TrustRegistrationDetailsComponent props", props);
|
|
18646
18677
|
const {
|
|
18647
18678
|
country: country2,
|
|
18648
18679
|
onCountryChange
|
|
@@ -18655,7 +18686,8 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18655
18686
|
setState: null
|
|
18656
18687
|
});
|
|
18657
18688
|
const requiredFieldsByTask = trustRegistrationDetailsFields;
|
|
18658
|
-
const
|
|
18689
|
+
const requiredFields = props.requiredFields ?? requiredFieldsByTask;
|
|
18690
|
+
const directChildFields = requiredFields.filter((field) => ["trustType", "objectOfTrust", "legalName", "country", "taxId", "registrationNumber"].includes(field));
|
|
18659
18691
|
const {
|
|
18660
18692
|
handleChangeFor,
|
|
18661
18693
|
data,
|
|
@@ -18686,10 +18718,16 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18686
18718
|
fieldProblems,
|
|
18687
18719
|
caller: TRUST_REGISTRATION_DETAILS,
|
|
18688
18720
|
dataStoreId: TRUST_REGISTRATION_DETAILS,
|
|
18689
|
-
schema:
|
|
18721
|
+
schema: requiredFields
|
|
18690
18722
|
}
|
|
18691
18723
|
});
|
|
18692
18724
|
}, [data, valid, errors]);
|
|
18725
|
+
const changeTrustType = (e) => {
|
|
18726
|
+
handleChangeFor("trustType", "blur")(e);
|
|
18727
|
+
if (e.target.value !== TrustTypes.CHARITABLE_TRUST) {
|
|
18728
|
+
setData("objectOfTrust", void 0);
|
|
18729
|
+
}
|
|
18730
|
+
};
|
|
18693
18731
|
const taxIdProps = getFieldProps(props, taxIdFields);
|
|
18694
18732
|
const trustTypeOptions2 = getCountrySpecificTrustTypeOptions(country2) ?? [];
|
|
18695
18733
|
const registrationNumberProps = getFieldProps(props, businessRegistrationNumberFields);
|
|
@@ -18748,7 +18786,7 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18748
18786
|
children: (childProps) => jsx(Select, {
|
|
18749
18787
|
...childProps,
|
|
18750
18788
|
name: "trustType",
|
|
18751
|
-
onChange:
|
|
18789
|
+
onChange: changeTrustType,
|
|
18752
18790
|
selected: data.trustType,
|
|
18753
18791
|
items: trustTypeOptions2.map(({
|
|
18754
18792
|
id: id2,
|
|
@@ -18759,6 +18797,23 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18759
18797
|
})),
|
|
18760
18798
|
placeholder: i18n.get("trustType")
|
|
18761
18799
|
})
|
|
18800
|
+
}), formUtils.isRequiredField("objectOfTrust") && jsx(Field, {
|
|
18801
|
+
name: "objectOfTrust",
|
|
18802
|
+
label: formUtils.getLabel("objectOfCharitableTrust"),
|
|
18803
|
+
helper: formUtils.getLabel("pleaseProvideThePurposeOfCharitableTrust"),
|
|
18804
|
+
errorMessage: formUtils.getErrorMessage("objectOfTrust", errors, fieldProblems),
|
|
18805
|
+
isValid: valid.objectOfTrust,
|
|
18806
|
+
children: (childProps) => jsx(InputText, {
|
|
18807
|
+
...childProps,
|
|
18808
|
+
name: "objectOfTrust",
|
|
18809
|
+
value: data.objectOfTrust,
|
|
18810
|
+
readonly: formUtils.isReadOnly("objectOfTrust"),
|
|
18811
|
+
onInput: handleChangeFor("objectOfTrust", "input"),
|
|
18812
|
+
onBlur: handleChangeFor("objectOfTrust", "blur"),
|
|
18813
|
+
"aria-required": true,
|
|
18814
|
+
"aria-label": formUtils.getLabel("objectOfCharitableTrust"),
|
|
18815
|
+
"aria-invalid": !valid.objectOfTrust
|
|
18816
|
+
})
|
|
18762
18817
|
}), formUtils.isRequiredField("taxId") && jsx(TaxId, {
|
|
18763
18818
|
...taxIdProps,
|
|
18764
18819
|
dataStoreId: TRUST_REGISTRATION_DETAILS,
|
|
@@ -20804,7 +20859,7 @@ function CompanyDropinComponent({
|
|
|
20804
20859
|
onTypeSwitch,
|
|
20805
20860
|
onChange
|
|
20806
20861
|
}) {
|
|
20807
|
-
var _a
|
|
20862
|
+
var _a;
|
|
20808
20863
|
const {
|
|
20809
20864
|
showToast,
|
|
20810
20865
|
clearToasts
|
|
@@ -21028,12 +21083,12 @@ function CompanyDropinComponent({
|
|
|
21028
21083
|
}, []);
|
|
21029
21084
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
21030
21085
|
const formatDataForSummary = (data2, forms2) => {
|
|
21031
|
-
var _a2,
|
|
21086
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
21032
21087
|
let summaryData = cloneObject(data2);
|
|
21033
21088
|
if ((_a2 = summaryData == null ? void 0 : summaryData.companyNameAndCountry) == null ? void 0 : _a2.companyCountry) {
|
|
21034
21089
|
summaryData.companyNameAndCountry.companyCountry = datasetUtils.getCountryName(summaryData.companyNameAndCountry.companyCountry);
|
|
21035
21090
|
}
|
|
21036
|
-
if ((
|
|
21091
|
+
if ((_b = summaryData == null ? void 0 : summaryData.companyType) == null ? void 0 : _b.entityType) {
|
|
21037
21092
|
const companyType2 = (_c = companyTypes.find((companyType22) => {
|
|
21038
21093
|
var _a3;
|
|
21039
21094
|
return companyType22.id === ((_a3 = summaryData.companyType) == null ? void 0 : _a3.entityType);
|
|
@@ -21106,7 +21161,7 @@ function CompanyDropinComponent({
|
|
|
21106
21161
|
activeForm,
|
|
21107
21162
|
capabilities,
|
|
21108
21163
|
data: dataFromResponse,
|
|
21109
|
-
country:
|
|
21164
|
+
country: country2,
|
|
21110
21165
|
problems,
|
|
21111
21166
|
handleAddressSearch,
|
|
21112
21167
|
handleFindAddress,
|
|
@@ -22460,9 +22515,9 @@ const getIntroDescriptionTranslationKeys = (translations, factors) => {
|
|
|
22460
22515
|
return (keysWithL.length ? keysWithL : keys).sort((a, b) => Number(a.charAt(a.length - 1)) - Number(b.charAt(b.length - 1)));
|
|
22461
22516
|
};
|
|
22462
22517
|
const TaskIntro = ({
|
|
22463
|
-
index,
|
|
22464
22518
|
intro,
|
|
22465
|
-
legalEntityType
|
|
22519
|
+
legalEntityType,
|
|
22520
|
+
number: number2
|
|
22466
22521
|
}) => {
|
|
22467
22522
|
const {
|
|
22468
22523
|
i18n
|
|
@@ -22480,7 +22535,7 @@ const TaskIntro = ({
|
|
|
22480
22535
|
return jsxs(Fragment, {
|
|
22481
22536
|
children: [jsx("div", {
|
|
22482
22537
|
className: "adyen-kyc-task-intros__number",
|
|
22483
|
-
children:
|
|
22538
|
+
children: number2
|
|
22484
22539
|
}), jsx("div", {
|
|
22485
22540
|
className: "adyen-kyc-task-intros__title",
|
|
22486
22541
|
children: i18n.get(`taskIntro${toPascalCase(intro)}Title`)
|
|
@@ -22498,7 +22553,7 @@ const TaskIntro = ({
|
|
|
22498
22553
|
};
|
|
22499
22554
|
const taskIntrosInOrder = [
|
|
22500
22555
|
TaskTypes.COMPANY,
|
|
22501
|
-
TaskTypes.
|
|
22556
|
+
TaskTypes.DECISION_MAKER,
|
|
22502
22557
|
TaskTypes.INDIVIDUAL,
|
|
22503
22558
|
// TaskTypes.PAYIN,
|
|
22504
22559
|
TaskTypes.PAYOUT
|
|
@@ -22537,9 +22592,10 @@ const TaskIntros = ({
|
|
|
22537
22592
|
type: "button"
|
|
22538
22593
|
})
|
|
22539
22594
|
}), jsx(TaskIntro, {
|
|
22540
|
-
index: activeIndex,
|
|
22541
22595
|
intro: allIntros[activeIndex],
|
|
22542
|
-
legalEntityType
|
|
22596
|
+
legalEntityType,
|
|
22597
|
+
number: activeIndex > 0 && activeIndex < allIntros.length - 1 ? activeIndex : void 0
|
|
22598
|
+
// prologue and epilogue should not be numbered
|
|
22543
22599
|
}, allIntros[activeIndex]), jsxs("div", {
|
|
22544
22600
|
className: "adyen-kyc-task-intros__nav",
|
|
22545
22601
|
children: [jsx(Button, {
|
|
@@ -23165,13 +23221,12 @@ const TrustMembersOverview = ({
|
|
|
23165
23221
|
})
|
|
23166
23222
|
});
|
|
23167
23223
|
};
|
|
23168
|
-
const doesValueSeemToBeMasked = (value) => typeof value === "string" && value.includes("**");
|
|
23169
23224
|
const omitMaskedFieldsIfUnchanged = (maskedFields, dataSubmitted, savedData) => {
|
|
23170
23225
|
const filtered = cloneObject(dataSubmitted);
|
|
23171
23226
|
maskedFields.forEach((maskedField) => {
|
|
23172
23227
|
const prevValue = getProp(savedData, maskedField);
|
|
23173
23228
|
const newValue = getProp(dataSubmitted, maskedField);
|
|
23174
|
-
if (prevValue === newValue &&
|
|
23229
|
+
if (prevValue === newValue && isValueMasked(newValue)) {
|
|
23175
23230
|
deleteProp(maskedField, filtered);
|
|
23176
23231
|
}
|
|
23177
23232
|
});
|
|
@@ -26359,6 +26414,12 @@ const rules = ({
|
|
|
26359
26414
|
if (COUNTRIES_THAT_USE_REGISTRATION_NUMBER.includes(country2)) {
|
|
26360
26415
|
return "REQUIRED";
|
|
26361
26416
|
}
|
|
26417
|
+
},
|
|
26418
|
+
trustTypeHasDescription: () => {
|
|
26419
|
+
var _a;
|
|
26420
|
+
if (((_a = data == null ? void 0 : data.trustRegistrationDetails) == null ? void 0 : _a.trustType) === TrustTypes.CHARITABLE_TRUST) {
|
|
26421
|
+
return "REQUIRED";
|
|
26422
|
+
}
|
|
26362
26423
|
}
|
|
26363
26424
|
});
|
|
26364
26425
|
const TrustWithFormComposer = withFormComposer(TrustComponent, {
|
|
@@ -26476,7 +26537,7 @@ function TrustDropinComponent(props) {
|
|
|
26476
26537
|
await props.handleUpdateLegalEntity(updatedParentLegalEntity, parentLegalEntity.id);
|
|
26477
26538
|
};
|
|
26478
26539
|
const formatDataForSummary = (data2, forms) => {
|
|
26479
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
26540
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
26480
26541
|
let summaryData = cloneObject(data2);
|
|
26481
26542
|
let trustCountry;
|
|
26482
26543
|
let trustType2;
|
|
@@ -26494,13 +26555,14 @@ function TrustDropinComponent(props) {
|
|
|
26494
26555
|
nameOfTrustAgreement: (_d = data2.trustRegistrationDetails) == null ? void 0 : _d.legalName,
|
|
26495
26556
|
countryOfEstablishment: trustCountry,
|
|
26496
26557
|
typeOfTrustAgreement: trustType2,
|
|
26497
|
-
|
|
26558
|
+
objectOfTrust: (_e = data2.trustRegistrationDetails) == null ? void 0 : _e.objectOfTrust,
|
|
26559
|
+
taxId: (_f = data2.trustRegistrationDetails) == null ? void 0 : _f.taxId
|
|
26498
26560
|
};
|
|
26499
|
-
if ((
|
|
26561
|
+
if ((_g = summaryData == null ? void 0 : summaryData.trustRegistrationAddress) == null ? void 0 : _g.registrationAddress) {
|
|
26500
26562
|
summaryData.trustRegistrationAddress.hasInnerForms = true;
|
|
26501
26563
|
summaryData.trustRegistrationAddress.registrationAddress = mapAddressLabels(summaryData == null ? void 0 : summaryData.trustRegistrationAddress.registrationAddress, datasetUtils);
|
|
26502
26564
|
}
|
|
26503
|
-
if ((
|
|
26565
|
+
if ((_h = summaryData == null ? void 0 : summaryData.trustRegistrationAddress) == null ? void 0 : _h.operationalAddress) {
|
|
26504
26566
|
summaryData.trustRegistrationAddress.operationalAddress = mapAddressLabels(summaryData == null ? void 0 : summaryData.trustRegistrationAddress.operationalAddress, datasetUtils);
|
|
26505
26567
|
}
|
|
26506
26568
|
if (isDocumentsRequired2(forms)) {
|
package/dist/style.css
CHANGED
|
@@ -88123,7 +88123,7 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
|
|
|
88123
88123
|
color: #dce0e5;
|
|
88124
88124
|
font-size: 210px;
|
|
88125
88125
|
font-weight: 600;
|
|
88126
|
-
|
|
88126
|
+
height: 210px;
|
|
88127
88127
|
margin-bottom: var(--spacing-md);
|
|
88128
88128
|
position: relative;
|
|
88129
88129
|
top: var(--spacing-md);
|
|
@@ -88144,8 +88144,10 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
|
|
|
88144
88144
|
.adyen-kyc-task-intros__description p:not(:last-child) {
|
|
88145
88145
|
margin-bottom: var(--spacing-md);
|
|
88146
88146
|
}
|
|
88147
|
-
.adyen-kyc-task-intros__description p
|
|
88147
|
+
.adyen-kyc-task-intros__description p:has(+ ul) {
|
|
88148
88148
|
font-weight: 600;
|
|
88149
|
+
}
|
|
88150
|
+
.adyen-kyc-task-intros__description p + ul {
|
|
88149
88151
|
margin: 0;
|
|
88150
88152
|
margin-top: calc(var(--spacing-md) * -1);
|
|
88151
88153
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LegalEntityType } from '../../core/models/api/legal-entity-type';
|
|
2
2
|
import { IntroTypes } from './types';
|
|
3
3
|
export interface TaskIntroProps {
|
|
4
|
-
index: number;
|
|
5
4
|
intro: IntroTypes;
|
|
6
5
|
legalEntityType: LegalEntityType;
|
|
6
|
+
number?: number;
|
|
7
7
|
}
|
|
8
|
-
export declare const TaskIntro: ({
|
|
8
|
+
export declare const TaskIntro: ({ intro, legalEntityType, number }: TaskIntroProps) => import("preact").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TaskTypes } from '../TaskList/types';
|
|
2
|
-
export declare const taskIntrosInOrder: readonly [TaskTypes.COMPANY, TaskTypes.
|
|
2
|
+
export declare const taskIntrosInOrder: readonly [TaskTypes.COMPANY, TaskTypes.DECISION_MAKER, TaskTypes.INDIVIDUAL, TaskTypes.PAYOUT];
|
|
3
3
|
export type TaskTypesWithIntro = (typeof taskIntrosInOrder)[number];
|
|
4
4
|
export declare const enum ExtraIntroTypes {
|
|
5
5
|
PROLOGUE = "prologue",
|
|
@@ -8,6 +8,7 @@ export interface TrustRegistrationDetailsSchema extends BusinessRegistrationNumb
|
|
|
8
8
|
legalName?: string;
|
|
9
9
|
country?: CountryCode;
|
|
10
10
|
trustType?: TrustTypes;
|
|
11
|
+
objectOfTrust?: string;
|
|
11
12
|
}
|
|
12
13
|
export interface TrustRegistrationDetailsProps extends BaseInnerFormProps<TrustRegistrationDetailsSchema> {
|
|
13
14
|
country: CountryCode;
|