@adyen/kyc-components 3.7.0 → 3.8.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 (34) hide show
  1. package/dist/es/adyen-kyc-components.es.js +100 -67
  2. package/dist/style.css +6 -0
  3. package/dist/types/components/BankVerification/BankVerification.d.ts +1 -1
  4. package/dist/types/components/BankVerification/types.d.ts +5 -5
  5. package/dist/types/components/BusinessTypeSelection/utils.d.ts +2 -1
  6. package/dist/types/components/CompanyBasics/types.d.ts +3 -3
  7. package/dist/types/components/CompanyLookup/types.d.ts +4 -4
  8. package/dist/types/components/Individual/types.d.ts +2 -2
  9. package/dist/types/components/PayoutDetails/types.d.ts +2 -2
  10. package/dist/types/components/TaskList/types.d.ts +2 -2
  11. package/dist/types/components/internal/Address/utils.d.ts +1 -1
  12. package/dist/types/components/internal/BusinessRegistrationNumberField/types.d.ts +2 -2
  13. package/dist/types/components/internal/EntityAssociation/types.d.ts +2 -2
  14. package/dist/types/components/internal/Remove/types.d.ts +3 -3
  15. package/dist/types/components/internal/TaxInformationField/types.d.ts +2 -2
  16. package/dist/types/components/internal/VatNumberField/types.d.ts +2 -2
  17. package/dist/types/core/Context/ConfigurationApiContext/ConfigurationApiContext.d.ts +1 -1
  18. package/dist/types/core/Context/ExperimentContext/types.d.ts +2 -1
  19. package/dist/types/core/Context/ReactQueryContext/ReactQueryClient.d.ts +2 -0
  20. package/dist/types/core/Context/ReactQueryContext/ReactQueryProvider.d.ts +4 -0
  21. package/dist/types/core/Services/componentApi/validate-account-identification.d.ts +4 -0
  22. package/dist/types/core/Services/kycExternalApi/index.d.ts +1 -1
  23. package/dist/types/core/Services/kycExternalApi/{account-identification.d.ts → validate-account-identification.d.ts} +1 -1
  24. package/dist/types/core/hooks/introduction/useHasSeenIntroduction.d.ts +1 -1
  25. package/dist/types/core/hooks/useCompanySearch/types.d.ts +2 -2
  26. package/dist/types/core/hooks/useCompanySearchTaskSubmit.d.ts +3 -3
  27. package/dist/types/core/hooks/useForm/types.d.ts +8 -8
  28. package/dist/types/core/hooks/useFormComposer.d.ts +2 -2
  29. package/dist/types/core/hooks/useLocalStorage.d.ts +2 -2
  30. package/dist/types/language/config.d.ts +2 -1256
  31. package/dist/types/language/types.d.ts +1 -1
  32. package/dist/types/utils/entity-status-util.d.ts +1 -1
  33. package/dist/types/utils/useStateFromProp.d.ts +2 -2
  34. package/package.json +9 -5
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
3
3
  import type { CompanyTypesValue } from '../../../core/models/api/company-types-value';
4
4
  import { LegalEntityType } from '../../../core/models/api/legal-entity-type';
@@ -14,7 +14,7 @@ export interface TaxInformationFieldProps extends BaseFormFieldProps<TaxInformat
14
14
  country: CountryCode;
15
15
  canExempt: boolean;
16
16
  taxIdNumberType: TaxIdNumberType | undefined;
17
- setTaxIdNumberType: StateUpdater<TaxIdNumberType | undefined>;
17
+ setTaxIdNumberType: Dispatch<StateUpdater<TaxIdNumberType | undefined>>;
18
18
  companyType?: CompanyTypesValue | LegalEntityType.TRUST;
19
19
  isUen?: boolean;
20
20
  }
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
3
3
  import type { CountryCode } from '../../../core/models/country-code';
4
4
  import type { TaxIdNumberType } from '../IdFieldTypeSelector/countryIdNumberTypes';
@@ -11,5 +11,5 @@ export interface VatNumberFieldProps extends BaseFormFieldProps<VatNumberFieldSc
11
11
  country: CountryCode;
12
12
  canExempt: boolean;
13
13
  vatNumberType: TaxIdNumberType | undefined;
14
- setVatNumberType: StateUpdater<TaxIdNumberType | undefined>;
14
+ setVatNumberType: Dispatch<StateUpdater<TaxIdNumberType | undefined>>;
15
15
  }
@@ -6,12 +6,12 @@ import { GetConfigurationRequest, GetConfigurationResponse } from '../../models/
6
6
  import { VerifyIdNumberRequest, VerifyIdNumberResponse } from '../../models/api/verify-id-number';
