@adyen/kyc-components 2.58.0 → 2.58.1

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.
@@ -5,7 +5,7 @@ import cx from "classnames";
5
5
  import { lazy, Suspense, forwardRef, memo, useMemo as useMemo$1 } from "preact/compat";
6
6
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
7
7
  import debounce from "lodash-es/debounce";
8
- import isEmpty$1 from "lodash-es/isEmpty";
8
+ import isEmpty$2 from "lodash-es/isEmpty";
9
9
  import isISIN from "validator/es/lib/isISIN.js";
10
10
  import OpenBankingSDK from "@adyen/openbankingsdk";
11
11
  import range from "lodash-es/range";
@@ -2136,9 +2136,9 @@ const getMaxLengthByFieldAndCountry = (formattingRules, field, country, ignoreIf
2136
2136
  return maxLength || MAX_LENGTH;
2137
2137
  };
2138
2138
  const isUndefinedOrNull = (input) => input === void 0 || input === null;
2139
- const isEmpty = (input) => isUndefinedOrNull(input) || typeof input === "object" && Object.keys(input).length === 0 || typeof input === "string" && /^\s*$/.test(input);
2139
+ const isEmpty$1 = (input) => isUndefinedOrNull(input) || typeof input === "object" && Object.keys(input).length === 0 || typeof input === "string" && /^\s*$/.test(input);
2140
2140
  const isString = (input) => typeof input === "string" || input instanceof String;
2141
- const hasText = (input) => isString(input) && !isEmpty(input);
2141
+ const hasText = (input) => isString(input) && !isEmpty$1(input);
2142
2142
  const SPECIAL_CHARS = "?\\-\\+_=!@#$%^&*(){}~<>\\[\\]\\/\\\\";
2143
2143
  const getFormattingRegEx = (specChars, flags = "g") => new RegExp(`[${specChars}]`, flags);
2144
2144
  const trimValWithOneSpace = (val) => val.trimStart().replace(/\s+/g, " ");
