@adyen/kyc-components 2.12.0 → 2.13.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 +140 -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/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,6 +16940,11 @@ function BankAccountFormat(props) {
|
|
|
16931
16940
|
})
|
|
16932
16941
|
});
|
|
16933
16942
|
}
|
|
16943
|
+
const stripNonAlphanumeric = (value) => value.replaceAll(/[^0-9a-zA-Z]/g, "");
|
|
16944
|
+
const isValueMasked = (value) => {
|
|
16945
|
+
var _a;
|
|
16946
|
+
return typeof value === "string" && !!((_a = value.match(/[*]{2,}/)) == null ? void 0 : _a.length);
|
|
16947
|
+
};
|
|
16934
16948
|
const bankAccountNumberFields = ["bankAccountNumber"];
|
|
16935
16949
|
function BankAccountNumber(props) {
|
|
16936
16950
|
const {
|
|
@@ -16956,6 +16970,11 @@ function BankAccountNumber(props) {
|
|
|
16956
16970
|
rules: validators,
|
|
16957
16971
|
defaultData: props.data,
|
|
16958
16972
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors,
|
|
16973
|
+
formatters: {
|
|
16974
|
+
bankAccountNumber: {
|
|
16975
|
+
formatter: (v) => v && !isValueMasked(v) ? stripNonAlphanumeric(v) : v
|
|
16976
|
+
}
|
|
16977
|
+
},
|
|
16959
16978
|
maskedFields: props.maskedFields
|
|
16960
16979
|
});
|
|
16961
16980
|
useEffect(() => {
|
|
@@ -16976,22 +16995,22 @@ function BankAccountNumber(props) {
|
|
|
16976
16995
|
children: [jsx(StateContextSetter, {
|
|
16977
16996
|
stateRef
|
|
16978
16997
|
}), jsx(Field, {
|
|
16979
|
-
name: "bankAccountNumber",
|
|
16980
|
-
label: formUtils.getLabel("bankAccountNumber"),
|
|
16981
16998
|
classNameModifiers: ["bankAccountNumber"],
|
|
16982
16999
|
errorMessage: formUtils.getErrorMessage("bankAccountNumber", errors, fieldProblems) || "",
|
|
16983
17000
|
isValid: valid.bankAccountNumber,
|
|
17001
|
+
label: formUtils.getLabel("bankAccountNumber"),
|
|
17002
|
+
name: "bankAccountNumber",
|
|
16984
17003
|
children: (childProps) => jsx(InputText, {
|
|
16985
17004
|
...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
17005
|
"aria-required": true,
|
|
17006
|
+
"aria-invalid": !valid.bankAccountNumber,
|
|
16993
17007
|
"aria-label": formUtils.getLabel("bankAccountNumber"),
|
|
16994
|
-
|
|
17008
|
+
classNameModifiers: ["bankAccountNumber"],
|
|
17009
|
+
name: "bankAccountNumber",
|
|
17010
|
+
onBlur: handleChangeFor("bankAccountNumber", "blur"),
|
|
17011
|
+
onInput: handleChangeFor("bankAccountNumber", "input"),
|
|
17012
|
+
readonly: formUtils.isReadOnly("bankAccountNumber"),
|
|
17013
|
+
value: data.bankAccountNumber
|
|
16995
17014
|
})
|
|
16996
17015
|
})]
|
|
16997
17016
|
});
|
|
@@ -18636,13 +18655,17 @@ const trustRegistrationDetailsValidations = {
|
|
|
18636
18655
|
modes: ["blur"],
|
|
18637
18656
|
validate: (legalName) => !!legalName,
|
|
18638
18657
|
errorMessage: "fieldIsRequired"
|
|
18658
|
+
},
|
|
18659
|
+
objectOfTrust: {
|
|
18660
|
+
modes: ["blur"],
|
|
18661
|
+
validate: (objectOfTrust2) => !!objectOfTrust2,
|
|
18662
|
+
errorMessage: "fieldIsRequired"
|
|
18639
18663
|
}
|
|
18640
18664
|
};
|
|
18641
|
-
const trustRegistrationDetailsFields = ["legalName", "country", "trustType", "taxId", "registrationNumber"];
|
|
18665
|
+
const trustRegistrationDetailsFields = ["legalName", "country", "trustType", "objectOfTrust", "taxId", "registrationNumber"];
|
|
18642
18666
|
const ALLOWED_TRUST_COUNTRIES = [CountryCodes.Australia, CountryCodes.NewZealand];
|
|
18643
18667
|
function TrustRegistrationDetailsComponent(props) {
|
|
18644
18668
|
var _a;
|
|
18645
|
-
console.log("TrustRegistrationDetailsComponent props", props);
|
|
18646
18669
|
const {
|
|
18647
18670
|
country: country2,
|
|
18648
18671
|
onCountryChange
|
|
@@ -18655,7 +18678,8 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18655
18678
|
setState: null
|
|
18656
18679
|
});
|
|
18657
18680
|
const requiredFieldsByTask = trustRegistrationDetailsFields;
|
|
18658
|
-
const
|
|
18681
|
+
const requiredFields = props.requiredFields ?? requiredFieldsByTask;
|
|
18682
|
+
const directChildFields = requiredFields.filter((field) => ["trustType", "objectOfTrust", "legalName", "country", "taxId", "registrationNumber"].includes(field));
|
|
18659
18683
|
const {
|
|
18660
18684
|
handleChangeFor,
|
|
18661
18685
|
data,
|
|
@@ -18686,10 +18710,16 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18686
18710
|
fieldProblems,
|
|
18687
18711
|
caller: TRUST_REGISTRATION_DETAILS,
|
|
18688
18712
|
dataStoreId: TRUST_REGISTRATION_DETAILS,
|
|
18689
|
-
schema:
|
|
18713
|
+
schema: requiredFields
|
|
18690
18714
|
}
|
|
18691
18715
|
});
|
|
18692
18716
|
}, [data, valid, errors]);
|
|
18717
|
+
const changeTrustType = (e) => {
|
|
18718
|
+
handleChangeFor("trustType", "blur")(e);
|
|
18719
|
+
if (e.target.value !== TrustTypes.CHARITABLE_TRUST) {
|
|
18720
|
+
setData("objectOfTrust", void 0);
|
|
18721
|
+
}
|
|
18722
|
+
};
|
|
18693
18723
|
const taxIdProps = getFieldProps(props, taxIdFields);
|
|
18694
18724
|
const trustTypeOptions2 = getCountrySpecificTrustTypeOptions(country2) ?? [];
|
|
18695
18725
|
const registrationNumberProps = getFieldProps(props, businessRegistrationNumberFields);
|
|
@@ -18748,7 +18778,7 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18748
18778
|
children: (childProps) => jsx(Select, {
|
|
18749
18779
|
...childProps,
|
|
18750
18780
|
name: "trustType",
|
|
18751
|
-
onChange:
|
|
18781
|
+
onChange: changeTrustType,
|
|
18752
18782
|
selected: data.trustType,
|
|
18753
18783
|
items: trustTypeOptions2.map(({
|
|
18754
18784
|
id: id2,
|
|
@@ -18759,6 +18789,23 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18759
18789
|
})),
|
|
18760
18790
|
placeholder: i18n.get("trustType")
|
|
18761
18791
|
})
|
|
18792
|
+
}), formUtils.isRequiredField("objectOfTrust") && jsx(Field, {
|
|
18793
|
+
name: "objectOfTrust",
|
|
18794
|
+
label: formUtils.getLabel("objectOfCharitableTrust"),
|
|
18795
|
+
helper: formUtils.getLabel("pleaseProvideThePurposeOfCharitableTrust"),
|
|
18796
|
+
errorMessage: formUtils.getErrorMessage("objectOfTrust", errors, fieldProblems),
|
|
18797
|
+
isValid: valid.objectOfTrust,
|
|
18798
|
+
children: (childProps) => jsx(InputText, {
|
|
18799
|
+
...childProps,
|
|
18800
|
+
name: "objectOfTrust",
|
|
18801
|
+
value: data.objectOfTrust,
|
|
18802
|
+
readonly: formUtils.isReadOnly("objectOfTrust"),
|
|
18803
|
+
onInput: handleChangeFor("objectOfTrust", "input"),
|
|
18804
|
+
onBlur: handleChangeFor("objectOfTrust", "blur"),
|
|
18805
|
+
"aria-required": true,
|
|
18806
|
+
"aria-label": formUtils.getLabel("objectOfCharitableTrust"),
|
|
18807
|
+
"aria-invalid": !valid.objectOfTrust
|
|
18808
|
+
})
|
|
18762
18809
|
}), formUtils.isRequiredField("taxId") && jsx(TaxId, {
|
|
18763
18810
|
...taxIdProps,
|
|
18764
18811
|
dataStoreId: TRUST_REGISTRATION_DETAILS,
|
|
@@ -20804,7 +20851,7 @@ function CompanyDropinComponent({
|
|
|
20804
20851
|
onTypeSwitch,
|
|
20805
20852
|
onChange
|
|
20806
20853
|
}) {
|
|
20807
|
-
var _a
|
|
20854
|
+
var _a;
|
|
20808
20855
|
const {
|
|
20809
20856
|
showToast,
|
|
20810
20857
|
clearToasts
|
|
@@ -21028,12 +21075,12 @@ function CompanyDropinComponent({
|
|
|
21028
21075
|
}, []);
|
|
21029
21076
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
21030
21077
|
const formatDataForSummary = (data2, forms2) => {
|
|
21031
|
-
var _a2,
|
|
21078
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
21032
21079
|
let summaryData = cloneObject(data2);
|
|
21033
21080
|
if ((_a2 = summaryData == null ? void 0 : summaryData.companyNameAndCountry) == null ? void 0 : _a2.companyCountry) {
|
|
21034
21081
|
summaryData.companyNameAndCountry.companyCountry = datasetUtils.getCountryName(summaryData.companyNameAndCountry.companyCountry);
|
|
21035
21082
|
}
|
|
21036
|
-
if ((
|
|
21083
|
+
if ((_b = summaryData == null ? void 0 : summaryData.companyType) == null ? void 0 : _b.entityType) {
|
|
21037
21084
|
const companyType2 = (_c = companyTypes.find((companyType22) => {
|
|
21038
21085
|
var _a3;
|
|
21039
21086
|
return companyType22.id === ((_a3 = summaryData.companyType) == null ? void 0 : _a3.entityType);
|
|
@@ -21106,7 +21153,7 @@ function CompanyDropinComponent({
|
|
|
21106
21153
|
activeForm,
|
|
21107
21154
|
capabilities,
|
|
21108
21155
|
data: dataFromResponse,
|
|
21109
|
-
country:
|
|
21156
|
+
country: country2,
|
|
21110
21157
|
problems,
|
|
21111
21158
|
handleAddressSearch,
|
|
21112
21159
|
handleFindAddress,
|
|
@@ -22460,9 +22507,9 @@ const getIntroDescriptionTranslationKeys = (translations, factors) => {
|
|
|
22460
22507
|
return (keysWithL.length ? keysWithL : keys).sort((a, b) => Number(a.charAt(a.length - 1)) - Number(b.charAt(b.length - 1)));
|
|
22461
22508
|
};
|
|
22462
22509
|
const TaskIntro = ({
|
|
22463
|
-
index,
|
|
22464
22510
|
intro,
|
|
22465
|
-
legalEntityType
|
|
22511
|
+
legalEntityType,
|
|
22512
|
+
number: number2
|
|
22466
22513
|
}) => {
|
|
22467
22514
|
const {
|
|
22468
22515
|
i18n
|
|
@@ -22480,7 +22527,7 @@ const TaskIntro = ({
|
|
|
22480
22527
|
return jsxs(Fragment, {
|
|
22481
22528
|
children: [jsx("div", {
|
|
22482
22529
|
className: "adyen-kyc-task-intros__number",
|
|
22483
|
-
children:
|
|
22530
|
+
children: number2
|
|
22484
22531
|
}), jsx("div", {
|
|
22485
22532
|
className: "adyen-kyc-task-intros__title",
|
|
22486
22533
|
children: i18n.get(`taskIntro${toPascalCase(intro)}Title`)
|
|
@@ -22498,7 +22545,7 @@ const TaskIntro = ({
|
|
|
22498
22545
|
};
|
|
22499
22546
|
const taskIntrosInOrder = [
|
|
22500
22547
|
TaskTypes.COMPANY,
|
|
22501
|
-
TaskTypes.
|
|
22548
|
+
TaskTypes.DECISION_MAKER,
|
|
22502
22549
|
TaskTypes.INDIVIDUAL,
|
|
22503
22550
|
// TaskTypes.PAYIN,
|
|
22504
22551
|
TaskTypes.PAYOUT
|
|
@@ -22537,9 +22584,10 @@ const TaskIntros = ({
|
|
|
22537
22584
|
type: "button"
|
|
22538
22585
|
})
|
|
22539
22586
|
}), jsx(TaskIntro, {
|
|
22540
|
-
index: activeIndex,
|
|
22541
22587
|
intro: allIntros[activeIndex],
|
|
22542
|
-
legalEntityType
|
|
22588
|
+
legalEntityType,
|
|
22589
|
+
number: activeIndex > 0 && activeIndex < allIntros.length - 1 ? activeIndex : void 0
|
|
22590
|
+
// prologue and epilogue should not be numbered
|
|
22543
22591
|
}, allIntros[activeIndex]), jsxs("div", {
|
|
22544
22592
|
className: "adyen-kyc-task-intros__nav",
|
|
22545
22593
|
children: [jsx(Button, {
|
|
@@ -23165,13 +23213,12 @@ const TrustMembersOverview = ({
|
|
|
23165
23213
|
})
|
|
23166
23214
|
});
|
|
23167
23215
|
};
|
|
23168
|
-
const doesValueSeemToBeMasked = (value) => typeof value === "string" && value.includes("**");
|
|
23169
23216
|
const omitMaskedFieldsIfUnchanged = (maskedFields, dataSubmitted, savedData) => {
|
|
23170
23217
|
const filtered = cloneObject(dataSubmitted);
|
|
23171
23218
|
maskedFields.forEach((maskedField) => {
|
|
23172
23219
|
const prevValue = getProp(savedData, maskedField);
|
|
23173
23220
|
const newValue = getProp(dataSubmitted, maskedField);
|
|
23174
|
-
if (prevValue === newValue &&
|
|
23221
|
+
if (prevValue === newValue && isValueMasked(newValue)) {
|
|
23175
23222
|
deleteProp(maskedField, filtered);
|
|
23176
23223
|
}
|
|
23177
23224
|
});
|
|
@@ -26359,6 +26406,12 @@ const rules = ({
|
|
|
26359
26406
|
if (COUNTRIES_THAT_USE_REGISTRATION_NUMBER.includes(country2)) {
|
|
26360
26407
|
return "REQUIRED";
|
|
26361
26408
|
}
|
|
26409
|
+
},
|
|
26410
|
+
trustTypeHasDescription: () => {
|
|
26411
|
+
var _a;
|
|
26412
|
+
if (((_a = data == null ? void 0 : data.trustRegistrationDetails) == null ? void 0 : _a.trustType) === TrustTypes.CHARITABLE_TRUST) {
|
|
26413
|
+
return "REQUIRED";
|
|
26414
|
+
}
|
|
26362
26415
|
}
|
|
26363
26416
|
});
|
|
26364
26417
|
const TrustWithFormComposer = withFormComposer(TrustComponent, {
|
|
@@ -26476,7 +26529,7 @@ function TrustDropinComponent(props) {
|
|
|
26476
26529
|
await props.handleUpdateLegalEntity(updatedParentLegalEntity, parentLegalEntity.id);
|
|
26477
26530
|
};
|
|
26478
26531
|
const formatDataForSummary = (data2, forms) => {
|
|
26479
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
26532
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
26480
26533
|
let summaryData = cloneObject(data2);
|
|
26481
26534
|
let trustCountry;
|
|
26482
26535
|
let trustType2;
|
|
@@ -26494,13 +26547,14 @@ function TrustDropinComponent(props) {
|
|
|
26494
26547
|
nameOfTrustAgreement: (_d = data2.trustRegistrationDetails) == null ? void 0 : _d.legalName,
|
|
26495
26548
|
countryOfEstablishment: trustCountry,
|
|
26496
26549
|
typeOfTrustAgreement: trustType2,
|
|
26497
|
-
|
|
26550
|
+
objectOfTrust: (_e = data2.trustRegistrationDetails) == null ? void 0 : _e.objectOfTrust,
|
|
26551
|
+
taxId: (_f = data2.trustRegistrationDetails) == null ? void 0 : _f.taxId
|
|
26498
26552
|
};
|
|
26499
|
-
if ((
|
|
26553
|
+
if ((_g = summaryData == null ? void 0 : summaryData.trustRegistrationAddress) == null ? void 0 : _g.registrationAddress) {
|
|
26500
26554
|
summaryData.trustRegistrationAddress.hasInnerForms = true;
|
|
26501
26555
|
summaryData.trustRegistrationAddress.registrationAddress = mapAddressLabels(summaryData == null ? void 0 : summaryData.trustRegistrationAddress.registrationAddress, datasetUtils);
|
|
26502
26556
|
}
|
|
26503
|
-
if ((
|
|
26557
|
+
if ((_h = summaryData == null ? void 0 : summaryData.trustRegistrationAddress) == null ? void 0 : _h.operationalAddress) {
|
|
26504
26558
|
summaryData.trustRegistrationAddress.operationalAddress = mapAddressLabels(summaryData == null ? void 0 : summaryData.trustRegistrationAddress.operationalAddress, datasetUtils);
|
|
26505
26559
|
}
|
|
26506
26560
|
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;
|