@adyen/kyc-components 2.54.1 → 2.56.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 (49) hide show
  1. package/dist/es/adyen-kyc-components.es.js +1171 -460
  2. package/dist/es/us-check-account-number-CHnzmLNd.js +39 -0
  3. package/dist/es/us-check-o5Ax_0LS.js +37 -0
  4. package/dist/es/us-check-routing-number-BtVf7GH3.js +40 -0
  5. package/dist/style.css +158 -702
  6. package/dist/types/components/AdditionalInformation/VerifiedBusinessCard.d.ts +3 -1
  7. package/dist/types/components/AdditionalInformation/utils.d.ts +6 -0
  8. package/dist/types/components/BusinessSelection/types.d.ts +3 -1
  9. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/ServiceAgreementDropinComponent.d.ts +1 -1
  10. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +2 -1
  11. package/dist/types/components/Dropins/types.d.ts +2 -2
  12. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -1
  13. package/dist/types/components/PayoutAccount/component/CheckGuidance/CheckGuidance.d.ts +7 -0
  14. package/dist/types/components/RegistrationAddress/component/RegistrationAddressComponent.d.ts +2 -1
  15. package/dist/types/components/index.d.ts +14 -2
  16. package/dist/types/components/internal/Address/AddressComponent.d.ts +3 -0
  17. package/dist/types/components/internal/Address/AddressExperimentWrapper.d.ts +2 -0
  18. package/dist/types/components/internal/Address/components/FieldContainerComponent.d.ts +9 -0
  19. package/dist/types/components/internal/Address/types.d.ts +7 -11
  20. package/dist/types/components/internal/Address/utils.d.ts +1 -1
  21. package/dist/types/components/internal/Address/validate.d.ts +2 -2
  22. package/dist/types/components/internal/BankAccountNumber/types.d.ts +2 -0
  23. package/dist/types/components/internal/BranchCode/types.d.ts +2 -0
  24. package/dist/types/components/internal/Button/Button.d.ts +1 -1
  25. package/dist/types/components/internal/Button/types.d.ts +1 -0
  26. package/dist/types/components/internal/DecisionMakerRole/types.d.ts +1 -1
  27. package/dist/types/components/internal/FormFields/MaskedInputText/MaskedInputText.d.ts +2 -1
  28. package/dist/types/components/internal/FormFields/MultiSelectList/MultiSelectList.d.ts +1 -0
  29. package/dist/types/components/internal/FormFields/Select/Select.d.ts +2 -1
  30. package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts +2 -1
  31. package/dist/types/components/internal/FormFields/Select/components/SelectList.d.ts +1 -0
  32. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +1 -0
  33. package/dist/types/components/internal/FormFields/Select/types.d.ts +4 -1
  34. package/dist/types/components/internal/IdFieldTypeSelector/countryIdNumberTypes.d.ts +1 -1
  35. package/dist/types/components/internal/Skeleton/Skeleton.d.ts +0 -1
  36. package/dist/types/components/internal/Svg/svgs.d.ts +3 -0
  37. package/dist/types/core/Context/ExperimentContext/types.d.ts +4 -1
  38. package/dist/types/core/Context/SettingsContext/types.d.ts +3 -1
  39. package/dist/types/core/SDKValidation/types.d.ts +2 -2
  40. package/dist/types/core/Services/componentApi/get-address.d.ts +2 -2
  41. package/dist/types/core/hooks/useBusinessData/types.d.ts +3 -1
  42. package/dist/types/core/hooks/useDebounce.d.ts +1 -0
  43. package/dist/types/core/models/api/address-search.d.ts +1 -8
  44. package/dist/types/core/models/api/company-search.d.ts +7 -0
  45. package/dist/types/core/models/form-rules.d.ts +2 -0
  46. package/dist/types/utils/datasetUtil.d.ts +1 -1
  47. package/dist/types/utils/payout-account-util.d.ts +1 -0
  48. package/dist/types/utils/validatorUtils.d.ts +1 -1
  49. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
1
  import './VerifiedBusinessCard.scss';
2
2
  import type { CompanyDatasetResponse } from '../../core/models/api/company-search';
3
+ import type { AddressSchema } from '../../types';
3
4
  interface VerifiedBusinessDataProps {
4
5
  verifiedBusiness: CompanyDatasetResponse | undefined;
6
+ verifiedAddress: AddressSchema | undefined;
5
7
  }
6
- export declare function VerifiedBusinessCard({ verifiedBusiness }: VerifiedBusinessDataProps): import("preact").JSX.Element;
8
+ export declare function VerifiedBusinessCard({ verifiedBusiness, verifiedAddress, }: VerifiedBusinessDataProps): import("preact").JSX.Element;
7
9
  export {};
