@adyen/kyc-components 2.47.2 → 2.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/adyen-kyc-components.es.js +1728 -929
- package/dist/es/{arrow-right-DF4Qe-8E.js → arrow-right-C4o8oS1C.js} +1 -1
- package/dist/es/{chevron-down-BzENwYSf.js → chevron-down-C8-1xmDI.js} +1 -1
- package/dist/es/chevron-left-DSyI3arz.js +11 -0
- package/dist/es/{chevron-right-DczMHcvL.js → chevron-right-BDZzxAre.js} +1 -1
- package/dist/es/{cross-BadGfrgB.js → cross-D-SQig6J.js} +1 -1
- package/dist/es/{download-DGC5_Bxe.js → download-COfxdarq.js} +1 -1
- package/dist/style.css +380 -2127
- package/dist/types/components/AdditionalInformation/VerifiedBusinessCard.d.ts +7 -0
- package/dist/types/components/AdditionalInformation/component/AdditionalInformationComponent.d.ts +1 -1
- package/dist/types/components/AdditionalInformation/types.d.ts +4 -0
- package/dist/types/components/BasicInformation/component/BasicInformationComponent.d.ts +1 -1
- package/dist/types/components/BasicInformation/types.d.ts +2 -8
- package/dist/types/components/BusinessDetails/component/BusinessDetailsComponent.d.ts +1 -0
- package/dist/types/components/BusinessDetails/forms.d.ts +1 -2
- package/dist/types/components/BusinessDetails/types.d.ts +15 -0
- package/dist/types/components/BusinessSelection/BusinessInformationCard.d.ts +16 -0
- package/dist/types/components/BusinessSelection/component/BusinessSelectionComponent.d.ts +3 -0
- package/dist/types/components/BusinessSelection/index.d.ts +1 -0
- package/dist/types/components/BusinessSelection/types.d.ts +25 -0
- package/dist/types/components/CompanyStructure/component/CompanyStructureComponent.d.ts +1 -1
- package/dist/types/components/CompanyStructure/types.d.ts +3 -0
- package/dist/types/components/Dropins/BusinessDetailsDropin/types.d.ts +2 -1
- package/dist/types/components/Dropins/DropinLayout/ActionBar/ActionBar.d.ts +1 -1
- package/dist/types/components/Dropins/DropinLayout/ActionBar/type.d.ts +1 -0
- package/dist/types/components/Dropins/FormNavigation/FormNavigation.d.ts +1 -2
- package/dist/types/components/Dropins/FormNavigation/index.d.ts +1 -1
- package/dist/types/components/Dropins/FormWrapper/FormWrapper.d.ts +3 -1
- package/dist/types/components/Individual/validators.d.ts +1 -2
- package/dist/types/components/RegistrationAddress/types.d.ts +2 -0
- package/dist/types/components/UIElement/UIElement.d.ts +22 -0
- package/dist/types/components/internal/Address/components/SearchAddress.d.ts +1 -1
- package/dist/types/components/internal/Address/types.d.ts +3 -0
- package/dist/types/components/internal/Alert/Alert.d.ts +1 -1
- package/dist/types/components/internal/Alert/types.d.ts +4 -7
- package/dist/types/components/internal/Card/Card.d.ts +1 -1
- package/dist/types/components/internal/Card/CardGroup.d.ts +1 -1
- package/dist/types/components/internal/Card/index.d.ts +2 -0
- package/dist/types/components/internal/Card/types.d.ts +2 -0
- package/dist/types/components/internal/DBANameField/DBANameField.d.ts +1 -1
- package/dist/types/components/internal/DBANameField/fieldConfig.d.ts +1 -0
- package/dist/types/components/internal/DBANameField/types.d.ts +1 -1
- package/dist/types/components/internal/Icon/Icon.d.ts +1 -0
- package/dist/types/components/internal/Link/Link.d.ts +1 -1
- package/dist/types/components/internal/Link/types.d.ts +0 -3
- package/dist/types/components/internal/Loader/Loader.d.ts +7 -9
- package/dist/types/components/internal/LoaderWrapper/LoaderWrapper.d.ts +1 -2
- package/dist/types/core/core.d.ts +1 -1
- package/dist/types/core/hooks/useBankConfigurationHandlers.d.ts +3 -1
- package/dist/types/core/hooks/useForm/reducer.d.ts +4 -2
- package/dist/types/core/hooks/useForm/types.d.ts +11 -0
- package/dist/types/core/hooks/useForm/useForm.d.ts +2 -1
- package/dist/types/core/hooks/useUnifyLoadingStatus.d.ts +2 -0
- package/dist/types/core/models/api/company-search.d.ts +1 -0
- package/dist/types/core/models/api/organization.d.ts +1 -0
- package/dist/types/core/models/country-code.d.ts +1 -0
- package/dist/types/core/process-field-configurations.d.ts +3 -2
- package/dist/types/utils/birth-date-utils.d.ts +11 -0
- package/dist/types/utils/mapping/componentApiMapping.d.ts +2 -1
- package/dist/types/utils/regex/patternValidators.d.ts +1 -1
- package/dist/types/utils/testing/IgnoreLocalStorage.d.ts +5 -0
- package/package.json +13 -2
- package/dist/types/components/UIElement.d.ts +0 -22
- package/dist/types/components/internal/Loader/index.d.ts +0 -2
- package/dist/types/components/internal/Spinner/Spinner.d.ts +0 -16
|
@@ -10,6 +10,7 @@ import type { AnyTLDSFieldName } from '../utils/getFieldsWithExistingData';
|
|
|
10
10
|
import type { ValidatorRules } from '../utils/validation/types';
|
|
11
11
|
import type { BaseOuterFormProps } from './hooks/useForm';
|
|
12
12
|
import type { Scenario } from './models/api/get-scenarios';
|
|
13
|
+
import type { LegalEntityTrustedFields } from './models/api/legal-entity';
|
|
13
14
|
import type { VerificationError } from './models/api/verification-error';
|
|
14
15
|
import type { CountryCode } from './models/country-code';
|
|
15
16
|
import type { Remediation } from './models/errors/remediation';
|
|
@@ -27,7 +28,7 @@ export declare function parsePayoutScenarios({ requiredFields, country, bankVeri
|
|
|
27
28
|
country: CountryCode;
|
|
28
29
|
bankVerificationAvailable: boolean | undefined;
|
|
29
30
|
}): Partial<FieldConfigurations<PayoutAccountSchema>>;
|
|
30
|
-
type PropsFromConfiguration<FormSchema> = Required<Pick<BaseOuterFormProps<FormSchema>, 'allFields' | 'verifyFields' | 'requiredFields' | 'placeholders' | 'helperText' | 'masks' | 'optionalFields' | 'labels' | 'obscuredFields'>> & {
|
|
31
|
+
type PropsFromConfiguration<FormSchema> = Required<Pick<BaseOuterFormProps<FormSchema>, 'allFields' | 'verifyFields' | 'requiredFields' | 'placeholders' | 'helperText' | 'masks' | 'optionalFields' | 'labels' | 'obscuredFields' | 'trustedFields'>> & {
|
|
31
32
|
validators: ValidatorRules<FormSchema>;
|
|
32
33
|
};
|
|
33
34
|
/**
|
|
@@ -70,5 +71,5 @@ type PropsFromConfiguration<FormSchema> = Required<Pick<BaseOuterFormProps<FormS
|
|
|
70
71
|
* }
|
|
71
72
|
* ```
|
|
72
73
|
*/
|
|
73
|
-
export declare function getPropsFromConfigurations<FormSchema extends object>(scenarioConfiguration: FieldConfigurations<FormSchema> | undefined, forms: FormList, remediationActions: Remediation[], dataMissingErrors: VerificationError[], fieldsWithExistingData: AnyTLDSFieldName[], customRules?: {}, customLabels?: {}, customValidators?: {}): PropsFromConfiguration<FormSchema> | undefined;
|
|
74
|
+
export declare function getPropsFromConfigurations<FormSchema extends object>(scenarioConfiguration: FieldConfigurations<FormSchema> | undefined, forms: FormList, remediationActions: Remediation[], dataMissingErrors: VerificationError[], fieldsWithExistingData: AnyTLDSFieldName[], customRules?: {}, customLabels?: {}, customValidators?: {}, legalEntityTrustedFields?: LegalEntityTrustedFields[]): PropsFromConfiguration<FormSchema> | undefined;
|
|
74
75
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PersonalDetailsSchema } from '../components/PersonalDetails/types';
|
|
2
|
+
import type { Translatable } from '../language/types';
|
|
3
|
+
export declare const getAgeToday: (birthdate: string) => number;
|
|
4
|
+
interface TranslatableAlertProps {
|
|
5
|
+
title: Translatable;
|
|
6
|
+
message: Translatable;
|
|
7
|
+
}
|
|
8
|
+
export declare const getLegalRepresentativeWarningMessage: ({ data: { birthDate, residencyCountry }, }: {
|
|
9
|
+
data: PersonalDetailsSchema;
|
|
10
|
+
}) => TranslatableAlertProps | undefined;
|
|
11
|
+
export {};
|
|
@@ -50,6 +50,7 @@ export declare const businessDetailsComponentsKeyMapping: {
|
|
|
50
50
|
'basicInformation.isUen': string;
|
|
51
51
|
'companyStructure.entityType': string;
|
|
52
52
|
'additionalInformation.legalCompanyName': string;
|
|
53
|
+
'additionalInformation.legalFormDescription': string;
|
|
53
54
|
'additionalInformation.dbaName': string;
|
|
54
55
|
'additionalInformation.registrationNumber': string;
|
|
55
56
|
'additionalInformation.taxInformation': string;
|
|
@@ -75,7 +76,7 @@ export declare const businessDetailsComponentsKeyMapping: {
|
|
|
75
76
|
'additionalInformation.exemptedFromVat': string;
|
|
76
77
|
};
|
|
77
78
|
export declare const businessDetailsApiKeyMapping: {
|
|
78
|
-
[x: string]: "companyRegistrationAddress.registrationAddress.postalCode" | "companyRegistrationAddress.registrationAddress.city" | "companyRegistrationAddress.registrationAddress.country" | "companyRegistrationAddress.registrationAddress.stateOrProvince" | "companyRegistrationAddress.registrationAddress.otherAddressInformation" | "companyRegistrationAddress.registrationAddress.address" | "companyRegistrationAddress.operationalAddress.postalCode" | "companyRegistrationAddress.operationalAddress.city" | "companyRegistrationAddress.operationalAddress.country" | "companyRegistrationAddress.operationalAddress.stateOrProvince" | "companyRegistrationAddress.operationalAddress.otherAddressInformation" | "companyRegistrationAddress.operationalAddress.address" | "companyStructure.entityType" | "basicInformation.country" | "basicInformation.stateOrProvince" | "basicInformation.registrationNumber" | "basicInformation.isUen" | "basicInformation.taxInformation" | "basicInformation.businessName" | "additionalInformation.legalCompanyName" | "additionalInformation.dateOfIncorporation" | "additionalInformation.vatAbsenceReason" | "additionalInformation.vatNumber" | "additionalInformation.registrationNumber" | "additionalInformation.stockExchangeMIC" | "additionalInformation.stockISIN" | "additionalInformation.stockTickerSymbol" | "additionalInformation.isUen" | "additionalInformation.taxInformation" | "additionalInformation.dbaName";
|
|
79
|
+
[x: string]: "companyRegistrationAddress.registrationAddress.postalCode" | "companyRegistrationAddress.registrationAddress.city" | "companyRegistrationAddress.registrationAddress.country" | "companyRegistrationAddress.registrationAddress.stateOrProvince" | "companyRegistrationAddress.registrationAddress.otherAddressInformation" | "companyRegistrationAddress.registrationAddress.address" | "companyRegistrationAddress.operationalAddress.postalCode" | "companyRegistrationAddress.operationalAddress.city" | "companyRegistrationAddress.operationalAddress.country" | "companyRegistrationAddress.operationalAddress.stateOrProvince" | "companyRegistrationAddress.operationalAddress.otherAddressInformation" | "companyRegistrationAddress.operationalAddress.address" | "companyStructure.entityType" | "basicInformation.country" | "basicInformation.stateOrProvince" | "basicInformation.registrationNumber" | "basicInformation.isUen" | "basicInformation.taxInformation" | "basicInformation.businessName" | "additionalInformation.legalCompanyName" | "additionalInformation.dateOfIncorporation" | "additionalInformation.vatAbsenceReason" | "additionalInformation.vatNumber" | "additionalInformation.registrationNumber" | "additionalInformation.stockExchangeMIC" | "additionalInformation.stockISIN" | "additionalInformation.stockTickerSymbol" | "additionalInformation.isUen" | "additionalInformation.taxInformation" | "additionalInformation.dbaName" | "additionalInformation.legalFormDescription";
|
|
79
80
|
};
|
|
80
81
|
export declare const companyComponentsKeyMapping: {
|
|
81
82
|
'companyNameAndCountry.country': string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ValidatorRule } from '../validation/types';
|
|
2
|
-
export declare const validateNotEmptyOnBlur: ValidatorRule<string | undefined, object>;
|
|
2
|
+
export declare const validateNotEmptyOnBlur: ValidatorRule<string | boolean | undefined, object>;
|
|
3
3
|
export declare const validatePatternOnBlur: <ValueType extends string | undefined, FormSchema>(pattern: RegExp) => ValidatorRule<ValueType, FormSchema>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/kyc-components",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"
|
|
3
|
+
"version": "2.48.0",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"adyen",
|
|
6
|
+
"adyen-kyc",
|
|
7
|
+
"platforms",
|
|
8
|
+
"components",
|
|
9
|
+
"onboarding",
|
|
10
|
+
"adyen-for-platforms",
|
|
11
|
+
"adyen-kyc-components",
|
|
12
|
+
"onboarding-components"
|
|
13
|
+
],
|
|
5
14
|
"license": "MIT",
|
|
6
15
|
"files": [
|
|
7
16
|
"./dist"
|
|
@@ -86,10 +95,12 @@
|
|
|
86
95
|
"@playwright/test": "1.41.0",
|
|
87
96
|
"@preact/preset-vite": "^2.8.1",
|
|
88
97
|
"@storybook/addon-actions": "^8.0.4",
|
|
98
|
+
"@storybook/addon-interactions": "^8.0.4",
|
|
89
99
|
"@storybook/addon-essentials": "^8.0.4",
|
|
90
100
|
"@storybook/core-server": "^8.0.4",
|
|
91
101
|
"@storybook/preact": "^8.0.4",
|
|
92
102
|
"@storybook/preact-vite": "^8.0.4",
|
|
103
|
+
"@storybook/test": "^8.0.4",
|
|
93
104
|
"@testing-library/jest-dom": "^5.17.0",
|
|
94
105
|
"@testing-library/preact": "^3.2.3",
|
|
95
106
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import '../style/_utilities.scss';
|
|
2
|
-
import type { JSX } from 'preact';
|
|
3
|
-
import type { EmptyObject } from 'type-fest';
|
|
4
|
-
import type { AuthProviderProps } from '../core/Context/AuthContext/AuthProvider';
|
|
5
|
-
import type { CoreProviderProps } from '../core/Context/CoreProvider';
|
|
6
|
-
import type { ExperimentsProps } from '../core/Context/ExperimentContext/types';
|
|
7
|
-
import type { ExpiryProviderProps } from '../core/Context/ExpiryContext/ExpiryContext';
|
|
8
|
-
import type { I18nProviderProps } from '../core/Context/I18nProvider/I18nProvider';
|
|
9
|
-
import type { SettingsProps } from '../core/Context/SettingsContext/types';
|
|
10
|
-
import type { UserEventCallback } from '../core/user-events';
|
|
11
|
-
import type { BaseElementProps } from './BaseElement';
|
|
12
|
-
import { BaseElement } from './BaseElement';
|
|
13
|
-
import type { ComponentMap } from './index';
|
|
14
|
-
export interface UIElementProps<ComponentProps extends object> extends BaseElementProps, CoreProviderProps, AuthProviderProps, I18nProviderProps, ExpiryProviderProps, SettingsProps, ExperimentsProps {
|
|
15
|
-
onUserEvent?: UserEventCallback;
|
|
16
|
-
component: (props: ComponentProps) => JSX.Element;
|
|
17
|
-
componentName: keyof ComponentMap;
|
|
18
|
-
componentProps: ComponentProps;
|
|
19
|
-
}
|
|
20
|
-
export declare class UIElement<ComponentProps extends object = EmptyObject> extends BaseElement<UIElementProps<ComponentProps>> {
|
|
21
|
-
render: () => JSX.Element;
|
|
22
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import './Spinner.scss';
|
|
2
|
-
export interface SpinnerProps {
|
|
3
|
-
/**
|
|
4
|
-
* Whether the spinner should be rendered inline
|
|
5
|
-
*/
|
|
6
|
-
inline?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* size of the spinner (small/medium/large)
|
|
9
|
-
*/
|
|
10
|
-
size?: 'small' | 'medium' | 'large';
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Default Loading Spinner
|
|
14
|
-
* @param props -
|
|
15
|
-
*/
|
|
16
|
-
export declare const Spinner: ({ inline, size }: SpinnerProps) => import("preact").JSX.Element;
|