@adyen/kyc-components 2.48.1 → 2.49.0

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.
Files changed (92) hide show
  1. package/dist/es/adyen-kyc-components.es.js +2605 -347
  2. package/dist/es/bg-BG-CoqHl2bN.js +4067 -0
  3. package/dist/es/cs-CZ-ZdZfgN7e.js +4067 -0
  4. package/dist/es/da-DK-C7YJ7z9G.js +4067 -0
  5. package/dist/es/de-DE-Cx8Uim1K.js +985 -0
  6. package/dist/es/de-DE-DMNSJNzU.js +4067 -0
  7. package/dist/es/el-GR-B7_JR3z5.js +985 -0
  8. package/dist/es/el-GR-DHIn4T0S.js +4067 -0
  9. package/dist/es/en-US-7uBFgKyC.js +209 -0
  10. package/dist/es/en-US-CLmaFLwu.js +73 -0
  11. package/dist/es/en-US-CQv3D6--.js +37 -0
  12. package/dist/es/en-US-CkdCbOCX.js +985 -0
  13. package/dist/es/en-US-eaysbh-g.js +113 -0
  14. package/dist/es/en-US-gM26UC0X.js +57 -0
  15. package/dist/es/es-ES-NBv3HHhn.js +985 -0
  16. package/dist/es/es-ES-vjMWXX0n.js +4067 -0
  17. package/dist/es/et-EE-l01e62JA.js +4067 -0
  18. package/dist/es/fi-FI-PTCWFrgt.js +4067 -0
  19. package/dist/es/fr-FR-B7wXGYyE.js +4067 -0
  20. package/dist/es/fr-FR-DdSVMVsp.js +985 -0
  21. package/dist/es/hr-HR-0Te7j2ww.js +4067 -0
  22. package/dist/es/hu-HU-C-m6xnU2.js +4067 -0
  23. package/dist/es/it-IT-Bwdk3zuj.js +985 -0
  24. package/dist/es/it-IT-D1_ouE9J.js +4067 -0
  25. package/dist/es/ja-JP-Bsvzm8zu.js +985 -0
  26. package/dist/es/lt-LT-DKt8_B2y.js +4067 -0
  27. package/dist/es/lv-LV-DMln1gKL.js +4067 -0
  28. package/dist/es/nl-NL-Djq-MOEC.js +4067 -0
  29. package/dist/es/nl-NL-DofKaNkk.js +985 -0
  30. package/dist/es/no-NO-D1_9_3C7.js +4067 -0
  31. package/dist/es/phonePrefixes-GXP6tTuV.js +728 -0
  32. package/dist/es/pl-PL-DO4KOscW.js +4067 -0
  33. package/dist/es/pt-BR-CNtbeGFJ.js +113 -0
  34. package/dist/es/pt-PT-CNr5u8b-.js +4067 -0
  35. package/dist/es/pt-PT-DFEvMD1M.js +985 -0
  36. package/dist/es/ro-RO-DNWzwnJ-.js +4067 -0
  37. package/dist/es/ru-RU-PiM0ZI5h.js +985 -0
  38. package/dist/es/sk-SK-BOIEQnje.js +4067 -0
  39. package/dist/es/sl-SI-fpzqRd_U.js +4067 -0
  40. package/dist/es/sv-SE-C0GoLwTg.js +985 -0
  41. package/dist/es/sv-SE-DyLW6PPo.js +4067 -0
  42. package/dist/es/zh-CN-DJs6Hct-.js +985 -0
  43. package/dist/es/zh-TW-BWhLbns8.js +985 -0
  44. package/dist/style.css +668 -379
  45. package/dist/types/components/BasicInformation/component/BasicInformationComponent.d.ts +1 -1
  46. package/dist/types/components/BasicInformation/types.d.ts +4 -0
  47. package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureParentCompany.d.ts +2 -1
  48. package/dist/types/components/Dropins/HighExposureDropin/components/AmountSelector/AmountSelector.d.ts +2 -0
  49. package/dist/types/components/Dropins/HighExposureDropin/components/AmountSelector/types.d.ts +16 -0
  50. package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureDropinComponent.d.ts +1 -0
  51. package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureFinancialInformation.d.ts +3 -0
  52. package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureLegalInformation.d.ts +3 -0
  53. package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureRegisteredAddress.d.ts +4 -0
  54. package/dist/types/components/Dropins/HighExposureDropin/defaultCurrencies.d.ts +3 -0
  55. package/dist/types/components/Dropins/HighExposureDropin/types.d.ts +82 -6
  56. package/dist/types/components/Individual/types.d.ts +2 -1
  57. package/dist/types/components/Individual/validators.d.ts +4 -1
  58. package/dist/types/components/PersonalDetails/component/PersonalDetailsComponent.d.ts +6 -0
  59. package/dist/types/components/PersonalDetails/types.d.ts +4 -0
  60. package/dist/types/components/ProofOfRelationship/index.d.ts +4 -0
  61. package/dist/types/components/ProofOfRelationship/types.d.ts +19 -0
  62. package/dist/types/components/StepProgressIndicator/StepProgressIndicator.d.ts +2 -1
  63. package/dist/types/components/TaskList/types.d.ts +2 -1
  64. package/dist/types/components/internal/Button/Button.d.ts +1 -1
  65. package/dist/types/components/internal/Button/types.d.ts +1 -0
  66. package/dist/types/components/internal/PhoneInput/PhoneInput.d.ts +2 -0
  67. package/dist/types/components/internal/PhoneInput/types.d.ts +0 -2
  68. package/dist/types/components/internal/PhoneInput/validate.d.ts +2 -2
  69. package/dist/types/core/Context/ConfigurationApiContext/ConfigurationApiContext.d.ts +2 -1
  70. package/dist/types/core/Services/agnostic/get-dataset.d.ts +3 -0
  71. package/dist/types/core/Services/componentApi/index.d.ts +0 -1
  72. package/dist/types/core/Services/kycExternalApi/index.d.ts +0 -1
  73. package/dist/types/core/hooks/useAssociatedLegalRepresentative.d.ts +6 -0
  74. package/dist/types/core/hooks/useDataset.d.ts +3 -2
  75. package/dist/types/core/models/api/data-set.d.ts +3 -3
  76. package/dist/types/core/models/api/document.d.ts +2 -1
  77. package/dist/types/core/models/api/legal-entity-association.d.ts +3 -1
  78. package/dist/types/datasets/countries/loadCountries.d.ts +3 -0
  79. package/dist/types/datasets/states/loadStatesDataset.d.ts +3 -0
  80. package/dist/types/language/loadLocale.d.ts +2 -0
  81. package/dist/types/utils/birth-date-utils.d.ts +14 -1
  82. package/dist/types/utils/datasetUtil.d.ts +3 -5
  83. package/dist/types/utils/dynamicImports.d.ts +4 -2
  84. package/dist/types/utils/entity-association-util.d.ts +1 -0
  85. package/dist/types/utils/mapping/componentApiMapping.d.ts +1 -0
  86. package/dist/types/utils/mapping/mapping.d.ts +1 -1
  87. package/dist/types/utils/roleMetadata.d.ts +1 -1
  88. package/package.json +1 -1
  89. package/dist/types/components/internal/ContextHelper/ContextHelper.d.ts +0 -6
  90. package/dist/types/components/internal/Disclaimer/Disclaimer.d.ts +0 -8
  91. package/dist/types/core/Services/componentApi/get-dataset.d.ts +0 -3
  92. package/dist/types/core/Services/kycExternalApi/get-dataset.d.ts +0 -3
