@adyen/kyc-components 2.47.2 → 2.48.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 (65) hide show
  1. package/dist/es/adyen-kyc-components.es.js +1728 -929
  2. package/dist/es/{arrow-right-DF4Qe-8E.js → arrow-right-C4o8oS1C.js} +1 -1
  3. package/dist/es/{chevron-down-BzENwYSf.js → chevron-down-C8-1xmDI.js} +1 -1
  4. package/dist/es/chevron-left-DSyI3arz.js +11 -0
  5. package/dist/es/{chevron-right-DczMHcvL.js → chevron-right-BDZzxAre.js} +1 -1
  6. package/dist/es/{cross-BadGfrgB.js → cross-D-SQig6J.js} +1 -1
  7. package/dist/es/{download-DGC5_Bxe.js → download-COfxdarq.js} +1 -1
  8. package/dist/style.css +380 -2127
  9. package/dist/types/components/AdditionalInformation/VerifiedBusinessCard.d.ts +7 -0
  10. package/dist/types/components/AdditionalInformation/component/AdditionalInformationComponent.d.ts +1 -1
  11. package/dist/types/components/AdditionalInformation/types.d.ts +4 -0
  12. package/dist/types/components/BasicInformation/component/BasicInformationComponent.d.ts +1 -1
  13. package/dist/types/components/BasicInformation/types.d.ts +2 -8
  14. package/dist/types/components/BusinessDetails/component/BusinessDetailsComponent.d.ts +1 -0
  15. package/dist/types/components/BusinessDetails/forms.d.ts +1 -2
  16. package/dist/types/components/BusinessDetails/types.d.ts +15 -0
  17. package/dist/types/components/BusinessSelection/BusinessInformationCard.d.ts +16 -0
  18. package/dist/types/components/BusinessSelection/component/BusinessSelectionComponent.d.ts +3 -0
  19. package/dist/types/components/BusinessSelection/index.d.ts +1 -0
  20. package/dist/types/components/BusinessSelection/types.d.ts +25 -0
  21. package/dist/types/components/CompanyStructure/component/CompanyStructureComponent.d.ts +1 -1
  22. package/dist/types/components/CompanyStructure/types.d.ts +3 -0
  23. package/dist/types/components/Dropins/BusinessDetailsDropin/types.d.ts +2 -1
  24. package/dist/types/components/Dropins/DropinLayout/ActionBar/ActionBar.d.ts +1 -1
  25. package/dist/types/components/Dropins/DropinLayout/ActionBar/type.d.ts +1 -0
  26. package/dist/types/components/Dropins/FormNavigation/FormNavigation.d.ts +1 -2
  27. package/dist/types/components/Dropins/FormNavigation/index.d.ts +1 -1
  28. package/dist/types/components/Dropins/FormWrapper/FormWrapper.d.ts +3 -1
  29. package/dist/types/components/Individual/validators.d.ts +1 -2
  30. package/dist/types/components/RegistrationAddress/types.d.ts +2 -0
  31. package/dist/types/components/UIElement/UIElement.d.ts +22 -0
  32. package/dist/types/components/internal/Address/components/SearchAddress.d.ts +1 -1
  33. package/dist/types/components/internal/Address/types.d.ts +3 -0
  34. package/dist/types/components/internal/Alert/Alert.d.ts +1 -1
  35. package/dist/types/components/internal/Alert/types.d.ts +4 -7
  36. package/dist/types/components/internal/Card/Card.d.ts +1 -1
  37. package/dist/types/components/internal/Card/CardGroup.d.ts +1 -1
  38. package/dist/types/components/internal/Card/index.d.ts +2 -0
  39. package/dist/types/components/internal/Card/types.d.ts +2 -0
  40. package/dist/types/components/internal/DBANameField/DBANameField.d.ts +1 -1
  41. package/dist/types/components/internal/DBANameField/fieldConfig.d.ts +1 -0
  42. package/dist/types/components/internal/DBANameField/types.d.ts +1 -1
  43. package/dist/types/components/internal/Icon/Icon.d.ts +1 -0
  44. package/dist/types/components/internal/Link/Link.d.ts +1 -1
  45. package/dist/types/components/internal/Link/types.d.ts +0 -3
  46. package/dist/types/components/internal/Loader/Loader.d.ts +7 -9
  47. package/dist/types/components/internal/LoaderWrapper/LoaderWrapper.d.ts +1 -2
  48. package/dist/types/core/core.d.ts +1 -1
  49. package/dist/types/core/hooks/useBankConfigurationHandlers.d.ts +3 -1
  50. package/dist/types/core/hooks/useForm/reducer.d.ts +4 -2
  51. package/dist/types/core/hooks/useForm/types.d.ts +11 -0
  52. package/dist/types/core/hooks/useForm/useForm.d.ts +2 -1
  53. package/dist/types/core/hooks/useUnifyLoadingStatus.d.ts +2 -0
  54. package/dist/types/core/models/api/company-search.d.ts +1 -0
  55. package/dist/types/core/models/api/organization.d.ts +1 -0
  56. package/dist/types/core/models/country-code.d.ts +1 -0
  57. package/dist/types/core/process-field-configurations.d.ts +3 -2
  58. package/dist/types/utils/birth-date-utils.d.ts +11 -0
  59. package/dist/types/utils/mapping/componentApiMapping.d.ts +2 -1
  60. package/dist/types/utils/regex/patternValidators.d.ts +1 -1
  61. package/dist/types/utils/testing/IgnoreLocalStorage.d.ts +5 -0
  62. package/package.json +13 -2
  63. package/dist/types/components/UIElement.d.ts +0 -22
  64. package/dist/types/components/internal/Loader/index.d.ts +0 -2
  65. package/dist/types/components/internal/Spinner/Spinner.d.ts +0 -16
