@adyen/kyc-components 2.37.2 → 2.38.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 +390 -94
- package/dist/style.css +47 -0
- package/dist/types/components/CompanyLookup/CompanyLookupResultsHeader.d.ts +1 -1
- package/dist/types/components/CompanyLookup/CompanyLookupResultsList.d.ts +1 -1
- package/dist/types/components/CompanyLookup/LookupResult.d.ts +1 -1
- package/dist/types/components/CompanyLookup/types.d.ts +0 -5
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +1 -1
- package/dist/types/components/Dropins/types.d.ts +9 -0
- package/dist/types/components/SingpassSelection/index.d.ts +15 -0
- package/dist/types/components/SingpassSelection/types.d.ts +9 -0
- package/dist/types/components/TaskList/types.d.ts +2 -1
- package/dist/types/components/internal/FormFields/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroup/types.d.ts +0 -2
- package/dist/types/core/Context/ExperimentContext/types.d.ts +2 -1
- package/dist/types/core/hooks/singpass/useHasSeenSingpassSelection.d.ts +7 -0
- package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +0 -5
- package/dist/types/utils/regex/businessRegistrationNumberPatterns.d.ts +0 -6
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -99763,6 +99763,53 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
|
|
|
99763
99763
|
/* #endregion */
|
|
99764
99764
|
/* #region Inline components */
|
|
99765
99765
|
/* #endregion */
|
|
99766
|
+
.adyen-kyc-singpass-selection {
|
|
99767
|
+
max-width: 544px;
|
|
99768
|
+
}
|
|
99769
|
+
.adyen-kyc-singpass-selection__nav {
|
|
99770
|
+
margin-top: 32px;
|
|
99771
|
+
}
|
|
99772
|
+
.adyen-kyc-singpass-selection__confirm {
|
|
99773
|
+
display: flex;
|
|
99774
|
+
gap: 16px;
|
|
99775
|
+
margin-top: 32px;
|
|
99776
|
+
}
|
|
99777
|
+
.adyen-kyc-singpass-selection__confirm button {
|
|
99778
|
+
flex-grow: 1;
|
|
99779
|
+
}
|
|
99780
|
+
|
|
99781
|
+
.adyen-kyc-setup-singpass-container {
|
|
99782
|
+
width: 143px;
|
|
99783
|
+
}
|
|
99784
|
+
|
|
99785
|
+
.adyen-kyc-setup-manual-container {
|
|
99786
|
+
width: 99px;
|
|
99787
|
+
}
|
|
99788
|
+
|
|
99789
|
+
.adyen-kyc-singpass-logo-container {
|
|
99790
|
+
width: 92px;
|
|
99791
|
+
}/* #region Spacing */
|
|
99792
|
+
/* #endregion */
|
|
99793
|
+
/* #region Colors */
|
|
99794
|
+
/* #endregion */
|
|
99795
|
+
/* #region Fonts */
|
|
99796
|
+
/* #endregion */
|
|
99797
|
+
/* #region Borders */
|
|
99798
|
+
/* #endregion */
|
|
99799
|
+
/* #region Box-shadow */
|
|
99800
|
+
/* #endregion */
|
|
99801
|
+
/* #region Shadows */
|
|
99802
|
+
/* #endregion */
|
|
99803
|
+
/* #region Z-index */
|
|
99804
|
+
/* #endregion */
|
|
99805
|
+
/* #region Transition */
|
|
99806
|
+
/* #endregion */
|
|
99807
|
+
/* #region Timing functions */
|
|
99808
|
+
/* #endregion */
|
|
99809
|
+
/* #region Focus ring */
|
|
99810
|
+
/* #endregion */
|
|
99811
|
+
/* #region Inline components */
|
|
99812
|
+
/* #endregion */
|
|
99766
99813
|
/* stylelint-disable-line scss/dollar-variable-pattern */
|
|
99767
99814
|
/* stylelint-disable-line scss/dollar-variable-pattern */
|
|
99768
99815
|
/* stylelint-disable-line scss/dollar-variable-pattern */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CompanyLookupResultsHeaderProps } from './types';
|
|
2
|
-
export declare const CompanyLookupResultsHeader: ({ results, status,
|
|
2
|
+
export declare const CompanyLookupResultsHeader: ({ results, status, hasInternalError, selectedCompanyId, verifiedCompany, retrySearch, reset, }: CompanyLookupResultsHeaderProps) => import("preact").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CompanyLookupResultsListProps } from './types';
|
|
2
|
-
export declare const CompanyLookupResultsList: ({ results, selectedCompanyId, status,
|
|
2
|
+
export declare const CompanyLookupResultsList: ({ results, selectedCompanyId, status, hasInternalError, tin, verifiedCompany, verify, }: CompanyLookupResultsListProps) => import("preact").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './LookupResult.scss';
|
|
2
2
|
import { LookupResultProps } from './types';
|
|
3
|
-
export declare const LookupResult: ({ classes,
|
|
3
|
+
export declare const LookupResult: ({ classes, option, status, isSelected, isInvalid, isVerified, isError, tin, verifiedCompany, onSelect, }: LookupResultProps) => import("preact").JSX.Element;
|
|
@@ -5,7 +5,6 @@ import type { CountryCode } from '../../core/models/country-code';
|
|
|
5
5
|
import type { ProvinceCode } from '../../core/models/province-code';
|
|
6
6
|
import type { StateCode } from '../../core/models/state-code';
|
|
7
7
|
import type { BaseTrackingPayload } from '../../core/utils';
|
|
8
|
-
import type Language from '../../language';
|
|
9
8
|
import type { ValidatorMode } from '../../utils/validation/types';
|
|
10
9
|
import type { CompanyBasicsSchema } from '../CompanyBasics/types';
|
|
11
10
|
import type { CompanySearchSchema } from '../CompanySearch/types';
|
|
@@ -15,12 +14,10 @@ export interface LookupResultBodyProps {
|
|
|
15
14
|
address: string | undefined;
|
|
16
15
|
}
|
|
17
16
|
export interface LookupResultAlertProps {
|
|
18
|
-
i18n: Language;
|
|
19
17
|
type: 'verified' | 'warning' | 'error';
|
|
20
18
|
}
|
|
21
19
|
export interface LookupResultProps {
|
|
22
20
|
classes: string;
|
|
23
|
-
i18n: Language;
|
|
24
21
|
option: CompanySearchResult;
|
|
25
22
|
status: HookStatus;
|
|
26
23
|
isSelected: boolean;
|
|
@@ -34,7 +31,6 @@ export interface LookupResultProps {
|
|
|
34
31
|
export interface CompanyLookupResultsHeaderProps {
|
|
35
32
|
results: readonly CompanySearchResult[] | undefined;
|
|
36
33
|
status: HookStatus;
|
|
37
|
-
i18n: Language;
|
|
38
34
|
hasInternalError: boolean;
|
|
39
35
|
selectedCompanyId: string | undefined;
|
|
40
36
|
verifiedCompany: CompanyDatasetResponse | undefined;
|
|
@@ -45,7 +41,6 @@ export interface CompanyLookupResultsListProps {
|
|
|
45
41
|
results: readonly CompanySearchResult[];
|
|
46
42
|
selectedCompanyId: string | undefined;
|
|
47
43
|
status: HookStatus;
|
|
48
|
-
i18n: Language;
|
|
49
44
|
hasInternalError: boolean;
|
|
50
45
|
tin: string | undefined;
|
|
51
46
|
verifiedCompany: CompanyDatasetResponse | undefined;
|
|
@@ -11,7 +11,7 @@ export interface ServiceAgreementAcceptanceInfo {
|
|
|
11
11
|
type: ServiceAgreementType;
|
|
12
12
|
}
|
|
13
13
|
export interface ServiceAgreementAcceptanceInfoWithName extends ServiceAgreementAcceptanceInfo {
|
|
14
|
-
acceptedByName
|
|
14
|
+
acceptedByName: string;
|
|
15
15
|
}
|
|
16
16
|
export interface ServiceAgreementSchema {
|
|
17
17
|
signer?: string;
|
|
@@ -16,6 +16,13 @@ import { TranslationKey } from '../../language/types';
|
|
|
16
16
|
import EventEmitter from '../EventEmitter';
|
|
17
17
|
import { TaskTypes } from '../TaskList/types';
|
|
18
18
|
import type { BasicComponentProps } from '../UIElement';
|
|
19
|
+
interface SingpassLinkResponseItem {
|
|
20
|
+
authUrl: string;
|
|
21
|
+
success: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface SingpassLinkResponse {
|
|
24
|
+
item: SingpassLinkResponseItem;
|
|
25
|
+
}
|
|
19
26
|
export interface DropinComposerProps extends DropinAPIHandlers, BasicComponentProps {
|
|
20
27
|
capabilities?: CapabilityName[];
|
|
21
28
|
legalEntityResponse: ExistingLegalEntity;
|
|
@@ -58,6 +65,7 @@ export interface DropinAPIHandlers {
|
|
|
58
65
|
handleVerifyTin?(data: TinVerificationRequest): Promise<TinVerificationResponse>;
|
|
59
66
|
handleGetOnboardingStatus?(): Promise<OnboardingStatusResponse>;
|
|
60
67
|
handleGenerateOnboardingLink?(config: OnboardingLinkConfig): Promise<OnboardingLinkResponse>;
|
|
68
|
+
handleOpenSingpassAuthorizationLink?(): Promise<SingpassLinkResponse>;
|
|
61
69
|
}
|
|
62
70
|
export interface DropinProps {
|
|
63
71
|
legalEntityResponse?: ExistingLegalEntity;
|
|
@@ -73,3 +81,4 @@ export interface DropinProps {
|
|
|
73
81
|
taskType?: TaskTypes;
|
|
74
82
|
taskName?: TranslationKey;
|
|
75
83
|
}
|
|
84
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './_singpass-selection.component.scss';
|
|
2
|
+
import type { JSX } from 'preact';
|
|
3
|
+
import { TranslationKey } from '../../language/types';
|
|
4
|
+
import { SetUpAccountMethodProps, SetupAccountMethodSchema } from './types';
|
|
5
|
+
export declare const setupAccountMethodFields: Array<keyof SetupAccountMethodSchema>;
|
|
6
|
+
export interface SetupAccountMetadata {
|
|
7
|
+
name: TranslationKey;
|
|
8
|
+
description: TranslationKey;
|
|
9
|
+
icon: JSX.Element;
|
|
10
|
+
provider?: {
|
|
11
|
+
name: string;
|
|
12
|
+
icon: JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const SingpassSelection: (props: SetUpAccountMethodProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BaseInnerFormProps } from '../../core/hooks/useForm';
|
|
2
|
+
export declare const setupAccountMethods: readonly ["singpass", "manual"];
|
|
3
|
+
export type SetupAccountMethod = (typeof setupAccountMethods)[number];
|
|
4
|
+
export interface SetupAccountMethodSchema {
|
|
5
|
+
setupAccountMethod: SetupAccountMethod | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface SetUpAccountMethodProps extends BaseInnerFormProps<SetupAccountMethodSchema> {
|
|
8
|
+
handleNextClick: (setupAccountMethod: SetupAccountMethod | undefined) => void;
|
|
9
|
+
}
|
|
@@ -28,7 +28,8 @@ export declare enum TaskTypes {
|
|
|
28
28
|
TRUST_MEMBER_COMPANY_OWNER = "TRUST_MEMBER_COMPANY_OWNER",
|
|
29
29
|
SOLE_PROPRIETOR_COMPANY = "SOLE_PROPRIETOR_COMPANY",
|
|
30
30
|
LEGAL_ENTITY_TYPE_SWITCHER = "LEGAL_ENTITY_TYPE_SWITCHER",
|
|
31
|
-
CAPABILITY_REJECTED = "CAPABILITY_REJECTED"
|
|
31
|
+
CAPABILITY_REJECTED = "CAPABILITY_REJECTED",
|
|
32
|
+
SINGPASS_SELECTION = "SINGPASS_SELECTION"
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
35
|
* Order of TaskStatus enums are used to define the priority of the statuses
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './RadioGroup.scss';
|
|
2
2
|
import { RadioGroupProps } from './types';
|
|
3
|
-
export default function RadioGroup({ items,
|
|
3
|
+
export default function RadioGroup({ items, name, onChange, value, isInvalid, uniqueId, className, disabled, }: RadioGroupProps): import("preact").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TargetedEvent } from 'preact/compat';
|
|
2
|
-
import Language from '../../../../language/Language';
|
|
3
2
|
import { TranslationKey } from '../../../../language/types';
|
|
4
3
|
interface RadioGroupItem {
|
|
5
4
|
name: TranslationKey;
|
|
@@ -9,7 +8,6 @@ export interface RadioGroupProps {
|
|
|
9
8
|
className?: string;
|
|
10
9
|
isInvalid?: boolean;
|
|
11
10
|
items: readonly RadioGroupItem[];
|
|
12
|
-
i18n: Language;
|
|
13
11
|
name?: string;
|
|
14
12
|
onChange: (e: TargetedEvent<HTMLInputElement>) => void;
|
|
15
13
|
value?: string;
|
|
@@ -8,7 +8,8 @@ export declare enum ExperimentNames {
|
|
|
8
8
|
EnableNewEntryFlow = "EnableNewEntryFlow",
|
|
9
9
|
AllowOrganizationSettlorWithExemptionReason = "AllowOrganizationSettlorWithExemptionReason",
|
|
10
10
|
AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
|
|
11
|
-
ShowUnsupportedEntityType = "ShowUnsupportedEntityType"
|
|
11
|
+
ShowUnsupportedEntityType = "ShowUnsupportedEntityType",
|
|
12
|
+
ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies"
|
|
12
13
|
}
|
|
13
14
|
export type ExperimentName = `${ExperimentNames}`;
|
|
14
15
|
export type Experiments = {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface UseHasSeenSingpassSelectionProps {
|
|
2
|
+
legalEntityId: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const useHasSeenSingpassSelection: ({ legalEntityId, }: UseHasSeenSingpassSelectionProps) => {
|
|
5
|
+
hasSeenSingpassSelection: boolean;
|
|
6
|
+
setHasSeenSingpassSelection: import("preact/hooks").StateUpdater<boolean>;
|
|
7
|
+
};
|
|
@@ -126,9 +126,6 @@ export declare const businessRegistrationNumberPatterns: {
|
|
|
126
126
|
PT: {
|
|
127
127
|
default: RegExp;
|
|
128
128
|
};
|
|
129
|
-
PR: {
|
|
130
|
-
default: RegExp;
|
|
131
|
-
};
|
|
132
129
|
RO: {
|
|
133
130
|
default: RegExp;
|
|
134
131
|
};
|
|
@@ -154,7 +151,4 @@ export declare const businessRegistrationNumberPatterns: {
|
|
|
154
151
|
default: RegExp;
|
|
155
152
|
nonProfit: RegExp;
|
|
156
153
|
};
|
|
157
|
-
US: {
|
|
158
|
-
default: RegExp;
|
|
159
|
-
};
|
|
160
154
|
};
|