@@ -2147,8 +2147,8 @@ const NO_ALPHABET_REGEX = /^[^a-zA-Z]*$/;
2147
2147
  const INDIVIDUAL_VALID_CHAR_REGEX = /^[\p{L}\p{M}\d\s\-—./']*$/u;
2148
2148
  const OTHER_ENTITIES_VALID_CHAR_REGEX = /^[\w\s,.;:\-—&!?@()"'/\\+\p{L}\p{M}]+$/u;
2149
2149
  const matchesRegex = (regex, input) => isString(input) && regex.test(input ?? "");
2150
- const hasRepeatedCharacters = (input) => !isEmpty(input) && input.length > 1 && new Set(input).size === 1;
2151
- const isValidMinLength = (input, minLength = 1) => !isEmpty(input) && input.length >= minLength;
2150
+ const hasRepeatedCharacters = (input) => !isEmpty$1(input) && input.length > 1 && new Set(input).size === 1;
2151
+ const isValidMinLength = (input, minLength = 1) => !isEmpty$1(input) && input.length >= minLength;
2152
2152
  const isInvalidName = (input) => {
2153
2153
  const invalidNames = /* @__PURE__ */ new Set(["John Doe", "Jane Doe", "ABCD", "ABCDE", "ABCDEF", "ABCDEFG", "My Customer", "An other", "n/a", "not applicable", "n/A", "N/A", "N/a", "N\\ /A", "not app", "null"]);
2154
2154
  return invalidNames.has(input || "");
@@ -3302,7 +3302,7 @@ const useStaticValidator = (rules2) => {
3302
3302
  const isFieldObscured = !!((_b = context == null ? void 0 : context.state.obscuredFields) == null ? void 0 : _b.includes(key));
3303
3303
  const validationRulesResult = fieldRules.map((rule) => {
3304
3304
  const shouldValidate = rule.modes.includes(mode) && !isFieldObscured;
3305
- const isValid = isFieldOptional && isEmpty(value) ? true : rule.validate(value, context);
3305
+ const isValid = isFieldOptional && isEmpty$1(value) ? true : rule.validate(value, context);
3306
3306
  return {
3307
3307
  isValid,
3308
3308
  errorMessage: typeof rule.errorMessage === "function" ? rule.errorMessage(value, context) : rule.errorMessage,
@@ -4735,7 +4735,7 @@ const euCountries = [
4735
4735
  ];
4736
4736
  const validateNotEmptyOnBlur = {
4737
4737
  modes: ["blur"],
4738
- validate: (val) => !isEmpty(val),
4738
+ validate: (val) => !isEmpty$1(val),
4739
4739
  errorMessage: "fieldIsRequired"
4740
4740
  };
4741
4741
  const validateLegalCompanyName = [{
@@ -4973,7 +4973,7 @@ const PatriotActDisclosure = () => {
4973
4973
  const companyCountryValidationRules = {
4974
4974
  country: {
4975
4975
  modes: ["blur"],
4976
- validate: (companyCountry) => !isEmpty(companyCountry),
4976
+ validate: (companyCountry) => !isEmpty$1(companyCountry),
4977
4977
  errorMessage: "fieldIsRequired"
4978
4978
  },
4979
4979
  legalCompanyName: [{
@@ -4991,7 +4991,7 @@ const companyCountryValidationRules = {
4991
4991
  }],
4992
4992
  countryOfGoverningLaw: {
4993
4993
  modes: ["blur"],
4994
- validate: (countryOfGoverningLaw) => !isEmpty(countryOfGoverningLaw),
4994
+ validate: (countryOfGoverningLaw) => !isEmpty$1(countryOfGoverningLaw),
4995
4995
  errorMessage: "fieldIsRequired"
4996
4996
  }
4997
4997
  };
@@ -7255,7 +7255,7 @@ const MaskedInputText = ({
7255
7255
  isExperimentEnabled
7256
7256
  } = useExperimentsContext();
7257
7257
  const preserveMismatchingInitialValue = isExperimentEnabled("PreserveMismatchedInitialValues");
7258
- const hasExistingData = !isEmpty(value);
7258
+ const hasExistingData = !isEmpty$1(value);
7259
7259
  const [preservingMismatchedValue, setPreservingMismatchedValue] = useState(false);
7260
7260
  const [isFocused, setIsFocused] = useState(false);
7261
7261
  const [hasBlurred, setHasBlurred] = useState(hasExistingData);
@@ -9652,7 +9652,7 @@ function CompanyRegistrationDetailsComponent(props) {
9652
9652
  } = useGlobalDataSlice(COMPANY_REGISTRATION_DETAILS);
9653
9653
  const country = (companyNameAndCountry == null ? void 0 : companyNameAndCountry.country) ?? mergedProps.country;
9654
9654
  const hideOptionalRegistrationNumberField = FLOWS_THAT_HIDE_REGISTRATION_NUMBER.some((f) => f.country === country && mergedProps.companyType && f.companyType.includes(mergedProps.companyType));
9655
- const requiredFields = isEmpty$1(mergedProps.requiredFields) ? companyRegistrationDetailsFields : mergedProps.requiredFields;
9655
+ const requiredFields = isEmpty$2(mergedProps.requiredFields) ? companyRegistrationDetailsFields : mergedProps.requiredFields;
9656
9656
  const legalCompanyName = companyNameAndCountry == null ? void 0 : companyNameAndCountry.legalCompanyName;
9657
9657
  const defaultVatNumberType = ((_a = mergedProps.data) == null ? void 0 : _a.vatNumber) ? inferTaxIdNumberType((_b = mergedProps.data) == null ? void 0 : _b.vatNumber, country) : (_c = taxIdNumberOptions[country]) == null ? void 0 : _c[0].id;
9658
9658
  const [vatNumberType, setVatNumberType] = useState(defaultVatNumberType);
@@ -11345,12 +11345,12 @@ function NumberOfEmployees({
11345
11345
  const financialInfoValidationRules = {
11346
11346
  numberOfEmployees: [{
11347
11347
  modes: ["blur"],
11348
- validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
11348
+ validate: (numberOfEmployees) => !isEmpty$1(numberOfEmployees),
11349
11349
  errorMessage: "fieldIsRequired"
11350
11350
  }],
11351
11351
  financialReportingDate: [{
11352
11352
  modes: ["blur"],
11353
- validate: (date) => !isEmpty(date),
11353
+ validate: (date) => !isEmpty$1(date),
11354
11354
  errorMessage: "fieldIsRequired"
11355
11355
  }, {
11356
11356
  modes: ["blur"],
@@ -11359,12 +11359,12 @@ const financialInfoValidationRules = {
11359
11359
  }],
11360
11360
  currency: [{
11361
11361
  modes: ["blur"],
11362
- validate: (currency) => !isEmpty(currency),
11362
+ validate: (currency) => !isEmpty$1(currency),
11363
11363
  errorMessage: "fieldIsRequired"
11364
11364
  }],
11365
11365
  reportedValueOption: {
11366
11366
  modes: ["blur"],
11367
- validate: (option) => !isEmpty(option),
11367
+ validate: (option) => !isEmpty$1(option),
11368
11368
  errorMessage: "fieldIsRequired"
11369
11369
  },
11370
11370
  netAssets: {
@@ -14201,6 +14201,16 @@ const getObscuredAccountNumber = ({
14201
14201
  accountIdentifier,
14202
14202
  realLastFour
14203
14203
  }) => realLastFour ? `*******${realLastFour}` : accountIdentifier;
14204
+ const isEmpty = (obj, ignoreEmptyProperties = true) => {
14205
+ if (obj === null || obj === void 0) return true;
14206
+ if (Array.isArray(obj)) return obj.length === 0;
14207
+ if (typeof obj !== "object") return false;
14208
+ return keysOf(obj).every(
14209
+ (key) => !Object.hasOwn(obj, key) || // if it's an inherited property, we don't care
14210
+ ignoreEmptyProperties && isEmpty(obj[key], true)
14211
+ // or if the property is itself empty
14212
+ );
14213
+ };
14204
14214
  const mandatoryApiFields = {
14205
14215
  INDIVIDUAL: ["personalDetails.firstName", "personalDetails.lastName", "personalDetails.residencyCountry"],
14206
14216
  DECISIONMAKER: ["personalDetails.firstName", "personalDetails.lastName", "personalDetails.residencyCountry", "personalDetails.role", "personalDetails.jobTitle"],
@@ -14695,7 +14705,7 @@ const mapCompanyToLegalEntity = (data) => {
14695
14705
  });
14696
14706
  }
14697
14707
  requestObj.organization = transformCountryOfGoverningLawToLegalEntity(data.companyNameAndCountry, requestObj.organization);
14698
- if (data.companyFinancialInformation) {
14708
+ if (!isEmpty(data.companyFinancialInformation)) {
14699
14709
  requestObj.organization.financialReports = [formatObject(data.companyFinancialInformation, financialInformationApiKeyMapping)];
14700
14710
  }
14701
14711
  requestObj.type = LegalEntityType.ORGANIZATION;
@@ -17250,7 +17260,7 @@ const personalDetailsValidationRules = {
17250
17260
  errorMessage: "fieldIsRequired"
17251
17261
  }, {
17252
17262
  modes: ["blur"],
17253
- validate: (birthDate) => !isEmpty(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
17263
+ validate: (birthDate) => !isEmpty$1(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
17254
17264
  errorMessage: "invalidDateOfBirth"
17255
17265
  }],
17256
17266
  residencyCountry: {
@@ -17308,7 +17318,7 @@ const isTruthyValidator = {
17308
17318
  errorMessage: "fieldIsRequired"
17309
17319
  };
17310
17320
  const isNotEmptyValidator = {
17311
- validate: (value) => !isEmpty(value),
17321
+ validate: (value) => !isEmpty$1(value),
17312
17322
  modes: ["blur"],
17313
17323
  errorMessage: "fieldIsRequired"
17314
17324
  };
@@ -19275,27 +19285,27 @@ const ActionBar = ({
19275
19285
  const bankVerificationValidationRules = {
19276
19286
  verifiedAccountHolder: {
19277
19287
  modes: ["blur"],
19278
- validate: (verifiedAccountHolder) => !isEmpty(verifiedAccountHolder),
19288
+ validate: (verifiedAccountHolder) => !isEmpty$1(verifiedAccountHolder),
19279
19289
  errorMessage: "fieldIsRequired"
19280
19290
  },
19281
19291
  verifiedBankCountry: {
19282
19292
  modes: ["blur"],
19283
- validate: (verifiedBankCountry) => !isEmpty(verifiedBankCountry),
19293
+ validate: (verifiedBankCountry) => !isEmpty$1(verifiedBankCountry),
19284
19294
  errorMessage: "fieldIsRequired"
19285
19295
  },
19286
19296
  verifiedBankName: {
19287
19297
  modes: ["blur"],
19288
- validate: (verifiedBankName) => !isEmpty(verifiedBankName),
19298
+ validate: (verifiedBankName) => !isEmpty$1(verifiedBankName),
19289
19299
  errorMessage: "fieldIsRequired"
19290
19300
  },
19291
19301
  verifiedCurrencyCode: {
19292
19302
  modes: ["blur"],
19293
- validate: (verifiedCurrencyCode) => !isEmpty(verifiedCurrencyCode),
19303
+ validate: (verifiedCurrencyCode) => !isEmpty$1(verifiedCurrencyCode),
19294
19304
  errorMessage: "fieldIsRequired"
19295
19305
  },
19296
19306
  verifiedBankAccountNumber: {
19297
19307
  modes: ["blur"],
19298
- validate: (verifiedBankAccountNumber) => !isEmpty(verifiedBankAccountNumber),
19308
+ validate: (verifiedBankAccountNumber) => !isEmpty$1(verifiedBankAccountNumber),
19299
19309
  errorMessage: "fieldIsRequired"
19300
19310
  }
19301
19311
  };
@@ -20691,7 +20701,7 @@ const customPrefixByCountry = {
20691
20701
  [CountryCodes.IsleOfMan]: "GB"
20692
20702
  };
20693
20703
  function ibanValidator(input, bankCountry) {
20694
- if (isEmpty(input)) return false;
20704
+ if (isEmpty$1(input)) return false;
20695
20705
  const ibanInput = input.replace(/ /g, "").toUpperCase();
20696
20706
  if (!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(ibanInput)) {
20697
20707
  return false;
@@ -21758,7 +21768,7 @@ function PayoutDetailsComponent(props) {
21758
21768
  const taskHeading = i18n.get("addABankAccountForPayouts");
21759
21769
  const isBankStatementDocumentOptional = formUtilities(bankDocumentFormProps ?? {}, i18n).isOptionalField("bankStatementDocument");
21760
21770
  const globalData = useGlobalData();
21761
- const data = isEmpty(globalData) ? propData : globalData;
21771
+ const data = isEmpty$1(globalData) ? propData : globalData;
21762
21772
  const resetData = useResetGlobalData();
21763
21773
  const verifyInstantly = ((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "instantVerification";
21764
21774
  const bankCountry = ((_b = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _b.bankCountry) ?? country;
@@ -23628,7 +23638,7 @@ function Summary({
23628
23638
  formName
23629
23639
  }) => {
23630
23640
  const currentFormData = summaryData[formId];
23631
- const isFormEmpty = !currentFormData || Object.values(currentFormData).every((value) => isEmpty(value));
23641
+ const isFormEmpty = !currentFormData || Object.values(currentFormData).every((value) => isEmpty$1(value));
23632
23642
  if (isFormEmpty || formId === summaryStep.formId || omittedForms.includes(formId)) return;
23633
23643
  const summaryItems = currentFormData.hasInnerForms ? renderInnerForms(labels2 == null ? void 0 : labels2[formId], formId, currentFormData) : renderSummarySection(currentFormData, labels2 == null ? void 0 : labels2[formId], i18n.get(formName), formId);
23634
23644
  summaryList.push(summaryItems);
@@ -25618,7 +25628,7 @@ const businessNameFieldMetadata = {
25618
25628
  const CountryFieldValidation = () => ({
25619
25629
  country: {
25620
25630
  modes: ["blur"],
25621
- validate: (country) => !isEmpty(country),
25631
+ validate: (country) => !isEmpty$1(country),
25622
25632
  errorMessage: "fieldIsRequired"
25623
25633
  }
25624
25634
  });
@@ -25955,7 +25965,7 @@ const mapOrganizationTypeToCompanyType = (organizationType) => {
25955
25965
  const CompanyStructureValidation = {
25956
25966
  entityType: {
25957
25967
  modes: ["blur"],
25958
- validate: (entityType) => !isEmpty(entityType),
25968
+ validate: (entityType) => !isEmpty$1(entityType),
25959
25969
  errorMessage: "fieldIsRequired"
25960
25970
  }
25961
25971
  };
@@ -27469,7 +27479,7 @@ const parseConfiguration$6 = ({
27469
27479
  }) => parseBusinessDetailsScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.ORGANIZATION], country);
27470
27480
  const canSubmit$2 = (data) => MANDATORY_API_FIELDS.every((detail) => {
27471
27481
  const value = getProp(data, detail);
27472
- return !isEmpty(value);
27482
+ return !isEmpty$1(value);
27473
27483
  });
27474
27484
  const isDocumentsRequired$2 = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
27475
27485
  const removeConditionalForms = (forms, isSkippingCompanyStructure) => isSkippingCompanyStructure ? forms.filter((f) => f.formId !== "companyStructure" && f.formId !== "companyType") : forms;
@@ -28097,7 +28107,7 @@ const parseConfiguration$5 = ({
28097
28107
  }) => parseCompanyScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.ORGANIZATION], country);
28098
28108
  const canSubmit$1 = (data) => mandatoryApiFields.ORGANIZATION.every((detail) => {
28099
28109
  const value = getProp(data, detail);
28100
- return !isEmpty(value);
28110
+ return !isEmpty$1(value);
28101
28111
  });
28102
28112
  const isDocumentsRequired$1 = (forms) => forms.some((form) => [companyForms.companyRegistrationDocument.formId, companyForms.companyTaxDocument.formId].includes(form.formId));
28103
28113
  const formatFileSummaryData$1 = (companyRegistrationDocument, companyTaxDocument) => {
@@ -31629,7 +31639,7 @@ const isNotEmptyBirthDateValidatorRule = {
31629
31639
  };
31630
31640
  const isNotOutOfRangeBirthDateValidatorRule = {
31631
31641
  modes: ["blur"],
31632
- validate: (birthDate) => !isEmpty(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
31642
+ validate: (birthDate) => !isEmpty$1(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
31633
31643
  errorMessage: "invalidDateOfBirth"
31634
31644
  };
31635
31645
  const buildMinimumAgeValidationRule = (minimumAge) => ({
@@ -32073,7 +32083,7 @@ function IndividualDropinComponent({
32073
32083
  const mandatoryDetails = taskType === TaskTypes.DECISION_MAKER ? isDecisionMakerOwner ? mandatoryApiFields.DECISION_MAKER_OWNER : mandatoryApiFields.DECISIONMAKER : mandatoryApiFields.INDIVIDUAL;
32074
32084
  return mandatoryDetails.every((detail) => {
32075
32085
  const value = getProp(data, detail);
32076
- return !isEmpty(value) || Array.isArray(detail) && detail.length > 0;
32086
+ return !isEmpty$1(value) || Array.isArray(detail) && detail.length > 0;
32077
32087
  });
32078
32088
  };
32079
32089
  const datasetUtils = datasetUtilities(i18n.locale);
@@ -32686,7 +32696,7 @@ function PayoutDetailsDropinComponent({
32686
32696
  return false;
32687
32697
  }
32688
32698
  const bankDetails = data.payoutAccountDetails;
32689
- return !isEmpty(bankDetails) && Object.values(bankDetails).every(Boolean);
32699
+ return !isEmpty$1(bankDetails) && Object.values(bankDetails).every(Boolean);
32690
32700
  };
32691
32701
  const datasetUtils = datasetUtilities(i18n.locale);
32692
32702
  const formatDataForSummary2 = () => {
@@ -32829,7 +32839,7 @@ function ContractViewer({
32829
32839
  const pciValidationRules = {
32830
32840
  signer: {
32831
32841
  modes: ["blur"],
32832
- validate: (signer) => !isEmpty(signer),
32842
+ validate: (signer) => !isEmpty$1(signer),
32833
32843
  errorMessage: "fieldIsRequired"
32834
32844
  },
32835
32845
  acceptPci: {
@@ -33150,7 +33160,7 @@ const isOrganizationAndSettlor = (data) => {
33150
33160
  const roleAndTypeValidationRules = {
33151
33161
  entityType: {
33152
33162
  modes: ["blur"],
33153
- validate: (entityType) => !isEmpty(entityType),
33163
+ validate: (entityType) => !isEmpty$1(entityType),
33154
33164
  errorMessage: "fieldIsRequired"
33155
33165
  },
33156
33166
  role: {
@@ -33160,7 +33170,7 @@ const roleAndTypeValidationRules = {
33160
33170
  },
33161
33171
  descriptionUndefinedBeneficiary: {
33162
33172
  modes: ["blur"],
33163
- validate: (description) => !isEmpty(description),
33173
+ validate: (description) => !isEmpty$1(description),
33164
33174
  errorMessage: "fieldIsRequired"
33165
33175
  },
33166
33176
  settlorExemptionReason: {
@@ -34114,7 +34124,7 @@ const formatFileSummaryData = (solePropConstitutionalDocument) => {
34114
34124
  };
34115
34125
  const canSubmit = (data) => mandatoryApiFields.SOLE_PROPRIETORSHIP.every((detail) => {
34116
34126
  const value = getProp(data, detail);
34117
- return !isEmpty(value);
34127
+ return !isEmpty$1(value);
34118
34128
  });
34119
34129
  const hasRegisteredAddress = (dataFromResponse) => {
34120
34130
  var _a;
@@ -34670,7 +34680,7 @@ function TrustDropinComponent({
34670
34680
  };
34671
34681
  const canSubmit2 = (data2) => mandatoryApiFields.TRUST.every((detail) => {
34672
34682
  const value = getProp(data2, detail);
34673
- return !isEmpty(value);
34683
+ return !isEmpty$1(value);
34674
34684
  });
34675
34685
  const baseTrackingPayload = getBaseTrackingPayload({
34676
34686
  trackingConfig,
@@ -36687,57 +36697,57 @@ const validateLegalEntityIdentifier = (legalEntityIdentifier, doesYourCompanyHav
36687
36697
  const isRequired = doesYourCompanyHaveLEI === "Yes";
36688
36698
  const isValidLength = legalEntityIdentifier ? legalEntityIdentifier.length === 20 : false;
36689
36699
  const hasLettersAndNumbers = legalEntityIdentifier ? /[a-zA-Z]/.test(legalEntityIdentifier) && /[0-9]/.test(legalEntityIdentifier) : false;
36690
- return !isRequired || !isEmpty(legalEntityIdentifier) && isValidLength && hasLettersAndNumbers;
36700
+ return !isRequired || !isEmpty$1(legalEntityIdentifier) && isValidLength && hasLettersAndNumbers;
36691
36701
  };
36692
36702
  const highExposureCompanyDetailsValidations = {
36693
36703
  numberOfEmployees: {
36694
36704
  modes: ["blur"],
36695
- validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
36705
+ validate: (numberOfEmployees) => !isEmpty$1(numberOfEmployees),
36696
36706
  errorMessage: "fieldIsRequired"
36697
36707
  },
36698
36708
  legalInformationInsolvency: {
36699
36709
  modes: ["blur"],
36700
- validate: (legalInformationInsolvency) => !isEmpty(legalInformationInsolvency),
36710
+ validate: (legalInformationInsolvency) => !isEmpty$1(legalInformationInsolvency),
36701
36711
  errorMessage: "fieldIsRequired"
36702
36712
  },
36703
36713
  totalAssetsValue: {
36704
36714
  modes: ["blur"],
36705
- validate: (value) => !isEmpty(value),
36715
+ validate: (value) => !isEmpty$1(value),
36706
36716
  errorMessage: "fieldIsRequired"
36707
36717
  },
36708
36718
  totalAssetsCurrency: {
36709
36719
  modes: ["input"],
36710
- validate: (value) => !isEmpty(value),
36720
+ validate: (value) => !isEmpty$1(value),
36711
36721
  errorMessage: "fieldIsRequired"
36712
36722
  },
36713
36723
  annualTurnoverValue: {
36714
36724
  modes: ["blur"],
36715
- validate: (value) => !isEmpty(value),
36725
+ validate: (value) => !isEmpty$1(value),
36716
36726
  errorMessage: "fieldIsRequired"
36717
36727
  },
36718
36728
  annualTurnoverCurrency: {
36719
36729
  modes: ["blur"],
36720
- validate: (value) => !isEmpty(value),
36730
+ validate: (value) => !isEmpty$1(value),
36721
36731
  errorMessage: "fieldIsRequired"
36722
36732
  },
36723
36733
  financialReportingDate: {
36724
36734
  modes: ["blur"],
36725
- validate: (value) => !isEmpty(value),
36735
+ validate: (value) => !isEmpty$1(value),
36726
36736
  errorMessage: "fieldIsRequired"
36727
36737
  },
36728
36738
  legalForm: {
36729
36739
  modes: ["blur"],
36730
- validate: (legalForm) => !isEmpty(legalForm),
36740
+ validate: (legalForm) => !isEmpty$1(legalForm),
36731
36741
  errorMessage: "fieldIsRequired"
36732
36742
  },
36733
36743
  naceCode: {
36734
36744
  modes: ["blur"],
36735
- validate: (naceCode) => !isEmpty(naceCode),
36745
+ validate: (naceCode) => !isEmpty$1(naceCode),
36736
36746
  errorMessage: "fieldIsRequired"
36737
36747
  },
36738
36748
  doesYourCompanyHaveLEI: {
36739
36749
  modes: ["blur"],
36740
- validate: (doesYourCompanyHaveLEI) => !isEmpty(doesYourCompanyHaveLEI),
36750
+ validate: (doesYourCompanyHaveLEI) => !isEmpty$1(doesYourCompanyHaveLEI),
36741
36751
  errorMessage: "fieldIsRequired"
36742
36752
  },
36743
36753
  legalEntityIdentifier: {
@@ -36750,14 +36760,14 @@ const highExposureCompanyDetailsValidations = {
36750
36760
  },
36751
36761
  isCompanyOwnedByAnotherCompany: {
36752
36762
  modes: ["blur"],
36753
- validate: (isCompanyOwnedByAnotherCompany) => !isEmpty(isCompanyOwnedByAnotherCompany),
36763
+ validate: (isCompanyOwnedByAnotherCompany) => !isEmpty$1(isCompanyOwnedByAnotherCompany),
36754
36764
  errorMessage: "fieldIsRequired"
36755
36765
  },
36756
36766
  isParentOwnedByAnotherCompany: {
36757
36767
  modes: ["blur"],
36758
36768
  validate: (isParentOwnedByAnotherCompany, context) => {
36759
36769
  var _a, _b;
36760
- return ((_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.isCompanyOwnedByAnotherCompany) === "Yes" ? !isEmpty(isParentOwnedByAnotherCompany) : true;
36770
+ return ((_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.isCompanyOwnedByAnotherCompany) === "Yes" ? !isEmpty$1(isParentOwnedByAnotherCompany) : true;
36761
36771
  },
36762
36772
  errorMessage: "fieldIsRequired"
36763
36773
  }
@@ -36771,32 +36781,32 @@ const highExposureCompanyDetailsValidations = {
36771
36781
  const highExposureParentCompanyDetailsValidations = {
36772
36782
  addressCountry: {
36773
36783
  modes: ["blur"],
36774
- validate: (addressCountry) => !isEmpty(addressCountry),
36784
+ validate: (addressCountry) => !isEmpty$1(addressCountry),
36775
36785
  errorMessage: "fieldIsRequired"
36776
36786
  },
36777
36787
  legalName: {
36778
36788
  modes: ["blur"],
36779
- validate: (legalName) => !isEmpty(legalName),
36789
+ validate: (legalName) => !isEmpty$1(legalName),
36780
36790
  errorMessage: "fieldIsRequired"
36781
36791
  },
36782
36792
  numberOfEmployees: {
36783
36793
  modes: ["blur"],
36784
- validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
36794
+ validate: (numberOfEmployees) => !isEmpty$1(numberOfEmployees),
36785
36795
  errorMessage: "fieldIsRequired"
36786
36796
  },
36787
36797
  legalForm: {
36788
36798
  modes: ["blur"],
36789
- validate: (legalForm) => !isEmpty(legalForm),
36799
+ validate: (legalForm) => !isEmpty$1(legalForm),
36790
36800
  errorMessage: "fieldIsRequired"
36791
36801
  },
36792
36802
  naceCode: {
36793
36803
  modes: ["blur"],
36794
- validate: (naceCode) => !isEmpty(naceCode),
36804
+ validate: (naceCode) => !isEmpty$1(naceCode),
36795
36805
  errorMessage: "fieldIsRequired"
36796
36806
  },
36797
36807
  doesYourCompanyHaveLEI: {
36798
36808
  modes: ["blur"],
36799
- validate: (doesYourCompanyHaveLEI) => !isEmpty(doesYourCompanyHaveLEI),
36809
+ validate: (doesYourCompanyHaveLEI) => !isEmpty$1(doesYourCompanyHaveLEI),
36800
36810
  errorMessage: "fieldIsRequired"
36801
36811
  },
36802
36812
  legalEntityIdentifier: {
@@ -36809,37 +36819,37 @@ const highExposureParentCompanyDetailsValidations = {
36809
36819
  },
36810
36820
  isThisAddressTheMainHeadquarters: {
36811
36821
  modes: ["blur"],
36812
- validate: (isThisAddressTheMainHeadquarters) => !isEmpty(isThisAddressTheMainHeadquarters),
36822
+ validate: (isThisAddressTheMainHeadquarters) => !isEmpty$1(isThisAddressTheMainHeadquarters),
36813
36823
  errorMessage: "fieldIsRequired"
36814
36824
  },
36815
36825
  legalInformationInsolvency: {
36816
36826
  modes: ["blur"],
36817
- validate: (value) => !isEmpty(value),
36827
+ validate: (value) => !isEmpty$1(value),
36818
36828
  errorMessage: "fieldIsRequired"
36819
36829
  },
36820
36830
  totalAssetsValue: {
36821
36831
  modes: ["blur"],
36822
- validate: (value) => !isEmpty(value),
36832
+ validate: (value) => !isEmpty$1(value),
36823
36833
  errorMessage: "fieldIsRequired"
36824
36834
  },
36825
36835
  totalAssetsCurrency: {
36826
36836
  modes: ["input"],
36827
- validate: (value) => !isEmpty(value),
36837
+ validate: (value) => !isEmpty$1(value),
36828
36838
  errorMessage: "fieldIsRequired"
36829
36839
  },
36830
36840
  annualTurnoverValue: {
36831
36841
  modes: ["blur"],
36832
- validate: (value) => !isEmpty(value),
36842
+ validate: (value) => !isEmpty$1(value),
36833
36843
  errorMessage: "fieldIsRequired"
36834
36844
  },
36835
36845
  annualTurnoverCurrency: {
36836
36846
  modes: ["blur"],
36837
- validate: (value) => !isEmpty(value),
36847
+ validate: (value) => !isEmpty$1(value),
36838
36848
  errorMessage: "fieldIsRequired"
36839
36849
  },
36840
36850
  financialReportingDate: {
36841
36851
  modes: ["blur"],
36842
- validate: (value) => !isEmpty(value),
36852
+ validate: (value) => !isEmpty$1(value),
36843
36853
  errorMessage: "fieldIsRequired"
36844
36854
  }
36845
36855
  // TODO: revisit
@@ -36852,32 +36862,32 @@ const highExposureParentCompanyDetailsValidations = {
36852
36862
  const highExposureUltimateParentCompanyDetailsValidations = {
36853
36863
  addressCountry: {
36854
36864
  modes: ["blur"],
36855
- validate: (addressCountry) => !isEmpty(addressCountry),
36865
+ validate: (addressCountry) => !isEmpty$1(addressCountry),
36856
36866
  errorMessage: "fieldIsRequired"
36857
36867
  },
36858
36868
  legalName: {
36859
36869
  modes: ["blur"],
36860
- validate: (legalName) => !isEmpty(legalName),
36870
+ validate: (legalName) => !isEmpty$1(legalName),
36861
36871
  errorMessage: "fieldIsRequired"
36862
36872
  },
36863
36873
  numberOfEmployees: {
36864
36874
  modes: ["blur"],
36865
- validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
36875
+ validate: (numberOfEmployees) => !isEmpty$1(numberOfEmployees),
36866
36876
  errorMessage: "fieldIsRequired"
36867
36877
  },
36868
36878
  legalForm: {
36869
36879
  modes: ["blur"],
36870
- validate: (legalForm) => !isEmpty(legalForm),
36880
+ validate: (legalForm) => !isEmpty$1(legalForm),
36871
36881
  errorMessage: "fieldIsRequired"
36872
36882
  },
36873
36883
  naceCode: {
36874
36884
  modes: ["blur"],
36875
- validate: (naceCode) => !isEmpty(naceCode),
36885
+ validate: (naceCode) => !isEmpty$1(naceCode),
36876
36886
  errorMessage: "fieldIsRequired"
36877
36887
  },
36878
36888
  doesYourCompanyHaveLEI: {
36879
36889
  modes: ["blur"],
36880
- validate: (doesYourCompanyHaveLEI) => !isEmpty(doesYourCompanyHaveLEI),
36890
+ validate: (doesYourCompanyHaveLEI) => !isEmpty$1(doesYourCompanyHaveLEI),
36881
36891
  errorMessage: "fieldIsRequired"
36882
36892
  },
36883
36893
  legalEntityIdentifier: {
@@ -36890,37 +36900,37 @@ const highExposureUltimateParentCompanyDetailsValidations = {
36890
36900
  },
36891
36901
  isThisAddressTheMainHeadquarters: {
36892
36902
  modes: ["blur"],
36893
- validate: (isThisAddressTheMainHeadquarters) => !isEmpty(isThisAddressTheMainHeadquarters),
36903
+ validate: (isThisAddressTheMainHeadquarters) => !isEmpty$1(isThisAddressTheMainHeadquarters),
36894
36904
  errorMessage: "fieldIsRequired"
36895
36905
  },
36896
36906
  legalInformationInsolvency: {
36897
36907
  modes: ["blur"],
36898
- validate: (value) => !isEmpty(value),
36908
+ validate: (value) => !isEmpty$1(value),
36899
36909
  errorMessage: "fieldIsRequired"
36900
36910
  },
36901
36911
  totalAssetsValue: {
36902
36912
  modes: ["blur"],
36903
- validate: (value) => !isEmpty(value),
36913
+ validate: (value) => !isEmpty$1(value),
36904
36914
  errorMessage: "fieldIsRequired"
36905
36915
  },
36906
36916
  totalAssetsCurrency: {
36907
36917
  modes: ["input"],
36908
- validate: (value) => !isEmpty(value),
36918
+ validate: (value) => !isEmpty$1(value),
36909
36919
  errorMessage: "fieldIsRequired"
36910
36920
  },
36911
36921
  annualTurnoverValue: {
36912
36922
  modes: ["blur"],
36913
- validate: (value) => !isEmpty(value),
36923
+ validate: (value) => !isEmpty$1(value),
36914
36924
  errorMessage: "fieldIsRequired"
36915
36925
  },
36916
36926
  annualTurnoverCurrency: {
36917
36927
  modes: ["blur"],
36918
- validate: (value) => !isEmpty(value),
36928
+ validate: (value) => !isEmpty$1(value),
36919
36929
  errorMessage: "fieldIsRequired"
36920
36930
  },
36921
36931
  financialReportingDate: {
36922
36932
  modes: ["blur"],
36923
- validate: (value) => !isEmpty(value),
36933
+ validate: (value) => !isEmpty$1(value),
36924
36934
  errorMessage: "fieldIsRequired"
36925
36935
  }
36926
36936
  // TODO: revisit
@@ -38057,7 +38067,7 @@ function UpdateLegalEntityForHighExposure({
38057
38067
  };
38058
38068
  const canSubmit2 = (data2) => mandatoryApiFields.HIGH_EXPOSURE.every((detail) => {
38059
38069
  const value = getProp(data2, detail);
38060
- return !isEmpty(value);
38070
+ return !isEmpty$1(value);
38061
38071
  });
38062
38072
  const baseTrackingPayload = getBaseTrackingPayload({
38063
38073
  trackingConfig,
@@ -38713,7 +38723,7 @@ const ConfigurationApiProvider = ({
38713
38723
  isEmbeddedDropin,
38714
38724
  loadingContext
38715
38725
  } = authContext;
38716
- const sdkVersion = "2.58.0";
38726
+ const sdkVersion = "2.58.1";
38717
38727
  useAnalytics({
38718
38728
  onUserEvent,
38719
38729
  legalEntityId: rootLegalEntityId,
@@ -38925,7 +38935,7 @@ function SettingsProvider({
38925
38935
  }
38926
38936
  function removeObjectPropsWithEmptyValues(obj) {
38927
38937
  keysOf(obj).forEach((key) => {
38928
- if (obj[key] === null || isEmpty(obj[key])) delete obj[key];
38938
+ if (obj[key] === null || isEmpty$1(obj[key])) delete obj[key];
38929
38939
  });
38930
38940
  return obj;
38931
38941
  }
@@ -39396,7 +39406,7 @@ const DebugModal = ({
39396
39406
  };
39397
39407
  const copyToClipboard = async () => {
39398
39408
  const toCopy = {
39399
- sdkVersion: "2.58.0",
39409
+ sdkVersion: "2.58.1",
39400
39410
  experiments: Object.fromEntries(allExperimentsWithValues),
39401
39411
  settings: Object.fromEntries(allSettingsWithValues)
39402
39412
  };
@@ -39435,7 +39445,7 @@ const DebugModal = ({
39435
39445
  children: [jsxs("div", {
39436
39446
  className: "adyen-kyc-debug-modal__meta",
39437
39447
  children: [jsxs("span", {
39438
- children: ["SDK version: ", "2.58.0"]
39448
+ children: ["SDK version: ", "2.58.1"]
39439
39449
  }), jsxs("span", {
39440
39450
  children: ["rootLegalEntityId: ", rootLegalEntityId]
39441
39451
  })]
@@ -0,0 +1 @@
1
+ export declare const isEmpty: (obj: unknown | unknown[], ignoreEmptyProperties?: boolean) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.58.0",
3
+ "version": "2.58.1",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",