@@ -0,0 +1,7 @@
1
+ import './VerifiedBusinessCard.scss';
2
+ import type { CompanyDatasetResponse } from '../../core/models/api/company-search';
3
+ interface VerifiedBusinessDataProps {
4
+ verifiedBusiness: CompanyDatasetResponse | undefined;
5
+ }
6
+ export declare function VerifiedBusinessCard({ verifiedBusiness }: VerifiedBusinessDataProps): import("preact").JSX.Element;
7
+ export {};
@@ -3,4 +3,4 @@ import type { BusinessDetailsSchema } from '../../BusinessDetails/types';
3
3
  import { type AdditionalInformationProps, type AdditionalInformationSchema } from '../types';
4
4
  export declare const ADDITIONAL_INFORMATION_FORM_ID: keyof BusinessDetailsSchema;
5
5
  export declare const additionalInformationFields: Array<keyof AdditionalInformationSchema>;
6
- export declare function AdditionalInformationComponent({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, allFields, requiredFields, obscuredFields, optionalFields, readOnlyFields, country, companyType, }: AdditionalInformationProps): import("preact").JSX.Element;
6
+ export declare function AdditionalInformationComponent({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, allFields, requiredFields, obscuredFields, optionalFields, readOnlyFields, trustedFields, country, companyType, verifiedBusiness, showCompanyStructure, }: AdditionalInformationProps): import("preact").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import type { BaseInnerFormProps } from '../../core/hooks/useForm';
2
+ import type { CompanyDatasetResponse } from '../../core/models/api/company-search';
2
3
  import type { CompanyTypesValue } from '../../core/models/api/company-types-value';
3
4
  import type { CountryCode } from '../../core/models/country-code';
4
5
  import type { BusinessRegistrationNumberFieldSchema } from '../internal/BusinessRegistrationNumberField/types';
@@ -11,8 +12,11 @@ import type { StockTickerSymbolFieldSchema } from '../internal/StockTickerSymbol
11
12
  import type { TaxInformationFieldSchema } from '../internal/TaxInformationField';
12
13
  import type { VatNumberFieldSchema } from '../internal/VatNumberField';
13
14
  export interface AdditionalInformationSchema extends LegalCompanyNameFieldSchema, DBANameFieldSchema, VatNumberFieldSchema, TaxInformationFieldSchema, BusinessRegistrationNumberFieldSchema, DateOfIncorporationFieldSchema, StockISINFieldSchema, StockExchangeMICFieldSchema, StockTickerSymbolFieldSchema {
15
+ legalFormDescription?: string;
14
16
  }
15
17
  export interface AdditionalInformationProps extends BaseInnerFormProps<AdditionalInformationSchema> {
16
18
  country: CountryCode;
17
19
  companyType: CompanyTypesValue | undefined;
20
+ verifiedBusiness: CompanyDatasetResponse | undefined;
21
+ showCompanyStructure: boolean;
18
22
  }
@@ -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, country, companyType, isTopLevelEntity, }: 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, }: BasicInformationProps): import("preact").JSX.Element;
@@ -2,22 +2,16 @@ import type { BaseInnerFormProps } from '../../core/hooks/useForm';
2
2
  import type { CompanyTypesValue } from '../../core/models/api/company-types-value';
3
3
  import type { CountryCode } from '../../core/models/country-code';
4
4
  import type { BaseTrackingPayload } from '../../core/utils';
5
- import type { DropinAPIHandlers } from '../Dropins/types';
6
5
  import type { BusinessNameFieldSchema } from '../internal/BusinessNameField/types';
7
6
  import type { BusinessRegistrationNumberFieldSchema } from '../internal/BusinessRegistrationNumberField/types';
8
7
  import type { CountryFieldSchema } from '../internal/CountryField/types';
9
8
  import type { StateFieldSchema } from '../internal/StateField/types';
10
9
  import type { TaxInformationFieldSchema } from '../internal/TaxInformationField';
11
- export interface BasicInformationSchema extends CountryFieldSchema, BusinessNameFieldSchema, StateFieldSchema, BusinessRegistrationNumberFieldSchema, TaxInformationFieldSchema {
12
- }
10
+ export type BasicInformationSchema = CountryFieldSchema & BusinessNameFieldSchema & StateFieldSchema & BusinessRegistrationNumberFieldSchema & TaxInformationFieldSchema;
13
11
  export interface BasicInformationProps extends BaseInnerFormProps<BasicInformationSchema> {
14
12
  country: CountryCode;
15
13
  companyType: CompanyTypesValue | undefined;
16
14
  isTopLevelEntity: boolean;
17
15
  baseTrackingPayload: BaseTrackingPayload;
18
- handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
19
- handleCompanyDeepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
20
- handleGetCompanyDataset: DropinAPIHandlers['handleGetCompanyDataset'];
21
- handleRefreshCompanyDataset: DropinAPIHandlers['handleRefreshCompanyDataset'];
22
- handleVerifyTin: DropinAPIHandlers['handleVerifyTin'];
16
+ isBusinessSelection: boolean;
23
17
  }
@@ -1,2 +1,3 @@
1
+ import './BusinessDetailsComponent.scss';
1
2
  import type { BusinessDetailsProps } from '../types';
2
3
  export declare function BusinessDetailsComponent(props: BusinessDetailsProps): import("preact").JSX.Element;