7
7
  import { AccountValidationResponse, ValidationResponse } from '../../models/errors/validation-error';
8
8
  export type ConfigurationApi = {
9
- accountIdentification: (accountIdentificationDetails: AccountIdentification) => Promise<AccountValidationResponse>;
10
9
  getConfiguration: (request: GetConfigurationRequest) => Promise<GetConfigurationResponse>;
11
10
  getAllowedCountries: () => Promise<GetAllowedCountriesResponse>;
12
11
  getAllowedLocales: () => Promise<GetAllowedLocalesResponse>;
13
12
  getDataset: (name: string, locale: string) => Promise<DataSet>;
14
13
  loadDocumentGuidance: () => Promise<void>;
14
+ validateAccountIdentification: (accountIdentificationDetails: AccountIdentification) => Promise<AccountValidationResponse>;
15
15
  verifyIdNumber: (request: VerifyIdNumberRequest) => Promise<VerifyIdNumberResponse | undefined>;
16
16
  validatePhoneNumber: (phoneNumber: string) => Promise<ValidationResponse>;
17
17
  getImageUrl: () => string;
@@ -7,7 +7,8 @@ export declare enum ExperimentNames {
7
7
  EnableCompanySearchFlow = "EnableCompanySearchFlow",
8
8
  EnableNewEntryFlow = "EnableNewEntryFlow",
9
9
  AllowOrganizationSettlorWithExemptionReason = "AllowOrganizationSettlorWithExemptionReason",
10
- AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee"
10
+ AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
11
+ ShowUnsupportedEntityType = "ShowUnsupportedEntityType"
11
12
  }
12
13
  export type ExperimentName = `${ExperimentNames}`;
13
14
  export type Experiments = {
@@ -0,0 +1,2 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ export declare const ReactQueryClient: QueryClient;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare function ReactQueryProvider({ children }: {
3
+ children: JSX.Element;
4
+ }): import("preact").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { AccountIdentification } from '../../models/api/accountIdentification';
2
+ import { AccountValidationResponse } from '../../models/errors/validation-error';
3
+ import { ComponentApiRequestContext } from '../types';
4
+ export declare const validateAccountIdentification: (context: ComponentApiRequestContext, payoutAccountDetails: AccountIdentification) => Promise<AccountValidationResponse>;
@@ -1,7 +1,7 @@
1
- export * from './account-identification';
2
1
  export * from './get-allowed-countries';
3
2
  export * from './get-allowed-locales';
4
3
  export * from './get-configuration';
5
4
  export * from './get-dataset';
5
+ export * from './validate-account-identification';
6
6
  export * from './validate-phone-number';
7
7
  export * from './verify-id-number';
@@ -1,4 +1,4 @@
1
1
  import { AccountIdentification } from '../../models/api/accountIdentification';
2
2
  import { AccountValidationResponse } from '../../models/errors/validation-error';
3
3
  import { RequestContext } from '../types';
4
- export declare const accountIdentification: (context: RequestContext, payoutAccountDetails: AccountIdentification) => Promise<AccountValidationResponse>;
4
+ export declare const validateAccountIdentification: (context: RequestContext, payoutAccountDetails: AccountIdentification) => Promise<AccountValidationResponse>;
@@ -3,5 +3,5 @@ export interface UseHasSeenIntroductionProps {
3
3
  }
4
4
  export declare const useHasSeenIntroduction: ({ legalEntityId }: UseHasSeenIntroductionProps) => {
5
5
  hasSeenIntroduction: boolean;
6
- setHasSeenIntroduction: import("preact/hooks").StateUpdater<boolean>;
6
+ setHasSeenIntroduction: import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<boolean>>;
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import type { AxiosError } from 'axios';
2
- import type { StateUpdater } from 'preact/hooks';
2
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
3
3
  import type { CompanyBasicsSchema } from '../../../components/CompanyBasics/types';
4
4
  import type { DropinAPIHandlers } from '../../../components/Dropins/types';
5
5
  import type { ValidatorMode } from '../../../utils/validation/types';
@@ -26,7 +26,7 @@ export interface UseCompanySearchOptions {
26
26
  canVerify: boolean;
27
27
  baseTrackingPayload: BaseTrackingPayload;
28
28
  limit?: number;
29
- setKompanyAddress: StateUpdater<string | undefined>;
29
+ setKompanyAddress: Dispatch<StateUpdater<string | undefined>>;
30
30
  handleChangeFor: (key: keyof CompanyBasicsSchema, mode?: ValidatorMode) => (e: any) => void;
31
31
  handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
32
32
  handleCompanyDeepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
@@ -1,4 +1,4 @@
1
- import { StateUpdater } from 'preact/hooks';
1
+ import { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import { CompanySearchSchema } from '../../components/CompanySearch/types';
3
3
  import { DropinAPIHandlers } from '../../components/Dropins/types';
4
4
  import { LoadingStatus } from '../../components/internal/LoaderWrapper/constants';
@@ -22,8 +22,8 @@ export interface FormTaskSubmitOptions {
22
22
  problems?: EntityProblems;
23
23
  baseTrackingPayload: BaseTrackingPayload;
24
24
  documentUtils: DocumentApiUtils;
25
- setProblems: StateUpdater<EntityProblems | undefined>;
26
- setLoadingStatus: StateUpdater<LoadingStatus>;
25
+ setProblems: Dispatch<StateUpdater<EntityProblems | undefined>>;
26
+ setLoadingStatus: Dispatch<StateUpdater<LoadingStatus>>;
27
27
  onExternalSubmit?: (company: CompanySearchSchema) => void;
28
28
  handleUpdateLegalEntity: Required<DropinAPIHandlers>['handleUpdateLegalEntity'];
29
29
  }
@@ -1,4 +1,4 @@
1
- import { StateUpdater } from 'preact/hooks';
1
+ import { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { Translatable, TranslationKey } from '../../../language/types';
3
3
  import { Mask } from '../../../utils/masking/maskTypes';
4
4
  import type { ValidationRuleResult, ValidatorMode, ValidatorRules } from '../../../utils/validation/types';
@@ -107,13 +107,13 @@ export interface BaseOuterFormProps<FormSchema> extends BaseFormProps<FormSchema
107
107
  };
108
108
  evaluateConfiguration?: (data: FormSchema) => void;
109
109
  setCustomFormNavigationHandlers?(formId: string, onNext: () => void, onBack: () => void): void;
110
- setHideDropinLayout?: StateUpdater<boolean>;
111
- setHideNavigation?: StateUpdater<boolean>;
112
- setHideFooter?: StateUpdater<boolean>;
113
- setHideOnHomeButton?: StateUpdater<boolean>;
114
- setHideBackButton?: StateUpdater<boolean>;
115
- setSubmitButtonLabel?: StateUpdater<TranslationKey>;
116
- setSkipSubmit?: StateUpdater<boolean>;
110
+ setHideDropinLayout?: Dispatch<StateUpdater<boolean>>;
111
+ setHideNavigation?: Dispatch<StateUpdater<boolean>>;
112
+ setHideFooter?: Dispatch<StateUpdater<boolean>>;
113
+ setHideOnHomeButton?: Dispatch<StateUpdater<boolean>>;
114
+ setHideBackButton?: Dispatch<StateUpdater<boolean>>;
115
+ setSubmitButtonLabel?: Dispatch<StateUpdater<TranslationKey>>;
116
+ setSkipSubmit?: Dispatch<StateUpdater<boolean>>;
117
117
  }
118
118
  export interface BaseInnerFormProps<FormSchema> extends BaseFormProps<FormSchema> {
119
119
  formVerificationErrors?: FormVerificationErrors;
@@ -1,4 +1,4 @@
1
- import { StateUpdater } from 'preact/hooks';
1
+ import { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import { TranslationKey } from '../../language/types';
3
3
  import { EntityProblems } from '../models/errors/entity-problems';
4
4
  import { FormModelWithValidity } from '../models/form';
@@ -10,7 +10,7 @@ export interface FormComposer {
10
10
  gotoFormByFormIndex(index: number): void;
11
11
  activeForm: FormModelWithValidity;
12
12
  shouldValidate: boolean;
13
- setShouldValidate: StateUpdater<boolean>;
13
+ setShouldValidate: Dispatch<StateUpdater<boolean>>;
14
14
  }
15
15
  export declare const useFormComposer: ({ problems, baseTrackingPayload, forms, formRef, submitButtonLabel, externalBackClick, onSubmit, }: {
16
16
  problems?: EntityProblems;
@@ -1,4 +1,4 @@
1
- import { StateUpdater } from 'preact/hooks';
1
+ import { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  type Serializer<T> = (object: T | undefined) => string;
3
3
  type Parser<T> = (val: string) => T | undefined;
4
4
  type Options<T> = Partial<{
@@ -10,5 +10,5 @@ export declare const useLocalStorage: <T>(key: string, defaultValue: T, options?
10
10
  serializer: Serializer<T>;
11
11
  parser: Parser<T>;
12
12
  syncData: boolean;
13
- }>) => [T, StateUpdater<T>];
13
+ }>) => [T, Dispatch<StateUpdater<T>>];
14
14
  export {};