@adyen/kyc-components 2.4.2 → 2.4.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.
@@ -12104,7 +12104,7 @@ function formatSwedenPersonnummer(value) {
12104
12104
  }
12105
12105
  const formattedCountries = [CountryCodes.Denmark, CountryCodes.Sweden];
12106
12106
  const stripCountryIdFormat = (value, country2) => {
12107
- if (formattedCountries.includes(country2)) {
12107
+ if (value && formattedCountries.includes(country2)) {
12108
12108
  return cleanNonNumbers(value);
12109
12109
  }
12110
12110
  return value;
@@ -22857,22 +22857,22 @@ function IndividualDropinComponent({
22857
22857
  legalEntity,
22858
22858
  dataSubmitted
22859
22859
  }) => {
22860
- if (isDocumentsRequired2(forms2)) {
22861
- if (hasInstantIdVerification(dataSubmitted)) {
22862
- await handleInstantIdVerificationStartCheck(dataSubmitted.idDocument.instantIdVerificationData, legalEntity.id);
22863
- } else {
22864
- const formattedDocument = await mapIndividualDocumentToApiDocument(dataSubmitted, legalEntity.id);
22865
- await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
22866
- formattedDocument == null ? void 0 : formattedDocument.forEach((doc) => {
22867
- userEvents.addEvent("Saved document", {
22868
- segmentation: {
22869
- ...baseTrackingPayload,
22870
- documentType: doc.type,
22871
- fileExtention: doc.attachments.map((item) => getFileExtention(item.pageName))
22872
- }
22873
- });
22860
+ if (!isDocumentsRequired2(forms2))
22861
+ return;
22862
+ if (hasInstantIdVerification(dataSubmitted)) {
22863
+ await handleInstantIdVerificationStartCheck(dataSubmitted.idDocument.instantIdVerificationData, legalEntity.id);
22864
+ } else {
22865
+ const formattedDocuments = await mapIndividualDocumentToApiDocument(dataSubmitted, legalEntity.id);
22866
+ const uploadedDocuments = await documentUtils.uploadDocuments(formattedDocuments, legalEntity.id);
22867
+ uploadedDocuments == null ? void 0 : uploadedDocuments.forEach((doc) => {
22868
+ userEvents.addEvent("Saved document", {
22869
+ segmentation: {
22870
+ ...baseTrackingPayload,
22871
+ documentType: doc.type,
22872
+ fileExtention: doc.attachments.map((item) => getFileExtention(item.pageName))
22873
+ }
22874
22874
  });
22875
- }
22875
+ });
22876
22876
  }
22877
22877
  };
22878
22878
  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.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [