@adyen/kyc-components 3.0.0-beta.24 → 3.0.0-beta.25
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.
|
@@ -9261,12 +9261,14 @@ function CompanyTypeComponent(props) {
|
|
|
9261
9261
|
const {
|
|
9262
9262
|
i18n
|
|
9263
9263
|
} = useI18nContext();
|
|
9264
|
+
const isNewEntryFlowEnabled = useEnableNewEntryFlow();
|
|
9264
9265
|
const stateRef = useRef({
|
|
9265
9266
|
setState: null
|
|
9266
9267
|
});
|
|
9267
9268
|
const {
|
|
9268
9269
|
id: COMPANY_TYPE_ID,
|
|
9269
|
-
requiredFields
|
|
9270
|
+
requiredFields,
|
|
9271
|
+
country: country2
|
|
9270
9272
|
} = props;
|
|
9271
9273
|
const requiredFieldsForForm = requiredFields || companyTypeFields;
|
|
9272
9274
|
const {
|
|
@@ -9330,11 +9332,11 @@ function CompanyTypeComponent(props) {
|
|
|
9330
9332
|
"aria-label": formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
|
|
9331
9333
|
"aria-invalid": !valid.entityType
|
|
9332
9334
|
})
|
|
9333
|
-
}), formUtils.isRequiredField("accountHolder") &&
|
|
9335
|
+
}), !isNewEntryFlowEnabled && formUtils.isRequiredField("accountHolder") && country2 && jsx(AccountHolder, {
|
|
9334
9336
|
...accountHolderProps,
|
|
9335
9337
|
dataStoreId: COMPANY_TYPE_ID,
|
|
9336
9338
|
legalEntityType: LegalEntityType.ORGANIZATION,
|
|
9337
|
-
country:
|
|
9339
|
+
country: country2
|
|
9338
9340
|
})]
|
|
9339
9341
|
})]
|
|
9340
9342
|
});
|
|
@@ -11953,6 +11955,7 @@ const solePropBaseMapping = {
|
|
|
11953
11955
|
"solePropRegistrationDetails.vatAbsenceReason": "soleProprietorship.vatAbsenceReason",
|
|
11954
11956
|
"solePropRegistrationDetails.exemptedFromTax": "soleProprietorship.taxAbsent",
|
|
11955
11957
|
"solePropRegistrationDetails.registrationNumber": "soleProprietorship.registrationNumber",
|
|
11958
|
+
"solePropRegistrationDetails.dateOfIncorporation": "soleProprietorship.dateOfIncorporation",
|
|
11956
11959
|
"solePropRegistrationAddress.registrationAddress.city": "soleProprietorship.registeredAddress.city",
|
|
11957
11960
|
"solePropRegistrationAddress.registrationAddress.country": "soleProprietorship.registeredAddress.country",
|
|
11958
11961
|
"solePropRegistrationAddress.registrationAddress.postalCode": "soleProprietorship.registeredAddress.postalCode",
|
|
@@ -19821,8 +19824,11 @@ function getEntityProblems(verificationErrors, entityType2) {
|
|
|
19821
19824
|
}
|
|
19822
19825
|
case VerificationErrorType.DATA_REVIEW:
|
|
19823
19826
|
currEntityProblems.isReviewRequired = true;
|
|
19824
|
-
currEntityProblems.verificationErrors
|
|
19825
|
-
|
|
19827
|
+
currEntityProblems.verificationErrors = {
|
|
19828
|
+
...currEntityProblems.verificationErrors,
|
|
19829
|
+
review: {
|
|
19830
|
+
[verificationError.code]: verificationError.remediatingActions
|
|
19831
|
+
}
|
|
19826
19832
|
};
|
|
19827
19833
|
currEntityProblems.status = getPriorityStatus(entityProblems, TaskStatus.SUBMIT);
|
|
19828
19834
|
break;
|
|
@@ -22536,13 +22542,21 @@ const mapLegalArrangementOptionToCompanyTypesValue = (legalArrangement) => {
|
|
|
22536
22542
|
return "";
|
|
22537
22543
|
}
|
|
22538
22544
|
};
|
|
22539
|
-
const
|
|
22540
|
-
|
|
22541
|
-
|
|
22542
|
-
|
|
22543
|
-
|
|
22544
|
-
|
|
22545
|
+
const getDefaultLegalArrangementOrSuborganizationType = (legalEntityResponse) => {
|
|
22546
|
+
var _a;
|
|
22547
|
+
const entityAssociations = legalEntityResponse == null ? void 0 : legalEntityResponse.entityAssociations;
|
|
22548
|
+
const suborganizationType = (_a = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _a.type;
|
|
22549
|
+
if (suborganizationType === CompanyTypesValue.INCORPORATED_PARTNERSHIP) {
|
|
22550
|
+
return "partnershipIncorporated";
|
|
22551
|
+
}
|
|
22552
|
+
if (!entityAssociations || entityAssociations.length === 0) {
|
|
22553
|
+
return void 0;
|
|
22554
|
+
}
|
|
22555
|
+
const trust2 = entityAssociations.find((ea) => ea.entityType === LegalEntityType.TRUST);
|
|
22556
|
+
if (trust2) {
|
|
22557
|
+
return "aTrust";
|
|
22545
22558
|
}
|
|
22559
|
+
return void 0;
|
|
22546
22560
|
};
|
|
22547
22561
|
const getTargetLegalEntityType = (businessType, legalArrangement, trusteeType, currentLegalEntityType) => {
|
|
22548
22562
|
if (businessType === "legalArrangement" && legalArrangement === "aTrust" && trusteeType === "company" || businessType === "company") {
|
|
@@ -22685,8 +22699,8 @@ const BusinessTypeSelection = ({
|
|
|
22685
22699
|
const currentLegalEntityType = legalEntityResponse == null ? void 0 : legalEntityResponse.type;
|
|
22686
22700
|
const currentCompanyTypesValue = (_a = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _a.type;
|
|
22687
22701
|
const defaultBusinessType = getBusinessType(businessTypeItems, accountHolder2, legalEntityResponse == null ? void 0 : legalEntityResponse.type, (_b = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _b.type);
|
|
22688
|
-
const
|
|
22689
|
-
const defaultLegalArrangementType =
|
|
22702
|
+
const getDefaultLegalArrangementSelection = () => legalArrangementItems.find((item) => item.id === getDefaultLegalArrangementOrSuborganizationType(legalEntityResponse));
|
|
22703
|
+
const defaultLegalArrangementType = getDefaultLegalArrangementSelection();
|
|
22690
22704
|
const defaultTrusteeType = legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? trusteeTypeItems[0] : trusteeTypeItems[1];
|
|
22691
22705
|
const {
|
|
22692
22706
|
handleChangeFor,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CompanyTypesValue } from '../../core/models/api/company-types-value';
|
|
2
|
+
import { ExistingLegalEntity } from '../../core/models/api/legal-entity';
|
|
2
3
|
import { LegalEntityType } from '../../core/models/api/legal-entity-type';
|
|
3
4
|
import { AccountHolderOption, LegalArrangementOption } from '../internal/AccountHolder/types';
|
|
4
5
|
import { BusinessType, BusinessTypeModel, TrusteeType } from './types';
|
|
@@ -20,5 +21,5 @@ export declare const getBusinessType: (businessTypeItems: readonly BusinessTypeM
|
|
|
20
21
|
*
|
|
21
22
|
*/
|
|
22
23
|
export declare const mapLegalArrangementOptionToCompanyTypesValue: (legalArrangement: LegalArrangementOption | undefined) => CompanyTypesValue | '';
|
|
23
|
-
export declare const
|
|
24
|
+
export declare const getDefaultLegalArrangementOrSuborganizationType: (legalEntityResponse: ExistingLegalEntity | undefined) => LegalArrangementOption | undefined;
|
|
24
25
|
export declare const getTargetLegalEntityType: (businessType: BusinessType | undefined, legalArrangement: LegalArrangementOption | undefined, trusteeType: TrusteeType | undefined, currentLegalEntityType: LegalEntityType | undefined) => LegalEntityType;
|
|
@@ -101,6 +101,7 @@ export declare const solePropComponentsKeyMapping: {
|
|
|
101
101
|
'solePropRegistrationDetails.vatAbsenceReason': string;
|
|
102
102
|
'solePropRegistrationDetails.exemptedFromTax': string;
|
|
103
103
|
'solePropRegistrationDetails.registrationNumber': string;
|
|
104
|
+
'solePropRegistrationDetails.dateOfIncorporation': string;
|
|
104
105
|
'solePropRegistrationAddress.registrationAddress.city': string;
|
|
105
106
|
'solePropRegistrationAddress.registrationAddress.country': string;
|
|
106
107
|
'solePropRegistrationAddress.registrationAddress.postalCode': string;
|
|
@@ -116,7 +117,7 @@ export declare const solePropComponentsKeyMapping: {
|
|
|
116
117
|
'solePropRegistrationDetails.exemptedFromVat': string;
|
|
117
118
|
};
|
|
118
119
|
export declare const solePropApiKeyMapping: {
|
|
119
|
-
[x: string]: "solePropNameAndCountry.country" | "solePropNameAndCountry.legalCompanyName" | "solePropRegistrationDetails.tradingName" | "solePropRegistrationDetails.exemptedFromTax" | "solePropRegistrationDetails.vatNumber" | "solePropRegistrationDetails.registrationNumber" | "solePropRegistrationDetails.vatAbsenceReason" | "solePropRegistrationAddress.registrationAddress.country" | "solePropRegistrationAddress.registrationAddress.postalCode" | "solePropRegistrationAddress.registrationAddress.city" | "solePropRegistrationAddress.registrationAddress.stateOrProvince" | "solePropRegistrationAddress.registrationAddress.otherAddressInformation" | "solePropRegistrationAddress.registrationAddress.address" | "solePropRegistrationAddress.operationalAddress.country" | "solePropRegistrationAddress.operationalAddress.postalCode" | "solePropRegistrationAddress.operationalAddress.city" | "solePropRegistrationAddress.operationalAddress.stateOrProvince" | "solePropRegistrationAddress.operationalAddress.otherAddressInformation" | "solePropRegistrationAddress.operationalAddress.address";
|
|
120
|
+
[x: string]: "solePropNameAndCountry.country" | "solePropNameAndCountry.legalCompanyName" | "solePropRegistrationDetails.dateOfIncorporation" | "solePropRegistrationDetails.tradingName" | "solePropRegistrationDetails.exemptedFromTax" | "solePropRegistrationDetails.vatNumber" | "solePropRegistrationDetails.registrationNumber" | "solePropRegistrationDetails.vatAbsenceReason" | "solePropRegistrationAddress.registrationAddress.country" | "solePropRegistrationAddress.registrationAddress.postalCode" | "solePropRegistrationAddress.registrationAddress.city" | "solePropRegistrationAddress.registrationAddress.stateOrProvince" | "solePropRegistrationAddress.registrationAddress.otherAddressInformation" | "solePropRegistrationAddress.registrationAddress.address" | "solePropRegistrationAddress.operationalAddress.country" | "solePropRegistrationAddress.operationalAddress.postalCode" | "solePropRegistrationAddress.operationalAddress.city" | "solePropRegistrationAddress.operationalAddress.stateOrProvince" | "solePropRegistrationAddress.operationalAddress.otherAddressInformation" | "solePropRegistrationAddress.operationalAddress.address";
|
|
120
121
|
};
|
|
121
122
|
/**
|
|
122
123
|
* Base api mappings do not contain document mappings as the api used for document upload is different
|