@adyen/kyc-components 3.26.2 → 3.26.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.
@@ -26865,7 +26865,7 @@ const mapBusinessDetailsSchemaToLegalEntity = (data) => {
26865
26865
  requestObj.type = LegalEntityType.ORGANIZATION;
26866
26866
  return requestObj;
26867
26867
  };
26868
- const MANDATORY_API_FIELDS = ["basicInformation.legalCompanyName", "basicInformation.country"];
26868
+ const MANDATORY_API_FIELDS = ["additionalInformation.legalCompanyName", "basicInformation.country"];
26869
26869
  const parseConfiguration$7 = ({
26870
26870
  country,
26871
26871
  matchingScenario
@@ -27193,6 +27193,7 @@ function BusinessDetailsDropinComponent({
27193
27193
  return ((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.country) ?? country;
27194
27194
  }, [(_a = currentState.data.basicInformation) == null ? void 0 : _a.country, country]);
27195
27195
  const [initialData, setInitialData] = useState(mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, Boolean(isTargetLegalEntityType), isNewEntryFlowEnabled ? accountHolder : void 0));
27196
+ const [trustedFields2, setTrustedFields] = useState(legalEntityResponse.trustedFields);
27196
27197
  const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
27197
27198
  useEffect(() => {
27198
27199
  var _a2;
@@ -27237,7 +27238,7 @@ function BusinessDetailsDropinComponent({
27237
27238
  isExperimentEnabled
27238
27239
  }), [currentCountry, currentState.data, isExperimentEnabled, taskType]);
27239
27240
  const initialForms = useMemo(() => getForms(currentCountry), [currentCountry]);
27240
- const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, initialForms, (currentProblems == null ? void 0 : currentProblems.remediationActions) ? Object.values(currentProblems == null ? void 0 : currentProblems.remediationActions) : [], (currentProblems == null ? void 0 : currentProblems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse, isExperimentEnabled) : [], customRules, {}, {}, legalEntityResponse.trustedFields), [customRules, fieldConfigurations, initialForms, isExperimentEnabled, legalEntityResponse, currentProblems == null ? void 0 : currentProblems.missingData, currentProblems == null ? void 0 : currentProblems.remediationActions]);
27241
+ const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, initialForms, (currentProblems == null ? void 0 : currentProblems.remediationActions) ? Object.values(currentProblems == null ? void 0 : currentProblems.remediationActions) : [], (currentProblems == null ? void 0 : currentProblems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse, isExperimentEnabled) : [], customRules, {}, {}, trustedFields2), [fieldConfigurations, initialForms, currentProblems == null ? void 0 : currentProblems.remediationActions, currentProblems == null ? void 0 : currentProblems.missingData, legalEntityResponse, isExperimentEnabled, customRules, trustedFields2]);
27241
27242
  const isSkippingCompanyStructure = useEnableNewEntryFlow() && organizationTypesToSkipCompanyStructureForm.includes((_d = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _d.type) && accountHolder !== "aTrust";
27242
27243
  const isSkippingCompanyRegistrationDocument = currentCountry === "CA" && ((_e = currentState.data.additionalInformation) == null ? void 0 : _e.registrationNumber) && ((_f = currentState.valid.additionalInformation) == null ? void 0 : _f.registrationNumber) && !((_g = currentState.data.companyRegistrationDocument) == null ? void 0 : _g.registrationDocument);
27243
27244
  const forms2 = useMemo(() => {
@@ -27434,6 +27435,12 @@ function BusinessDetailsDropinComponent({
27434
27435
  const proceedToManualDataEntry = useCallback(async () => {
27435
27436
  await clearTrustedBusinessData().then(() => setShowCompanyStructure(true));
27436
27437
  }, [clearTrustedBusinessData]);
27438
+ useEffect(() => {
27439
+ var _a2;
27440
+ if ((trustedFields2 == null ? void 0 : trustedFields2.length) && ((_a2 = legalEntityResponse.organization) == null ? void 0 : _a2.registeredAddress.country) !== currentCountry) {
27441
+ setTrustedFields(void 0);
27442
+ }
27443
+ }, [currentCountry]);
27437
27444
  return jsx(FormWrapper, {
27438
27445
  taskName: taskName ?? "businessDetails",
27439
27446
  gotoFormByFormIndex: goToForm,
@@ -40537,7 +40544,7 @@ const ConfigurationApiProvider = ({
40537
40544
  isEmbeddedDropin,
40538
40545
  loadingContext
40539
40546
  } = authContext;
40540
- const sdkVersion = "3.26.2";
40547
+ const sdkVersion = "3.26.3";
40541
40548
  useAnalytics({
40542
40549
  onUserEvent,
40543
40550
  legalEntityId: rootLegalEntityId,
@@ -41219,7 +41226,7 @@ const DebugModal = ({
41219
41226
  };
41220
41227
  const copyToClipboard = async () => {
41221
41228
  const toCopy = {
41222
- sdkVersion: "3.26.2",
41229
+ sdkVersion: "3.26.3",
41223
41230
  experiments: Object.fromEntries(allExperimentsWithValues),
41224
41231
  settings: Object.fromEntries(allSettingsWithValues)
41225
41232
  };
@@ -41249,7 +41256,7 @@ const DebugModal = ({
41249
41256
  children: [jsxs("div", {
41250
41257
  className: "adyen-kyc-debug-modal__meta",
41251
41258
  children: [jsxs("span", {
41252
- children: ["SDK version: ", "3.26.2"]
41259
+ children: ["SDK version: ", "3.26.3"]
41253
41260
  }), jsxs("span", {
41254
41261
  children: ["rootLegalEntityId: ", rootLegalEntityId]
41255
41262
  })]
package/dist/style.css CHANGED
@@ -2270,7 +2270,7 @@ button[disabled]:hover {
2270
2270
  border-radius: var(--adyen-sdk-border-radius-m, 8px);
2271
2271
  }
2272
2272
  .adyen-kyc-verified-business-card__data-title {
2273
- width: 180px;
2273
+ min-width: 180px;
2274
2274
  color: var(--adyen-sdk-color-label-secondary, #5c687c);
2275
2275
  }
2276
2276
  .adyen-kyc-verified-business-card ul {
@@ -2283,6 +2283,7 @@ button[disabled]:hover {
2283
2283
  }
2284
2284
  .adyen-kyc-verified-business-card ul li {
2285
2285
  display: flex;
2286
+ width: 100%;
2286
2287
  }
2287
2288
  .adyen-kyc-verified-business-card__address {
2288
2289
  display: flex;
@@ -2497,9 +2498,10 @@ button[disabled]:hover {
2497
2498
  }
2498
2499
  .adyen-kyc-business-information__business-data li {
2499
2500
  display: flex;
2501
+ width: 100%;
2500
2502
  }
2501
2503
  .adyen-kyc-business-information__business-data .adyen-kyc-business-data__key {
2502
- width: 180px;
2504
+ min-width: 180px;
2503
2505
  }.adyen-kyc-field--entityType {
2504
2506
  margin-bottom: var(--adyen-sdk-spacer-090, 24px);
2505
2507
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.26.2",
3
+ "version": "3.26.3",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",