@@ -7,8 +7,7 @@ export declare const getForms: (country: CountryCode) => {
7
7
  readonly formId: "basicInformation";
8
8
  readonly formName: "basicInformationFormName";
9
9
  readonly formHeading: "basicInformationFormHeading";
10
- readonly formDescription: "basicInformationFormDescription";
11
- readonly fields: (keyof BasicInformationSchema)[];
10
+ readonly fields: ("country" | "businessName" | "stateOrProvince" | keyof import("../internal/TaxInformationField").TaxInformationFieldSchema | keyof import("../internal/BusinessRegistrationNumberField/types").BusinessRegistrationNumberFieldSchema)[];
12
11
  };
13
12
  readonly companyStructure: {
14
13
  readonly formId: "companyStructure";
@@ -1,4 +1,6 @@
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
1
2
  import type { BaseOuterFormProps } from '../../core/hooks/useForm';
3
+ import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
2
4
  import type { LegalEntityType } from '../../core/models/api/legal-entity-type';
3
5
  import type { CountryCode } from '../../core/models/country-code';
4
6
  import type { FormModel } from '../../core/models/form';
@@ -21,7 +23,20 @@ export interface BusinessDetailsProps extends BaseOuterFormProps<BusinessDetails
21
23
  country: CountryCode;
22
24
  isTopLevelEntity: boolean;
23
25
  baseTrackingPayload: BaseTrackingPayload;
26
+ isBusinessSelection: boolean;
27
+ isLoading: boolean;
28
+ searchName: string | undefined;
29
+ searchResults: Array<CompanySearchResult> | undefined;
30
+ verifiedBusiness: CompanyDatasetResponse | undefined;
31
+ showCompanyStructure: boolean;
24
32
  forms?: FormModel[];
33
+ setIsBusinessSelection: Dispatch<StateUpdater<boolean>>;
34
+ setIsLoading: Dispatch<StateUpdater<boolean>>;
35
+ setSearchName: Dispatch<StateUpdater<string | undefined>>;
36
+ setSearchResults: Dispatch<StateUpdater<Array<CompanySearchResult> | undefined>>;
37
+ setVerifiedBusiness: Dispatch<StateUpdater<CompanyDatasetResponse | undefined>>;
38
+ setShowCompanyStructure: Dispatch<StateUpdater<boolean>>;
39
+ handleNextClick: () => void;
25
40
  handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
26
41
  handleFindAddress: DropinAPIHandlers['handleFindAddress'];
27
42
  handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
@@ -0,0 +1,16 @@
1
+ import './BusinessInformationCard.scss';
2
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
3
+ import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
4
+ interface BusinessInformationCardProps {
5
+ result: CompanySearchResult;
6
+ selectedBusinessId: string | undefined;
7
+ currentBusinessSelection: CompanyDatasetResponse | undefined;
8
+ fetching: boolean;
9
+ failedToLoad: boolean;
10
+ invalidTin: boolean;
11
+ handleSelectBusiness: (result: CompanySearchResult) => Promise<void>;
12
+ handleConfirmSelection: (data?: CompanyDatasetResponse) => Promise<void>;
13
+ setIsBusinessSelection: Dispatch<StateUpdater<boolean>>;
14
+ }
15
+ export declare function BusinessInformationCard({ result, selectedBusinessId, currentBusinessSelection, fetching, failedToLoad, invalidTin, handleSelectBusiness, handleConfirmSelection, setIsBusinessSelection, }: BusinessInformationCardProps): import("preact").JSX.Element;
16
+ export {};
@@ -0,0 +1,3 @@
1
+ import './BusinessSelectionComponent.scss';
2
+ import type { BusinessSelectionProps } from '../types';
3
+ export declare function BusinessSelectionComponent({ country, state, tin, searchName, searchResults, proceedToNextForm, isLoading, setIsLoading, setVerifiedBusiness, setShowCompanyStructure, setIsBusinessSelection, setSearchName, setSearchResults, handleNextClick, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, }: BusinessSelectionProps): import("preact").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './component/BusinessSelectionComponent';
@@ -0,0 +1,25 @@
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
+ import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
3
+ import type { CountryCode } from '../../core/models/country-code';
4
+ import type { StateCodeUS } from '../../core/models/state-code';
5
+ import type { DropinAPIHandlers } from '../Dropins/types';
6
+ export interface BusinessSelectionProps {
7
+ country: CountryCode | undefined;
8
+ state: StateCodeUS | undefined;
9
+ tin: string | undefined;
10
+ isLoading: boolean;
11
+ searchName: string | undefined;
12
+ searchResults: Array<CompanySearchResult> | undefined;
13
+ proceedToNextForm: boolean;
14
+ setIsLoading: Dispatch<StateUpdater<boolean>>;
15
+ setSearchName: Dispatch<StateUpdater<string | undefined>>;
16
+ setSearchResults: Dispatch<StateUpdater<Array<CompanySearchResult> | undefined>>;
17
+ setVerifiedBusiness: Dispatch<StateUpdater<CompanyDatasetResponse | undefined>>;
18
+ setShowCompanyStructure: Dispatch<StateUpdater<boolean>>;
19
+ setIsBusinessSelection: Dispatch<StateUpdater<boolean>>;
20
+ handleNextClick: () => void;
21
+ handleCompanyDeepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
22
+ handleGetCompanyDataset: DropinAPIHandlers['handleGetCompanyDataset'];
23
+ handleRefreshCompanyDataset: DropinAPIHandlers['handleRefreshCompanyDataset'];
24
+ handleVerifyTin: DropinAPIHandlers['handleVerifyTin'];
25
+ }
@@ -3,4 +3,4 @@ import type { CompanySearchSchema } from '../../CompanySearch/types';
3
3
  import type { CompanyStructureProps, CompanyStructureSchema } from '../types';
4
4
  export declare const COMPANY_STRUCTURE_FORM_ID: keyof CompanySearchSchema;
5
5
  export declare const companyStructureFields: Array<keyof CompanyStructureSchema>;
6
- export declare function CompanyStructureComponent({ id, data, labels, heading, description, formVerificationErrors, fieldValidationErrors, requiredFields, country, kompanyVerifiedData, ...props }: CompanyStructureProps): import("preact").JSX.Element;
6
+ export declare function CompanyStructureComponent({ id, data, labels, heading, description, formVerificationErrors, fieldValidationErrors, requiredFields, country, verifiedBusiness, kompanyVerifiedData, showCompanyStructure, ...props }: CompanyStructureProps): import("preact").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import type { BaseInnerFormProps } from '../../core/hooks/useForm';
2
+ import type { CompanyDatasetResponse } from '../../core/models/api/company-search';
2
3
  import type { CompanyTypesValue } from '../../core/models/api/company-types-value';
3
4
  import type { CountryCode } from '../../core/models/country-code';
4
5
  import type { CompanySearchSchema } from '../CompanySearch/types';
@@ -8,5 +9,7 @@ export interface CompanyStructureSchema extends AccountHolderSchema {
8
9
  }
9
10
  export interface CompanyStructureProps extends BaseInnerFormProps<CompanyStructureSchema> {
10
11
  country: CountryCode;
12
+ verifiedBusiness?: CompanyDatasetResponse | undefined;
11
13
  kompanyVerifiedData?: CompanySearchSchema;
14
+ showCompanyStructure?: boolean;
12
15
  }
@@ -25,7 +25,8 @@ export declare enum BusinessDetailsEvents {
25
25
  SELECTION_ERROR = "BusinessDetails_CompanySelectionError"
26
26
  }
27
27
  export type BusinessDetailsDropinApihandler = Required<Pick<DropinAPIHandlers, 'handleCreateDocument' | 'handleGetDocument' | 'handleUpdateDocument' | 'handleUpdateLegalEntity'>>;
28
- export interface BusinessDetailsDropinProps extends Omit<BusinessDetailsProps, 'isTopLevelEntity' | 'baseTrackingPayload'>, BusinessDetailsDropinApihandler, DropinProps {
28
+ export type BusinessDetailsDropin = Omit<BusinessDetailsProps, 'isTopLevelEntity' | 'baseTrackingPayload' | 'handleNextClick' | 'isBusinessSelection' | 'setIsBusinessSelection' | 'isLoading' | 'setIsLoading' | 'searchName' | 'setSearchName' | 'searchResults' | 'setSearchResults' | 'verifiedBusiness' | 'setVerifiedBusiness' | 'showCompanyStructure' | 'setShowCompanyStructure'>;
29
+ export interface BusinessDetailsDropinProps extends BusinessDetailsDropin, BusinessDetailsDropinApihandler, DropinProps {
29
30
  legalEntityResponse: ExistingLegalEntity;
30
31
  isTargetLegalEntityType?: boolean;
31
32
  parentLegalEntity?: LegalEntity;
@@ -1,4 +1,4 @@
1
1
  import './_action-bar.component.scss';
2
2
  import type { ActionBarProps } from './type';
3
- declare const ActionBar: ({ onNext, onBack, onHome, homeButtonLabel, backButtonLabel, nextButtonLabel, hideOnHomeButton, hideBackButton, nextButtonDisabled, }: ActionBarProps) => import("preact").JSX.Element;
3
+ declare const ActionBar: ({ onNext, onBack, onHome, homeButtonLabel, backButtonLabel, nextButtonLabel, hideOnHomeButton, hideBackButton, hideNextButton, nextButtonDisabled, }: ActionBarProps) => import("preact").JSX.Element;
4
4
  export default ActionBar;
@@ -7,5 +7,6 @@ export interface ActionBarProps {
7
7
  homeButtonLabel?: string;
8
8
  hideOnHomeButton?: boolean;
9
9
  hideBackButton?: boolean;
10
+ hideNextButton?: boolean;
10
11
  nextButtonDisabled?: boolean;
11
12
  }
@@ -1,4 +1,3 @@
1
1
  import './FormNavigation.scss';
2
2
  import type { FormNavigationProps } from './types';
3
- declare function FormNavigation({ forms, activeForm, gotoForm, validateForm, className, taskName, verificationErrors, trackNavigation, }: FormNavigationProps): import("preact").JSX.Element;
4
- export default FormNavigation;
3
+ export declare function FormNavigation({ forms, activeForm, gotoForm, validateForm, className, taskName, verificationErrors, trackNavigation, }: FormNavigationProps): import("preact").JSX.Element;
@@ -1 +1 @@
1
- export { default } from './FormNavigation';
1
+ export * from './FormNavigation';
@@ -22,6 +22,7 @@ export interface FormWrapperProps {
22
22
  handleHomeClick?(): void;
23
23
  nextButtonLabel: string;
24
24
  homeButtonLabel?: string;
25
+ backButtonLabel?: string;
25
26
  loadingStatus: LoadingStatus;
26
27
  forms: FormModelWithValidity[];
27
28
  activeForm: FormModelWithValidity;
@@ -31,9 +32,10 @@ export interface FormWrapperProps {
31
32
  hideFooter?: boolean;
32
33
  hideHomeButton?: boolean;
33
34
  hideBackButton?: boolean;
35
+ hideNextButton?: boolean;
34
36
  hideNavigation?: boolean;
35
37
  problems?: EntityProblems;
36
38
  canSubmit?: boolean;
37
39
  onSubmit(): void;
38
40
  }
39
- export declare const FormWrapper: ({ summary, taskName, children, handleNextClick, handleBackClick, handleHomeClick, nextButtonLabel, homeButtonLabel, loadingStatus, gotoFormByFormIndex, forms, activeForm, handleGetIdVerificationToken, validateForm, baseTrackingPayload, hideDropinLayout, hideFooter, hideHomeButton, hideBackButton, hideNavigation, canSubmit, onSubmit, problems, }: FormWrapperProps) => import("preact").JSX.Element;
41
+ export declare const FormWrapper: ({ summary, taskName, children, handleNextClick, handleBackClick, handleHomeClick, nextButtonLabel, backButtonLabel, homeButtonLabel, loadingStatus, gotoFormByFormIndex, forms, activeForm, handleGetIdVerificationToken, validateForm, baseTrackingPayload, hideDropinLayout, hideFooter, hideHomeButton, hideBackButton, hideNextButton, hideNavigation, canSubmit, onSubmit, problems, }: FormWrapperProps) => import("preact").JSX.Element;
@@ -1,8 +1,7 @@
1
1
  import type { ExperimentName } from '../../core/Context/ExperimentContext/types';
2
2
  import type { CountryCode } from '../../core/models/country-code';
3
- import type { ValidatorRule, ValidatorRules } from '../../utils/validation/types';
3
+ import type { ValidatorRule } from '../../utils/validation/types';
4
4
  import type { PersonalDetailsSchema } from '../PersonalDetails/types';
5
- export declare const personalDetailsValidationRules: ValidatorRules<PersonalDetailsSchema>;
6
5
  export declare const validators: ({ country, isExperimentEnabled, }: {
7
6
  country: CountryCode;
8
7
  isExperimentEnabled?: (experiment: ExperimentName) => boolean;
@@ -1,4 +1,5 @@
1
1
  import type { BaseOuterFormProps } from '../../core/hooks/useForm';
2
+ import type { CompanyDatasetResponse } from '../../core/models/api/company-search';
2
3
  import type { CountryCode } from '../../core/models/country-code';
3
4
  import type { FormModel } from '../../core/models/form';
4
5
  import type { TranslationKey } from '../../language/types';
@@ -15,6 +16,7 @@ export interface RegistrationAddressProps extends BaseOuterFormProps<Registratio
15
16
  country?: CountryCode;
16
17
  handleAddressSearch?: DropinAPIHandlers['handleAddressSearch'];
17
18
  handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
19
+ verifiedBusiness?: CompanyDatasetResponse | undefined;
18
20
  kompanyAddress?: string;
19
21
  }
20
22
  export declare enum operationalAddressIsSameIds {
@@ -0,0 +1,22 @@
1
+ import './UIElement.scss';
2
+ import type { JSX } from 'preact';
3
+ import type { EmptyObject } from 'type-fest';
4
+ import type { AuthProviderProps } from '../../core/Context/AuthContext/AuthProvider';
5
+ import type { CoreProviderProps } from '../../core/Context/CoreProvider';
6
+ import type { ExperimentsProps } from '../../core/Context/ExperimentContext/types';
7
+ import type { ExpiryProviderProps } from '../../core/Context/ExpiryContext/ExpiryContext';
8
+ import type { I18nProviderProps } from '../../core/Context/I18nProvider/I18nProvider';
9
+ import type { SettingsProps } from '../../core/Context/SettingsContext/types';
10
+ import type { UserEventCallback } from '../../core/user-events';
11
+ import type { BaseElementProps } from '../BaseElement';
12
+ import { BaseElement } from '../BaseElement';
13
+ import type { ComponentMap } from '../index';
14
+ export interface UIElementProps<ComponentProps extends object> extends BaseElementProps, CoreProviderProps, AuthProviderProps, I18nProviderProps, ExpiryProviderProps, SettingsProps, ExperimentsProps {
15
+ onUserEvent?: UserEventCallback;
16
+ component: (props: ComponentProps) => JSX.Element;
17
+ componentName: keyof ComponentMap;
18
+ componentProps: ComponentProps;
19
+ }
20
+ export declare class UIElement<ComponentProps extends object = EmptyObject> extends BaseElement<UIElementProps<ComponentProps>> {
21
+ render: () => JSX.Element;
22
+ }
@@ -1,4 +1,4 @@
1
1
  import type { JSX } from 'preact';
2
2
  import type { 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, kompanyAddress, kompanyPrefilled, }: SearchAddressProps) => JSX.Element;
4
4
  export default SearchAddress;
@@ -1,4 +1,5 @@
1
1
  import type { BaseInnerFormProps } from '../../../core/hooks/useForm';
2
+ import type { CompanyDatasetResponse } from '../../../core/models/api/company-search';
2
3
  import type { CountryCode } from '../../../core/models/country-code';
3
4
  import type { TranslationKey } from '../../../language/types';
4
5
  import type { AddressField } from '../../../types';
@@ -32,6 +33,7 @@ export interface AddressProps extends BaseInnerFormProps<AddressSchema> {
32
33
  handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
33
34
  handleFindAddress: DropinAPIHandlers['handleFindAddress'];
34
35
  legalEntityId?: string;
36
+ verifiedBusiness?: CompanyDatasetResponse | undefined;
35
37
  kompanyAddress?: string;
36
38
  }
37
39
  export interface FieldContainerProps {
@@ -64,4 +66,5 @@ export interface SearchAddressProps {
64
66
  autocompleteAddressForm: (address: AddressSchema) => void;
65
67
  addressType?: AddressType;
66
68
  kompanyAddress?: string;
69
+ kompanyPrefilled?: boolean;
67
70
  }
@@ -1,4 +1,4 @@
1
1
  import './_alert.scss';
2
2
  import type { AlertIconProps, AlertProps } from './types';
3
- export declare const Alert: ({ title, type, className, hasCloseButton, children, icon, }: AlertProps) => import("preact").JSX.Element;
3
+ export declare const Alert: ({ title, type, className, hasCloseButton, actionButton, children, icon, testId, }: AlertProps) => import("preact").JSX.Element;
4
4
  export declare const AlertIcon: ({ className, type }: AlertIconProps) => import("preact").JSX.Element;
@@ -5,21 +5,18 @@ export interface AlertProps {
5
5
  type?: AlertTypes;
6
6
  className?: string;
7
7
  hasCloseButton?: boolean;
8
+ actionButton?: ComponentChild;
8
9
  children?: ComponentChild;
9
10
  icon?: false | ComponentChild;
11
+ testId?: string;
10
12
  }
11
13
  export interface AlertIconProps {
12
14
  type: AlertTypes;
13
15
  className?: string;
14
16
  }
15
- export declare enum AlertTypes {
16
- BASIC = 0,
17
- INFO = 1,
18
- ERROR = 2,
19
- WARNING = 3,
20
- SUCCESS = 4
21
- }
17
+ type AlertTypes = 'basic' | 'info' | 'error' | 'warning' | 'success';
22
18
  export interface VerificationErrorAlertProps {
23
19
  problems?: EntityProblems;
24
20
  className?: string;
25
21
  }
22
+ export {};
@@ -1,4 +1,4 @@
1
1
  import './_card.component.scss';
2
2
  import type { JSX } from 'preact';
3
3
  import type { CardProps } from './types';
4
- export default function Card({ className, children, stateful, active, disabled, warning, warningMessage, title, subTitle, onClick, onKeyDown, }: CardProps): JSX.Element;
4
+ export declare function Card({ className, children, stateful, active, disabled, warning, warningMessage, title, subTitle, headerButton, onClick, onKeyDown, }: CardProps): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import './_card-group.component.scss';
2
2
  import type { CardGroupProps } from './types';
3
- export default function CardGroup({ className, children }: CardGroupProps): import("preact").JSX.Element;
3
+ export declare function CardGroup({ className, children, spaced }: CardGroupProps): import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './Card';
2
+ export * from './CardGroup';
@@ -9,10 +9,12 @@ export interface CardProps {
9
9
  warningMessage?: string;
10
10
  title?: string;
11
11
  subTitle?: string;
12
+ headerButton?: ComponentChildren;
12
13
  onClick?: (e: JSX.TargetedMouseEvent<HTMLElement>) => void;
13
14
  onKeyDown?: (e: JSX.TargetedKeyboardEvent<HTMLElement>) => void;
14
15
  }
15
16
  export interface CardGroupProps {
16
17
  children?: ComponentChildren;
17
18
  className?: string;
19
+ spaced?: boolean;
18
20
  }
@@ -1,4 +1,4 @@
1
1
  import './DBANameField.scss';
2
2
  import type { DBANameFieldProps, DBANameFieldSchema } from './types';
3
3
  export declare const DBA_NAME_FIELD: Array<keyof DBANameFieldSchema>;
4
- export declare function DBANameField({ data, valid, errors, labels, helperText, readonly, handleChangeFor, }: DBANameFieldProps): import("preact").JSX.Element;
4
+ export declare function DBANameField({ data, valid, errors, labels, helperText, readonly, handleChangeFor, setErrors, }: DBANameFieldProps): import("preact").JSX.Element;
@@ -1,3 +1,4 @@
1
1
  import type { FieldMetadata } from '../../../core/models/country-config';
2
2
  import type { DBANameFieldSchema } from './types';
3
+ export declare const hasDbaFieldMetadata: FieldMetadata<DBANameFieldSchema, 'hasDba'>;
3
4
  export declare const dbaNameFieldMetadata: FieldMetadata<DBANameFieldSchema, 'dbaName'>;
@@ -1,6 +1,6 @@
1
1
  import type { BaseFormFieldProps } from '../../../core/hooks/useForm';
2
2
  export interface DBANameFieldSchema {
3
- hasDBA?: boolean;
3
+ hasDba?: boolean;
4
4
  dbaName?: string;
5
5
  }
6
6
  export type DBANameFieldProps = BaseFormFieldProps<DBANameFieldSchema>;
@@ -8,6 +8,7 @@ declare const icons: {
8
8
  readonly 'checkmark-small': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
9
9
  readonly 'chevron-down': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
10
10
  readonly 'chevron-right': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
11
+ readonly 'chevron-left': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
11
12
  readonly 'chevron-up': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
12
13
  readonly company: import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
13
14
  readonly 'company-2': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
@@ -1,5 +1,5 @@
1
1
  import './_link.component.scss';
2
2
  import '../Button/_button.component.scss';
3
3
  import type LinkProps from './types';
4
- declare const Link: ({ className, children, href, external, icon, underline, inheritStyles, showAsButton, iconLeft, onClick, }: LinkProps) => import("preact").JSX.Element;
4
+ declare const Link: ({ className, children, href, external, icon, showAsButton, onClick }: LinkProps) => import("preact").JSX.Element;
5
5
  export default Link;
@@ -8,8 +8,5 @@ export default interface LinkProps {
8
8
  className?: classNames.Argument;
9
9
  children: string | HTMLElement | JSX.Element;
10
10
  showAsButton?: boolean;
11
- inheritStyles?: boolean;
12
- underline?: boolean;
13
- iconLeft?: boolean;
14
11
  onClick?: JSX.MouseEventHandler<HTMLAnchorElement>;
15
12
  }
@@ -1,22 +1,20 @@
1
- import './_loader.scss';
2
- export type LoaderSize = 'xsmall' | 'small' | 'medium' | 'large';
1
+ import './Loader.scss';
3
2
  export interface LoaderProps {
4
3
  /**
5
- * Whether the spinner should be rendered inline
4
+ * Whether the loader should be rendered inline
6
5
  */
7
6
  inline?: boolean;
8
7
  /**
9
- * size of the spinner (small/medium/large)
8
+ * size of the loader (small/medium/large)
10
9
  */
11
- size?: LoaderSize;
10
+ size?: 'small' | 'medium' | 'large' | 'xsmall';
12
11
  /**
13
- * includes a dot inside the spinner
12
+ * includes a dot inside the loader
14
13
  */
15
14
  dot?: boolean;
16
15
  }
17
16
  /**
18
- * Default Loading Spinner
17
+ * Default Loading Loader
19
18
  * @param props -
20
19
  */
21
- declare const Loader: ({ inline, size, dot }: LoaderProps) => import("preact").JSX.Element;
22
- export default Loader;
20
+ export declare const Loader: ({ inline, size, dot }: LoaderProps) => import("preact").JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import type { ComponentChildren } from 'preact';
2
- import type { LoaderSize } from '../Loader';
3
2
  import type { LoadingStatus } from './constants';
4
3
  interface LoaderWrapperProps {
5
4
  status?: LoadingStatus;
6
5
  formOpacityWhenLoading?: 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
7
- loaderSize?: LoaderSize;
6
+ loaderSize?: 'large' | 'small' | 'medium';
8
7
  children?: ComponentChildren;
9
8
  showSpinner?: boolean;
10
9
  className?: string;
@@ -1,6 +1,6 @@
1
1
  import type { ComponentMap, ComponentOptions } from '../components';
2
2
  import type { BaseElement } from '../components/BaseElement';
3
- import { UIElement } from '../components/UIElement';
3
+ import { UIElement } from '../components/UIElement/UIElement';
4
4
  import type { CoreOptions } from './types';
5
5
  export declare class Core {
6
6
  options: CoreOptions & {
@@ -1,4 +1,5 @@
1
1
  import type { DropinAPIHandlers } from '../../components/Dropins/types';
2
+ import type { LoadingStatus } from '../../components/internal/LoaderWrapper/constants';
2
3
  import type { ConfigurationApi } from '../Context/ConfigurationApiContext/ConfigurationApiContext';
3
4
  import type { CapabilityName } from '../models/api/capability';
4
5
  import type { BankVerificationVendorsResponse } from '../models/api/get-bankVerification-providers';
@@ -12,13 +13,14 @@ interface UseBankConfigurationHandlersProps {
12
13
  getConfiguration: ConfigurationApi['getConfiguration'];
13
14
  legalEntityType: LegalEntityType;
14
15
  capabilities?: CapabilityName[];
16
+ setLoadingStatus: (loadingStatus: LoadingStatus) => void;
15
17
  }
16
18
  /** **
17
19
  * There are some differences in the response provided by bankVerificationVendors
18
20
  * when connected to open banking engine in backend and when not. The two flows here are created to
19
21
  * reduce the impact of any potential problems by introducing open banking engine.
20
22
  */
21
- export declare const useBankConfigurationHandlers: ({ isEmbeddedDropin, handleGetBankVerificationVendors, bankAccountCountry, getConfiguration, legalEntityType, capabilities, }: UseBankConfigurationHandlersProps) => {
23
+ export declare const useBankConfigurationHandlers: ({ isEmbeddedDropin, handleGetBankVerificationVendors, bankAccountCountry, getConfiguration, legalEntityType, capabilities, setLoadingStatus, }: UseBankConfigurationHandlersProps) => {
22
24
  getConfigurationData: () => Promise<GetConfigurationResponse>;
23
25
  getBankVerificationVendorsHandler: (country: CountryCode, openBankingPartnerConfigId?: string) => Promise<BankVerificationVendorsResponse>;
24
26
  };
@@ -10,13 +10,14 @@ export interface InitOptions<FormSchema> {
10
10
  defaultData?: FormSchema;
11
11
  obscuredFields?: (keyof FormSchema)[];
12
12
  optionalFields?: (keyof FormSchema)[];
13
+ trustedFields?: (keyof FormSchema)[];
13
14
  fieldProblems?: Record<keyof FormSchema, boolean>;
14
15
  formatters?: FormatRules<FormSchema>;
15
16
  }
16
17
  /**
17
18
  * Processes default data and sets initial state
18
19
  */
19
- export declare function init<FormSchema>({ schema, defaultData, fieldProblems, obscuredFields, optionalFields, formatters, staticValidate, asyncValidate, }: InitOptions<FormSchema>): FormState<FormSchema>;
20
+ export declare function init<FormSchema>({ schema, defaultData, fieldProblems, obscuredFields, optionalFields, trustedFields, formatters, staticValidate, asyncValidate, }: InitOptions<FormSchema>): FormState<FormSchema>;
20
21
  export type ReducerActionType = 'setData' | 'setValid' | 'setErrors' | 'setFieldProblems' | 'updateField' | 'mergeForm' | 'setSchema' | 'validateForm';
21
22
  export interface ReducerAction<FormSchema> {
22
23
  type: ReducerActionType;
@@ -34,7 +35,8 @@ export interface GetReducerOptions<FormSchema> {
34
35
  asyncValidate: TriggerAsyncValidation<FormSchema>;
35
36
  obscuredFields?: (keyof FormSchema)[];
36
37
  optionalFields?: (keyof FormSchema)[];
38
+ trustedFields?: (keyof FormSchema)[];
37
39
  formatters?: FormatRules<FormSchema>;
38
40
  }
39
41
  export type GetReducerResults<FormSchema> = Reducer<FormState<FormSchema>, ReducerAction<FormSchema>>;
40
- export declare function reducer<FormSchema>({ staticValidate, asyncValidate, obscuredFields, optionalFields, formatters, }: GetReducerOptions<FormSchema>): GetReducerResults<FormSchema>;
42
+ export declare function reducer<FormSchema>({ staticValidate, asyncValidate, obscuredFields, optionalFields, trustedFields, formatters, }: GetReducerOptions<FormSchema>): GetReducerResults<FormSchema>;
@@ -41,6 +41,11 @@ export interface BaseFormFieldProps<FieldSchema> {
41
41
  stateSliceId?: AnyFormIdOfTLDS;
42
42
  name?: string;
43
43
  handleChangeFor: (key: keyof FieldSchema, mode?: ValidatorMode) => (e: any) => void;
44
+ setData?: (key: keyof FieldSchema, value: FieldValue<FieldSchema>) => void;
45
+ setValid?: (key: keyof FieldSchema, value: boolean) => void;
46
+ setErrors?: (key: keyof FieldSchema, value: ValidationRuleResult | null) => void;
47
+ setFieldProblems?: (fieldProblems: Record<keyof FieldSchema, boolean>) => void;
48
+ triggerValidation?: (schema?: Array<keyof FieldSchema>) => void;
44
49
  }
45
50
  export type FieldValue<FormSchema> = FormSchema[keyof FormSchema];
46
51
  export interface FormState<FormSchema> {
@@ -51,6 +56,7 @@ export interface FormState<FormSchema> {
51
56
  fieldProblems: Record<keyof FormSchema, boolean>;
52
57
  obscuredFields?: Array<keyof FormSchema>;
53
58
  optionalFields?: Array<keyof FormSchema>;
59
+ trustedFields?: Array<keyof FormSchema>;
54
60
  isValid?: boolean;
55
61
  dataStoreId?: string;
56
62
  local?: FormState<FormSchema> | Partial<FormState<FormSchema>>;
@@ -69,6 +75,7 @@ export interface Form<FormSchema> extends FormState<FormSchema> {
69
75
  handleChangeFor: (key: keyof FormSchema, mode?: ValidatorMode) => (e: any) => void;
70
76
  triggerValidation: (schema?: Array<keyof FormSchema>) => void;
71
77
  mergeForm: (formValue: FormState<FormSchema>) => void;
78
+ resetToDefaultData: () => void;
72
79
  }
73
80
  export interface BaseFormProps<FormSchema> {
74
81
  placeholders?: {
@@ -119,6 +126,9 @@ export interface BaseOuterFormProps<FormSchema> extends BaseFormProps<FormSchema
119
126
  obscuredFields?: {
120
127
  [InnerFormName in keyof FormSchema]: Array<keyof FormSchema[InnerFormName]>;
121
128
  };
129
+ trustedFields?: {
130
+ [InnerFormName in keyof FormSchema]: Array<keyof FormSchema[InnerFormName]>;
131
+ };
122
132
  evaluateConfiguration?: (data: FormSchema) => void;
123
133
  setCustomFormNavigationHandlers?(formId: string, onNext: () => void, onBack: () => void): void;
124
134
  setHideDropinLayout?: Dispatch<StateUpdater<boolean>>;
@@ -138,6 +148,7 @@ export interface BaseInnerFormProps<FormSchema> extends BaseFormProps<FormSchema
138
148
  optionalFields?: Array<keyof FormSchema>;
139
149
  verifyFields?: Array<keyof FormSchema>;
140
150
  readOnlyFields?: Array<keyof FormSchema>;
151
+ trustedFields?: Array<keyof FormSchema>;
141
152
  id?: string;
142
153
  dataStoreId?: string;
143
154
  capabilities?: CapabilityName[];
@@ -10,5 +10,6 @@ export interface UseFormOptions<FormSchema> {
10
10
  fieldProblems?: Record<keyof FormSchema, boolean>;
11
11
  obscuredFields?: (keyof FormSchema)[];
12
12
  optionalFields?: (keyof FormSchema)[];
13
+ trustedFields?: (keyof FormSchema)[];
13
14
  }
14
- export declare function useForm<FormSchema>({ schema, defaultData, rules, asyncRules, fieldProblems, obscuredFields, optionalFields, formatters, shouldValidate, }: UseFormOptions<FormSchema>): Form<FormSchema>;
15
+ export declare function useForm<FormSchema>({ schema, defaultData, rules, asyncRules, fieldProblems, obscuredFields, optionalFields, trustedFields, formatters, shouldValidate, }: UseFormOptions<FormSchema>): Form<FormSchema>;
@@ -0,0 +1,2 @@
1
+ import type { LoadingStatus } from '../../components/internal/LoaderWrapper/constants';
2
+ export declare const useUnifyLoadingStatus: (setParentLoadingStatus: (status: LoadingStatus) => void, ...childLoadingStatuses: Array<LoadingStatus>) => void;