@adyen/kyc-components 3.40.2 → 3.40.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.
@@ -13600,6 +13600,13 @@ function Address({
13600
13600
  },
13601
13601
  i18n
13602
13602
  );
13603
+ useEffect(() => {
13604
+ if (hideCountry && (data == null ? void 0 : data.country) && data.country !== formData.country) {
13605
+ schema.forEach((field) => {
13606
+ return field === "country" ? handleChangeFor("country", "input")(data.country) : handleChangeFor(field, "input")(" ");
13607
+ });
13608
+ }
13609
+ }, [data == null ? void 0 : data.country, hideCountry]);
13603
13610
  useEffect(() => {
13604
13611
  onChange == null ? void 0 : onChange({
13605
13612
  schema: formSchema,
@@ -15417,7 +15424,7 @@ const mapLegalEntityToIndividual = (legalEntity, isChangingType) => {
15417
15424
  return individualData;
15418
15425
  };
15419
15426
  const mapIndividualToLegalEntity = (data) => {
15420
- var _a, _b;
15427
+ var _a, _b, _c;
15421
15428
  const requestObj = {
15422
15429
  ...formatObject(data, individualApiKeyMapping)
15423
15430
  };
@@ -15426,8 +15433,11 @@ const mapIndividualToLegalEntity = (data) => {
15426
15433
  data.personalDetails,
15427
15434
  requestObj.individual.identificationData
15428
15435
  );
15429
- const phone2 = ((_a = data.personalDetails) == null ? void 0 : _a.phone) ?? {
15430
- number: (_b = data.personalDetails) == null ? void 0 : _b.phoneNumber,
15436
+ const phone2 = ((_a = data.personalDetails) == null ? void 0 : _a.phone) ? {
15437
+ number: (_b = data.personalDetails) == null ? void 0 : _b.phone.number,
15438
+ type: "mobile"
15439
+ } : {
15440
+ number: (_c = data.personalDetails) == null ? void 0 : _c.phoneNumber,
15431
15441
  type: "mobile"
15432
15442
  };
15433
15443
  if (phone2.number) {
@@ -22393,7 +22403,7 @@ function Individual(props) {
22393
22403
  "address"
22394
22404
  );
22395
22405
  const renderActiveForm = (activeForm) => {
22396
- var _a2, _b2;
22406
+ var _a2, _b2, _c2;
22397
22407
  return /* @__PURE__ */ jsxs(Fragment, { children: [
22398
22408
  /* @__PURE__ */ jsx(StateContextWatcher, { owner: "Individual", onChange: handleStateChange }),
22399
22409
  /* @__PURE__ */ jsx(StateContextSetter, { owner: "Individual", stateRef }),
@@ -22445,7 +22455,7 @@ function Individual(props) {
22445
22455
  id: addressFormID,
22446
22456
  data: {
22447
22457
  ...addressFormProps == null ? void 0 : addressFormProps.data,
22448
- country: country ?? ((_a2 = addressFormProps == null ? void 0 : addressFormProps.data) == null ? void 0 : _a2.country)
22458
+ country: ((_a2 = data.personalDetails) == null ? void 0 : _a2.residencyCountry) ?? ((_b2 = addressFormProps == null ? void 0 : addressFormProps.data) == null ? void 0 : _b2.country) ?? country
22449
22459
  },
22450
22460
  requiredFields: addressSchema,
22451
22461
  optionalFields: ["otherAddressInformation"],
@@ -22470,7 +22480,7 @@ function Individual(props) {
22470
22480
  ...idVerificationMethodFormProps,
22471
22481
  name: fullName,
22472
22482
  id: idVerificationMethodFormID,
22473
- countryOfResidence: (_b2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _b2.residencyCountry
22483
+ countryOfResidence: (_c2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _c2.residencyCountry
22474
22484
  }
22475
22485
  )
22476
22486
  }
@@ -34220,13 +34230,16 @@ const BusinessTypeSelection = ({
34220
34230
  ] }) });
34221
34231
  };
34222
34232
  const mapCustomerSupportSchemaToCustomerSupportType = (customerSupport) => {
34223
- var _a, _b, _c;
34224
- const phone2 = ((_a = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _a.phone) ?? {
34225
- number: ((_b = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _b.phoneNumber) || "",
34233
+ var _a, _b, _c, _d, _e;
34234
+ const phone2 = ((_a = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _a.phone) ? {
34235
+ number: ((_c = (_b = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _b.phone) == null ? void 0 : _c.number) || "",
34236
+ type: "mobile"
34237
+ } : {
34238
+ number: ((_d = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _d.phoneNumber) || "",
34226
34239
  type: "mobile"
34227
34240
  };
34228
34241
  return {
34229
- email: ((_c = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _c.email) || "",
34242
+ email: ((_e = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _e.email) || "",
34230
34243
  phone: phone2
34231
34244
  };
34232
34245
  };
@@ -45585,7 +45598,7 @@ const ConfigurationApiProvider = ({
45585
45598
  }) => {
45586
45599
  const authContext = useAuthContext();
45587
45600
  const { isEmbeddedDropin, loadingContext } = authContext;
45588
- const sdkVersion = "3.40.2";
45601
+ const sdkVersion = "3.40.3";
45589
45602
  useAnalytics({
45590
45603
  onUserEvent,
45591
45604
  legalEntityId: rootLegalEntityId,
@@ -46264,7 +46277,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
46264
46277
  (settingName) => [settingName, getSetting(settingName)]
46265
46278
  );
46266
46279
  const debugModalMetaData = [
46267
- { key: "SDK version", value: "3.40.2", variant: "green" },
46280
+ { key: "SDK version", value: "3.40.3", variant: "green" },
46268
46281
  { key: "rootLegalEntityId", value: rootLegalEntityId, variant: "blue" },
46269
46282
  { key: "Locale", value: i18n.locale, variant: "blue" },
46270
46283
  { key: "Language", value: i18n.languageCode, variant: "blue" },
@@ -46296,7 +46309,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
46296
46309
  };
46297
46310
  const copyToClipboard = async () => {
46298
46311
  const toCopy = {
46299
- sdkVersion: "3.40.2",
46312
+ sdkVersion: "3.40.3",
46300
46313
  experiments: Object.fromEntries(allExperimentsWithValues),
46301
46314
  settings: Object.fromEntries(allSettingsWithValues)
46302
46315
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.40.2",
3
+ "version": "3.40.3",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",