@adyen/kyc-components 2.64.0 → 2.66.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.
|
@@ -28943,7 +28943,7 @@ function CompanyDropinComponent({
|
|
|
28943
28943
|
formattedDocument.forEach((doc) => {
|
|
28944
28944
|
userEvents.addTaskEvent("Success", {
|
|
28945
28945
|
...associatedLeTrackingParams,
|
|
28946
|
-
actionType: "
|
|
28946
|
+
actionType: "upload",
|
|
28947
28947
|
documentType: doc.type,
|
|
28948
28948
|
fileExtention: doc.attachments.map((item) => getFileExtention(item.pageName))
|
|
28949
28949
|
});
|
|
@@ -32569,7 +32569,7 @@ function IndividualDropinComponent({
|
|
|
32569
32569
|
trustedFieldsProvider,
|
|
32570
32570
|
trustedRoles
|
|
32571
32571
|
}) {
|
|
32572
|
-
var _a, _b, _c, _d;
|
|
32572
|
+
var _a, _b, _c, _d, _e;
|
|
32573
32573
|
const { accountHolder, setAccountHolder } = useCoreContext();
|
|
32574
32574
|
const { i18n } = useI18nContext();
|
|
32575
32575
|
const { showToast, clearToasts } = useToastContext();
|
|
@@ -32673,8 +32673,16 @@ function IndividualDropinComponent({
|
|
|
32673
32673
|
onChange == null ? void 0 : onChange(currentState);
|
|
32674
32674
|
}, [currentState, onChange]);
|
|
32675
32675
|
const forms = useMemo(() => {
|
|
32676
|
+
var _a2;
|
|
32677
|
+
const formsWithUpdatedName = {
|
|
32678
|
+
...individualForms,
|
|
32679
|
+
idDocument: {
|
|
32680
|
+
...individualForms.idDocument,
|
|
32681
|
+
formName: ((_a2 = data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "instantVerification" ? "instantVerification" : "idDocument"
|
|
32682
|
+
}
|
|
32683
|
+
};
|
|
32676
32684
|
const requiredForms = getRequiredForms(
|
|
32677
|
-
|
|
32685
|
+
formsWithUpdatedName,
|
|
32678
32686
|
derivedProps == null ? void 0 : derivedProps.requiredFields,
|
|
32679
32687
|
derivedProps == null ? void 0 : derivedProps.optionalFields
|
|
32680
32688
|
).filter(
|
|
@@ -32682,20 +32690,26 @@ function IndividualDropinComponent({
|
|
|
32682
32690
|
(form) => form.formId !== "idVerificationMethod" || Boolean(handleGetIdVerificationToken)
|
|
32683
32691
|
);
|
|
32684
32692
|
return addValidityToForms(requiredForms, formValidity, problems);
|
|
32685
|
-
}, [
|
|
32693
|
+
}, [
|
|
32694
|
+
derivedProps,
|
|
32695
|
+
formValidity,
|
|
32696
|
+
problems,
|
|
32697
|
+
handleGetIdVerificationToken,
|
|
32698
|
+
(_b = data.idVerificationMethod) == null ? void 0 : _b.idVerificationMethod
|
|
32699
|
+
]);
|
|
32686
32700
|
const isRoleTypeTask = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER;
|
|
32687
32701
|
if (isRoleTypeTask && parentLegalEntity) {
|
|
32688
32702
|
roleTypes = getAllowedDecisionMakerRoles(parentLegalEntity, taskType);
|
|
32689
32703
|
}
|
|
32690
32704
|
if (parentLegalEntity == null ? void 0 : parentLegalEntity.entityAssociations) {
|
|
32691
|
-
const associations = (
|
|
32705
|
+
const associations = (_c = parentLegalEntity == null ? void 0 : parentLegalEntity.entityAssociations) == null ? void 0 : _c.filter(
|
|
32692
32706
|
(ea) => ea.legalEntityId === (legalEntityResponse == null ? void 0 : legalEntityResponse.id)
|
|
32693
32707
|
);
|
|
32694
32708
|
if (associations && associations.length > 0) {
|
|
32695
32709
|
if (isRoleTypeTask && parentLegalEntity) {
|
|
32696
|
-
const jobTitle = (
|
|
32710
|
+
const jobTitle = (_d = associations.find(
|
|
32697
32711
|
(association) => Boolean(association.jobTitle)
|
|
32698
|
-
)) == null ? void 0 :
|
|
32712
|
+
)) == null ? void 0 : _d.jobTitle;
|
|
32699
32713
|
dataFromResponse = {
|
|
32700
32714
|
...dataFromResponse,
|
|
32701
32715
|
personalDetails: {
|
|
@@ -32811,7 +32825,7 @@ function IndividualDropinComponent({
|
|
|
32811
32825
|
parentLE,
|
|
32812
32826
|
dataSubmitted
|
|
32813
32827
|
}) => {
|
|
32814
|
-
var _a2, _b2, _c2, _d2,
|
|
32828
|
+
var _a2, _b2, _c2, _d2, _e2, _f;
|
|
32815
32829
|
const newRoles = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER ? (_a2 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _a2.role : taskType === TaskTypes.TRUST_MEMBER_INDIVIDUAL ? trustMember == null ? void 0 : trustMember.roles : null;
|
|
32816
32830
|
const existingEntityAssociations = getOwnEntityAssociations(parentLE);
|
|
32817
32831
|
if (newRoles && (hasRolesChanged(legalEntity, existingEntityAssociations, newRoles) || ((_b2 = dataFromResponse.personalDetails) == null ? void 0 : _b2.jobTitle) !== ((_c2 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _c2.jobTitle))) {
|
|
@@ -32832,7 +32846,7 @@ function IndividualDropinComponent({
|
|
|
32832
32846
|
};
|
|
32833
32847
|
await handleUpdateLegalEntity(updatedParentLegalEntity, parentLE.id);
|
|
32834
32848
|
}
|
|
32835
|
-
if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS && (existingEntityAssociations.every((ea) => ea.legalEntityId !== legalEntity.id) || ((_d2 = dataFromResponse == null ? void 0 : dataFromResponse.personalDetails) == null ? void 0 : _d2.relationship) !== ((
|
|
32849
|
+
if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS && (existingEntityAssociations.every((ea) => ea.legalEntityId !== legalEntity.id) || ((_d2 = dataFromResponse == null ? void 0 : dataFromResponse.personalDetails) == null ? void 0 : _d2.relationship) !== ((_e2 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _e2.relationship))) {
|
|
32836
32850
|
const newEntityAssociation = {
|
|
32837
32851
|
type: "legalRepresentative",
|
|
32838
32852
|
legalEntityId: legalEntity.id,
|
|
@@ -32995,7 +33009,7 @@ function IndividualDropinComponent({
|
|
|
32995
33009
|
};
|
|
32996
33010
|
const summaryOmittedKeys = [
|
|
32997
33011
|
...taskType === TaskTypes.DECISION_MAKER ? ["role"] : [],
|
|
32998
|
-
...((
|
|
33012
|
+
...((_e = data.personalDetails) == null ? void 0 : _e.idNumberExempt) ? ["idNumber"] : []
|
|
32999
33013
|
];
|
|
33000
33014
|
const {
|
|
33001
33015
|
handleNextClick,
|
|
@@ -34789,10 +34803,9 @@ function ServiceAgreementDropinComponent({
|
|
|
34789
34803
|
handleHomeClick();
|
|
34790
34804
|
};
|
|
34791
34805
|
const handleExpandSection = (title) => {
|
|
34792
|
-
userEvents.
|
|
34793
|
-
actionLevel: "task",
|
|
34806
|
+
userEvents.addFieldEvent("Clicked accordion", {
|
|
34794
34807
|
actionType: "open",
|
|
34795
|
-
|
|
34808
|
+
field: title
|
|
34796
34809
|
});
|
|
34797
34810
|
};
|
|
34798
34811
|
useEffect(() => {
|
|
@@ -34806,6 +34819,9 @@ function ServiceAgreementDropinComponent({
|
|
|
34806
34819
|
const initialFormIndex = forms.length === signedForms.length ? 0 : signedForms.length;
|
|
34807
34820
|
gotoForm(initialFormIndex);
|
|
34808
34821
|
}, []);
|
|
34822
|
+
useEffect(() => {
|
|
34823
|
+
userEvents.updateSharedEventProperties({ page: activeForm.formName });
|
|
34824
|
+
}, [activeForm]);
|
|
34809
34825
|
const gotoForm = (index) => {
|
|
34810
34826
|
setActiveForm(forms[index]);
|
|
34811
34827
|
setActiveFormIndex(index);
|
|
@@ -35810,7 +35826,7 @@ function DropinComposerComponent({
|
|
|
35810
35826
|
onNavigate = noop,
|
|
35811
35827
|
...args
|
|
35812
35828
|
}) {
|
|
35813
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
35829
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
35814
35830
|
const { contextCountry, accountHolder, setAccountHolder } = useCoreContext();
|
|
35815
35831
|
const { setCanSeeEntitySelection } = useCanSeeEntitySelection(legalEntityResponse.id);
|
|
35816
35832
|
const { i18n } = useI18nContext();
|
|
@@ -36634,7 +36650,7 @@ function DropinComposerComponent({
|
|
|
36634
36650
|
capabilities,
|
|
36635
36651
|
problems: getLegalEntityProblems(rootLegalEntity),
|
|
36636
36652
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
36637
|
-
country: legalEntityResponse.organization.registeredAddress.country ?? contextCountry,
|
|
36653
|
+
country: ((_f = (_e = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _e.registeredAddress) == null ? void 0 : _f.country) ?? contextCountry,
|
|
36638
36654
|
onChange: componentOnChange,
|
|
36639
36655
|
onSubmit: async (data) => {
|
|
36640
36656
|
onSubmit == null ? void 0 : onSubmit(data);
|
|
@@ -36667,7 +36683,7 @@ function DropinComposerComponent({
|
|
|
36667
36683
|
parentLegalEntity: associatedLegalArrangement,
|
|
36668
36684
|
legalEntityResponse: associatedLegalEntity,
|
|
36669
36685
|
capabilities,
|
|
36670
|
-
problems: (
|
|
36686
|
+
problems: (_g = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _g[rootLegalEntity.id],
|
|
36671
36687
|
onChange: componentOnChange,
|
|
36672
36688
|
onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 2),
|
|
36673
36689
|
handleBackClick: navigateBack,
|
|
@@ -36685,7 +36701,7 @@ function DropinComposerComponent({
|
|
|
36685
36701
|
{
|
|
36686
36702
|
taskType: currentTask,
|
|
36687
36703
|
taskName: currentTask === TaskTypes.PAYIN ? "payinDetails" : "payoutDetails",
|
|
36688
|
-
problems: (
|
|
36704
|
+
problems: (_h = capabilityProblems == null ? void 0 : capabilityProblems.BankAccount) == null ? void 0 : _h[transferInstrument == null ? void 0 : transferInstrument.id],
|
|
36689
36705
|
transferInstrument,
|
|
36690
36706
|
setTransferInstrument,
|
|
36691
36707
|
legalEntityResponse: rootLegalEntity,
|
|
@@ -36712,7 +36728,7 @@ function DropinComposerComponent({
|
|
|
36712
36728
|
{
|
|
36713
36729
|
...args,
|
|
36714
36730
|
taskType: TaskTypes.TRUST,
|
|
36715
|
-
problems: (
|
|
36731
|
+
problems: (_i = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _i[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
|
|
36716
36732
|
parentLegalEntity: rootLegalEntity,
|
|
36717
36733
|
legalEntityResponse: associatedLegalArrangement,
|
|
36718
36734
|
capabilities,
|
|
@@ -36720,7 +36736,7 @@ function DropinComposerComponent({
|
|
|
36720
36736
|
onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 1),
|
|
36721
36737
|
handleHomeClick: navigateBack,
|
|
36722
36738
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
36723
|
-
country: (((
|
|
36739
|
+
country: (((_j = associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.trust) == null ? void 0 : _j.countryOfGoverningLaw) || ((_k = associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.trust) == null ? void 0 : _k.registeredAddress.country)) ?? rootLegalEntityCountry,
|
|
36724
36740
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
36725
36741
|
handleFindAddress: args == null ? void 0 : args.handleFindAddress
|
|
36726
36742
|
}
|
|
@@ -36790,12 +36806,12 @@ function DropinComposerComponent({
|
|
|
36790
36806
|
parentLegalEntity: rootLegalEntity,
|
|
36791
36807
|
legalEntityResponse: associatedLegalArrangement,
|
|
36792
36808
|
capabilities,
|
|
36793
|
-
problems: (
|
|
36809
|
+
problems: (_l = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _l[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
|
|
36794
36810
|
onChange: componentOnChange,
|
|
36795
36811
|
onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 1),
|
|
36796
36812
|
handleHomeClick: navigateBack,
|
|
36797
36813
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
36798
|
-
country: (((
|
|
36814
|
+
country: (((_m = associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.soleProprietorship) == null ? void 0 : _m.countryOfGoverningLaw) || ((_o = (_n = associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.soleProprietorship) == null ? void 0 : _n.registeredAddress) == null ? void 0 : _o.country)) ?? rootLegalEntityCountry,
|
|
36799
36815
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
36800
36816
|
handleFindAddress: args == null ? void 0 : args.handleFindAddress
|
|
36801
36817
|
}
|
|
@@ -39633,7 +39649,7 @@ const ConfigurationApiProvider = ({
|
|
|
39633
39649
|
}) => {
|
|
39634
39650
|
const authContext = useAuthContext();
|
|
39635
39651
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
39636
|
-
const sdkVersion = "2.
|
|
39652
|
+
const sdkVersion = "2.66.0";
|
|
39637
39653
|
useAnalytics({
|
|
39638
39654
|
onUserEvent,
|
|
39639
39655
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40267,7 +40283,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40267
40283
|
};
|
|
40268
40284
|
const copyToClipboard = async () => {
|
|
40269
40285
|
const toCopy = {
|
|
40270
|
-
sdkVersion: "2.
|
|
40286
|
+
sdkVersion: "2.66.0",
|
|
40271
40287
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40272
40288
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40273
40289
|
};
|
|
@@ -40332,7 +40348,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40332
40348
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
40333
40349
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40334
40350
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
40335
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.
|
|
40351
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.66.0" })
|
|
40336
40352
|
] }) }),
|
|
40337
40353
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40338
40354
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/kyc-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.66.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"adyen",
|
|
6
6
|
"adyen-kyc",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@commitlint/cli": "^17.7.1",
|
|
95
95
|
"@commitlint/config-conventional": "^17.7.0",
|
|
96
96
|
"@commitlint/prompt-cli": "^17.7.1",
|
|
97
|
-
"@playwright/test": "1.
|
|
97
|
+
"@playwright/test": "^1.48.0",
|
|
98
98
|
"@preact/preset-vite": "^2.8.1",
|
|
99
99
|
"@storybook/addon-a11y": "^8.4.0",
|
|
100
100
|
"@storybook/addon-actions": "^8.4.0",
|