@adyen/kyc-components 2.61.0 → 2.61.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.
|
@@ -44,7 +44,6 @@ class UserEvents {
|
|
|
44
44
|
addEvent(eventName, properties) {
|
|
45
45
|
const completeEvent = { ...this.baseTrackingPayload, ...properties };
|
|
46
46
|
this.add({ type: "add_event", name: eventName, properties: { ...completeEvent } });
|
|
47
|
-
console.log("addevent", "name", eventName, completeEvent);
|
|
48
47
|
this.notifySubscribers();
|
|
49
48
|
}
|
|
50
49
|
/**
|
|
@@ -24133,7 +24132,7 @@ const useFormComposer = ({
|
|
|
24133
24132
|
...baseTrackingPayload,
|
|
24134
24133
|
actionLevel: "page",
|
|
24135
24134
|
actionType: "next",
|
|
24136
|
-
page:
|
|
24135
|
+
page: formName
|
|
24137
24136
|
});
|
|
24138
24137
|
};
|
|
24139
24138
|
const gotoFormByFormIndex = (nextFormIndex) => {
|
|
@@ -30788,7 +30787,9 @@ const DecisionMakersComponent = ({
|
|
|
30788
30787
|
const decisionMakers = getOwnDecisionMakers(legalEntityResponse);
|
|
30789
30788
|
const registeredCountry = (_b = (_a = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _a.registeredAddress) == null ? void 0 : _b.country;
|
|
30790
30789
|
const availableDecisionMakers = getAvailableDecisionMakerRoleTypes(registeredCountry);
|
|
30791
|
-
const
|
|
30790
|
+
const translationKeys = {
|
|
30791
|
+
home: "saveAndGoToOverview"
|
|
30792
|
+
};
|
|
30792
30793
|
const { remediationMessages } = useDataMissingRemediations({
|
|
30793
30794
|
legalEntityId: legalEntityResponse.id,
|
|
30794
30795
|
problems: capabilityProblems
|
|
@@ -30820,7 +30821,7 @@ const DecisionMakersComponent = ({
|
|
|
30820
30821
|
label: remediationMessages.DECISION_MAKER
|
|
30821
30822
|
});
|
|
30822
30823
|
}
|
|
30823
|
-
}, [showWarning]);
|
|
30824
|
+
}, [remediationMessages.DECISION_MAKER, showWarning]);
|
|
30824
30825
|
const uniqueDecisionMakersPerType = (roleType) => uniqueDecisionMakers.filter(({ types }) => types.includes(roleType)).length;
|
|
30825
30826
|
const allowedDecisionMakerTypes = getAllowedDecisionMakerRoles(
|
|
30826
30827
|
legalEntityResponse,
|
|
@@ -30957,12 +30958,12 @@ const DecisionMakersComponent = ({
|
|
|
30957
30958
|
task: TaskTypes.DECISION_MAKER_OVERVIEW,
|
|
30958
30959
|
actionLevel: "task",
|
|
30959
30960
|
actionType: "back",
|
|
30960
|
-
label:
|
|
30961
|
+
label: translationKeys.home,
|
|
30961
30962
|
noOfDecisionMakers: decisionMakers.length
|
|
30962
30963
|
});
|
|
30963
30964
|
navigateBackToTaskList();
|
|
30964
30965
|
},
|
|
30965
|
-
homeButtonLabel
|
|
30966
|
+
homeButtonLabel: i18n.get(translationKeys.home)
|
|
30966
30967
|
}
|
|
30967
30968
|
)
|
|
30968
30969
|
] })
|
|
@@ -31147,11 +31148,11 @@ const Introduction = ({
|
|
|
31147
31148
|
onExitIntroduction();
|
|
31148
31149
|
}
|
|
31149
31150
|
}, [introductionScreens]);
|
|
31150
|
-
const
|
|
31151
|
-
skip:
|
|
31152
|
-
back:
|
|
31153
|
-
next:
|
|
31154
|
-
start:
|
|
31151
|
+
const translationKeys = {
|
|
31152
|
+
skip: "goToOverviewFromIntroduction",
|
|
31153
|
+
back: "back",
|
|
31154
|
+
next: "next",
|
|
31155
|
+
start: "start"
|
|
31155
31156
|
};
|
|
31156
31157
|
return (introductionScreens == null ? void 0 : introductionScreens.length) ? /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-introduction", children: [
|
|
31157
31158
|
/* @__PURE__ */ jsx(
|
|
@@ -31164,12 +31165,12 @@ const Introduction = ({
|
|
|
31164
31165
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-introduction__skip", children: /* @__PURE__ */ jsx(
|
|
31165
31166
|
Button,
|
|
31166
31167
|
{
|
|
31167
|
-
label:
|
|
31168
|
+
label: i18n.get(translationKeys.skip),
|
|
31168
31169
|
onClick: () => {
|
|
31169
31170
|
userEvents.addEvent("Clicked button", {
|
|
31170
31171
|
...pageEventDetails,
|
|
31171
31172
|
actionType: "skip",
|
|
31172
|
-
label:
|
|
31173
|
+
label: translationKeys.skip
|
|
31173
31174
|
});
|
|
31174
31175
|
onExitIntroduction();
|
|
31175
31176
|
},
|
|
@@ -31191,12 +31192,12 @@ const Introduction = ({
|
|
|
31191
31192
|
Button,
|
|
31192
31193
|
{
|
|
31193
31194
|
disabled: activeIndex === 0,
|
|
31194
|
-
label:
|
|
31195
|
+
label: i18n.get(translationKeys.back),
|
|
31195
31196
|
onClick: () => {
|
|
31196
31197
|
userEvents.addEvent("Clicked button", {
|
|
31197
31198
|
...pageEventDetails,
|
|
31198
31199
|
actionType: "back",
|
|
31199
|
-
label:
|
|
31200
|
+
label: translationKeys.back
|
|
31200
31201
|
});
|
|
31201
31202
|
setActiveIndex((currentValue) => currentValue - 1);
|
|
31202
31203
|
},
|
|
@@ -31207,12 +31208,12 @@ const Introduction = ({
|
|
|
31207
31208
|
activeIndex + 1 === introductionScreens.length ? /* @__PURE__ */ jsx(
|
|
31208
31209
|
Button,
|
|
31209
31210
|
{
|
|
31210
|
-
label:
|
|
31211
|
+
label: i18n.get(translationKeys.start),
|
|
31211
31212
|
onClick: () => {
|
|
31212
31213
|
userEvents.addEvent("Success", {
|
|
31213
31214
|
actionLevel: "task",
|
|
31214
31215
|
actionType: "start",
|
|
31215
|
-
label:
|
|
31216
|
+
label: translationKeys.start
|
|
31216
31217
|
});
|
|
31217
31218
|
onExitIntroduction();
|
|
31218
31219
|
},
|
|
@@ -31221,12 +31222,12 @@ const Introduction = ({
|
|
|
31221
31222
|
) : /* @__PURE__ */ jsx(
|
|
31222
31223
|
Button,
|
|
31223
31224
|
{
|
|
31224
|
-
label:
|
|
31225
|
+
label: i18n.get(translationKeys.next),
|
|
31225
31226
|
onClick: () => {
|
|
31226
31227
|
userEvents.addEvent("Clicked button", {
|
|
31227
31228
|
...pageEventDetails,
|
|
31228
31229
|
actionType: "next",
|
|
31229
|
-
label:
|
|
31230
|
+
label: translationKeys.next
|
|
31230
31231
|
});
|
|
31231
31232
|
setActiveIndex((currentValue) => currentValue + 1);
|
|
31232
31233
|
},
|
|
@@ -33729,8 +33730,10 @@ function PciDropinComponent({
|
|
|
33729
33730
|
const { showToast } = useToastContext();
|
|
33730
33731
|
const [loadingStatus, setLoadingStatus] = useState();
|
|
33731
33732
|
const hasExpired = useHasExpired();
|
|
33732
|
-
const
|
|
33733
|
-
|
|
33733
|
+
const translationKeys = {
|
|
33734
|
+
sign: "sign",
|
|
33735
|
+
home: "goToOverview"
|
|
33736
|
+
};
|
|
33734
33737
|
const { handleChangeFor, triggerValidation, data, valid, isValid, errors } = useForm({
|
|
33735
33738
|
schema: PciFields,
|
|
33736
33739
|
rules: pciValidationRules
|
|
@@ -33760,7 +33763,7 @@ function PciDropinComponent({
|
|
|
33760
33763
|
const baseTracking = {
|
|
33761
33764
|
actionLevel: "task",
|
|
33762
33765
|
actionType: "sign",
|
|
33763
|
-
label:
|
|
33766
|
+
label: translationKeys.sign
|
|
33764
33767
|
};
|
|
33765
33768
|
userEvents.addEvent("Clicked button", baseTracking);
|
|
33766
33769
|
triggerValidation();
|
|
@@ -33793,7 +33796,7 @@ function PciDropinComponent({
|
|
|
33793
33796
|
userEvents.addEvent("Clicked button", {
|
|
33794
33797
|
actionLevel: "task",
|
|
33795
33798
|
actionType: "back",
|
|
33796
|
-
label:
|
|
33799
|
+
label: translationKeys.home
|
|
33797
33800
|
});
|
|
33798
33801
|
handleHomeClick();
|
|
33799
33802
|
};
|
|
@@ -33867,9 +33870,9 @@ function PciDropinComponent({
|
|
|
33867
33870
|
ActionBar,
|
|
33868
33871
|
{
|
|
33869
33872
|
onHome: goHome,
|
|
33870
|
-
homeButtonLabel,
|
|
33873
|
+
homeButtonLabel: i18n.get(translationKeys.home),
|
|
33871
33874
|
onNext: handleSignClick,
|
|
33872
|
-
nextButtonLabel:
|
|
33875
|
+
nextButtonLabel: i18n.get(translationKeys.sign)
|
|
33873
33876
|
}
|
|
33874
33877
|
);
|
|
33875
33878
|
return /* @__PURE__ */ jsx(DropinLayout, { content, footer });
|
|
@@ -34740,8 +34743,10 @@ function ServiceAgreementDropinComponent({
|
|
|
34740
34743
|
const [activeForm, setActiveForm] = useState(forms[activeFormIndex]);
|
|
34741
34744
|
const canSign = (serviceAgreementTypes == null ? void 0 : serviceAgreementTypes.includes(activeForm == null ? void 0 : activeForm.serviceAgreementType)) && !(activeForm == null ? void 0 : activeForm.acceptanceId);
|
|
34742
34745
|
const showSignedAlert = !!(activeForm == null ? void 0 : activeForm.acceptanceId);
|
|
34743
|
-
const
|
|
34744
|
-
|
|
34746
|
+
const translationKeys = {
|
|
34747
|
+
home: "goToOverview",
|
|
34748
|
+
next: canSign ? "sign" : "next"
|
|
34749
|
+
};
|
|
34745
34750
|
const handleServiceAgreementIsNotAvailableInThatLanguage = useCallback(() => {
|
|
34746
34751
|
showToast({
|
|
34747
34752
|
label: i18n.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),
|
|
@@ -34786,7 +34791,7 @@ function ServiceAgreementDropinComponent({
|
|
|
34786
34791
|
actionLevel: "task",
|
|
34787
34792
|
actionType: "sign"
|
|
34788
34793
|
};
|
|
34789
|
-
userEvents.addEvent("Clicked button", { ...baseTracking, label:
|
|
34794
|
+
userEvents.addEvent("Clicked button", { ...baseTracking, label: translationKeys.next });
|
|
34790
34795
|
triggerValidation();
|
|
34791
34796
|
if (loadingStatus === "loading" || !serviceAgreement || !data.signer) return;
|
|
34792
34797
|
if (isValid) {
|
|
@@ -34822,7 +34827,7 @@ function ServiceAgreementDropinComponent({
|
|
|
34822
34827
|
userEvents.addEvent("Clicked button", {
|
|
34823
34828
|
actionLevel: "task",
|
|
34824
34829
|
actionType: "back",
|
|
34825
|
-
label:
|
|
34830
|
+
label: translationKeys.home
|
|
34826
34831
|
});
|
|
34827
34832
|
handleHomeClick();
|
|
34828
34833
|
};
|
|
@@ -35029,9 +35034,9 @@ function ServiceAgreementDropinComponent({
|
|
|
35029
35034
|
ActionBar,
|
|
35030
35035
|
{
|
|
35031
35036
|
onHome: goHome,
|
|
35032
|
-
homeButtonLabel,
|
|
35037
|
+
homeButtonLabel: i18n.get(translationKeys.home),
|
|
35033
35038
|
onNext: canSign ? handleSignClick : () => gotoForm(activeFormIndex + 1),
|
|
35034
|
-
nextButtonLabel,
|
|
35039
|
+
nextButtonLabel: i18n.get(translationKeys.next),
|
|
35035
35040
|
nextButtonDisabled: forms.length === 0 || !canSign && activeFormIndex === forms.length - 1,
|
|
35036
35041
|
onBack: () => gotoForm(activeFormIndex - 1),
|
|
35037
35042
|
hideBackButton: activeFormIndex === 0,
|
|
@@ -39676,7 +39681,7 @@ const ConfigurationApiProvider = ({
|
|
|
39676
39681
|
}) => {
|
|
39677
39682
|
const authContext = useAuthContext();
|
|
39678
39683
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
39679
|
-
const sdkVersion = "2.61.
|
|
39684
|
+
const sdkVersion = "2.61.1";
|
|
39680
39685
|
useAnalytics({
|
|
39681
39686
|
onUserEvent,
|
|
39682
39687
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40349,7 +40354,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40349
40354
|
};
|
|
40350
40355
|
const copyToClipboard = async () => {
|
|
40351
40356
|
const toCopy = {
|
|
40352
|
-
sdkVersion: "2.61.
|
|
40357
|
+
sdkVersion: "2.61.1",
|
|
40353
40358
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40354
40359
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40355
40360
|
};
|
|
@@ -40414,7 +40419,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40414
40419
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
40415
40420
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40416
40421
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
40417
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.61.
|
|
40422
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.61.1" })
|
|
40418
40423
|
] }) }),
|
|
40419
40424
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40420
40425
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|