@@ -3,4 +3,4 @@ import type { BusinessDetailsSchema } from '../../BusinessDetails/types';
3
3
  import type { BasicInformationProps, BasicInformationSchema } from '../types';
4
4
  export declare const BASIC_INFORMATION_FORM_ID: keyof BusinessDetailsSchema;
5
5
  export declare const basicInformationFields: Array<keyof BasicInformationSchema>;
6
- export declare function BasicInformationComponent({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, allFields, requiredFields, obscuredFields, optionalFields, readOnlyFields, trustedFields, country, companyType, isTopLevelEntity, isBusinessSelection, }: BasicInformationProps): import("preact").JSX.Element;
6
+ export declare function BasicInformationComponent({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, allFields, requiredFields, obscuredFields, optionalFields, readOnlyFields, trustedFields, country, companyType, isTopLevelEntity, isBusinessSelection, setVerifiedBusiness, searchName, }: BasicInformationProps): import("preact").JSX.Element;
@@ -1,4 +1,6 @@
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
1
2
  import type { BaseInnerFormProps } from '../../core/hooks/useForm';
3
+ import type { CompanyDatasetResponse } from '../../core/models/api/company-search';
2
4
  import type { CompanyTypesValue } from '../../core/models/api/company-types-value';
3
5
  import type { CountryCode } from '../../core/models/country-code';
4
6
  import type { BaseTrackingPayload } from '../../core/utils';
@@ -14,4 +16,6 @@ export interface BasicInformationProps extends BaseInnerFormProps<BasicInformati
14
16
  isTopLevelEntity: boolean;
15
17
  baseTrackingPayload: BaseTrackingPayload;
16
18
  isBusinessSelection: boolean;
19
+ setVerifiedBusiness: Dispatch<StateUpdater<CompanyDatasetResponse | undefined>>;
20
+ searchName: string | undefined;
17
21
  }
@@ -1,4 +1,5 @@
1
- import type { HighExposureParentCompanyDetailsProps, HighExposureParentCompanySchema } from '../types';
1
+ import type { FieldMapping, HighExposureParentCompanyDetailsProps, HighExposureParentCompanySchema } from '../types';
2
+ export declare const parentCompanyFieldMapping: FieldMapping;
2
3
  export declare const highExposureParentCompanyDetailsFields: Array<keyof HighExposureParentCompanySchema>;
3
4
  declare function AdditionalFieldsForHighExposureParentCompany(props: HighExposureParentCompanyDetailsProps): import("preact").JSX.Element;
4
5
  export default AdditionalFieldsForHighExposureParentCompany;
@@ -0,0 +1,2 @@
1
+ import type { AmountSelectorProps } from './types';
2
+ export default function AmountSelector({ currency, value, validCurrency, validValue, handleChangeForCurrency, handleChangeForValue, country, fieldName, fieldLabel, fieldHelper, errorMessage, ariaLabelCurrency, ariaLabelValue, }: AmountSelectorProps): import("preact").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { CountryCode } from '../../../../../core/models/country-code';
2
+ export type AmountSelectorProps = {
3
+ country: CountryCode;
4
+ handleChangeForCurrency: (e: any) => void;
5
+ handleChangeForValue: (e: any) => void;
6
+ fieldName: string;
7
+ fieldLabel?: string;
8
+ fieldHelper?: string;
9
+ errorMessage?: string | boolean;
10
+ currency?: string;
11
+ value?: number;
12
+ validCurrency?: any;
13
+ validValue?: any;
14
+ ariaLabelCurrency: string;
15
+ ariaLabelValue: string;
16
+ };
@@ -1,5 +1,6 @@
1
1
  import type { FormList } from '../../../../core/models/form';
2
2
  import type { HighExposureDropinProps } from '../types';
3
3
  export declare const highExposureForms: FormList;
