@adyen/kyc-components 2.59.3 → 2.59.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.
|
@@ -26139,9 +26139,6 @@ const mapOrganizationTypeToCompanyType = (organizationType) => {
|
|
|
26139
26139
|
return CompanyTypesValue.INCORPORATED_PARTNERSHIP;
|
|
26140
26140
|
case "ASSOCIATION_INCORPORATED":
|
|
26141
26141
|
return CompanyTypesValue.INCORPORATED_ASSOCIATION;
|
|
26142
|
-
case "OTHER":
|
|
26143
|
-
case "PARTNERSHIP":
|
|
26144
|
-
return void 0;
|
|
26145
26142
|
default:
|
|
26146
26143
|
return CompanyTypesValue.PRIVATE_COMPANY;
|
|
26147
26144
|
}
|
|
@@ -28093,6 +28090,7 @@ function BusinessDetailsDropinComponent({
|
|
|
28093
28090
|
problems ?? ((_c = (_b = getCapabilityProblems(legalEntityResponse, currentCountry, isExperimentEnabled)) == null ? void 0 : _b.LegalEntity) == null ? void 0 : _c[legalEntityResponse.id])
|
|
28094
28091
|
);
|
|
28095
28092
|
const [showCompanyStructure, setShowCompanyStructure] = useState(currentCountry !== "US");
|
|
28093
|
+
const [showBusinessSelection, setShowBusinessSelection] = useState(false);
|
|
28096
28094
|
const baseTrackingPayload = useMemo(
|
|
28097
28095
|
() => getBaseTrackingPayload({
|
|
28098
28096
|
trackingConfig,
|
|
@@ -28311,20 +28309,6 @@ function BusinessDetailsDropinComponent({
|
|
|
28311
28309
|
handleVerifyBusinessData
|
|
28312
28310
|
]
|
|
28313
28311
|
);
|
|
28314
|
-
useEffect(() => {
|
|
28315
|
-
if (searchResults && !searchResults.length || searching === "error") {
|
|
28316
|
-
setShowCompanyStructure(true);
|
|
28317
|
-
setTrustedFields([]);
|
|
28318
|
-
}
|
|
28319
|
-
}, [searchResults, searching]);
|
|
28320
|
-
useEffect(() => {
|
|
28321
|
-
var _a2;
|
|
28322
|
-
if (((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.businessName) !== currentSearchName) {
|
|
28323
|
-
setShowCompanyStructure(false);
|
|
28324
|
-
resetBusinessData();
|
|
28325
|
-
}
|
|
28326
|
-
}, [currentSearchName, (_e = currentState.data.basicInformation) == null ? void 0 : _e.businessName]);
|
|
28327
|
-
const [showBusinessSelection, setShowBusinessSelection] = useState(false);
|
|
28328
28312
|
const isBusinessSelection = useMemo(
|
|
28329
28313
|
() => showBusinessSelection && activeForm.formId === "basicInformation",
|
|
28330
28314
|
[activeForm.formId, showBusinessSelection]
|
|
@@ -28360,37 +28344,30 @@ function BusinessDetailsDropinComponent({
|
|
|
28360
28344
|
]);
|
|
28361
28345
|
const goToForm = useCallback(
|
|
28362
28346
|
(index) => {
|
|
28363
|
-
const form = forms[index].formId;
|
|
28364
28347
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry))
|
|
28365
28348
|
return gotoFormByFormIndex(index);
|
|
28349
|
+
const form = forms[index].formId;
|
|
28366
28350
|
switch (form) {
|
|
28367
28351
|
case "basicInformation": {
|
|
28368
|
-
if (
|
|
28369
|
-
|
|
28370
|
-
|
|
28371
|
-
setShowCompanyStructure(false);
|
|
28372
|
-
}
|
|
28373
|
-
}
|
|
28374
|
-
if (verifiedBusiness) {
|
|
28375
|
-
setShowBusinessSelection(false);
|
|
28376
|
-
}
|
|
28377
|
-
return gotoFormByFormIndex(index);
|
|
28378
|
-
}
|
|
28379
|
-
case "additionalInformation": {
|
|
28380
|
-
if (verifiedBusiness || activeForm.formId !== "basicInformation")
|
|
28381
|
-
return gotoFormByFormIndex(index);
|
|
28382
|
-
if (!isBusinessSelection) {
|
|
28383
|
-
setShowBusinessSelection(true);
|
|
28384
|
-
return findBusiness(currentState.data.basicInformation);
|
|
28352
|
+
if (verifiedBusiness) setShowBusinessSelection(false);
|
|
28353
|
+
if (activeForm.formId === "companyStructure" && searchResults && searchResults.length) {
|
|
28354
|
+
setShowCompanyStructure(false);
|
|
28385
28355
|
}
|
|
28386
28356
|
return gotoFormByFormIndex(index);
|
|
28387
28357
|
}
|
|
28388
28358
|
default:
|
|
28359
|
+
if (activeForm.formId === "basicInformation") {
|
|
28360
|
+
if (verifiedBusiness) return gotoFormByFormIndex(index);
|
|
28361
|
+
if (!isBusinessSelection) {
|
|
28362
|
+
findBusiness(currentState.data.basicInformation);
|
|
28363
|
+
setShowBusinessSelection(true);
|
|
28364
|
+
}
|
|
28365
|
+
break;
|
|
28366
|
+
}
|
|
28389
28367
|
return gotoFormByFormIndex(index);
|
|
28390
28368
|
}
|
|
28391
28369
|
},
|
|
28392
28370
|
[
|
|
28393
|
-
canSubmitForm,
|
|
28394
28371
|
currentCountry,
|
|
28395
28372
|
currentState.data.basicInformation,
|
|
28396
28373
|
findBusiness,
|
|
@@ -28407,12 +28384,10 @@ function BusinessDetailsDropinComponent({
|
|
|
28407
28384
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) return handleNextClick();
|
|
28408
28385
|
switch (activeForm.formId) {
|
|
28409
28386
|
case "basicInformation":
|
|
28410
|
-
if (
|
|
28411
|
-
|
|
28412
|
-
}
|
|
28413
|
-
if (!isBusinessSelection) {
|
|
28387
|
+
if (((_a2 = currentState.validityByForm) == null ? void 0 : _a2.basicInformation) && !isBusinessSelection && !verifiedBusiness) {
|
|
28388
|
+
findBusiness(currentState.data.basicInformation);
|
|
28414
28389
|
setShowBusinessSelection(true);
|
|
28415
|
-
|
|
28390
|
+
break;
|
|
28416
28391
|
}
|
|
28417
28392
|
return handleNextClick();
|
|
28418
28393
|
default:
|
|
@@ -28423,7 +28398,7 @@ function BusinessDetailsDropinComponent({
|
|
|
28423
28398
|
handleNextClick,
|
|
28424
28399
|
activeForm.formId,
|
|
28425
28400
|
verifiedBusiness,
|
|
28426
|
-
(
|
|
28401
|
+
(_e = currentState.validityByForm) == null ? void 0 : _e.basicInformation,
|
|
28427
28402
|
currentState.data.basicInformation,
|
|
28428
28403
|
isBusinessSelection,
|
|
28429
28404
|
findBusiness
|
|
@@ -28466,6 +28441,19 @@ function BusinessDetailsDropinComponent({
|
|
|
28466
28441
|
const proceedToManualDataEntry = useCallback(async () => {
|
|
28467
28442
|
await clearTrustedBusinessData().then(() => setShowCompanyStructure(true));
|
|
28468
28443
|
}, [clearTrustedBusinessData]);
|
|
28444
|
+
useEffect(() => {
|
|
28445
|
+
if (searchResults && !searchResults.length || searching === "error") {
|
|
28446
|
+
setShowCompanyStructure(true);
|
|
28447
|
+
setTrustedFields([]);
|
|
28448
|
+
}
|
|
28449
|
+
}, [searchResults, searching]);
|
|
28450
|
+
useEffect(() => {
|
|
28451
|
+
var _a2;
|
|
28452
|
+
if (((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.businessName) !== currentSearchName) {
|
|
28453
|
+
setShowCompanyStructure(false);
|
|
28454
|
+
resetBusinessData();
|
|
28455
|
+
}
|
|
28456
|
+
}, [currentSearchName, (_f = currentState.data.basicInformation) == null ? void 0 : _f.businessName]);
|
|
28469
28457
|
useEffect(() => {
|
|
28470
28458
|
var _a2;
|
|
28471
28459
|
if ((trustedFields == null ? void 0 : trustedFields.length) && ((_a2 = legalEntityResponse.organization) == null ? void 0 : _a2.registeredAddress.country) !== currentCountry) {
|
|
@@ -39431,7 +39419,7 @@ const ConfigurationApiProvider = ({
|
|
|
39431
39419
|
}) => {
|
|
39432
39420
|
const authContext = useAuthContext();
|
|
39433
39421
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
39434
|
-
const sdkVersion = "2.59.
|
|
39422
|
+
const sdkVersion = "2.59.4";
|
|
39435
39423
|
useAnalytics({
|
|
39436
39424
|
onUserEvent,
|
|
39437
39425
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40104,7 +40092,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40104
40092
|
};
|
|
40105
40093
|
const copyToClipboard = async () => {
|
|
40106
40094
|
const toCopy = {
|
|
40107
|
-
sdkVersion: "2.59.
|
|
40095
|
+
sdkVersion: "2.59.4",
|
|
40108
40096
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40109
40097
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40110
40098
|
};
|
|
@@ -40169,7 +40157,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40169
40157
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
40170
40158
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40171
40159
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
40172
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.59.
|
|
40160
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.59.4" })
|
|
40173
40161
|
] }) }),
|
|
40174
40162
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40175
40163
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|
|
@@ -4,6 +4,6 @@ import type { OrganizationType } from '../../../core/models/api/organization-typ
|
|
|
4
4
|
* This is a mapping from our Adyen internal organization type values in KYC to our SDK and LEM company type values
|
|
5
5
|
*
|
|
6
6
|
* @param organizationType - Organization type value from KYC
|
|
7
|
-
* @returns CompanyTypesValue
|
|
7
|
+
* @returns CompanyTypesValue
|
|
8
8
|
*/
|
|
9
|
-
export declare const mapOrganizationTypeToCompanyType: (organizationType: OrganizationType | undefined | null) => CompanyTypesValue
|
|
9
|
+
export declare const mapOrganizationTypeToCompanyType: (organizationType: OrganizationType | undefined | null) => CompanyTypesValue;
|