@adyen/kyc-components 3.39.0 → 3.39.3
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.
|
@@ -28445,21 +28445,28 @@ function getBaseTrackingPayload({
|
|
|
28445
28445
|
}
|
|
28446
28446
|
return baseTrackingPayload;
|
|
28447
28447
|
}
|
|
28448
|
-
const adjustFormData = (oldFormData, newFormData) =>
|
|
28449
|
-
const
|
|
28450
|
-
|
|
28451
|
-
|
|
28452
|
-
|
|
28453
|
-
|
|
28454
|
-
|
|
28455
|
-
|
|
28456
|
-
|
|
28457
|
-
|
|
28458
|
-
|
|
28459
|
-
|
|
28460
|
-
|
|
28461
|
-
|
|
28462
|
-
|
|
28448
|
+
const adjustFormData = (oldFormData, newFormData) => {
|
|
28449
|
+
const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
|
|
28450
|
+
return schema.reduce((acc, key) => {
|
|
28451
|
+
const oldValue = oldFormData[key];
|
|
28452
|
+
const newValue = newFormData[key];
|
|
28453
|
+
if (!isUndefinedOrNull(newValue)) return { ...acc, [key]: newValue };
|
|
28454
|
+
if (Array.isArray(oldValue)) return { ...acc, [key]: [] };
|
|
28455
|
+
if (typeof oldValue === "number") return { ...acc, [key]: null };
|
|
28456
|
+
if (typeof oldValue === "string") return { ...acc, [key]: "" };
|
|
28457
|
+
return { ...acc, [key]: "" };
|
|
28458
|
+
}, {});
|
|
28459
|
+
};
|
|
28460
|
+
const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
|
|
28461
|
+
const formIds = Array.from((/* @__PURE__ */ new Set([...keysOf(existingData), ...keysOf(newData)])).keys());
|
|
28462
|
+
return formIds.reduce((adjusted, formId) => {
|
|
28463
|
+
const oldFormData = existingData[formId];
|
|
28464
|
+
const newFormData = newData[formId];
|
|
28465
|
+
if (isUndefinedOrNull(oldFormData)) return { ...adjusted, [formId]: newFormData };
|
|
28466
|
+
if (isUndefinedOrNull(newFormData)) return adjusted;
|
|
28467
|
+
return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
|
|
28468
|
+
}, {});
|
|
28469
|
+
};
|
|
28463
28470
|
const getRequiredForms = (forms, requiredFields, optionalFields) => {
|
|
28464
28471
|
const requiredForms = Object.values(forms).filter(({ formId }) => {
|
|
28465
28472
|
if (requiredFields || optionalFields) {
|
|
@@ -45376,7 +45383,7 @@ const ConfigurationApiProvider = ({
|
|
|
45376
45383
|
}) => {
|
|
45377
45384
|
const authContext = useAuthContext();
|
|
45378
45385
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
45379
|
-
const sdkVersion = "3.39.
|
|
45386
|
+
const sdkVersion = "3.39.3";
|
|
45380
45387
|
useAnalytics({
|
|
45381
45388
|
onUserEvent,
|
|
45382
45389
|
legalEntityId: rootLegalEntityId,
|
|
@@ -46075,7 +46082,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
46075
46082
|
};
|
|
46076
46083
|
const copyToClipboard = async () => {
|
|
46077
46084
|
const toCopy = {
|
|
46078
|
-
sdkVersion: "3.39.
|
|
46085
|
+
sdkVersion: "3.39.3",
|
|
46079
46086
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
46080
46087
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
46081
46088
|
};
|
|
@@ -46140,7 +46147,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
46140
46147
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
46141
46148
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
46142
46149
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
46143
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "3.39.
|
|
46150
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "3.39.3" })
|
|
46144
46151
|
] }) }),
|
|
46145
46152
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
46146
46153
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|