@adyen/kyc-components 2.23.0 → 2.24.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.
- package/dist/es/adyen-kyc-components.es.js +10486 -6906
- package/dist/style.css +8581 -1008
- package/dist/types/components/BusinessTypeSelection/BusinessTypeSelection.d.ts +1 -1
- package/dist/types/components/BusinessTypeSelection/types.d.ts +4 -0
- package/dist/types/components/BusinessTypeSelection/utils.d.ts +1 -1
- package/dist/types/components/Company/rules.d.ts +24 -1
- package/dist/types/components/CompanyBasics/component/CompanyBasicsComponent.d.ts +8 -0
- package/dist/types/components/CompanyBasics/index.d.ts +1 -0
- package/dist/types/components/CompanyBasics/types.d.ts +9 -0
- package/dist/types/components/CompanyBasics/validate.d.ts +4 -0
- package/dist/types/components/CompanyLookup/CompanyLookupResultsHeader.d.ts +2 -0
- package/dist/types/components/CompanyLookup/CompanyLookupResultsList.d.ts +2 -0
- package/dist/types/components/CompanyLookup/LookupResult.d.ts +2 -0
- package/dist/types/components/CompanyLookup/component/CompanyLookupComponent.d.ts +5 -0
- package/dist/types/components/CompanyLookup/index.d.ts +1 -0
- package/dist/types/components/CompanyLookup/types.d.ts +60 -0
- package/dist/types/components/CompanyOtherDetails/component/CompanyOtherDetailsComponent.d.ts +8 -0
- package/dist/types/components/CompanyOtherDetails/index.d.ts +1 -0
- package/dist/types/components/CompanyOtherDetails/types.d.ts +17 -0
- package/dist/types/components/CompanyOtherDetails/validate.d.ts +7 -0
- package/dist/types/components/CompanyRegistrationDetails/component/labels.d.ts +6 -0
- package/dist/types/components/CompanySearch/component/CompanySearchComponent.d.ts +2 -0
- package/dist/types/components/CompanySearch/forms.d.ts +38 -0
- package/dist/types/components/CompanySearch/index.d.ts +1 -0
- package/dist/types/components/CompanySearch/types.d.ts +22 -0
- package/dist/types/components/CompanyStructure/component/CompanyStructureComponent.d.ts +8 -0
- package/dist/types/components/CompanyStructure/index.d.ts +1 -0
- package/dist/types/components/CompanyStructure/types.d.ts +7 -0
- package/dist/types/components/CompanyStructure/validate.d.ts +3 -0
- package/dist/types/components/Dropins/CompanySearchDropin/components/CompanySearchDropinComponent.d.ts +2 -0
- package/dist/types/components/Dropins/CompanySearchDropin/index.d.ts +1 -0
- package/dist/types/components/Dropins/CompanySearchDropin/types.d.ts +10 -0
- package/dist/types/components/Dropins/CompanySearchDropin/utils.d.ts +8 -0
- package/dist/types/components/Dropins/FormWrapper/FormWrapper.d.ts +1 -1
- package/dist/types/components/Dropins/PayoutDetailsDropin/components/PayoutDetailsDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/types.d.ts +2 -1
- package/dist/types/components/EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent.d.ts +2 -1
- package/dist/types/components/IdentityNumber/formats.d.ts +3 -0
- package/dist/types/components/IdentityNumber/type.d.ts +2 -0
- package/dist/types/components/IdentityNumber/validate.d.ts +2 -1
- package/dist/types/components/IdentityNumber/validate.helper.d.ts +2 -0
- package/dist/types/components/Individual/rules.d.ts +1 -0
- package/dist/types/components/PayoutDetails/types.d.ts +1 -2
- package/dist/types/components/PersonalDetails/component/labels.d.ts +4 -0
- package/dist/types/components/PersonalDetails/types.d.ts +4 -0
- package/dist/types/components/TaskList/types.d.ts +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/internal/Address/components/SearchAddress.d.ts +1 -1
- package/dist/types/components/internal/Address/types.d.ts +3 -1
- package/dist/types/components/internal/Address/utils.d.ts +1 -1
- package/dist/types/components/internal/BusinessRegistrationNumber/types.d.ts +2 -0
- package/dist/types/components/internal/BusinessRegistrationNumber/validate.d.ts +4 -4
- package/dist/types/components/internal/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +3 -0
- package/dist/types/components/internal/BusinessRegistrationNumberField/index.d.ts +1 -0
- package/dist/types/components/internal/BusinessRegistrationNumberField/types.d.ts +8 -0
- package/dist/types/components/internal/BusinessRegistrationNumberField/validate.d.ts +21 -0
- package/dist/types/components/internal/CountryField/types.d.ts +1 -1
- package/dist/types/components/internal/CountryField/validate.d.ts +3 -0
- package/dist/types/components/internal/DateOfIncorporationField/DateOfIncorporationField.d.ts +3 -0
- package/dist/types/components/internal/DateOfIncorporationField/index.d.ts +1 -0
- package/dist/types/components/internal/DateOfIncorporationField/types.d.ts +5 -0
- package/dist/types/components/internal/DateOfIncorporationField/validate.d.ts +3 -0
- package/dist/types/components/internal/FormFields/Field/Field.d.ts +2 -3
- package/dist/types/components/internal/FormFields/Field/types.d.ts +5 -2
- package/dist/types/components/internal/FormFields/InputBase.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCard.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroupCard/types.d.ts +4 -3
- package/dist/types/components/internal/Iban/ibanValidator.d.ts +3 -2
- package/dist/types/components/internal/IdFieldTypeSelector/IdFieldTypeSelector.d.ts +2 -0
- package/dist/types/components/internal/IdFieldTypeSelector/countryIdNumberTypes.d.ts +5 -0
- package/dist/types/components/internal/IdFieldTypeSelector/types.d.ts +20 -0
- package/dist/types/components/internal/LegalCompanyNameField/types.d.ts +1 -1
- package/dist/types/components/internal/LegalCompanyNameField/validate.d.ts +3 -0
- package/dist/types/components/internal/StateField/types.d.ts +3 -1
- package/dist/types/components/internal/StateField/validate.d.ts +3 -0
- package/dist/types/components/internal/StockExchangeMICField/StockExchangeMICField.d.ts +3 -0
- package/dist/types/components/internal/StockExchangeMICField/index.d.ts +1 -0
- package/dist/types/components/internal/StockExchangeMICField/types.d.ts +5 -0
- package/dist/types/components/internal/StockExchangeMICField/validate.d.ts +3 -0
- package/dist/types/components/internal/StockISINField/StockISINField.d.ts +3 -0
- package/dist/types/components/internal/StockISINField/index.d.ts +1 -0
- package/dist/types/components/internal/StockISINField/types.d.ts +5 -0
- package/dist/types/components/internal/StockISINField/validate.d.ts +3 -0
- package/dist/types/components/internal/TaxId/rules.d.ts +2 -1
- package/dist/types/components/internal/TaxInformationField/TaxInformationField.d.ts +4 -0
- package/dist/types/components/internal/TaxInformationField/index.d.ts +1 -0
- package/dist/types/components/internal/TaxInformationField/types.d.ts +13 -0
- package/dist/types/components/internal/TaxInformationField/validate.d.ts +4 -0
- package/dist/types/components/internal/TradingNameField/TradingNameField.d.ts +3 -0
- package/dist/types/components/internal/TradingNameField/index.d.ts +1 -0
- package/dist/types/components/internal/TradingNameField/types.d.ts +8 -0
- package/dist/types/components/internal/TradingNameField/validate.d.ts +3 -0
- package/dist/types/components/internal/VatNumber/types.d.ts +2 -0
- package/dist/types/components/internal/VatNumber/validate.d.ts +2 -1
- package/dist/types/components/internal/VatNumber/vatNumberValidation.d.ts +5 -0
- package/dist/types/components/internal/VatNumberField/VatNumberField.d.ts +3 -0
- package/dist/types/components/internal/VatNumberField/index.d.ts +1 -0
- package/dist/types/components/internal/VatNumberField/types.d.ts +11 -0
- package/dist/types/components/internal/VatNumberField/validate.d.ts +4 -0
- package/dist/types/core/Context/ExperimentContext/types.d.ts +3 -1
- package/dist/types/core/Context/StateContext/types.d.ts +3 -2
- package/dist/types/core/Context/StateContext/useGlobalData.d.ts +7 -5
- package/dist/types/core/SDKValidation/index.d.ts +1 -1
- package/dist/types/core/Services/componentApi/get-bankVerification-vendor.d.ts +1 -1
- package/dist/types/core/constants.d.ts +1 -0
- package/dist/types/core/core.d.ts +1 -1
- package/dist/types/core/hooks/types.d.ts +1 -0
- package/dist/types/core/hooks/useBankConfigurationHandlers.d.ts +1 -1
- package/dist/types/core/hooks/useCompanySearch/index.d.ts +1 -0
- package/dist/types/core/hooks/useCompanySearch/types.d.ts +41 -0
- package/dist/types/core/hooks/useCompanySearch/useCompanySearch.d.ts +5 -0
- package/dist/types/core/hooks/useCompanySearchTaskSubmit.d.ts +32 -0
- package/dist/types/core/hooks/useForm/types.d.ts +10 -2
- package/dist/types/core/hooks/useIsElementVisible.d.ts +1 -0
- package/dist/types/core/hooks/useScenarioConfiguration.d.ts +3 -1
- package/dist/types/core/models/api/organization.d.ts +1 -1
- package/dist/types/core/models/company.d.ts +7 -0
- package/dist/types/core/models/country-config.d.ts +4 -2
- package/dist/types/core/models/form.d.ts +1 -0
- package/dist/types/core/models/province-code.d.ts +47 -0
- package/dist/types/core/process-field-configurations.d.ts +4 -2
- package/dist/types/language/Language.d.ts +3 -5
- package/dist/types/language/config.d.ts +56 -4
- package/dist/types/language/types.d.ts +5 -0
- package/dist/types/utils/accountHolderUtils.d.ts +2 -0
- package/dist/types/utils/api/documentUtils.d.ts +3 -2
- package/dist/types/utils/api/processCapabilitites.d.ts +3 -2
- package/dist/types/utils/dropin-utils.d.ts +6 -6
- package/dist/types/utils/entity-status-util.d.ts +1 -1
- package/dist/types/utils/formUtils.d.ts +2 -1
- package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -1
- package/dist/types/utils/mapping/companySearch/index.d.ts +3 -0
- package/dist/types/utils/mapping/companySearch/mapCompanyDataResponseToFormSchema.d.ts +3 -0
- package/dist/types/utils/mapping/companySearch/mapCompanySearchSchemaToLegalEntity.d.ts +5 -0
- package/dist/types/utils/mapping/companySearch/mapLegalEntityToCompanySearchSchema.d.ts +4 -0
- package/dist/types/utils/mapping/componentApiMapping.d.ts +39 -2
- package/dist/types/utils/masking/maskTypes.d.ts +15 -0
- package/dist/types/utils/regex/countryIdNumberPatterns.d.ts +2 -0
- package/dist/types/utils/regex/customRegistrationNumberPatterns.d.ts +2 -0
- package/dist/types/utils/regex/index.d.ts +1 -0
- package/dist/types/utils/regex/types.d.ts +11 -2
- package/dist/types/utils/regex/vatNumberPatterns.d.ts +2 -1
- package/dist/types/utils/useForwardRef.d.ts +2 -1
- package/dist/types/utils/validation/types.d.ts +8 -12
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'preact';
|
|
2
|
+
import { TaxInformationFieldProps, TaxInformationFieldSchema } from './types';
|
|
3
|
+
export declare const TAX_INFORMATION_FIELD: Array<keyof TaxInformationFieldSchema>;
|
|
4
|
+
export declare function TaxInformationField({ data, valid, errors, labels, helperText, readonly, handleChangeFor, country, canExempt, }: TaxInformationFieldProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TaxInformationField';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
|
|
2
|
+
import type { TaxInformation } from '../../../core/models/api/organization';
|
|
3
|
+
import type { CountryCode } from '../../../core/models/country-code';
|
|
4
|
+
export interface TaxInformationFieldSchema {
|
|
5
|
+
taxInformation?: TaxInformation[];
|
|
6
|
+
exemptedFromTax?: boolean;
|
|
7
|
+
isUen?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface TaxInformationFieldProps extends BaseFormFieldProps<TaxInformationFieldSchema> {
|
|
10
|
+
country: CountryCode;
|
|
11
|
+
canExempt: boolean;
|
|
12
|
+
isUen?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CountryCode } from '../../../core/models/country-code';
|
|
2
|
+
import { ValidatorRules } from '../../../utils/validation/types';
|
|
3
|
+
import { TaxInformationFieldSchema } from './types';
|
|
4
|
+
export declare const TaxInformationFieldValidation: (country: CountryCode) => ValidatorRules<TaxInformationFieldSchema>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TradingNameFieldProps, TradingNameFieldSchema } from './types';
|
|
2
|
+
export declare const TRADING_NAME_FIELD: Array<keyof TradingNameFieldSchema>;
|
|
3
|
+
export declare function TradingNameField({ data, valid, errors, labels, readonly, handleChangeFor, legalCompanyName, }: TradingNameFieldProps): import("preact").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TradingNameField';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
|
|
2
|
+
export interface TradingNameFieldSchema {
|
|
3
|
+
tradingName?: string | undefined;
|
|
4
|
+
sameNameAsLegalName?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface TradingNameFieldProps extends BaseFormFieldProps<TradingNameFieldSchema> {
|
|
7
|
+
legalCompanyName?: string;
|
|
8
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BaseInnerFormProps } from '../../../core/hooks/useForm';
|
|
2
2
|
import type { CountryCode } from '../../../core/models/country-code';
|
|
3
|
+
import { TranslationKey } from '../../../language/types';
|
|
3
4
|
import type { RegexValidationOptions } from '../../../utils/regex';
|
|
4
5
|
export interface VatNumberSchema {
|
|
5
6
|
vatNumber?: string;
|
|
@@ -8,6 +9,7 @@ export interface VatNumberSchema {
|
|
|
8
9
|
}
|
|
9
10
|
export interface VatNumberProps extends BaseInnerFormProps<VatNumberSchema> {
|
|
10
11
|
country: CountryCode;
|
|
12
|
+
vatNumberType?: TranslationKey;
|
|
11
13
|
}
|
|
12
14
|
export interface RegexPatterns {
|
|
13
15
|
[key: string]: RegExp[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CountryBasedValidatorRules, ValidatorRules } from '../../../utils/validation/types';
|
|
1
|
+
import { CountryBasedCustomValidatorRules, CountryBasedValidatorRules, ValidatorRules } from '../../../utils/validation/types';
|
|
2
2
|
import { VatNumberSchema } from './types';
|
|
3
3
|
export declare const vatNumberValidationRules: ValidatorRules<VatNumberSchema>;
|
|
4
4
|
export declare const countryBasedValidatorRules: CountryBasedValidatorRules<VatNumberSchema>;
|
|
5
|
+
export declare const countryBasedCustomValidatorRules: CountryBasedCustomValidatorRules<VatNumberSchema>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { CountryCode } from '../../../core/models/country-code';
|
|
2
|
+
import { TranslationKey } from '../../../language/types';
|
|
2
3
|
export declare const validateVatNumber: (input: string | undefined | null, fallbackCountryCode?: CountryCode | null) => {
|
|
3
4
|
isValid: boolean;
|
|
4
5
|
message?: string;
|
|
5
6
|
};
|
|
7
|
+
export declare const validatePerVatNumberType: (input: string | undefined | null, vatNumberType: TranslationKey, fallbackCountryCode?: CountryCode | null) => {
|
|
8
|
+
isValid: boolean;
|
|
9
|
+
message?: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { VatNumberFieldProps, VatNumberFieldSchema } from './types';
|
|
2
|
+
export declare const VAT_NUMBER_FIELD: Array<keyof VatNumberFieldSchema>;
|
|
3
|
+
export declare function VatNumberField({ data, valid, errors, labels, placeholders, readonly, handleChangeFor, canExempt, }: VatNumberFieldProps): import("preact").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VatNumberField';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
|
|
2
|
+
import type { CountryCode } from '../../../core/models/country-code';
|
|
3
|
+
export interface VatNumberFieldSchema {
|
|
4
|
+
vatNumber?: string | undefined;
|
|
5
|
+
exemptedFromVat?: boolean;
|
|
6
|
+
vatAbsenceReason?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface VatNumberFieldProps extends BaseFormFieldProps<VatNumberFieldSchema> {
|
|
9
|
+
country: CountryCode;
|
|
10
|
+
canExempt: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CountryCode } from '../../../core/models/country-code';
|
|
2
|
+
import { ValidatorRules } from '../../../utils/validation/types';
|
|
3
|
+
import { VatNumberFieldSchema } from './types';
|
|
4
|
+
export declare const VatNumberFieldValidation: (country: CountryCode) => ValidatorRules<VatNumberFieldSchema>;
|
|
@@ -4,10 +4,12 @@ import { ComponentChildren } from 'preact';
|
|
|
4
4
|
* This list is defined in the BE.
|
|
5
5
|
*/
|
|
6
6
|
export declare enum ExperimentNames {
|
|
7
|
+
EnableCompanySearchFlow = "EnableCompanySearchFlow",
|
|
7
8
|
OnlyAllowAlphanumericBankAccountNumbers = "OnlyAllowAlphanumericBankAccountNumbers",
|
|
8
9
|
EnableNewEntryFlow = "EnableNewEntryFlow",
|
|
9
10
|
AllowOrganizationSettlorWithExemptionReason = "AllowOrganizationSettlorWithExemptionReason",
|
|
10
|
-
AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee"
|
|
11
|
+
AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
|
|
12
|
+
EnableIdentityFieldTypeSelector = "EnableIdentityFieldTypeSelector"
|
|
11
13
|
}
|
|
12
14
|
export type ExperimentName = `${ExperimentNames}`;
|
|
13
15
|
export type Experiments = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CompanySchema } from '../../../components/Company/types';
|
|
2
|
+
import type { CompanySearchSchema } from '../../../components/CompanySearch/types';
|
|
2
3
|
import type { TrustMemberSchema } from '../../../components/Dropins/RoleAndTypeDropin/types';
|
|
3
4
|
import type { IndividualSchema } from '../../../components/Individual/types';
|
|
4
5
|
import type { PayoutDetailsSchema } from '../../../components/PayoutDetails/types';
|
|
@@ -46,8 +47,8 @@ export type StateModel<TLDS extends TopLevelDataSchema = TopLevelDataSchema> = {
|
|
|
46
47
|
prevState?: State<TLDS>;
|
|
47
48
|
};
|
|
48
49
|
};
|
|
49
|
-
export type TopLevelDataSchema = IndividualSchema | CompanySchema | PayoutDetailsSchema | TrustSchema | TrustMemberSchema | SolePropSchema;
|
|
50
|
-
export type AnyFormIdOfTLDS = keyof IndividualSchema | keyof CompanySchema | keyof PayoutDetailsSchema | keyof TrustSchema | keyof TrustMemberSchema | keyof SolePropSchema;
|
|
50
|
+
export type TopLevelDataSchema = IndividualSchema | CompanySchema | CompanySearchSchema | PayoutDetailsSchema | TrustSchema | TrustMemberSchema | SolePropSchema;
|
|
51
|
+
export type AnyFormIdOfTLDS = keyof IndividualSchema | keyof CompanySchema | keyof CompanySearchSchema | keyof PayoutDetailsSchema | keyof TrustSchema | keyof TrustMemberSchema | keyof SolePropSchema;
|
|
51
52
|
export interface State<TLDS extends TopLevelDataSchema> {
|
|
52
53
|
data: TLDS;
|
|
53
54
|
allData: TLDS;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { DebouncedFunc } from 'lodash';
|
|
2
2
|
import { StateSlice, TopLevelDataSchema } from './types';
|
|
3
3
|
export declare function useGlobalData<TLDS extends TopLevelDataSchema>(): TLDS;
|
|
4
|
-
|
|
5
|
-
sliceData:
|
|
6
|
-
updateStateSlice:
|
|
7
|
-
}
|
|
4
|
+
interface UseGlobalDataSlice<TLDS extends TopLevelDataSchema, SliceName extends keyof TLDS, SliceSchema extends TLDS[SliceName]> {
|
|
5
|
+
sliceData: SliceSchema | undefined;
|
|
6
|
+
updateStateSlice: DebouncedFunc<(updatedSlice: StateSlice<TLDS, SliceName>) => void>;
|
|
7
|
+
}
|
|
8
|
+
export declare function useGlobalDataSlice<TLDS extends TopLevelDataSchema, SliceName extends keyof TLDS, SliceSchema extends TLDS[SliceName] = TLDS[SliceName]>(sliceId: SliceName, caller?: string): UseGlobalDataSlice<TLDS, SliceName, SliceSchema>;
|
|
8
9
|
export declare function useResetGlobalData<TLDS extends TopLevelDataSchema>(caller?: string): () => void;
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ComponentOptions } from '../../components';
|
|
2
2
|
import { CoreOptions } from '../types';
|
|
3
3
|
export declare const validateCoreOptions: (coreOptions: CoreOptions) => void;
|
|
4
|
-
export declare const validateForComponent: <Name extends "payoutAccount" | "taskList" | "pci" | "individualDropin" | "companyDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent">(componentName: Name, options: ComponentOptions<Name>) => void;
|
|
4
|
+
export declare const validateForComponent: <Name extends "payoutAccount" | "taskList" | "pci" | "individualDropin" | "companyDropin" | "companySearchDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent">(componentName: Name, options: ComponentOptions<Name>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BankVerificationVendorsResponse } from '../../models/api/get-bankVerification-providers';
|
|
2
2
|
import { CountryCode } from '../../models/country-code';
|
|
3
3
|
import { ComponentApiRequestContext } from '../types';
|
|
4
|
-
export declare const getBankVerificationVendor: (context: ComponentApiRequestContext, country: CountryCode) => Promise<BankVerificationVendorsResponse>;
|
|
4
|
+
export declare const getBankVerificationVendor: (context: ComponentApiRequestContext, country: CountryCode, openBankingPartnerConfigId?: string) => Promise<BankVerificationVendorsResponse>;
|
|
@@ -6,6 +6,7 @@ export declare const KEYBOARD_KEYS: {
|
|
|
6
6
|
readonly escape: "Escape";
|
|
7
7
|
readonly space: " ";
|
|
8
8
|
readonly tab: "Tab";
|
|
9
|
+
readonly backspace: "Backspace";
|
|
9
10
|
};
|
|
10
11
|
export type KeyboardKeyLabel = keyof typeof KEYBOARD_KEYS;
|
|
11
12
|
export type KeyboardKey = (typeof KEYBOARD_KEYS)[KeyboardKeyLabel];
|
|
@@ -8,7 +8,7 @@ export declare class Core {
|
|
|
8
8
|
};
|
|
9
9
|
components: UIElement[];
|
|
10
10
|
constructor(coreOptions: CoreOptions);
|
|
11
|
-
create: <Name extends "payoutAccount" | "taskList" | "pci" | "individualDropin" | "companyDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent">(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
|
|
11
|
+
create: <Name extends "payoutAccount" | "taskList" | "pci" | "individualDropin" | "companyDropin" | "companySearchDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent">(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
|
|
12
12
|
/**
|
|
13
13
|
* Updates global configurations, resets the internal state and remounts each element.
|
|
14
14
|
* @param options - props to update
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type HookStatus = 'loading' | 'loaded' | 'error' | 'success' | 'idle';
|
|
@@ -19,6 +19,6 @@ interface UseBankConfigurationHandlersProps {
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const useBankConfigurationHandlers: ({ isEmbeddedDropin, handleGetBankVerificationVendors, bankAccountCountry, getConfiguration, legalEntityType, capabilities, }: UseBankConfigurationHandlersProps) => {
|
|
21
21
|
getConfigurationData: () => Promise<GetConfigurationResponse>;
|
|
22
|
-
getBankVerificationVendorsHandler: (
|
|
22
|
+
getBankVerificationVendorsHandler: (country: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "EL" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KP" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "SH" | "KN" | "LC" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW", openBankingPartnerConfigId?: string) => Promise<BankVerificationVendorsResponse>;
|
|
23
23
|
};
|
|
24
24
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useCompanySearch';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CompanyBasicsSchema } from '../../../components/CompanyBasics/types';
|
|
2
|
+
import { ValidatorMode } from '../../../utils/validation/types';
|
|
3
|
+
import { AdyenKycSdkError } from '../../error';
|
|
4
|
+
import { CompanyDataResponse, CompanyDeepSearchRequest, CompanyDeepSearchResponse, CompanyIndexSearchRequest, CompanyIndexSearchResponse, CompanySearchResult } from '../../models/api/company-search';
|
|
5
|
+
import { CountryCode } from '../../models/country-code';
|
|
6
|
+
import { ProvinceCode } from '../../models/province-code';
|
|
7
|
+
import { StateCode, StateCodeUS } from '../../models/state-code';
|
|
8
|
+
import { HookStatus } from '../types';
|
|
9
|
+
export interface CompanySearchError extends Error {
|
|
10
|
+
status: number;
|
|
11
|
+
errorCode: string;
|
|
12
|
+
errorType: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SearchOptions {
|
|
15
|
+
companyName: string;
|
|
16
|
+
companyCountry: CountryCode;
|
|
17
|
+
companyState: StateCodeUS;
|
|
18
|
+
resultsLimit?: number;
|
|
19
|
+
indexSearch: (request: CompanyIndexSearchRequest) => Promise<CompanyIndexSearchResponse>;
|
|
20
|
+
deepSearch: (request: CompanyDeepSearchRequest) => Promise<CompanyDeepSearchResponse>;
|
|
21
|
+
}
|
|
22
|
+
export interface UseCompanySearchOptions {
|
|
23
|
+
defaultData: CompanyBasicsSchema | undefined;
|
|
24
|
+
legalCompanyName: string | undefined;
|
|
25
|
+
country: CountryCode | undefined;
|
|
26
|
+
stateOrProvince: StateCode | ProvinceCode | undefined;
|
|
27
|
+
taxIdentificationNumber: string | undefined;
|
|
28
|
+
canVerify: boolean;
|
|
29
|
+
limit?: number;
|
|
30
|
+
handleChangeFor: (key: keyof CompanyBasicsSchema, mode?: ValidatorMode) => (e: any) => void;
|
|
31
|
+
}
|
|
32
|
+
export type UseCompanySearch = {
|
|
33
|
+
results: readonly CompanySearchResult[];
|
|
34
|
+
selectedCompanyId: string | undefined;
|
|
35
|
+
status: HookStatus;
|
|
36
|
+
error: AdyenKycSdkError | undefined;
|
|
37
|
+
verifiedCompany: CompanyDataResponse | undefined;
|
|
38
|
+
retrySearch: () => Promise<void>;
|
|
39
|
+
verify: (tin: string, company: CompanySearchResult) => Promise<void>;
|
|
40
|
+
reset: () => void;
|
|
41
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseCompanySearch, UseCompanySearchOptions } from './types';
|
|
2
|
+
export declare const LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 157766400000;
|
|
3
|
+
export declare const MED_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 94694400000;
|
|
4
|
+
export declare const HIGH_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 31536000000;
|
|
5
|
+
export declare function useCompanySearch({ defaultData, legalCompanyName, country, stateOrProvince, taxIdentificationNumber, canVerify, limit, handleChangeFor, }: UseCompanySearchOptions): UseCompanySearch;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CompanySearchSchema } from '../../components/CompanySearch/types';
|
|
2
|
+
import { DropinAPIHandlers } from '../../components/Dropins/types';
|
|
3
|
+
import { LoadingStatus } from '../../components/internal/LoaderWrapper/constants';
|
|
4
|
+
import { TaskTypes } from '../../components/TaskList/types';
|
|
5
|
+
import { DocumentApiUtils } from '../../utils/api/documentUtils';
|
|
6
|
+
import { ExistingLegalEntity } from '../models/api/legal-entity';
|
|
7
|
+
import { EntityProblems } from '../models/errors/entity-problems';
|
|
8
|
+
import { FormModelWithValidity } from '../models/form';
|
|
9
|
+
import { BaseTrackingPayload } from '../utils';
|
|
10
|
+
export interface SubmitOptions<FormTaskSchema> {
|
|
11
|
+
data: FormTaskSchema;
|
|
12
|
+
}
|
|
13
|
+
export interface SubmitDocumentsOptions<FormTaskSchema> extends SubmitOptions<FormTaskSchema> {
|
|
14
|
+
legalEntity: ExistingLegalEntity;
|
|
15
|
+
currentForms: FormModelWithValidity[];
|
|
16
|
+
}
|
|
17
|
+
export interface FormTaskSubmitOptions {
|
|
18
|
+
task: TaskTypes;
|
|
19
|
+
forms: FormModelWithValidity[];
|
|
20
|
+
legalEntityResponse: ExistingLegalEntity;
|
|
21
|
+
problems: EntityProblems;
|
|
22
|
+
baseTrackingPayload: BaseTrackingPayload;
|
|
23
|
+
documentUtils: DocumentApiUtils;
|
|
24
|
+
setProblems: (value: EntityProblems | ((prevState: EntityProblems) => EntityProblems)) => void;
|
|
25
|
+
setLoadingStatus: (value: LoadingStatus | ((prevState: LoadingStatus) => LoadingStatus)) => void;
|
|
26
|
+
onExternalSubmit?: (company: CompanySearchSchema) => void;
|
|
27
|
+
handleUpdateLegalEntity: Required<DropinAPIHandlers>['handleUpdateLegalEntity'];
|
|
28
|
+
}
|
|
29
|
+
export type FormTaskSubmit<FormTaskSchema> = {
|
|
30
|
+
submit: (options: SubmitOptions<FormTaskSchema>) => Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
export declare function useCompanySearchTaskSubmit<FormTaskSchema extends CompanySearchSchema>({ task, forms, legalEntityResponse, problems, baseTrackingPayload, documentUtils, setProblems, setLoadingStatus, onExternalSubmit, handleUpdateLegalEntity, }: FormTaskSubmitOptions): FormTaskSubmit<FormTaskSchema>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StateUpdater } from 'preact/hooks';
|
|
2
|
-
import type { TranslationKey } from '../../../language/types';
|
|
2
|
+
import type { TranslationKey, TranslationObject } from '../../../language/types';
|
|
3
|
+
import { Mask } from '../../../utils/masking/maskTypes';
|
|
3
4
|
import type { ValidationRuleResult, ValidatorMode, ValidatorRules } from '../../../utils/validation/types';
|
|
4
5
|
import type { AnyFormIdOfTLDS } from '../../Context/StateContext/types';
|
|
5
6
|
import type { CountryCode } from '../../models/country-code';
|
|
@@ -18,6 +19,10 @@ export type FieldErrors<FieldSchema> = {
|
|
|
18
19
|
export type FieldLabels<FieldSchema> = {
|
|
19
20
|
[fieldLabel in keyof FieldSchema]?: string;
|
|
20
21
|
};
|
|
22
|
+
export interface MaskOptions {
|
|
23
|
+
mask?: Mask;
|
|
24
|
+
transformOnType?: (val: string) => string;
|
|
25
|
+
}
|
|
21
26
|
export interface BaseFormFieldProps<FieldSchema> {
|
|
22
27
|
data: FieldData<FieldSchema>;
|
|
23
28
|
valid: FieldValid<FieldSchema>;
|
|
@@ -60,7 +65,10 @@ export interface BaseFormProps<FormSchema> {
|
|
|
60
65
|
[Field in keyof FormSchema]: TranslationKey;
|
|
61
66
|
};
|
|
62
67
|
helperText?: {
|
|
63
|
-
[Field in keyof FormSchema]: TranslationKey;
|
|
68
|
+
[Field in keyof FormSchema]: TranslationKey | TranslationObject;
|
|
69
|
+
};
|
|
70
|
+
masks?: {
|
|
71
|
+
[Field in keyof FormSchema]: MaskOptions;
|
|
64
72
|
};
|
|
65
73
|
data?: FormSchema;
|
|
66
74
|
validators?: ValidatorRules<FormSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsElementVisible(element: Element | undefined): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CountryBankVerificationVendors } from '../../components/BankVerification/types';
|
|
2
|
+
import { BankAccountFormatType } from '../../components/internal/BankAccountFormat/types';
|
|
2
3
|
import { LoadingStatus } from '../../components/internal/LoaderWrapper/constants';
|
|
3
4
|
import { GetPayoutAccountFormatResponse } from '../models/api/get-account-format';
|
|
4
5
|
import { GetConfigurationResponse, PayoutRequiredFields } from '../models/api/get-configuration';
|
|
@@ -16,10 +17,11 @@ export interface UseScenarioConfigurationOptions {
|
|
|
16
17
|
setLoadingStatus: (loadingStatus: LoadingStatus) => void;
|
|
17
18
|
getPayoutAccountFormatData?: () => Promise<GetPayoutAccountFormatResponse>;
|
|
18
19
|
instantVerificationEnabled?: boolean;
|
|
20
|
+
existingBankAccountFormat?: BankAccountFormatType;
|
|
19
21
|
}
|
|
20
22
|
export interface ScenarioConfiguration {
|
|
21
23
|
fieldConfigurations: FieldConfigurations<any> | undefined;
|
|
22
24
|
requiredFields: PayoutRequiredFields | undefined;
|
|
23
25
|
bankVerificationVendors: CountryBankVerificationVendors | undefined;
|
|
24
26
|
}
|
|
25
|
-
export declare const useScenarioConfiguration: ({ getConfigurationData, getPayoutAccountFormatData, parseConfiguration, country, instantVerificationEnabled, setLoadingStatus, }: UseScenarioConfigurationOptions) => ScenarioConfiguration;
|
|
27
|
+
export declare const useScenarioConfiguration: ({ getConfigurationData, getPayoutAccountFormatData, parseConfiguration, country, instantVerificationEnabled, setLoadingStatus, existingBankAccountFormat, }: UseScenarioConfigurationOptions) => ScenarioConfiguration;
|
|
@@ -10,10 +10,17 @@ interface CompanyTypeModel {
|
|
|
10
10
|
export declare const companyBase: {
|
|
11
11
|
[key: string]: ScenarioFieldSettings;
|
|
12
12
|
};
|
|
13
|
+
export declare const companySearchBase: {
|
|
14
|
+
[key: string]: ScenarioFieldSettings;
|
|
15
|
+
};
|
|
13
16
|
export declare const taxIdBase: {
|
|
14
17
|
[key: string]: ScenarioFieldSettings;
|
|
15
18
|
};
|
|
19
|
+
export declare const taxInformationBase: {
|
|
20
|
+
[key: string]: ScenarioFieldSettings;
|
|
21
|
+
};
|
|
16
22
|
export declare const companyTypes: readonly CompanyTypeModel[];
|
|
17
23
|
export declare const fieldsPerScenario: ScenarioFields<typeof companyBase>;
|
|
24
|
+
export declare const companySearchFieldsPerScenario: ScenarioFields<typeof companySearchBase>;
|
|
18
25
|
export declare const countryConfig: CountryConfig;
|
|
19
26
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { TranslationKey } from '../../language/types';
|
|
1
|
+
import { Translatable, TranslationKey } from '../../language/types';
|
|
2
|
+
import { MaskOptions } from '../hooks/useForm';
|
|
2
3
|
import { CountryCode } from './country-code';
|
|
3
4
|
export type CountryConfig = Partial<Record<CountryCode, {
|
|
4
5
|
[field: string]: CountryFieldConfig;
|
|
@@ -6,5 +7,6 @@ export type CountryConfig = Partial<Record<CountryCode, {
|
|
|
6
7
|
export interface CountryFieldConfig {
|
|
7
8
|
label?: TranslationKey;
|
|
8
9
|
placeholder?: TranslationKey;
|
|
9
|
-
helperText?:
|
|
10
|
+
helperText?: Translatable;
|
|
11
|
+
mask?: MaskOptions;
|
|
10
12
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type ProvinceCode = ProvinceCodeAU | ProvinceCodeCA | ProvinceCodeNZ;
|
|
2
|
+
export type ProvinceCodeAU = `${ProvinceCodesAU}`;
|
|
3
|
+
export declare const enum ProvinceCodesAU {
|
|
4
|
+
AustralianCapitalTerritory = "ACT",
|
|
5
|
+
NewSouthWales = "NSW",
|
|
6
|
+
NorthernTerritory = "NT",
|
|
7
|
+
Queensland = "QLD",
|
|
8
|
+
SouthAustralia = "SA",
|
|
9
|
+
Tasmania = "TAS",
|
|
10
|
+
Victoria = "VIC",
|
|
11
|
+
WesternAustralia = "WA"
|
|
12
|
+
}
|
|
13
|
+
export type ProvinceCodeCA = `${ProvinceCodesCA}`;
|
|
14
|
+
export declare const enum ProvinceCodesCA {
|
|
15
|
+
Alberta = "AB",
|
|
16
|
+
BritishColumbia = "BC",
|
|
17
|
+
Manitoba = "MB",
|
|
18
|
+
NewBrunswick = "NB",
|
|
19
|
+
NewfoundlandAndLabrador = "NL",
|
|
20
|
+
NorthwestTerritories = "NT",
|
|
21
|
+
NovaScotia = "NS",
|
|
22
|
+
Nunavut = "NU",
|
|
23
|
+
Ontario = "ON",
|
|
24
|
+
PrinceEdwardIsland = "PE",
|
|
25
|
+
Quebec = "QC",
|
|
26
|
+
Saskatchewan = "SK",
|
|
27
|
+
Yukon = "YT"
|
|
28
|
+
}
|
|
29
|
+
export type ProvinceCodeNZ = `${ProvinceCodesNZ}`;
|
|
30
|
+
export declare const enum ProvinceCodesNZ {
|
|
31
|
+
Auckland = "AUK",
|
|
32
|
+
BayOfPlenty = "BOP",
|
|
33
|
+
Canterbury = "CAN",
|
|
34
|
+
Gisborne = "GIS",
|
|
35
|
+
HawkesBay = "HKB",
|
|
36
|
+
Marlborough = "MBH",
|
|
37
|
+
ManawatuWanganui = "MWT",
|
|
38
|
+
Nelson = "NSN",
|
|
39
|
+
Otago = "OTA",
|
|
40
|
+
SouthLand = "STL",
|
|
41
|
+
Tasman = "TAS",
|
|
42
|
+
Taranaki = "TKI",
|
|
43
|
+
Waikato = "WKO",
|
|
44
|
+
Wellington = "WGN",
|
|
45
|
+
WestCoast = "WTC",
|
|
46
|
+
ChathamIslandsTerritory = "CIT"
|
|
47
|
+
}
|
|
@@ -4,11 +4,13 @@ import { AnyTLDSFieldName } from '../utils/getFieldsWithExistingData';
|
|
|
4
4
|
import { ValidatorRules } from '../utils/validation/types';
|
|
5
5
|
import { BaseOuterFormProps } from './hooks/useForm';
|
|
6
6
|
import { VerificationError } from './models/api/verification-error';
|
|
7
|
+
import { CountryCode } from './models/country-code';
|
|
7
8
|
import { Remediation } from './models/errors/remediation';
|
|
8
9
|
import { FieldConfigurations } from './models/field-configurations';
|
|
9
10
|
import { FormList } from './models/form';
|
|
10
11
|
export declare function parseIndividualScenarios<FormSchema>(scenario: any, country: any): FieldConfigurations<FormSchema>;
|
|
11
12
|
export declare function parseCompanyScenarios<FormSchema>(scenario: any, country: any): FieldConfigurations<FormSchema>;
|
|
13
|
+
export declare function parseCompanySearchScenarios<FormSchema>(scenario: any, country: CountryCode): FieldConfigurations<FormSchema>;
|
|
12
14
|
export declare function parseTrustScenarios<FormSchema>(scenario: any, country: any): FieldConfigurations<FormSchema>;
|
|
13
15
|
export declare function parseSolePropScenarios(scenario: any, country: any): FieldConfigurations<SolePropSchema>;
|
|
14
16
|
export declare function parsePayoutScenarios({ requiredFields, country, bankVerificationAvailable, }: {
|
|
@@ -16,7 +18,7 @@ export declare function parsePayoutScenarios({ requiredFields, country, bankVeri
|
|
|
16
18
|
country: any;
|
|
17
19
|
bankVerificationAvailable: any;
|
|
18
20
|
}): Partial<FieldConfigurations<PayoutAccountSchema>>;
|
|
19
|
-
type PropsFromConfiguration<FormSchema> = Required<Pick<BaseOuterFormProps<FormSchema>, 'verifyFields' | 'requiredFields' | 'placeholders' | 'helperText' | 'optionalFields' | 'labels' | 'maskedFields'>> & {
|
|
21
|
+
type PropsFromConfiguration<FormSchema> = Required<Pick<BaseOuterFormProps<FormSchema>, 'verifyFields' | 'requiredFields' | 'placeholders' | 'helperText' | 'masks' | 'optionalFields' | 'labels' | 'maskedFields'>> & {
|
|
20
22
|
validators: ValidatorRules<FormSchema>;
|
|
21
23
|
allFields: {
|
|
22
24
|
[Field in keyof FormSchema]: FormSchema[Field];
|
|
@@ -62,5 +64,5 @@ type PropsFromConfiguration<FormSchema> = Required<Pick<BaseOuterFormProps<FormS
|
|
|
62
64
|
* }
|
|
63
65
|
* ```
|
|
64
66
|
*/
|
|
65
|
-
export declare function getPropsFromConfigurations<FormSchema extends object>(scenarioConfiguration: FieldConfigurations<FormSchema
|
|
67
|
+
export declare function getPropsFromConfigurations<FormSchema extends object>(scenarioConfiguration: FieldConfigurations<FormSchema> | undefined, forms: FormList, remediationActions: Remediation[], dataMissingErrors: VerificationError[], fieldsWithExistingData: AnyTLDSFieldName[], customRules?: {}, customLabels?: {}): PropsFromConfiguration<FormSchema>;
|
|
66
68
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomTranslations,
|
|
1
|
+
import { CustomTranslations, Translatable, Translations } from './types';
|
|
2
2
|
import { GetTranslationOptions } from './utils';
|
|
3
3
|
declare class Language {
|
|
4
4
|
private readonly supportedLocales;
|
|
@@ -14,11 +14,9 @@ declare class Language {
|
|
|
14
14
|
});
|
|
15
15
|
/**
|
|
16
16
|
* Returns a translated string from a key in the current {@link Language.locale}
|
|
17
|
-
* @
|
|
18
|
-
* @param options - Translation options
|
|
19
|
-
* @returns Translated string
|
|
17
|
+
* @returns Translated string in the user's locale
|
|
20
18
|
*/
|
|
21
|
-
get(
|
|
19
|
+
get(translatable: Translatable, translationOptions?: GetTranslationOptions): string;
|
|
22
20
|
/**
|
|
23
21
|
* Returns a localized string for a date
|
|
24
22
|
* @param date - Date to be localized
|