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