@@ -0,0 +1,6 @@
1
+ import type { CompanyDatasetResponse } from '../../core/models/api/company-search';
2
+ import type { ValidatorMode } from '../../utils/validation/types';
3
+ import type { AddressSchema } from '../internal/Address/types';
4
+ import type { AdditionalInformationSchema } from './types';
5
+ export declare const mapAddressData: (verifiedBusiness: CompanyDatasetResponse) => AddressSchema;
6
+ export declare const applyVerifiedBusinessData: (verifiedBusiness: CompanyDatasetResponse | undefined, handleChangeFor: (key: keyof AdditionalInformationSchema, mode?: ValidatorMode) => (e: any) => void) => void;
@@ -1,6 +1,8 @@
1
1
  import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { HookStatus } from '../../core/hooks/types';
3
3
  import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
4
+ import type { ProvinceCode } from '../../core/models/province-code';
5
+ import type { StateCode } from '../../core/models/state-code';
4
6
  export interface BusinessSelectionProps {
5
7
  showCompanyStructure: boolean;
6
8
  searching: HookStatus;
@@ -9,7 +11,7 @@ export interface BusinessSelectionProps {
9
11
  resettingTrustedData: HookStatus;
10
12
  searchResults: CompanySearchResult[] | undefined;
11
13
  invalidTin: boolean;
12
- fetchBusinessData: (company: CompanySearchResult) => Promise<CompanyDatasetResponse | undefined>;
14
+ fetchBusinessData: (company: CompanySearchResult, state?: StateCode | ProvinceCode) => Promise<CompanyDatasetResponse | undefined>;
13
15
  verifyBusinessData: (data: CompanyDatasetResponse, tin: string) => Promise<boolean | undefined>;
14
16
  resetTinVerification: () => void;
15
17
  proceedToManualDataEntry: () => Promise<void>;
@@ -1,3 +1,3 @@
1
1
  import './ServiceAgreementDropinComponent.scss';
2
2
  import type { ServiceAgreementDropinProps } from '../types';
3
- export declare function ServiceAgreementDropinComponent({ legalEntityResponse, handleGetServiceAgreement, handleViewAcceptedTermsOfServiceDocument, handleDownloadAcceptedTermsOfServiceDocument, handleDownloadUnacceptedTermsOfServiceDocument, handleHomeClick, handleSign, taskType, serviceAgreementTypes, serviceAgreementAcceptanceInfos, trackingConfig, }: ServiceAgreementDropinProps): import("preact").JSX.Element;
3
+ export declare function ServiceAgreementDropinComponent({ legalEntityResponse, handleGetServiceAgreement, handleViewAcceptedTermsOfServiceDocument, handleDownloadAcceptedTermsOfServiceDocument, handleDownloadUnacceptedTermsOfServiceDocument, handleHomeClick, handleAddSigner, handleSign, taskType, serviceAgreementTypes, serviceAgreementAcceptanceInfos, trackingConfig, }: ServiceAgreementDropinProps): import("preact").JSX.Element;
@@ -2,7 +2,7 @@ import type { ServiceAgreementRequest, ServiceAgreementResponse, ServiceAgreemen
2
2
  import type { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
3
3
  import type { TaskTypes } from '../../TaskList/types';
4
4
  import type { DropinAPIHandlers, DropinProps } from '../types';
5
- export type ServiceAgreementType = 'adyenForPlatformsManage' | 'adyenIssuing' | 'adyenForPlatformsAdvanced' | 'adyenCapital' | 'adyenAccount' | 'adyenCard' | 'adyenFranchisee' | 'adyenPccr';
5
+ export type ServiceAgreementType = 'adyenForPlatformsManage' | 'adyenIssuing' | 'adyenForPlatformsAdvanced' | 'adyenCapital' | 'adyenAccount' | 'adyenCard' | 'adyenFranchisee' | 'adyenPccr' | 'adyenChargeCard';
6
6
  export interface ServiceAgreementAcceptanceInfo {
7
7
  acceptedBy: string;
8
8
  acceptedFor: string;
@@ -23,6 +23,7 @@ export interface ServiceAgreementDropinProps extends DropinProps {
23
23
  serviceAgreementTypes: ServiceAgreementType[];
24
24
  serviceAgreementAcceptanceInfos: ServiceAgreementAcceptanceInfoWithName[];
25
25
  handleHomeClick(): void;
26
+ handleAddSigner(): void;
26
27
  handleGetServiceAgreement(legalEntityId: string, data: ServiceAgreementRequest): Promise<ServiceAgreementResponse>;
27
28
  handleViewAcceptedTermsOfServiceDocument: DropinAPIHandlers['handleViewAcceptedTermsOfServiceDocument'];
28
29
  handleDownloadAcceptedTermsOfServiceDocument: DropinAPIHandlers['handleDownloadAcceptedTermsOfServiceDocument'];
@@ -1,5 +1,5 @@
1
1
  import type { State, TopLevelDataSchema } from '../../core/Context/StateContext/types';
2
- import type { Address, AddressSearchRequest, AddressSearchResponse } from '../../core/models/api/address-search';
2
+ import type { AddressSearchRequest, AddressSearchResponse, LoqateAddress } from '../../core/models/api/address-search';
3
3
  import type { CapabilityName } from '../../core/models/api/capability';
4
4
  import type { CompanyDatasetRequest, CompanyDatasetResponse, CompanySearchRequest, CompanySearchResponse, TinVerificationRequest, TinVerificationResponse } from '../../core/models/api/company-search';
5
5
  import type { DownloadPci, PciQuestionnaireIds, PciQuestionnaires, PciStatus, PciStatusRequest, PciTemplateRequest, PciTemplateResponse, ServiceAgreementAcceptanceInfos, ServiceAgreementAcceptedDocumentResponse, ServiceAgreementRequest, ServiceAgreementResponse, ServiceAgreementSignRequest, ServiceAgreementSignResponse, ServiceAgreementStatus, ServiceAgreementUnacceptedDocumentRequest, ServiceAgreementUnacceptedDocumentResponse, SignedBy } from '../../core/models/api/contracts';
@@ -55,7 +55,7 @@ export interface DropinAPIHandlers {
55
55
  handleDownloadUnacceptedTermsOfServiceDocument?(legalEntityId: string, data: ServiceAgreementUnacceptedDocumentRequest): Promise<ServiceAgreementUnacceptedDocumentResponse>;
56
56
  handleGetServiceAgreementAcceptanceInfos?(legalEntityId: string): Promise<ServiceAgreementAcceptanceInfos>;
57
57
  handleAddressSearch?(data: AddressSearchRequest, legalEntityId: string): Promise<AddressSearchResponse>;
58
- handleFindAddress?(addressId: string): Promise<Address>;
58
+ handleFindAddress?(addressId: string): Promise<LoqateAddress>;
59
59
  handleGetIdVerificationToken?(legalEntityId: string, data: InstantIdVerificationTokenRequest): Promise<InstantIdVerificationTokenResponse>;
60
60
  handleGetIdVerificationStartCheck?(legalEntityId: string, data: InstantIdVerificationStartCheckRequest): Promise<InstantIdVerificationStartCheckResponse>;
61
61
  handleCompanyIndexSearch?(data: CompanySearchRequest): Promise<CompanySearchResponse>;
@@ -7,10 +7,11 @@ interface CreateIndividualComponentPropsBase {
7
7
  handleBackClick?(): void;
8
8
  modalView?: boolean;
9
9
  onClose?(): void;
10
+ onUnmount?(): void;
10
11
  }
11
12
  export type CreateIndividualComponentProps = CreateIndividualComponentPropsBase & RequireAtLeastOne<{
12
13
  parentLegalEntityId: string;
13
14
  legalEntityId: string;
14
15
  }, 'parentLegalEntityId' | 'legalEntityId'>;
15
- export declare function CreateIndividualComponent({ parentLegalEntityId, legalEntityId, taskType, onSubmitSuccess, handleBackClick, modalView, onClose, }: CreateIndividualComponentProps): import("preact").JSX.Element;
16
+ export declare function CreateIndividualComponent({ parentLegalEntityId, legalEntityId, taskType, onSubmitSuccess, handleBackClick, modalView, onClose, onUnmount, }: CreateIndividualComponentProps): import("preact").JSX.Element;
16
17
  export {};
@@ -0,0 +1,7 @@
1
+ import './CheckGuidance.scss';
2
+ export type CheckAnnotationType = 'account' | 'routing';
3
+ interface CheckGuidanceProps {
4
+ annotated?: CheckAnnotationType;
5
+ }
6
+ export declare const CheckGuidance: ({ annotated }: CheckGuidanceProps) => import("preact").JSX.Element;
7
+ export {};
@@ -1,5 +1,6 @@
1
+ import type { JSX } from 'preact';
1
2
  import type { FormList } from '../../../core/models/form';
2
3
  import type { RegistrationAddressProps } from '../types';
3
4
  export declare const registrationAddressFields: string[];
4
5
  export declare const registrationAddressForms: FormList;
5
- export declare function RegistrationAddressComponent(props: RegistrationAddressProps): import("preact").JSX.Element;
6
+ export declare function RegistrationAddressComponent(props: RegistrationAddressProps): JSX.Element;
@@ -16,6 +16,7 @@ import { CreateTransferInstrumentComponent } from './EmbeddedDropins/CreateTrans
16
16
  import { ManageIndividualComponent } from './EmbeddedDropins/ManageIndividualComponent/ManageIndividualComponent';
17
17
  import { UpdateLegalEntityForHighExposure } from './EmbeddedDropins/UpdateLegalEntityForHighExposure/UpdateLegalEntityForHighExposure';
18
18
  import { ViewVerificationStatusComponent } from './EmbeddedDropins/ViewVerificationStatus';
19
+ import type EventEmitter from './EventEmitter';
19
20
  /**
20
21
  * Maps each component with a Component element.
21
22
  */
@@ -37,7 +38,18 @@ export declare const componentsMap: {
37
38
  };
38
39
  export type ComponentMap = typeof componentsMap;
39
40
  export type ComponentProps<Name extends keyof ComponentMap> = Parameters<ComponentMap[Name]>[0];
40
- export type ComponentPropsWithoutEventEmitter<Name extends keyof ComponentMap> = Omit<ComponentProps<Name>, 'eventEmitter'>;
41
- export type ComponentOptions<Name extends keyof ComponentMap> = ComponentPropsWithoutEventEmitter<Name> & Partial<CoreProviderProps> & Partial<SettingsProps> & Partial<ExperimentsProps> & {
41
+ export type ComponentPropsWithoutInternalProps<Name extends keyof ComponentMap> = Omit<ComponentProps<Name>, keyof CommonInternalProps>;
42
+ /** List componentProps (passed from UIElement to Component) which are internal
43
+ * and not exposed to consumers,
44
+ */
45
+ export interface CommonInternalProps {
46
+ /** Used when component itself needs to handle cleanup.
47
+ * Eg. When Close button is clicked in modal view
48
+ */
49
+ onUnMount(): void;
50
+ /** Used to update locale in components */
51
+ eventEmitter: EventEmitter;
52
+ }
53
+ export type ComponentOptions<Name extends keyof ComponentMap> = ComponentPropsWithoutInternalProps<Name> & Partial<CoreProviderProps> & Partial<SettingsProps> & Partial<ExperimentsProps> & {
42
54
  onUserEvent?: UserEventCallback;
43
55
  };
@@ -0,0 +1,3 @@
1
+ import './Address.scss';
2
+ import type { AddressProps } from './types';
3
+ export declare function AddressComponent({ data, labels, placeholders, helperText, readOnly, hideCountry, fieldValidationErrors, allFields, requiredFields, optionalFields, readOnlyFields, trustedFields, shouldValidate, handleAddressSearch, handleFindAddress, onChange, legalEntityId, verifiedAddress, }: AddressProps): import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { AddressProps } from './types';
2
+ export declare function AddressExperimentWrapper(props: AddressProps): import("preact").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import './FieldContainer.scss';
2
+ import type { FieldContainerProps } from '../types';
3
+ /**
4
+ * USAGE: Specifically defined as a util to provide a wrapper for fields created within the Address component
5
+ *
6
+ * NOT TO BE USED: if you just want to add a Country or State dropdown outside of an Address component
7
+ * - then you should implement <CountryField> or <StateField> directly
8
+ */
9
+ export declare function FieldContainerComponent({ legalEntityId, classNameModifiers, schema, data, valid, errors, fieldProblems, fieldName, trimOnBlur, hideField, maxlength, readOnly, optional, handleChangeFor, handleAddressSearch, handleFindAddress, }: FieldContainerProps): import("preact").JSX.Element;
@@ -16,15 +16,6 @@ export interface AddressSchema {
16
16
  country?: CountryCode;
17
17
  searchAddress?: string;
18
18
  }
19
- export interface LoqateAddressSchema {
20
- street?: string;
21
- street2?: string;
22
- houseNumberOrName?: string;
23
- postalCode?: string;
24
- city?: string;
25
- stateOrProvince?: string;
26
- country?: CountryCode;
27
- }
28
19
  export interface AddressProps extends BaseInnerFormProps<AddressSchema> {
29
20
  countryCode?: CountryCode;
30
21
  hideCountry?: boolean;
@@ -35,20 +26,25 @@ export interface AddressProps extends BaseInnerFormProps<AddressSchema> {
35
26
  legalEntityId?: string;
36
27
  verifiedBusiness?: CompanyDatasetResponse | undefined;
37
28
  kompanyAddress?: string;
29
+ verifiedAddress?: AddressSchema;
38
30
  }
39
31
  export interface FieldContainerProps {
32
+ legalEntityId?: string;
40
33
  classNameModifiers?: string[];
34
+ schema?: Array<keyof AddressSchema>;
41
35
  data: AddressSchema;
42
36
  fieldName: keyof AddressSchema;
43
37
  valid?: Record<keyof AddressSchema, boolean>;
44
38
  errors?: Record<keyof AddressSchema, ValidationRuleResult | null>;
45
39
  fieldProblems?: Record<keyof AddressSchema, boolean>;
46
- handleChangeFor: (key: keyof AddressSchema, mode?: ValidatorMode) => (e: any) => void;
47
40
  readOnly?: boolean;
48
41
  optional?: boolean;
49
42
  maxlength?: number;
50
43
  hideField?: boolean;
51
44
  trimOnBlur?: boolean;
45
+ handleChangeFor: (key: keyof AddressSchema, mode?: ValidatorMode) => (e: any) => void;
46
+ handleAddressSearch?: DropinAPIHandlers['handleAddressSearch'];
47
+ handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
52
48
  }
53
49
  export interface ReadOnlyAddressProps {
54
50
  data: AddressSchema;
@@ -64,7 +60,7 @@ export type AddressSchemaLabels = {
64
60
  export interface SearchAddressProps {
65
61
  handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
66
62
  handleFindAddress: DropinAPIHandlers['handleFindAddress'];
67
- handleChangeFor: (key: string, mode?: ValidatorMode) => (e: any) => void;
63
+ handleChangeFor: (key: keyof AddressSchema, mode?: ValidatorMode) => (e: any) => void;
68
64
  data: AddressSchema;
69
65
  legalEntityId?: string;
70
66
  autocompleteAddressForm: (address: AddressSchema) => void;
@@ -12,7 +12,7 @@ export declare const getKeyForField: (fieldName: string, country?: CountryCode)
12
12
  * Returns the address schema of the selected country or the default address schema.
13
13
  * @param country - The selected country
14
14
  */
15
- export declare const getAddressSchemaForCountry: (country: CountryCode) => ("address" | "city" | "country" | "otherAddressInformation" | "postalCode" | "stateOrProvince")[];
15
+ export declare const getAddressSchemaForCountry: (country: CountryCode | undefined) => ("address" | "city" | "country" | "otherAddressInformation" | "postalCode" | "stateOrProvince")[];
16
16
  /**
17
17
  * Returns the field labels for each field in the selected countries address schema.
18
18
  * @param country - The selected country
@@ -2,5 +2,5 @@ import type { CountryCode } from '../../../core/models/country-code';
2
2
  import type Language from '../../../language';
3
3
  import type { ValidatorRules } from '../../../utils/validation/types';
4
4
  import type { AddressSchema } from './types';
5
- export declare const addressValidationRules: (country: CountryCode) => ValidatorRules<AddressSchema>;
6
- export declare const addressValidationRulesV4: (country: CountryCode, i18n: Language) => ValidatorRules<AddressSchema>;
5
+ export declare const addressValidationRules: (country: CountryCode | undefined) => ValidatorRules<AddressSchema>;
6
+ export declare const addressValidationRulesV4: (country: CountryCode | undefined, i18n: Language) => ValidatorRules<AddressSchema>;
@@ -7,4 +7,6 @@ export interface BankAccountNumberSchema {
7
7
  export interface BankAccountNumberProps extends BaseInnerFormProps<BankAccountNumberSchema> {
8
8
  country: CountryCode;
9
9
  fieldConfig?: typeof defaultFieldConfig;
10
+ onFocus?: () => void;
11
+ onBlur?: () => void;
10
12
  }
@@ -7,4 +7,6 @@ export interface BranchCodeSchema {
7
7
  export interface BranchCodeProps extends BaseInnerFormProps<BranchCodeSchema> {
8
8
  country: CountryCode;
9
9
  fieldConfig?: typeof defaultFieldConfig;
10
+ onFocus?: () => void;
11
+ onBlur?: () => void;
10
12
  }
@@ -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, shaded, label, icon, title, disabled, type, onClick, onKeyDown, loading, testId, underline, }: ButtonProps) => JSX.Element;
5
+ export declare const Button: ({ showAsLink, secondary, tertiary, className, role, small, block, critical, shaded, label, icon, title, disabled, type, onClick, onKeyDown, loading, testId, underline, }: ButtonProps) => JSX.Element;
6
6
  export default Button;
@@ -6,6 +6,7 @@ export interface ButtonProps {
6
6
  tertiary?: boolean;
7
7
  className?: string;
8
8
  underline?: boolean;
9
+ critical?: boolean;
9
10
  role?: JSX.AriaRole;
10
11
  small?: boolean;
11
12
  block?: boolean;
@@ -8,5 +8,5 @@ export interface DecisionMakerRoleSchema {
8
8
  export interface DecisionMakerRoleProps extends BaseInnerFormProps<DecisionMakerRoleSchema> {
9
9
  taskType: TaskTypes;
10
10
  allowedRoles?: DecisionMakerType[];
11
- trustedRoles: Array<LegalEntityAssociation['type']>;
11
+ trustedRoles?: Array<LegalEntityAssociation['type']>;
12
12
  }
@@ -5,6 +5,7 @@ import type { MismatchResult } from '../../../../utils/masking/matchAgainstMask'
5
5
  export interface MaskedInputTextProps extends MaskSettings {
6
6
  value: string;
7
7
  onInput: (value: string) => void;
8
+ onFocus?: () => void;
8
9
  onBlur?: (event: JSX.TargetedFocusEvent<HTMLInputElement>) => void;
9
10
  onMismatch?: (mismatch: MismatchResult) => void;
10
11
  isValid: boolean;
@@ -23,4 +24,4 @@ export interface MaskedInputTextProps extends MaskSettings {
23
24
  };
24
25
  acceptObscuredValue?: boolean;
25
26
  }
26
- export declare const MaskedInputText: ({ value, onInput, onBlur, onMismatch: onMismatchExternal, isValid: validationIsValid, errorMessage, shouldValidate, mask, name, label, placeholder, transformOnType, readonly, disabled, optional, formatGuidance, classNameModifiers, acceptObscuredValue, }: MaskedInputTextProps) => JSX.Element;
27
+ export declare const MaskedInputText: ({ value, onInput, onBlur, onFocus, onMismatch: onMismatchExternal, isValid: validationIsValid, errorMessage, shouldValidate, mask, name, label, placeholder, transformOnType, readonly, disabled, optional, formatGuidance, classNameModifiers, acceptObscuredValue, }: MaskedInputTextProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ import './MultiSelectList.scss';
1
2
  import type { SelectItem } from '../Select/types';
2
3
  interface MultiSelectListProps<OptionType> {
3
4
  options: readonly OptionType[];
@@ -1,5 +1,6 @@
1
1
  import './Select.scss';
2
+ import './SelectGeneric.scss';
2
3
  import type { JSX } from 'preact';
3
4
  import type { SelectProps } from './types';
4
- declare const Select: ({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, isMulti, uniqueId, showSelectedItemsAsTags, isSearch, onSearch, resetSearch, loading, getSearchItem, searchText, showSearchList, }: SelectProps) => JSX.Element;
5
+ declare const Select: ({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, isMulti, uniqueId, showSelectedItemsAsTags, isSearch, onSearch, resetSearch, loading, getSearchItem, searchText, onSearchTextChange, showSearchList, }: SelectProps) => JSX.Element;
5
6
  export default Select;
@@ -1,3 +1,4 @@
1
+ import '../SelectGeneric.scss';
1
2
  import type { SelectButtonProps } from '../types';
2
- declare function SelectButton({ active, readonly, showList, isInvalid, isValid, toggleList, onButtonKeyDown, filterable, placeholder, toggleButtonRef, ariaDescribedBy, selectListId, filterInputRef, onInput, isMulti, id, isSearch, loading, textFilter, }: SelectButtonProps): import("preact").JSX.Element;
3
+ declare function SelectButton({ active, readonly, showList, isInvalid, isValid, toggleList, onButtonKeyDown, filterable, placeholder, toggleButtonRef, ariaDescribedBy, selectListId, filterInputRef, onInput, isMulti, id, isSearch, hideSearchIcon, loading, textFilter, }: SelectButtonProps): import("preact").JSX.Element;
3
4
  export default SelectButton;
@@ -1,3 +1,4 @@
1
+ import '../SelectGeneric.scss';
1
2
  import type { SelectListProps } from '../types';
2
3
  declare function SelectList({ active, items, showList, textFilter, isMulti, showAbove, isSearch, loading, getSearchItem, ...props }: SelectListProps): import("preact").JSX.Element;
3
4
  export default SelectList;
@@ -1,3 +1,4 @@
1
+ import '../SelectGeneric.scss';
1
2
  import type { SelectItemProps } from '../types';
2
3
  declare const SelectListItem: ({ item, selected, isMulti, isSearch, children, onSelect, onKeyDown, className, }: SelectItemProps) => import("preact").JSX.Element;
3
4
  export default SelectListItem;
@@ -22,7 +22,7 @@ interface BaseSelectProps {
22
22
  isInvalid?: boolean;
23
23
  items: ReadonlyArray<SelectItem>;
24
24
  name?: string;
25
- placeholder: string;
25
+ placeholder?: string;
26
26
  readonly?: boolean;
27
27
  selected: string | string[] | undefined;
28
28
  isValid?: boolean;
@@ -34,6 +34,7 @@ interface BaseSelectProps {
34
34
  loading?: boolean;
35
35
  getSearchItem?: (item: SelectItem) => ComponentChild;
36
36
  searchText?: string;
37
+ onSearchTextChange?: (text: string) => void;
37
38
  showSearchList?: boolean;
38
39
  }
39
40
  interface SingleSelectOnChangeTarget {
@@ -79,6 +80,7 @@ export interface SelectButtonProps {
79
80
  id?: string;
80
81
  showSelectedItemsAsTags?: boolean;
81
82
  isSearch?: boolean;
83
+ hideSearchIcon?: boolean;
82
84
  loading?: boolean;
83
85
  textFilter?: string;
84
86
  }
@@ -117,6 +119,7 @@ export interface SelectButtonContentSingleProps {
117
119
  showList: boolean;
118
120
  showSelectedItemsAsTags?: boolean;
119
121
  isSearch?: boolean;
122
+ hideSearchIcon?: boolean;
120
123
  loading?: boolean;
121
124
  textFilter?: string;
122
125
  }
@@ -26,7 +26,7 @@ export declare const companyRegistrationNumberOptions: {
26
26
  }];
27
27
  readonly IT: readonly [{
28
28
  readonly id: "partitaIVA";
29
- readonly name: "partitaIVA";
29
+ readonly name: "codiceFiscalePartitaIVA";
30
30
  }, {
31
31
  readonly id: "CCIAA";
32
32
  readonly name: "CCIAA";
@@ -1,4 +1,3 @@
1
- import './Skeleton.scss';
2
1
  export interface SkeletonProps {
3
2
  text?: boolean;
4
3
  circle?: boolean;
@@ -58,6 +58,9 @@ export declare const svgs: {
58
58
  readonly 'document-cutoff': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
59
59
  readonly 'document-expired': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
60
60
  readonly 'document-front': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
61
+ readonly 'us-check': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
62
+ readonly 'us-check-routing-number': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
63
+ readonly 'us-check-account-number': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
61
64
  readonly 'id-blurred': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
62
65
  readonly 'id-cutoff': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
63
66
  readonly 'id-front': import("preact").FunctionComponent<import("preact/compat").JSX.SVGAttributes<SVGSVGElement>>;
@@ -6,6 +6,7 @@ import type { ComponentChildren } from 'preact';
6
6
  export declare enum ExperimentNames {
7
7
  EnableCompanySearchFlow = "EnableCompanySearchFlow",
8
8
  EnableNewBusinessDetailsFlow = "EnableNewBusinessDetailsFlow",
9
+ EnableNewAddressComponent = "EnableNewAddressComponent",
9
10
  EnableNewEntryFlow = "EnableNewEntryFlow",
10
11
  AllowOrganizationSettlorWithExemptionReason = "AllowOrganizationSettlorWithExemptionReason",
11
12
  AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
@@ -18,7 +19,9 @@ export declare enum ExperimentNames {
18
19
  HidePciTask = "HidePciTask",
19
20
  EnableAgeVerification = "EnableAgeVerification",
20
21
  PreserveMismatchedInitialValues = "PreserveMismatchedInitialValues",
21
- StrictNameAndAddressValidationV4 = "StrictNameAndAddressValidationV4"
22
+ StrictNameAndAddressValidationV4 = "StrictNameAndAddressValidationV4",
23
+ EnableIdentificationNationalityCrossBorderAssociateCheck = "EnableIdentificationNationalityCrossBorderAssociateCheck",
24
+ EnableAUGovernmentalOrganizationSkipRegistrationNumber = "EnableAUGovernmentalOrganizationSkipRegistrationNumber"
22
25
  }
23
26
  export type ExperimentName = `${ExperimentNames}`;
24
27
  export type Experiments = {
@@ -20,7 +20,8 @@ export declare enum SettingNames {
20
20
  HideOnboardingIntroductionTrust = "hideOnboardingIntroductionTrust",
21
21
  HideOnboardingIntroductionSoleProprietor = "hideOnboardingIntroductionSoleProprietor",
22
22
  TransferInstrumentLimit = "transferInstrumentLimit",
23
- ViewOnboardingGuidance = "viewOnboardingGuidance"
23
+ ViewOnboardingGuidance = "viewOnboardingGuidance",
24
+ ShowServiceAgreementsFirst = "showServiceAgreementsFirst"
24
25
  }
25
26
  export type SettingName = `${SettingNames}`;
26
27
  export interface Settings {
@@ -40,6 +41,7 @@ export interface Settings {
40
41
  hideOnboardingIntroductionSoleProprietor: boolean;
41
42
  viewOnboardingGuidance: boolean;
42
43
  transferInstrumentLimit: number;
44
+ showServiceAgreementsFirst: boolean;
43
45
  }
44
46
  export type ProvidedSettings = Partial<Settings>;
45
47
  type BooleanSettingName = {
@@ -1,4 +1,4 @@
1
- import type { ComponentMap, ComponentPropsWithoutEventEmitter } from '../../components';
1
+ import type { ComponentMap, ComponentPropsWithoutInternalProps } from '../../components';
2
2
  interface ValueSchema<T> {
3
3
  required?: boolean;
4
4
  type: 'string' | 'number' | 'boolean' | 'array' | 'function';
@@ -14,6 +14,6 @@ export type PropertiesSchema<T> = {
14
14
  [Key in keyof T]: PropertySchema<NonNullable<T[Key]>>;
15
15
  };
16
16
  export type ComponentsSchemaMap = {
17
- [ComponentName in keyof ComponentMap]: PropertiesSchema<ComponentPropsWithoutEventEmitter<ComponentName>>;
17
+ [ComponentName in keyof ComponentMap]: PropertiesSchema<ComponentPropsWithoutInternalProps<ComponentName>>;
18
18
  };
19
19
  export {};
@@ -1,3 +1,3 @@
1
- import type { Address } from '../../models/api/address';
1
+ import type { LoqateAddress } from '../../models/api/address-search';
2
2
  import type { ComponentApiRequestContext } from '../types';
3
- export declare const getAddress: (context: ComponentApiRequestContext, addressId: string) => Promise<Address>;
3
+ export declare const getAddress: (context: ComponentApiRequestContext, addressId: string) => Promise<LoqateAddress>;
@@ -1,5 +1,7 @@
1
1
  import type { DropinAPIHandlers } from '../../../components/Dropins/types';
2
2
  import type { CompanyDatasetResponse, CompanySearchRequest, CompanySearchResult } from '../../models/api/company-search';
3
+ import type { ProvinceCode } from '../../models/province-code';
4
+ import type { StateCode } from '../../models/state-code';
3
5
  import type { HookStatus } from '../types';
4
6
  export interface UseBusinessDataOptions {
5
7
  handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
@@ -11,7 +13,7 @@ export interface UseBusinessDataOptions {
11
13
  }
12
14
  export type UseBusinessData = {
13
15
  searchForBusiness: (data: CompanySearchRequest) => Promise<CompanySearchResult[] | undefined>;
14
- fetchBusinessData: (company: CompanySearchResult) => Promise<CompanyDatasetResponse | undefined>;
16
+ fetchBusinessData: (company: CompanySearchResult, state?: StateCode | ProvinceCode) => Promise<CompanyDatasetResponse | undefined>;
15
17
  verifyBusinessData: (data: CompanyDatasetResponse, tin: string) => Promise<boolean | undefined>;
16
18
  clearTrustedBusinessData: () => Promise<void>;
17
19
  resetBusinessData: () => void;
@@ -0,0 +1 @@
1
+ export declare const useDebounce: <T extends string>(value: T, delay: number) => T;
@@ -7,15 +7,8 @@ export interface AddressSearchRequest {
7
7
  text: string;
8
8
  container?: string;
9
9
  }
10
- export interface Address {
11
- city?: string;
12
- country?: CountryCode;
13
- postalCode?: string;
14
- stateOrProvince?: string;
15
- address?: string;
16
- otherAddressInformation?: string;
17
- }
18
10
  export interface LoqateAddress {
11
+ line1?: string;
19
12
  street?: string;
20
13
  street2?: string;
21
14
  houseNumberOrName?: string;
@@ -38,13 +38,20 @@ export interface CompanyDatasetRequest {
38
38
  * @description (optional) Country code
39
39
  */
40
40
  country?: CountryCode;
41
+ /**
42
+ * @description (optional) State code
43
+ */
44
+ state?: StateCodeUS;
41
45
  }
42
46
  export interface CompanyDatasetResponse extends CompanySearchResult {
43
47
  country: CountryCode;
44
48
  organizationType: OrganizationType | null;
45
49
  address: string;
50
+ isPrincipalAddress: boolean;
51
+ isTrustedAddress: boolean;
46
52
  legalForm?: string;
47
53
  street?: string;
54
+ street2?: string;
48
55
  city?: string;
49
56
  state?: StateCodeUS;
50
57
  zipcode?: string;
@@ -3,6 +3,7 @@ import type { AccountFormatRequirements } from '../../datasets/accountFormats/ge
3
3
  import type { ExperimentName } from '../Context/ExperimentContext/types';
4
4
  import type { SettingName } from '../Context/SettingsContext/types';
5
5
  import type { TopLevelDataSchema } from '../Context/StateContext/types';
6
+ import type { ExistingLegalEntity } from './api/legal-entity';
6
7
  import type { CountryCode } from './country-code';
7
8
  export interface FormRulesParams<TLDS extends TopLevelDataSchema> {
8
9
  data: TLDS;
@@ -12,6 +13,7 @@ export interface FormRulesParams<TLDS extends TopLevelDataSchema> {
12
13
  isExperimentEnabled?: (experiment: ExperimentName) => boolean;
13
14
  requiredFields?: Partial<AccountFormatRequirements>;
14
15
  isEmbeddedDropin?: boolean;
16
+ rootLegalEntity?: ExistingLegalEntity;
15
17
  }
16
18
  export type FormRules<TLDS extends TopLevelDataSchema> = (params: FormRulesParams<TLDS>) => {
17
19
  [ruleName: string]: () => string | boolean | undefined;
@@ -6,7 +6,7 @@ export declare const datasetIdentifier: {
6
6
  readonly state: (countryCode: CountryCode) => DatasetIdentifier;
7
7
  };
8
8
  export type DatasetUtil = {
9
- getCountryName: (countryCode: CountryCode) => string | null;
9
+ getCountryName: (countryCode: CountryCode | undefined) => string | null;
10
10
  getStateName: (stateCode: string, countryCode: CountryCode) => string | null;
11
11
  setDataset: (datasetKey: string, dataset: DataSet) => void;
12
12
  getDataset: (identifier: string) => DataSet;
@@ -3,6 +3,7 @@ import type { PayoutAccountSchema } from '../components/PayoutAccount/types';
3
3
  import type { CountryCode } from '../core/models/country-code';
4
4
  import type { Currency } from '../core/models/currency';
5
5
  import type Language from '../language/Language';
6
+ export declare const shouldShowCheckGuidance: (country: CountryCode) => boolean;
6
7
  export declare const shouldShowPayoutAccountFormatSelector: (country: CountryCode) => boolean;
7
8
  export declare const shouldShowPayoutAlert: (country: CountryCode) => boolean;
8
9
  export declare const getSupportedCurrencyGuidance: (i18n: Language, country: CountryCode, requiredFields: Array<keyof PayoutAccountSchema>) => string;
@@ -1,6 +1,6 @@
1
1
  import type { CountryCode } from '../core/models/country-code';
2
2
  import type { CountryFormatRules } from './validation/types';
3
- export declare const getMaxLengthByFieldAndCountry: <FormSchema extends object>(formattingRules: CountryFormatRules<FormSchema>, field: keyof FormSchema, country: CountryCode, ignoreIfFormatterExists: boolean) => number;
3
+ export declare const getMaxLengthByFieldAndCountry: <FormSchema extends object>(formattingRules: CountryFormatRules<FormSchema>, field: keyof FormSchema, country: CountryCode | undefined, ignoreIfFormatterExists: boolean) => number;
4
4
  export declare const isUndefinedOrNull: (input: unknown) => input is undefined | null;
5
5
  export declare const isEmpty: (input: unknown) => input is null | undefined;
6
6
  export declare const isString: (input: unknown) => input is string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.54.1",
3
+ "version": "2.56.0",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",