@adyen/kyc-components 3.51.1 → 3.51.2
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-DkcZuwrr.js → B4MFY5CR-zicDXg2A.js} +1 -1
- package/dist/es/{HO4MOOFI-C34-7HCT.js → HO4MOOFI-cwSYvEW_.js} +2 -2
- package/dist/es/{HUY7CZI3-amkPei4o.js → HUY7CZI3-Mle7w1qv.js} +2 -2
- package/dist/es/adyen-kyc-components.es.js +1 -1
- package/dist/es/{index-CA2oyCNl.js → index-C6O_j_lU.js} +43 -17
- 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 { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, m as mutationSortFns, n as on, p as setAttribute, q as getSidedProp, r as use, v as createUniqueId, w as batch, x as getQueryStatusLabel, y as getMutationStatusColor, z as getQueryStatusColor, A as getQueryStatusColorByLabel, B as displayValue, F as For, C as convertRemToPixels, D as untrack, $ as $TRACK, E as useTransition, G as spread, H as mergeProps, I as createRoot, J as serialize, K as Index, L as updateNestedDataByPath, M as addEventListener, N as stringify, O as Match, Q as Switch, R as deleteNestedDataByPath, T as splitProps, U as Dynamic, V as createComputed } from "./index-
|
|
4
|
+
import { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, m as mutationSortFns, n as on, p as setAttribute, q as getSidedProp, r as use, v as createUniqueId, w as batch, x as getQueryStatusLabel, y as getMutationStatusColor, z as getQueryStatusColor, A as getQueryStatusColorByLabel, B as displayValue, F as For, C as convertRemToPixels, D as untrack, $ as $TRACK, E as useTransition, G as spread, H as mergeProps, I as createRoot, J as serialize, K as Index, L as updateNestedDataByPath, M as addEventListener, N as stringify, O as Match, Q as Switch, R as deleteNestedDataByPath, T as splitProps, U as Dynamic, V as createComputed } from "./index-C6O_j_lU.js";
|
|
5
5
|
var isNonNullable = (i2) => i2 != null;
|
|
6
6
|
var filterNonNullable = (arr) => arr.filter(isNonNullable);
|
|
7
7
|
function chain(callbacks) {
|
|
@@ -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 { g as getPreferredColorScheme, c as createMemo, a 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-zicDXg2A.js";
|
|
2
|
+
import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-C6O_j_lU.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 { g as getPreferredColorScheme, c as createMemo, a 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-zicDXg2A.js";
|
|
2
|
+
import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-C6O_j_lU.js";
|
|
3
3
|
var DevtoolsPanelComponent = (props) => {
|
|
4
4
|
const [localStore, setLocalStore] = createLocalStorage({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -39808,6 +39808,18 @@ const nameValidationRulesV4 = {
|
|
|
39808
39808
|
}
|
|
39809
39809
|
]
|
|
39810
39810
|
};
|
|
39811
|
+
const specialCharsRegEx = getFormattingRegEx(SPECIAL_CHARS.replace("-", ""));
|
|
39812
|
+
const nameFormatters = {
|
|
39813
|
+
firstName: {
|
|
39814
|
+
// formatter: trimValWithOneSpace // just trim
|
|
39815
|
+
// Example - removing disallowed chars as they are input: then they don't end up in state
|
|
39816
|
+
formatter: (val) => val ? trimValWithOneSpace(val).replace(specialCharsRegEx, "") : void 0
|
|
39817
|
+
// trim & replace
|
|
39818
|
+
},
|
|
39819
|
+
lastName: {
|
|
39820
|
+
formatter: (val) => val ? trimValWithOneSpace(val).replace(specialCharsRegEx, "") : void 0
|
|
39821
|
+
}
|
|
39822
|
+
};
|
|
39811
39823
|
const nomineeDecisionMakerRoleValidationRules = {
|
|
39812
39824
|
nomineeShareholder: {
|
|
39813
39825
|
modes: ["blur"],
|
|
@@ -39959,7 +39971,7 @@ function IndividualDropin({
|
|
|
39959
39971
|
trustedFieldsProvider,
|
|
39960
39972
|
trustedRoles
|
|
39961
39973
|
}) {
|
|
39962
|
-
var _a2, _b2, _c2, _d2;
|
|
39974
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
39963
39975
|
const { accountHolder, setAccountHolder, idVerificationProviderId } = useCoreContext();
|
|
39964
39976
|
const { isEmbeddedDropin } = useAuthContext();
|
|
39965
39977
|
const { i18n } = useI18nContext();
|
|
@@ -39991,7 +40003,7 @@ function IndividualDropin({
|
|
|
39991
40003
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
39992
40004
|
const [documents, setDocuments] = useState();
|
|
39993
40005
|
const [existingAttachments, setExistingAttachments] = useState();
|
|
39994
|
-
const [country] = useState(
|
|
40006
|
+
const [country, setCountry] = useState(
|
|
39995
40007
|
((_a2 = dataFromResponse == null ? void 0 : dataFromResponse.personalDetails) == null ? void 0 : _a2.residencyCountry) ?? parentCountry
|
|
39996
40008
|
);
|
|
39997
40009
|
const [hideFooter, setHideFooter] = useState(false);
|
|
@@ -40015,7 +40027,7 @@ function IndividualDropin({
|
|
|
40015
40027
|
}, []);
|
|
40016
40028
|
const individualFieldValidations = useCallback(
|
|
40017
40029
|
(data2) => {
|
|
40018
|
-
var _a3, _b3, _c3, _d3,
|
|
40030
|
+
var _a3, _b3, _c3, _d3, _e3, _f2, _g2, _h2, _i2;
|
|
40019
40031
|
return {
|
|
40020
40032
|
personalDetails: personalDetailsValidators({
|
|
40021
40033
|
country: ((_a3 = data2 == null ? void 0 : data2.personalDetails) == null ? void 0 : _a3.residencyCountry) ?? country,
|
|
@@ -40024,7 +40036,7 @@ function IndividualDropin({
|
|
|
40024
40036
|
taskType,
|
|
40025
40037
|
idNumberType: (_b3 = data2 == null ? void 0 : data2.personalDetails) == null ? void 0 : _b3.typeOfIdentity,
|
|
40026
40038
|
phonePrefix: (_d3 = (_c3 = data2 == null ? void 0 : data2.personalDetails) == null ? void 0 : _c3.phone) == null ? void 0 : _d3.phoneCountryCode,
|
|
40027
|
-
idNumberExempt: (
|
|
40039
|
+
idNumberExempt: (_e3 = data2 == null ? void 0 : data2.personalDetails) == null ? void 0 : _e3.idNumberExempt,
|
|
40028
40040
|
idNumber: (_f2 = data2 == null ? void 0 : data2.personalDetails) == null ? void 0 : _f2.idNumber,
|
|
40029
40041
|
existingIdNumber: (_g2 = dataFromResponse.personalDetails) == null ? void 0 : _g2.idNumber,
|
|
40030
40042
|
formVerificationErrors: (_h2 = propProblems == null ? void 0 : propProblems.verificationErrors) == null ? void 0 : _h2.personalDetails
|
|
@@ -40058,14 +40070,28 @@ function IndividualDropin({
|
|
|
40058
40070
|
}),
|
|
40059
40071
|
[legalEntityResponse, documents, isTargetLegalEntityType, dataFromResponse]
|
|
40060
40072
|
);
|
|
40073
|
+
const formatters = useMemo(
|
|
40074
|
+
() => ({
|
|
40075
|
+
personalDetails: {
|
|
40076
|
+
...nameFormatters
|
|
40077
|
+
},
|
|
40078
|
+
address: addressFormatters
|
|
40079
|
+
}),
|
|
40080
|
+
[]
|
|
40081
|
+
);
|
|
40061
40082
|
const form = useMultiForm({
|
|
40062
40083
|
requiredFields: derivedProps == null ? void 0 : derivedProps.requiredFields,
|
|
40063
40084
|
defaultData,
|
|
40064
40085
|
rules: individualFieldValidations,
|
|
40065
40086
|
asyncRules: individualFieldAsyncValidations,
|
|
40066
|
-
optionalFields: derivedProps == null ? void 0 : derivedProps.optionalFields
|
|
40087
|
+
optionalFields: derivedProps == null ? void 0 : derivedProps.optionalFields,
|
|
40088
|
+
formatters
|
|
40067
40089
|
});
|
|
40068
40090
|
const { data = dataFromResponse } = form;
|
|
40091
|
+
useEffect(() => {
|
|
40092
|
+
var _a3;
|
|
40093
|
+
setCountry(((_a3 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _a3.residencyCountry) ?? parentCountry);
|
|
40094
|
+
}, [(_b2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _b2.residencyCountry, parentCountry]);
|
|
40069
40095
|
const getConfigurationData = useCallback(
|
|
40070
40096
|
() => getConfiguration2({
|
|
40071
40097
|
legalEntityType: LegalEntityType.INDIVIDUAL,
|
|
@@ -40130,14 +40156,14 @@ function IndividualDropin({
|
|
|
40130
40156
|
roleTypes = getAllowedDecisionMakerRoles(parentLegalEntity, taskType);
|
|
40131
40157
|
}
|
|
40132
40158
|
if (parentLegalEntity == null ? void 0 : parentLegalEntity.entityAssociations) {
|
|
40133
|
-
const associations = (
|
|
40159
|
+
const associations = (_c2 = parentLegalEntity == null ? void 0 : parentLegalEntity.entityAssociations) == null ? void 0 : _c2.filter(
|
|
40134
40160
|
(ea) => ea.legalEntityId === (legalEntityResponse == null ? void 0 : legalEntityResponse.id)
|
|
40135
40161
|
);
|
|
40136
40162
|
if (associations && associations.length > 0) {
|
|
40137
40163
|
if (isRoleTypeTask && parentLegalEntity) {
|
|
40138
|
-
const jobTitle = (
|
|
40164
|
+
const jobTitle = (_d2 = associations.find(
|
|
40139
40165
|
(association) => Boolean(association.jobTitle)
|
|
40140
|
-
)) == null ? void 0 :
|
|
40166
|
+
)) == null ? void 0 : _d2.jobTitle;
|
|
40141
40167
|
dataFromResponse = {
|
|
40142
40168
|
...dataFromResponse,
|
|
40143
40169
|
personalDetails: {
|
|
@@ -40278,7 +40304,7 @@ function IndividualDropin({
|
|
|
40278
40304
|
parentLE,
|
|
40279
40305
|
dataSubmitted
|
|
40280
40306
|
}) => {
|
|
40281
|
-
var _a3, _b3, _c3, _d3,
|
|
40307
|
+
var _a3, _b3, _c3, _d3, _e3, _f2;
|
|
40282
40308
|
const newRoles = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER ? (_a3 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _a3.role : taskType === TaskTypes.TRUST_MEMBER_INDIVIDUAL ? trustMember == null ? void 0 : trustMember.roles : null;
|
|
40283
40309
|
const existingEntityAssociations = getOwnEntityAssociations(parentLE);
|
|
40284
40310
|
if (newRoles && (hasRolesChanged(legalEntity2, existingEntityAssociations, newRoles) || ((_b3 = dataFromResponse.personalDetails) == null ? void 0 : _b3.jobTitle) !== ((_c3 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _c3.jobTitle) || hasNomineesChanged(dataFromResponse.personalDetails, dataSubmitted.nominee))) {
|
|
@@ -40304,7 +40330,7 @@ function IndividualDropin({
|
|
|
40304
40330
|
}
|
|
40305
40331
|
await handleUpdateLegalEntity(updatedParentLegalEntity, parentLE.id);
|
|
40306
40332
|
}
|
|
40307
|
-
if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS && (existingEntityAssociations.every((ea) => ea.legalEntityId !== legalEntity2.id) || ((_d3 = dataFromResponse == null ? void 0 : dataFromResponse.personalDetails) == null ? void 0 : _d3.relationship) !== ((
|
|
40333
|
+
if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS && (existingEntityAssociations.every((ea) => ea.legalEntityId !== legalEntity2.id) || ((_d3 = dataFromResponse == null ? void 0 : dataFromResponse.personalDetails) == null ? void 0 : _d3.relationship) !== ((_e3 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _e3.relationship))) {
|
|
40308
40334
|
const newEntityAssociation = {
|
|
40309
40335
|
type: "legalRepresentative",
|
|
40310
40336
|
legalEntityId: legalEntity2.id,
|
|
@@ -40441,7 +40467,7 @@ function IndividualDropin({
|
|
|
40441
40467
|
};
|
|
40442
40468
|
};
|
|
40443
40469
|
const formatDataForSummary2 = () => {
|
|
40444
|
-
var _a3, _b3, _c3, _d3,
|
|
40470
|
+
var _a3, _b3, _c3, _d3, _e3, _f2, _g2;
|
|
40445
40471
|
let summaryData = cloneObject(data);
|
|
40446
40472
|
if ((_a3 = summaryData.personalDetails) == null ? void 0 : _a3.residencyCountry) {
|
|
40447
40473
|
summaryData.personalDetails.residencyCountry = datasetUtils.getCountryName(
|
|
@@ -40471,7 +40497,7 @@ function IndividualDropin({
|
|
|
40471
40497
|
i18n.locale
|
|
40472
40498
|
);
|
|
40473
40499
|
}
|
|
40474
|
-
if ((
|
|
40500
|
+
if ((_e3 = summaryData.personalDetails) == null ? void 0 : _e3.phone) {
|
|
40475
40501
|
delete summaryData.personalDetails.phone;
|
|
40476
40502
|
summaryData.personalDetails.phoneNumber = (_g2 = (_f2 = data.personalDetails) == null ? void 0 : _f2.phone) == null ? void 0 : _g2.number;
|
|
40477
40503
|
}
|
|
@@ -40479,7 +40505,7 @@ function IndividualDropin({
|
|
|
40479
40505
|
};
|
|
40480
40506
|
const summaryOmittedKeys = [
|
|
40481
40507
|
...taskType === TaskTypes.DECISION_MAKER ? ["role"] : [],
|
|
40482
|
-
...((
|
|
40508
|
+
...((_e2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _e2.idNumberExempt) ? ["idNumber"] : []
|
|
40483
40509
|
];
|
|
40484
40510
|
const {
|
|
40485
40511
|
handleNextClick,
|
|
@@ -52157,7 +52183,7 @@ const ConfigurationApiProvider = ({
|
|
|
52157
52183
|
}) => {
|
|
52158
52184
|
const authContext = useAuthContext();
|
|
52159
52185
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
52160
|
-
const sdkVersion = "3.51.
|
|
52186
|
+
const sdkVersion = "3.51.2";
|
|
52161
52187
|
const rootLegalEntityId = useGlobalStore((store) => store.rootLegalEntity.id);
|
|
52162
52188
|
useAnalytics({
|
|
52163
52189
|
onUserEvent,
|
|
@@ -52897,7 +52923,7 @@ const DebugModal = ({ onExit }) => {
|
|
|
52897
52923
|
const [tab, setTab] = useState("metadata");
|
|
52898
52924
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
52899
52925
|
const metadata = {
|
|
52900
|
-
sdkVersion: "3.51.
|
|
52926
|
+
sdkVersion: "3.51.2",
|
|
52901
52927
|
locale: i18n.locale,
|
|
52902
52928
|
rootLegalEntityId: rootLegalEntity.id
|
|
52903
52929
|
};
|
|
@@ -55894,7 +55920,7 @@ var TanstackQueryDevtools = (_k = class {
|
|
|
55894
55920
|
if (__privateGet(this, _Component)) {
|
|
55895
55921
|
Devtools = __privateGet(this, _Component);
|
|
55896
55922
|
} else {
|
|
55897
|
-
Devtools = lazy(() => import("./HO4MOOFI-
|
|
55923
|
+
Devtools = lazy(() => import("./HO4MOOFI-cwSYvEW_.js"));
|
|
55898
55924
|
__privateSet(this, _Component, Devtools);
|
|
55899
55925
|
}
|
|
55900
55926
|
setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
|
|
@@ -56016,7 +56042,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
|
|
|
56016
56042
|
if (__privateGet(this, _Component2)) {
|
|
56017
56043
|
Devtools = __privateGet(this, _Component2);
|
|
56018
56044
|
} else {
|
|
56019
|
-
Devtools = lazy(() => import("./HUY7CZI3-
|
|
56045
|
+
Devtools = lazy(() => import("./HUY7CZI3-Mle7w1qv.js"));
|
|
56020
56046
|
__privateSet(this, _Component2, Devtools);
|
|
56021
56047
|
}
|
|
56022
56048
|
setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
|