4
+ export declare const highExposureFormsRequiredFields: Record<string, string[]>;
4
5
  declare function HighExposureDropinComponent(props: HighExposureDropinProps): import("preact").JSX.Element;
5
6
  export default HighExposureDropinComponent;
@@ -0,0 +1,3 @@
1
+ import type { HighExposureFinancialInformationProps } from '../types';
2
+ declare function HighExposureFinancialInformation({ formUtils, data, valid, errors, fieldProblems, handleChangeFor, country, fieldMapping, sectionHeading, }: HighExposureFinancialInformationProps): import("preact").JSX.Element;
3
+ export default HighExposureFinancialInformation;
@@ -0,0 +1,3 @@
1
+ import type { HighExposureLegalInformationProps } from '../types';
2
+ declare function HighExposureLegalInformation({ formUtils, data, valid, errors, fieldProblems, handleChangeFor, fieldMapping, sectionHeading, }: HighExposureLegalInformationProps): import("preact").JSX.Element;
3
+ export default HighExposureLegalInformation;
@@ -0,0 +1,4 @@
1
+ import './styles.scss';
2
+ import { type HighExposureRegisteredAddressProps } from '../types';
3
+ declare function HighExposureRegisteredAddress({ formUtils, data, valid, errors, fieldProblems, handleChangeFor, legalEntity, fieldMapping, sectionHeading, country, legalEntityId, handleAddressSearch, handleFindAddress, targetPage, }: HighExposureRegisteredAddressProps): import("preact").JSX.Element;
4
+ export default HighExposureRegisteredAddress;
@@ -0,0 +1,3 @@
1
+ import type { CountryCode } from '../../../core/models/country-code';
2
+ import type { HighExposureCompanySchema } from './types';
3
+ export declare const setDefaultCurrencies: (dataObject: HighExposureCompanySchema, country: CountryCode) => void;
@@ -6,7 +6,7 @@ import type { FormModel } from '../../../core/models/form';
6
6
  import type { Translatable, TranslationKey } from '../../../language/types';
7
7
  import type { FormUtils } from '../../../utils/formUtils';
8
8
  import type { ValidationRuleResult, ValidatorMode } from '../../../utils/validation/types';
