@adyen/kyc-components 2.60.0 → 2.61.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 +501 -391
- package/dist/types/components/BasicInformation/types.d.ts +1 -1
- package/dist/types/components/BusinessDetails/types.d.ts +1 -1
- package/dist/types/components/DecisionMakers/component/DecisionMakersComponent.d.ts +1 -1
- package/dist/types/components/Dropins/BusinessDetailsDropin/components/BusinessDetailsDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/BusinessDetailsDropin/types.d.ts +1 -1
- package/dist/types/components/Dropins/CompanyDropin/components/CompanyDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/FormWrapper/FormWrapper.d.ts +1 -1
- package/dist/types/components/Dropins/IndividualDropin/components/IndividualDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/PayoutDetailsDropin/components/PayoutDetailsDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/PciDropin/components/PciDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/ServiceAgreementDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/SolePropDropin/components/SolePropDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/TrustDropin/components/TrustDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/types.d.ts +1 -4
- package/dist/types/components/EmbeddedDropins/UpdateLegalEntityForHighExposure/UpdateLegalEntityForHighExposure.d.ts +1 -1
- package/dist/types/components/Introduction/Introduction.d.ts +1 -1
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/component/DriversLicense.d.ts +1 -1
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityNZ/component/DriversLicense.d.ts +1 -1
- package/dist/types/components/RegistrationAddress/types.d.ts +1 -1
- package/dist/types/components/TaskList/component/TaskListComponent.d.ts +1 -1
- package/dist/types/components/TaskList/types.d.ts +0 -3
- package/dist/types/components/internal/ContextGuidance/types.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Checkbox/Checkbox.d.ts +2 -1
- package/dist/types/components/internal/FormFields/Dropzone/FilePicker.d.ts +2 -1
- package/dist/types/components/internal/FormFields/Dropzone/types.d.ts +2 -0
- package/dist/types/components/internal/FormFields/InputBase.d.ts +1 -0
- package/dist/types/components/internal/FormFields/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCardSelect.d.ts +2 -1
- package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +3 -0
- package/dist/types/core/analytics.d.ts +19 -0
- package/dist/types/core/hooks/useFormComposer.d.ts +1 -1
- package/dist/types/core/models/api/analytics.d.ts +1 -0
- package/dist/types/core/user-events.d.ts +36 -8
- package/dist/types/core/utils.d.ts +0 -22
- package/dist/types/utils/trackNavigation.d.ts +3 -5
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Dispatch, StateUpdater } from 'preact/hooks';
|
|
2
|
+
import type { BaseTrackingPayload } from '../../core/analytics';
|
|
2
3
|
import type { HookStatus } from '../../core/hooks/types';
|
|
3
4
|
import type { BaseInnerFormProps } from '../../core/hooks/useForm/types';
|
|
4
5
|
import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
|
|
5
6
|
import type { CompanyTypesValue } from '../../core/models/api/company-types-value';
|
|
6
7
|
import type { CountryCode } from '../../core/models/country-code';
|
|
7
|
-
import type { BaseTrackingPayload } from '../../core/utils';
|
|
8
8
|
import type { BusinessNameFieldSchema } from '../internal/BusinessNameField/types';
|
|
9
9
|
import type { BusinessRegistrationNumberFieldSchema } from '../internal/BusinessRegistrationNumberField/types';
|
|
10
10
|
import type { CountryFieldSchema } from '../internal/CountryField/types';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Dispatch, StateUpdater } from 'preact/hooks';
|
|
2
|
+
import type { BaseTrackingPayload } from '../../core/analytics';
|
|
2
3
|
import type { HookStatus } from '../../core/hooks/types';
|
|
3
4
|
import type { BaseOuterFormProps } from '../../core/hooks/useForm/types';
|
|
4
5
|
import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
|
|
5
6
|
import type { CountryCode } from '../../core/models/country-code';
|
|
6
7
|
import type { FormModel } from '../../core/models/form';
|
|
7
|
-
import type { BaseTrackingPayload } from '../../core/utils';
|
|
8
8
|
import type { AdditionalInformationSchema } from '../AdditionalInformation/types';
|
|
9
9
|
import type { BasicInformationSchema } from '../BasicInformation/types';
|
|
10
10
|
import type { CompanyStructureSchema } from '../CompanyStructure/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../DecisionMakers.scss';
|
|
2
2
|
import type { DecisionMakersProps } from '../types';
|
|
3
|
-
declare const DecisionMakersComponent: ({
|
|
3
|
+
declare const DecisionMakersComponent: ({ legalEntityResponse, capabilityProblems, onNavigateToIndividual, handleUpdateLegalEntity, navigateBackToTaskList, onDecisionMakerDelete, trustedEntityAssociations, }: DecisionMakersProps) => import("preact").JSX.Element;
|
|
4
4
|
export default DecisionMakersComponent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type BusinessDetailsDropinProps } from '../types';
|
|
2
|
-
export declare function BusinessDetailsDropinComponent({ country, problems, legalEntityResponse, isTargetLegalEntityType, parentLegalEntity,
|
|
2
|
+
export declare function BusinessDetailsDropinComponent({ country, problems, legalEntityResponse, isTargetLegalEntityType, parentLegalEntity, capabilities, taskName, hideDropinLayout, homeButtonLabel, taskType, onChange, onSubmit: onExternalSubmit, handleHomeClick, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleUpdateLegalEntity, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, handleClearCompanyData, }: BusinessDetailsDropinProps): import("preact").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Dispatch, StateUpdater } from 'preact/hooks';
|
|
2
|
+
import type { BaseTrackingPayload } from '../../../core/analytics';
|
|
2
3
|
import type { ExistingLegalEntity, LegalEntity } from '../../../core/models/api/legal-entity';
|
|
3
4
|
import type { EntityProblems } from '../../../core/models/errors/entity-problems';
|
|
4
5
|
import type { FormModelWithValidity } from '../../../core/models/form';
|
|
5
|
-
import type { BaseTrackingPayload } from '../../../core/utils';
|
|
6
6
|
import type Language from '../../../language/Language';
|
|
7
7
|
import type { DocumentApiUtils } from '../../../utils/api/documentUtils';
|
|
8
8
|
import type { BusinessDetailsProps, BusinessDetailsSchema } from '../../BusinessDetails/types';
|
|
@@ -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,
|
|
2
|
+
export declare function CompanyDropinComponent({ country: parentCountry, problems: propProblems, hideDropinLayout, taskName, capabilities, homeButtonLabel, taskType, associationDetail, parentLegalEntity, legalEntityResponse, onSubmit: onExternalSubmit, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleCreateLegalEntity, handleUpdateLegalEntity, handleHomeClick, onTypeSwitch, onChange, trustedFields, }: CompanyDropinProps): import("preact").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './FormWrapper.scss';
|
|
2
2
|
import type { ComponentChildren } from 'preact';
|
|
3
|
+
import type { BaseTrackingPayload } from '../../../core/analytics';
|
|
3
4
|
import type { EntityProblems } from '../../../core/models/errors/entity-problems';
|
|
4
5
|
import type { FormModelWithValidity } from '../../../core/models/form';
|
|
5
|
-
import type { BaseTrackingPayload } from '../../../core/utils';
|
|
6
6
|
import type { TranslationKey } from '../../../language/types';
|
|
7
7
|
import type { LoadingStatus } from '../../internal/LoaderWrapper/constants';
|
|
8
8
|
import type { DropinAPIHandlers } from '../types';
|
package/dist/types/components/Dropins/IndividualDropin/components/IndividualDropinComponent.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IndividualDropinProps } from '../../../Individual/types';
|
|
2
|
-
export declare function IndividualDropinComponent({ handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleGetIdVerificationToken, handleGetIdVerificationStartCheck, handleOpenSingpassAuthorizationLink, taskType,
|
|
2
|
+
export declare function IndividualDropinComponent({ handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleGetIdVerificationToken, handleGetIdVerificationStartCheck, handleOpenSingpassAuthorizationLink, taskType, parentLegalEntity, legalEntityResponse, taskName, handleHomeClick, handleCloseClick, homeButtonLabel, isTargetLegalEntityType, country: parentCountry, handleCreateLegalEntity, capabilities, onChange, problems: propProblems, handleUpdateLegalEntity, trustMember, onSubmit: externalOnSubmit, onTypeSwitch, hideNavigation, asModal, handleBackClick: externalBackClick, trustedFields, trustedFieldsProvider, trustedRoles, }: IndividualDropinProps): import("preact").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PayoutDetailsDropinProps } from '../../../PayoutDetails/types';
|
|
2
|
-
export declare function PayoutDetailsDropinComponent({ transferInstrument, setTransferInstrument, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleUpdateTransferInstrument, handleCreateTransferInstrument, handleGetBankVerificationVendors, legalEntityResponse, associatedLegalArrangement,
|
|
2
|
+
export declare function PayoutDetailsDropinComponent({ transferInstrument, setTransferInstrument, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleUpdateTransferInstrument, handleCreateTransferInstrument, handleGetBankVerificationVendors, legalEntityResponse, associatedLegalArrangement, accountHolder, problems: propProblems, onSubmit: externalOnSubmit, onChange, taskType: propTaskType, taskName, capabilities, handleHomeClick, homeButtonLabel, hideNavigation, refreshLegalEntity, navigateBackToTaskList, createTrustedTransferInstrument, handleBankVerificationError, handleBackClick: externalBackClick, }: PayoutDetailsDropinProps): import("preact").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PciDropinProps } from '../types';
|
|
2
|
-
export declare function PciDropinComponent({ legalEntityResponse, pciTemplateResponse, handleHomeClick, handleSign, taskType,
|
|
2
|
+
export declare function PciDropinComponent({ legalEntityResponse, pciTemplateResponse, handleHomeClick, handleSign, taskType, }: PciDropinProps): import("preact").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './ServiceAgreementDropinComponent.scss';
|
|
2
2
|
import type { ServiceAgreementDropinProps } from '../types';
|
|
3
|
-
export declare function ServiceAgreementDropinComponent({ legalEntityResponse, handleGetServiceAgreement, handleViewAcceptedTermsOfServiceDocument, handleDownloadAcceptedTermsOfServiceDocument, handleDownloadUnacceptedTermsOfServiceDocument, handleHomeClick, handleAddSigner, handleSign,
|
|
3
|
+
export declare function ServiceAgreementDropinComponent({ legalEntityResponse, handleGetServiceAgreement, handleViewAcceptedTermsOfServiceDocument, handleDownloadAcceptedTermsOfServiceDocument, handleDownloadUnacceptedTermsOfServiceDocument, handleHomeClick, handleAddSigner, handleSign, serviceAgreementTypes, serviceAgreementAcceptanceInfos, }: ServiceAgreementDropinProps): import("preact").JSX.Element;
|
package/dist/types/components/Dropins/SolePropDropin/components/SolePropDropinComponent.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { SolePropDropinProps } from '../../../SoleProp/types';
|
|
2
|
-
export declare function SolePropDropinComponent({ problems: problemsProp, capabilities, country: externalCountry, parentLegalEntity, legalEntityResponse, homeButtonLabel, hideDropinLayout, onSubmit: onExternalSubmit, onChange, taskType,
|
|
2
|
+
export declare function SolePropDropinComponent({ problems: problemsProp, capabilities, country: externalCountry, parentLegalEntity, legalEntityResponse, homeButtonLabel, hideDropinLayout, onSubmit: onExternalSubmit, onChange, taskType, handleHomeClick, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleUpdateLegalEntity, handleCreateLegalEntity, }: SolePropDropinProps): import("preact").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { TrustDropinProps } from '../../../Trust/types';
|
|
2
|
-
export declare function TrustDropinComponent({ parentLegalEntity, capabilities, country, legalEntityResponse, handleCreateLegalEntity, handleUpdateLegalEntity, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress,
|
|
2
|
+
export declare function TrustDropinComponent({ parentLegalEntity, capabilities, country, legalEntityResponse, handleCreateLegalEntity, handleUpdateLegalEntity, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, taskType, problems: problemsProp, onSubmit: externalOnSubmit, onChange, hideDropinLayout, handleHomeClick, homeButtonLabel, }: TrustDropinProps): import("preact").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BaseTrackingPayload } from '../../core/analytics';
|
|
1
2
|
import type { State, TopLevelDataSchema } from '../../core/Context/StateContext/types';
|
|
2
3
|
import type { AddressSearchRequest, AddressSearchResponse, LoqateAddress } from '../../core/models/api/address-search';
|
|
3
4
|
import type { CapabilityName } from '../../core/models/api/capability';
|
|
@@ -11,7 +12,6 @@ import type { ReviewCompletion } from '../../core/models/api/review';
|
|
|
11
12
|
import type { TransferInstrument } from '../../core/models/api/transfer-instrument';
|
|
12
13
|
import type { OnboardingLinkConfig, OnboardingLinkResponse, OnboardingStatusResponse } from '../../core/models/api/view-verification-status';
|
|
13
14
|
import type { CountryCode } from '../../core/models/country-code';
|
|
14
|
-
import type { BaseTrackingPayload } from '../../core/utils';
|
|
15
15
|
import type Language from '../../language/Language';
|
|
16
16
|
import type { TranslationKey } from '../../language/types';
|
|
17
17
|
import type { TaskTypes } from '../TaskList/types';
|
|
@@ -77,9 +77,6 @@ export interface DropinProps {
|
|
|
77
77
|
handleBackClick?(): void;
|
|
78
78
|
handleCloseClick?(): void;
|
|
79
79
|
hideDropinLayout?: boolean;
|
|
80
|
-
trackingConfig?: {
|
|
81
|
-
topLevelLegalEntity: ExistingLegalEntity;
|
|
82
|
-
};
|
|
83
80
|
taskType?: TaskTypes;
|
|
84
81
|
taskName?: TranslationKey;
|
|
85
82
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { HighExposureProps } from '../../Dropins/HighExposureDropin/types';
|
|
2
|
-
export declare function UpdateLegalEntityForHighExposure({ parentLegalEntity, capabilities, country,
|
|
2
|
+
export declare function UpdateLegalEntityForHighExposure({ parentLegalEntity, capabilities, country, problems: problemsProp, onSubmit: externalOnSubmit, onChange, hideDropinLayout, handleHomeClick, homeButtonLabel, legalEntityId, legalEntity: legalEntityProps, }: HighExposureProps): import("preact").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './_introduction.component.scss';
|
|
2
2
|
import type { JSX } from 'preact';
|
|
3
3
|
import type { ExistingLegalEntity } from '../../core/models/api/legal-entity';
|
|
4
|
-
import { TaskTypes } from '../TaskList/types';
|
|
4
|
+
import type { TaskTypes } from '../TaskList/types';
|
|
5
5
|
export interface IntroductionProps {
|
|
6
6
|
legalEntity: ExistingLegalEntity;
|
|
7
7
|
onExitIntroduction: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseTrackingPayload } from '../../../../../../core/
|
|
1
|
+
import type { BaseTrackingPayload } from '../../../../../../core/analytics';
|
|
2
2
|
import type { FormUtils } from '../../../../../../utils/formUtils';
|
|
3
3
|
import type { IdentityNumberSchema } from '../../../../../IdentityNumber/type';
|
|
4
4
|
import type { MultiSelectOnChangeProps, SingleSelectOnChangeProps } from '../../../../../internal/FormFields/Select/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseTrackingPayload } from '../../../../../../core/
|
|
1
|
+
import type { BaseTrackingPayload } from '../../../../../../core/analytics';
|
|
2
2
|
import type { FormUtils } from '../../../../../../utils/formUtils';
|
|
3
3
|
import type { IdentityNumberSchema } from '../../../../../IdentityNumber/type';
|
|
4
4
|
import type { AdditionalIdentityInfoSchema } from '../../types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { BaseTrackingPayload } from '../../core/analytics';
|
|
1
2
|
import type { BaseOuterFormProps } from '../../core/hooks/useForm/types';
|
|
2
3
|
import type { CountryCode } from '../../core/models/country-code';
|
|
3
4
|
import type { FormModel } from '../../core/models/form';
|
|
4
|
-
import type { BaseTrackingPayload } from '../../core/utils';
|
|
5
5
|
import type { TranslationKey } from '../../language/types';
|
|
6
6
|
import type { DropinAPIHandlers } from '../Dropins/types';
|
|
7
7
|
import type { AddressSchema } from '../internal/Address/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../TaskList.scss';
|
|
2
2
|
import type { TaskListComponentProps } from '../types';
|
|
3
|
-
declare function TaskListComponent({ tasks,
|
|
3
|
+
declare function TaskListComponent({ tasks, onNavigateToTask, legalEntityResponse, capabilityProblems, onPciDownload, isReview, pciStatus, serviceAgreementTypes, serviceAgreementAcceptanceInfos, hasRequiredTrustMemberCount, onTransferInstrumentDelete, singpassComponent, }: TaskListComponentProps): import("preact").JSX.Element;
|
|
4
4
|
export default TaskListComponent;
|
|
@@ -67,9 +67,6 @@ export interface TaskListComponentProps {
|
|
|
67
67
|
country?: string;
|
|
68
68
|
onTransferInstrumentDelete: (id: string) => void;
|
|
69
69
|
hasRequiredTrustMemberCount?: boolean;
|
|
70
|
-
trackingConfig?: {
|
|
71
|
-
topLevelLegalEntity: ExistingLegalEntity;
|
|
72
|
-
};
|
|
73
70
|
singpassComponent?: JSX.Element;
|
|
74
71
|
}
|
|
75
72
|
export interface TaskListGroupProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentChildren } from 'preact';
|
|
2
|
-
import type { BaseTrackingPayload } from '../../../core/
|
|
2
|
+
import type { BaseTrackingPayload } from '../../../core/analytics';
|
|
3
3
|
export interface GuidanceProps {
|
|
4
4
|
baseTrackingPayload: BaseTrackingPayload;
|
|
5
5
|
page: string;
|
|
@@ -12,6 +12,7 @@ interface CheckboxProps {
|
|
|
12
12
|
helper?: string;
|
|
13
13
|
readonly?: boolean;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
+
enableTracking?: boolean;
|
|
15
16
|
}
|
|
16
|
-
export default function Checkbox({ classNameModifiers, label, isInvalid, onChange, helper, checked, disabled, ...props }: CheckboxProps): import("preact").JSX.Element;
|
|
17
|
+
export default function Checkbox({ classNameModifiers, label, isInvalid, onChange, helper, checked, disabled, enableTracking, ...props }: CheckboxProps): import("preact").JSX.Element;
|
|
17
18
|
export {};
|
|
@@ -11,5 +11,6 @@ export interface FilePickerProps extends FileValidationOptions {
|
|
|
11
11
|
multiple?: boolean;
|
|
12
12
|
label?: string;
|
|
13
13
|
iconPrefix?: string;
|
|
14
|
+
enableTracking?: boolean;
|
|
14
15
|
}
|
|
15
|
-
export declare function FilePicker({ files, setFiles, isValid, errorMessage, multiple, label, iconPrefix, allowedFileTypes, maxSize, isOptional, maxNumberOfFiles, }: FilePickerProps): JSX.Element;
|
|
16
|
+
export declare function FilePicker({ files, setFiles, isValid, errorMessage, multiple, label, iconPrefix, enableTracking, allowedFileTypes, maxSize, isOptional, maxNumberOfFiles, }: FilePickerProps): JSX.Element;
|
|
@@ -13,10 +13,12 @@ export interface DropzoneProps extends Partial<FileValidationOptions> {
|
|
|
13
13
|
id?: string;
|
|
14
14
|
iconPrefix?: string;
|
|
15
15
|
shouldValidate?: boolean;
|
|
16
|
+
enableTracking?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export interface DropzoneFileProps {
|
|
18
19
|
file: FileSchema;
|
|
19
20
|
errorMessage?: TranslationKey;
|
|
20
21
|
onDelete: () => void;
|
|
21
22
|
iconPrefix?: string;
|
|
23
|
+
label?: string;
|
|
22
24
|
}
|
|
@@ -18,6 +18,7 @@ export interface InputBaseProps extends ComponentProps<'input'> {
|
|
|
18
18
|
onBlurHandler?: (event: JSX.TargetedFocusEvent<HTMLInputElement>) => void;
|
|
19
19
|
onFocusHandler?: (event: JSX.TargetedFocusEvent<HTMLInputElement>) => void;
|
|
20
20
|
onChange?: never;
|
|
21
|
+
enableTracking?: boolean;
|
|
21
22
|
}
|
|
22
23
|
declare const InputBase: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<InputBaseProps> & {
|
|
23
24
|
ref?: import("preact").Ref<HTMLInputElement>;
|
|
@@ -15,5 +15,6 @@ export interface RadioGroupProps {
|
|
|
15
15
|
horizontal?: boolean;
|
|
16
16
|
showContentOnlyOnSelected?: boolean;
|
|
17
17
|
className?: string;
|
|
18
|
+
enableTracking?: boolean;
|
|
18
19
|
}
|
|
19
|
-
export declare function RadioGroup({ items, name, onChange, value, disabled, horizontal, showContentOnlyOnSelected, className, }: RadioGroupProps): JSX.Element;
|
|
20
|
+
export declare function RadioGroup({ items, name, onChange, value, disabled, horizontal, showContentOnlyOnSelected, className, enableTracking, }: RadioGroupProps): JSX.Element;
|
|
@@ -19,5 +19,6 @@ export interface RadioCardSelectProps<OptionType> {
|
|
|
19
19
|
renderOptionFooter?: (option: OptionType) => ComponentChildren;
|
|
20
20
|
optionClassNames?: (option: OptionType) => RadioCardClassnames;
|
|
21
21
|
floatingRadio?: boolean;
|
|
22
|
+
enableTracking?: boolean;
|
|
22
23
|
}
|
|
23
|
-
export declare const RadioCardSelect: <OptionType>({ options, name, onSelect, selected, isInvalid, className, optionId, optionName, optionDescription, optionSubtitle, optionClassNames, renderOptionIcon, renderOptionBody, renderOptionFooter, isOptionDisabled, floatingRadio, }: RadioCardSelectProps<OptionType>) => import("preact").JSX.Element;
|
|
24
|
+
export declare const RadioCardSelect: <OptionType>({ options, name, onSelect, selected, isInvalid, className, optionId, optionName, optionDescription, optionSubtitle, optionClassNames, renderOptionIcon, renderOptionBody, renderOptionFooter, isOptionDisabled, floatingRadio, enableTracking, }: RadioCardSelectProps<OptionType>) => import("preact").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import './Select.scss';
|
|
|
2
2
|
import './SelectGeneric.scss';
|
|
3
3
|
import type { JSX } from 'preact';
|
|
4
4
|
import type { SelectProps } from './types';
|
|
5
|
-
declare const Select: ({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, isMulti, uniqueId, showSelectedItemsAsTags, isSearch, onSearch, resetSearch, loading, getSearchItem, searchText, onSearchTextChange, showSearchList, }: SelectProps) => JSX.Element;
|
|
5
|
+
declare const Select: ({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, isMulti, uniqueId, showSelectedItemsAsTags, isSearch, onSearch, resetSearch, loading, getSearchItem, searchText, onSearchTextChange, showSearchList, enableTracking, }: SelectProps) => JSX.Element;
|
|
6
6
|
export default Select;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../SelectGeneric.scss';
|
|
2
2
|
import type { SelectButtonProps } from '../types';
|
|
3
|
-
declare function SelectButton({ active, readonly, showList, isInvalid, isValid, toggleList, onButtonKeyDown, filterable, placeholder, toggleButtonRef, ariaDescribedBy, selectListId, filterInputRef, onInput, isMulti, id, isSearch,
|
|
3
|
+
export declare function SelectButton({ name, active, readonly, showList, isInvalid, isValid, toggleList, onButtonKeyDown, filterable, placeholder, toggleButtonRef, ariaDescribedBy, selectListId, filterInputRef, onInput, isMulti, id, isSearch, loading, hideSearchIcon, textFilter, enableTracking, }: SelectButtonProps): import("preact").JSX.Element;
|
|
4
4
|
export default SelectButton;
|
|
@@ -36,6 +36,7 @@ interface BaseSelectProps {
|
|
|
36
36
|
searchText?: string;
|
|
37
37
|
onSearchTextChange?: (text: string) => void;
|
|
38
38
|
showSearchList?: boolean;
|
|
39
|
+
enableTracking?: boolean;
|
|
39
40
|
}
|
|
40
41
|
interface SingleSelectOnChangeTarget {
|
|
41
42
|
value: string;
|
|
@@ -61,6 +62,7 @@ interface MultiSelectProps extends BaseSelectProps {
|
|
|
61
62
|
}
|
|
62
63
|
export type SelectProps = SingleSelectProps | MultiSelectProps;
|
|
63
64
|
export interface SelectButtonProps {
|
|
65
|
+
name?: string;
|
|
64
66
|
active: SelectItem[];
|
|
65
67
|
filterInputRef: MutableRef<HTMLInputElement>;
|
|
66
68
|
filterable: boolean;
|
|
@@ -82,6 +84,7 @@ export interface SelectButtonProps {
|
|
|
82
84
|
hideSearchIcon?: boolean;
|
|
83
85
|
loading?: boolean;
|
|
84
86
|
textFilter?: string;
|
|
87
|
+
enableTracking?: boolean;
|
|
85
88
|
}
|
|
86
89
|
export interface SelectListProps {
|
|
87
90
|
active: SelectItem[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import type { TaskTypes } from '../components/TaskList/types';
|
|
3
|
+
import type { LegalEntity } from './models/api/legal-entity';
|
|
4
|
+
import type { AdditionalEventProperties } from './user-events';
|
|
5
|
+
type BaseTrackingPayloadParams = {
|
|
6
|
+
task?: TaskTypes;
|
|
7
|
+
associatedLegalEntity?: LegalEntity;
|
|
8
|
+
associatedLegalEntityOrg?: LegalEntity;
|
|
9
|
+
};
|
|
10
|
+
export type BaseTrackingPayload = {
|
|
11
|
+
task?: TaskTypes;
|
|
12
|
+
associatedLegalEntityId?: string;
|
|
13
|
+
associatedLegalEntityType?: string;
|
|
14
|
+
associatedLegalEntityOrgId?: string;
|
|
15
|
+
associatedLegalEntityOrgType?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const getAssociatedLeAnalyticsPayload: ({ task, associatedLegalEntity, associatedLegalEntityOrg, }: BaseTrackingPayloadParams) => BaseTrackingPayload;
|
|
18
|
+
export declare const debouncedInputEvent: import("lodash").DebouncedFunc<(properties: SetOptional<AdditionalEventProperties, "actionLevel">) => void>;
|
|
19
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Dispatch, StateUpdater } from 'preact/hooks';
|
|
2
2
|
import type { TranslationKey } from '../../language/types';
|
|
3
|
+
import type { BaseTrackingPayload } from '../analytics';
|
|
3
4
|
import type { EntityProblems } from '../models/errors/entity-problems';
|
|
4
5
|
import type { FormModelWithValidity } from '../models/form';
|
|
5
|
-
import type { BaseTrackingPayload } from '../utils';
|
|
6
6
|
export interface FormComposer {
|
|
7
7
|
handleNextClick(): void;
|
|
8
8
|
handleBackClick?(): void;
|
|
@@ -1,29 +1,47 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
1
2
|
import type { TaskTypes } from '../components/TaskList/types';
|
|
2
3
|
import type { LegalEntityType } from './models/api/legal-entity-type';
|
|
3
4
|
export type EventProperty = string | number | boolean | any[] | null | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Level of the funnel that is relevant for this event
|
|
7
|
+
*/
|
|
4
8
|
type ActionLevel = 'journey' | 'task' | 'page' | 'field';
|
|
5
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The type of action associated with the event
|
|
11
|
+
*/
|
|
12
|
+
type ActionType = 'start' | 'submit' | 'save' | 'add' | 'edit' | 'remove' | 'open' | 'close' | 'next' | 'back' | 'skip' | 'download' | 'upload' | 'sign' | 'navigate' | 'blur' | 'input' | 'focus' | 'change' | 'select' | 'alert';
|
|
13
|
+
/**
|
|
14
|
+
* The base event properties that are sent with every event
|
|
15
|
+
*/
|
|
6
16
|
type BaseEventProperties = {
|
|
7
17
|
category: 'onboarding';
|
|
8
18
|
subCategory: 'hosted onboarding';
|
|
9
19
|
countryCode?: string;
|
|
10
20
|
capabilities?: string[];
|
|
11
21
|
legalEntityId?: string;
|
|
22
|
+
entityType?: LegalEntityType;
|
|
23
|
+
task?: TaskTypes;
|
|
12
24
|
};
|
|
13
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Additional event properties
|
|
27
|
+
*/
|
|
28
|
+
export interface AdditionalEventProperties {
|
|
14
29
|
actionType: ActionType;
|
|
15
30
|
actionLevel: ActionLevel;
|
|
16
31
|
entityType?: LegalEntityType;
|
|
17
|
-
task: TaskTypes;
|
|
18
32
|
page?: string;
|
|
19
33
|
field?: string;
|
|
20
|
-
returnType?: 'backend' | (string & {});
|
|
34
|
+
returnType?: 'backend' | 'validation' | (string & {});
|
|
21
35
|
returnValue?: string | string[];
|
|
22
36
|
label?: string;
|
|
23
37
|
[key: string]: EventProperty;
|
|
24
38
|
}
|
|
25
|
-
|
|
26
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Name of the tracked event
|
|
41
|
+
* Can be either a custom name or one of the pre-defined values
|
|
42
|
+
*/
|
|
43
|
+
export type EventName = 'Clicked button' | 'Clicked accordion' | 'Success' | 'Encountered error' | 'Landed on page' | 'Interacted with form field' | (string & {});
|
|
44
|
+
export type AnalyticsEventPayload = BaseEventProperties & AdditionalEventProperties;
|
|
27
45
|
export type EventType = 'add_event' | 'start_event';
|
|
28
46
|
export type EventQueueItem = {
|
|
29
47
|
type: EventType;
|
|
@@ -36,17 +54,25 @@ declare class UserEvents {
|
|
|
36
54
|
private readonly subscriptions;
|
|
37
55
|
/** payload of commmon props sent in every event */
|
|
38
56
|
private baseTrackingPayload;
|
|
57
|
+
/** properties not set with every event but that may be shared between some events
|
|
58
|
+
* ex. `page` value for `Interacted with form field` events
|
|
59
|
+
*/
|
|
60
|
+
sharedEventProperties: Partial<AdditionalEventProperties>;
|
|
39
61
|
constructor();
|
|
40
62
|
protected add(...args: EventQueueItem[]): void;
|
|
41
63
|
protected notifySubscribers(): void;
|
|
42
64
|
/**
|
|
43
|
-
* Adds an analytics event.
|
|
65
|
+
* Adds an analytics event.
|
|
44
66
|
*/
|
|
45
|
-
addEvent(eventName: EventName, properties:
|
|
67
|
+
addEvent(eventName: EventName, properties: AdditionalEventProperties): void;
|
|
46
68
|
/**
|
|
47
69
|
* Starts a timer for an event to measure the time it takes for an event to occur. Time is ended when `addEvent` is executed with the same key
|
|
48
70
|
*/
|
|
49
71
|
startEvent(eventName: EventName): void;
|
|
72
|
+
/**
|
|
73
|
+
* Adds an event with context specific to field-related events
|
|
74
|
+
*/
|
|
75
|
+
addFieldEvent(eventName: EventName, properties: SetOptional<AdditionalEventProperties, 'actionLevel'>): void;
|
|
50
76
|
/**
|
|
51
77
|
* Subscribes a callback to analytics events. It gets called every time
|
|
52
78
|
* one of the above public methods get called, and the event data is passed back as an array.
|
|
@@ -65,6 +91,8 @@ declare class UserEvents {
|
|
|
65
91
|
subscribe(callback: UserEventCallback): void;
|
|
66
92
|
/** Sets params that are sent on every event */
|
|
67
93
|
updateBaseTrackingPayload(baseTrackingPayload: Partial<BaseEventProperties>): void;
|
|
94
|
+
/** Sets params that may be shared between events */
|
|
95
|
+
updateSharedEventProperties: (props: Record<string, EventProperty>) => void;
|
|
68
96
|
/**
|
|
69
97
|
* Removes a subscribed callback
|
|
70
98
|
*/
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
import type { TaskTypes } from '../components/TaskList/types';
|
|
2
|
-
import type { LegalEntity } from './models/api/legal-entity';
|
|
3
|
-
import type { LegalEntityType } from './models/api/legal-entity-type';
|
|
4
|
-
type BaseTrackingPayloadParams = {
|
|
5
|
-
trackingConfig?: {
|
|
6
|
-
topLevelLegalEntity: LegalEntity;
|
|
7
|
-
};
|
|
8
|
-
parentLegalEntity?: LegalEntity;
|
|
9
|
-
legalEntity?: LegalEntity;
|
|
10
|
-
task?: TaskTypes;
|
|
11
|
-
};
|
|
12
|
-
export type BaseTrackingPayload = {
|
|
13
|
-
task: TaskTypes;
|
|
14
|
-
entityType?: LegalEntityType;
|
|
15
|
-
legalEntityId?: string;
|
|
16
|
-
topLevelLegalEntityId?: string;
|
|
17
|
-
topLevelLegalEntityType?: LegalEntityType;
|
|
18
|
-
parentLegalEntityId?: string;
|
|
19
|
-
parentLegalEntityType?: LegalEntityType;
|
|
20
|
-
};
|
|
21
|
-
export declare function getBaseTrackingPayload({ trackingConfig, parentLegalEntity, legalEntity, task, }: BaseTrackingPayloadParams): BaseTrackingPayload;
|
|
22
1
|
/**
|
|
23
2
|
* Filter data and remove unneeded fields
|
|
24
3
|
* @param dataSubmitted - actual form data submitted from the frontend
|
|
@@ -26,4 +5,3 @@ export declare function getBaseTrackingPayload({ trackingConfig, parentLegalEnti
|
|
|
26
5
|
* @returns filtered data
|
|
27
6
|
*/
|
|
28
7
|
export declare const removeOldDataBySchema: (dataSubmitted: any, savedLegalEntityData: any) => any;
|
|
29
|
-
export {};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type { BaseTrackingPayload } from '../core/
|
|
2
|
-
import type Language from '../language/Language';
|
|
1
|
+
import type { BaseTrackingPayload } from '../core/analytics';
|
|
3
2
|
import type { TranslationKey } from '../language/types';
|
|
4
|
-
export declare const trackNavigation: ({ fromForm, toForm, component, baseTrackingPayload,
|
|
3
|
+
export declare const trackNavigation: ({ fromForm, toForm, component, baseTrackingPayload, }: {
|
|
5
4
|
fromForm: TranslationKey;
|
|
6
5
|
toForm: TranslationKey;
|
|
7
6
|
component: string;
|
|
8
|
-
baseTrackingPayload
|
|
9
|
-
i18n: Language;
|
|
7
|
+
baseTrackingPayload?: BaseTrackingPayload;
|
|
10
8
|
}) => void;
|