@adyen/kyc-components 3.4.0 → 3.4.1
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 +53 -7
- package/dist/types/components/BusinessTypeSelection/BusinessTypeSelection.d.ts +1 -1
- package/dist/types/components/BusinessTypeSelection/types.d.ts +2 -2
- package/dist/types/components/TaskList/component/TaskListComponent.d.ts +1 -1
- package/dist/types/components/TaskList/types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -7024,7 +7024,7 @@ const CountryIdNumberPatterns = {
|
|
|
7024
7024
|
[CountryCodes.Italy]: /^[A-Z]{6}[0-9]{2}[ABCDEHLMPRST][0-9]{2}[A-Z][0-9]{3}[A-Z]$/,
|
|
7025
7025
|
[CountryCodes.Poland]: /^\d{11}$/,
|
|
7026
7026
|
[CountryCodes.Romania]: /^\d{13}$/,
|
|
7027
|
-
[CountryCodes.Singapore]: /^[A-Z][0-9]{
|
|
7027
|
+
[CountryCodes.Singapore]: /^[A-Z][0-9]{7}[A-Z]$/,
|
|
7028
7028
|
[CountryCodes.Spain]: {
|
|
7029
7029
|
dni: /(^[KL]?\d{8}[A-Z]$)/,
|
|
7030
7030
|
nie: /(^[MXYZ]\d{7,8}[A-Z]$)/
|
|
@@ -15741,15 +15741,15 @@ const defaultFieldConfig$5 = {
|
|
|
15741
15741
|
[CountryCodes.Singapore]: {
|
|
15742
15742
|
label: "nric",
|
|
15743
15743
|
mask: {
|
|
15744
|
-
mask: makeMask(...alphaInputs(1), ...numericInputs(
|
|
15744
|
+
mask: makeMask(...alphaInputs(1), ...numericInputs(7), ...alphaInputs(1)),
|
|
15745
15745
|
transformOnType: uppercase
|
|
15746
15746
|
},
|
|
15747
15747
|
validators: validatePatternOnBlur(CountryIdNumberPatterns[CountryCodes.Singapore]),
|
|
15748
15748
|
guidanceText: {
|
|
15749
15749
|
key: "enterNCharactersWithAMixForExample",
|
|
15750
15750
|
values: {
|
|
15751
|
-
numChars: "
|
|
15752
|
-
example: "
|
|
15751
|
+
numChars: "9",
|
|
15752
|
+
example: "T9123456J"
|
|
15753
15753
|
}
|
|
15754
15754
|
}
|
|
15755
15755
|
},
|
|
@@ -23412,7 +23412,8 @@ const BusinessTypeSelection = ({
|
|
|
23412
23412
|
handleUpdateLegalEntity,
|
|
23413
23413
|
taskHistory,
|
|
23414
23414
|
setTaskHistory,
|
|
23415
|
-
onNavigateTo
|
|
23415
|
+
onNavigateTo,
|
|
23416
|
+
baseTrackingPayload
|
|
23416
23417
|
}) => {
|
|
23417
23418
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
23418
23419
|
const {
|
|
@@ -23465,6 +23466,26 @@ const BusinessTypeSelection = ({
|
|
|
23465
23466
|
var _a2, _b2;
|
|
23466
23467
|
setFormSchema(getFormSchema(((_a2 = data.businessType) == null ? void 0 : _a2.id) === "legalArrangement" && !!data.legalArrangement || currentStep === 1, ((_b2 = data.legalArrangement) == null ? void 0 : _b2.id) === "aTrust"));
|
|
23467
23468
|
}, [data.businessType, data.legalArrangement, currentStep]);
|
|
23469
|
+
useEffect(() => {
|
|
23470
|
+
userEvents.addPageView("Entity Selection");
|
|
23471
|
+
const startDropOffTrackingEvent = () => {
|
|
23472
|
+
userEvents.addEvent("Started legal entity selection", {
|
|
23473
|
+
segmentation: baseTrackingPayload
|
|
23474
|
+
});
|
|
23475
|
+
};
|
|
23476
|
+
const stopDropOffTrackingEvent = () => {
|
|
23477
|
+
userEvents.addEvent("Drop off at legal entity selection", {
|
|
23478
|
+
segmentation: baseTrackingPayload
|
|
23479
|
+
});
|
|
23480
|
+
};
|
|
23481
|
+
startDropOffTrackingEvent();
|
|
23482
|
+
window.addEventListener("focus", startDropOffTrackingEvent);
|
|
23483
|
+
window.addEventListener("blur", stopDropOffTrackingEvent);
|
|
23484
|
+
return () => {
|
|
23485
|
+
window.removeEventListener("focus", startDropOffTrackingEvent);
|
|
23486
|
+
window.removeEventListener("blur", stopDropOffTrackingEvent);
|
|
23487
|
+
};
|
|
23488
|
+
}, []);
|
|
23468
23489
|
const handleNextClick = async () => {
|
|
23469
23490
|
var _a2;
|
|
23470
23491
|
if (loadingStatus === "loading")
|
|
@@ -23496,11 +23517,17 @@ const BusinessTypeSelection = ({
|
|
|
23496
23517
|
return;
|
|
23497
23518
|
}
|
|
23498
23519
|
await updateLegalEntityAndSelectAccountHolder();
|
|
23520
|
+
userEvents.addEvent("Saved legal entity selection", {
|
|
23521
|
+
segmentation: baseTrackingPayload
|
|
23522
|
+
});
|
|
23499
23523
|
} else {
|
|
23500
23524
|
onAccountHolderSelect(newAccountHolder);
|
|
23501
23525
|
}
|
|
23502
23526
|
if (isLegalArrangementChanging) {
|
|
23503
23527
|
await updateLegalEntityAndSelectAccountHolder();
|
|
23528
|
+
userEvents.addEvent("Saved legal entity selection", {
|
|
23529
|
+
segmentation: baseTrackingPayload
|
|
23530
|
+
});
|
|
23504
23531
|
}
|
|
23505
23532
|
}
|
|
23506
23533
|
};
|
|
@@ -28392,6 +28419,7 @@ const LEGAL_ENTITY_BASE_TASKS = [TaskTypes.INDIVIDUAL, TaskTypes.COMPANY, TaskTy
|
|
|
28392
28419
|
const CONTRACT_TASKS = [TaskTypes.SERVICE_AGREEMENT, TaskTypes.PCI_DSS];
|
|
28393
28420
|
function TaskListComponent({
|
|
28394
28421
|
tasks,
|
|
28422
|
+
trackingConfig,
|
|
28395
28423
|
onNavigateToTask,
|
|
28396
28424
|
legalEntityResponse,
|
|
28397
28425
|
capabilityProblems,
|
|
@@ -28457,6 +28485,17 @@ function TaskListComponent({
|
|
|
28457
28485
|
const handleOnNavigateToServiceAgreement = () => onNavigateToTask(TaskTypes.SERVICE_AGREEMENT);
|
|
28458
28486
|
const companyTaskDescriptionKey = isReview ? "businessAccountDetailsDescriptionReview" : "businessAccountDetailsDescription";
|
|
28459
28487
|
const payoutTaskDescriptionKey = isReview ? "payoutAccountsDescriptionReview" : "payoutAccountsDescription";
|
|
28488
|
+
const onEditBusinessSetupClick = () => {
|
|
28489
|
+
const baseTrackingPayload = getBaseTrackingPayload({
|
|
28490
|
+
trackingConfig,
|
|
28491
|
+
legalEntity: legalEntityResponse,
|
|
28492
|
+
task: tasks[tasks.length - 1]
|
|
28493
|
+
});
|
|
28494
|
+
userEvents.addEvent("Clicked back to legal entity selection", {
|
|
28495
|
+
segmentation: baseTrackingPayload
|
|
28496
|
+
});
|
|
28497
|
+
onNavigateToTask(TaskTypes.BUSINESS_TYPE_SELECTION);
|
|
28498
|
+
};
|
|
28460
28499
|
return jsxs("div", {
|
|
28461
28500
|
children: [canSeeIntroduction && jsx("div", {
|
|
28462
28501
|
className: "adyen-task-list__nav",
|
|
@@ -28485,7 +28524,7 @@ function TaskListComponent({
|
|
|
28485
28524
|
icon: "edit",
|
|
28486
28525
|
ghost: true,
|
|
28487
28526
|
circle: true,
|
|
28488
|
-
onClick:
|
|
28527
|
+
onClick: onEditBusinessSetupClick,
|
|
28489
28528
|
className: "adl-u-margin-left-4",
|
|
28490
28529
|
type: "button"
|
|
28491
28530
|
})]
|
|
@@ -32290,7 +32329,11 @@ function DropinComposerComponent({
|
|
|
32290
32329
|
},
|
|
32291
32330
|
taskHistory,
|
|
32292
32331
|
setTaskHistory,
|
|
32293
|
-
onNavigateTo
|
|
32332
|
+
onNavigateTo,
|
|
32333
|
+
trackingConfig: {
|
|
32334
|
+
topLevelLegalEntity: legalEntityResponse
|
|
32335
|
+
},
|
|
32336
|
+
eventEmitter
|
|
32294
32337
|
})
|
|
32295
32338
|
});
|
|
32296
32339
|
case TaskTypes.INTRODUCTION:
|
|
@@ -32306,6 +32349,9 @@ function DropinComposerComponent({
|
|
|
32306
32349
|
return jsx(AccountSetupRejected, {});
|
|
32307
32350
|
case TaskTypes.TASKS_OVERVIEW:
|
|
32308
32351
|
return jsx(TaskListComponent, {
|
|
32352
|
+
trackingConfig: {
|
|
32353
|
+
topLevelLegalEntity: legalEntityResponse
|
|
32354
|
+
},
|
|
32309
32355
|
onNavigateToTask: navigateTo,
|
|
32310
32356
|
tasks,
|
|
32311
32357
|
legalEntityResponse: rootLegalEntity,
|
|
@@ -13,4 +13,4 @@ export declare enum BusinessTypeSelectionStep {
|
|
|
13
13
|
CONFIRM_BUSINESS_SETUP_CHANGE = 3
|
|
14
14
|
}
|
|
15
15
|
export declare const businessTypeSelectionStepTitles: Record<BusinessTypeSelectionStep, TranslationKey>;
|
|
16
|
-
export declare const BusinessTypeSelection: ({ legalEntityResponse, accountHolder, showTrustOption, showSolePropOption, onAccountHolderSelect, handleUpdateLegalEntity, taskHistory, setTaskHistory, onNavigateTo, }: BusinessTypeSelectionProps) => JSX.Element | null;
|
|
16
|
+
export declare const BusinessTypeSelection: ({ legalEntityResponse, accountHolder, showTrustOption, showSolePropOption, onAccountHolderSelect, handleUpdateLegalEntity, taskHistory, setTaskHistory, onNavigateTo, baseTrackingPayload, }: BusinessTypeSelectionProps) => JSX.Element | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ExistingLegalEntity } from '../../core/models/api/legal-entity';
|
|
2
2
|
import { TranslationKey } from '../../language/types';
|
|
3
|
-
import { DropinAPIHandlers } from '../Dropins/types';
|
|
3
|
+
import { DropinAPIHandlers, type DropinProps } from '../Dropins/types';
|
|
4
4
|
import { AccountHolderOption, LegalArrangementOption } from '../internal/AccountHolder/types';
|
|
5
5
|
import { TaskTypes } from '../TaskList/types';
|
|
6
|
-
export interface BusinessTypeSelectionProps extends DropinAPIHandlers {
|
|
6
|
+
export interface BusinessTypeSelectionProps extends DropinAPIHandlers, DropinProps {
|
|
7
7
|
legalEntityResponse: ExistingLegalEntity;
|
|
8
8
|
accountHolder?: AccountHolderOption;
|
|
9
9
|
showTrustOption: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../TaskList.scss';
|
|
2
2
|
import { TaskListComponentProps } from '../types';
|
|
3
|
-
declare function TaskListComponent({ tasks, onNavigateToTask, legalEntityResponse, capabilityProblems, onPciDownload, isReview, pciStatus, serviceAgreementTypes, serviceAgreementAcceptanceInfos, onTransferInstrumentDelete, }: TaskListComponentProps): import("preact").JSX.Element;
|
|
3
|
+
declare function TaskListComponent({ tasks, trackingConfig, onNavigateToTask, legalEntityResponse, capabilityProblems, onPciDownload, isReview, pciStatus, serviceAgreementTypes, serviceAgreementAcceptanceInfos, onTransferInstrumentDelete, }: TaskListComponentProps): import("preact").JSX.Element;
|
|
4
4
|
export default TaskListComponent;
|
|
@@ -66,6 +66,9 @@ export interface TaskListComponentProps {
|
|
|
66
66
|
onPciDownload?(): void;
|
|
67
67
|
country?: string;
|
|
68
68
|
onTransferInstrumentDelete: (id: string) => void;
|
|
69
|
+
trackingConfig?: {
|
|
70
|
+
topLevelLegalEntity: ExistingLegalEntity;
|
|
71
|
+
};
|
|
69
72
|
}
|
|
70
73
|
export interface TaskListGroupProps {
|
|
71
74
|
title: string;
|