@adyen/kyc-components 2.46.1 → 2.47.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 +796 -357
- package/dist/style.css +836 -1264
- package/dist/types/components/Company/trustedFields.d.ts +7 -0
- package/dist/types/components/Dropins/CompanyDropin/components/CompanyDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/CompanyDropin/types.d.ts +2 -0
- package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureParentCompany.d.ts +1 -1
- package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureUltimateParentCompany.d.ts +1 -1
- package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureBusinessInformation.d.ts +2 -1
- package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureOwnershipStructure.d.ts +4 -0
- package/dist/types/components/Dropins/HighExposureDropin/types.d.ts +80 -7
- package/dist/types/components/Dropins/HighExposureDropin/validate.d.ts +4 -1
- package/dist/types/components/EmbeddedDropins/UpdateLegalEntityForHighExposure/UpdateLegalEntityForHighExposure.d.ts +1 -1
- package/dist/types/components/Individual/types.d.ts +1 -1
- package/dist/types/components/internal/LegalFormField/LegalFormField.d.ts +1 -1
- package/dist/types/components/internal/LegalFormField/types.d.ts +4 -1
- package/dist/types/components/internal/NaceCodeField/NaceCodeField.d.ts +1 -1
- package/dist/types/components/internal/NaceCodeField/types.d.ts +5 -1
- package/dist/types/components/internal/Spinner/Spinner.d.ts +3 -4
- package/dist/types/components/internal/Tag/Tag.d.ts +6 -5
- package/dist/types/components/internal/Toast/types.d.ts +1 -1
- package/dist/types/components/internal/Typography/Typography.d.ts +3 -0
- package/dist/types/components/internal/Typography/types.d.ts +12 -0
- package/dist/types/core/models/api/legal-entity.d.ts +6 -0
- package/dist/types/core/models/api/trusted-fields-provider.d.ts +4 -0
- package/dist/types/utils/get-props.d.ts +0 -9
- package/dist/types/utils/roleMetadata.d.ts +3 -2
- package/package.json +1 -1
- package/dist/types/components/internal/Heading/Heading.d.ts +0 -10
- package/dist/types/components/internal/Spinner/index.d.ts +0 -1
- package/dist/types/components/internal/Tag/index.d.ts +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LegalEntityTrustedFields } from '../../core/models/api/legal-entity';
|
|
2
|
+
import type { TrustedFieldsProvider } from '../../core/models/api/trusted-fields-provider';
|
|
3
|
+
export declare const trustedFields: ({ fields, trustedFieldsProvider, apiMapping, }: {
|
|
4
|
+
fields?: LegalEntityTrustedFields[];
|
|
5
|
+
trustedFieldsProvider?: TrustedFieldsProvider;
|
|
6
|
+
apiMapping?: Record<string, string>;
|
|
7
|
+
}) => Record<string, string[]>;
|
|
@@ -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, }: 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, trustedFieldsProvider, }: CompanyDropinProps): import("preact").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
|
|
2
|
+
import type { TrustedFieldsProvider } from '../../../core/models/api/trusted-fields-provider';
|
|
2
3
|
import type { CompanyProps, CompanySchema } from '../../Company/types';
|
|
3
4
|
import type { TrustMember } from '../../TrustMembers/types';
|
|
4
5
|
import type { DropinAPIHandlers, DropinProps } from '../types';
|
|
@@ -7,4 +8,5 @@ export interface CompanyDropinProps extends Omit<CompanyProps, 'isTopLevelEntity
|
|
|
7
8
|
associationDetail?: TrustMember;
|
|
8
9
|
isTargetLegalEntityType?: boolean;
|
|
9
10
|
onSubmit?: (company: CompanySchema) => void;
|
|
11
|
+
trustedFieldsProvider?: TrustedFieldsProvider;
|
|
10
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { HighExposureParentCompanyDetailsProps, HighExposureParentCompanySchema } from '../types';
|
|
2
2
|
export declare const highExposureParentCompanyDetailsFields: Array<keyof HighExposureParentCompanySchema>;
|
|
3
|
-
declare function AdditionalFieldsForHighExposureParentCompany(
|
|
3
|
+
declare function AdditionalFieldsForHighExposureParentCompany(props: HighExposureParentCompanyDetailsProps): import("preact").JSX.Element;
|
|
4
4
|
export default AdditionalFieldsForHighExposureParentCompany;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { HighExposureUltimateParentCompanyDetailsProps, HighExposureUltimateParentCompanySchema } from '../types';
|
|
2
2
|
export declare const highExposureUltimateParentCompanyDetailsFields: Array<keyof HighExposureUltimateParentCompanySchema>;
|
|
3
|
-
declare function AdditionalFieldsForHighExposureUltimateParentCompany(
|
|
3
|
+
declare function AdditionalFieldsForHighExposureUltimateParentCompany(props: HighExposureUltimateParentCompanyDetailsProps): import("preact").JSX.Element;
|
|
4
4
|
export default AdditionalFieldsForHighExposureUltimateParentCompany;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import './styles.scss';
|
|
1
2
|
import type { HighExposureBusinessInformationProps } from '../types';
|
|
2
|
-
declare function HighExposureBusinessInformation({ formUtils, data, valid, errors, fieldProblems, handleChangeFor, country, }: HighExposureBusinessInformationProps): import("preact").JSX.Element;
|
|
3
|
+
declare function HighExposureBusinessInformation({ formUtils, data, valid, errors, fieldProblems, handleChangeFor, country, fieldMapping, targetPage, sectionHeading, }: HighExposureBusinessInformationProps): import("preact").JSX.Element;
|
|
3
4
|
export default HighExposureBusinessInformation;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import './styles.scss';
|
|
2
|
+
import { type HighExposureOwnershipStructureProps } from '../types';
|
|
3
|
+
declare function HighExposureOwnershipStructure({ formUtils, data, valid, errors, fieldProblems, handleChangeFor, legalEntity, }: HighExposureOwnershipStructureProps): import("preact").JSX.Element;
|
|
4
|
+
export default HighExposureOwnershipStructure;
|
|
@@ -3,6 +3,7 @@ import type { CapabilityName } from '../../../core/models/api/capability';
|
|
|
3
3
|
import type { ExistingLegalEntity, LegalEntity } from '../../../core/models/api/legal-entity';
|
|
4
4
|
import type { CountryCode } from '../../../core/models/country-code';
|
|
5
5
|
import type { FormModel } from '../../../core/models/form';
|
|
6
|
+
import type { Translatable, TranslationKey } from '../../../language/types';
|
|
6
7
|
import type { FormUtils } from '../../../utils/formUtils';
|
|
7
8
|
import type { ValidationRuleResult, ValidatorMode } from '../../../utils/validation/types';
|
|
8
9
|
import type { DropinProps } from '../types';
|
|
@@ -11,13 +12,38 @@ export interface HighExposureCompanySchema {
|
|
|
11
12
|
numberOfEmployees?: number;
|
|
12
13
|
legalForm?: string;
|
|
13
14
|
naceCode?: string;
|
|
15
|
+
doesTheCompanyEarnMoreThanHalf?: string;
|
|
16
|
+
doesYourCompanyHaveLEI?: string;
|
|
17
|
+
legalEntityIdentifier?: string;
|
|
18
|
+
isCompanyOwnedByAnotherCompany?: string;
|
|
19
|
+
isParentOwnedByAnotherCompany?: string;
|
|
14
20
|
}
|
|
15
|
-
export type HighExposureParentCompanySchema =
|
|
16
|
-
|
|
21
|
+
export type HighExposureParentCompanySchema = {
|
|
22
|
+
country?: CountryCode;
|
|
23
|
+
parentLegalName?: string;
|
|
24
|
+
parentNumberOfEmployees?: number;
|
|
25
|
+
parentLegalForm?: string;
|
|
26
|
+
parentNaceCode?: string;
|
|
27
|
+
doesTheParentCompanyEarnMoreThanHalf?: string;
|
|
28
|
+
doesYourParentCompanyHaveLEI?: string;
|
|
29
|
+
parentLegalEntityIdentifier?: string;
|
|
30
|
+
doesNotKnowParentNumberOfEmployees?: boolean;
|
|
31
|
+
};
|
|
32
|
+
export type HighExposureUltimateParentCompanySchema = {
|
|
33
|
+
country?: CountryCode;
|
|
34
|
+
ultimateParentLegalName?: string;
|
|
35
|
+
ultimateParentNumberOfEmployees?: number;
|
|
36
|
+
ultimateParentLegalForm?: string;
|
|
37
|
+
ultimateParentNaceCode?: string;
|
|
38
|
+
doesTheUltimateParentCompanyEarnMoreThanHalf?: string;
|
|
39
|
+
doesYourUltimateParentCompanyHaveLEI?: string;
|
|
40
|
+
ultimateParentLegalEntityIdentifier?: string;
|
|
41
|
+
doesNotKnowUltimateParentNumberOfEmployees?: boolean;
|
|
42
|
+
};
|
|
17
43
|
export interface HighExposureSchema {
|
|
18
44
|
company?: HighExposureCompanySchema;
|
|
19
45
|
parentCompany?: HighExposureParentCompanySchema;
|
|
20
|
-
ultimateParentCompany?:
|
|
46
|
+
ultimateParentCompany?: HighExposureUltimateParentCompanySchema;
|
|
21
47
|
}
|
|
22
48
|
export interface HighExposureDropinProps extends BaseOuterFormProps<HighExposureSchema> {
|
|
23
49
|
capabilities?: CapabilityName[];
|
|
@@ -25,25 +51,72 @@ export interface HighExposureDropinProps extends BaseOuterFormProps<HighExposure
|
|
|
25
51
|
forms?: FormModel[];
|
|
26
52
|
country: CountryCode;
|
|
27
53
|
legalEntityId: ExistingLegalEntity['id'];
|
|
54
|
+
legalEntity?: ExistingLegalEntity;
|
|
28
55
|
}
|
|
29
56
|
export interface HighExposureProps extends HighExposureDropinProps, DropinProps {
|
|
30
57
|
legalEntityId: ExistingLegalEntity['id'];
|
|
31
|
-
legalEntity?:
|
|
58
|
+
legalEntity?: ExistingLegalEntity;
|
|
32
59
|
parentLegalEntity?: ExistingLegalEntity;
|
|
33
60
|
onSubmit?: (data: HighExposureSchema) => void;
|
|
34
61
|
}
|
|
35
62
|
export interface HighExposureCompanyDetailsProps extends BaseInnerFormProps<HighExposureCompanySchema> {
|
|
36
63
|
country: CountryCode;
|
|
37
64
|
legalEntityId: string;
|
|
65
|
+
legalEntity?: ExistingLegalEntity;
|
|
66
|
+
}
|
|
67
|
+
export interface HighExposureParentCompanyDetailsProps extends BaseInnerFormProps<HighExposureParentCompanySchema> {
|
|
68
|
+
country: CountryCode;
|
|
69
|
+
legalEntityId: string;
|
|
70
|
+
legalEntity?: ExistingLegalEntity;
|
|
38
71
|
}
|
|
39
|
-
export
|
|
40
|
-
export type HighExposureUltimateParentCompanyDetailsProps = HighExposureCompanyDetailsProps;
|
|
41
|
-
export interface HighExposureBusinessInformationProps extends BaseInnerFormProps<HighExposureCompanySchema> {
|
|
72
|
+
export interface HighExposureUltimateParentCompanyDetailsProps extends BaseInnerFormProps<HighExposureUltimateParentCompanySchema> {
|
|
42
73
|
country: CountryCode;
|
|
74
|
+
legalEntityId: string;
|
|
75
|
+
legalEntity?: ExistingLegalEntity;
|
|
76
|
+
}
|
|
77
|
+
export type HighExposureSchemaCombined = HighExposureCompanySchema & HighExposureParentCompanySchema & HighExposureUltimateParentCompanySchema;
|
|
78
|
+
export declare enum HighExposurePagesEnums {
|
|
79
|
+
COMPANY_PAGE = "COMPANY_PAGE",
|
|
80
|
+
PARENT_COMPANY_PAGE = "PARENT_COMPANY_PAGE",
|
|
81
|
+
ULTIMATE_PARENT_COMPANY_PAGE = "ULTIMATE_PARENT_COMPANY_PAGE"
|
|
82
|
+
}
|
|
83
|
+
type HighExposureSchemaKeys = keyof HighExposureCompanySchema | keyof HighExposureParentCompanySchema | keyof HighExposureUltimateParentCompanySchema;
|
|
84
|
+
export type HighExposureBusinessInformationProps = {
|
|
85
|
+
country: CountryCode;
|
|
86
|
+
data: Partial<HighExposureSchemaCombined>;
|
|
87
|
+
valid: Partial<Record<keyof HighExposureSchemaCombined, boolean>>;
|
|
88
|
+
errors: Partial<Record<keyof HighExposureSchemaCombined, ValidationRuleResult | null>>;
|
|
89
|
+
fieldProblems: Partial<Record<keyof HighExposureSchemaCombined, boolean>>;
|
|
90
|
+
handleChangeFor: (key: keyof HighExposureSchemaCombined, mode?: ValidatorMode) => (e: any) => void;
|
|
91
|
+
formUtils: FormUtils<HighExposureSchemaCombined>;
|
|
92
|
+
targetPage: HighExposurePagesEnums;
|
|
93
|
+
fieldMapping: FieldMapping;
|
|
94
|
+
sectionHeading?: Translatable;
|
|
95
|
+
};
|
|
96
|
+
export type FieldMapping = Partial<Record<string, HighExposureSchemaKeys>>;
|
|
97
|
+
export type HighExposureCustomLabels = {
|
|
98
|
+
[K in keyof HighExposureSchema]?: Partial<Record<keyof NonNullable<HighExposureSchema[K]>, Translatable>>;
|
|
99
|
+
};
|
|
100
|
+
export interface HighExposureOwnershipStructureProps extends BaseInnerFormProps<HighExposureCompanySchema> {
|
|
43
101
|
data: HighExposureCompanySchema;
|
|
44
102
|
valid: Record<keyof HighExposureCompanySchema, boolean>;
|
|
45
103
|
formUtils: FormUtils<HighExposureCompanySchema>;
|
|
46
104
|
errors: Record<keyof HighExposureCompanySchema, ValidationRuleResult | null>;
|
|
47
105
|
fieldProblems: Record<keyof HighExposureCompanySchema, boolean>;
|
|
48
106
|
handleChangeFor: (key: keyof HighExposureCompanySchema, mode?: ValidatorMode) => (e: any) => void;
|
|
107
|
+
legalEntity?: LegalEntity;
|
|
108
|
+
}
|
|
109
|
+
export declare enum HighExposureRadioIds {
|
|
110
|
+
YES = "Yes",
|
|
111
|
+
NO = "No",
|
|
112
|
+
I_DONT_KNOW = "I don't know"
|
|
49
113
|
}
|
|
114
|
+
export declare const highExposureRadioItems: Array<{
|
|
115
|
+
id: HighExposureRadioIds;
|
|
116
|
+
name: TranslationKey;
|
|
117
|
+
}>;
|
|
118
|
+
export declare const highExposureParentRadioItems: Array<{
|
|
119
|
+
id: HighExposureRadioIds;
|
|
120
|
+
name: TranslationKey;
|
|
121
|
+
}>;
|
|
122
|
+
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { ValidatorRules } from '../../../utils/validation/types';
|
|
2
|
-
import type { HighExposureCompanySchema } from './types';
|
|
2
|
+
import type { HighExposureCompanySchema, HighExposureParentCompanySchema, HighExposureUltimateParentCompanySchema } from './types';
|
|
3
|
+
export declare const validateLegalEntityIdentifier: (legalEntityIdentifier: string | null | undefined, doesYourCompanyHaveLEI?: string, isDisabled?: boolean) => boolean;
|
|
3
4
|
export declare const highExposureCompanyDetailsValidations: ValidatorRules<HighExposureCompanySchema>;
|
|
5
|
+
export declare const highExposureParentCompanyDetailsValidations: ValidatorRules<HighExposureParentCompanySchema>;
|
|
6
|
+
export declare const highExposureUltimateParentCompanyDetailsValidations: ValidatorRules<HighExposureUltimateParentCompanySchema>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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;
|
|
2
|
+
export declare function UpdateLegalEntityForHighExposure({ parentLegalEntity, capabilities, country, trackingConfig, problems: problemsProp, onSubmit: externalOnSubmit, onChange, hideDropinLayout, handleHomeClick, homeButtonLabel, legalEntityId, legalEntity: legalEntityProps, }: HighExposureProps): import("preact").JSX.Element;
|
|
@@ -49,4 +49,4 @@ export interface IndividualDropinProps extends Omit<IndividualProps, 'legalEntit
|
|
|
49
49
|
country: CountryCode;
|
|
50
50
|
onSubmit?(dataSubmitted: IndividualSchema): void;
|
|
51
51
|
}
|
|
52
|
-
export type IndividualDropinApiHandlers = Pick<Required<DropinAPIHandlers>, 'handleCreateDocument' | 'handleGetDocument' | 'handleUpdateDocument' | 'handleUpdateLegalEntity'> & Pick<DropinAPIHandlers, 'handleGetIdVerificationToken' | 'handleAddressSearch' | 'handleFindAddress' | 'handleGetIdVerificationStartCheck' | 'handleCreateLegalEntity'>;
|
|
52
|
+
export type IndividualDropinApiHandlers = Pick<Required<DropinAPIHandlers>, 'handleCreateDocument' | 'handleGetDocument' | 'handleUpdateDocument' | 'handleUpdateLegalEntity'> & Pick<DropinAPIHandlers, 'handleGetIdVerificationToken' | 'handleAddressSearch' | 'handleFindAddress' | 'handleGetIdVerificationStartCheck' | 'handleCreateLegalEntity' | 'handleOpenSingpassAuthorizationLink'>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LegalFormFieldProps, LegalFormFieldSchema } from './types';
|
|
2
2
|
export declare const LEGAL_FORM_FIELD: Array<keyof LegalFormFieldSchema>;
|
|
3
|
-
export declare function LegalFormField({ name, data, valid,
|
|
3
|
+
export declare function LegalFormField({ name, data, valid, errorMessage, label, readonly, handleChangeFor, helperText, countryCode, classNameModifiers, }: LegalFormFieldProps): import("preact").JSX.Element;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { JSX } from 'preact';
|
|
1
2
|
import type { BaseFormFieldProps } from '../../../core/hooks/useForm';
|
|
2
3
|
import type { CountryCode } from '../../../core/models/country-code';
|
|
3
4
|
export interface LegalFormFieldSchema {
|
|
4
5
|
legalForm?: string;
|
|
5
6
|
}
|
|
6
|
-
export interface LegalFormFieldProps extends BaseFormFieldProps<LegalFormFieldSchema> {
|
|
7
|
+
export interface LegalFormFieldProps extends Omit<BaseFormFieldProps<LegalFormFieldSchema>, 'errors' | 'labels'> {
|
|
8
|
+
errorMessage?: string | boolean | JSX.Element | null;
|
|
7
9
|
countryCode?: CountryCode;
|
|
10
|
+
label?: string;
|
|
8
11
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { NaceCodeFieldProps, NaceCodeFieldSchema } from './types';
|
|
2
2
|
export declare const NACE_CODE_FIELD: Array<keyof NaceCodeFieldSchema>;
|
|
3
|
-
export declare function NaceCodeField({ name, data, valid,
|
|
3
|
+
export declare function NaceCodeField({ name, data, valid, errorMessage, label, readonly, handleChangeFor, helperText, classNameModifiers, }: NaceCodeFieldProps): import("preact").JSX.Element;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import type { JSX } from 'preact';
|
|
1
2
|
import type { BaseFormFieldProps } from '../../../core/hooks/useForm';
|
|
2
3
|
export interface NaceCodeFieldSchema {
|
|
3
4
|
naceCode?: string;
|
|
4
5
|
}
|
|
5
|
-
export
|
|
6
|
+
export interface NaceCodeFieldProps extends Omit<BaseFormFieldProps<NaceCodeFieldSchema>, 'errors' | 'labels'> {
|
|
7
|
+
errorMessage?: string | boolean | JSX.Element | null;
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './Spinner.scss';
|
|
2
|
-
interface SpinnerProps {
|
|
2
|
+
export interface SpinnerProps {
|
|
3
3
|
/**
|
|
4
4
|
* Whether the spinner should be rendered inline
|
|
5
5
|
*/
|
|
@@ -7,11 +7,10 @@ interface SpinnerProps {
|
|
|
7
7
|
/**
|
|
8
8
|
* size of the spinner (small/medium/large)
|
|
9
9
|
*/
|
|
10
|
-
size?:
|
|
10
|
+
size?: 'small' | 'medium' | 'large';
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Default Loading Spinner
|
|
14
14
|
* @param props -
|
|
15
15
|
*/
|
|
16
|
-
declare const Spinner: ({ inline, size }: SpinnerProps) => import("preact").JSX.Element;
|
|
17
|
-
export default Spinner;
|
|
16
|
+
export declare const Spinner: ({ inline, size }: SpinnerProps) => import("preact").JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import './_tag.component.scss';
|
|
2
2
|
import '../Button/_button.component.scss';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
3
|
+
import type { ComponentChildren } from 'preact';
|
|
4
|
+
export type TagVariant = 'grey' | 'teal' | 'red' | 'green' | 'orange' | 'blue';
|
|
5
|
+
export interface TagProps {
|
|
5
6
|
className?: string;
|
|
6
|
-
|
|
7
|
+
variant?: TagVariant;
|
|
8
|
+
children: ComponentChildren;
|
|
7
9
|
}
|
|
8
|
-
declare const Tag:
|
|
9
|
-
export default Tag;
|
|
10
|
+
export declare const Tag: ({ className, variant, children }: TagProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
export interface TypographyProps {
|
|
3
|
+
el?: TypographyElement;
|
|
4
|
+
variant?: TypographyVariant;
|
|
5
|
+
color?: TypographyColor;
|
|
6
|
+
children: ComponentChildren;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
type TypographyElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span';
|
|
10
|
+
type TypographyVariant = 'body' | 'body-stronger' | 'body-strongest' | 'caption' | 'caption-stronger' | 'title' | 'title-m' | 'title-l';
|
|
11
|
+
type TypographyColor = 'primary' | 'secondary' | 'tertiary' | 'disabled' | 'success' | 'warning' | 'critical' | 'highlight' | 'inverse-primary' | 'inverse-secondary';
|
|
12
|
+
export {};
|
|
@@ -8,6 +8,7 @@ import type { Organization } from './organization';
|
|
|
8
8
|
import type { SoleProprietor } from './sole-proprietor';
|
|
9
9
|
import type { TransferInstrumentOverview } from './transfer-instrument';
|
|
10
10
|
import type { Trust } from './trust';
|
|
11
|
+
import type { TrustedFieldsProvider } from './trusted-fields-provider';
|
|
11
12
|
export interface LegalEntity {
|
|
12
13
|
id?: string;
|
|
13
14
|
documentDetails?: DocumentDetail[];
|
|
@@ -21,6 +22,11 @@ export interface LegalEntity {
|
|
|
21
22
|
[key in CapabilityName]?: Capability;
|
|
22
23
|
};
|
|
23
24
|
transferInstruments?: TransferInstrumentOverview[];
|
|
25
|
+
trustedFields?: LegalEntityTrustedFields[];
|
|
26
|
+
}
|
|
27
|
+
export interface LegalEntityTrustedFields {
|
|
28
|
+
provider: TrustedFieldsProvider;
|
|
29
|
+
fields: string[];
|
|
24
30
|
}
|
|
25
31
|
export type PatchLegalEntity = Omit<PartialDeep<LegalEntity, {
|
|
26
32
|
recurseIntoArrays: true;
|
|
@@ -1,18 +1,9 @@
|
|
|
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
3
|
/**
|
|
7
|
-
* TL;DR; Digs one level deeper in BaseOuterFormProps like getFormProps, while preserving BaseOuterFormProps structure
|
|
8
|
-
*
|
|
9
4
|
* we want to preserve getFormProps' utility of digging into the data structure without turning
|
|
10
5
|
* the special fields like requiredFields into arrays, like BaseInnerFormProps.
|
|
11
6
|
*
|
|
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
7
|
* @param props
|
|
17
8
|
* @param innerFormId
|
|
18
9
|
*/
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import type { TagVariant } from '../components/internal/Tag/Tag';
|
|
1
2
|
import type { LegalEntityAssociationType } from '../core/models/api/legal-entity-association';
|
|
2
3
|
import { TrustMemberGuidanceLabel } from '../core/models/trust';
|
|
3
4
|
import type { TranslationKey } from '../language/types';
|
|
4
5
|
type Role = `${LegalEntityAssociationType | TrustMemberGuidanceLabel}`;
|
|
5
6
|
type RoleMetadata<R extends Role> = Record<R, {
|
|
6
7
|
name: TranslationKey;
|
|
7
|
-
|
|
8
|
+
variant: TagVariant;
|
|
8
9
|
description?: TranslationKey;
|
|
9
10
|
}>;
|
|
10
11
|
export declare const roleMetadata: Partial<RoleMetadata<Role>>;
|
|
11
|
-
export declare const
|
|
12
|
+
export declare const getRoleTagVariant: (role: Role) => TagVariant;
|
|
12
13
|
export declare const getRoleName: (role: Role) => TranslationKey;
|
|
13
14
|
export {};
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import './_heading.component.scss';
|
|
2
|
-
import type { ComponentChildren } from 'preact';
|
|
3
|
-
type HeadingLevel = 1 | 2 | 3 | 4 | 'sub';
|
|
4
|
-
export interface HeadingProps {
|
|
5
|
-
children: ComponentChildren;
|
|
6
|
-
level: HeadingLevel;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export default function Heading({ className, level, children }: HeadingProps): import("preact").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Spinner';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Tag';
|