@adyen/kyc-components 2.25.2 → 2.25.3

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.
@@ -3,6 +3,6 @@ import { CompanySearchSchema } from '../../CompanySearch/types';
3
3
  import { CompanyBasicsProps, CompanyBasicsSchema } from '../types';
4
4
  export declare const COMPANY_BASICS_FORM_ID: keyof CompanySearchSchema;
5
5
  export declare const companyBasicsFields: Array<keyof CompanyBasicsSchema>;
6
- declare function CompanyBasics({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, requiredFields, maskedFields, optionalFields, readOnlyFields, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, kompanyAddress, setKompanyAddress, }: CompanyBasicsProps): import("preact/compat").JSX.Element;
6
+ declare function CompanyBasics({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, requiredFields, maskedFields, optionalFields, readOnlyFields, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, }: CompanyBasicsProps): import("preact/compat").JSX.Element;
7
7
  export declare const CompanyBasicsComponent: typeof CompanyBasics;
8
8
  export {};
@@ -1,4 +1,3 @@
1
- import type { StateUpdater } from 'preact/hooks';
2
1
  import type { BaseInnerFormProps } from '../../core/hooks/useForm';
3
2
  import type { DropinAPIHandlers } from '../Dropins/types';
4
3
  import type { CountryFieldSchema } from '../internal/CountryField/types';
@@ -6,10 +5,9 @@ import type { LegalCompanyNameFieldSchema } from '../internal/LegalCompanyNameFi
6
5
  import type { StateFieldSchema } from '../internal/StateField/types';
7
6
  import type { TaxInformationFieldSchema } from '../internal/TaxInformationField/types';
8
7
  export interface CompanyBasicsSchema extends LegalCompanyNameFieldSchema, CountryFieldSchema, StateFieldSchema, TaxInformationFieldSchema {
8
+ kompanyAddress?: string;
9
9
  }