9
- import type { DropinProps } from '../types';
9
+ import type { DropinAPIHandlers, DropinProps } from '../types';
10
10
  export interface HighExposureCompanySchema {
11
11
  country?: CountryCode;
12
12
  numberOfEmployees?: number;
@@ -17,6 +17,12 @@ export interface HighExposureCompanySchema {
17
17
  legalEntityIdentifier?: string;
18
18
  isCompanyOwnedByAnotherCompany?: string;
19
19
  isParentOwnedByAnotherCompany?: string;
20
+ totalAssetsValue?: number;
21
+ totalAssetsCurrency?: string;
22
+ annualTurnoverValue?: number;
23
+ annualTurnoverCurrency?: string;
24
+ financialReportingDate?: string;
25
+ legalInformationInsolvency?: string;
20
26
  }
21
27
  export type HighExposureParentCompanySchema = {
22
28
  country?: CountryCode;
@@ -28,6 +34,19 @@ export type HighExposureParentCompanySchema = {
28
34
  doesYourParentCompanyHaveLEI?: string;
29
35
  parentLegalEntityIdentifier?: string;
30
36
  doesNotKnowParentNumberOfEmployees?: boolean;
37
+ isParentCompanyAddressTheMainHeadquarters?: string;
38
+ parentCompanyAddress?: string;
39
+ parentCompanyOtherAddressInformation?: string;
40
+ parentCompanyPostalCode?: string;
41
+ parentCompanyCity?: string;
42
+ parentCompanyStateOrProvince?: string;
43
+ parentCompanyCountry?: string;
44
+ totalAssetsValue?: number;
45
+ totalAssetsCurrency?: string;
46
+ annualTurnoverValue?: number;
47
+ annualTurnoverCurrency?: string;
48
+ financialReportingDate?: string;
49
+ legalInformationInsolvency?: string;
31
50
  };
32
51
  export type HighExposureUltimateParentCompanySchema = {
33
52
  country?: CountryCode;
@@ -39,6 +58,19 @@ export type HighExposureUltimateParentCompanySchema = {
39
58
  doesYourUltimateParentCompanyHaveLEI?: string;
40
59
  ultimateParentLegalEntityIdentifier?: string;
41
60
  doesNotKnowUltimateParentNumberOfEmployees?: boolean;
61
+ isUltimateParentCompanyAddressTheMainHeadquarters?: string;
62
+ ultimateParentCompanyAddress?: string;
63
+ ultimateParentCompanyOtherAddressInformation?: string;
64
+ ultimateParentCompanyPostalCode?: string;
65
+ ultimateParentCompanyCity?: string;
66
+ ultimateParentCompanyStateOrProvince?: string;
67
+ ultimateParentCompanyCountry?: string;
68
+ totalAssetsValue?: number;
69
+ totalAssetsCurrency?: string;
70
+ annualTurnoverValue?: number;
71
+ annualTurnoverCurrency?: string;
72
+ financialReportingDate?: string;
73
+ legalInformationInsolvency?: string;
42
74
  };
43
75
  export interface HighExposureSchema {
44
76
  company?: HighExposureCompanySchema;
@@ -52,6 +84,8 @@ export interface HighExposureDropinProps extends BaseOuterFormProps<HighExposure
52
84
  country: CountryCode;
53
85
  legalEntityId: ExistingLegalEntity['id'];
54
86
  legalEntity?: ExistingLegalEntity;
87
+ handleAddressSearch?: DropinAPIHandlers['handleAddressSearch'];
88
+ handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
55
89
  }
56
90
  export interface HighExposureProps extends HighExposureDropinProps, DropinProps {
57
91
  legalEntityId: ExistingLegalEntity['id'];
@@ -68,19 +102,23 @@ export interface HighExposureParentCompanyDetailsProps extends BaseInnerFormProp
68
102
  country: CountryCode;
69
103
  legalEntityId: string;
70
104
  legalEntity?: ExistingLegalEntity;
105
+ handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
106
+ handleFindAddress: DropinAPIHandlers['handleFindAddress'];
71
107
  }
72
108
  export interface HighExposureUltimateParentCompanyDetailsProps extends BaseInnerFormProps<HighExposureUltimateParentCompanySchema> {
73
109
  country: CountryCode;
74
110
  legalEntityId: string;
75
111
  legalEntity?: ExistingLegalEntity;
112
+ handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
113
+ handleFindAddress: DropinAPIHandlers['handleFindAddress'];
76
114
  }
77
115
  export type HighExposureSchemaCombined = HighExposureCompanySchema & HighExposureParentCompanySchema & HighExposureUltimateParentCompanySchema;
78
116
  export declare enum HighExposurePagesEnums {
79
- COMPANY_PAGE = "COMPANY_PAGE",
80
- PARENT_COMPANY_PAGE = "PARENT_COMPANY_PAGE",
81
- ULTIMATE_PARENT_COMPANY_PAGE = "ULTIMATE_PARENT_COMPANY_PAGE"
117
+ COMPANY_PAGE = "company",
118
+ PARENT_COMPANY_PAGE = "parentCompany",
119
+ ULTIMATE_PARENT_COMPANY_PAGE = "ultimateParentCompany"
82
120
  }
83
- type HighExposureSchemaKeys = keyof HighExposureCompanySchema | keyof HighExposureParentCompanySchema | keyof HighExposureUltimateParentCompanySchema;
121
+ export type HighExposureSchemaKeys = keyof HighExposureCompanySchema | keyof HighExposureParentCompanySchema | keyof HighExposureUltimateParentCompanySchema;
84
122
  export type HighExposureBusinessInformationProps = {
85
123
  country: CountryCode;
86
124
  data: Partial<HighExposureSchemaCombined>;
@@ -106,6 +144,29 @@ export interface HighExposureOwnershipStructureProps extends BaseInnerFormProps<
106
144
  handleChangeFor: (key: keyof HighExposureCompanySchema, mode?: ValidatorMode) => (e: any) => void;
107
145
  legalEntity?: LegalEntity;
108
146
  }
147
+ export type HighExposureFinancialInformationProps = {
148
+ country: CountryCode;
149
+ data: Partial<HighExposureSchemaCombined>;
150
+ valid: Partial<Record<keyof HighExposureSchemaCombined, boolean>>;
151
+ errors: Partial<Record<keyof HighExposureSchemaCombined, ValidationRuleResult | null>>;
152
+ fieldProblems: Partial<Record<keyof HighExposureSchemaCombined, boolean>>;
153
+ handleChangeFor: (key: keyof HighExposureSchemaCombined, mode?: ValidatorMode) => (e: any) => void;
154
+ formUtils: FormUtils<HighExposureSchemaCombined>;
155
+ targetPage: HighExposurePagesEnums;
156
+ fieldMapping: FieldMapping;
157
+ sectionHeading?: Translatable;
158
+ };
159
+ export type HighExposureLegalInformationProps = {
160
+ data: Partial<HighExposureSchemaCombined>;
161
+ valid: Partial<Record<keyof HighExposureSchemaCombined, boolean>>;
162
+ errors: Partial<Record<keyof HighExposureSchemaCombined, ValidationRuleResult | null>>;
163
+ fieldProblems: Partial<Record<keyof HighExposureSchemaCombined, boolean>>;
164
+ handleChangeFor: (key: keyof HighExposureSchemaCombined, mode?: ValidatorMode) => (e: any) => void;
165
+ formUtils: FormUtils<HighExposureSchemaCombined>;
166
+ targetPage: HighExposurePagesEnums;
167
+ fieldMapping: FieldMapping;
168
+ sectionHeading?: Translatable;
169
+ };
109
170
  export declare enum HighExposureRadioIds {
110
171
  YES = "Yes",
111
172
  NO = "No",
@@ -119,4 +180,19 @@ export declare const highExposureParentRadioItems: Array<{
119
180
  id: HighExposureRadioIds;
120
181
  name: TranslationKey;
121
182
  }>;
122
- export {};
183
+ export type HighExposureRegisteredAddressProps = {
184
+ country: CountryCode;
185
+ data: Partial<HighExposureSchemaCombined>;
186
+ valid: Partial<Record<keyof HighExposureSchemaCombined, boolean>>;
187
+ formUtils: FormUtils<HighExposureSchemaCombined>;
188
+ errors: Partial<Record<keyof HighExposureSchemaCombined, ValidationRuleResult | null>>;
189
+ fieldProblems: Partial<Record<keyof HighExposureSchemaCombined, boolean>>;
190
+ handleChangeFor: (key: keyof HighExposureSchemaCombined, mode?: ValidatorMode) => (e: any) => void;
191
+ legalEntity?: LegalEntity;
192
+ targetPage: HighExposurePagesEnums;
193
+ fieldMapping: FieldMapping;
194
+ sectionHeading?: Translatable;
195
+ legalEntityId: string;
196
+ handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
197
+ handleFindAddress: DropinAPIHandlers['handleFindAddress'];
198
+ };
@@ -23,6 +23,7 @@ export interface IndividualSchema {
23
23
  idDocument?: IdDocumentUploadSchema;
24
24
  proofOfResidence?: DocumentUploadSchema;
25
25
  proofOfNationalId?: DocumentUploadSchema;
26
+ proofOfRelationship?: DocumentUploadSchema;
26
27
  idVerificationMethod?: IdVerificationMethodSchema;
27
28
  }
28
29
  export interface IndividualProps extends BaseOuterFormProps<IndividualSchema> {
@@ -35,6 +36,7 @@ export interface IndividualProps extends BaseOuterFormProps<IndividualSchema> {
35
36
  legalEntityId?: string;
36
37
  taskType?: TaskTypes;
37
38
  allowedRoles?: DecisionMakerType[];
39
+ parentLegalEntity?: ExistingLegalEntity;
38
40
  onTypeSwitch?(legalEntityType: LegalEntityType): void;
39
41
  onCountryChange?: Dispatch<StateUpdater<CountryCode>>;
40
42
  onNext?(e: any, callbacks: any, isValid: any): void;
@@ -43,7 +45,6 @@ export interface IndividualProps extends BaseOuterFormProps<IndividualSchema> {
43
45
  accountHolder: AccountHolderOption | null;
44
46
  }
45
47
  export interface IndividualDropinProps extends Omit<IndividualProps, 'legalEntityId' | 'accountHolder'>, IndividualDropinApiHandlers, DropinProps {
46
- parentLegalEntity?: ExistingLegalEntity;
47
48
  trustMember?: TrustMember;
48
49
  isTargetLegalEntityType?: boolean;
49
50
  country: CountryCode;
@@ -2,11 +2,14 @@ import type { ExperimentName } from '../../core/Context/ExperimentContext/types'
2
2
  import type { CountryCode } from '../../core/models/country-code';
3
3
  import type { ValidatorRule } from '../../utils/validation/types';
4
4
  import type { PersonalDetailsSchema } from '../PersonalDetails/types';
5
- export declare const validators: ({ country, isExperimentEnabled, }: {
5
+ import { TaskTypes } from '../TaskList/types';
6
+ export declare const validators: ({ country, isExperimentEnabled, taskType, }: {
6
7
  country: CountryCode;
7
8
  isExperimentEnabled?: (experiment: ExperimentName) => boolean;
9
+ taskType?: TaskTypes;
8
10
  }) => {
9
11
  birthDate: () => ValidatorRule<string, PersonalDetailsSchema>[];
10
12
  nationality: () => ValidatorRule<PersonalDetailsSchema["nationality"], PersonalDetailsSchema>;
11
13
  jobTitle: () => ValidatorRule<PersonalDetailsSchema["jobTitle"], PersonalDetailsSchema>;
14
+ relationship: () => ValidatorRule<PersonalDetailsSchema["relationship"], PersonalDetailsSchema>;
12
15
  };
@@ -1,3 +1,9 @@
1
+ import type { LegalRepresentativeRelationshipType } from '../../../core/models/api/legal-entity-association';
2
+ import type { TranslationKey } from '../../../language/types';
1
3
  import type { PersonalDetailsProps, PersonalDetailsSchema } from '../types';
2
4
  export declare const personalDetailsFields: Array<keyof PersonalDetailsSchema>;
5
+ export declare const relationshipOptions: Array<{
6
+ id: LegalRepresentativeRelationshipType;
7
+ name: TranslationKey;
8
+ }>;
3
9
  export declare function PersonalDetailsComponent(props: PersonalDetailsProps): import("preact").JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import type { BaseInnerFormProps, FormState } from '../../core/hooks/useForm';
2
2
  import type { DecisionMakerType } from '../../core/models/api/decision-maker-type';
3
+ import type { ExistingLegalEntity } from '../../core/models/api/legal-entity';
4
+ import type { LegalRepresentativeRelationshipType } from '../../core/models/api/legal-entity-association';
3
5
  import type { CountryCode } from '../../core/models/country-code';
4
6
  import type { TranslationKey } from '../../language/types';
5
7
  import type { ValidationRuleResults } from '../../utils/validation/types';
@@ -16,11 +18,13 @@ export interface PersonalDetailsSchema extends NameSchema, IdentityNumberSchema,
16
18
  residencyCountry?: CountryCode;
17
19
  nationality?: CountryCode;
18
20
  jobTitle?: string;
21
+ relationship?: LegalRepresentativeRelationshipType;
19
22
  }
20
23
  export interface PersonalDetailsProps extends BaseInnerFormProps<PersonalDetailsSchema> {
21
24
  taskType: TaskTypes;
22
25
  allowedRoles?: DecisionMakerType[];
23
26
  onResidencyCountryChange?(country: string): void;
27
+ parentLegalEntity?: ExistingLegalEntity;
24
28
  }
25
29
  export interface IdSchema {
26
30
  idNumber: string;
@@ -0,0 +1,4 @@
1
+ import type { ProofOfRelationshipProps } from './types';
2
+ declare function ProofOfRelationship({ id, ...props }: ProofOfRelationshipProps): import("preact/compat").JSX.Element;
3
+ declare const _default: typeof ProofOfRelationship;
4
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import type { DocumentUploadProps } from '../DocumentUpload/types';
2
+ export declare enum ProofOfRelationshipDocumentTypes {
3
+ BIRTH_CERTIFICATE = "birthCertificate",
4
+ GUARDIANSHIP_CERTIFICATE = "guardianshipCertificate",
5
+ ADOPTION_CERTIFICATE = "adoptionCertificate"
6
+ }
7
+ export declare const proofOfRelationshipDocumentOptions: readonly [{
8
+ readonly id: ProofOfRelationshipDocumentTypes.BIRTH_CERTIFICATE;
9
+ readonly name: "birthCertificate";
10
+ }, {
11
+ readonly id: ProofOfRelationshipDocumentTypes.GUARDIANSHIP_CERTIFICATE;
12
+ readonly name: "guardianshipCertificate";
13
+ }, {
14
+ readonly id: ProofOfRelationshipDocumentTypes.ADOPTION_CERTIFICATE;
15
+ readonly name: "adoptionCertificate";
16
+ }];
17
+ export interface ProofOfRelationshipProps extends DocumentUploadProps {
18
+ name: string;
19
+ }
@@ -3,5 +3,6 @@ import type { JSX } from 'preact';
3
3
  export interface StepProgressIndicatorProps {
4
4
  stepsCount: number;
5
5
  activeStepIndex: number;
6
+ fillBefore?: boolean;
6
7
  }
7
- export declare const StepProgressIndicator: ({ activeStepIndex, stepsCount, }: StepProgressIndicatorProps) => JSX.Element | null;
8
+ export declare const StepProgressIndicator: ({ activeStepIndex, stepsCount, fillBefore, }: StepProgressIndicatorProps) => JSX.Element | null;
@@ -30,7 +30,8 @@ export declare enum TaskTypes {
30
30
  SOLE_PROPRIETOR_COMPANY = "SOLE_PROPRIETOR_COMPANY",
31
31
  LEGAL_ENTITY_TYPE_SWITCHER = "LEGAL_ENTITY_TYPE_SWITCHER",
32
32
  CAPABILITY_REJECTED = "CAPABILITY_REJECTED",
33
- SINGPASS_SELECTION = "SINGPASS_SELECTION"
33
+ SINGPASS_SELECTION = "SINGPASS_SELECTION",
34
+ LEGAL_REPRESENTATIVE_DETAILS = "LEGAL_REPRESENTATIVE_DETAILS"
34
35
  }
35
36
  /**
36
37
  * Order of TaskStatus enums are used to define the priority of the statuses
@@ -2,5 +2,5 @@ import './_button.component.scss';
2
2
  import '../Link/_link.component.scss';
3
3
  import type { JSX } from 'preact';
4
4
  import type { ButtonProps } from './types';
5
- export declare const Button: ({ showAsLink, secondary, tertiary, className, role, small, block, label, icon, title, disabled, type, onClick, onKeyDown, status, testId, }: ButtonProps) => JSX.Element;
5
+ export declare const Button: ({ showAsLink, secondary, tertiary, className, role, small, block, shaded, label, icon, title, disabled, type, onClick, onKeyDown, status, testId, }: ButtonProps) => JSX.Element;
6
6
  export default Button;
@@ -8,6 +8,7 @@ export interface ButtonProps {
8
8
  role?: JSX.AriaRole;
9
9
  small?: boolean;
10
10
  block?: boolean;
11
+ shaded?: boolean;
11
12
  label?: string;
12
13
  icon?: IconName;
13
14
  iconOnly?: boolean;
@@ -1,5 +1,7 @@
1
+ import type { CountryCode } from '../../../core/models/country-code';
1
2
  import type { PhoneInputProps, PhoneInputSchema } from './types';
2
3
  export declare const phoneFields: (keyof PhoneInputSchema)[];
4
+ export type PhonePrefixes = Partial<Record<CountryCode, string>>;
3
5
  declare function PhoneInputComponent(props: PhoneInputProps): import("preact/compat").JSX.Element;
4
6
  declare namespace PhoneInputComponent {
5
7
  var defaultProps: {
@@ -1,10 +1,8 @@
1
1
  import type { BaseInnerFormProps } from '../../../core/hooks/useForm';
2
- import type { DataSet } from '../../../core/models/api/data-set';
3
2
  import type { CountryCode } from '../../../core/models/country-code';
4
3
  export interface PhoneInputSchema {
5
4
  phoneNumber?: string;
6
5
  }
7
6
  export interface PhoneInputProps extends BaseInnerFormProps<PhoneInputSchema> {
8
- phonePrefixes: DataSet;
9
7
  country: CountryCode;
10
8
  }
@@ -1,6 +1,6 @@
1
- import type { DataSet } from '../../../core/models/api/data-set';
2
1
  import type { AsyncValidatorRules, FormatRules, ValidatorRules } from '../../../utils/validation/types';
2
+ import type { PhonePrefixes } from './PhoneInput';
3
3
  import type { PhoneInputSchema } from './types';
4
- export declare const staticPhoneValidationRules: (phonePrefixes: DataSet, defaultPrefix: string) => ValidatorRules<PhoneInputSchema>;
4
+ export declare const staticPhoneValidationRules: (phonePrefixes: PhonePrefixes | undefined, defaultPrefix: string) => ValidatorRules<PhoneInputSchema>;
5
5
  export declare const useAsyncPhoneValidationRules: () => AsyncValidatorRules<PhoneInputSchema>;
6
6
  export declare const phoneFormatters: FormatRules<PhoneInputSchema>;
@@ -1,3 +1,4 @@
1
+ import type { DatasetIdentifier } from '../../../utils/datasetUtil';
1
2
  import type { DataSet } from '../../models/api/data-set';
2
3
  import type { GetAllowedCountriesResponse } from '../../models/api/get-allowed-countries';
3
4
  import type { GetAllowedLocalesResponse } from '../../models/api/get-allowed-locales';
@@ -9,7 +10,7 @@ export type ConfigurationApi = {
9
10
  getConfiguration: (request: GetConfigurationRequest) => Promise<GetConfigurationResponse>;
10
11
  getAllowedCountries: () => Promise<GetAllowedCountriesResponse>;
11
12
  getAllowedLocales: () => Promise<GetAllowedLocalesResponse>;
12
- getDataset: (name: string, locale: string) => Promise<DataSet>;
13
+ getDataset: (identifier: DatasetIdentifier, locale: string) => Promise<DataSet>;
13
14
  loadDocumentGuidance: () => Promise<void>;
14
15
  verifyIdNumber: (request: VerifyIdNumberRequest) => Promise<VerifyIdNumberResponse | undefined>;
15
16
  validatePhoneNumber: (phoneNumber: string) => Promise<ValidationResponse>;
@@ -0,0 +1,3 @@
1
+ import type { DatasetIdentifier } from '../../../utils/datasetUtil';
2
+ import type { DataSet } from '../../models/api/data-set';
3
+ export declare const getDataset: (identifier: DatasetIdentifier, locale: string) => Promise<DataSet>;
@@ -2,7 +2,6 @@ export * from './create-document';
2
2
  export * from './create-legal-entity';
3
3
  export * from './create-transferInstrument';
4
4
  export * from './get-bankVerification-vendor';
5
- export * from './get-dataset';
6
5
  export * from './get-document';
7
6
  export * from './get-legal-entity';
8
7
  export * from './get-scenarios';
@@ -1,6 +1,5 @@
1
1
  export * from './get-allowed-countries';
2
2
  export * from './get-allowed-locales';
3
3
  export * from './get-configuration';
4
- export * from './get-dataset';
5
4
  export * from './validate-phone-number';
6
5
  export * from './verify-id-number';
@@ -0,0 +1,6 @@
1
+ import type { DropinAPIHandlers } from '../../components/Dropins/types';
2
+ import type { ExistingLegalEntity } from '../models/api/legal-entity';
3
+ export declare const useAssociatedLegalRepresentative: ({ legalEntity, handleGetLegalEntity, }: {
4
+ legalEntity: ExistingLegalEntity;
5
+ handleGetLegalEntity?: DropinAPIHandlers["handleGetLegalEntity"];
6
+ }) => ExistingLegalEntity;
@@ -1,5 +1,6 @@
1
+ import type { DatasetIdentifier } from '../../utils/datasetUtil';
1
2
  import type { DataSet } from '../models/api/data-set';
2
- export declare function useDataset(datasetIdentifier: string, skip?: boolean): {
3
- dataset: DataSet;
3
+ export declare function useDataset<T extends string = string>(datasetIdentifier: DatasetIdentifier, skip?: boolean): {
4
+ dataset: DataSet<T>;
4
5
  loaded: boolean;
5
6
  };
@@ -1,5 +1,5 @@
1
- export type DataSet = ReadonlyArray<DataSetItem>;
2
- export interface DataSetItem {
3
- id: string;
1
+ export type DataSet<T extends string = string> = ReadonlyArray<DataSetItem<T>>;
2
+ export interface DataSetItem<T> {
3
+ id: T;
4
4
  name: string;
5
5
  }
@@ -31,5 +31,6 @@ export declare enum DocumentType {
31
31
  DRIVING_LICENCE = "driving_licence",
32
32
  NATIONAL_IDENTITY_CARD = "national_identity_card",
33
33
  RESIDENCE_PERMIT = "residence_permit",
34
- PROOF_OF_ORGANIZATION_TAX_INFO = "proofOfOrganizationTaxInfo"
34
+ PROOF_OF_ORGANIZATION_TAX_INFO = "proofOfOrganizationTaxInfo",
35
+ PROOF_OF_RELATIONSHIP = "proofOfRelationship"
35
36
  }
@@ -2,7 +2,8 @@ import type { SettlorExemptionReason } from '../../../components/TrustRoleAndEnt
2
2
  import type { DecisionMakerType } from './decision-maker-type';
3
3
  import type { LegalEntityType } from './legal-entity-type';
4
4
  import type { TrustMemberType } from './trust-member-type';
5
- export type LegalEntityAssociationType = DecisionMakerType | TrustMemberType | LegalEntityType.TRUST | LegalEntityType.SOLE_PROPRIETORSHIP;
5
+ export type LegalEntityAssociationType = DecisionMakerType | TrustMemberType | LegalEntityType.TRUST | LegalEntityType.SOLE_PROPRIETORSHIP | 'legalRepresentative';
6
+ export type LegalRepresentativeRelationshipType = 'parent' | 'guardian';
6
7
  export interface LegalEntityAssociation {
7
8
  jobTitle?: string;
8
9
  legalEntityId?: string;
@@ -11,4 +12,5 @@ export interface LegalEntityAssociation {
11
12
  entityType?: LegalEntityType;
12
13
  associatorId?: string;
13
14
  settlorExemptionReason?: SettlorExemptionReason[];
15
+ relationship?: LegalRepresentativeRelationshipType;
14
16
  }
@@ -0,0 +1,3 @@
1
+ import type { DataSet } from '../../core/models/api/data-set';
2
+ import type { CountryCode } from '../../core/models/country-code';
3
+ export declare const loadCountriesDataset: (locale: string) => Promise<DataSet<CountryCode>>;
@@ -0,0 +1,3 @@
1
+ import type { DataSet } from '../../core/models/api/data-set';
2
+ import type { CountryCode } from '../../core/models/country-code';
3
+ export declare const loadStatesDataset: (country: CountryCode, locale: string) => Promise<DataSet>;
@@ -0,0 +1,2 @@
1
+ import type { Translations } from './types';
2
+ export declare const loadLocale: (locale: string) => Promise<Translations>;
@@ -1,11 +1,24 @@
1
1
  import type { PersonalDetailsSchema } from '../components/PersonalDetails/types';
2
+ import { TaskTypes } from '../components/TaskList/types';
3
+ import type { ExistingLegalEntity } from '../core/models/api/legal-entity';
4
+ import type { CountryCode } from '../core/models/country-code';
2
5
  import type { Translatable } from '../language/types';
3
6
  export declare const getAgeToday: (birthdate: string) => number;
7
+ export declare const getAgeRangeForLegalRepresentative: (country: CountryCode) => {
8
+ min: number;
9
+ max: number;
10
+ } | undefined;
4
11
  interface TranslatableAlertProps {
5
12
  title: Translatable;
6
13
  message: Translatable;
7
14
  }
8
- export declare const getLegalRepresentativeWarningMessage: ({ data: { birthDate, residencyCountry }, }: {
15
+ export declare const getLegalRepresentativeWarningMessage: ({ data: { birthDate, residencyCountry }, taskType, }: {
9
16
  data: PersonalDetailsSchema;
17
+ taskType: TaskTypes;
10
18
  }) => TranslatableAlertProps | undefined;
19
+ export declare const isAgeWithinRange: (age: number, ageRange: {
20
+ min: number;
21
+ max: number;
22
+ }) => boolean;
23
+ export declare const doesLegalEntityRequiresLegalRepresentative: (legalEntity?: ExistingLegalEntity) => boolean;
11
24
  export {};
@@ -1,15 +1,13 @@
1
1
  import type { DataSet } from '../core/models/api/data-set';
2
2
  import type { CountryCode } from '../core/models/country-code';
3
+ export type DatasetIdentifier = 'countries' | `states/${CountryCode}`;
3
4
  export declare const datasetIdentifier: {
4
- country: string;
5
- state: (countryCode: CountryCode) => string;
6
- phonePrefix: string;
7
- translations: string;
5
+ readonly country: "countries";
6
+ readonly state: (countryCode: CountryCode) => DatasetIdentifier;
8
7
  };
9
8
  export type DatasetUtil = {
10
9
  getCountryName: (countryCode: CountryCode) => string | null;
11
10
  getStateName: (stateCode: string, countryCode: CountryCode) => string | null;
12
- getPhonePrefix: (countryCode: CountryCode) => string | null;
13
11
  setDataset: (datasetKey: string, dataset: DataSet) => void;
14
12
  getDataset: (identifier: string) => DataSet;
15
13
  getDatasetKey: (identifier: string) => string;
@@ -1,3 +1,5 @@
1
- export type DynamicImportType<T> = (() => Promise<{
1
+ export type DynamicImportType<T, MightNotExist extends boolean = true> = MightNotExist extends true ? (() => Promise<{
2
2
  default: T;
3
- }>) | undefined;
3
+ }>) | undefined : () => Promise<{
4
+ default: T;
5
+ }>;
@@ -28,3 +28,4 @@ export declare const hasOwnEntityAssociationOfType: (type: LegalEntityType, enti
28
28
  export declare const removeEntityAssociationByType: (type: LegalEntityType, entityAssociations: LegalEntityAssociation[], legalEntityId: string | undefined) => LegalEntityAssociation[];
29
29
  export declare const isRootLegalEntity: (legalEntity: LegalEntity, taskType: TaskTypes) => boolean;
30
30
  export declare const filterOutUnwantedAssociationsIfRootLE: (taskType: TaskTypes, legalEntity: ExistingLegalEntity | undefined, accountHolder: AccountHolderOption | undefined) => LegalEntityAssociation[] | undefined;
31
+ export declare const getLegalRepresentative: (legalEntityResponse: ExistingLegalEntity) => LegalEntityAssociation;
@@ -242,6 +242,7 @@ export declare const remediationIndividualApiKeyMapping: {
242
242
  passport: string;
243
243
  proofOfResidency: string;
244
244
  proofOfNationalIdNumber: string;
245
+ proofOfRelationship: string;
245
246
  };
246
247
  export declare const remediationPayoutApiKeyMapping: {
247
248
  bankStatement: string;
@@ -39,7 +39,7 @@ export declare const mapLegalEntityToHighExposure: (legalEntity: LegalEntity) =>
39
39
  export declare const mapHighExposureToLegalEntity: (data: HighExposureSchema) => LegalEntity;
40
40
  export declare const mapLegalEntityToSoleProp: (legalEntity: LegalEntity) => SolePropSchema;
41
41
  export declare const mapSolePropToLegalEntity: (data: SolePropSchema) => LegalEntity;
42
- export type IndividualDocumentFields = Pick<IndividualSchema, 'idDocument' | 'proofOfResidence' | 'proofOfNationalId'>;
42
+ export type IndividualDocumentFields = Pick<IndividualSchema, 'idDocument' | 'proofOfResidence' | 'proofOfNationalId' | 'proofOfRelationship'>;
43
43
  export declare const getPage: ({ attachments }: Document, pageType?: PageType) => Attachment;
44
44
  export declare const getPageName: (document: Document, pageType?: PageType) => string;
45
45
  export declare const mapIndividualDocumentToApiDocument: (data: IndividualSchema, entityId: string) => Promise<Document[]>;
@@ -5,7 +5,7 @@ import type { TranslationKey } from '../language/types';
5
5
  type Role = `${LegalEntityAssociationType | TrustMemberGuidanceLabel}`;
6
6
  type RoleMetadata<R extends Role> = Record<R, {
7
7
  name: TranslationKey;
8
- variant: TagVariant;
8
+ variant?: TagVariant;
9
9
  description?: TranslationKey;
10
10
  }>;
11
11
  export declare const roleMetadata: Partial<RoleMetadata<Role>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.48.1",
3
+ "version": "2.49.0",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",
@@ -1,6 +0,0 @@
1
- import './ContextHelper.scss';
2
- interface ContextHelperProps {
3
- content: string;
4
- }
5
- export declare const ContextHelper: ({ content }: ContextHelperProps) => import("preact").JSX.Element;
6
- export {};