@adyen/kyc-components 2.3.2 → 2.3.3

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.
@@ -12136,7 +12136,7 @@ function formatSwedenPersonnummer(value) {
12136
12136
  }
12137
12137
  const formattedCountries = [CountryCodes.Denmark, CountryCodes.Sweden];
12138
12138
  const stripCountryIdFormat = (value, country2) => {
12139
- if (formattedCountries.includes(country2)) {
12139
+ if (value && formattedCountries.includes(country2)) {
12140
12140
  return cleanNonNumbers(value);
12141
12141
  }
12142
12142
  return value;
@@ -22415,22 +22415,22 @@ function IndividualDropinComponent({
22415
22415
  legalEntity,
22416
22416
  dataSubmitted
22417
22417
  }) => {
22418
- if (isDocumentsRequired2(forms2)) {
22419
- if (hasInstantIdVerification(dataSubmitted)) {
22420
- await handleInstantIdVerificationStartCheck(dataSubmitted.idDocument.instantIdVerificationData, legalEntity.id);
22421
- } else {
22422
- const formattedDocument = await mapIndividualDocumentToApiDocument(dataSubmitted, legalEntity.id);
22423
- await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
22424
- formattedDocument == null ? void 0 : formattedDocument.forEach((doc) => {
22425
- userEvents.addEvent("Saved document", {
22426
- segmentation: {
22427
- ...baseTrackingPayload,
22428
- documentType: doc.type,
22429
- fileExtention: doc.attachments.map((item) => getFileExtention(item.pageName))
22430
- }
22431
- });
22418
+ if (!isDocumentsRequired2(forms2))
22419
+ return;
22420
+ if (hasInstantIdVerification(dataSubmitted)) {
22421
+ await handleInstantIdVerificationStartCheck(dataSubmitted.idDocument.instantIdVerificationData, legalEntity.id);
22422
+ } else {
22423
+ const formattedDocuments = await mapIndividualDocumentToApiDocument(dataSubmitted, legalEntity.id);
22424
+ const uploadedDocuments = await documentUtils.uploadDocuments(formattedDocuments, legalEntity.id);
22425
+ uploadedDocuments == null ? void 0 : uploadedDocuments.forEach((doc) => {
22426
+ userEvents.addEvent("Saved document", {
22427
+ segmentation: {
22428
+ ...baseTrackingPayload,
22429
+ documentType: doc.type,
22430
+ fileExtention: doc.attachments.map((item) => getFileExtention(item.pageName))
22431
+ }
22432
22432
  });
22433
- }
22433
+ });
22434
22434
  }
22435
22435
  };
22436
22436
  const hasInstantIdVerification = (dataSubmitted) => {
@@ -1,2 +1,2 @@
1
1
  import { CountryCode } from '../../core/models/country-code';
2
- export declare const stripCountryIdFormat: (value: string, country: CountryCode) => string;
2
+ export declare const stripCountryIdFormat: (value: string | undefined, country: CountryCode) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [