@adyen/kyc-components 3.0.0-beta.7 → 3.0.0-beta.8

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.
@@ -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 registered to your company with the Chamber of Commerce.";
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 Chamber of Commerce registration";
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 legalCompanyNameHelper__US = "Enter the name exactly as it appears on your Secretary of State Registration.";
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,34 +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 start";
1043
- const taskIntroPrologueDescriptionP1 = "The more prepared you are with the requirements, the quicker you'll be able to set up your account!";
1044
- const taskIntroPrologueDescriptionP2 = "Here are the things we need to know from you.";
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 = "Make sure to have acces to your most recent company registration information, as we'll ask for your company details.";
1047
- const taskIntroCompanyDescriptionP2 = "You can find this on your company registration document.";
1048
- const taskIntroDecisionMakerOverviewTitle = "Proof of identity";
1049
- const taskIntroDecisionMakerOverviewDescriptionP1 = "We'll need to check the identity of the main decision makers of your company.";
1050
- const taskIntroDecisionMakerOverviewDescriptionP2 = "Make sure to have a copy of their IDs in color and their residential address.";
1051
- const taskIntroDecisionMakerOverviewDescriptionP3 = "For the ID you can choose:";
1052
- const taskIntroDecisionMakerOverviewDescriptionLI1 = "Driver's license";
1053
- const taskIntroDecisionMakerOverviewDescriptionLI2 = "Passport";
1054
- const taskIntroDecisionMakerOverviewDescriptionLI3 = "ID document";
1055
- const taskIntroIndividualTitle = "Proof of identity";
1056
- const taskIntroIndividualDescriptionP1 = "We'll need to check your identity and personal details.";
1057
- const taskIntroIndividualDescriptionP2 = "You'll be asked to provide your residential address and, if necessary, a copy of our ID in color.";
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 = "Payout account details";
1063
- const taskIntroPayoutOrganizationDescriptionP1 = "We'll have to verify the details of the bank account where we'll be sending the funds.";
1064
- const taskIntroPayoutOrganizationDescriptionP2 = "This account should be in the name of the company.";
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 have to make sure the businesses using our services won't misuse the funds or cause harm.";
1069
- const taskIntroEpilogueDescriptionP2 = "We'll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.";
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.";
1070
1072
  const taskIntroEpilogueDescriptionP3 = "We'll use your information exclusively for these purposes.";
