@adyen/kyc-components 3.60.6 → 3.60.7

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.
@@ -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-SsGSz5hf.js";
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-BXvH3LBB.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-SsGSz5hf.js";
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-BXvH3LBB.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-CFB74M1p.js"),
139
- json: () => import("./json-fQtFzTcu.js"),
140
- yaml: () => import("./yaml-B2_CWZPy.js"),
141
- css: () => import("./css-BE9mU2jw.js")
138
+ plaintext: () => import("./plaintext-BolrXcJP.js"),
139
+ json: () => import("./json-DwvmCuYm.js"),
140
+ yaml: () => import("./yaml-CTEvq48i.js"),
141
+ css: () => import("./css-DFn7MtsT.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.6",
432
+ sdkVersion: "3.60.7",
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-BVof8nMM.js";
2
- import { p as getPreferredColorScheme, q as createMemo, r as createComponent } from "./index-SsGSz5hf.js";
1
+ import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./B4MFY5CR-BHnRatG5.js";
2
+ import { p as getPreferredColorScheme, q as createMemo, r as createComponent } from "./index-BXvH3LBB.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-BVof8nMM.js";
2
- import { p as getPreferredColorScheme, q as createMemo, r as createComponent } from "./index-SsGSz5hf.js";
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-BHnRatG5.js";
2
+ import { p as getPreferredColorScheme, q as createMemo, r as createComponent } from "./index-BXvH3LBB.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-SsGSz5hf.js";
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-BXvH3LBB.js";
4
4
  import { useMemo } from "preact/compat";
5
5
  var IntroductionScreens = ((IntroductionScreens2) => {
6
6
  IntroductionScreens2["PROLOGUE"] = "PROLOGUE";
@@ -1,4 +1,4 @@
1
- import { al } from "./index-SsGSz5hf.js";
1
+ import { al } from "./index-BXvH3LBB.js";
2
2
  export {
3
3
  al as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { c as cssProps } from "./DebugModal-CvJSr4Ij.js";
1
+ import { c as cssProps } from "./DebugModal-DfzSMFw6.js";
2
2
  const definitions = {
3
3
  any: { regex: /.*/g, css: cssProps.text },
4
4
  property: { regex: /(^|[\r\n])[^:]*:/g, css: cssProps.key },
@@ -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-Z]{1,2}\d{7}$/,
24581
+ [CountryCodes.Australia]: /^[A-Z0-9]{8,9}$/,
24582
24582
  [CountryCodes.HongKong]: /^[A-Z0-9]{9}$/,
24583
- [CountryCodes.NewZealand]: /[A-Z]{2}[0-9]{6,7}/
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(...alphaInputs(2), ...numericInputs(6), ...numericInputs(1, true)),
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(...alphaInputs(1), ...alphaInputs(1, true), ...numericInputs(7)),
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",
@@ -31976,14 +31981,107 @@ const getTargetLegalEntityType = (businessType, legalArrangement, trusteeType, c
31976
31981
  return currentLegalEntityType;
31977
31982
  };
31978
31983
  const isLegalArrangementOrganizationSubtype = (legalArrangementOption) => legalArrangementOption === "partnershipIncorporated" || legalArrangementOption === "associationIncorporated";
31979
- const convertApiFieldNameToSchemaFieldName = (apiField, legalEntityType, isExperimentEnabled) => {
31984
+ const mapIndividualOnfidoSchemaToLegalEntity = (individualOnfido) => {
31985
+ var _a2, _b2;
31986
+ const legalEntity = {
31987
+ ...formatObject(individualOnfido, getAPISchemaFromIndividualSchema),
31988
+ type: LegalEntityType.INDIVIDUAL
31989
+ };
31990
+ if (individualOnfido.additionalPersonalDetails) {
31991
+ legalEntity.individual.identificationData = adjustIdentificationData(
31992
+ individualOnfido.additionalPersonalDetails,
31993
+ legalEntity.individual.identificationData
31994
+ );
31995
+ }
31996
+ if ((_a2 = individualOnfido.basicDetails) == null ? void 0 : _a2.phoneNumber) {
31997
+ const phone = {
31998
+ number: individualOnfido.basicDetails.phoneNumber.number,
31999
+ type: "mobile"
32000
+ };
32001
+ if (phone.number && legalEntity.individual) {
32002
+ legalEntity.individual.phone = phone;
32003
+ } else {
32004
+ (_b2 = legalEntity == null ? void 0 : legalEntity.individual) == null ? true : delete _b2.phone;
32005
+ }
32006
+ }
32007
+ return legalEntity;
32008
+ };
32009
+ const mapLegalEntityToIndividualOnfidoSchema = (legalEntity, isChangingType) => {
32010
+ var _a2;
32011
+ let individualOnfido = {
32012
+ ...formatObject(legalEntity, getIndividualSchemaFromAPI)
32013
+ };
32014
+ individualOnfido = {
32015
+ ...individualOnfido,
32016
+ basicDetails: {
32017
+ ...individualOnfido == null ? void 0 : individualOnfido.basicDetails,
32018
+ ...isChangingType && {
32019
+ firstName: "",
32020
+ lastName: ""
32021
+ }
32022
+ }
32023
+ };
32024
+ if ((_a2 = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _a2.length) {
32025
+ individualOnfido = {
32026
+ ...individualOnfido,
32027
+ idVerificationMethod: {
32028
+ // Manually set verification method for existing document journey
32029
+ idVerificationMethod: "existingDocument",
32030
+ idDocument: mapDocumentDetailToIdDocument(legalEntity.documentDetails)
32031
+ }
32032
+ };
32033
+ }
32034
+ return individualOnfido;
32035
+ };
32036
+ const mapDocumentDetailToIdDocument = (documents) => {
32037
+ var _a2;
32038
+ const activeDocument = (_a2 = documents.filter((document2) => document2.active)) == null ? void 0 : _a2[0];
32039
+ return activeDocument ? {
32040
+ idDocumentType: activeDocument.type,
32041
+ modificationDate: activeDocument.modificationDate
32042
+ } : void 0;
32043
+ };
32044
+ const individualOnfidoObscuredFields = [
32045
+ "additionalPersonalDetails.idNumber",
32046
+ "additionalPersonalDetails.idNumberExempt"
32047
+ ];
32048
+ const individualOnfidoBaseMapping = {
32049
+ "basicDetails.firstName": "individual.name.firstName",
32050
+ "basicDetails.lastName": "individual.name.lastName",
32051
+ "basicDetails.phoneNumber.number": "individual.phone.number",
32052
+ "basicDetails.phoneNumber.phoneCountryCode": "individual.phone.phoneCountryCode",
32053
+ "basicDetails.phoneNumber.type": "individual.phone.type",
32054
+ "basicDetails.email": "individual.email",
32055
+ "additionalPersonalDetails.birthDate": "individual.birthData.dateOfBirth",
32056
+ "additionalPersonalDetails.idNumber": "individual.identificationData.number",
32057
+ "additionalPersonalDetails.idNumberExempt": "individual.identificationData.nationalIdExempt",
32058
+ "additionalPersonalDetails.typeOfIdentity": "individual.identificationData.type",
32059
+ "additionalPersonalDetails.issuerState": "individual.identificationData.issuerState",
32060
+ "additionalPersonalDetails.licenseCardNumber": "individual.identificationData.cardNumber",
32061
+ "additionalPersonalDetails.expiryDate": "individual.identificationData.expiryDate",
32062
+ "additionalPersonalDetails.nationality": "individual.nationality",
32063
+ // Address fields
32064
+ "additionalPersonalDetails.city": "individual.residentialAddress.city",
32065
+ "additionalPersonalDetails.country": "individual.residentialAddress.country",
32066
+ "additionalPersonalDetails.postalCode": "individual.residentialAddress.postalCode",
32067
+ "additionalPersonalDetails.stateOrProvince": "individual.residentialAddress.stateOrProvince",
32068
+ "additionalPersonalDetails.address": "individual.residentialAddress.street",
32069
+ "additionalPersonalDetails.otherAddressInformation": "individual.residentialAddress.street2"
32070
+ };
32071
+ const getIndividualSchemaFromAPI = {
32072
+ ...individualOnfidoBaseMapping
32073
+ };
32074
+ const getAPISchemaFromIndividualSchema = {
32075
+ ...reverseObject(individualOnfidoBaseMapping)
32076
+ };
32077
+ const convertApiFieldNameToSchemaFieldName = (apiField, legalEntityType, newFlow) => {
31980
32078
  switch (legalEntityType) {
31981
32079
  case LegalEntityType.INDIVIDUAL:
31982
- return apiField in individualApiKeyMapping ? individualApiKeyMapping[apiField] : void 0;
32080
+ return newFlow ? apiField in getAPISchemaFromIndividualSchema ? getAPISchemaFromIndividualSchema[apiField] : void 0 : apiField in individualApiKeyMapping ? individualApiKeyMapping[apiField] : void 0;
31983
32081
  case LegalEntityType.ORGANIZATION:
31984
- return (isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableNewBusinessDetailsFlow")) ? apiField in businessDetailsApiKeyMapping ? businessDetailsApiKeyMapping[apiField] : void 0 : apiField in companyApiKeyMapping ? companyApiKeyMapping[apiField] : void 0;
32082
+ return newFlow ? apiField in businessDetailsApiKeyMapping ? businessDetailsApiKeyMapping[apiField] : void 0 : apiField in companyApiKeyMapping ? companyApiKeyMapping[apiField] : void 0;
31985
32083
  case LegalEntityType.SOLE_PROPRIETORSHIP:
31986
- return (isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableSolePropUsingBusinessDetails")) ? apiField in solePropBusinessDetailsApiKeyMapping ? solePropBusinessDetailsApiKeyMapping[apiField] : void 0 : apiField in solePropApiKeyMapping ? solePropApiKeyMapping[apiField] : void 0;
32084
+ return newFlow ? apiField in solePropBusinessDetailsApiKeyMapping ? solePropBusinessDetailsApiKeyMapping[apiField] : void 0 : apiField in solePropApiKeyMapping ? solePropApiKeyMapping[apiField] : void 0;
31987
32085
  case LegalEntityType.TRUST:
31988
32086
  return apiField in trustApiKeyMapping ? trustApiKeyMapping[apiField] : void 0;
31989
32087
  case LegalEntityType.UNINCORPORATED_PARTNERSHIP:
@@ -31996,14 +32094,12 @@ const knownProblematicFields = [
31996
32094
  "personalDetails.typeOfIdentity",
31997
32095
  "personalDetails.issuerState"
31998
32096
  ];
31999
- const getFieldsWithExistingData = (legalEntity, isExperimentEnabled) => {
32097
+ const getFieldsWithExistingData = (legalEntity, newFlow = false) => {
32000
32098
  var _a2;
32001
32099
  const apiFieldsWithExistingData = getNestedPropertyKeys(legalEntity);
32002
32100
  const legalEntityType = legalEntity.type;
32003
32101
  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));
32102
+ const nonDocumentFields = apiFieldsWithExistingData.map((field) => convertApiFieldNameToSchemaFieldName(field, legalEntityType, newFlow)).filter((field) => field !== void 0).filter((field) => !knownProblematicFields.includes(field));
32007
32103
  if ((_a2 = legalEntity.documentDetails) == null ? void 0 : _a2.length) {
32008
32104
  const documentFields = legalEntity.documentDetails.map((document2) => legalEntityDocumentToFieldMapping[legalEntityType][document2.type]).filter((field) => field !== void 0);
32009
32105
  return [...nonDocumentFields, ...documentFields];
@@ -34972,7 +35068,7 @@ function BusinessDetailsDropin({
34972
35068
  initialForms,
34973
35069
  (currentProblems == null ? void 0 : currentProblems.remediationActions) ? Object.values(currentProblems == null ? void 0 : currentProblems.remediationActions) : [],
34974
35070
  (currentProblems == null ? void 0 : currentProblems.missingData) ?? [],
34975
- subjectEntity ? getFieldsWithExistingData(subjectEntity, isExperimentEnabled) : [],
35071
+ subjectEntity ? getFieldsWithExistingData(subjectEntity, true) : [],
34976
35072
  customRules,
34977
35073
  {},
34978
35074
  {},
@@ -48930,80 +49026,6 @@ function IndividualOnfido(props) {
48930
49026
  };
48931
49027
  return /* @__PURE__ */ jsx$1("div", { className: "adyen-kyc-individual", children: /* @__PURE__ */ jsx$1("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(propActiveForm) }) });
48932
49028
  }
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
49029
  const parseConfiguration$2 = ({ matchingScenario }) => parseIndividualOnfidoScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.INDIVIDUAL]);
49008
49030
  const logger$e = createLogger();
49009
49031
  function IndividualOnfidoDropin({
@@ -49174,7 +49196,7 @@ function IndividualOnfidoDropin({
49174
49196
  individualOnfidoForms,
49175
49197
  (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [],
49176
49198
  (problems == null ? void 0 : problems.missingData) ?? [],
49177
- legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [],
49199
+ legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse, true) : [],
49178
49200
  fieldsFromCustomRules,
49179
49201
  {},
49180
49202
  {},
@@ -49301,7 +49323,11 @@ function IndividualOnfidoDropin({
49301
49323
  const onSubmit = async () => {
49302
49324
  var _a3, _b3;
49303
49325
  setLoadingStatus("loading");
49304
- const dataSubmitted = omitObscuredFieldsIfUnchanged([], data, dataFromResponse);
49326
+ const dataSubmitted = omitObscuredFieldsIfUnchanged(
49327
+ individualOnfidoObscuredFields,
49328
+ data,
49329
+ dataFromResponse
49330
+ );
49305
49331
  if (!dataSubmitted) {
49306
49332
  return;
49307
49333
  }
@@ -49354,7 +49380,7 @@ function IndividualOnfidoDropin({
49354
49380
  }
49355
49381
  };
49356
49382
  const canSubmit2 = () => {
49357
- const mandatoryDetails = mandatoryApiFields.INDIVIDUAL;
49383
+ const mandatoryDetails = mandatoryApiFields.INDIVIDUAL_ONFIDO;
49358
49384
  return mandatoryDetails.every((detail) => {
49359
49385
  const value = getProp(data, detail);
49360
49386
  return !isEmpty$1(value) || Array.isArray(detail) && detail.length > 0;
@@ -52270,7 +52296,7 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
52270
52296
  return hasOwnEntityAssocation || !!hasOrganizationType;
52271
52297
  };
52272
52298
  const Introduction = lazy$1(
52273
- async () => (await import("./Introduction-DLNF-Da2.js")).Introduction
52299
+ async () => (await import("./Introduction-DrKpaADN.js")).Introduction
52274
52300
  );
52275
52301
  const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
52276
52302
  const logger$c = createLogger();
@@ -57283,7 +57309,7 @@ var TanstackQueryDevtools = (_k = class {
57283
57309
  if (__privateGet(this, _Component)) {
57284
57310
  Devtools = __privateGet(this, _Component);
57285
57311
  } else {
57286
- Devtools = lazy(() => import("./HO4MOOFI-BMe4escm.js"));
57312
+ Devtools = lazy(() => import("./HO4MOOFI-Dy_AeoHo.js"));
57287
57313
  __privateSet(this, _Component, Devtools);
57288
57314
  }
57289
57315
  setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
@@ -57405,7 +57431,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
57405
57431
  if (__privateGet(this, _Component2)) {
57406
57432
  Devtools = __privateGet(this, _Component2);
57407
57433
  } else {
57408
- Devtools = lazy(() => import("./HUY7CZI3-DruibpTU.js"));
57434
+ Devtools = lazy(() => import("./HUY7CZI3-BQQRBWnq.js"));
57409
57435
  __privateSet(this, _Component2, Devtools);
57410
57436
  }
57411
57437
  setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
@@ -57626,7 +57652,7 @@ const useAnalytics = ({
57626
57652
  componentName,
57627
57653
  onboardingVersion
57628
57654
  }) => {
57629
- const sdkVersion = "3.60.6";
57655
+ const sdkVersion = "3.60.7";
57630
57656
  const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
57631
57657
  const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
57632
57658
  const countryCode = useGlobalStore((store) => store.rootLegalEntityCountry);
@@ -58117,7 +58143,7 @@ const ConfigurationApiProvider = ({
58117
58143
  [authContext, rootLegalEntityId]
58118
58144
  );
58119
58145
  return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
58120
- /* @__PURE__ */ jsx$1("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.60.6" }),
58146
+ /* @__PURE__ */ jsx$1("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.60.7" }),
58121
58147
  children2
58122
58148
  ] });
58123
58149
  };
@@ -58562,7 +58588,7 @@ function StateProvider({
58562
58588
  );
58563
58589
  return /* @__PURE__ */ jsx$1(StateContext.Provider, { value: contextValue, children: children2 });
58564
58590
  }
58565
- const DebugModal = lazy$1(async () => (await import("./DebugModal-CvJSr4Ij.js").then((n) => n.D)).DebugModal);
58591
+ const DebugModal = lazy$1(async () => (await import("./DebugModal-DfzSMFw6.js").then((n) => n.D)).DebugModal);
58566
58592
  const DebugListener = () => {
58567
58593
  const [debugUiOpen, setDebugUiOpen] = useState(false);
58568
58594
  const { isSettingEnabled } = useSettingsContext();
@@ -1,4 +1,4 @@
1
- import { c as cssProps } from "./DebugModal-CvJSr4Ij.js";
1
+ import { c as cssProps } from "./DebugModal-DfzSMFw6.js";
2
2
  const definitions = {
3
3
  any: { regex: /.*/g, css: cssProps.text },
4
4
  number: { regex: /-?\d+(\.\d+)?([eE][+-]?\d+)?/g, css: cssProps.number },
@@ -1,4 +1,4 @@
1
- import { c as cssProps } from "./DebugModal-CvJSr4Ij.js";
1
+ import { c as cssProps } from "./DebugModal-DfzSMFw6.js";
2
2
  const definitions = {
3
3
  any: { regex: /.*/g, css: cssProps.text }
4
4
  };
@@ -1,4 +1,4 @@
1
- import { c as cssProps } from "./DebugModal-CvJSr4Ij.js";
1
+ import { c as cssProps } from "./DebugModal-DfzSMFw6.js";
2
2
  const definitions = {
3
3
  any: { regex: /.*/g, css: cssProps.text },
4
4
  boolean: { regex: /^(\s*)([\w-]+)(:)\s*(.*)$/g, css: cssProps.boolean },
@@ -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, isExperimentEnabled?: (key: ExperimentName) => boolean) => AnyTLDSFieldName[];
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.60.6",
3
+ "version": "3.60.7",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",