10
10
  export interface CompanyBasicsProps extends BaseInnerFormProps<CompanyBasicsSchema> {
11
- kompanyAddress?: string;
12
- setKompanyAddress: StateUpdater<string | undefined>;
13
11
  handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
14
12
  handleCompanyDeepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
15
13
  handleGetCompanyDataset: DropinAPIHandlers['handleGetCompanyDataset'];
@@ -1,3 +1,2 @@
1
- import './LookupResult.scss';
2
1
  import { LookupResultProps } from './types';
3
2
  export declare const LookupResult: ({ classes, i18n, option, status, isSelected, isInvalid, isVerified, isError, tin, verifiedCompany, onSelect, }: LookupResultProps) => import("preact").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import './CompanyLookupComponent.scss';
2
2
  import { CompanyLookupComponentProps } from '../types';
3
- declare function CompanyLookup({ defaultData, canVerify, legalCompanyName, country, stateOrProvince, taxInformationNumber, handleChangeFor, setLoading, setKompanyAddress, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, }: CompanyLookupComponentProps): import("preact/compat").JSX.Element;
3
+ declare function CompanyLookup({ defaultData, canVerify, legalCompanyName, country, stateOrProvince, taxInformationNumber, handleChangeFor, setLoading, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, }: CompanyLookupComponentProps): import("preact/compat").JSX.Element;
4
4
  export declare const CompanyLookupComponent: typeof CompanyLookup;
5
5
  export {};
@@ -58,7 +58,6 @@ export interface CompanyLookupComponentProps {
58
58
  taxInformationNumber?: string;
59
59
  handleChangeFor: (key: keyof CompanyBasicsSchema, mode?: ValidatorMode) => (e: any) => void;
60
60
  setLoading: StateUpdater<boolean>;
61
- setKompanyAddress: StateUpdater<string | undefined>;
62
61
  handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
63
62
  handleCompanyDeepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
64
63
  handleGetCompanyDataset: DropinAPIHandlers['handleGetCompanyDataset'];
@@ -15,7 +15,6 @@ export interface RegistrationAddressProps extends BaseOuterFormProps<Registratio
15
15
  country?: CountryCode;
16
16
  handleAddressSearch?: DropinAPIHandlers['handleAddressSearch'];
17
17
  handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
18
- kompanyAddress?: string;
19
18
  }
20
19
  export declare enum operationalAddressIsSameIds {
21
20
  OPERATIONAL_ADDRESS_IS_SAME = "OperationAddressAnswerYes",
@@ -1,4 +1,4 @@
1
1
  import { JSX } from 'preact';
2
2
  import { SearchAddressProps } from '../types';
3
- declare const SearchAddress: ({ data, legalEntityId, autocompleteAddressForm, handleChangeFor, handleAddressSearch, handleFindAddress, addressType, kompanyAddress, }: SearchAddressProps) => JSX.Element;
3
+ declare const SearchAddress: ({ data, legalEntityId, autocompleteAddressForm, handleChangeFor, handleAddressSearch, handleFindAddress, addressType, }: SearchAddressProps) => JSX.Element;
4
4
  export default SearchAddress;
@@ -32,7 +32,6 @@ export interface AddressProps extends BaseInnerFormProps<AddressSchema> {
32
32
  handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
33
33
  handleFindAddress: DropinAPIHandlers['handleFindAddress'];
34
34
  legalEntityId?: string;
35
- kompanyAddress?: string;
36
35
  }
37
36
  export interface FieldContainerProps {
38
37
  classNameModifiers?: string[];
@@ -63,5 +62,4 @@ export interface SearchAddressProps {
63
62
  legalEntityId?: string;
64
63
  autocompleteAddressForm: (address: AddressSchema) => void;
65
64
  addressType?: AddressType;
66
- kompanyAddress?: string;
67
65
  }
@@ -74,16 +74,16 @@ export interface State<TLDS extends TopLevelDataSchema> {
74
74
  hasDataChanged: Record<keyof TLDS, boolean>;
75
75
  hasAnyDataChanged: boolean;
76
76
  }
77
- export interface StateSlice<TLDS extends TopLevelDataSchema, SliceName extends keyof TLDS, SliceData extends TLDS[SliceName]> {
78
- data?: SliceData;
77
+ export interface StateSlice<TLDS extends TopLevelDataSchema, SliceName extends keyof TLDS> {
78
+ data?: TLDS[SliceName];
79
79
  valid?: {
80
- [key in keyof SliceData]: boolean;
80
+ [key in keyof TLDS[SliceName]]: boolean;
81
81
  };
82
82
  errors?: {
83
- [key in keyof SliceData]: ValidationRuleResult | null;
83
+ [key in keyof TLDS[SliceName]]: ValidationRuleResult;
84
84
  };
85
85
  fieldProblems?: {
86
- [key in keyof SliceData]: boolean;
86
+ [key in keyof TLDS[SliceName]]: boolean;
87
87
  };
88
- schema?: ReadonlyArray<keyof SliceData>;
88
+ schema?: ReadonlyArray<keyof TLDS[SliceName]>;
89
89
  }
@@ -1,10 +1,10 @@
1
1
  import { DebouncedFunc } from 'lodash';
2
2
  import { StateSlice, TopLevelDataSchema } from './types';
3
3
  export declare function useGlobalData<TLDS extends TopLevelDataSchema>(): TLDS;
4
- interface UseGlobalDataSlice<TLDS extends TopLevelDataSchema, SliceName extends keyof TLDS, SliceData extends TLDS[SliceName]> {
5
- sliceData: SliceData | undefined;
6
- updateStateSlice: DebouncedFunc<(updatedSlice: StateSlice<TLDS, SliceName, SliceData>) => void>;
4
+ interface UseGlobalDataSlice<TLDS extends TopLevelDataSchema, SliceName extends keyof TLDS, SliceSchema extends TLDS[SliceName]> {
5
+ sliceData: SliceSchema | undefined;
6
+ updateStateSlice: DebouncedFunc<(updatedSlice: StateSlice<TLDS, SliceName>) => void>;
7
7
  }
8
- export declare function useGlobalDataSlice<TLDS extends TopLevelDataSchema, SliceName extends keyof TLDS, SliceData extends TLDS[SliceName] = TLDS[SliceName]>(sliceId: SliceName, caller?: string): UseGlobalDataSlice<TLDS, SliceName, SliceData>;
8
+ export declare function useGlobalDataSlice<TLDS extends TopLevelDataSchema, SliceName extends keyof TLDS, SliceSchema extends TLDS[SliceName] = TLDS[SliceName]>(sliceId: SliceName, caller?: string): UseGlobalDataSlice<TLDS, SliceName, SliceSchema>;
9
9
  export declare function useResetGlobalData<TLDS extends TopLevelDataSchema>(caller?: string): () => void;
10
10
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.25.2",
3
+ "version": "2.25.3",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [