@adyen/kyc-components 3.18.1 → 3.19.1

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 (48) hide show
  1. package/dist/es/adyen-kyc-components.es.js +1367 -484
  2. package/dist/style.css +1134 -2304
  3. package/dist/types/components/BusinessDetails/forms.d.ts +2 -1
  4. package/dist/types/components/CompanyOtherDetails/types.d.ts +2 -1
  5. package/dist/types/components/CompanyRegistrationDetails/types.d.ts +1 -0
  6. package/dist/types/components/Dropins/CompanyDropin/components/CompanyDropinComponent.d.ts +1 -1
  7. package/dist/types/components/Dropins/CompanyDropin/types.d.ts +0 -2
  8. package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureCompany.d.ts +4 -0
  9. package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureParentCompany.d.ts +4 -0
  10. package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureUltimateParentCompany.d.ts +4 -0
  11. package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureDropinComponent.d.ts +6 -0
  12. package/dist/types/components/Dropins/HighExposureDropin/types.d.ts +34 -0
  13. package/dist/types/components/Dropins/HighExposureDropin/validate.d.ts +3 -0
  14. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/OnboardingDropinComponent.d.ts +2 -1
  15. package/dist/types/components/EmbeddedDropins/UpdateLegalEntityForHighExposure/UpdateLegalEntityForHighExposure.d.ts +2 -0
  16. package/dist/types/components/Individual/types.d.ts +3 -1
  17. package/dist/types/components/SingpassBanner/index.d.ts +2 -0
  18. package/dist/types/components/SingpassSelection/index.d.ts +1 -0
  19. package/dist/types/components/SingpassSelection/types.d.ts +4 -0
  20. package/dist/types/components/index.d.ts +2 -0
  21. package/dist/types/components/internal/DocumentGuidance/DocumentGuidance.d.ts +1 -1
  22. package/dist/types/components/internal/FormFields/Field/Field.d.ts +5 -3
  23. package/dist/types/components/internal/IdFieldTypeSelector/countryIdNumberTypes.d.ts +8 -0
  24. package/dist/types/components/internal/IdFieldTypeSelector/inferTaxIdNumberType.d.ts +4 -1
  25. package/dist/types/components/internal/StockISINField/types.d.ts +1 -1
  26. package/dist/types/components/internal/StockTickerSymbol/StockTickerSymbolField.d.ts +3 -0
  27. package/dist/types/components/internal/StockTickerSymbol/fieldConfig.d.ts +3 -0
  28. package/dist/types/components/internal/StockTickerSymbol/index.d.ts +1 -0
  29. package/dist/types/components/internal/StockTickerSymbol/types.d.ts +5 -0
  30. package/dist/types/components/internal/TaxId/fieldConfig.d.ts +3 -0
  31. package/dist/types/core/Context/ExperimentContext/types.d.ts +1 -0
  32. package/dist/types/core/Context/StateContext/types.d.ts +2 -1
  33. package/dist/types/core/Services/componentApi/{get-service-agreement-acceptance-info.d.ts → get-service-agreement-acceptance-infos.d.ts} +1 -1
  34. package/dist/types/core/Services/componentApi/push-events.d.ts +1 -2
  35. package/dist/types/core/hooks/useAnalytics.d.ts +9 -3
  36. package/dist/types/core/hooks/useCanSeeEntitySelection.d.ts +6 -0
  37. package/dist/types/core/process-field-configurations.d.ts +2 -0
  38. package/dist/types/core/user-events.d.ts +4 -8
  39. package/dist/types/core/utils.d.ts +1 -1
  40. package/dist/types/utils/api/processValidationErrors.d.ts +4 -1
  41. package/dist/types/utils/get-props.d.ts +17 -0
  42. package/dist/types/utils/getNestedPropertyKeys.d.ts +1 -1
  43. package/dist/types/utils/mapping/componentApiMapping.d.ts +11 -0
  44. package/dist/types/utils/mapping/mapping.d.ts +3 -0
  45. package/dist/types/utils/verification/helpers/verify-id-number-helper.d.ts +8 -3
  46. package/dist/types/utils/verification/verificationUtils.d.ts +14 -4
  47. package/package.json +7 -4
  48. package/dist/types/core/models/id-verification-status.d.ts +0 -7
@@ -7,6 +7,7 @@ import type { LegalCompanyNameFieldSchema } from '../internal/LegalCompanyNameFi
7
7
  import type { StateFieldSchema } from '../internal/StateField/types';
8
8
  import type { StockExchangeMICFieldSchema } from '../internal/StockExchangeMICField/types';
9
9
  import type { StockISINFieldSchema } from '../internal/StockISINField/types';
10
+ import type { StockTickerSymbolFieldSchema } from '../internal/StockTickerSymbol/types';
10
11
  import type { TaxInformationFieldSchema } from '../internal/TaxInformationField';
11
12
  import type { TradingNameFieldSchema } from '../internal/TradingNameField/types';
12
13
  import type { VatNumberFieldSchema } from '../internal/VatNumberField';
@@ -15,7 +16,7 @@ interface BusinessNameFieldSchema {
15
16
  }
16
17
  export interface BasicInformationSchema extends CountryFieldSchema, BusinessNameFieldSchema, StateFieldSchema, TaxInformationFieldSchema, BusinessRegistrationNumberFieldSchema {
17
18
  }
18
- export interface AdditionalInformationSchema extends LegalCompanyNameFieldSchema, TradingNameFieldSchema, DateOfIncorporationFieldSchema, StockISINFieldSchema, StockExchangeMICFieldSchema, TaxInformationFieldSchema, BusinessRegistrationNumberFieldSchema, VatNumberFieldSchema {
19
+ export interface AdditionalInformationSchema extends LegalCompanyNameFieldSchema, TradingNameFieldSchema, DateOfIncorporationFieldSchema, StockISINFieldSchema, StockExchangeMICFieldSchema, StockTickerSymbolFieldSchema, TaxInformationFieldSchema, BusinessRegistrationNumberFieldSchema, VatNumberFieldSchema {
19
20
  }
20
21
  export declare const FIELDS_NEEDED_FOR_COMPANY_SEARCH: Array<keyof BusinessNameFieldSchema | keyof BasicInformationSchema | keyof AdditionalInformationSchema>;
21
22
  export declare const getForms: (country: CountryCode) => FormList;
@@ -6,10 +6,11 @@ import type { BusinessRegistrationNumberFieldSchema } from '../internal/Business
6
6
  import type { DateOfIncorporationFieldSchema } from '../internal/DateOfIncorporationField/types';
7
7
  import type { StockExchangeMICFieldSchema } from '../internal/StockExchangeMICField/types';
8
8
  import type { StockISINFieldSchema } from '../internal/StockISINField/types';
9
+ import type { StockTickerSymbolFieldSchema } from '../internal/StockTickerSymbol/types';
9
10
  import type { TaxInformationFieldSchema } from '../internal/TaxInformationField/types';
10
11
  import type { TradingNameFieldSchema } from '../internal/TradingNameField/types';
11
12
  import type { VatNumberFieldSchema } from '../internal/VatNumberField/types';
12
- export interface CompanyOtherDetailsSchema extends DateOfIncorporationFieldSchema, TradingNameFieldSchema, StockISINFieldSchema, StockExchangeMICFieldSchema, TaxInformationFieldSchema, BusinessRegistrationNumberFieldSchema, VatNumberFieldSchema {
13
+ export interface CompanyOtherDetailsSchema extends DateOfIncorporationFieldSchema, TradingNameFieldSchema, StockISINFieldSchema, StockExchangeMICFieldSchema, StockTickerSymbolFieldSchema, TaxInformationFieldSchema, BusinessRegistrationNumberFieldSchema, VatNumberFieldSchema {
13
14
  }
14
15
  export interface CompanyOtherDetailsProps extends BaseInnerFormProps<CompanyOtherDetailsSchema> {
15
16
  country: CountryCode;
@@ -9,6 +9,7 @@ export interface CompanyRegistrationDetailsSchema extends BusinessRegistrationNu
9
9
  sameNameAsLegalName?: boolean;
10
10
  stockExchangeMIC?: string;
11
11
  stockISIN?: string;
12
+ stockTickerSymbol?: string;
12
13
  dateOfIncorporation?: string;
13
14
  isUen?: boolean;
14
15
  }
@@ -1,2 +1,2 @@
1
1
  import type { CompanyDropinProps } from '../types';
2
- export declare function CompanyDropinComponent({ country: parentCountry, problems: propProblems, hideDropinLayout, taskName, capabilities, homeButtonLabel, taskType, trackingConfig, associationDetail, parentLegalEntity, legalEntityResponse, isTargetLegalEntityType, onSubmit: onExternalSubmit, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleCreateLegalEntity, handleUpdateLegalEntity, handleHomeClick, onTypeSwitch, onChange, accountHolder, }: CompanyDropinProps): import("preact").JSX.Element;
2
+ export declare function CompanyDropinComponent({ country: parentCountry, problems: propProblems, hideDropinLayout, taskName, capabilities, homeButtonLabel, taskType, trackingConfig, associationDetail, parentLegalEntity, legalEntityResponse, isTargetLegalEntityType, onSubmit: onExternalSubmit, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleCreateLegalEntity, handleUpdateLegalEntity, handleHomeClick, onTypeSwitch, onChange, }: CompanyDropinProps): import("preact").JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import type { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
2
2
  import type { CompanyProps, CompanySchema } from '../../Company/types';
3
- import type { AccountHolderOption } from '../../internal/AccountHolder/types';
4
3
  import type { TrustMember } from '../../TrustMembers/types';
5
4
  import type { DropinAPIHandlers, DropinProps } from '../types';
6
5
  export interface CompanyDropinProps extends Omit<CompanyProps, 'isTopLevelEntity'>, DropinAPIHandlers, DropinProps {
@@ -8,5 +7,4 @@ export interface CompanyDropinProps extends Omit<CompanyProps, 'isTopLevelEntity
8
7
  associationDetail?: TrustMember;
9
8
  isTargetLegalEntityType?: boolean;
10
9
  onSubmit?: (company: CompanySchema) => void;
11
- accountHolder?: AccountHolderOption;
12
10
  }
@@ -0,0 +1,4 @@
1
+ import type { HighExposureCompanyDetailsProps, HighExposureCompanySchema } from '../types';
2
+ export declare const highExposureCompanyDetailsFields: Array<keyof HighExposureCompanySchema>;
3
+ declare function AdditionalFieldsForHighExposureCompany({ requiredFields, ...props }: HighExposureCompanyDetailsProps): import("preact").JSX.Element;
4
+ export default AdditionalFieldsForHighExposureCompany;
@@ -0,0 +1,4 @@
1
+ import type { HighExposureParentCompanyDetailsProps, HighExposureParentCompanySchema } from '../types';
2
+ export declare const highExposureParentCompanyDetailsFields: Array<keyof HighExposureParentCompanySchema>;
3
+ declare function AdditionalFieldsForHighExposureParentCompany({ requiredFields, ...props }: HighExposureParentCompanyDetailsProps): import("preact").JSX.Element;
4
+ export default AdditionalFieldsForHighExposureParentCompany;
@@ -0,0 +1,4 @@
1
+ import type { HighExposureUltimateParentCompanyDetailsProps, HighExposureUltimateParentCompanySchema } from '../types';
2
+ export declare const highExposureUltimateParentCompanyDetailsFields: Array<keyof HighExposureUltimateParentCompanySchema>;
3
+ declare function AdditionalFieldsForHighExposureUltimateParentCompany({ requiredFields, ...props }: HighExposureUltimateParentCompanyDetailsProps): import("preact").JSX.Element;
4
+ export default AdditionalFieldsForHighExposureUltimateParentCompany;
@@ -0,0 +1,6 @@
1
+ import type { FormList } from '../../../../core/models/form';
2
+ import type { HighExposureDropinProps } from '../types';
3
+ export declare const highExposureForms: FormList;
4
+ export declare const ultimateParentCompanyFormId: string;
5
+ declare function HighExposureDropinComponent(props: HighExposureDropinProps): import("preact").JSX.Element;
6
+ export default HighExposureDropinComponent;
@@ -0,0 +1,34 @@
1
+ import type { BaseInnerFormProps, BaseOuterFormProps } from '../../../core/hooks/useForm';
2
+ import type { CapabilityName } from '../../../core/models/api/capability';
3
+ import type { ExistingLegalEntity, LegalEntity } from '../../../core/models/api/legal-entity';
4
+ import type { CountryCode } from '../../../core/models/country-code';
5
+ import type { FormModel } from '../../../core/models/form';
6
+ import type { DropinProps } from '../types';
7
+ export interface HighExposureCompanySchema {
8
+ country?: CountryCode;
9
+ numberOfEmployees?: number;
10
+ }
11
+ export type HighExposureParentCompanySchema = HighExposureCompanySchema;
12
+ export type HighExposureUltimateParentCompanySchema = HighExposureCompanySchema;
13
+ export interface HighExposureSchema {
14
+ company?: HighExposureCompanySchema;
15
+ parentCompany?: HighExposureParentCompanySchema;
16
+ ultimateParentCompany?: HighExposureParentCompanySchema;
17
+ }
18
+ export interface HighExposureDropinProps extends BaseOuterFormProps<HighExposureSchema> {
19
+ capabilities?: CapabilityName[];
20
+ activeForm?: FormModel;
21
+ forms?: FormModel[];
22
+ country: CountryCode;
23
+ }
24
+ export interface HighExposureProps extends HighExposureDropinProps, DropinProps {
25
+ legalEntityId: ExistingLegalEntity['id'];
26
+ legalEntity?: LegalEntity;
27
+ parentLegalEntity?: ExistingLegalEntity;
28
+ onSubmit?: (data: HighExposureSchema) => void;
29
+ }
30
+ export interface HighExposureCompanyDetailsProps extends BaseInnerFormProps<HighExposureCompanySchema> {
31
+ country: CountryCode;
32
+ }
33
+ export type HighExposureParentCompanyDetailsProps = HighExposureCompanyDetailsProps;
34
+ export type HighExposureUltimateParentCompanyDetailsProps = HighExposureCompanyDetailsProps;
@@ -0,0 +1,3 @@
1
+ import type { ValidatorRules } from '../../../utils/validation/types';
2
+ import type { HighExposureCompanySchema } from './types';
3
+ export declare const highExposureCompanyDetailsValidations: ValidatorRules<HighExposureCompanySchema>;
@@ -1,4 +1,5 @@
1
1
  export interface OnboardingDropinComponentProps {
2
2
  legalEntityId: string;
3
+ openBankingPartnerConfigId?: string;
3
4
  }
4
- export declare function OnboardingDropinComponent({ legalEntityId }: OnboardingDropinComponentProps): import("preact").JSX.Element;
5
+ export declare function OnboardingDropinComponent({ legalEntityId, openBankingPartnerConfigId, }: OnboardingDropinComponentProps): import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { HighExposureProps } from '../../Dropins/HighExposureDropin/types';
2
+ export declare function UpdateLegalEntityForHighExposure({ parentLegalEntity, capabilities, country, trackingConfig, problems: problemsProp, onSubmit: externalOnSubmit, onChange, hideDropinLayout, handleHomeClick, homeButtonLabel, legalEntityId, }: HighExposureProps): import("preact").JSX.Element;
@@ -12,6 +12,7 @@ import type { DocumentUploadSchema } from '../DocumentUpload/types';
12
12
  import type { DropinAPIHandlers, DropinProps } from '../Dropins/types';
13
13
  import type { IdDocumentUploadSchema } from '../IdDocumentUpload/types';
14
14
  import type { IdVerificationMethodSchema } from '../IdVerificationMethod/types';
15
+ import type { AccountHolderOption } from '../internal/AccountHolder/types';
15
16
  import type { PersonalDetailsSchema } from '../PersonalDetails/types';
16
17
  import type { TaskTypes } from '../TaskList/types';
17
18
  import type { TrustMember } from '../TrustMembers/types';
@@ -39,8 +40,9 @@ export interface IndividualProps extends BaseOuterFormProps<IndividualSchema> {
39
40
  onNext?(e: any, callbacks: any, isValid: any): void;
40
41
  onBack?(): void;
41
42
  hideNavigation?: boolean;
43
+ accountHolder: AccountHolderOption | null;
42
44
  }
43
- export interface IndividualDropinProps extends Omit<IndividualProps, 'legalEntityId'>, IndividualDropinApiHandlers, DropinProps {
45
+ export interface IndividualDropinProps extends Omit<IndividualProps, 'legalEntityId' | 'accountHolder'>, IndividualDropinApiHandlers, DropinProps {
44
46
  parentLegalEntity?: ExistingLegalEntity;
45
47
  trustMember?: TrustMember;
46
48
  isTargetLegalEntityType?: boolean;
@@ -1,5 +1,7 @@
1
+ import { LegalEntityType } from '../../core/models/api/legal-entity-type';
1
2
  interface SingpassBannerProps {
2
3
  onClick: () => void;
4
+ legalEntityType: LegalEntityType;
3
5
  }
4
6
  export declare const SingpassBanner: (props: SingpassBannerProps) => import("preact").JSX.Element;
5
7
  export {};
@@ -11,5 +11,6 @@ export interface SetupAccountMetadata {
11
11
  name: string;
12
12
  icon: JSX.Element;
13
13
  };
14
+ isOptionDisabled?: boolean;
14
15
  }
15
16
  export declare const SingpassSelection: (props: SetUpAccountMethodProps) => JSX.Element;
@@ -1,4 +1,6 @@
1
1
  import type { BaseInnerFormProps } from '../../core/hooks/useForm';
2
+ import type { LegalEntityType } from '../../core/models/api/legal-entity-type';
3
+ import type { AccountHolderOption } from '../internal/AccountHolder/types';
2
4
  export declare const setupAccountMethods: readonly ["singpass", "manual"];
3
5
  export type SetupAccountMethod = (typeof setupAccountMethods)[number];
4
6
  export interface SetupAccountMethodSchema {
@@ -6,4 +8,6 @@ export interface SetupAccountMethodSchema {
6
8
  }
7
9
  export interface SetUpAccountMethodProps extends BaseInnerFormProps<SetupAccountMethodSchema> {
8
10
  handleNextClick: (setupAccountMethod: SetupAccountMethod | undefined) => void;
11
+ accountHolder?: AccountHolderOption;
12
+ legalEntityType: LegalEntityType;
9
13
  }
@@ -15,6 +15,7 @@ import { CreateIndividualComponent } from './EmbeddedDropins/CreateIndividualCom
15
15
  import { CreateTransferInstrumentComponent } from './EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent';
16
16
  import { ManageTransferInstrumentComponent } from './EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentComponent';
17
17
  import { OnboardingDropinComponent } from './EmbeddedDropins/OnboardingDropinComponent/OnboardingDropinComponent';
18
+ import { UpdateLegalEntityForHighExposure } from './EmbeddedDropins/UpdateLegalEntityForHighExposure/UpdateLegalEntityForHighExposure';
18
19
  import { ViewVerificationStatusComponent } from './EmbeddedDropins/ViewVerificationStatus';
19
20
  /**
20
21
  * Maps each component with a Component element.
@@ -34,6 +35,7 @@ export declare const componentsMap: {
34
35
  readonly manageTransferInstrumentComponent: typeof ManageTransferInstrumentComponent;
35
36
  readonly onboardingDropinComponent: typeof OnboardingDropinComponent;
36
37
  readonly viewVerificationStatusComponent: typeof ViewVerificationStatusComponent;
38
+ readonly updateLegalEntityForHighExposureComponent: typeof UpdateLegalEntityForHighExposure;
37
39
  };
38
40
  export type ComponentMap = typeof componentsMap;
39
41
  export type ComponentProps<Name extends keyof ComponentMap> = Parameters<ComponentMap[Name]>[0];
@@ -1,4 +1,4 @@
1
- import './_document-guidance.component.scss';
1
+ import './DocumentGuidance.scss';
2
2
  import type { DocumentGuidanceProps } from './types';
3
3
  declare function DocumentGuidance({ type, className }: DocumentGuidanceProps): import("preact").JSX.Element;
4
4
  export default DocumentGuidance;
@@ -1,10 +1,12 @@
1
1
  import './Field.scss';
2
- import type { ComponentProps, JSX } from 'preact';
2
+ import type { ComponentChildren, ComponentProps, JSX } from 'preact';
3
3
  import type { FieldProps } from './types';
4
- export type MaybeLabelElementProps = (ComponentProps<'label'> & {
4
+ export type MaybeLabelElementProps = {
5
+ children: ComponentChildren;
6
+ } & ((ComponentProps<'label'> & {
5
7
  useLabelElement: true;
6
8
  }) | (ComponentProps<'div'> & {
7
9
  useLabelElement: false;
8
- });
10
+ }));
9
11
  declare const Field: ({ className, classNameModifiers, children, dataPlaceholder, disabled, optional, errorMessage, filled, focused, helper, inputWrapperModifiers, isLoading, isValid, label, name, onBlur, onFieldBlur, onFocus, onFocusField, showErrorIconBottom, useLabelElement, helperPosition, wrapperRef, }: FieldProps) => JSX.Element;
10
12
  export default Field;
@@ -123,6 +123,14 @@ export declare const taxIdNumberOptions: {
123
123
  readonly id: "uen";
124
124
  readonly name: "uen";
125
125
  }];
126
+ readonly JE: readonly [{
127
+ readonly id: "taxIdentificationNumber";
128
+ readonly name: "taxIdentificationNumber";
129
+ }, {
130
+ readonly id: "socialSecurityNumber";
131
+ readonly name: "socialSecurityNumber";
132
+ readonly applicableOnlyFor: readonly [CompanyTypesValue.SOLE_PROPRIETORSHIP];
133
+ }];
126
134
  };
127
135
  export declare const getTaxIdNumberOptions: (country: CountryCode, companyType: CompanyTypesValue | LegalEntityType.TRUST | undefined) => readonly TaxIdNumberOption[] | undefined;
128
136
  export type TaxIdNumberType = (typeof taxIdNumberOptions)[keyof typeof taxIdNumberOptions][number]['id'];
@@ -1,3 +1,5 @@
1
+ import type { CompanyTypesValue } from '../../../core/models/api/company-types-value';
2
+ import type { LegalEntityType } from '../../../core/models/api/legal-entity-type';
1
3
  import type { CountryCode } from '../../../core/models/country-code';
2
4
  import type { TaxIdNumberType } from './countryIdNumberTypes';
3
5
  /**
@@ -6,5 +8,6 @@ import type { TaxIdNumberType } from './countryIdNumberTypes';
6
8
  * We don't store this choice in the API.
7
9
  * @param taxId the existing tax ID number
8
10
  * @param country the country of the LE
11
+ * @param companyType the company type, e.g. `nonProfit`
9
12
  */
10
- export declare const inferTaxIdNumberType: (taxId: string, country: CountryCode) => TaxIdNumberType | undefined;
13
+ export declare const inferTaxIdNumberType: (taxId: string, country: CountryCode, companyType: CompanyTypesValue | LegalEntityType.TRUST | undefined) => TaxIdNumberType | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
2
2
  export interface StockISINFieldSchema {
3
- stockISIN?: string | undefined;
3
+ stockISIN?: string;
4
4
  }
5
5
  export type StockISINFieldProps = BaseFormFieldProps<StockISINFieldSchema>;
@@ -0,0 +1,3 @@
1
+ import type { StockTickerSymbolFieldProps, StockTickerSymbolFieldSchema } from './types';
2
+ export declare const STOCK_TICKER_SYMBOL_FIELD: Array<keyof StockTickerSymbolFieldSchema>;
3
+ export declare function StockTickerSymbolField({ data, valid, errors, labels, placeholders, readonly, mask, guidanceText, handleChangeFor, }: StockTickerSymbolFieldProps): import("preact").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { FieldMetadata } from '../../../core/models/country-config';
2
+ import type { StockTickerSymbolFieldSchema } from './types';
3
+ export declare const stockTickerSymbolFieldMetadata: FieldMetadata<StockTickerSymbolFieldSchema, 'stockTickerSymbol'>;
@@ -0,0 +1 @@
1
+ export * from './StockTickerSymbolField';
@@ -0,0 +1,5 @@
1
+ import type { BaseFormFieldProps } from '../../../core/hooks/useForm';
2
+ export interface StockTickerSymbolFieldSchema {
3
+ stockTickerSymbol?: string;
4
+ }
5
+ export type StockTickerSymbolFieldProps = BaseFormFieldProps<StockTickerSymbolFieldSchema>;
@@ -1,8 +1,11 @@
1
+ import { CompanyTypesValue } from '../../../core/models/api/company-types-value';
2
+ import type { LegalEntityType } from '../../../core/models/api/legal-entity-type';
1
3
  import type { FieldMetadata } from '../../../core/models/country-config';
2
4
  import type { PerCountryFieldConfig } from '../../../core/models/field-configurations';
3
5
  import type { TaxIdNumberType } from '../IdFieldTypeSelector/countryIdNumberTypes';
4
6
  import type { TaxIdSchema } from './types';
5
7
  export interface FieldConfigParams {
8
+ companyType: CompanyTypesValue | LegalEntityType.TRUST | undefined;
6
9
  taxIdNumberType: TaxIdNumberType | undefined;
7
10
  }
8
11
  export declare const defaultFieldMetadata: FieldMetadata<TaxIdSchema, 'taxId'>;
@@ -11,6 +11,7 @@ export declare enum ExperimentNames {
11
11
  AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
12
12
  ShowUnsupportedEntityType = "ShowUnsupportedEntityType",
13
13
  ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies",
14
+ ShowSingPassButtonForIndividuals = "ShowSingPassButtonForIndividuals",
14
15
  ShowExtraTaxExemptionReasons = "ShowExtraTaxExemptionReasons",
15
16
  EnableCountryOfGoverningLawForUKCompanies = "EnableCountryOfGoverningLawForUKCompanies",
16
17
  HidePayoutAccountTask = "HidePayoutAccountTask",
@@ -1,6 +1,7 @@
1
1
  import type { BusinessDetailsSchema } from '../../../components/BusinessDetails/types';
2
2
  import type { CompanySchema } from '../../../components/Company/types';
3
3
  import type { CompanySearchSchema } from '../../../components/CompanySearch/types';
4
+ import type { HighExposureSchema } from '../../../components/Dropins/HighExposureDropin/types';
4
5
  import type { TrustMemberSchema } from '../../../components/Dropins/RoleAndTypeDropin/types';
5
6
  import type { IndividualSchema } from '../../../components/Individual/types';
6
7
  import type { PayoutDetailsSchema } from '../../../components/PayoutDetails/types';
@@ -48,7 +49,7 @@ export type StateModel<TLDS extends TopLevelDataSchema = TopLevelDataSchema> = {
48
49
  prevState?: State<TLDS>;
49
50
  };
50
51
  };
51
- export type TopLevelDataSchema = IndividualSchema | BusinessDetailsSchema | CompanySchema | CompanySearchSchema | PayoutDetailsSchema | TrustSchema | TrustMemberSchema | SolePropSchema;
52
+ export type TopLevelDataSchema = IndividualSchema | BusinessDetailsSchema | CompanySchema | CompanySearchSchema | PayoutDetailsSchema | TrustSchema | TrustMemberSchema | SolePropSchema | HighExposureSchema;
52
53
  export type AnyFormIdOfTLDS = keyof IndividualSchema | keyof BusinessDetailsSchema | keyof CompanySchema | keyof CompanySearchSchema | keyof PayoutDetailsSchema | keyof TrustSchema | keyof TrustMemberSchema | keyof SolePropSchema;
53
54
  export interface State<TLDS extends TopLevelDataSchema> {
54
55
  data: TLDS;
@@ -1,3 +1,3 @@
1
1
  import type { ServiceAgreementAcceptanceInfos } from '../../models/api/contracts';
2
2
  import type { ComponentApiRequestContext } from '../types';
3
- export declare const getServiceAgreementAcceptanceInfo: (context: ComponentApiRequestContext) => Promise<ServiceAgreementAcceptanceInfos>;
3
+ export declare const getServiceAgreementAcceptanceInfos: (context: ComponentApiRequestContext) => Promise<ServiceAgreementAcceptanceInfos>;
@@ -1,2 +1 @@
1
- import type { EmbeddedEventItem } from '../../user-events';
2
- export declare const pushEvents: (loadingContext: string, sessionId: string, event: EmbeddedEventItem) => Promise<void>;
1
+ export declare const pushEvents: <T>(loadingContext: string, sessionId: string, event: T) => Promise<unknown>;
@@ -1,10 +1,16 @@
1
1
  import type { ComponentMap } from '../../components';
2
- import type { EmbeddedEventItem, EventQueueItem, UserEventCallback } from '../user-events';
3
- export type useAnalyticsProps = {
2
+ import type { EventData, EventQueueItem, EventType, UserEventCallback } from '../user-events';
3
+ export type UseAnalyticsProps = {
4
4
  legalEntityId: string;
5
5
  onUserEvent?: UserEventCallback;
6
6
  sdkVersion: string;
7
7
  componentName: keyof ComponentMap;
8
8
  };
9
+ type EmbeddedEventItem = {
10
+ eventType: EventType;
11
+ eventName: string;
12
+ eventData: EventData;
13
+ };
9
14
  export declare const convertToEmbeddedEvent: (eventQueueItem: EventQueueItem) => EmbeddedEventItem;
10
- export declare const useAnalytics: ({ onUserEvent, legalEntityId, sdkVersion, componentName, }: useAnalyticsProps) => Promise<void>;
15
+ export declare const useAnalytics: ({ onUserEvent, legalEntityId, sdkVersion, componentName, }: UseAnalyticsProps) => Promise<void>;
16
+ export {};
@@ -0,0 +1,6 @@
1
+ interface UseCanSeeEntitySelection {
2
+ canSeeEntitySelection: boolean;
3
+ setCanSeeEntitySelection: (hasSeen: boolean) => void;
4
+ }
5
+ export declare const useCanSeeEntitySelection: (legalEntityId: string) => UseCanSeeEntitySelection;
6
+ export {};
@@ -1,6 +1,7 @@
1
1
  import type { BusinessDetailsSchema } from '../components/BusinessDetails/types';
2
2
  import type { CompanySchema } from '../components/Company/types';
3
3
  import type { CompanySearchSchema } from '../components/CompanySearch/types';
4
+ import type { HighExposureSchema } from '../components/Dropins/HighExposureDropin/types';
4
5
  import type { IndividualSchema } from '../components/Individual/types';
5
6
  import type { PayoutAccountSchema } from '../components/PayoutAccount/types';
6
7
  import type { SolePropSchema } from '../components/SoleProp/types';
@@ -19,6 +20,7 @@ export declare function parseBusinessDetailsScenarios(scenario: Scenario[] | und
19
20
  export declare function parseCompanyScenarios(scenario: Scenario[], country: CountryCode): FieldConfigurations<CompanySchema>;
20
21
  export declare function parseCompanySearchScenarios(scenario: Scenario[] | undefined, country: CountryCode): FieldConfigurations<CompanySearchSchema>;
21
22
  export declare function parseTrustScenarios(scenario: Scenario[], country: CountryCode): FieldConfigurations<TrustSchema>;
23
+ export declare const parseHighExposureScenarios: (scenario: Scenario[] | undefined) => FieldConfigurations<HighExposureSchema>;
22
24
  export declare function parseSolePropScenarios(scenario: Scenario[], country: CountryCode): FieldConfigurations<SolePropSchema>;
23
25
  export declare function parsePayoutScenarios({ requiredFields, country, bankVerificationAvailable, }: {
24
26
  requiredFields: (keyof PayoutAccountSchema)[] | undefined;
@@ -1,8 +1,9 @@
1
+ export interface EventData {
2
+ [key: string]: string | number | boolean | any[] | null;
3
+ }
1
4
  export interface UserEvent {
2
5
  /** Object with segments should be a flat object (arbitrary key/value pairs for event data) */
3
- segmentation?: {
4
- [key: string]: string | number | boolean | any[] | null;
5
- };
6
+ segmentation?: EventData;
6
7
  }
7
8
  type UserEventWithKey = UserEvent & {
8
9
  key: string;
@@ -10,11 +11,6 @@ type UserEventWithKey = UserEvent & {
10
11
  export type EventType = 'track_pageview' | 'add_event' | 'start_event' | 'end_event';
11
12
  export type EventQueueItem = [EventType, string | UserEventWithKey];
12
13
  export type UserEventCallback = (eventQueueItem: EventQueueItem) => void;
13
- export type EmbeddedEventItem = {
14
- eventType: EventType;
15
- eventName: string;
16
- eventData?: UserEvent;
17
- };
18
14
  declare class UserEvents {
19
15
  private readonly queue;
20
16
  private readonly subscriptions;
@@ -7,7 +7,7 @@ type BaseTrackingPayloadParams = {
7
7
  };
8
8
  parentLegalEntity?: LegalEntity;
9
9
  legalEntity?: LegalEntity;
10
- task: TaskTypes;
10
+ task?: TaskTypes;
11
11
  };
12
12
  export type BaseTrackingPayload = {
13
13
  task: TaskTypes;
@@ -4,6 +4,9 @@ import type { ValidationError } from '../../core/models/errors/validation-error'
4
4
  * Processes server validation errors received from an erroneous HTTP response.
5
5
  * @param validationError - the validation error contain all invalid fields.
6
6
  * @param dropinTask - the dropin page we are processing validations for.
7
+ * @param keyMappings - the actual keymappings, for non-task components
7
8
  */
8
- declare const processValidationErrors: (validationError: ValidationError, dropinTask: TaskTypes) => {};
9
+ declare const processValidationErrors: <T extends string>(validationError: ValidationError, dropinTask?: TaskTypes, keyMappings?: {
10
+ [key: string]: T;
11
+ }) => {};
9
12
  export default processValidationErrors;
@@ -1,3 +1,20 @@
1
1
  import type { BaseFormProps, BaseInnerFormProps, BaseOuterFormProps } from '../core/hooks/useForm';
2
2
  export declare function getFormProps<OuterFormProps extends BaseOuterFormProps<OuterFormSchema>, NestedFormProps extends BaseFormProps<NestedFormSchema>, OuterFormSchema, NestedFormSchema>(props: OuterFormProps, innerFormId: keyof OuterFormSchema): NestedFormProps | null;
3
+ export declare function removeFormLayer<OuterFormSchema>(obj: Partial<{
4
+ [InnerFormName in keyof OuterFormSchema]: (keyof OuterFormSchema[InnerFormName])[];
5
+ }> | undefined, formId: string): {};
6
+ /**
7
+ * TL;DR; Digs one level deeper in BaseOuterFormProps like getFormProps, while preserving BaseOuterFormProps structure
8
+ *
9
+ * we want to preserve getFormProps' utility of digging into the data structure without turning
10
+ * the special fields like requiredFields into arrays, like BaseInnerFormProps.
11
+ *
12
+ * This is also an opportunity to add feature for the special fields to be able to be "dug" into
13
+ * like an object.
14
+ *
15
+ * This will be done by using a "formA.formB" notation.
16
+ * @param props
17
+ * @param innerFormId
18
+ */
19
+ export declare function getNestedOuterFormPropsFromOuterFormProps<OuterFormProps extends BaseOuterFormProps<OuterFormSchema>, NestedFormProps extends BaseOuterFormProps<NestedFormSchema>, OuterFormSchema, NestedFormSchema>(props: OuterFormProps, innerFormId: keyof OuterFormSchema): NestedFormProps | null;
3
20
  export declare function getFieldProps<OuterFormProps extends BaseInnerFormProps<OuterFormSchema>, NestedFormProps extends BaseInnerFormProps<NestedFormSchema>, OuterFormSchema extends NestedFormSchema, NestedFormSchema>(props: OuterFormProps, innerFormFields: (keyof NestedFormSchema)[]): NestedFormProps | null;
@@ -10,5 +10,5 @@ type RecursiveKeyOfHandleValue<TValue, Text extends string> = TValue extends any
10
10
  * Includes those nested within other objects, e.g. `'name.firstName'`.
11
11
  * @param includeUndefined - whether to include properties which are defined but have a value of `undefined`.
12
12
  */
13
- export declare function getNestedPropertyKeys<T extends object>(obj: T, includeUndefined?: boolean): Array<RecursiveKeyOf<T>>;
13
+ export declare function getNestedPropertyKeys<T extends object>(obj: T, includeUndefined?: boolean, includeFalsy?: boolean): Array<RecursiveKeyOf<T>>;
14
14
  export {};
@@ -1,4 +1,5 @@
1
1
  import type { CompanySchema } from '../../components/Company/types';
2
+ import type { HighExposureSchema } from '../../components/Dropins/HighExposureDropin/types';
2
3
  import type { IndividualSchema } from '../../components/Individual/types';
3
4
  import type { PayoutDetailsSchema } from '../../components/PayoutDetails/types';
4
5
  import type { SolePropSchema } from '../../components/SoleProp/types';
@@ -15,6 +16,7 @@ export declare const mandatoryApiFields: {
15
16
  ORGANIZATION: Array<Partial<RecursiveKeyOf<CompanySchema>>>;
16
17
  SOLE_PROPRIETORSHIP: Array<Partial<RecursiveKeyOf<SolePropSchema>>>;
17
18
  TRUST: Array<Partial<RecursiveKeyOf<TrustSchema>>>;
19
+ HIGH_EXPOSURE: Array<Partial<RecursiveKeyOf<HighExposureSchema>>>;
18
20
  };
19
21
  export declare const individualObscuredFields: Array<RecursiveKeyOf<IndividualSchema>>;
20
22
  export declare const individualComponentsKeyMapping: {
@@ -58,6 +60,7 @@ export declare const businessDetailsComponentsKeyMapping: {
58
60
  'additionalInformation.isUen': string;
59
61
  'additionalInformation.stockExchangeMIC': string;
60
62
  'additionalInformation.stockISIN': string;
63
+ 'additionalInformation.stockTickerSymbol': string;
61
64
  'companyRegistrationAddress.registrationAddress.city': string;
62
65
  'companyRegistrationAddress.registrationAddress.country': string;
63
66
  'companyRegistrationAddress.registrationAddress.postalCode': string;
@@ -86,6 +89,7 @@ export declare const companyComponentsKeyMapping: {
86
89
  'companyRegistrationDetails.isUen': string;
87
90
  'companyRegistrationDetails.stockExchangeMIC': string;
88
91
  'companyRegistrationDetails.stockISIN': string;
92
+ 'companyRegistrationDetails.stockTickerSymbol': string;
89
93
  'companyRegistrationAddress.registrationAddress.city': string;
90
94
  'companyRegistrationAddress.registrationAddress.country': string;
91
95
  'companyRegistrationAddress.registrationAddress.postalCode': string;
@@ -128,6 +132,7 @@ export declare const companySearchComponentsKeyMapping: {
128
132
  'companyOtherDetails.isUen': string;
129
133
  'companyOtherDetails.stockExchangeMIC': string;
130
134
  'companyOtherDetails.stockISIN': string;
135
+ 'companyOtherDetails.stockTickerSymbol': string;
131
136
  'companyOtherDetails.exemptedFromVat': string;
132
137
  };
133
138
  export declare const companySearchApiKeyMapping: {};
@@ -681,6 +686,12 @@ export declare const trustComponentsKeyMapping: {
681
686
  'trustRegistrationAddress.operationalAddress.otherAddressInformation': string;
682
687
  };
683
688
  export declare const trustApiKeyMapping: {};
689
+ export declare const highExposureComponentsKeyMapping: {
690
+ 'company.numberOfEmployees': string;
691
+ 'parentCompany.numberOfEmployees': string;
692
+ 'ultimateParentCompany.numberOfEmployees': string;
693
+ };
694
+ export declare const highExposureApiKeyMapping: {};
684
695
  export declare const solePropComponentsKeyMapping: {
685
696
  'solePropNameAndCountry.country': string;
686
697
  'solePropNameAndCountry.legalCompanyName': string;
@@ -1,5 +1,6 @@
1
1
  import type { BankDocumentSchema } from '../../components/BankDocument/types';
2
2
  import type { CompanySchema } from '../../components/Company/types';
3
+ import type { HighExposureSchema } from '../../components/Dropins/HighExposureDropin/types';
3
4
  import type { IndividualSchema } from '../../components/Individual/types';
4
5
  import type { AccountHolderOption } from '../../components/internal/AccountHolder/types';
5
6
  import type { PayoutDetailsSchema } from '../../components/PayoutDetails/types';
@@ -34,6 +35,8 @@ export declare const mapLegalEntityToCompany: (legalEntity: ExistingLegalEntity,
34
35
  export declare const mapCompanyToLegalEntity: (data: CompanySchema) => LegalEntity;
35
36
  export declare const mapLegalEntityToTrust: (legalEntity: LegalEntity) => TrustSchema;
36
37
  export declare const mapTrustToLegalEntity: (data: TrustSchema) => LegalEntity;
38
+ export declare const mapLegalEntityToHighExposure: (legalEntity: LegalEntity) => HighExposureSchema;
39
+ export declare const mapHighExposureToLegalEntity: (data: HighExposureSchema) => LegalEntity;
37
40
  export declare const mapLegalEntityToSoleProp: (legalEntity: LegalEntity) => SolePropSchema;
38
41
  export declare const mapSolePropToLegalEntity: (data: SolePropSchema) => LegalEntity;
39
42
  export type IndividualDocumentFields = Pick<IndividualSchema, 'idDocument' | 'proofOfResidence' | 'proofOfNationalId'>;
@@ -1,3 +1,8 @@
1
- import type { VerifyIdNumberResponse } from '../../../core/models/api/verify-id-number';
2
- import type { IdVerificationStatus } from '../../../core/models/id-verification-status';
3
- export declare const verifyIdNumberHelper: (idRtnData: VerifyIdNumberResponse) => IdVerificationStatus | undefined;
1
+ import type { PersonalDetailsSchema } from '../../../components/PersonalDetails/types';
2
+ import type { ConfigurationApi } from '../../../core/Context/ConfigurationApiContext/ConfigurationApiContext';
3
+ import { type CountryCode } from '../../../core/models/country-code';
4
+ import type { Verification } from '../verificationUtils';
5
+ export declare const COUNTRY_ID_NUMBER_MASKS: Partial<Record<CountryCode, {
6
+ length: number;
7
+ }>>;
8
+ export declare const handleVerifyIdNumber: (formData: PersonalDetailsSchema, country: CountryCode, verifyFn: ConfigurationApi["verifyIdNumber"]) => Promise<Verification>;
@@ -1,7 +1,17 @@
1
- import type { IdFormState, PersonalDetailsSchema } from '../../components/PersonalDetails/types';
1
+ import type { FormState } from '../../core/hooks/useForm/types';
2
2
  import type { CountryCode } from '../../core/models/country-code';
3
- import type { IdVerificationStatus } from '../../core/models/id-verification-status';
4
- export declare function useVerification(fieldsToVerify: any[], country: CountryCode): {
3
+ interface VerificationFailure {
4
+ field: string;
5
+ isVerified: false;
6
+ messageKey: string;
7
+ }
8
+ interface VerificationSuccess {
9
+ field: string;
10
+ isVerified: true;
11
+ }
12
+ export type Verification = VerificationFailure | VerificationSuccess;
13
+ export declare function useVerification(fieldsToVerify: string[], country: CountryCode): {
5
14
  hasFieldsToVerify: boolean;
6
- verifyFields: (formState: Pick<IdFormState, "data">, savedData: PersonalDetailsSchema) => Promise<IdVerificationStatus[]>;
15
+ verifyFields: <T>(formState: Pick<FormState<T>, "data">, savedData: T) => Promise<Verification[]>;
7
16
  };
17
+ export {};