@adyen/kyc-components 3.15.0 → 3.15.2
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.
- package/dist/es/adyen-kyc-components.es.js +55 -46
- package/dist/types/components/BusinessTypeSelection/utils.d.ts +2 -1
- package/dist/types/components/Dropins/CompanyDropin/components/CompanyDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/CompanyDropin/types.d.ts +2 -0
- package/dist/types/components/internal/AccountHolder/types.d.ts +1 -1
- package/dist/types/utils/accountHolderUtils.d.ts +1 -1
- package/dist/types/utils/mapping/mapping.d.ts +2 -1
- package/package.json +2 -6
- package/dist/types/core/Context/ReactQueryContext/ReactQueryClient.d.ts +0 -2
- package/dist/types/core/Context/ReactQueryContext/ReactQueryProvider.d.ts +0 -4
|
@@ -10,7 +10,6 @@ import OpenBankingSDK from "@adyen/openbankingsdk";
|
|
|
10
10
|
import { jsxs as jsxs$1, jsx as jsx$1 } from "preact/compat/jsx-runtime";
|
|
11
11
|
import "@adyen/adyen-document-viewer/dist/adyen-document-viewer.min.css";
|
|
12
12
|
import AdyenDocumentViewer from "@adyen/adyen-document-viewer";
|
|
13
|
-
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
14
13
|
const ConfigurationApiContext = createContext(void 0);
|
|
15
14
|
const useConfigurationApi = () => {
|
|
16
15
|
const configurationApi = useContext(ConfigurationApiContext);
|
|
@@ -10258,7 +10257,10 @@ const entityTypeToCorrespondingAccountHolderOption = {
|
|
|
10258
10257
|
[LegalEntityType.SOLE_PROPRIETORSHIP]: "mySoleProprietorName",
|
|
10259
10258
|
[LegalEntityType.TRUST]: "aTrust"
|
|
10260
10259
|
};
|
|
10261
|
-
const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false) => {
|
|
10260
|
+
const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false, accountHolder2) => {
|
|
10261
|
+
if (accountHolder2) {
|
|
10262
|
+
return accountHolder2;
|
|
10263
|
+
}
|
|
10262
10264
|
if (!(legalEntityResponse == null ? void 0 : legalEntityResponse.type))
|
|
10263
10265
|
return void 0;
|
|
10264
10266
|
if (hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, legalEntityResponse.entityAssociations, legalEntityResponse.id)) {
|
|
@@ -10511,6 +10513,7 @@ const companyTypeValidationRules = {
|
|
|
10511
10513
|
};
|
|
10512
10514
|
const companyTypeFields = ["entityType", ...accountHolderFields];
|
|
10513
10515
|
function CompanyTypeComponent(props) {
|
|
10516
|
+
var _a;
|
|
10514
10517
|
const {
|
|
10515
10518
|
i18n
|
|
10516
10519
|
} = useI18nContext();
|
|
@@ -10541,8 +10544,8 @@ function CompanyTypeComponent(props) {
|
|
|
10541
10544
|
const formUtils = formUtilities(props, i18n);
|
|
10542
10545
|
const accountHolderProps = getFieldProps(props, accountHolderFields);
|
|
10543
10546
|
useEffect(() => {
|
|
10544
|
-
var
|
|
10545
|
-
(_b = (
|
|
10547
|
+
var _a2, _b;
|
|
10548
|
+
(_b = (_a2 = stateRef.current) == null ? void 0 : _a2.setState) == null ? void 0 : _b.call(_a2, {
|
|
10546
10549
|
type: "addToState",
|
|
10547
10550
|
value: {
|
|
10548
10551
|
data,
|
|
@@ -10555,7 +10558,7 @@ function CompanyTypeComponent(props) {
|
|
|
10555
10558
|
}
|
|
10556
10559
|
});
|
|
10557
10560
|
}, [data, valid, errors, isValid]);
|
|
10558
|
-
const companyTypeOptions = isNewEntryFlowEnabled ? companyTypes.filter((companyType2) => companyType2.id !== CompanyTypesValue.INCORPORATED_PARTNERSHIP && companyType2.id !== CompanyTypesValue.INCORPORATED_ASSOCIATION) : companyTypes;
|
|
10561
|
+
const companyTypeOptions = isNewEntryFlowEnabled && ((_a = props.data) == null ? void 0 : _a.accountHolder) !== "aTrust" ? companyTypes.filter((companyType2) => companyType2.id !== CompanyTypesValue.INCORPORATED_PARTNERSHIP && companyType2.id !== CompanyTypesValue.INCORPORATED_ASSOCIATION) : companyTypes;
|
|
10559
10562
|
const companyTypeExamples2 = useCompanyTypeExamples(country2);
|
|
10560
10563
|
return jsxs(Fragment, {
|
|
10561
10564
|
children: [jsx(StateContextSetter, {
|
|
@@ -13594,7 +13597,7 @@ const mapIndividualToLegalEntity = (data) => {
|
|
|
13594
13597
|
}
|
|
13595
13598
|
return requestObj;
|
|
13596
13599
|
};
|
|
13597
|
-
const mapLegalEntityToCompany = (legalEntity, isChangingType) => {
|
|
13600
|
+
const mapLegalEntityToCompany = (legalEntity, isChangingType, accountHolder2) => {
|
|
13598
13601
|
var _a, _b, _c, _d;
|
|
13599
13602
|
let companyCompData;
|
|
13600
13603
|
if (legalEntity == null ? void 0 : legalEntity.organization) {
|
|
@@ -13639,7 +13642,7 @@ const mapLegalEntityToCompany = (legalEntity, isChangingType) => {
|
|
|
13639
13642
|
...companyCompData,
|
|
13640
13643
|
companyType: {
|
|
13641
13644
|
...companyCompData == null ? void 0 : companyCompData.companyType,
|
|
13642
|
-
accountHolder: getDefaultAccountHolderType(legalEntity, isChangingType)
|
|
13645
|
+
accountHolder: getDefaultAccountHolderType(legalEntity, isChangingType, accountHolder2)
|
|
13643
13646
|
}
|
|
13644
13647
|
};
|
|
13645
13648
|
return companyCompData;
|
|
@@ -22879,23 +22882,35 @@ const mapLegalArrangementOptionToCompanyTypesValue = (legalArrangement) => {
|
|
|
22879
22882
|
case "associationIncorporated":
|
|
22880
22883
|
return CompanyTypesValue.INCORPORATED_ASSOCIATION;
|
|
22881
22884
|
default:
|
|
22885
|
+
return void 0;
|
|
22886
|
+
}
|
|
22887
|
+
};
|
|
22888
|
+
const determineOrganizationTypeToUpdate = (defaultLegalArrangement, targetLegalArrangement, currentCompanyTypeValue) => {
|
|
22889
|
+
if (targetLegalArrangement === "aTrust") {
|
|
22890
|
+
return;
|
|
22891
|
+
}
|
|
22892
|
+
if (!targetLegalArrangement) {
|
|
22893
|
+
const isUnavailableTypesInCompany = currentCompanyTypeValue === CompanyTypesValue.INCORPORATED_ASSOCIATION || currentCompanyTypeValue === CompanyTypesValue.INCORPORATED_PARTNERSHIP;
|
|
22894
|
+
if (isUnavailableTypesInCompany) {
|
|
22882
22895
|
return "";
|
|
22896
|
+
}
|
|
22883
22897
|
}
|
|
22898
|
+
return mapLegalArrangementOptionToCompanyTypesValue(targetLegalArrangement);
|
|
22884
22899
|
};
|
|
22885
22900
|
const getDefaultLegalArrangementOrSuborganizationType = (legalEntityResponse, accountHolder2) => {
|
|
22886
22901
|
var _a;
|
|
22887
22902
|
const entityAssociations = legalEntityResponse == null ? void 0 : legalEntityResponse.entityAssociations;
|
|
22888
22903
|
const suborganizationType = (_a = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _a.type;
|
|
22904
|
+
const hasTrust = hasOwnEntityAssociationOfType(LegalEntityType.TRUST, entityAssociations, legalEntityResponse == null ? void 0 : legalEntityResponse.id);
|
|
22905
|
+
if (hasTrust || accountHolder2 === "aTrust") {
|
|
22906
|
+
return "aTrust";
|
|
22907
|
+
}
|
|
22889
22908
|
if (suborganizationType === CompanyTypesValue.INCORPORATED_PARTNERSHIP) {
|
|
22890
22909
|
return "partnershipIncorporated";
|
|
22891
22910
|
}
|
|
22892
22911
|
if (suborganizationType === CompanyTypesValue.INCORPORATED_ASSOCIATION) {
|
|
22893
22912
|
return "associationIncorporated";
|
|
22894
22913
|
}
|
|
22895
|
-
const hasTrust = hasOwnEntityAssociationOfType(LegalEntityType.TRUST, entityAssociations, legalEntityResponse == null ? void 0 : legalEntityResponse.id);
|
|
22896
|
-
if (hasTrust || accountHolder2 === "aTrust") {
|
|
22897
|
-
return "aTrust";
|
|
22898
|
-
}
|
|
22899
22914
|
return void 0;
|
|
22900
22915
|
};
|
|
22901
22916
|
const getTargetLegalEntityType = (businessType, legalArrangement, trusteeType, currentLegalEntityType) => {
|
|
@@ -22905,11 +22920,12 @@ const getTargetLegalEntityType = (businessType, legalArrangement, trusteeType, c
|
|
|
22905
22920
|
if (businessType === "legalArrangement" && legalArrangement === "aTrust" && trusteeType === "individual" || businessType === "individual" || businessType === "soleProprietorship") {
|
|
22906
22921
|
return LegalEntityType.INDIVIDUAL;
|
|
22907
22922
|
}
|
|
22908
|
-
if (legalArrangement
|
|
22923
|
+
if (legalArrangement && isLegalArrangementOrganizationSubtype(legalArrangement)) {
|
|
22909
22924
|
return LegalEntityType.ORGANIZATION;
|
|
22910
22925
|
}
|
|
22911
22926
|
return currentLegalEntityType;
|
|
22912
22927
|
};
|
|
22928
|
+
const isLegalArrangementOrganizationSubtype = (legalArrangementOption) => legalArrangementOption === "partnershipIncorporated" || legalArrangementOption === "associationIncorporated";
|
|
22913
22929
|
var ToastType = /* @__PURE__ */ ((ToastType2) => {
|
|
22914
22930
|
ToastType2["LOADING"] = "loading";
|
|
22915
22931
|
ToastType2["SUCCESS"] = "success";
|
|
@@ -23219,7 +23235,8 @@ function CompanyDropinComponent({
|
|
|
23219
23235
|
handleUpdateLegalEntity,
|
|
23220
23236
|
handleHomeClick,
|
|
23221
23237
|
onTypeSwitch,
|
|
23222
|
-
onChange
|
|
23238
|
+
onChange,
|
|
23239
|
+
accountHolder: accountHolder2
|
|
23223
23240
|
}) {
|
|
23224
23241
|
var _a, _b;
|
|
23225
23242
|
const {
|
|
@@ -23236,7 +23253,8 @@ function CompanyDropinComponent({
|
|
|
23236
23253
|
i18n,
|
|
23237
23254
|
setLocale
|
|
23238
23255
|
} = useI18nContext();
|
|
23239
|
-
const
|
|
23256
|
+
const isNewEntryFlowEnabled = useEnableNewEntryFlow();
|
|
23257
|
+
const dataFromResponse = mapLegalEntityToCompany(legalEntityResponse, isTargetLegalEntityType, isNewEntryFlowEnabled ? accountHolder2 : void 0);
|
|
23240
23258
|
const {
|
|
23241
23259
|
getConfiguration: getConfiguration2
|
|
23242
23260
|
} = useConfigurationApi();
|
|
@@ -23292,7 +23310,7 @@ function CompanyDropinComponent({
|
|
|
23292
23310
|
});
|
|
23293
23311
|
onChange == null ? void 0 : onChange(currentState);
|
|
23294
23312
|
}, [currentState]);
|
|
23295
|
-
const isSkippingCompanyStructure = useEnableNewEntryFlow() && organizationTypesToSkipCompanyStructureForm.includes((_b = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _b.type);
|
|
23313
|
+
const isSkippingCompanyStructure = useEnableNewEntryFlow() && organizationTypesToSkipCompanyStructureForm.includes((_b = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _b.type) && accountHolder2 !== "aTrust";
|
|
23296
23314
|
const forms2 = useMemo(() => {
|
|
23297
23315
|
const requiredForms = getRequiredForms(companyForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
|
|
23298
23316
|
const validityAddedForms = addValidityToForms(requiredForms, formValidity, problems);
|
|
@@ -26744,18 +26762,15 @@ const BusinessTypeSelection = ({
|
|
|
26744
26762
|
type: targetLegalEntityType
|
|
26745
26763
|
};
|
|
26746
26764
|
await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity(updateLegalEntityPayload, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
|
|
26747
|
-
if (targetLegalEntityType === LegalEntityType.ORGANIZATION && targetLegalEntityType) {
|
|
26748
|
-
await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity({
|
|
26749
|
-
organization: {
|
|
26750
|
-
type: mapLegalArrangementOptionToCompanyTypesValue(targetLegalArrangement)
|
|
26751
|
-
}
|
|
26752
|
-
}, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
|
|
26753
|
-
}
|
|
26754
26765
|
}
|
|
26755
|
-
if (
|
|
26766
|
+
if (targetLegalEntityType === LegalEntityType.INDIVIDUAL) {
|
|
26767
|
+
return;
|
|
26768
|
+
}
|
|
26769
|
+
const targetOrganizationType = determineOrganizationTypeToUpdate(defaultLegalArrangementType == null ? void 0 : defaultLegalArrangementType.id, targetLegalArrangement, currentCompanyTypesValue);
|
|
26770
|
+
if (targetOrganizationType !== void 0) {
|
|
26756
26771
|
await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity({
|
|
26757
26772
|
organization: {
|
|
26758
|
-
type:
|
|
26773
|
+
type: targetOrganizationType
|
|
26759
26774
|
}
|
|
26760
26775
|
}, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
|
|
26761
26776
|
}
|
|
@@ -31967,11 +31982,8 @@ const getDefaultTask = ({
|
|
|
31967
31982
|
showIntroduction,
|
|
31968
31983
|
shouldShowSingpassSelection
|
|
31969
31984
|
}) => {
|
|
31970
|
-
|
|
31971
|
-
|
|
31972
|
-
const hasOrganizationType = (_b = legalEntity.organization) == null ? void 0 : _b.type;
|
|
31973
|
-
const hasProgressedBeyondEntitySelection = hasOwnEntityAssocation || !!hasOrganizationType;
|
|
31974
|
-
if (isNewEntryFlowEnabled && !accountHolder2 && !hasProgressedBeyondEntitySelection)
|
|
31985
|
+
const hasLegalEntityProgressedBeyondEntitySelection = hasProgressedBeyondEntitySelection(legalEntity);
|
|
31986
|
+
if (isNewEntryFlowEnabled && !accountHolder2 && !hasLegalEntityProgressedBeyondEntitySelection)
|
|
31975
31987
|
return TaskTypes.BUSINESS_TYPE_SELECTION;
|
|
31976
31988
|
if (showIntroduction)
|
|
31977
31989
|
return TaskTypes.INTRODUCTION;
|
|
@@ -31979,6 +31991,12 @@ const getDefaultTask = ({
|
|
|
31979
31991
|
return TaskTypes.SINGPASS_SELECTION;
|
|
31980
31992
|
return TaskTypes.TASKS_OVERVIEW;
|
|
31981
31993
|
};
|
|
31994
|
+
const hasProgressedBeyondEntitySelection = (legalEntity) => {
|
|
31995
|
+
var _a, _b;
|
|
31996
|
+
const hasOwnEntityAssocation = (_a = legalEntity.entityAssociations) == null ? void 0 : _a.some((ea) => ea.associatorId === legalEntity.id);
|
|
31997
|
+
const hasOrganizationType = (_b = legalEntity.organization) == null ? void 0 : _b.type;
|
|
31998
|
+
return hasOwnEntityAssocation || !!hasOrganizationType;
|
|
31999
|
+
};
|
|
31982
32000
|
const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
31983
32001
|
const POLLING_INTERVAL = 3e3;
|
|
31984
32002
|
const logger$b = createLogger("DropinComposerComponent");
|
|
@@ -32787,7 +32805,8 @@ function DropinComposerComponent({
|
|
|
32787
32805
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
32788
32806
|
handleFindAddress: args == null ? void 0 : args.handleFindAddress,
|
|
32789
32807
|
onTypeSwitch: navigateToTypeSwitcher,
|
|
32790
|
-
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
32808
|
+
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION,
|
|
32809
|
+
accountHolder: accountHolder2
|
|
32791
32810
|
});
|
|
32792
32811
|
case TaskTypes.COMPANY_SEARCH:
|
|
32793
32812
|
return jsx(CompanySearchDropinComponent, {
|
|
@@ -32844,7 +32863,8 @@ function DropinComposerComponent({
|
|
|
32844
32863
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
32845
32864
|
associationDetail: trustMember,
|
|
32846
32865
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
32847
|
-
handleFindAddress: args == null ? void 0 : args.handleFindAddress
|
|
32866
|
+
handleFindAddress: args == null ? void 0 : args.handleFindAddress,
|
|
32867
|
+
accountHolder: accountHolder2
|
|
32848
32868
|
});
|
|
32849
32869
|
case TaskTypes.PAYOUT:
|
|
32850
32870
|
case TaskTypes.PAYIN:
|
|
@@ -34799,7 +34819,7 @@ const ConfigurationApiProvider = ({
|
|
|
34799
34819
|
isEmbeddedDropin,
|
|
34800
34820
|
loadingContext
|
|
34801
34821
|
} = authContext;
|
|
34802
|
-
const sdkVersion = "3.15.
|
|
34822
|
+
const sdkVersion = "3.15.2";
|
|
34803
34823
|
useAnalytics({
|
|
34804
34824
|
onUserEvent,
|
|
34805
34825
|
legalEntityId: rootLegalEntityId,
|
|
@@ -34958,15 +34978,6 @@ const I18nProvider = ({
|
|
|
34958
34978
|
children
|
|
34959
34979
|
});
|
|
34960
34980
|
};
|
|
34961
|
-
const ReactQueryClient = new QueryClient();
|
|
34962
|
-
function ReactQueryProvider({
|
|
34963
|
-
children
|
|
34964
|
-
}) {
|
|
34965
|
-
return jsx(QueryClientProvider, {
|
|
34966
|
-
client: ReactQueryClient,
|
|
34967
|
-
children
|
|
34968
|
-
});
|
|
34969
|
-
}
|
|
34970
34981
|
const settingsDefaults = {
|
|
34971
34982
|
acceptedCountries: void 0,
|
|
34972
34983
|
allowBankAccountFormatSelection: false,
|
|
@@ -35321,11 +35332,9 @@ class UIElement extends BaseElement {
|
|
|
35321
35332
|
children: jsx(AutoResizer, {
|
|
35322
35333
|
children: jsx(ToastContextProvider, {
|
|
35323
35334
|
children: jsx(StateProvider, {
|
|
35324
|
-
children: jsx(
|
|
35325
|
-
|
|
35326
|
-
|
|
35327
|
-
eventEmitter: this.eventEmitter
|
|
35328
|
-
})
|
|
35335
|
+
children: jsx(Component, {
|
|
35336
|
+
...this.props.componentProps,
|
|
35337
|
+
eventEmitter: this.eventEmitter
|
|
35329
35338
|
})
|
|
35330
35339
|
})
|
|
35331
35340
|
})
|
|
@@ -30,6 +30,7 @@ export declare const useSelectionOptions: (legalEntityResponse: ExistingLegalEnt
|
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
32
|
*/
|
|
33
|
-
export declare const mapLegalArrangementOptionToCompanyTypesValue: (legalArrangement: LegalArrangementOption | undefined) => CompanyTypesValue |
|
|
33
|
+
export declare const mapLegalArrangementOptionToCompanyTypesValue: (legalArrangement: LegalArrangementOption | undefined) => CompanyTypesValue | undefined;
|
|
34
|
+
export declare const determineOrganizationTypeToUpdate: (defaultLegalArrangement?: LegalArrangementOption, targetLegalArrangement?: LegalArrangementOption, currentCompanyTypeValue?: CompanyTypesValue) => CompanyTypesValue | '' | undefined;
|
|
34
35
|
export declare const getDefaultLegalArrangementOrSuborganizationType: (legalEntityResponse: ExistingLegalEntity | undefined, accountHolder: AccountHolderOption | null) => LegalArrangementOption | undefined;
|
|
35
36
|
export declare const getTargetLegalEntityType: (businessType: BusinessType | undefined, legalArrangement: LegalArrangementOption | undefined, trusteeType: TrusteeType | undefined, currentLegalEntityType: LegalEntityType | undefined) => LegalEntityType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { CompanyDropinProps } from '../types';
|
|
2
|
-
export declare function CompanyDropinComponent({ country: parentCountry, problems: propProblems, hideDropinLayout, taskName, capabilities, homeButtonLabel, taskType, trackingConfig, associationDetail, parentLegalEntity, legalEntityResponse, isTargetLegalEntityType, eventEmitter, onSubmit: onExternalSubmit, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleCreateLegalEntity, handleUpdateLegalEntity, handleHomeClick, onTypeSwitch, onChange, }: CompanyDropinProps): import("preact").JSX.Element;
|
|
2
|
+
export declare function CompanyDropinComponent({ country: parentCountry, problems: propProblems, hideDropinLayout, taskName, capabilities, homeButtonLabel, taskType, trackingConfig, associationDetail, parentLegalEntity, legalEntityResponse, isTargetLegalEntityType, eventEmitter, onSubmit: onExternalSubmit, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleCreateLegalEntity, handleUpdateLegalEntity, handleHomeClick, onTypeSwitch, onChange, accountHolder, }: CompanyDropinProps): import("preact").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
|
|
2
2
|
import type { CompanyProps, CompanySchema } from '../../Company/types';
|
|
3
|
+
import type { AccountHolderOption } from '../../internal/AccountHolder/types';
|
|
3
4
|
import type { TrustMember } from '../../TrustMembers/types';
|
|
4
5
|
import type { DropinAPIHandlers, DropinProps } from '../types';
|
|
5
6
|
export interface CompanyDropinProps extends Omit<CompanyProps, 'isTopLevelEntity'>, DropinAPIHandlers, DropinProps {
|
|
@@ -7,4 +8,5 @@ export interface CompanyDropinProps extends Omit<CompanyProps, 'isTopLevelEntity
|
|
|
7
8
|
associationDetail?: TrustMember;
|
|
8
9
|
isTargetLegalEntityType?: boolean;
|
|
9
10
|
onSubmit?: (company: CompanySchema) => void;
|
|
11
|
+
accountHolder?: AccountHolderOption;
|
|
10
12
|
}
|
|
@@ -2,7 +2,7 @@ import type { BaseInnerFormProps } from '../../../core/hooks/useForm';
|
|
|
2
2
|
import type { LegalEntityType } from '../../../core/models/api/legal-entity-type';
|
|
3
3
|
import type { CountryCode } from '../../../core/models/country-code';
|
|
4
4
|
export type LegalArrangementOption = 'aTrust' | 'partnershipIncorporated' | 'partnershipUnincorporated' | 'associationIncorporated';
|
|
5
|
-
export type AccountHolderOption = 'myName' | 'mySoleProprietorName' | 'theCompanyIWorkFor' |
|
|
5
|
+
export type AccountHolderOption = 'myName' | 'mySoleProprietorName' | 'theCompanyIWorkFor' | 'aTrust';
|
|
6
6
|
export interface AccountHolderSchema {
|
|
7
7
|
accountHolder?: AccountHolderOption;
|
|
8
8
|
}
|
|
@@ -7,5 +7,5 @@ export declare const entityTypeToCorrespondingAccountHolderOption: Record<LegalE
|
|
|
7
7
|
** Account holder option is not stored in backend as it does not effect any check evaluations.
|
|
8
8
|
** The value is computed in the front end based on the associations and current flow of the legalEntity
|
|
9
9
|
* */
|
|
10
|
-
export declare const getDefaultAccountHolderType: (legalEntityResponse: ExistingLegalEntity | undefined, isTypeChanging?: boolean) => AccountHolderOption | undefined;
|
|
10
|
+
export declare const getDefaultAccountHolderType: (legalEntityResponse: ExistingLegalEntity | undefined, isTypeChanging?: boolean, accountHolder?: AccountHolderOption) => AccountHolderOption | undefined;
|
|
11
11
|
export declare const allowIndividualWithoutSoleProp: (capabilities: CapabilityName[]) => boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BankDocumentSchema } from '../../components/BankDocument/types';
|
|
2
2
|
import type { CompanySchema } from '../../components/Company/types';
|
|
3
3
|
import type { IndividualSchema } from '../../components/Individual/types';
|
|
4
|
+
import type { AccountHolderOption } from '../../components/internal/AccountHolder/types';
|
|
4
5
|
import type { PayoutDetailsSchema } from '../../components/PayoutDetails/types';
|
|
5
6
|
import type { PersonalDetailsSchema } from '../../components/PersonalDetails/types';
|
|
6
7
|
import type { SolePropSchema } from '../../components/SoleProp/types';
|
|
@@ -29,7 +30,7 @@ export declare const mapPayoutDetailsToTransferInstrument: ({ data, legalEntity,
|
|
|
29
30
|
}) => TransferInstrument;
|
|
30
31
|
export declare const mapLegalEntityToIndividual: (legalEntity: ExistingLegalEntity | undefined, isChangingType?: boolean) => IndividualSchema;
|
|
31
32
|
export declare const mapIndividualToLegalEntity: (data: IndividualSchema) => LegalEntity;
|
|
32
|
-
export declare const mapLegalEntityToCompany: (legalEntity: ExistingLegalEntity, isChangingType: boolean) => CompanySchema;
|
|
33
|
+
export declare const mapLegalEntityToCompany: (legalEntity: ExistingLegalEntity, isChangingType: boolean, accountHolder?: AccountHolderOption) => CompanySchema;
|
|
33
34
|
export declare const mapCompanyToLegalEntity: (data: CompanySchema) => LegalEntity;
|
|
34
35
|
export declare const mapLegalEntityToTrust: (legalEntity: LegalEntity) => TrustSchema;
|
|
35
36
|
export declare const mapTrustToLegalEntity: (data: TrustSchema) => LegalEntity;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/kyc-components",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -70,7 +70,6 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@adyen/adyen-document-viewer": "^1.1.0",
|
|
72
72
|
"@adyen/openbankingsdk": "^0.1.2",
|
|
73
|
-
"@tanstack/react-query": "^5.31.0",
|
|
74
73
|
"classnames": "^2.3.2",
|
|
75
74
|
"isomorphic-dompurify": "^0.13.0",
|
|
76
75
|
"lodash": "^4.17.21",
|
|
@@ -89,7 +88,6 @@
|
|
|
89
88
|
"@storybook/core-server": "^8.0.4",
|
|
90
89
|
"@storybook/preact": "^8.0.4",
|
|
91
90
|
"@storybook/preact-vite": "^8.0.4",
|
|
92
|
-
"@tanstack/eslint-plugin-query": "^4.38.0",
|
|
93
91
|
"@testing-library/jest-dom": "^5.17.0",
|
|
94
92
|
"@testing-library/preact": "^3.2.3",
|
|
95
93
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -143,9 +141,7 @@
|
|
|
143
141
|
},
|
|
144
142
|
"@storybook/preact-vite": {
|
|
145
143
|
"vite": "^4 || ^5"
|
|
146
|
-
}
|
|
147
|
-
"react": "npm:@preact/compat",
|
|
148
|
-
"react-dom": "npm:@preact/compat"
|
|
144
|
+
}
|
|
149
145
|
},
|
|
150
146
|
"engines": {
|
|
151
147
|
"node": ">=20"
|