1071
1073
  const defaultTrans = {
1072
1074
  close,
@@ -1206,6 +1208,7 @@ const defaultTrans = {
1206
1208
  registeredAddress,
1207
1209
  registrationAddress,
1208
1210
  registeredAddressHeaderDescription,
1211
+ registeredAddressHeaderDescription__NL,
1209
1212
  registeredAddressHeaderDescription__US,
1210
1213
  registeredAddressTrustHeaderDescription,
1211
1214
  operationalAddress,
@@ -1282,6 +1285,7 @@ const defaultTrans = {
1282
1285
  legalCompanyName,
1283
1286
  legalCompanyNameHelper,
1284
1287
  legalCompanyNameHelper__AU,
1288
+ legalCompanyNameHelper__NL,
1285
1289
  legalCompanyNameHelper__US,
1286
1290
  legalCompanyNameHelper__SG,
1287
1291
  legalCompanyNameHelper__HK,
@@ -1566,6 +1570,9 @@ const defaultTrans = {
1566
1570
  countryOfEstablishment,
1567
1571
  nameOfTrustAgreement,
1568
1572
  typeOfTrustAgreement,
1573
+ objectOfCharitableTrust,
1574
+ objectOfTrust,
1575
+ pleaseProvideThePurposeOfCharitableTrust,
1569
1576
  weFoundTheFollowingIssues,
1570
1577
  reviewTheInformationBelowAndCorrectMistakesOr,
1571
1578
  uploadTheRequestedDocuments,
@@ -2118,25 +2125,22 @@ const defaultTrans = {
2118
2125
  taskIntroCompanyTitle,
2119
2126
  taskIntroCompanyDescriptionP1,
2120
2127
  taskIntroCompanyDescriptionP2,
2121
- taskIntroDecisionMakerOverviewTitle,
2122
- taskIntroDecisionMakerOverviewDescriptionP1,
2123
- taskIntroDecisionMakerOverviewDescriptionP2,
2124
- taskIntroDecisionMakerOverviewDescriptionP3,
2125
- taskIntroDecisionMakerOverviewDescriptionLI1,
2126
- taskIntroDecisionMakerOverviewDescriptionLI2,
2127
- taskIntroDecisionMakerOverviewDescriptionLI3,
2128
+ taskIntroCompanyDescriptionLI1,
2129
+ taskIntroDecisionMakerTitle,
2130
+ taskIntroDecisionMakerDescriptionP1,
2131
+ taskIntroDecisionMakerDescriptionP2,
2132
+ taskIntroDecisionMakerDescriptionLI1,
2133
+ taskIntroDecisionMakerDescriptionLI2,
2134
+ taskIntroDecisionMakerDescriptionLI3,
2128
2135
  taskIntroIndividualTitle,
2129
2136
  taskIntroIndividualDescriptionP1,
2130
2137
  taskIntroIndividualDescriptionP2,
2131
- taskIntroIndividualDescriptionP3,
2132
2138
  taskIntroIndividualDescriptionLI1,
2133
2139
  taskIntroIndividualDescriptionLI2,
2134
2140
  taskIntroIndividualDescriptionLI3,
2135
2141
  taskIntroPayoutTitle,
2136
- taskIntroPayoutOrganizationDescriptionP1,
2137
- taskIntroPayoutOrganizationDescriptionP2,
2138
- taskIntroPayoutIndividualDescriptionP1,
2139
- taskIntroPayoutIndividualDescriptionP2,
2142
+ taskIntroPayoutDescriptionP1,
2143
+ taskIntroPayoutDescriptionP2,
2140
2144
  taskIntroEpilogueTitle,
2141
2145
  taskIntroEpilogueDescriptionP1,
2142
2146
  taskIntroEpilogueDescriptionP2,
@@ -7507,13 +7511,10 @@ const FLOWS_THAT_HIDE_REGISTRATION_NUMBER = [{
7507
7511
  const companyRegistrationDetailsFields = ["tradingName", "sameNameAsLegalName", ...businessRegistrationNumberFields, "stockExchangeMIC", "stockISIN", ...vatNumberFields, ...taxIdFields, "dateOfIncorporation"];
7508
7512
  function CompanyRegistrationDetailsComponent(props) {
7509
7513
  var _a, _b;
7510
- const {
7511
- contextCountry
7512
- } = useCoreContext();
7513
7514
  const {
7514
7515
  i18n
7515
7516
  } = useI18nContext();
7516
- const hideOptionalRegistrationNumberField = FLOWS_THAT_HIDE_REGISTRATION_NUMBER.some((f) => f.country === contextCountry && f.companyType.includes(props.companyType));
7517
+ const hideOptionalRegistrationNumberField = FLOWS_THAT_HIDE_REGISTRATION_NUMBER.some((f) => f.country === props.country && f.companyType.includes(props.companyType));
7517
7518
  const stateRef = useRef({
7518
7519
  setState: null
7519
7520
  });
@@ -8218,6 +8219,9 @@ const countryConfig$4 = {
8218
8219
  registrationNumber: {
8219
8220
  label: "chamberOfCommerceRegistrationNumber"
8220
8221
  },
8222
+ legalCompanyName: {
8223
+ helperText: "legalCompanyNameHelper__NL"
8224
+ },
8221
8225
  exemptedFromVat: {
8222
8226
  label: "vatNumberExempted"
8223
8227
  },
@@ -8446,6 +8450,9 @@ const trustBase = {
8446
8450
  trustType: {
8447
8451
  rule: "REQUIRED"
8448
8452
  },
8453
+ objectOfTrust: {
8454
+ rule: "trustTypeHasDescription"
8455
+ },
8449
8456
  legalName: {
8450
8457
  rule: "REQUIRED"
8451
8458
  },
@@ -10829,9 +10836,6 @@ const CompanyRegistrationDocumentFormID = companyForms.companyRegistrationDocume
10829
10836
  const CompanyTaxDocumentFormID = companyForms.companyTaxDocument.formId;
10830
10837
  const companyDocumentForms = [CompanyRegistrationDocumentFormID, CompanyTaxDocumentFormID];
10831
10838
  function CompanyComponent(props) {
10832
- const {
10833
- contextCountry
10834
- } = useCoreContext();
10835
10839
  const {
10836
10840
  i18n
10837
10841
  } = useI18nContext();
@@ -10895,7 +10899,7 @@ function CompanyComponent(props) {
10895
10899
  ...companyRegistrationAddressFormProps,
10896
10900
  heading: i18n.get("registeredAddress"),
10897
10901
  description: i18n.get("registeredAddressHeaderDescription", {
10898
- localizeFor: contextCountry
10902
+ localizeFor: props.country
10899
10903
  }),
10900
10904
  id: CompanyRegistrationAddressFormID,
10901
10905
  country: props.country,
@@ -11510,7 +11514,7 @@ const hasMinRequiredDecisionMakerCount = (legalEntityResponse) => {
11510
11514
  var TrustTypes = /* @__PURE__ */ ((TrustTypes2) => {
11511
11515
  TrustTypes2["BUSINESS_TRUST"] = "businessTrust";
11512
11516
  TrustTypes2["CASH_MANAGEMENT_TRUST"] = "cashManagementTrust";
11513
- TrustTypes2["CHARTIABLE_TRUST"] = "charitableTrust";
11517
+ TrustTypes2["CHARITABLE_TRUST"] = "charitableTrust";
11514
11518
  TrustTypes2["CORPORATE_UNIT_TRUST"] = "corporateUnitTrust";
11515
11519
  TrustTypes2["DECEASED_ESTATE"] = "deceasedEstate";
11516
11520
  TrustTypes2["DISCRETIONARY_INVESTMENT_TRUST"] = "discretionaryInvestmentTrust";
@@ -11536,7 +11540,7 @@ const trustTypeOptions = [{
11536
11540
  id: TrustTypes.CASH_MANAGEMENT_TRUST,
11537
11541
  name: "cashManagementTrust"
11538
11542
  }, {
11539
- id: TrustTypes.CHARTIABLE_TRUST,
11543
+ id: TrustTypes.CHARITABLE_TRUST,
11540
11544
  name: "charitableTrust"
11541
11545
  }, {
11542
11546
  id: TrustTypes.CORPORATE_UNIT_TRUST,
@@ -11587,7 +11591,7 @@ const trustTypeOptions = [{
11587
11591
  id: TrustTypes.UNLISTED_PUBLIC_UNIT_TRUST,
11588
11592
  name: "unlistedPublicUnitTrust"
11589
11593
  }];
11590
- const nzSpecificTrustTypes = [TrustTypes.DISCRETIONARY_TRUST, TrustTypes.FAMILY_TRUST, TrustTypes.CHARTIABLE_TRUST, TrustTypes.BUSINESS_TRUST, TrustTypes.OTHER_TRUST];
11594
+ const nzSpecificTrustTypes = [TrustTypes.DISCRETIONARY_TRUST, TrustTypes.FAMILY_TRUST, TrustTypes.CHARITABLE_TRUST, TrustTypes.BUSINESS_TRUST, TrustTypes.OTHER_TRUST];
11591
11595
  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];
11592
11596
  const countryToTrustTypes = {
11593
11597
  [CountryCodes.Australia]: auSpecificTrustTypes,
@@ -12289,12 +12293,15 @@ const mapCompanyToLegalEntity = (data) => {
12289
12293
  return requestObj;
12290
12294
  };
12291
12295
  const mapLegalEntityToTrust = (legalEntity) => {
12292
- var _a, _b, _c;
12296
+ var _a, _b, _c, _d;
12293
12297
  let trustCompData;
12294
12298
  if (legalEntity == null ? void 0 : legalEntity.trust) {
12295
12299
  trustCompData = formatObject(legalEntity, trustComponentsKeyMapping);
12296
12300
  trustCompData.trustRegistrationDetails.country = legalEntity.trust.countryOfGoverningLaw;
12297
- if ((_a = legalEntity.trust) == null ? void 0 : _a.principalPlaceOfBusiness) {
12301
+ if ((_a = legalEntity.trust) == null ? void 0 : _a.description) {
12302
+ trustCompData.trustRegistrationDetails.objectOfTrust = legalEntity.trust.description;
12303
+ }
12304
+ if ((_b = legalEntity.trust) == null ? void 0 : _b.principalPlaceOfBusiness) {
12298
12305
  trustCompData.trustRegistrationAddress.operationalAddressIsSame = operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME;
12299
12306
  } else {
12300
12307
  if (!trustCompData.trustRegistrationAddress) {
@@ -12309,10 +12316,10 @@ const mapLegalEntityToTrust = (legalEntity) => {
12309
12316
  const {
12310
12317
  country: country2
12311
12318
  } = legalEntity.trust.registeredAddress;
12312
- trustCompData.trustRegistrationDetails.taxId = (_b = taxInformation.find((info) => info.country === country2)) == null ? void 0 : _b.number;
12319
+ trustCompData.trustRegistrationDetails.taxId = (_c = taxInformation.find((info) => info.country === country2)) == null ? void 0 : _c.number;
12313
12320
  trustCompData.trustRegistrationDetails.exemptedFromTax = false;
12314
12321
  }
12315
- if ((_c = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _c.length) {
12322
+ if ((_d = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _d.length) {
12316
12323
  trustCompData = {
12317
12324
  ...trustCompData,
12318
12325
  ...mapApiDocumentToTrustDocument(legalEntity == null ? void 0 : legalEntity.id)
@@ -12322,6 +12329,7 @@ const mapLegalEntityToTrust = (legalEntity) => {
12322
12329
  return trustCompData;
12323
12330
  };
12324
12331
  const mapTrustToLegalEntity = (data) => {
12332
+ var _a;
12325
12333
  const requestObj = {
12326
12334
  ...formatObject(data, trustApiKeyMapping)
12327
12335
  };
@@ -12332,6 +12340,9 @@ const mapTrustToLegalEntity = (data) => {
12332
12340
  entity: requestObj.trust
12333
12341
  });
12334
12342
  }
12343
+ if ((_a = data.trustRegistrationDetails) == null ? void 0 : _a.objectOfTrust) {
12344
+ requestObj.trust.description = data.trustRegistrationDetails.objectOfTrust;
12345
+ }
12335
12346
  requestObj.type = LegalEntityType.TRUST;
12336
12347
  return requestObj;
12337
12348
  };
@@ -17017,6 +17028,11 @@ function BankAccountFormat(props) {
17017
17028
  })
17018
17029
  });
17019
17030
  }
17031
+ const stripNonAlphanumeric = (value) => value.replaceAll(/[^0-9a-zA-Z]/g, "");
17032
+ const isValueMasked = (value) => {
17033
+ var _a;
17034
+ return typeof value === "string" && !!((_a = value.match(/[*]{2,}/)) == null ? void 0 : _a.length);
17035
+ };
17020
17036
  const bankAccountNumberFields = ["bankAccountNumber"];
17021
17037
  function BankAccountNumber(props) {
17022
17038
  const {
@@ -17042,6 +17058,11 @@ function BankAccountNumber(props) {
17042
17058
  rules: validators,
17043
17059
  defaultData: props.data,
17044
17060
  fieldProblems: props == null ? void 0 : props.fieldValidationErrors,
17061
+ formatters: {
17062
+ bankAccountNumber: {
17063
+ formatter: (v) => v && !isValueMasked(v) ? stripNonAlphanumeric(v) : v
17064
+ }
17065
+ },
17045
17066
  maskedFields: props.maskedFields
17046
17067
  });
17047
17068
  useEffect(() => {
@@ -17062,22 +17083,22 @@ function BankAccountNumber(props) {
17062
17083
  children: [jsx(StateContextSetter, {
17063
17084
  stateRef
17064
17085
  }), jsx(Field, {
17065
- name: "bankAccountNumber",
17066
- label: formUtils.getLabel("bankAccountNumber"),
17067
17086
  classNameModifiers: ["bankAccountNumber"],
17068
17087
  errorMessage: formUtils.getErrorMessage("bankAccountNumber", errors, fieldProblems) || "",
17069
17088
  isValid: valid.bankAccountNumber,
17089
+ label: formUtils.getLabel("bankAccountNumber"),
17090
+ name: "bankAccountNumber",
17070
17091
  children: (childProps) => jsx(InputText, {
17071
17092
  ...childProps,
17072
- name: "bankAccountNumber",
17073
- value: data.bankAccountNumber,
17074
- readonly: formUtils.isReadOnly("bankAccountNumber"),
17075
- classNameModifiers: ["bankAccountNumber"],
17076
- onInput: handleChangeFor("bankAccountNumber", "input"),
17077
- onBlur: handleChangeFor("bankAccountNumber", "blur"),
17078
17093
  "aria-required": true,
17094
+ "aria-invalid": !valid.bankAccountNumber,
17079
17095
  "aria-label": formUtils.getLabel("bankAccountNumber"),
17080
- "aria-invalid": !valid.bankAccountNumber
17096
+ classNameModifiers: ["bankAccountNumber"],
17097
+ name: "bankAccountNumber",
17098
+ onBlur: handleChangeFor("bankAccountNumber", "blur"),
17099
+ onInput: handleChangeFor("bankAccountNumber", "input"),
17100
+ readonly: formUtils.isReadOnly("bankAccountNumber"),
17101
+ value: data.bankAccountNumber
17081
17102
  })
17082
17103
  })]
17083
17104
  });
@@ -18722,13 +18743,17 @@ const trustRegistrationDetailsValidations = {
18722
18743
  modes: ["blur"],
18723
18744
  validate: (legalName) => !!legalName,
18724
18745
  errorMessage: "fieldIsRequired"
18746
+ },
18747
+ objectOfTrust: {
18748
+ modes: ["blur"],
18749
+ validate: (objectOfTrust2) => !!objectOfTrust2,
18750
+ errorMessage: "fieldIsRequired"
18725
18751
  }
18726
18752
  };
18727
- const trustRegistrationDetailsFields = ["legalName", "country", "trustType", "taxId", "registrationNumber"];
18753
+ const trustRegistrationDetailsFields = ["legalName", "country", "trustType", "objectOfTrust", "taxId", "registrationNumber"];
18728
18754
  const ALLOWED_TRUST_COUNTRIES = [CountryCodes.Australia, CountryCodes.NewZealand];
18729
18755
  function TrustRegistrationDetailsComponent(props) {
18730
18756
  var _a;
18731
- console.log("TrustRegistrationDetailsComponent props", props);
18732
18757
  const {
18733
18758
  country: country2,
18734
18759
  onCountryChange
@@ -18741,7 +18766,8 @@ function TrustRegistrationDetailsComponent(props) {
18741
18766
  setState: null
18742
18767
  });
18743
18768
  const requiredFieldsByTask = trustRegistrationDetailsFields;
18744
- const directChildFields = requiredFieldsByTask.filter((field) => ["trustType", "legalName", "country", "taxId", "registrationNumber"].includes(field));
18769
+ const requiredFields = props.requiredFields ?? requiredFieldsByTask;
18770
+ const directChildFields = requiredFields.filter((field) => ["trustType", "objectOfTrust", "legalName", "country", "taxId", "registrationNumber"].includes(field));
18745
18771
  const {
18746
18772
  handleChangeFor,
18747
18773
  data,
@@ -18772,10 +18798,16 @@ function TrustRegistrationDetailsComponent(props) {
18772
18798
  fieldProblems,
18773
18799
  caller: TRUST_REGISTRATION_DETAILS,
18774
18800
  dataStoreId: TRUST_REGISTRATION_DETAILS,
18775
- schema: requiredFieldsByTask
18801
+ schema: requiredFields
18776
18802
  }
18777
18803
  });
18778
18804
  }, [data, valid, errors]);
18805
+ const changeTrustType = (e) => {
18806
+ handleChangeFor("trustType", "blur")(e);
18807
+ if (e.target.value !== TrustTypes.CHARITABLE_TRUST) {
18808
+ setData("objectOfTrust", void 0);
18809
+ }
18810
+ };
18779
18811
  const taxIdProps = getFieldProps(props, taxIdFields);
18780
18812
  const trustTypeOptions2 = getCountrySpecificTrustTypeOptions(country2) ?? [];
18781
18813
  const registrationNumberProps = getFieldProps(props, businessRegistrationNumberFields);
@@ -18834,7 +18866,7 @@ function TrustRegistrationDetailsComponent(props) {
18834
18866
  children: (childProps) => jsx(Select, {
18835
18867
  ...childProps,
18836
18868
  name: "trustType",
18837
- onChange: handleChangeFor("trustType", "blur"),
18869
+ onChange: changeTrustType,
18838
18870
  selected: data.trustType,
18839
18871
  items: trustTypeOptions2.map(({
18840
18872
  id: id2,
@@ -18845,6 +18877,23 @@ function TrustRegistrationDetailsComponent(props) {
18845
18877
  })),
18846
18878
  placeholder: i18n.get("trustType")
18847
18879
  })
18880
+ }), formUtils.isRequiredField("objectOfTrust") && jsx(Field, {
18881
+ name: "objectOfTrust",
18882
+ label: formUtils.getLabel("objectOfCharitableTrust"),
18883
+ helper: formUtils.getLabel("pleaseProvideThePurposeOfCharitableTrust"),
18884
+ errorMessage: formUtils.getErrorMessage("objectOfTrust", errors, fieldProblems),
18885
+ isValid: valid.objectOfTrust,
18886
+ children: (childProps) => jsx(InputText, {
18887
+ ...childProps,
18888
+ name: "objectOfTrust",
18889
+ value: data.objectOfTrust,
18890
+ readonly: formUtils.isReadOnly("objectOfTrust"),
18891
+ onInput: handleChangeFor("objectOfTrust", "input"),
18892
+ onBlur: handleChangeFor("objectOfTrust", "blur"),
18893
+ "aria-required": true,
18894
+ "aria-label": formUtils.getLabel("objectOfCharitableTrust"),
18895
+ "aria-invalid": !valid.objectOfTrust
18896
+ })
18848
18897
  }), formUtils.isRequiredField("taxId") && jsx(TaxId, {
18849
18898
  ...taxIdProps,
18850
18899
  dataStoreId: TRUST_REGISTRATION_DETAILS,
@@ -20924,7 +20973,7 @@ function CompanyDropinComponent({
20924
20973
  onTypeSwitch,
20925
20974
  onChange
20926
20975
  }) {
20927
- var _a, _b;
20976
+ var _a;
20928
20977
  const {
20929
20978
  showToast,
20930
20979
  clearToasts
@@ -21148,12 +21197,12 @@ function CompanyDropinComponent({
21148
21197
  }, []);
21149
21198
  const datasetUtils = datasetUtilities(i18n.locale);
21150
21199
  const formatDataForSummary = (data2, forms2) => {
21151
- var _a2, _b2, _c, _d, _e, _f, _g, _h;
21200
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
21152
21201
  let summaryData = cloneObject(data2);
21153
21202
  if ((_a2 = summaryData == null ? void 0 : summaryData.companyNameAndCountry) == null ? void 0 : _a2.companyCountry) {
21154
21203
  summaryData.companyNameAndCountry.companyCountry = datasetUtils.getCountryName(summaryData.companyNameAndCountry.companyCountry);
21155
21204
  }
21156
- if ((_b2 = summaryData == null ? void 0 : summaryData.companyType) == null ? void 0 : _b2.entityType) {
21205
+ if ((_b = summaryData == null ? void 0 : summaryData.companyType) == null ? void 0 : _b.entityType) {
21157
21206
  const companyType2 = (_c = companyTypes.find((companyType22) => {
21158
21207
  var _a3;
21159
21208
  return companyType22.id === ((_a3 = summaryData.companyType) == null ? void 0 : _a3.entityType);
@@ -21226,7 +21275,7 @@ function CompanyDropinComponent({
21226
21275
  activeForm,
21227
21276
  capabilities,
21228
21277
  data: dataFromResponse,
21229
- country: (_b = data == null ? void 0 : data.companyNameAndCountry) == null ? void 0 : _b.country,
21278
+ country: country2,
21230
21279
  problems,
21231
21280
  handleAddressSearch,
21232
21281
  handleFindAddress,
@@ -22580,9 +22629,9 @@ const getIntroDescriptionTranslationKeys = (translations, factors) => {
22580
22629
  return (keysWithL.length ? keysWithL : keys).sort((a, b) => Number(a.charAt(a.length - 1)) - Number(b.charAt(b.length - 1)));
22581
22630
  };
22582
22631
  const TaskIntro = ({
22583
- index,
22584
22632
  intro,
22585
- legalEntityType
22633
+ legalEntityType,
22634
+ number: number2
22586
22635
  }) => {
22587
22636
  const {
22588
22637
  i18n
@@ -22600,7 +22649,7 @@ const TaskIntro = ({
22600
22649
  return jsxs(Fragment, {
22601
22650
  children: [jsx("div", {
22602
22651
  className: "adyen-kyc-task-intros__number",
22603
- children: index + 1
22652
+ children: number2
22604
22653
  }), jsx("div", {
22605
22654
  className: "adyen-kyc-task-intros__title",
22606
22655
  children: i18n.get(`taskIntro${toPascalCase(intro)}Title`)
@@ -22618,7 +22667,7 @@ const TaskIntro = ({
22618
22667
  };
22619
22668
  const taskIntrosInOrder = [
22620
22669
  TaskTypes.COMPANY,
22621
- TaskTypes.DECISION_MAKER_OVERVIEW,
22670
+ TaskTypes.DECISION_MAKER,
22622
22671
  TaskTypes.INDIVIDUAL,
22623
22672
  // TaskTypes.PAYIN,
22624
22673
  TaskTypes.PAYOUT
@@ -22657,9 +22706,10 @@ const TaskIntros = ({
22657
22706
  type: "button"
22658
22707
  })
22659
22708
  }), jsx(TaskIntro, {
22660
- index: activeIndex,
22661
22709
  intro: allIntros[activeIndex],
22662
- legalEntityType
22710
+ legalEntityType,
22711
+ number: activeIndex > 0 && activeIndex < allIntros.length - 1 ? activeIndex : void 0
22712
+ // prologue and epilogue should not be numbered
22663
22713
  }, allIntros[activeIndex]), jsxs("div", {
22664
22714
  className: "adyen-kyc-task-intros__nav",
22665
22715
  children: [jsx(Button, {
@@ -23285,13 +23335,12 @@ const TrustMembersOverview = ({
23285
23335
  })
23286
23336
  });
23287
23337
  };
23288
- const doesValueSeemToBeMasked = (value) => typeof value === "string" && value.includes("**");
23289
23338
  const omitMaskedFieldsIfUnchanged = (maskedFields, dataSubmitted, savedData) => {
23290
23339
  const filtered = cloneObject(dataSubmitted);
23291
23340
  maskedFields.forEach((maskedField) => {
23292
23341
  const prevValue = getProp(savedData, maskedField);
23293
23342
  const newValue = getProp(dataSubmitted, maskedField);
23294
- if (prevValue === newValue && doesValueSeemToBeMasked(newValue)) {
23343
+ if (prevValue === newValue && isValueMasked(newValue)) {
23295
23344
  deleteProp(maskedField, filtered);
23296
23345
  }
23297
23346
  });
@@ -26471,6 +26520,12 @@ const rules = ({
26471
26520
  if (COUNTRIES_THAT_USE_REGISTRATION_NUMBER.includes(country2)) {
26472
26521
  return "REQUIRED";
26473
26522
  }
26523
+ },
26524
+ trustTypeHasDescription: () => {
26525
+ var _a;
26526
+ if (((_a = data == null ? void 0 : data.trustRegistrationDetails) == null ? void 0 : _a.trustType) === TrustTypes.CHARITABLE_TRUST) {
26527
+ return "REQUIRED";
26528
+ }
26474
26529
  }
26475
26530
  });
26476
26531
  const TrustWithFormComposer = withFormComposer(TrustComponent, {
@@ -26588,7 +26643,7 @@ function TrustDropinComponent(props) {
26588
26643
  await props.handleUpdateLegalEntity(updatedParentLegalEntity, parentLegalEntity.id);
26589
26644
  };
26590
26645
  const formatDataForSummary = (data2, forms) => {
26591
- var _a, _b, _c, _d, _e, _f, _g;
26646
+ var _a, _b, _c, _d, _e, _f, _g, _h;
26592
26647
  let summaryData = cloneObject(data2);
26593
26648
  let trustCountry;
26594
26649
  let trustType2;
@@ -26606,13 +26661,14 @@ function TrustDropinComponent(props) {
26606
26661
  nameOfTrustAgreement: (_d = data2.trustRegistrationDetails) == null ? void 0 : _d.legalName,
26607
26662
  countryOfEstablishment: trustCountry,
26608
26663
  typeOfTrustAgreement: trustType2,
26609
- taxId: (_e = data2.trustRegistrationDetails) == null ? void 0 : _e.taxId
26664
+ objectOfTrust: (_e = data2.trustRegistrationDetails) == null ? void 0 : _e.objectOfTrust,
26665
+ taxId: (_f = data2.trustRegistrationDetails) == null ? void 0 : _f.taxId
26610
26666
  };
26611
- if ((_f = summaryData == null ? void 0 : summaryData.trustRegistrationAddress) == null ? void 0 : _f.registrationAddress) {
26667
+ if ((_g = summaryData == null ? void 0 : summaryData.trustRegistrationAddress) == null ? void 0 : _g.registrationAddress) {
26612
26668
  summaryData.trustRegistrationAddress.hasInnerForms = true;
26613
26669
  summaryData.trustRegistrationAddress.registrationAddress = mapAddressLabels(summaryData == null ? void 0 : summaryData.trustRegistrationAddress.registrationAddress, datasetUtils);
26614
26670
  }
26615
- if ((_g = summaryData == null ? void 0 : summaryData.trustRegistrationAddress) == null ? void 0 : _g.operationalAddress) {
26671
+ if ((_h = summaryData == null ? void 0 : summaryData.trustRegistrationAddress) == null ? void 0 : _h.operationalAddress) {
26616
26672
  summaryData.trustRegistrationAddress.operationalAddress = mapAddressLabels(summaryData == null ? void 0 : summaryData.trustRegistrationAddress.operationalAddress, datasetUtils);
26617
26673
  }
26618
26674
  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
- line-height: 0.8;
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 + ul {
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: ({ index, intro, legalEntityType }: TaskIntroProps) => import("preact").JSX.Element;
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.DECISION_MAKER_OVERVIEW, TaskTypes.INDIVIDUAL, TaskTypes.PAYOUT];
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;