@adyen/kyc-components 3.60.6 → 3.60.8
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/{B4MFY5CR-BVof8nMM.js → B4MFY5CR-DiAYK7Dr.js} +1 -1
- package/dist/es/{DebugModal-CvJSr4Ij.js → DebugModal-Cgx9tT9n.js} +6 -6
- package/dist/es/{HO4MOOFI-BMe4escm.js → HO4MOOFI-JCLMNnM8.js} +2 -2
- package/dist/es/{HUY7CZI3-DruibpTU.js → HUY7CZI3-B8qeOQnE.js} +2 -2
- package/dist/es/{Introduction-DLNF-Da2.js → Introduction-CE3a76j3.js} +1 -1
- package/dist/es/adyen-kyc-components.es.js +1 -1
- package/dist/es/{css-BE9mU2jw.js → css-td1IksfN.js} +1 -1
- package/dist/es/{index-SsGSz5hf.js → index-B3OeqVym.js} +128 -112
- package/dist/es/{json-fQtFzTcu.js → json-DzmtI3Mp.js} +1 -1
- package/dist/es/{plaintext-CFB74M1p.js → plaintext-4ca3dfxl.js} +1 -1
- package/dist/es/{yaml-B2_CWZPy.js → yaml-DwFNsUWx.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/Individual/mapping/IndividualToLegalEntity.mapper.d.ts +4 -0
- package/dist/types/utils/getFieldsWithExistingData.d.ts +1 -2
- package/dist/types/utils/mapping/componentApiMapping.d.ts +2 -0
- package/dist/types/utils/mapping/mapping.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { w as createContext, x as createSignal, y as onMount, z as createEffect, q as createMemo, r as createComponent, P as Portal, A as Show, C as template, D as insert, F as createRenderEffect, G as className, H as clearDelegatedEvents, J as delegateEvents, K as useContext, N as onCleanup, O as sortFns, Q as mutationSortFns, R as on, U as setAttribute, V as getSidedProp, W as use, X as createUniqueId, Y as batch, Z as getQueryStatusLabel, _ as getMutationStatusColor, $ as getQueryStatusColor, a0 as getQueryStatusColorByLabel, a1 as displayValue, a2 as For, a3 as convertRemToPixels, a4 as untrack, a5 as $TRACK, a6 as useTransition, a7 as spread, a8 as mergeProps, a9 as createRoot, aa as serialize, ab as Index, ac as updateNestedDataByPath, ad as addEventListener, ae as stringify, af as Match, ag as Switch, ah as deleteNestedDataByPath, ai as splitProps, aj as Dynamic, ak as createComputed } from "./index-
|
|
4
|
+
import { w as createContext, x as createSignal, y as onMount, z as createEffect, q as createMemo, r as createComponent, P as Portal, A as Show, C as template, D as insert, F as createRenderEffect, G as className, H as clearDelegatedEvents, J as delegateEvents, K as useContext, N as onCleanup, O as sortFns, Q as mutationSortFns, R as on, U as setAttribute, V as getSidedProp, W as use, X as createUniqueId, Y as batch, Z as getQueryStatusLabel, _ as getMutationStatusColor, $ as getQueryStatusColor, a0 as getQueryStatusColorByLabel, a1 as displayValue, a2 as For, a3 as convertRemToPixels, a4 as untrack, a5 as $TRACK, a6 as useTransition, a7 as spread, a8 as mergeProps, a9 as createRoot, aa as serialize, ab as Index, ac as updateNestedDataByPath, ad as addEventListener, ae as stringify, af as Match, ag as Switch, ah as deleteNestedDataByPath, ai as splitProps, aj as Dynamic, ak as createComputed } from "./index-B3OeqVym.js";
|
|
5
5
|
var isNonNullable = (i2) => i2 != null;
|
|
6
6
|
var filterNonNullable = (arr) => arr.filter(isNonNullable);
|
|
7
7
|
function chain(callbacks) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
2
2
|
import { useMemo, useState } from "preact/hooks";
|
|
3
|
-
import { B as Button, d as Tag, e as entriesOf, I as InputText, b as useI18nContext, s as splitTaskIdentifier, f as TaskItemStatus, h as useExperimentsContext, i as useSettingsContext, j as useGlobalStore, l as listToRecord, v as valuesOf, k as useTaskStatuses, M as Modal, m as createLogger, n as Icon, o as SettingNames, E as ExperimentNames } from "./index-
|
|
3
|
+
import { B as Button, d as Tag, e as entriesOf, I as InputText, b as useI18nContext, s as splitTaskIdentifier, f as TaskItemStatus, h as useExperimentsContext, i as useSettingsContext, j as useGlobalStore, l as listToRecord, v as valuesOf, k as useTaskStatuses, M as Modal, m as createLogger, n as Icon, o as SettingNames, E as ExperimentNames } from "./index-B3OeqVym.js";
|
|
4
4
|
const tabs = "adyen-kyc-tabs";
|
|
5
5
|
const styles$1 = {
|
|
6
6
|
tabs
|
|
@@ -135,10 +135,10 @@ const transformModule = (highlights, codeNode, scope) => {
|
|
|
135
135
|
};
|
|
136
136
|
const supportedModules = ["plaintext", "json", "yaml", "css"];
|
|
137
137
|
const moduleMap = {
|
|
138
|
-
plaintext: () => import("./plaintext-
|
|
139
|
-
json: () => import("./json-
|
|
140
|
-
yaml: () => import("./yaml-
|
|
141
|
-
css: () => import("./css-
|
|
138
|
+
plaintext: () => import("./plaintext-4ca3dfxl.js"),
|
|
139
|
+
json: () => import("./json-DzmtI3Mp.js"),
|
|
140
|
+
yaml: () => import("./yaml-DwFNsUWx.js"),
|
|
141
|
+
css: () => import("./css-td1IksfN.js")
|
|
142
142
|
};
|
|
143
143
|
const getModule = async (name) => {
|
|
144
144
|
if (!supportedModules.includes(name)) {
|
|
@@ -429,7 +429,7 @@ const DebugModal = ({ onExit }) => {
|
|
|
429
429
|
const [tab, setTab] = useState("metadata");
|
|
430
430
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
431
431
|
const metadata = {
|
|
432
|
-
sdkVersion: "3.60.
|
|
432
|
+
sdkVersion: "3.60.8",
|
|
433
433
|
locale: i18n.locale,
|
|
434
434
|
rootLegalEntityId: rootLegalEntity.id
|
|
435
435
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./B4MFY5CR-
|
|
2
|
-
import { p as getPreferredColorScheme, q as createMemo, r as createComponent } from "./index-
|
|
1
|
+
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./B4MFY5CR-DiAYK7Dr.js";
|
|
2
|
+
import { p as getPreferredColorScheme, q as createMemo, r as createComponent } from "./index-B3OeqVym.js";
|
|
3
3
|
var DevtoolsComponent = (props) => {
|
|
4
4
|
const [localStore, setLocalStore] = createLocalStorage({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./B4MFY5CR-
|
|
2
|
-
import { p as getPreferredColorScheme, q as createMemo, r as createComponent } from "./index-
|
|
1
|
+
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./B4MFY5CR-DiAYK7Dr.js";
|
|
2
|
+
import { p as getPreferredColorScheme, q as createMemo, r as createComponent } from "./index-B3OeqVym.js";
|
|
3
3
|
var DevtoolsPanelComponent = (props) => {
|
|
4
4
|
const [localStore, setLocalStore] = createLocalStorage({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "preact/jsx-runtime";
|
|
2
2
|
import { useMemo as useMemo$1, useState, useEffect } from "preact/hooks";
|
|
3
|
-
import { T as TaskTypes, L as LegalEntityType, u as useCanSeeIntroduction, a as useLegalEntityType, t as toCapitalized, g as getTranslationKeysByPrefix, b as useI18nContext, c as userEvents, S as StepProgressIndicator, B as Button } from "./index-
|
|
3
|
+
import { T as TaskTypes, L as LegalEntityType, u as useCanSeeIntroduction, a as useLegalEntityType, t as toCapitalized, g as getTranslationKeysByPrefix, b as useI18nContext, c as userEvents, S as StepProgressIndicator, B as Button } from "./index-B3OeqVym.js";
|
|
4
4
|
import { useMemo } from "preact/compat";
|
|
5
5
|
var IntroductionScreens = ((IntroductionScreens2) => {
|
|
6
6
|
IntroductionScreens2["PROLOGUE"] = "PROLOGUE";
|
|
@@ -24578,9 +24578,9 @@ const DriversLicenseNumberPatterns = {
|
|
|
24578
24578
|
[CountryCodes.NewZealand]: /^[A-Z]{2}[0-9]{6}$/
|
|
24579
24579
|
};
|
|
24580
24580
|
const PassportNumberPatterns = {
|
|
24581
|
-
[CountryCodes.Australia]: /^[A-
|
|
24581
|
+
[CountryCodes.Australia]: /^[A-Z0-9]{8,9}$/,
|
|
24582
24582
|
[CountryCodes.HongKong]: /^[A-Z0-9]{9}$/,
|
|
24583
|
-
[CountryCodes.NewZealand]:
|
|
24583
|
+
[CountryCodes.NewZealand]: /^[A-Z0-9]{8,9}$/
|
|
24584
24584
|
};
|
|
24585
24585
|
const ProofOfIdentityCardPatterns = {
|
|
24586
24586
|
[CountryCodes.HongKong]: /^[A-Z]{1,2}[0-9]{6}[0-9A]$/
|
|
@@ -24944,7 +24944,7 @@ const defaultFieldConfig$1 = {
|
|
|
24944
24944
|
return {
|
|
24945
24945
|
label: "passportNumber",
|
|
24946
24946
|
mask: {
|
|
24947
|
-
mask: makeMask(...
|
|
24947
|
+
mask: makeMask(...alphanumericInputs(9)),
|
|
24948
24948
|
transformOnType: uppercase
|
|
24949
24949
|
},
|
|
24950
24950
|
validators: validatePatternOnBlur(PassportNumberPatterns[CountryCodes.NewZealand]),
|
|
@@ -25043,7 +25043,7 @@ const defaultFieldConfig$1 = {
|
|
|
25043
25043
|
return {
|
|
25044
25044
|
label: "passportNumber",
|
|
25045
25045
|
mask: {
|
|
25046
|
-
mask: makeMask(...
|
|
25046
|
+
mask: makeMask(...alphanumericInputs(9)),
|
|
25047
25047
|
transformOnType: uppercase
|
|
25048
25048
|
},
|
|
25049
25049
|
validators: validatePatternOnBlur(PassportNumberPatterns[CountryCodes.Australia]),
|
|
@@ -27257,6 +27257,11 @@ const mandatoryApiFields = {
|
|
|
27257
27257
|
"personalDetails.lastName",
|
|
27258
27258
|
"personalDetails.residencyCountry"
|
|
27259
27259
|
],
|
|
27260
|
+
INDIVIDUAL_ONFIDO: [
|
|
27261
|
+
"basicDetails.firstName",
|
|
27262
|
+
"basicDetails.lastName",
|
|
27263
|
+
"additionalPersonalDetails.country"
|
|
27264
|
+
],
|
|
27260
27265
|
DECISIONMAKER: [
|
|
27261
27266
|
"personalDetails.firstName",
|
|
27262
27267
|
"personalDetails.lastName",
|
|
@@ -31696,15 +31701,10 @@ const rules$1 = ({
|
|
|
31696
31701
|
requiredIfPhoneScenarioDisabled: () => !isExperimentEnabled("EnablePhoneFieldScenario") ? REQUIRED$1 : void 0,
|
|
31697
31702
|
jobTitleIfRequiredForRole: () => {
|
|
31698
31703
|
var _a2, _b2;
|
|
31699
|
-
if (taskType
|
|
31700
|
-
|
|
31701
|
-
|
|
31702
|
-
|
|
31703
|
-
return REQUIRED$1;
|
|
31704
|
-
}
|
|
31705
|
-
return;
|
|
31706
|
-
}
|
|
31707
|
-
if (JOB_TITLE_REQUIRED_FOR_COUNTRIES$1.includes(country)) {
|
|
31704
|
+
if (taskType !== TaskTypes.DECISION_MAKER) return;
|
|
31705
|
+
if (((_b2 = (_a2 = data.personalDetails) == null ? void 0 : _a2.role) == null ? void 0 : _b2.some(
|
|
31706
|
+
(role) => DECISION_MAKER_TYPES_WITH_JOBTITLE$1.includes(role)
|
|
31707
|
+
)) || JOB_TITLE_REQUIRED_FOR_COUNTRIES$1.includes(country)) {
|
|
31708
31708
|
return REQUIRED$1;
|
|
31709
31709
|
}
|
|
31710
31710
|
},
|
|
@@ -31976,14 +31976,107 @@ const getTargetLegalEntityType = (businessType, legalArrangement, trusteeType, c
|
|
|
31976
31976
|
return currentLegalEntityType;
|
|
31977
31977
|
};
|
|
31978
31978
|
const isLegalArrangementOrganizationSubtype = (legalArrangementOption) => legalArrangementOption === "partnershipIncorporated" || legalArrangementOption === "associationIncorporated";
|
|
31979
|
-
const
|
|
31979
|
+
const mapIndividualOnfidoSchemaToLegalEntity = (individualOnfido) => {
|
|
31980
|
+
var _a2, _b2;
|
|
31981
|
+
const legalEntity = {
|
|
31982
|
+
...formatObject(individualOnfido, getAPISchemaFromIndividualSchema),
|
|
31983
|
+
type: LegalEntityType.INDIVIDUAL
|
|
31984
|
+
};
|
|
31985
|
+
if (individualOnfido.additionalPersonalDetails) {
|
|
31986
|
+
legalEntity.individual.identificationData = adjustIdentificationData(
|
|
31987
|
+
individualOnfido.additionalPersonalDetails,
|
|
31988
|
+
legalEntity.individual.identificationData
|
|
31989
|
+
);
|
|
31990
|
+
}
|
|
31991
|
+
if ((_a2 = individualOnfido.basicDetails) == null ? void 0 : _a2.phoneNumber) {
|
|
31992
|
+
const phone = {
|
|
31993
|
+
number: individualOnfido.basicDetails.phoneNumber.number,
|
|
31994
|
+
type: "mobile"
|
|
31995
|
+
};
|
|
31996
|
+
if (phone.number && legalEntity.individual) {
|
|
31997
|
+
legalEntity.individual.phone = phone;
|
|
31998
|
+
} else {
|
|
31999
|
+
(_b2 = legalEntity == null ? void 0 : legalEntity.individual) == null ? true : delete _b2.phone;
|
|
32000
|
+
}
|
|
32001
|
+
}
|
|
32002
|
+
return legalEntity;
|
|
32003
|
+
};
|
|
32004
|
+
const mapLegalEntityToIndividualOnfidoSchema = (legalEntity, isChangingType) => {
|
|
32005
|
+
var _a2;
|
|
32006
|
+
let individualOnfido = {
|
|
32007
|
+
...formatObject(legalEntity, getIndividualSchemaFromAPI)
|
|
32008
|
+
};
|
|
32009
|
+
individualOnfido = {
|
|
32010
|
+
...individualOnfido,
|
|
32011
|
+
basicDetails: {
|
|
32012
|
+
...individualOnfido == null ? void 0 : individualOnfido.basicDetails,
|
|
32013
|
+
...isChangingType && {
|
|
32014
|
+
firstName: "",
|
|
32015
|
+
lastName: ""
|
|
32016
|
+
}
|
|
32017
|
+
}
|
|
32018
|
+
};
|
|
32019
|
+
if ((_a2 = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _a2.length) {
|
|
32020
|
+
individualOnfido = {
|
|
32021
|
+
...individualOnfido,
|
|
32022
|
+
idVerificationMethod: {
|
|
32023
|
+
// Manually set verification method for existing document journey
|
|
32024
|
+
idVerificationMethod: "existingDocument",
|
|
32025
|
+
idDocument: mapDocumentDetailToIdDocument(legalEntity.documentDetails)
|
|
32026
|
+
}
|
|
32027
|
+
};
|
|
32028
|
+
}
|
|
32029
|
+
return individualOnfido;
|
|
32030
|
+
};
|
|
32031
|
+
const mapDocumentDetailToIdDocument = (documents) => {
|
|
32032
|
+
var _a2;
|
|
32033
|
+
const activeDocument = (_a2 = documents.filter((document2) => document2.active)) == null ? void 0 : _a2[0];
|
|
32034
|
+
return activeDocument ? {
|
|
32035
|
+
idDocumentType: activeDocument.type,
|
|
32036
|
+
modificationDate: activeDocument.modificationDate
|
|
32037
|
+
} : void 0;
|
|
32038
|
+
};
|
|
32039
|
+
const individualOnfidoObscuredFields = [
|
|
32040
|
+
"additionalPersonalDetails.idNumber",
|
|
32041
|
+
"additionalPersonalDetails.idNumberExempt"
|
|
32042
|
+
];
|
|
32043
|
+
const individualOnfidoBaseMapping = {
|
|
32044
|
+
"basicDetails.firstName": "individual.name.firstName",
|
|
32045
|
+
"basicDetails.lastName": "individual.name.lastName",
|
|
32046
|
+
"basicDetails.phoneNumber.number": "individual.phone.number",
|
|
32047
|
+
"basicDetails.phoneNumber.phoneCountryCode": "individual.phone.phoneCountryCode",
|
|
32048
|
+
"basicDetails.phoneNumber.type": "individual.phone.type",
|
|
32049
|
+
"basicDetails.email": "individual.email",
|
|
32050
|
+
"additionalPersonalDetails.birthDate": "individual.birthData.dateOfBirth",
|
|
32051
|
+
"additionalPersonalDetails.idNumber": "individual.identificationData.number",
|
|
32052
|
+
"additionalPersonalDetails.idNumberExempt": "individual.identificationData.nationalIdExempt",
|
|
32053
|
+
"additionalPersonalDetails.typeOfIdentity": "individual.identificationData.type",
|
|
32054
|
+
"additionalPersonalDetails.issuerState": "individual.identificationData.issuerState",
|
|
32055
|
+
"additionalPersonalDetails.licenseCardNumber": "individual.identificationData.cardNumber",
|
|
32056
|
+
"additionalPersonalDetails.expiryDate": "individual.identificationData.expiryDate",
|
|
32057
|
+
"additionalPersonalDetails.nationality": "individual.nationality",
|
|
32058
|
+
// Address fields
|
|
32059
|
+
"additionalPersonalDetails.city": "individual.residentialAddress.city",
|
|
32060
|
+
"additionalPersonalDetails.country": "individual.residentialAddress.country",
|
|
32061
|
+
"additionalPersonalDetails.postalCode": "individual.residentialAddress.postalCode",
|
|
32062
|
+
"additionalPersonalDetails.stateOrProvince": "individual.residentialAddress.stateOrProvince",
|
|
32063
|
+
"additionalPersonalDetails.address": "individual.residentialAddress.street",
|
|
32064
|
+
"additionalPersonalDetails.otherAddressInformation": "individual.residentialAddress.street2"
|
|
32065
|
+
};
|
|
32066
|
+
const getIndividualSchemaFromAPI = {
|
|
32067
|
+
...individualOnfidoBaseMapping
|
|
32068
|
+
};
|
|
32069
|
+
const getAPISchemaFromIndividualSchema = {
|
|
32070
|
+
...reverseObject(individualOnfidoBaseMapping)
|
|
32071
|
+
};
|
|
32072
|
+
const convertApiFieldNameToSchemaFieldName = (apiField, legalEntityType, newFlow) => {
|
|
31980
32073
|
switch (legalEntityType) {
|
|
31981
32074
|
case LegalEntityType.INDIVIDUAL:
|
|
31982
|
-
return apiField in individualApiKeyMapping ? individualApiKeyMapping[apiField] : void 0;
|
|
32075
|
+
return newFlow ? apiField in getAPISchemaFromIndividualSchema ? getAPISchemaFromIndividualSchema[apiField] : void 0 : apiField in individualApiKeyMapping ? individualApiKeyMapping[apiField] : void 0;
|
|
31983
32076
|
case LegalEntityType.ORGANIZATION:
|
|
31984
|
-
return
|
|
32077
|
+
return newFlow ? apiField in businessDetailsApiKeyMapping ? businessDetailsApiKeyMapping[apiField] : void 0 : apiField in companyApiKeyMapping ? companyApiKeyMapping[apiField] : void 0;
|
|
31985
32078
|
case LegalEntityType.SOLE_PROPRIETORSHIP:
|
|
31986
|
-
return
|
|
32079
|
+
return newFlow ? apiField in solePropBusinessDetailsApiKeyMapping ? solePropBusinessDetailsApiKeyMapping[apiField] : void 0 : apiField in solePropApiKeyMapping ? solePropApiKeyMapping[apiField] : void 0;
|
|
31987
32080
|
case LegalEntityType.TRUST:
|
|
31988
32081
|
return apiField in trustApiKeyMapping ? trustApiKeyMapping[apiField] : void 0;
|
|
31989
32082
|
case LegalEntityType.UNINCORPORATED_PARTNERSHIP:
|
|
@@ -31996,14 +32089,12 @@ const knownProblematicFields = [
|
|
|
31996
32089
|
"personalDetails.typeOfIdentity",
|
|
31997
32090
|
"personalDetails.issuerState"
|
|
31998
32091
|
];
|
|
31999
|
-
const getFieldsWithExistingData = (legalEntity,
|
|
32092
|
+
const getFieldsWithExistingData = (legalEntity, newFlow = false) => {
|
|
32000
32093
|
var _a2;
|
|
32001
32094
|
const apiFieldsWithExistingData = getNestedPropertyKeys(legalEntity);
|
|
32002
32095
|
const legalEntityType = legalEntity.type;
|
|
32003
32096
|
if (!legalEntityType) return [];
|
|
32004
|
-
const nonDocumentFields = apiFieldsWithExistingData.map(
|
|
32005
|
-
(field) => convertApiFieldNameToSchemaFieldName(field, legalEntityType, isExperimentEnabled)
|
|
32006
|
-
).filter((field) => field !== void 0).filter((field) => !knownProblematicFields.includes(field));
|
|
32097
|
+
const nonDocumentFields = apiFieldsWithExistingData.map((field) => convertApiFieldNameToSchemaFieldName(field, legalEntityType, newFlow)).filter((field) => field !== void 0).filter((field) => !knownProblematicFields.includes(field));
|
|
32007
32098
|
if ((_a2 = legalEntity.documentDetails) == null ? void 0 : _a2.length) {
|
|
32008
32099
|
const documentFields = legalEntity.documentDetails.map((document2) => legalEntityDocumentToFieldMapping[legalEntityType][document2.type]).filter((field) => field !== void 0);
|
|
32009
32100
|
return [...nonDocumentFields, ...documentFields];
|
|
@@ -34972,7 +35063,7 @@ function BusinessDetailsDropin({
|
|
|
34972
35063
|
initialForms,
|
|
34973
35064
|
(currentProblems == null ? void 0 : currentProblems.remediationActions) ? Object.values(currentProblems == null ? void 0 : currentProblems.remediationActions) : [],
|
|
34974
35065
|
(currentProblems == null ? void 0 : currentProblems.missingData) ?? [],
|
|
34975
|
-
subjectEntity ? getFieldsWithExistingData(subjectEntity,
|
|
35066
|
+
subjectEntity ? getFieldsWithExistingData(subjectEntity, true) : [],
|
|
34976
35067
|
customRules,
|
|
34977
35068
|
{},
|
|
34978
35069
|
{},
|
|
@@ -47353,13 +47444,8 @@ const IndividualOnfidoRules = ({
|
|
|
47353
47444
|
requiredIfPhoneScenarioDisabled: () => !isExperimentEnabled("EnablePhoneFieldScenario") ? REQUIRED : void 0,
|
|
47354
47445
|
jobTitleIfRequiredForRole: () => {
|
|
47355
47446
|
var _a2, _b2;
|
|
47356
|
-
if (taskType
|
|
47357
|
-
|
|
47358
|
-
return REQUIRED;
|
|
47359
|
-
}
|
|
47360
|
-
return;
|
|
47361
|
-
}
|
|
47362
|
-
if (JOB_TITLE_REQUIRED_FOR_COUNTRIES.includes(country)) {
|
|
47447
|
+
if (taskType !== TaskTypes.DECISION_MAKER) return;
|
|
47448
|
+
if (((_b2 = (_a2 = data.basicDetails) == null ? void 0 : _a2.role) == null ? void 0 : _b2.some((role) => DECISION_MAKER_TYPES_WITH_JOBTITLE.includes(role))) || JOB_TITLE_REQUIRED_FOR_COUNTRIES.includes(country)) {
|
|
47363
47449
|
return REQUIRED;
|
|
47364
47450
|
}
|
|
47365
47451
|
},
|
|
@@ -48930,80 +49016,6 @@ function IndividualOnfido(props) {
|
|
|
48930
49016
|
};
|
|
48931
49017
|
return /* @__PURE__ */ jsx$1("div", { className: "adyen-kyc-individual", children: /* @__PURE__ */ jsx$1("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(propActiveForm) }) });
|
|
48932
49018
|
}
|
|
48933
|
-
const mapIndividualOnfidoSchemaToLegalEntity = (individualOnfido) => {
|
|
48934
|
-
var _a2, _b2;
|
|
48935
|
-
const legalEntity = {
|
|
48936
|
-
...formatObject(individualOnfido, getAPISchemaFromIndividualSchema),
|
|
48937
|
-
type: LegalEntityType.INDIVIDUAL
|
|
48938
|
-
};
|
|
48939
|
-
if ((_a2 = individualOnfido.basicDetails) == null ? void 0 : _a2.phoneNumber) {
|
|
48940
|
-
const phone = {
|
|
48941
|
-
number: individualOnfido.basicDetails.phoneNumber.number,
|
|
48942
|
-
type: "mobile"
|
|
48943
|
-
};
|
|
48944
|
-
if (phone.number && legalEntity.individual) {
|
|
48945
|
-
legalEntity.individual.phone = phone;
|
|
48946
|
-
} else {
|
|
48947
|
-
(_b2 = legalEntity == null ? void 0 : legalEntity.individual) == null ? true : delete _b2.phone;
|
|
48948
|
-
}
|
|
48949
|
-
}
|
|
48950
|
-
return legalEntity;
|
|
48951
|
-
};
|
|
48952
|
-
const mapLegalEntityToIndividualOnfidoSchema = (legalEntity, isChangingType) => {
|
|
48953
|
-
var _a2;
|
|
48954
|
-
let individualOnfido = {
|
|
48955
|
-
...formatObject(legalEntity, getIndividualSchemaFromAPI)
|
|
48956
|
-
};
|
|
48957
|
-
individualOnfido = {
|
|
48958
|
-
...individualOnfido,
|
|
48959
|
-
basicDetails: {
|
|
48960
|
-
...individualOnfido == null ? void 0 : individualOnfido.basicDetails,
|
|
48961
|
-
...isChangingType && {
|
|
48962
|
-
firstName: "",
|
|
48963
|
-
lastName: ""
|
|
48964
|
-
}
|
|
48965
|
-
}
|
|
48966
|
-
};
|
|
48967
|
-
if ((_a2 = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _a2.length) {
|
|
48968
|
-
individualOnfido = {
|
|
48969
|
-
...individualOnfido,
|
|
48970
|
-
idVerificationMethod: {
|
|
48971
|
-
// Manually set verification method as instantVerification, for existing document journey
|
|
48972
|
-
idVerificationMethod: "instantVerification",
|
|
48973
|
-
idDocument: mapDocumentDetailToIdDocument(legalEntity.documentDetails)
|
|
48974
|
-
}
|
|
48975
|
-
};
|
|
48976
|
-
}
|
|
48977
|
-
return individualOnfido;
|
|
48978
|
-
};
|
|
48979
|
-
const mapDocumentDetailToIdDocument = (documents) => {
|
|
48980
|
-
var _a2;
|
|
48981
|
-
const activeDocument = (_a2 = documents.filter((document2) => document2.active)) == null ? void 0 : _a2[0];
|
|
48982
|
-
return activeDocument ? {
|
|
48983
|
-
idDocumentType: activeDocument.type,
|
|
48984
|
-
modificationDate: activeDocument.modificationDate
|
|
48985
|
-
} : void 0;
|
|
48986
|
-
};
|
|
48987
|
-
const individualOnfidoBaseMapping = {
|
|
48988
|
-
"basicDetails.firstName": "individual.name.firstName",
|
|
48989
|
-
"basicDetails.lastName": "individual.name.lastName",
|
|
48990
|
-
"basicDetails.phoneNumber.number": "individual.phone.number",
|
|
48991
|
-
"basicDetails.phoneNumber.phoneCountryCode": "individual.phone.phoneCountryCode",
|
|
48992
|
-
"basicDetails.phoneNumber.type": "individual.phone.type",
|
|
48993
|
-
"basicDetails.email": "individual.email",
|
|
48994
|
-
"additionalPersonalDetails.city": "individual.residentialAddress.city",
|
|
48995
|
-
"additionalPersonalDetails.country": "individual.residentialAddress.country",
|
|
48996
|
-
"additionalPersonalDetails.postalCode": "individual.residentialAddress.postalCode",
|
|
48997
|
-
"additionalPersonalDetails.stateOrProvince": "individual.residentialAddress.stateOrProvince",
|
|
48998
|
-
"additionalPersonalDetails.address": "individual.residentialAddress.street",
|
|
48999
|
-
"additionalPersonalDetails.otherAddressInformation": "individual.residentialAddress.street2"
|
|
49000
|
-
};
|
|
49001
|
-
const getIndividualSchemaFromAPI = {
|
|
49002
|
-
...individualOnfidoBaseMapping
|
|
49003
|
-
};
|
|
49004
|
-
const getAPISchemaFromIndividualSchema = {
|
|
49005
|
-
...reverseObject(individualOnfidoBaseMapping)
|
|
49006
|
-
};
|
|
49007
49019
|
const parseConfiguration$2 = ({ matchingScenario }) => parseIndividualOnfidoScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.INDIVIDUAL]);
|
|
49008
49020
|
const logger$e = createLogger();
|
|
49009
49021
|
function IndividualOnfidoDropin({
|
|
@@ -49174,7 +49186,7 @@ function IndividualOnfidoDropin({
|
|
|
49174
49186
|
individualOnfidoForms,
|
|
49175
49187
|
(problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [],
|
|
49176
49188
|
(problems == null ? void 0 : problems.missingData) ?? [],
|
|
49177
|
-
legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [],
|
|
49189
|
+
legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse, true) : [],
|
|
49178
49190
|
fieldsFromCustomRules,
|
|
49179
49191
|
{},
|
|
49180
49192
|
{},
|
|
@@ -49301,7 +49313,11 @@ function IndividualOnfidoDropin({
|
|
|
49301
49313
|
const onSubmit = async () => {
|
|
49302
49314
|
var _a3, _b3;
|
|
49303
49315
|
setLoadingStatus("loading");
|
|
49304
|
-
const dataSubmitted = omitObscuredFieldsIfUnchanged(
|
|
49316
|
+
const dataSubmitted = omitObscuredFieldsIfUnchanged(
|
|
49317
|
+
individualOnfidoObscuredFields,
|
|
49318
|
+
data,
|
|
49319
|
+
dataFromResponse
|
|
49320
|
+
);
|
|
49305
49321
|
if (!dataSubmitted) {
|
|
49306
49322
|
return;
|
|
49307
49323
|
}
|
|
@@ -49354,7 +49370,7 @@ function IndividualOnfidoDropin({
|
|
|
49354
49370
|
}
|
|
49355
49371
|
};
|
|
49356
49372
|
const canSubmit2 = () => {
|
|
49357
|
-
const mandatoryDetails = mandatoryApiFields.
|
|
49373
|
+
const mandatoryDetails = mandatoryApiFields.INDIVIDUAL_ONFIDO;
|
|
49358
49374
|
return mandatoryDetails.every((detail) => {
|
|
49359
49375
|
const value = getProp(data, detail);
|
|
49360
49376
|
return !isEmpty$1(value) || Array.isArray(detail) && detail.length > 0;
|
|
@@ -52270,7 +52286,7 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
|
|
|
52270
52286
|
return hasOwnEntityAssocation || !!hasOrganizationType;
|
|
52271
52287
|
};
|
|
52272
52288
|
const Introduction = lazy$1(
|
|
52273
|
-
async () => (await import("./Introduction-
|
|
52289
|
+
async () => (await import("./Introduction-CE3a76j3.js")).Introduction
|
|
52274
52290
|
);
|
|
52275
52291
|
const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
52276
52292
|
const logger$c = createLogger();
|
|
@@ -57283,7 +57299,7 @@ var TanstackQueryDevtools = (_k = class {
|
|
|
57283
57299
|
if (__privateGet(this, _Component)) {
|
|
57284
57300
|
Devtools = __privateGet(this, _Component);
|
|
57285
57301
|
} else {
|
|
57286
|
-
Devtools = lazy(() => import("./HO4MOOFI-
|
|
57302
|
+
Devtools = lazy(() => import("./HO4MOOFI-JCLMNnM8.js"));
|
|
57287
57303
|
__privateSet(this, _Component, Devtools);
|
|
57288
57304
|
}
|
|
57289
57305
|
setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
|
|
@@ -57405,7 +57421,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
|
|
|
57405
57421
|
if (__privateGet(this, _Component2)) {
|
|
57406
57422
|
Devtools = __privateGet(this, _Component2);
|
|
57407
57423
|
} else {
|
|
57408
|
-
Devtools = lazy(() => import("./HUY7CZI3-
|
|
57424
|
+
Devtools = lazy(() => import("./HUY7CZI3-B8qeOQnE.js"));
|
|
57409
57425
|
__privateSet(this, _Component2, Devtools);
|
|
57410
57426
|
}
|
|
57411
57427
|
setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
|
|
@@ -57626,7 +57642,7 @@ const useAnalytics = ({
|
|
|
57626
57642
|
componentName,
|
|
57627
57643
|
onboardingVersion
|
|
57628
57644
|
}) => {
|
|
57629
|
-
const sdkVersion = "3.60.
|
|
57645
|
+
const sdkVersion = "3.60.8";
|
|
57630
57646
|
const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
|
|
57631
57647
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
57632
57648
|
const countryCode = useGlobalStore((store) => store.rootLegalEntityCountry);
|
|
@@ -58117,7 +58133,7 @@ const ConfigurationApiProvider = ({
|
|
|
58117
58133
|
[authContext, rootLegalEntityId]
|
|
58118
58134
|
);
|
|
58119
58135
|
return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
|
|
58120
|
-
/* @__PURE__ */ jsx$1("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.60.
|
|
58136
|
+
/* @__PURE__ */ jsx$1("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.60.8" }),
|
|
58121
58137
|
children2
|
|
58122
58138
|
] });
|
|
58123
58139
|
};
|
|
@@ -58562,7 +58578,7 @@ function StateProvider({
|
|
|
58562
58578
|
);
|
|
58563
58579
|
return /* @__PURE__ */ jsx$1(StateContext.Provider, { value: contextValue, children: children2 });
|
|
58564
58580
|
}
|
|
58565
|
-
const DebugModal = lazy$1(async () => (await import("./DebugModal-
|
|
58581
|
+
const DebugModal = lazy$1(async () => (await import("./DebugModal-Cgx9tT9n.js").then((n) => n.D)).DebugModal);
|
|
58566
58582
|
const DebugListener = () => {
|
|
58567
58583
|
const [debugUiOpen, setDebugUiOpen] = useState(false);
|
|
58568
58584
|
const { isSettingEnabled } = useSettingsContext();
|
package/dist/style.css
CHANGED
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
box-shadow: var(--adyen-sdk-shadow-high, 0px 18px 36px rgba(0, 17, 44, 0.12), 0px 4px 8px rgba(0, 17, 44, 0.06));
|
|
301
301
|
overflow: hidden;
|
|
302
302
|
padding: var(--adyen-sdk-spacer-000, 0px);
|
|
303
|
-
position:
|
|
303
|
+
position: fixed;
|
|
304
304
|
}
|
|
305
305
|
.adyen-kyc-modal:focus-visible {
|
|
306
306
|
outline: none;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { ExistingLegalEntity, LegalEntity } from '#core/models/api/legal-entity';
|
|
2
|
+
import type { RecursiveKeyOf } from '#utils/getNestedPropertyKeys';
|
|
3
|
+
import type { MappingRecord } from '#utils/mapping/componentApiMapping';
|
|
2
4
|
import type { IndividualOnfidoSchema } from '../forms/IndividualOnfido/IndividualOnfido.types';
|
|
3
5
|
export declare const mapIndividualOnfidoSchemaToLegalEntity: (individualOnfido: IndividualOnfidoSchema) => LegalEntity;
|
|
4
6
|
export declare const mapLegalEntityToIndividualOnfidoSchema: (legalEntity: ExistingLegalEntity, isChangingType?: boolean) => IndividualOnfidoSchema;
|
|
7
|
+
export declare const individualOnfidoObscuredFields: Array<RecursiveKeyOf<IndividualOnfidoSchema>>;
|
|
8
|
+
export declare const getAPISchemaFromIndividualSchema: MappingRecord<Pick<LegalEntity, 'individual'>, IndividualOnfidoSchema>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ExperimentName } from '#context/ExperimentContext/types';
|
|
2
1
|
import type { ExistingLegalEntity } from '#core/models/api/legal-entity';
|
|
3
2
|
import type { BusinessDetailsSchema } from '../components/Business/forms/BusinessDetails/types';
|
|
4
3
|
import type { CompanySchema } from '../components/Business/forms/Company/types';
|
|
@@ -7,4 +6,4 @@ import type { SolePropSchema } from '../components/SoleProprietorship/forms/Sole
|
|
|
7
6
|
import type { TrustSchema } from '../components/Trust/forms/Trust/types';
|
|
8
7
|
import type { RecursiveKeyOf } from './getNestedPropertyKeys';
|
|
9
8
|
export type AnyTLDSFieldName = RecursiveKeyOf<IndividualSchema> | RecursiveKeyOf<CompanySchema> | RecursiveKeyOf<BusinessDetailsSchema> | RecursiveKeyOf<SolePropSchema> | RecursiveKeyOf<TrustSchema>;
|
|
10
|
-
export declare const getFieldsWithExistingData: (legalEntity: ExistingLegalEntity,
|
|
9
|
+
export declare const getFieldsWithExistingData: (legalEntity: ExistingLegalEntity, newFlow?: boolean) => AnyTLDSFieldName[];
|
|
@@ -7,6 +7,7 @@ import type { BusinessDetailsSchema } from '../../components/Business/forms/Busi
|
|
|
7
7
|
import type { CompanySchema } from '../../components/Business/forms/Company/types';
|
|
8
8
|
import type { HighExposureSchema } from '../../components/EFP/tasks/HighExposureDropin/types';
|
|
9
9
|
import type { IndividualSchema } from '../../components/Individual/forms/Individual/types';
|
|
10
|
+
import type { IndividualOnfidoSchema } from '../../components/Individual/forms/IndividualOnfido/IndividualOnfido.types';
|
|
10
11
|
import type { SolePropSchema } from '../../components/SoleProprietorship/forms/SoleProp/types';
|
|
11
12
|
import type { TrustSchema } from '../../components/Trust/forms/Trust/types';
|
|
12
13
|
import type { AnyTLDSFieldName } from '../getFieldsWithExistingData';
|
|
@@ -16,6 +17,7 @@ type DocumentMappingRecord<TargetSchema extends object> = Partial<Record<Documen
|
|
|
16
17
|
export type AnyComponentMappingRecord = MappingRecord<IndividualSchema, Pick<LegalEntity, 'individual'>> | MappingRecord<BusinessDetailsSchema, Pick<LegalEntity, 'organization'>> | MappingRecord<CompanySchema, Pick<LegalEntity, 'organization'>> | MappingRecord<SolePropSchema, Pick<LegalEntity, 'soleProprietorship'>> | MappingRecord<TrustSchema, Pick<LegalEntity, 'trust'>>;
|
|
17
18
|
export declare const mandatoryApiFields: {
|
|
18
19
|
INDIVIDUAL: Array<Partial<RecursiveKeyOf<IndividualSchema>>>;
|
|
20
|
+
INDIVIDUAL_ONFIDO: Array<Partial<RecursiveKeyOf<IndividualOnfidoSchema>>>;
|
|
19
21
|
DECISIONMAKER: Array<Partial<RecursiveKeyOf<IndividualSchema>>>;
|
|
20
22
|
DECISION_MAKER_OWNER: Array<Partial<RecursiveKeyOf<IndividualSchema>>>;
|
|
21
23
|
ORGANIZATION: Array<Partial<RecursiveKeyOf<CompanySchema>>>;
|
|
@@ -2,6 +2,7 @@ import type { ExperimentName } from '#context/ExperimentContext/types';
|
|
|
2
2
|
import type { PageType } from '#core/models/api/attachment';
|
|
3
3
|
import type { Document } from '#core/models/api/document';
|
|
4
4
|
import type { FinancialReport } from '#core/models/api/financialReport';
|
|
5
|
+
import type { Individual } from '#core/models/api/individual';
|
|
5
6
|
import type { ExistingLegalEntity, LegalEntity } from '#core/models/api/legal-entity';
|
|
6
7
|
import type { BusinessLinesType } from '#core/models/api/source-of-funds';
|
|
7
8
|
import type { ExistingTransferInstrument, TransferInstrument } from '#core/models/api/transfer-instrument';
|
|
@@ -12,10 +13,12 @@ import type { PayoutDetailsSchema } from '../../components/BankAccount/forms/Pay
|
|
|
12
13
|
import type { CompanySchema } from '../../components/Business/forms/Company/types';
|
|
13
14
|
import type { HighExposureSchema } from '../../components/EFP/tasks/HighExposureDropin/types';
|
|
14
15
|
import type { SourceOfFundsSchema } from '../../components/EFP/tasks/SourceOfFundsDropin/types';
|
|
16
|
+
import type { PersonalDetailsSchema } from '../../components/Individual/forms/Individual/PersonalDetails/types';
|
|
15
17
|
import type { IndividualSchema } from '../../components/Individual/forms/Individual/types';
|
|
16
18
|
import type { IndividualOnfidoSchema } from '../../components/Individual/forms/IndividualOnfido/IndividualOnfido.types';
|
|
17
19
|
import type { SolePropSchema } from '../../components/SoleProprietorship/forms/SoleProp/types';
|
|
18
20
|
import type { TrustSchema } from '../../components/Trust/forms/Trust/types';
|
|
21
|
+
export declare const adjustIdentificationData: (data: Pick<PersonalDetailsSchema, "idNumber" | "idNumberExempt" | "typeOfIdentity">, apiData: Individual["identificationData"]) => Individual["identificationData"];
|
|
19
22
|
/**
|
|
20
23
|
* Easy to use function for mapping transferInstrument response to payout account details component data
|
|
21
24
|
* @param transferInstrument - a transferInstrument the same as found in API response
|