@adyen/kyc-components 3.40.3 → 3.40.4
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.
|
@@ -28589,22 +28589,28 @@ function getBaseTrackingPayload({
|
|
|
28589
28589
|
}
|
|
28590
28590
|
return baseTrackingPayload;
|
|
28591
28591
|
}
|
|
28592
|
-
const adjustFormData = (oldFormData, newFormData) =>
|
|
28593
|
-
const
|
|
28594
|
-
|
|
28595
|
-
|
|
28596
|
-
|
|
28597
|
-
|
|
28598
|
-
|
|
28599
|
-
|
|
28600
|
-
|
|
28601
|
-
|
|
28602
|
-
|
|
28603
|
-
|
|
28604
|
-
|
|
28605
|
-
|
|
28606
|
-
return
|
|
28607
|
-
|
|
28592
|
+
const adjustFormData = (oldFormData, newFormData) => {
|
|
28593
|
+
const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
|
|
28594
|
+
return schema.reduce((acc, key) => {
|
|
28595
|
+
const oldValue = oldFormData[key];
|
|
28596
|
+
const newValue = newFormData[key];
|
|
28597
|
+
if (!isUndefinedOrNull(newValue)) return { ...acc, [key]: newValue };
|
|
28598
|
+
if (Array.isArray(oldValue)) return { ...acc, [key]: [] };
|
|
28599
|
+
if (typeof oldValue === "number") return { ...acc, [key]: null };
|
|
28600
|
+
if (typeof oldValue === "string") return { ...acc, [key]: "" };
|
|
28601
|
+
return { ...acc, [key]: "" };
|
|
28602
|
+
}, {});
|
|
28603
|
+
};
|
|
28604
|
+
const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
|
|
28605
|
+
const formIds = Array.from((/* @__PURE__ */ new Set([...keysOf(existingData), ...keysOf(newData)])).keys());
|
|
28606
|
+
return formIds.reduce((adjusted, formId) => {
|
|
28607
|
+
const oldFormData = existingData[formId];
|
|
28608
|
+
const newFormData = newData[formId];
|
|
28609
|
+
if (isUndefinedOrNull(oldFormData)) return { ...adjusted, [formId]: newFormData };
|
|
28610
|
+
if (isUndefinedOrNull(newFormData)) return adjusted;
|
|
28611
|
+
return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
|
|
28612
|
+
}, {});
|
|
28613
|
+
};
|
|
28608
28614
|
const getRequiredForms = (forms, requiredFields, optionalFields) => {
|
|
28609
28615
|
const requiredForms = Object.values(forms).filter(({ formId }) => {
|
|
28610
28616
|
if (requiredFields || optionalFields) {
|
|
@@ -45598,7 +45604,7 @@ const ConfigurationApiProvider = ({
|
|
|
45598
45604
|
}) => {
|
|
45599
45605
|
const authContext = useAuthContext();
|
|
45600
45606
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
45601
|
-
const sdkVersion = "3.40.
|
|
45607
|
+
const sdkVersion = "3.40.4";
|
|
45602
45608
|
useAnalytics({
|
|
45603
45609
|
onUserEvent,
|
|
45604
45610
|
legalEntityId: rootLegalEntityId,
|
|
@@ -46277,7 +46283,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
46277
46283
|
(settingName) => [settingName, getSetting(settingName)]
|
|
46278
46284
|
);
|
|
46279
46285
|
const debugModalMetaData = [
|
|
46280
|
-
{ key: "SDK version", value: "3.40.
|
|
46286
|
+
{ key: "SDK version", value: "3.40.4", variant: "green" },
|
|
46281
46287
|
{ key: "rootLegalEntityId", value: rootLegalEntityId, variant: "blue" },
|
|
46282
46288
|
{ key: "Locale", value: i18n.locale, variant: "blue" },
|
|
46283
46289
|
{ key: "Language", value: i18n.languageCode, variant: "blue" },
|
|
@@ -46309,7 +46315,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
46309
46315
|
};
|
|
46310
46316
|
const copyToClipboard = async () => {
|
|
46311
46317
|
const toCopy = {
|
|
46312
|
-
sdkVersion: "3.40.
|
|
46318
|
+
sdkVersion: "3.40.4",
|
|
46313
46319
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
46314
46320
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
46315
46321
|
};
|