@adyen/kyc-components 3.17.0 → 3.17.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.
@@ -14021,7 +14021,8 @@ const mapLegalEntityToSoleProp = (legalEntity) => {
14021
14021
  }
14022
14022
  return solePropCompData;
14023
14023
  };
14024
- const mapSolePropToLegalEntity = (data) => {
14024
+ const mapSolePropToLegalEntity = (data, isCountryOfGoverningLawEnabled = false) => {
14025
+ var _a;
14025
14026
  const requestObj = {
14026
14027
  ...formatObject(data, solePropApiKeyMapping)
14027
14028
  };
@@ -14040,6 +14041,9 @@ const mapSolePropToLegalEntity = (data) => {
14040
14041
  if (data.solePropRegistrationDetails.exemptedFromRegistrationNumber) {
14041
14042
  requestObj.soleProprietorship.registrationNumber = "";
14042
14043
  }
14044
+ if (!isCountryOfGoverningLawEnabled && ((_a = data.solePropNameAndCountry) == null ? void 0 : _a.country)) {
14045
+ requestObj.soleProprietorship.countryOfGoverningLaw = data.solePropNameAndCountry.country;
14046
+ }
14043
14047
  requestObj.type = LegalEntityType.SOLE_PROPRIETORSHIP;
14044
14048
  return requestObj;
14045
14049
  };
@@ -32598,7 +32602,7 @@ function SolePropDropinComponent({
32598
32602
  const dataSubmitted = data;
32599
32603
  setLoadingStatus("loading");
32600
32604
  try {
32601
- const legalEntity = await handleSubmitLegalEntity(mapSolePropToLegalEntity(dataSubmitted));
32605
+ const legalEntity = await handleSubmitLegalEntity(mapSolePropToLegalEntity(dataSubmitted, isCountryOfGoverningLawEnabled));
32602
32606
  await submitDocuments2({
32603
32607
  forms: forms2,
32604
32608
  legalEntity,
@@ -35932,7 +35936,7 @@ const ConfigurationApiProvider = ({
35932
35936
  isEmbeddedDropin,
35933
35937
  loadingContext
35934
35938
  } = authContext;
35935
- const sdkVersion = "3.17.0";
35939
+ const sdkVersion = "3.17.1";
35936
35940
  useAnalytics({
35937
35941
  onUserEvent,
35938
35942
  legalEntityId: rootLegalEntityId,
@@ -35,7 +35,7 @@ export declare const mapCompanyToLegalEntity: (data: CompanySchema) => LegalEnti
35
35
  export declare const mapLegalEntityToTrust: (legalEntity: LegalEntity) => TrustSchema;
36
36
  export declare const mapTrustToLegalEntity: (data: TrustSchema) => LegalEntity;
37
37
  export declare const mapLegalEntityToSoleProp: (legalEntity: LegalEntity) => SolePropSchema;
38
- export declare const mapSolePropToLegalEntity: (data: SolePropSchema) => LegalEntity;
38
+ export declare const mapSolePropToLegalEntity: (data: SolePropSchema, isCountryOfGoverningLawEnabled?: boolean) => LegalEntity;
39
39
  export type IndividualDocumentFields = Pick<IndividualSchema, 'idDocument' | 'proofOfResidence' | 'proofOfNationalId'>;
40
40
  export declare const getPage: ({ attachments }: Document, pageType?: PageType) => Attachment;
41
41
  export declare const getPageName: (document: Document, pageType?: PageType) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.17.0",
3
+ "version": "3.17.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [