@adyen/kyc-components 2.63.0 → 2.64.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 +61 -134
- package/dist/style.css +236 -112
- package/dist/types/components/internal/FormFields/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCardSelect.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +2 -2
- package/dist/types/core/analytics.d.ts +3 -1
- package/dist/types/core/models/api/analytics.d.ts +0 -1
- package/dist/types/core/user-events.d.ts +1 -1
- package/package.json +4 -3
- package/dist/types/components/AutoResizer.d.ts +0 -56
|
@@ -9697,9 +9697,8 @@ function TaxInformationField({
|
|
|
9697
9697
|
);
|
|
9698
9698
|
useEffect(() => {
|
|
9699
9699
|
const hasSavedTaxId = defaultData == null ? void 0 : defaultData.find((taxId) => taxId.country === country);
|
|
9700
|
-
if (currentCountryTaxInformation
|
|
9701
|
-
|
|
9702
|
-
}
|
|
9700
|
+
if ((currentCountryTaxInformation == null ? void 0 : currentCountryTaxInformation.country) === country) return;
|
|
9701
|
+
if (currentCountryTaxInformation && !hasSavedTaxId) return;
|
|
9703
9702
|
handleChangeFor("taxInformation", "input")(defaultData);
|
|
9704
9703
|
}, [country]);
|
|
9705
9704
|
const showTaxIdExemptedOptions = canExempt && (((_a = getTaxIdNumberOptions(country, companyType)) == null ? void 0 : _a.length) ?? 0) > 1;
|
|
@@ -11897,6 +11896,7 @@ function FinancialInformation(props) {
|
|
|
11897
11896
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
11898
11897
|
RadioGroup,
|
|
11899
11898
|
{
|
|
11899
|
+
name: "reportedValueOption",
|
|
11900
11900
|
...childProps,
|
|
11901
11901
|
value: data.reportedValueOption,
|
|
11902
11902
|
items: [
|
|
@@ -15971,6 +15971,7 @@ function IdVerificationMethodComponent(props) {
|
|
|
15971
15971
|
RadioCardSelect,
|
|
15972
15972
|
{
|
|
15973
15973
|
...childProps,
|
|
15974
|
+
name: "idVerificationMethod",
|
|
15974
15975
|
options: idVerificationMethods,
|
|
15975
15976
|
onSelect: handleChangeFor("idVerificationMethod"),
|
|
15976
15977
|
selected: data.idVerificationMethod,
|
|
@@ -17570,6 +17571,7 @@ const TypeOfIdentity = ({
|
|
|
17570
17571
|
Select,
|
|
17571
17572
|
{
|
|
17572
17573
|
...childProps,
|
|
17574
|
+
name: "typeOfIdentity",
|
|
17573
17575
|
isInvalid: false,
|
|
17574
17576
|
items: availableIdentityTypesOptions.map(({ id, name }) => ({
|
|
17575
17577
|
id,
|
|
@@ -17623,6 +17625,7 @@ const DriversLicense$1 = ({
|
|
|
17623
17625
|
Select,
|
|
17624
17626
|
{
|
|
17625
17627
|
...childProps,
|
|
17628
|
+
name: "issuerState",
|
|
17626
17629
|
onChange: onIssuerStateChange,
|
|
17627
17630
|
isInvalid: false,
|
|
17628
17631
|
items: auStates,
|
|
@@ -24935,7 +24938,6 @@ const applyVerifiedBusinessData = (verifiedBusiness, handleChangeFor) => {
|
|
|
24935
24938
|
};
|
|
24936
24939
|
const structuredList = "adyen-kyc-structured-list";
|
|
24937
24940
|
const structuredListListItem = "adyen-kyc-structured-list-list-item";
|
|
24938
|
-
const adyenLayoutMd = "adyen-layout-md";
|
|
24939
24941
|
const structuredListLabel = "adyen-kyc-structured-list-label";
|
|
24940
24942
|
const structuredListValue = "adyen-kyc-structured-list-value";
|
|
24941
24943
|
const styles$1 = {
|
|
@@ -24943,8 +24945,6 @@ const styles$1 = {
|
|
|
24943
24945
|
structuredList,
|
|
24944
24946
|
"structured-list-list-item": "adyen-kyc-structured-list-list-item",
|
|
24945
24947
|
structuredListListItem,
|
|
24946
|
-
"adyen-layout-md": "adyen-layout-md",
|
|
24947
|
-
adyenLayoutMd,
|
|
24948
24948
|
"structured-list-label": "adyen-kyc-structured-list-label",
|
|
24949
24949
|
structuredListLabel,
|
|
24950
24950
|
"structured-list-value": "adyen-kyc-structured-list-value",
|
|
@@ -26841,8 +26841,8 @@ function isEmptyEntity(legalEntity) {
|
|
|
26841
26841
|
const typeSpecificSection = legalEntity[type];
|
|
26842
26842
|
if (!typeSpecificSection) return true;
|
|
26843
26843
|
const fieldsOnEntity = getNestedPropertyKeys(typeSpecificSection, false, false);
|
|
26844
|
-
const sortedMinimumFields = minimumFields.
|
|
26845
|
-
const sortedFieldsOnEntity = fieldsOnEntity.
|
|
26844
|
+
const sortedMinimumFields = [...minimumFields].sort();
|
|
26845
|
+
const sortedFieldsOnEntity = [...fieldsOnEntity].sort();
|
|
26846
26846
|
return sortedFieldsOnEntity.every((value, index) => value === sortedMinimumFields[index]);
|
|
26847
26847
|
}
|
|
26848
26848
|
const capabilitiesToPreventTypeChange = [
|
|
@@ -28147,9 +28147,8 @@ async function submitDocuments({
|
|
|
28147
28147
|
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
28148
28148
|
formattedDocument.forEach((doc) => {
|
|
28149
28149
|
var _a;
|
|
28150
|
-
userEvents.
|
|
28150
|
+
userEvents.addTaskEvent("Success", {
|
|
28151
28151
|
...additionalTrackingParams,
|
|
28152
|
-
actionLevel: "task",
|
|
28153
28152
|
actionType: "upload",
|
|
28154
28153
|
documentType: doc.type,
|
|
28155
28154
|
fileExtention: ((_a = doc.attachments) == null ? void 0 : _a.map((item) => getFileExtention(item.pageName))) ?? []
|
|
@@ -28158,9 +28157,8 @@ async function submitDocuments({
|
|
|
28158
28157
|
}
|
|
28159
28158
|
} catch (err) {
|
|
28160
28159
|
logger2.error(err);
|
|
28161
|
-
userEvents.
|
|
28160
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
28162
28161
|
...additionalTrackingParams,
|
|
28163
|
-
actionLevel: "task",
|
|
28164
28162
|
actionType: "upload",
|
|
28165
28163
|
returnType: err.errorCode,
|
|
28166
28164
|
returnValue: err.title ?? err.message
|
|
@@ -28188,7 +28186,6 @@ async function submit({
|
|
|
28188
28186
|
setLoadingStatus("loading");
|
|
28189
28187
|
const trackingPayload = {
|
|
28190
28188
|
...additionalTrackingParams,
|
|
28191
|
-
actionLevel: "task",
|
|
28192
28189
|
actionType: "submit",
|
|
28193
28190
|
companyStructure: ((_a = data.companyStructure) == null ? void 0 : _a.entityType) ?? null,
|
|
28194
28191
|
countryOfRegistration: ((_b = data.basicInformation) == null ? void 0 : _b.country) ?? null,
|
|
@@ -28220,7 +28217,7 @@ async function submit({
|
|
|
28220
28217
|
forms
|
|
28221
28218
|
})
|
|
28222
28219
|
]);
|
|
28223
|
-
userEvents.
|
|
28220
|
+
userEvents.addTaskEvent("Success", trackingPayload);
|
|
28224
28221
|
clearToasts();
|
|
28225
28222
|
onExternalSubmit == null ? void 0 : onExternalSubmit(data);
|
|
28226
28223
|
} catch (err) {
|
|
@@ -28242,7 +28239,7 @@ async function submit({
|
|
|
28242
28239
|
showToast({ label: i18n.get("failedToUpdateDetails"), type: "error" });
|
|
28243
28240
|
}
|
|
28244
28241
|
logger2.error(err);
|
|
28245
|
-
userEvents.
|
|
28242
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
28246
28243
|
...trackingPayload,
|
|
28247
28244
|
returnType: err == null ? void 0 : err.errorCode,
|
|
28248
28245
|
returnValue: (err == null ? void 0 : err.title) || "backend"
|
|
@@ -28293,8 +28290,7 @@ function BusinessDetailsDropinComponent({
|
|
|
28293
28290
|
}, [currentState, onChange]);
|
|
28294
28291
|
useEffect(() => {
|
|
28295
28292
|
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
28296
|
-
userEvents.
|
|
28297
|
-
actionLevel: "task",
|
|
28293
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
28298
28294
|
actionType: "start",
|
|
28299
28295
|
...associatedLeTrackingParams
|
|
28300
28296
|
});
|
|
@@ -28861,9 +28857,8 @@ function CompanyDropinComponent({
|
|
|
28861
28857
|
}) : {};
|
|
28862
28858
|
useEffect(() => {
|
|
28863
28859
|
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
28864
|
-
userEvents.
|
|
28860
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
28865
28861
|
...associatedLeTrackingParams,
|
|
28866
|
-
actionLevel: "task",
|
|
28867
28862
|
actionType: "start"
|
|
28868
28863
|
});
|
|
28869
28864
|
}, []);
|
|
@@ -28946,9 +28941,8 @@ function CompanyDropinComponent({
|
|
|
28946
28941
|
if (formattedDocument) {
|
|
28947
28942
|
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
28948
28943
|
formattedDocument.forEach((doc) => {
|
|
28949
|
-
userEvents.
|
|
28944
|
+
userEvents.addTaskEvent("Success", {
|
|
28950
28945
|
...associatedLeTrackingParams,
|
|
28951
|
-
actionLevel: "task",
|
|
28952
28946
|
actionType: "save",
|
|
28953
28947
|
documentType: doc.type,
|
|
28954
28948
|
fileExtention: doc.attachments.map((item) => getFileExtention(item.pageName))
|
|
@@ -28984,7 +28978,6 @@ function CompanyDropinComponent({
|
|
|
28984
28978
|
let legalEntity = mapCompanyToLegalEntity(filteredData);
|
|
28985
28979
|
setLoadingStatus("loading");
|
|
28986
28980
|
const companyTrackingPayload = {
|
|
28987
|
-
actionLevel: "task",
|
|
28988
28981
|
actionType: "submit",
|
|
28989
28982
|
companyStructure: dataSubmitted.companyType.entityType,
|
|
28990
28983
|
countryOfRegistration: dataSubmitted.companyNameAndCountry.country,
|
|
@@ -29009,7 +29002,7 @@ function CompanyDropinComponent({
|
|
|
29009
29002
|
);
|
|
29010
29003
|
}
|
|
29011
29004
|
setAccountHolder(accountHolder);
|
|
29012
|
-
userEvents.
|
|
29005
|
+
userEvents.addTaskEvent("Success", {
|
|
29013
29006
|
...associatedLeTrackingParams,
|
|
29014
29007
|
...companyTrackingPayload,
|
|
29015
29008
|
legalEntityId: legalEntity.id,
|
|
@@ -29035,9 +29028,8 @@ function CompanyDropinComponent({
|
|
|
29035
29028
|
showToast({ label: i18n.get("failedToUpdateDetails"), type: "error" });
|
|
29036
29029
|
}
|
|
29037
29030
|
setLoadingStatus("success");
|
|
29038
|
-
userEvents.
|
|
29031
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
29039
29032
|
...associatedLeTrackingParams,
|
|
29040
|
-
actionLevel: "task",
|
|
29041
29033
|
actionType: "submit",
|
|
29042
29034
|
returnType: e.errorCode,
|
|
29043
29035
|
returnValue: e.title
|
|
@@ -30097,8 +30089,7 @@ const BusinessTypeSelection = ({
|
|
|
30097
30089
|
);
|
|
30098
30090
|
}, [data.businessType, data.legalArrangement, currentStep]);
|
|
30099
30091
|
useEffect(() => {
|
|
30100
|
-
userEvents.
|
|
30101
|
-
actionLevel: "task",
|
|
30092
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
30102
30093
|
actionType: "start"
|
|
30103
30094
|
});
|
|
30104
30095
|
}, []);
|
|
@@ -30145,7 +30136,6 @@ const BusinessTypeSelection = ({
|
|
|
30145
30136
|
};
|
|
30146
30137
|
const updateLegalEntityAndSelectAccountHolder = async () => {
|
|
30147
30138
|
const trackingPayload = {
|
|
30148
|
-
actionLevel: "task",
|
|
30149
30139
|
actionType: "submit"
|
|
30150
30140
|
};
|
|
30151
30141
|
try {
|
|
@@ -30155,7 +30145,7 @@ const BusinessTypeSelection = ({
|
|
|
30155
30145
|
type: targetLegalEntityType
|
|
30156
30146
|
};
|
|
30157
30147
|
await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity(updateLegalEntityPayload, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
|
|
30158
|
-
userEvents.
|
|
30148
|
+
userEvents.addTaskEvent("Success", trackingPayload);
|
|
30159
30149
|
}
|
|
30160
30150
|
if (targetLegalEntityType === LegalEntityType.INDIVIDUAL) {
|
|
30161
30151
|
if (hasSolePropInLegalEntity(legalEntityResponse)) {
|
|
@@ -30164,7 +30154,7 @@ const BusinessTypeSelection = ({
|
|
|
30164
30154
|
entityAssociations: []
|
|
30165
30155
|
};
|
|
30166
30156
|
await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity(updateLegalEntityPayload, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
|
|
30167
|
-
userEvents.
|
|
30157
|
+
userEvents.addTaskEvent("Success", trackingPayload);
|
|
30168
30158
|
}
|
|
30169
30159
|
return;
|
|
30170
30160
|
}
|
|
@@ -30182,7 +30172,7 @@ const BusinessTypeSelection = ({
|
|
|
30182
30172
|
},
|
|
30183
30173
|
legalEntityResponse == null ? void 0 : legalEntityResponse.id
|
|
30184
30174
|
));
|
|
30185
|
-
userEvents.
|
|
30175
|
+
userEvents.addTaskEvent("Success", trackingPayload);
|
|
30186
30176
|
}
|
|
30187
30177
|
} catch (e) {
|
|
30188
30178
|
showToast({ label: i18n.get("failedToUpdateDetails"), type: "error" });
|
|
@@ -30801,16 +30791,14 @@ const DecisionMakersComponent = ({
|
|
|
30801
30791
|
const uniqueDecisionMakers = mappedDecisionMakers ? Object.values(mappedDecisionMakers) : [];
|
|
30802
30792
|
const showWarning = Boolean(remediationMessages.DECISION_MAKER && uniqueDecisionMakers.length);
|
|
30803
30793
|
useEffect(() => {
|
|
30804
|
-
userEvents.
|
|
30805
|
-
actionLevel: "task",
|
|
30794
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
30806
30795
|
actionType: "start"
|
|
30807
30796
|
});
|
|
30808
30797
|
}, []);
|
|
30809
30798
|
useEffect(() => {
|
|
30810
30799
|
if (showWarning) {
|
|
30811
|
-
userEvents.
|
|
30800
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
30812
30801
|
task: TaskTypes.DECISION_MAKER_OVERVIEW,
|
|
30813
|
-
actionLevel: "task",
|
|
30814
30802
|
actionType: "alert",
|
|
30815
30803
|
label: remediationMessages.DECISION_MAKER
|
|
30816
30804
|
});
|
|
@@ -30834,9 +30822,8 @@ const DecisionMakersComponent = ({
|
|
|
30834
30822
|
};
|
|
30835
30823
|
const editDecisionMaker = (decisionMaker) => {
|
|
30836
30824
|
onNavigateToIndividual(decisionMaker.reference);
|
|
30837
|
-
userEvents.
|
|
30825
|
+
userEvents.addTaskEvent("Clicked button", {
|
|
30838
30826
|
...getDecisionMakerTrackingParams(decisionMaker),
|
|
30839
|
-
actionLevel: "task",
|
|
30840
30827
|
actionType: "edit"
|
|
30841
30828
|
});
|
|
30842
30829
|
};
|
|
@@ -30852,9 +30839,8 @@ const DecisionMakersComponent = ({
|
|
|
30852
30839
|
const remainingDecisionMakers = decisionMakers.filter(
|
|
30853
30840
|
(curr) => curr.legalEntityId !== decisionMaker.reference
|
|
30854
30841
|
);
|
|
30855
|
-
userEvents.
|
|
30842
|
+
userEvents.addTaskEvent("Clicked button", {
|
|
30856
30843
|
...getDecisionMakerTrackingParams(decisionMaker),
|
|
30857
|
-
actionLevel: "task",
|
|
30858
30844
|
actionType: "remove",
|
|
30859
30845
|
remainingDecisionMakers
|
|
30860
30846
|
});
|
|
@@ -30946,9 +30932,8 @@ const DecisionMakersComponent = ({
|
|
|
30946
30932
|
ActionBar,
|
|
30947
30933
|
{
|
|
30948
30934
|
onHome: () => {
|
|
30949
|
-
userEvents.
|
|
30935
|
+
userEvents.addTaskEvent("Clicked button", {
|
|
30950
30936
|
task: TaskTypes.DECISION_MAKER_OVERVIEW,
|
|
30951
|
-
actionLevel: "task",
|
|
30952
30937
|
actionType: "back",
|
|
30953
30938
|
label: translationKeys.home,
|
|
30954
30939
|
noOfDecisionMakers: decisionMakers.length
|
|
@@ -31131,8 +31116,7 @@ const Introduction = ({
|
|
|
31131
31116
|
page: (introductionScreens == null ? void 0 : introductionScreens.length) ? introductionScreens[activeIndex] : void 0
|
|
31132
31117
|
};
|
|
31133
31118
|
useEffect(() => {
|
|
31134
|
-
userEvents.
|
|
31135
|
-
actionLevel: "task",
|
|
31119
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
31136
31120
|
actionType: "start"
|
|
31137
31121
|
});
|
|
31138
31122
|
}, []);
|
|
@@ -31203,8 +31187,7 @@ const Introduction = ({
|
|
|
31203
31187
|
{
|
|
31204
31188
|
label: i18n.get(translationKeys.start),
|
|
31205
31189
|
onClick: () => {
|
|
31206
|
-
userEvents.
|
|
31207
|
-
actionLevel: "task",
|
|
31190
|
+
userEvents.addTaskEvent("Success", {
|
|
31208
31191
|
actionType: "submit",
|
|
31209
31192
|
label: translationKeys.start
|
|
31210
31193
|
});
|
|
@@ -31846,18 +31829,16 @@ function TaskListComponent({
|
|
|
31846
31829
|
const companyTaskDescriptionKey = isReview ? "businessAccountDetailsDescriptionReview" : "businessAccountDetailsDescription";
|
|
31847
31830
|
const payoutTaskDescriptionKey = isReview ? "payoutAccountsDescriptionReview" : "payoutAccountsDescription";
|
|
31848
31831
|
const onEditBusinessSetupClick = () => {
|
|
31849
|
-
userEvents.
|
|
31832
|
+
userEvents.addTaskEvent("Clicked button", {
|
|
31850
31833
|
task: TaskTypes.TASKS_OVERVIEW,
|
|
31851
|
-
actionLevel: "task",
|
|
31852
31834
|
actionType: "edit"
|
|
31853
31835
|
});
|
|
31854
31836
|
onNavigateToTask(TaskTypes.BUSINESS_TYPE_SELECTION);
|
|
31855
31837
|
};
|
|
31856
31838
|
useEffect(() => {
|
|
31857
31839
|
if (showDecisionMakersWarning) {
|
|
31858
|
-
userEvents.
|
|
31840
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
31859
31841
|
task: TaskTypes.TASKS_OVERVIEW,
|
|
31860
|
-
actionLevel: "task",
|
|
31861
31842
|
actionType: "alert",
|
|
31862
31843
|
label: remediationMessages.DECISION_MAKER
|
|
31863
31844
|
});
|
|
@@ -32628,9 +32609,8 @@ function IndividualDropinComponent({
|
|
|
32628
32609
|
});
|
|
32629
32610
|
useEffect(() => {
|
|
32630
32611
|
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
32631
|
-
userEvents.
|
|
32612
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
32632
32613
|
...associatedLeTrackingParams,
|
|
32633
|
-
actionLevel: "task",
|
|
32634
32614
|
actionType: "start"
|
|
32635
32615
|
});
|
|
32636
32616
|
}, []);
|
|
@@ -32761,9 +32741,8 @@ function IndividualDropinComponent({
|
|
|
32761
32741
|
throw new Error("Provide handler to create legalEntity");
|
|
32762
32742
|
}
|
|
32763
32743
|
updatedLegalEntity = await handleCreateLegalEntity(legalEntity);
|
|
32764
|
-
userEvents.
|
|
32744
|
+
userEvents.addTaskEvent("Success", {
|
|
32765
32745
|
...associatedLeTrackingParams,
|
|
32766
|
-
actionLevel: "task",
|
|
32767
32746
|
actionType: "submit",
|
|
32768
32747
|
legalEntityId: updatedLegalEntity.id,
|
|
32769
32748
|
entityType: updatedLegalEntity.type,
|
|
@@ -32772,9 +32751,8 @@ function IndividualDropinComponent({
|
|
|
32772
32751
|
});
|
|
32773
32752
|
} else {
|
|
32774
32753
|
updatedLegalEntity = await handleUpdateLegalEntity(drop("type").from(legalEntity), leId);
|
|
32775
|
-
userEvents.
|
|
32754
|
+
userEvents.addTaskEvent("Success", {
|
|
32776
32755
|
...associatedLeTrackingParams,
|
|
32777
|
-
actionLevel: "task",
|
|
32778
32756
|
actionType: "submit",
|
|
32779
32757
|
legalEntityId: updatedLegalEntity.id,
|
|
32780
32758
|
entityType: updatedLegalEntity.type,
|
|
@@ -32814,9 +32792,8 @@ function IndividualDropinComponent({
|
|
|
32814
32792
|
);
|
|
32815
32793
|
uploadedDocuments == null ? void 0 : uploadedDocuments.forEach((doc) => {
|
|
32816
32794
|
var _a3;
|
|
32817
|
-
userEvents.
|
|
32795
|
+
userEvents.addTaskEvent("Success", {
|
|
32818
32796
|
...associatedLeTrackingParams,
|
|
32819
|
-
actionLevel: "task",
|
|
32820
32797
|
actionType: "upload",
|
|
32821
32798
|
documentType: doc.type,
|
|
32822
32799
|
fileExtention: ((_a3 = doc == null ? void 0 : doc.attachments) == null ? void 0 : _a3.map((item) => getFileExtention(item.pageName))) ?? null
|
|
@@ -32923,9 +32900,8 @@ function IndividualDropinComponent({
|
|
|
32923
32900
|
showToast({ label: i18n.get("failedToUpdateDetails"), type: "error" });
|
|
32924
32901
|
}
|
|
32925
32902
|
setLoadingStatus("success");
|
|
32926
|
-
userEvents.
|
|
32903
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
32927
32904
|
...associatedLeTrackingParams,
|
|
32928
|
-
actionLevel: "task",
|
|
32929
32905
|
actionType: "submit",
|
|
32930
32906
|
returnType: e.errorCode,
|
|
32931
32907
|
returnValue: e.title
|
|
@@ -33315,8 +33291,7 @@ function PayoutDetailsDropinComponent({
|
|
|
33315
33291
|
const existingBankAccountFormat = transferInstrument ? ((_d = existingPayoutDetails == null ? void 0 : existingPayoutDetails.payoutAccountDetails) == null ? void 0 : _d.iban) ? "iban" : "local" : void 0;
|
|
33316
33292
|
useEffect(() => {
|
|
33317
33293
|
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
33318
|
-
userEvents.
|
|
33319
|
-
actionLevel: "task",
|
|
33294
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
33320
33295
|
actionType: "start"
|
|
33321
33296
|
});
|
|
33322
33297
|
}, []);
|
|
@@ -33443,8 +33418,7 @@ function PayoutDetailsDropinComponent({
|
|
|
33443
33418
|
);
|
|
33444
33419
|
documents2.forEach((document2) => {
|
|
33445
33420
|
var _a2;
|
|
33446
|
-
userEvents.
|
|
33447
|
-
actionLevel: "task",
|
|
33421
|
+
userEvents.addTaskEvent("Success", {
|
|
33448
33422
|
actionType: "upload",
|
|
33449
33423
|
documentType: document2.type,
|
|
33450
33424
|
fileExtention: ((_a2 = document2.attachments) == null ? void 0 : _a2.map((item) => getFileExtention(item.pageName))) ?? null
|
|
@@ -33480,7 +33454,6 @@ function PayoutDetailsDropinComponent({
|
|
|
33480
33454
|
);
|
|
33481
33455
|
}
|
|
33482
33456
|
const baseTracking = {
|
|
33483
|
-
actionLevel: "task",
|
|
33484
33457
|
actionType: "submit",
|
|
33485
33458
|
documentType: DocumentType.BANK_STATEMENT,
|
|
33486
33459
|
bankCountry: (payoutVerificationMethod == null ? void 0 : payoutVerificationMethod.bankCountry) ?? defaultPayoutCountry,
|
|
@@ -33501,7 +33474,7 @@ function PayoutDetailsDropinComponent({
|
|
|
33501
33474
|
transferInstrumentId
|
|
33502
33475
|
);
|
|
33503
33476
|
}
|
|
33504
|
-
userEvents.
|
|
33477
|
+
userEvents.addTaskEvent("Success", baseTracking);
|
|
33505
33478
|
try {
|
|
33506
33479
|
await submitDocuments2({ forms, transferInstrument: transferInstrument2, dataSubmitted });
|
|
33507
33480
|
setLoadingStatus("success");
|
|
@@ -33530,7 +33503,7 @@ function PayoutDetailsDropinComponent({
|
|
|
33530
33503
|
showToast({ label: i18n.get("failedToUpdateDetails"), type: "error" });
|
|
33531
33504
|
}
|
|
33532
33505
|
setLoadingStatus("success");
|
|
33533
|
-
userEvents.
|
|
33506
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
33534
33507
|
...baseTracking,
|
|
33535
33508
|
returnType: (e == null ? void 0 : e.errorCode) || "backend",
|
|
33536
33509
|
returnValue: (e == null ? void 0 : e.title) || (e == null ? void 0 : e.message)
|
|
@@ -33603,8 +33576,7 @@ function PayoutDetailsDropinComponent({
|
|
|
33603
33576
|
if (trustedTransferInstrumentId) {
|
|
33604
33577
|
externalOnSubmit == null ? void 0 : externalOnSubmit({ ...data, id: trustedTransferInstrumentId });
|
|
33605
33578
|
}
|
|
33606
|
-
userEvents.
|
|
33607
|
-
actionLevel: "task",
|
|
33579
|
+
userEvents.addTaskEvent("Success", {
|
|
33608
33580
|
actionType: "submit"
|
|
33609
33581
|
});
|
|
33610
33582
|
navigateBackToTaskList == null ? void 0 : navigateBackToTaskList();
|
|
@@ -33753,7 +33725,6 @@ function PciDropinComponent({
|
|
|
33753
33725
|
const handleSignClick = async () => {
|
|
33754
33726
|
if (loadingStatus === "loading") return;
|
|
33755
33727
|
const baseTracking = {
|
|
33756
|
-
actionLevel: "task",
|
|
33757
33728
|
actionType: "sign",
|
|
33758
33729
|
label: translationKeys.sign
|
|
33759
33730
|
};
|
|
@@ -33764,19 +33735,19 @@ function PciDropinComponent({
|
|
|
33764
33735
|
await handleSign(legalEntityResponse.id, { signedBy: data.signer, pciTemplateReferences });
|
|
33765
33736
|
setLoadingStatus("success");
|
|
33766
33737
|
showToast({ label: i18n.get("pciSignedSuccessfully"), type: "success" });
|
|
33767
|
-
userEvents.
|
|
33738
|
+
userEvents.addTaskEvent("Success", baseTracking);
|
|
33768
33739
|
goHome();
|
|
33769
33740
|
} catch (e) {
|
|
33770
33741
|
setLoadingStatus("success");
|
|
33771
33742
|
showToast({ label: i18n.get("pciSignFailed"), type: "error" });
|
|
33772
|
-
userEvents.
|
|
33743
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
33773
33744
|
...baseTracking,
|
|
33774
33745
|
returnType: (e == null ? void 0 : e.errorCode) || "backend",
|
|
33775
33746
|
returnValue: (e == null ? void 0 : e.title) ?? (e == null ? void 0 : e.message)
|
|
33776
33747
|
});
|
|
33777
33748
|
}
|
|
33778
33749
|
} else {
|
|
33779
|
-
userEvents.
|
|
33750
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
33780
33751
|
...baseTracking,
|
|
33781
33752
|
returnType: "validation",
|
|
33782
33753
|
returnValue: Object.entries(valid).filter(([, value]) => !value).map(([key]) => key)
|
|
@@ -33798,8 +33769,7 @@ function PciDropinComponent({
|
|
|
33798
33769
|
};
|
|
33799
33770
|
useEffect(() => {
|
|
33800
33771
|
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
33801
|
-
userEvents.
|
|
33802
|
-
actionLevel: "task",
|
|
33772
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
33803
33773
|
actionType: "start"
|
|
33804
33774
|
});
|
|
33805
33775
|
}, []);
|
|
@@ -34233,6 +34203,7 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
34233
34203
|
RadioCardSelect,
|
|
34234
34204
|
{
|
|
34235
34205
|
...childProps,
|
|
34206
|
+
name: "entityType",
|
|
34236
34207
|
options: trustMemberLegalEntityTypes,
|
|
34237
34208
|
onSelect: onEntityTypeChange,
|
|
34238
34209
|
selected: data.entityType,
|
|
@@ -34777,7 +34748,6 @@ function ServiceAgreementDropinComponent({
|
|
|
34777
34748
|
const signers = getSigners();
|
|
34778
34749
|
const handleSignClick = async () => {
|
|
34779
34750
|
const baseTracking = {
|
|
34780
|
-
actionLevel: "task",
|
|
34781
34751
|
actionType: "sign"
|
|
34782
34752
|
};
|
|
34783
34753
|
triggerValidation();
|
|
@@ -34791,20 +34761,20 @@ function ServiceAgreementDropinComponent({
|
|
|
34791
34761
|
label: i18n.get("serviceAgreementSignedSuccessfully"),
|
|
34792
34762
|
type: "success"
|
|
34793
34763
|
});
|
|
34794
|
-
userEvents.
|
|
34764
|
+
userEvents.addTaskEvent("Success", baseTracking);
|
|
34795
34765
|
data.acceptServiceAgreement = false;
|
|
34796
34766
|
data.signer = void 0;
|
|
34797
34767
|
} catch (e) {
|
|
34798
34768
|
setLoadingStatus("success");
|
|
34799
34769
|
showToast({ label: i18n.get("serviceAgreementSignFailed"), type: "error" });
|
|
34800
|
-
userEvents.
|
|
34770
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
34801
34771
|
...baseTracking,
|
|
34802
34772
|
returnType: (e == null ? void 0 : e.errorCode) || "backend",
|
|
34803
34773
|
returnValue: (e == null ? void 0 : e.title) ?? (e == null ? void 0 : e.message)
|
|
34804
34774
|
});
|
|
34805
34775
|
}
|
|
34806
34776
|
} else {
|
|
34807
|
-
userEvents.
|
|
34777
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
34808
34778
|
...baseTracking,
|
|
34809
34779
|
returnType: "validation",
|
|
34810
34780
|
returnValue: Object.entries(valid).filter(([, value]) => !value).map(([key]) => key)
|
|
@@ -34830,8 +34800,7 @@ function ServiceAgreementDropinComponent({
|
|
|
34830
34800
|
gotoForm(serviceAgreementAcceptanceInfos.length - 1);
|
|
34831
34801
|
}, [serviceAgreementAcceptanceInfos]);
|
|
34832
34802
|
useEffect(() => {
|
|
34833
|
-
userEvents.
|
|
34834
|
-
actionLevel: "task",
|
|
34803
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
34835
34804
|
actionType: "start"
|
|
34836
34805
|
});
|
|
34837
34806
|
const initialFormIndex = forms.length === signedForms.length ? 0 : signedForms.length;
|
|
@@ -35776,7 +35745,7 @@ const useNavigation = ({
|
|
|
35776
35745
|
};
|
|
35777
35746
|
}, [navigateTo]);
|
|
35778
35747
|
useEffect(() => {
|
|
35779
|
-
const pushedTask = taskHistory.
|
|
35748
|
+
const pushedTask = taskHistory[taskHistory.length - 1];
|
|
35780
35749
|
if (pushedTask === "default") {
|
|
35781
35750
|
const defaultTask = getDefaultTask({
|
|
35782
35751
|
legalEntity,
|
|
@@ -35798,8 +35767,8 @@ const useNavigation = ({
|
|
|
35798
35767
|
taskHistory
|
|
35799
35768
|
]);
|
|
35800
35769
|
return {
|
|
35801
|
-
currentTask: actualTasks.
|
|
35802
|
-
previousTask: actualTasks.
|
|
35770
|
+
currentTask: actualTasks[actualTasks.length - 1],
|
|
35771
|
+
previousTask: actualTasks[actualTasks.length - 2],
|
|
35803
35772
|
navigateBack,
|
|
35804
35773
|
navigateTo
|
|
35805
35774
|
};
|
|
@@ -36338,9 +36307,8 @@ function DropinComposerComponent({
|
|
|
36338
36307
|
} catch (e) {
|
|
36339
36308
|
showToast({ label: i18n.get("failedToDownloadPci"), type: "error" });
|
|
36340
36309
|
} finally {
|
|
36341
|
-
userEvents.
|
|
36310
|
+
userEvents.addTaskEvent("Clicked button", {
|
|
36342
36311
|
task: TaskTypes.PCI_DSS,
|
|
36343
|
-
actionLevel: "task",
|
|
36344
36312
|
actionType: "download"
|
|
36345
36313
|
});
|
|
36346
36314
|
}
|
|
@@ -39337,7 +39305,6 @@ const useAnalytics = async ({
|
|
|
39337
39305
|
sdkVersion,
|
|
39338
39306
|
componentName
|
|
39339
39307
|
}) => {
|
|
39340
|
-
const { i18n } = useI18nContext();
|
|
39341
39308
|
const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
|
|
39342
39309
|
const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
|
|
39343
39310
|
useEffect(() => {
|
|
@@ -39346,8 +39313,7 @@ const useAnalytics = async ({
|
|
|
39346
39313
|
sdkVersion,
|
|
39347
39314
|
componentName,
|
|
39348
39315
|
userAgent: navigator.userAgent,
|
|
39349
|
-
legalEntityId
|
|
39350
|
-
locale: i18n.locale
|
|
39316
|
+
legalEntityId
|
|
39351
39317
|
};
|
|
39352
39318
|
if (isEmbeddedDropin) {
|
|
39353
39319
|
try {
|
|
@@ -39667,7 +39633,7 @@ const ConfigurationApiProvider = ({
|
|
|
39667
39633
|
}) => {
|
|
39668
39634
|
const authContext = useAuthContext();
|
|
39669
39635
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
39670
|
-
const sdkVersion = "2.
|
|
39636
|
+
const sdkVersion = "2.64.0";
|
|
39671
39637
|
useAnalytics({
|
|
39672
39638
|
onUserEvent,
|
|
39673
39639
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40135,48 +40101,6 @@ function ToastContextProvider({ children }) {
|
|
|
40135
40101
|
children
|
|
40136
40102
|
] });
|
|
40137
40103
|
}
|
|
40138
|
-
const layoutBreakpointClassnames = {
|
|
40139
|
-
xsOnly: "adyen-layout-xs-only",
|
|
40140
|
-
md: "adyen-layout-md",
|
|
40141
|
-
lg: "adyen-layout-lg"
|
|
40142
|
-
};
|
|
40143
|
-
const layoutBreakpointSizes = {
|
|
40144
|
-
md: 680,
|
|
40145
|
-
lg: 1024
|
|
40146
|
-
};
|
|
40147
|
-
const getBreakpointClassNames = (containerSize) => {
|
|
40148
|
-
const breakPoints = Object.entries(layoutBreakpointSizes);
|
|
40149
|
-
const classes = breakPoints.reduce((acc, [bp, size]) => {
|
|
40150
|
-
if (size <= containerSize) acc.push(layoutBreakpointClassnames[bp]);
|
|
40151
|
-
return acc;
|
|
40152
|
-
}, []);
|
|
40153
|
-
return classes.length > 0 ? classes : ["adyen-layout-xs-only"];
|
|
40154
|
-
};
|
|
40155
|
-
const assignLayoutClasses = (entries, container) => {
|
|
40156
|
-
let newClasses = [];
|
|
40157
|
-
entries.forEach((entry) => {
|
|
40158
|
-
var _a;
|
|
40159
|
-
const parentWidth = (_a = entry.contentBoxSize) == null ? void 0 : _a[0].inlineSize;
|
|
40160
|
-
if (parentWidth) {
|
|
40161
|
-
newClasses = getBreakpointClassNames(parentWidth);
|
|
40162
|
-
} else {
|
|
40163
|
-
newClasses.push(layoutBreakpointClassnames.lg);
|
|
40164
|
-
}
|
|
40165
|
-
container.classList.remove(...Object.values(layoutBreakpointClassnames));
|
|
40166
|
-
container.classList.add(...newClasses);
|
|
40167
|
-
});
|
|
40168
|
-
};
|
|
40169
|
-
const AutoResizer = ({ children }) => {
|
|
40170
|
-
const containerRef = useRef(null);
|
|
40171
|
-
useEffect(() => {
|
|
40172
|
-
const container = containerRef.current;
|
|
40173
|
-
if (!container) return;
|
|
40174
|
-
const resizeObserver = new ResizeObserver((entries) => assignLayoutClasses(entries, container));
|
|
40175
|
-
resizeObserver.observe(container);
|
|
40176
|
-
return () => resizeObserver.unobserve(container);
|
|
40177
|
-
});
|
|
40178
|
-
return /* @__PURE__ */ jsx("div", { ref: containerRef, "data-testid": "auto-resizer-content", children });
|
|
40179
|
-
};
|
|
40180
40104
|
class EventEmitter {
|
|
40181
40105
|
constructor() {
|
|
40182
40106
|
this.listeners = {
|
|
@@ -40343,7 +40267,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40343
40267
|
};
|
|
40344
40268
|
const copyToClipboard = async () => {
|
|
40345
40269
|
const toCopy = {
|
|
40346
|
-
sdkVersion: "2.
|
|
40270
|
+
sdkVersion: "2.64.0",
|
|
40347
40271
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40348
40272
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40349
40273
|
};
|
|
@@ -40408,7 +40332,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40408
40332
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
40409
40333
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40410
40334
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
40411
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.
|
|
40335
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.64.0" })
|
|
40412
40336
|
] }) }),
|
|
40413
40337
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40414
40338
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|
|
@@ -40586,7 +40510,7 @@ class UIElement extends BaseElement {
|
|
|
40586
40510
|
{
|
|
40587
40511
|
rootLegalEntityId,
|
|
40588
40512
|
handleGetLegalEntity: "handleGetLegalEntity" in this.props.componentProps ? this.props.componentProps.handleGetLegalEntity : void 0,
|
|
40589
|
-
children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container-wrapper", children: /* @__PURE__ */ jsx(
|
|
40513
|
+
children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container-wrapper", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container", children: /* @__PURE__ */ jsx(ToastContextProvider, { children: /* @__PURE__ */ jsx(StateProvider, { children: /* @__PURE__ */ jsx(Component, { ...this.props.componentProps, onUnmount: this.remove }) }) }) }) })
|
|
40590
40514
|
}
|
|
40591
40515
|
)
|
|
40592
40516
|
}
|
|
@@ -41131,6 +41055,9 @@ class Core {
|
|
|
41131
41055
|
this.initializeSession();
|
|
41132
41056
|
}
|
|
41133
41057
|
}
|
|
41058
|
+
if (CSS.supports("container", "foo / inline-size") === false) {
|
|
41059
|
+
import("container-query-polyfill");
|
|
41060
|
+
}
|
|
41134
41061
|
export {
|
|
41135
41062
|
Core as default
|
|
41136
41063
|
};
|