@adyen/kyc-components 3.58.2 → 3.59.0
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.
- package/dist/es/{B4MFY5CR-CBLtiOPl.js → B4MFY5CR-DT1IN3Fl.js} +1 -1
- package/dist/es/DebugModal-C7PUDNlI.js +523 -0
- package/dist/es/{HO4MOOFI-CeXIExuC.js → HO4MOOFI-BYUilyom.js} +2 -2
- package/dist/es/{HUY7CZI3-luXydDA7.js → HUY7CZI3-BCSiY9T5.js} +2 -2
- package/dist/es/{Introduction-BVIDiOeK.js → Introduction-DIW5vd8c.js} +1 -1
- package/dist/es/adyen-kyc-components.es.js +2 -2
- package/dist/es/{css-BUQ-lDKy.js → css-B3bcTE7b.js} +1 -1
- package/dist/es/{index-Bx0rbc0C.js → index-CP8YzGVf.js} +958 -1178
- package/dist/es/{json-DpHF7B2M.js → json-BgrcnsOO.js} +1 -1
- package/dist/es/{plaintext-DgDFLkbp.js → plaintext-Kl2vsbEO.js} +1 -1
- package/dist/es/{yaml-B66s-9sv.js → yaml-C0rXP05J.js} +1 -1
- package/dist/style.css +60 -57
- package/dist/types/components/EFP/tasks/HighExposureDropin/HighExposureRegisteredAddress.d.ts +1 -1
- package/dist/types/components/EFP/tasks/HighExposureDropin/types.d.ts +0 -1
- package/dist/types/components/EmbeddedDropins/UpdateLegalEntityForHighExposure/utils.d.ts +1 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +3 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/validate.d.ts +3 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +5 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/ManualIdUpload/ManualIdUpload.d.ts +1 -0
- package/dist/types/components/Shared/devex/DebugListener/DebugListener.d.ts +1 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +2 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +4 -0
- package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +6 -0
- package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/constants.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/core/models/identityOnfido.d.ts +33 -0
- package/dist/types/core/process-field-configurations.d.ts +1 -0
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/components/Shared/devex/DebugWrapper/DebugWrapper.d.ts +0 -5
- /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugExperimentsAndSettings.d.ts +0 -0
- /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugLegalEntityData.d.ts +0 -0
- /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugMetadata.d.ts +0 -0
- /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugModal.d.ts +0 -0
- /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugTaskStatuses.d.ts +0 -0
- /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/debugInfo.d.ts +0 -0
|
@@ -432,7 +432,7 @@ const defaultLocaleTranslations = {
|
|
|
432
432
|
editEntityOwner: "Edit owner details",
|
|
433
433
|
editOwnerOfTrustMember: "Edit owner of %{trustMember}",
|
|
434
434
|
editTrustMember: "Edit details of %{trustMember} ",
|
|
435
|
-
ein: "EIN",
|
|
435
|
+
ein: "Employee Identification Number (EIN)",
|
|
436
436
|
einVerificationLetter: "Employer identification number (EIN) verification letter, also known as a CP 575 or 147c letter",
|
|
437
437
|
eInvoicingCode: "E-invoicing (SDI) code",
|
|
438
438
|
email: "Email address",
|
|
@@ -632,6 +632,7 @@ const defaultLocaleTranslations = {
|
|
|
632
632
|
errorMessage_1_5055: "VAT document is missing",
|
|
633
633
|
errorMessage_1_5057: "The VAT document wasn't a supported document type",
|
|
634
634
|
errorMessage_1_5067: "The legal name didn't match the one on the VAT registry.",
|
|
635
|
+
errorMessage_1_5072: "The registered city didn't match the one on the registry.",
|
|
635
636
|
errorMessage_1_6000: "The legal name couldn't be verified.",
|
|
636
637
|
errorMessage_1_6001: "The legal name didn't match the registration number.",
|
|
637
638
|
errorMessage_1_6002: "The registration number couldn't be verified.",
|
|
@@ -722,17 +723,25 @@ const defaultLocaleTranslations = {
|
|
|
722
723
|
errorMessage_2_1111: "Some proof of source of funds didn't seem to be owned by your business.",
|
|
723
724
|
errorMessage_2_1112: "Some proof of source of funds are too old.",
|
|
724
725
|
errorMessage_2_1113: "Some proof of source of funds didn't show a legal business name.",
|
|
726
|
+
errorMessage_2_8043: "'organization.registrationNumber' was missing.",
|
|
727
|
+
errorMessage_2_8045: "'organization.taxId' was missing.",
|
|
725
728
|
errorMessage_2_8064: "UBO through ownership was missing.",
|
|
726
729
|
errorMessage_2_8067: "Signatory was missing.",
|
|
730
|
+
errorMessage_2_8069: "'organization.type' was missing.",
|
|
731
|
+
errorMessage_2_8086: "'organization.doingBusinessAs' was missing.",
|
|
727
732
|
errorMessage_2_8141: "Registration document was missing.",
|
|
728
733
|
errorMessage_2_8150: "'phone.number' was missing",
|
|
729
734
|
errorMessage_2_8162: "proofOfOrganizationTaxInfo was missing.",
|
|
735
|
+
errorMessage_2_8174: "'taxInformation' was missing.",
|
|
730
736
|
errorMessage_2_8183: "'webAddress' was missing.",
|
|
731
737
|
errorMessage_2_8189: "UBO through control was missing.",
|
|
732
738
|
errorMessage_2_8193: "Director was missing.",
|
|
733
739
|
errorMessage_2_8196: "proofOfOwnership document to perform verification was missing.",
|
|
740
|
+
errorMessage_2_8202: "'organization.registeredAddress.postalCode' was missing.",
|
|
734
741
|
errorMessage_2_8203: "organization.economicSector was missing",
|
|
735
742
|
errorMessage_2_8204: "organization.globalLegalEntityIdentifier was missing",
|
|
743
|
+
errorMessage_2_8215: "'organization.registeredAddress.street' was missing.",
|
|
744
|
+
errorMessage_2_8217: "'organization.registeredAddress.city' was missing.",
|
|
736
745
|
errorMessage_2_8224: "Proof of funding or wealth source was missing.",
|
|
737
746
|
errorMessage_2_8225: "Institutional sector was missing.",
|
|
738
747
|
errorMessage_2_8226: "Legal form was missing.",
|
|
@@ -741,6 +750,7 @@ const defaultLocaleTranslations = {
|
|
|
741
750
|
errorMessage_2_8229: "Head office indicator was missing.",
|
|
742
751
|
errorMessage_2_8234: "'organization.countryOfGoverningLaw' was missing.",
|
|
743
752
|
errorMessage_2_8236: "Proof of director was missing.",
|
|
753
|
+
errorMessage_2_8238: "Financial report was missing.",
|
|
744
754
|
errorMessage_2_8247: "'organization.support.email' was missing",
|
|
745
755
|
errorMessage_2_8248: "'individual.support.email' was missing",
|
|
746
756
|
errorMessage_2_8249: "'organization.support.phone.number' was missing",
|
|
@@ -823,7 +833,7 @@ const defaultLocaleTranslations = {
|
|
|
823
833
|
governmentIssuedCorrespondence: "Government-issued correspondence",
|
|
824
834
|
grantOfProbate: "Grant of probate",
|
|
825
835
|
grTaxId: "Αριθμός Φορολογικού Μητρώου Arithmós Forologikou Mētrṓou (ΑΦΜ)",
|
|
826
|
-
gst: "Goods and Services Tax (GST)",
|
|
836
|
+
gst: "Goods and Services Tax (GST) number",
|
|
827
837
|
guardian: "guardian",
|
|
828
838
|
guardianshipCertificate: "Guardianship certificate",
|
|
829
839
|
handelsregisternummer: "Handelsregisternummer",
|
|
@@ -1382,18 +1392,27 @@ const defaultLocaleTranslations = {
|
|
|
1382
1392
|
remediationMessage_1_803: "Upload a proof of director document to legal entity",
|
|
1383
1393
|
remediationMessage_1_804: "Upload a different proof of director document",
|
|
1384
1394
|
remediationMessage_1_805: "Update director details",
|
|
1395
|
+
remediationMessage_2_117: "Add 'organization.registrationNumber' to legal entity.",
|
|
1396
|
+
remediationMessage_2_118: "Add 'organization.taxId' to legal entity.",
|
|
1385
1397
|
remediationMessage_2_123: "You haven't added an owner",
|
|
1386
1398
|
remediationMessage_2_124: "You haven't added a signatory",
|
|
1399
|
+
remediationMessage_2_125: "Add 'organization.type' to legal entity.",
|
|
1400
|
+
remediationMessage_2_133: "Add 'organization.doingBusinessAs' to legal entity.",
|
|
1387
1401
|
remediationMessage_2_151: "You haven't added a controlling person",
|
|
1388
1402
|
remediationMessage_2_153: "Add 'phone.number' to legal entity",
|
|
1389
1403
|
remediationMessage_2_158: "Provide a VAT number or exemption reason.",
|
|
1404
|
+
remediationMessage_2_170: "Add tax information to legal entity.",
|
|
1390
1405
|
remediationMessage_2_178: "Add 'webAddress' to business line.",
|
|
1391
1406
|
remediationMessage_2_184: "Add constitutional document for verification to legal entity.",
|
|
1392
1407
|
remediationMessage_2_185: "You haven't added your directors",
|
|
1393
1408
|
remediationMessage_2_188: "Add proofOfOwnership document document for verification to legal entity",
|
|
1409
|
+
remediationMessage_2_194: "Add 'organization.registeredAddress.postalCode' to legal entity.",
|
|
1410
|
+
remediationMessage_2_206: "Add 'organization.registeredAddress.street' to legal entity.",
|
|
1411
|
+
remediationMessage_2_208: "Add 'organization.registeredAddress.city' to legal entity.",
|
|
1394
1412
|
remediationMessage_2_214: "Upload a proof of funding or wealth source....",
|
|
1395
1413
|
remediationMessage_2_222: "Upload a proof of relationship to individual",
|
|
1396
1414
|
remediationMessage_2_223: "Add 'organization.countryOfGoverningLaw' to legal entity",
|
|
1415
|
+
remediationMessage_2_225: "Add financial report to legal entity.",
|
|
1397
1416
|
remediationMessage_2_234: "Add 'organization.support.email' to legal entity",
|
|
1398
1417
|
remediationMessage_2_235: "Add 'individual.support.email' to legal entity",
|
|
1399
1418
|
remediationMessage_2_236: "Add 'organization.support.phone.number' to legal entity",
|
|
@@ -1754,7 +1773,7 @@ const defaultLocaleTranslations = {
|
|
|
1754
1773
|
whichOfTheseApplyToTheSettlor: "Which of these apply to the settlor? Select all that apply.",
|
|
1755
1774
|
whichTypeOfIdNumberDoYouHave: "Which type of identification number do you have?",
|
|
1756
1775
|
whichTypeOfRegistrationNumberDoYouHave: "Which type of registration number do you have?",
|
|
1757
|
-
whichTypeOfTaxIdNumberDoYouHave: "
|
|
1776
|
+
whichTypeOfTaxIdNumberDoYouHave: "What type of tax ID do you use for your business?",
|
|
1758
1777
|
whyDoINeedToFillInThisInformation: "Why do I need to fill in this information?",
|
|
1759
1778
|
winLossStatement: "Win/loss statement",
|
|
1760
1779
|
winningProceedAmount: "Winning proceed amount",
|
|
@@ -1837,7 +1856,7 @@ const createLogger = (namespace) => {
|
|
|
1837
1856
|
};
|
|
1838
1857
|
let sdkToken;
|
|
1839
1858
|
let fetchSdkToken;
|
|
1840
|
-
const logger$
|
|
1859
|
+
const logger$T = createLogger("Session");
|
|
1841
1860
|
const setSdkToken = (token) => {
|
|
1842
1861
|
sdkToken = token;
|
|
1843
1862
|
};
|
|
@@ -1862,7 +1881,7 @@ const refreshSession = async () => {
|
|
|
1862
1881
|
setSdkToken(token);
|
|
1863
1882
|
isSessionRefreshed = true;
|
|
1864
1883
|
} catch (e) {
|
|
1865
|
-
logger$
|
|
1884
|
+
logger$T.error("Failed to fetch sdk token", e);
|
|
1866
1885
|
}
|
|
1867
1886
|
return isSessionRefreshed;
|
|
1868
1887
|
};
|
|
@@ -2101,7 +2120,7 @@ function useToastContext() {
|
|
|
2101
2120
|
}
|
|
2102
2121
|
return context;
|
|
2103
2122
|
}
|
|
2104
|
-
const logger$
|
|
2123
|
+
const logger$S = createLogger("useBankConfigurationHandler");
|
|
2105
2124
|
const useBankConfigurationHandlers = ({
|
|
2106
2125
|
handleGetBankVerificationVendors,
|
|
2107
2126
|
bankAccountCountry,
|
|
@@ -2119,7 +2138,7 @@ const useBankConfigurationHandlers = ({
|
|
|
2119
2138
|
const bankVerificationVendorsResponse = handleGetBankVerificationVendors ? await handleGetBankVerificationVendors(bankAccountCountry) : [];
|
|
2120
2139
|
setProvider(bankVerificationVendorsResponse == null ? void 0 : bankVerificationVendorsResponse[0]);
|
|
2121
2140
|
})().catch(() => {
|
|
2122
|
-
logger$
|
|
2141
|
+
logger$S.error();
|
|
2123
2142
|
setProvider(void 0);
|
|
2124
2143
|
}).finally(() => {
|
|
2125
2144
|
setLoadingStatus("success");
|
|
@@ -2346,12 +2365,12 @@ const unscalableIconNames = [
|
|
|
2346
2365
|
"upload",
|
|
2347
2366
|
"warning"
|
|
2348
2367
|
];
|
|
2349
|
-
const logger$
|
|
2368
|
+
const logger$R = createLogger("Icon");
|
|
2350
2369
|
const Svg = ({ className: className2, name, testId, title, type }) => {
|
|
2351
2370
|
const LazyLoadedSvg = svgs[name];
|
|
2352
2371
|
const viewBox = unscalableIconNames.includes(name) ? "0 0 16 16" : void 0;
|
|
2353
2372
|
if (!LazyLoadedSvg) {
|
|
2354
|
-
logger$
|
|
2373
|
+
logger$R.error(`No such svg: "${name}"`);
|
|
2355
2374
|
return null;
|
|
2356
2375
|
}
|
|
2357
2376
|
return /* @__PURE__ */ jsx("span", { className: cx(`adyen-kyc-${type}`, className2), "data-testid": testId, children: /* @__PURE__ */ jsx(Suspense, { fallback: null, children: viewBox ? /* @__PURE__ */ jsx(LazyLoadedSvg, { "aria-hidden": type === "icon", viewBox, title: title || name }) : /* @__PURE__ */ jsx(LazyLoadedSvg, { "aria-hidden": type === "icon", title: title || name }) }) });
|
|
@@ -2365,7 +2384,7 @@ const loaderSmall = "adyen-kyc-loader-small";
|
|
|
2365
2384
|
const loaderMedium = "adyen-kyc-loader-medium";
|
|
2366
2385
|
const loaderXsmall = "adyen-kyc-loader-xsmall";
|
|
2367
2386
|
const loaderDot = "adyen-kyc-loader-dot";
|
|
2368
|
-
const styles$
|
|
2387
|
+
const styles$w = {
|
|
2369
2388
|
loaderWrapper,
|
|
2370
2389
|
loaderWrapperInline,
|
|
2371
2390
|
loader,
|
|
@@ -2376,16 +2395,16 @@ const styles$y = {
|
|
|
2376
2395
|
loaderDot
|
|
2377
2396
|
};
|
|
2378
2397
|
const sizeMap = {
|
|
2379
|
-
xsmall: styles$
|
|
2380
|
-
small: styles$
|
|
2381
|
-
medium: styles$
|
|
2382
|
-
large: styles$
|
|
2398
|
+
xsmall: styles$w.loaderXsmall,
|
|
2399
|
+
small: styles$w.loaderSmall,
|
|
2400
|
+
medium: styles$w.loaderMedium,
|
|
2401
|
+
large: styles$w.loaderLarge
|
|
2383
2402
|
};
|
|
2384
|
-
const Loader = ({ inline = false, size = "large", dot = false }) => /* @__PURE__ */ jsx("div", { className: cx(styles$
|
|
2403
|
+
const Loader = ({ inline = false, size = "large", dot = false }) => /* @__PURE__ */ jsx("div", { className: cx(styles$w.loaderWrapper, { [styles$w.loaderWrapperInline]: inline }), children: /* @__PURE__ */ jsx(
|
|
2385
2404
|
"div",
|
|
2386
2405
|
{
|
|
2387
2406
|
role: "progressbar",
|
|
2388
|
-
className: cx(styles$
|
|
2407
|
+
className: cx(styles$w.loader, sizeMap[size], { [styles$w.loaderDot]: dot })
|
|
2389
2408
|
}
|
|
2390
2409
|
) });
|
|
2391
2410
|
const button = "adyen-kyc-button";
|
|
@@ -2401,7 +2420,7 @@ const buttonVariantCritical = "adyen-kyc-button-variant-critical";
|
|
|
2401
2420
|
const buttonVariantLink = "adyen-kyc-button-variant-link";
|
|
2402
2421
|
const buttonVariantSurface = "adyen-kyc-button-variant-surface";
|
|
2403
2422
|
const buttonSpinner = "adyen-kyc-button-spinner";
|
|
2404
|
-
const styles$
|
|
2423
|
+
const styles$v = {
|
|
2405
2424
|
button,
|
|
2406
2425
|
buttonFullWidth,
|
|
2407
2426
|
buttonLabel,
|
|
@@ -2430,17 +2449,17 @@ const ButtonBase = ({
|
|
|
2430
2449
|
}) => {
|
|
2431
2450
|
const isDisabled = disabled || loading;
|
|
2432
2451
|
const buttonVariantStyle = {
|
|
2433
|
-
primary: styles$
|
|
2434
|
-
secondary: styles$
|
|
2435
|
-
tertiary: styles$
|
|
2436
|
-
critical: styles$
|
|
2437
|
-
link: styles$
|
|
2438
|
-
surface: styles$
|
|
2439
|
-
};
|
|
2440
|
-
const rootClassName = cx(styles$
|
|
2441
|
-
[styles$
|
|
2442
|
-
[styles$
|
|
2443
|
-
[styles$
|
|
2452
|
+
primary: styles$v.buttonVariantPrimary,
|
|
2453
|
+
secondary: styles$v.buttonVariantSecondary,
|
|
2454
|
+
tertiary: styles$v.buttonVariantTertiary,
|
|
2455
|
+
critical: styles$v.buttonVariantCritical,
|
|
2456
|
+
link: styles$v.buttonVariantLink,
|
|
2457
|
+
surface: styles$v.buttonVariantSurface
|
|
2458
|
+
};
|
|
2459
|
+
const rootClassName = cx(styles$v.button, buttonVariantStyle[variant], {
|
|
2460
|
+
[styles$v.buttonShapeRectangle]: circle === false,
|
|
2461
|
+
[styles$v.buttonShapeCircle]: circle === true,
|
|
2462
|
+
[styles$v.buttonFullWidth]: fullWidth
|
|
2444
2463
|
});
|
|
2445
2464
|
const handleOnClick = (event) => {
|
|
2446
2465
|
event.preventDefault();
|
|
@@ -2458,7 +2477,7 @@ const ButtonBase = ({
|
|
|
2458
2477
|
onClick: handleOnClick,
|
|
2459
2478
|
type,
|
|
2460
2479
|
children: [
|
|
2461
|
-
loading && /* @__PURE__ */ jsx("div", { className: styles$
|
|
2480
|
+
loading && /* @__PURE__ */ jsx("div", { className: styles$v.buttonSpinner, children: /* @__PURE__ */ jsx(Loader, { size: "small" }) }),
|
|
2462
2481
|
children2
|
|
2463
2482
|
]
|
|
2464
2483
|
}
|
|
@@ -2485,8 +2504,8 @@ const Button = ({
|
|
|
2485
2504
|
type,
|
|
2486
2505
|
variant
|
|
2487
2506
|
};
|
|
2488
|
-
const labelClassname = cx(styles$
|
|
2489
|
-
[styles$
|
|
2507
|
+
const labelClassname = cx(styles$v.buttonLabel, {
|
|
2508
|
+
[styles$v.buttonLabelPadding]: variant !== "link"
|
|
2490
2509
|
});
|
|
2491
2510
|
return /* @__PURE__ */ jsx(ButtonBase, { ...buttonProps, children: /* @__PURE__ */ jsxs("div", { className: labelClassname, children: [
|
|
2492
2511
|
icon && /* @__PURE__ */ jsx(Icon, { name: icon }),
|
|
@@ -2512,13 +2531,13 @@ const IconButton = ({
|
|
|
2512
2531
|
testId,
|
|
2513
2532
|
variant
|
|
2514
2533
|
};
|
|
2515
|
-
return /* @__PURE__ */ jsx(ButtonBase, { ...buttonProps, children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
2534
|
+
return /* @__PURE__ */ jsx(ButtonBase, { ...buttonProps, children: /* @__PURE__ */ jsx("div", { className: styles$v.buttonLabel, children: /* @__PURE__ */ jsx(Icon, { name: icon }) }) });
|
|
2516
2535
|
};
|
|
2517
2536
|
const divider = "adyen-kyc-divider";
|
|
2518
|
-
const styles$
|
|
2537
|
+
const styles$u = {
|
|
2519
2538
|
divider
|
|
2520
2539
|
};
|
|
2521
|
-
const Divider = () => /* @__PURE__ */ jsx("hr", { className: styles$
|
|
2540
|
+
const Divider = () => /* @__PURE__ */ jsx("hr", { className: styles$u.divider });
|
|
2522
2541
|
function FormHeader({
|
|
2523
2542
|
heading,
|
|
2524
2543
|
description,
|
|
@@ -2568,7 +2587,7 @@ const Typography = ({
|
|
|
2568
2587
|
const skeleton = "adyen-kyc-skeleton";
|
|
2569
2588
|
const skeletonCircle = "adyen-kyc-skeleton-circle";
|
|
2570
2589
|
const skeletonText = "adyen-kyc-skeleton-text";
|
|
2571
|
-
const styles$
|
|
2590
|
+
const styles$t = {
|
|
2572
2591
|
skeleton,
|
|
2573
2592
|
skeletonCircle,
|
|
2574
2593
|
skeletonText
|
|
@@ -2579,9 +2598,9 @@ const Skeleton = ({
|
|
|
2579
2598
|
height = "1em",
|
|
2580
2599
|
width
|
|
2581
2600
|
}) => {
|
|
2582
|
-
const classNames = cx(styles$
|
|
2583
|
-
[styles$
|
|
2584
|
-
[styles$
|
|
2601
|
+
const classNames = cx(styles$t.skeleton, {
|
|
2602
|
+
[styles$t.skeletonCircle]: circle,
|
|
2603
|
+
[styles$t.skeletonText]: text
|
|
2585
2604
|
});
|
|
2586
2605
|
return /* @__PURE__ */ jsx("div", { className: classNames, style: { height, width } });
|
|
2587
2606
|
};
|
|
@@ -2597,7 +2616,7 @@ const accordionContent = "adyen-kyc-accordion-content";
|
|
|
2597
2616
|
const accordionWithIcon = "adyen-kyc-accordion-with-icon";
|
|
2598
2617
|
const accordionArrow = "adyen-kyc-accordion-arrow";
|
|
2599
2618
|
const accordionArrowRight = "adyen-kyc-accordion-arrow-right";
|
|
2600
|
-
const styles$
|
|
2619
|
+
const styles$s = {
|
|
2601
2620
|
accordion,
|
|
2602
2621
|
accordionSummary,
|
|
2603
2622
|
accordionBasic,
|
|
@@ -2625,34 +2644,34 @@ const Accordion = ({
|
|
|
2625
2644
|
onToggle(e.newState === "closed" ? "close" : "open");
|
|
2626
2645
|
};
|
|
2627
2646
|
const variantMap2 = {
|
|
2628
|
-
basic: styles$
|
|
2629
|
-
info: styles$
|
|
2630
|
-
error: styles$
|
|
2631
|
-
warning: styles$
|
|
2632
|
-
success: styles$
|
|
2647
|
+
basic: styles$s.accordionBasic,
|
|
2648
|
+
info: styles$s.accordionInfo,
|
|
2649
|
+
error: styles$s.accordionError,
|
|
2650
|
+
warning: styles$s.accordionWarning,
|
|
2651
|
+
success: styles$s.accordionSuccess
|
|
2633
2652
|
};
|
|
2634
2653
|
return /* @__PURE__ */ jsxs(
|
|
2635
2654
|
"details",
|
|
2636
2655
|
{
|
|
2637
2656
|
onToggle: handleToggle,
|
|
2638
|
-
className: cx(className2, styles$
|
|
2639
|
-
[styles$
|
|
2640
|
-
[styles$
|
|
2657
|
+
className: cx(className2, styles$s.accordion, variantMap2[variant], {
|
|
2658
|
+
[styles$s.accordionWithIcon]: expandOnLeft,
|
|
2659
|
+
[styles$s.accordionNarrow]: narrow
|
|
2641
2660
|
}),
|
|
2642
2661
|
children: [
|
|
2643
|
-
/* @__PURE__ */ jsxs("summary", { className: styles$
|
|
2644
|
-
expandOnLeft && /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles$
|
|
2662
|
+
/* @__PURE__ */ jsxs("summary", { className: styles$s.accordionSummary, children: [
|
|
2663
|
+
expandOnLeft && /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles$s.accordionArrow }),
|
|
2645
2664
|
/* @__PURE__ */ jsx(Slot, { name: "icon" }),
|
|
2646
2665
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", children: /* @__PURE__ */ jsx(Slot, { name: "title", children: /* @__PURE__ */ jsx(Skeleton, {}) }) }),
|
|
2647
2666
|
!expandOnLeft && /* @__PURE__ */ jsx(
|
|
2648
2667
|
Icon,
|
|
2649
2668
|
{
|
|
2650
2669
|
name: "chevron-down",
|
|
2651
|
-
className: cx(styles$
|
|
2670
|
+
className: cx(styles$s.accordionArrow, styles$s.accordionArrowRight)
|
|
2652
2671
|
}
|
|
2653
2672
|
)
|
|
2654
2673
|
] }),
|
|
2655
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
2674
|
+
/* @__PURE__ */ jsx("div", { className: styles$s.accordionContent, children: /* @__PURE__ */ jsx(Slot, { name: "content", children: /* @__PURE__ */ jsx(Skeleton, {}) }) })
|
|
2656
2675
|
]
|
|
2657
2676
|
}
|
|
2658
2677
|
);
|
|
@@ -2673,7 +2692,7 @@ const alertIconError = "adyen-kyc-alert-icon-error";
|
|
|
2673
2692
|
const alertIconWarning = "adyen-kyc-alert-icon-warning";
|
|
2674
2693
|
const alertIconSuccess = "adyen-kyc-alert-icon-success";
|
|
2675
2694
|
const alertTitle = "adyen-kyc-alert-title";
|
|
2676
|
-
const styles$
|
|
2695
|
+
const styles$r = {
|
|
2677
2696
|
alert,
|
|
2678
2697
|
alertWithoutIcon,
|
|
2679
2698
|
alertExplanation,
|
|
@@ -2692,19 +2711,19 @@ const styles$t = {
|
|
|
2692
2711
|
alertTitle
|
|
2693
2712
|
};
|
|
2694
2713
|
const variantMap$1 = {
|
|
2695
|
-
basic: styles$
|
|
2696
|
-
info: styles$
|
|
2697
|
-
error: styles$
|
|
2698
|
-
warning: styles$
|
|
2699
|
-
success: styles$
|
|
2714
|
+
basic: styles$r.alertBasic,
|
|
2715
|
+
info: styles$r.alertInfo,
|
|
2716
|
+
error: styles$r.alertError,
|
|
2717
|
+
warning: styles$r.alertWarning,
|
|
2718
|
+
success: styles$r.alertSuccess
|
|
2700
2719
|
};
|
|
2701
2720
|
const iconVariantMap = {
|
|
2702
2721
|
basic: "",
|
|
2703
2722
|
// does not exist
|
|
2704
|
-
info: styles$
|
|
2705
|
-
error: styles$
|
|
2706
|
-
warning: styles$
|
|
2707
|
-
success: styles$
|
|
2723
|
+
info: styles$r.alertIconInfo,
|
|
2724
|
+
error: styles$r.alertIconError,
|
|
2725
|
+
warning: styles$r.alertIconWarning,
|
|
2726
|
+
success: styles$r.alertIconSuccess
|
|
2708
2727
|
};
|
|
2709
2728
|
const Alert = ({
|
|
2710
2729
|
title,
|
|
@@ -2730,7 +2749,7 @@ const Alert = ({
|
|
|
2730
2749
|
if (isValidElement(icon)) {
|
|
2731
2750
|
return icon;
|
|
2732
2751
|
}
|
|
2733
|
-
return /* @__PURE__ */ jsx("span", { className: cx(styles$
|
|
2752
|
+
return /* @__PURE__ */ jsx("span", { className: cx(styles$r.alertIcon, iconVariantMap[variant]), children: /* @__PURE__ */ jsx(AlertIcon, { variant }) });
|
|
2734
2753
|
};
|
|
2735
2754
|
const renderedIcon = renderIcon();
|
|
2736
2755
|
if (type === "collapsible") {
|
|
@@ -2739,7 +2758,7 @@ const Alert = ({
|
|
|
2739
2758
|
/* @__PURE__ */ jsx("template", { slot: "icon", children: renderedIcon }),
|
|
2740
2759
|
/* @__PURE__ */ jsxs("template", { slot: "content", children: [
|
|
2741
2760
|
children2,
|
|
2742
|
-
!!actions && /* @__PURE__ */ jsx("div", { className: styles$
|
|
2761
|
+
!!actions && /* @__PURE__ */ jsx("div", { className: styles$r.alertActions, children: actions })
|
|
2743
2762
|
] })
|
|
2744
2763
|
] });
|
|
2745
2764
|
}
|
|
@@ -2747,18 +2766,18 @@ const Alert = ({
|
|
|
2747
2766
|
return /* @__PURE__ */ jsxs(
|
|
2748
2767
|
"div",
|
|
2749
2768
|
{
|
|
2750
|
-
className: cx(styles$
|
|
2751
|
-
[styles$
|
|
2769
|
+
className: cx(styles$r.alert, className2, variantMap$1[variant], {
|
|
2770
|
+
[styles$r.alertWithoutIcon]: !renderedIcon
|
|
2752
2771
|
}),
|
|
2753
2772
|
role: "alert",
|
|
2754
2773
|
"data-testid": testId,
|
|
2755
2774
|
children: [
|
|
2756
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
2775
|
+
/* @__PURE__ */ jsxs("div", { className: styles$r.alertHeader, children: [
|
|
2757
2776
|
renderedIcon,
|
|
2758
|
-
title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: styles$
|
|
2759
|
-
!!actions && /* @__PURE__ */ jsx("div", { className: styles$
|
|
2777
|
+
title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: styles$r.alertTitle, children: title }),
|
|
2778
|
+
!!actions && /* @__PURE__ */ jsx("div", { className: styles$r.alertActions, children: actions })
|
|
2760
2779
|
] }),
|
|
2761
|
-
!!children2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
2780
|
+
!!children2 && /* @__PURE__ */ jsx("div", { className: styles$r.alertExplanation, children: children2 })
|
|
2762
2781
|
]
|
|
2763
2782
|
}
|
|
2764
2783
|
);
|
|
@@ -2766,19 +2785,19 @@ const Alert = ({
|
|
|
2766
2785
|
return /* @__PURE__ */ jsxs(
|
|
2767
2786
|
"div",
|
|
2768
2787
|
{
|
|
2769
|
-
className: cx(styles$
|
|
2770
|
-
[styles$
|
|
2788
|
+
className: cx(styles$r.alert, className2, variantMap$1[variant], {
|
|
2789
|
+
[styles$r.alertWithoutIcon]: !renderedIcon
|
|
2771
2790
|
}),
|
|
2772
2791
|
role: "alert",
|
|
2773
2792
|
"data-testid": testId,
|
|
2774
2793
|
children: [
|
|
2775
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
2794
|
+
/* @__PURE__ */ jsxs("div", { className: styles$r.alertHeader, children: [
|
|
2776
2795
|
renderedIcon,
|
|
2777
|
-
title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: styles$
|
|
2796
|
+
title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: styles$r.alertTitle, children: title }),
|
|
2778
2797
|
type === "dismissible" && /* @__PURE__ */ jsx(Button, { variant: "tertiary", icon: "cross", onClick: closeAlert, children: i18n.get("close") })
|
|
2779
2798
|
] }),
|
|
2780
|
-
!!children2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
2781
|
-
!!actions && /* @__PURE__ */ jsx("div", { className: styles$
|
|
2799
|
+
!!children2 && /* @__PURE__ */ jsx("div", { className: styles$r.alertExplanation, children: children2 }),
|
|
2800
|
+
!!actions && /* @__PURE__ */ jsx("div", { className: styles$r.alertActions, children: actions })
|
|
2782
2801
|
]
|
|
2783
2802
|
}
|
|
2784
2803
|
);
|
|
@@ -2860,7 +2879,7 @@ const list = "adyen-kyc-list";
|
|
|
2860
2879
|
const listNoMarkers = "adyen-kyc-list-no-markers";
|
|
2861
2880
|
const listItem = "adyen-kyc-list-item";
|
|
2862
2881
|
const listOrdered = "adyen-kyc-list-ordered";
|
|
2863
|
-
const styles$
|
|
2882
|
+
const styles$q = {
|
|
2864
2883
|
list,
|
|
2865
2884
|
listNoMarkers,
|
|
2866
2885
|
listItem,
|
|
@@ -2868,12 +2887,12 @@ const styles$s = {
|
|
|
2868
2887
|
};
|
|
2869
2888
|
function List({ className: className2, ordered, noMarkers, items }) {
|
|
2870
2889
|
const classNames = cx([
|
|
2871
|
-
styles$
|
|
2872
|
-
ordered && styles$
|
|
2873
|
-
noMarkers && styles$
|
|
2890
|
+
styles$q.list,
|
|
2891
|
+
ordered && styles$q.listOrdered,
|
|
2892
|
+
noMarkers && styles$q.listNoMarkers,
|
|
2874
2893
|
className2
|
|
2875
2894
|
]);
|
|
2876
|
-
return /* @__PURE__ */ jsx("ul", { className: classNames, children: items.map((item, idx) => /* @__PURE__ */ jsx("li", { className: styles$
|
|
2895
|
+
return /* @__PURE__ */ jsx("ul", { className: classNames, children: items.map((item, idx) => /* @__PURE__ */ jsx("li", { className: styles$q.listItem, children: item }, idx)) });
|
|
2877
2896
|
}
|
|
2878
2897
|
var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
|
|
2879
2898
|
DocumentType2["BANK_STATEMENT"] = "bankStatement";
|
|
@@ -2973,11 +2992,20 @@ const dataMissingRemediationsToFieldsMap = {
|
|
|
2973
2992
|
"1_503": [DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO],
|
|
2974
2993
|
"1_512": [DocumentType.VAT_DOCUMENT],
|
|
2975
2994
|
"1_803": [DocumentType.PROOF_OF_DIRECTOR],
|
|
2995
|
+
"2_117": ["organization.registrationNumber"],
|
|
2996
|
+
"2_118": ["organization.taxId"],
|
|
2997
|
+
"2_125": ["organization.type"],
|
|
2998
|
+
"2_133": ["organization.doingBusinessAs"],
|
|
2999
|
+
"2_153": ["phoneNumber"],
|
|
2976
3000
|
"2_158": ["vatNumber", "exemptedFromVat", "vatAbsenceReason"],
|
|
3001
|
+
"2_170": ["organization.taxInformation"],
|
|
2977
3002
|
"2_184": [DocumentType.CONSTITUTIONAL_DOCUMENT],
|
|
2978
|
-
"
|
|
3003
|
+
"2_194": ["organization.registeredAddress.postalCode"],
|
|
3004
|
+
"2_206": ["organization.registeredAddress.street"],
|
|
3005
|
+
"2_208": ["organization.registeredAddress.city"],
|
|
2979
3006
|
"2_214": [DocumentType.PROOF_OF_FUNDING],
|
|
2980
|
-
"
|
|
3007
|
+
"2_222": [DocumentType.PROOF_OF_RELATIONSHIP],
|
|
3008
|
+
"2_225": ["organization.financialReports"]
|
|
2981
3009
|
};
|
|
2982
3010
|
const CUSTOMER_SUPPORT_DATA_MISSING_ERROR_CODES = ["2_8247", "2_8248", "2_8249", "2_8250"];
|
|
2983
3011
|
const DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING = {
|
|
@@ -4601,7 +4629,7 @@ const Select = ({
|
|
|
4601
4629
|
);
|
|
4602
4630
|
};
|
|
4603
4631
|
const convertFullToHalf = (str) => str.replace(/[!-~]/g, (r) => String.fromCharCode(r.charCodeAt(0) - 65248));
|
|
4604
|
-
const logger$
|
|
4632
|
+
const logger$Q = createLogger("TextArea");
|
|
4605
4633
|
function TextArea(props) {
|
|
4606
4634
|
const { uniqueId, ...passedProps } = props;
|
|
4607
4635
|
const {
|
|
@@ -4620,7 +4648,7 @@ function TextArea(props) {
|
|
|
4620
4648
|
const { i18n } = useI18nContext();
|
|
4621
4649
|
const [value, setValue] = useState("");
|
|
4622
4650
|
if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
|
|
4623
|
-
logger$
|
|
4651
|
+
logger$Q.error("Error: Form fields that rely on InputBase may not have an onChange property");
|
|
4624
4652
|
}
|
|
4625
4653
|
const handleInput = (e) => {
|
|
4626
4654
|
var _a2;
|
|
@@ -4719,7 +4747,7 @@ class ValidationResult {
|
|
|
4719
4747
|
return this.validationResults;
|
|
4720
4748
|
}
|
|
4721
4749
|
}
|
|
4722
|
-
const logger$
|
|
4750
|
+
const logger$P = createLogger("useAsyncValidator");
|
|
4723
4751
|
const useAsyncValidator = (asyncRules) => {
|
|
4724
4752
|
const [asyncValidationResults, setAsyncValidationResults] = useState({});
|
|
4725
4753
|
const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
|
|
@@ -4739,7 +4767,7 @@ const useAsyncValidator = (asyncRules) => {
|
|
|
4739
4767
|
}
|
|
4740
4768
|
])
|
|
4741
4769
|
});
|
|
4742
|
-
}).catch(logger$
|
|
4770
|
+
}).catch(logger$P.error);
|
|
4743
4771
|
},
|
|
4744
4772
|
[asyncRules, clearAsyncValidationResults]
|
|
4745
4773
|
);
|
|
@@ -9931,7 +9959,7 @@ const operationalAddressIsSameItems = [
|
|
|
9931
9959
|
name: "operationalAddressIsNotSameItemName"
|
|
9932
9960
|
}
|
|
9933
9961
|
];
|
|
9934
|
-
const logger$
|
|
9962
|
+
const logger$O = createLogger("mapPayoutAccountSchemaToApiBankAccount");
|
|
9935
9963
|
const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCountry) => {
|
|
9936
9964
|
var _a2;
|
|
9937
9965
|
if ("iban" in payoutAccount && payoutAccount.iban)
|
|
@@ -10019,7 +10047,7 @@ const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCoun
|
|
|
10019
10047
|
routingNumber: payoutAccount.branchCode
|
|
10020
10048
|
};
|
|
10021
10049
|
default:
|
|
10022
|
-
logger$
|
|
10050
|
+
logger$O.log(`${bankCountry.toLowerCase()}Local is not a configured region`);
|
|
10023
10051
|
return {
|
|
10024
10052
|
type: `${bankCountry.toLowerCase()}Local`,
|
|
10025
10053
|
accountNumber: payoutAccount.bankAccountNumber
|
|
@@ -10046,7 +10074,7 @@ var CompanyTypesValue = /* @__PURE__ */ ((CompanyTypesValue2) => {
|
|
|
10046
10074
|
CompanyTypesValue2["SOLE_PROPRIETORSHIP"] = "soleProprietorship";
|
|
10047
10075
|
return CompanyTypesValue2;
|
|
10048
10076
|
})(CompanyTypesValue || {});
|
|
10049
|
-
const
|
|
10077
|
+
const addressFields = [
|
|
10050
10078
|
"address",
|
|
10051
10079
|
"otherAddressInformation",
|
|
10052
10080
|
"postalCode",
|
|
@@ -10055,7 +10083,7 @@ const ADDRESS_SCHEMA = [
|
|
|
10055
10083
|
"country",
|
|
10056
10084
|
"poBox"
|
|
10057
10085
|
];
|
|
10058
|
-
const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY, PO_BOX] =
|
|
10086
|
+
const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY, PO_BOX] = addressFields;
|
|
10059
10087
|
const COUNTRIES_WITH_STATES_DATASET = [
|
|
10060
10088
|
CountryCodes.Australia,
|
|
10061
10089
|
CountryCodes.Brazil,
|
|
@@ -10533,7 +10561,7 @@ const onfidoDocumentTypeMapping = [
|
|
|
10533
10561
|
{ id: DocumentType.NATIONAL_IDENTITY_CARD, name: "identityCard", hasBackPage: true },
|
|
10534
10562
|
{ id: DocumentType.PASSPORT, name: "passport", hasBackPage: false }
|
|
10535
10563
|
];
|
|
10536
|
-
const logger$
|
|
10564
|
+
const logger$N = createLogger("documentUtils");
|
|
10537
10565
|
const documentStore = {};
|
|
10538
10566
|
const idTypes = idDocumentTypeOptions.map((types) => types.id);
|
|
10539
10567
|
let getDocumentService;
|
|
@@ -10570,7 +10598,7 @@ const fetchDocuments = async (documentDetails, entityId) => {
|
|
|
10570
10598
|
if (id) {
|
|
10571
10599
|
documentStore[id].push(document2);
|
|
10572
10600
|
} else {
|
|
10573
|
-
logger$
|
|
10601
|
+
logger$N.error("Document has no `owner.id`", document2);
|
|
10574
10602
|
}
|
|
10575
10603
|
});
|
|
10576
10604
|
return documentStore[entityId];
|
|
@@ -10836,6 +10864,7 @@ const solePropBusinessDetailsBaseMapping = {
|
|
|
10836
10864
|
"basicInformation.stateOrProvince": "soleProprietorship.registeredAddress.stateOrProvince",
|
|
10837
10865
|
"basicInformation.registrationNumber": "soleProprietorship.registrationNumber",
|
|
10838
10866
|
"basicInformation.taxInformation": "soleProprietorship.taxInformation",
|
|
10867
|
+
"basicInformation.exemptedFromTax": "soleProprietorship.taxAbsent",
|
|
10839
10868
|
"basicInformation.countryOfGoverningLaw": "soleProprietorship.countryOfGoverningLaw",
|
|
10840
10869
|
"additionalInformation.hasDoingBusinessAs": "soleProprietorship.doingBusinessAsAbsent",
|
|
10841
10870
|
"additionalInformation.doingBusinessAs": "soleProprietorship.doingBusinessAs",
|
|
@@ -11700,7 +11729,7 @@ const mapIndividualDocumentToApiDocument = async (data, entityId) => {
|
|
|
11700
11729
|
var _a2, _b2, _c2, _d2, _e2;
|
|
11701
11730
|
if (data) {
|
|
11702
11731
|
const { proofOfNationalId, proofOfResidency, proofOfRelationship } = data;
|
|
11703
|
-
const idDocument2 = "idDocument" in data ? data.idDocument : data.
|
|
11732
|
+
const idDocument2 = "idDocument" in data ? data.idDocument : data.manualIdUpload;
|
|
11704
11733
|
const entityType = "legalEntity";
|
|
11705
11734
|
const documents = await Promise.all([
|
|
11706
11735
|
createDocumentRequest({
|
|
@@ -12078,7 +12107,11 @@ const prepareExposureSubmitData = (exposureIndex, data, rootLegalEntity) => {
|
|
|
12078
12107
|
const appendHighExposureData = (legalOrganization, highExposureData) => {
|
|
12079
12108
|
if (!legalOrganization || !highExposureData) return highExposureData;
|
|
12080
12109
|
const clonedHighExposureData = { ...highExposureData };
|
|
12081
|
-
|
|
12110
|
+
let financialReportData = {};
|
|
12111
|
+
if (legalOrganization.financialReports) {
|
|
12112
|
+
const financialReportsArray = Array.isArray(legalOrganization.financialReports) ? legalOrganization.financialReports : [legalOrganization.financialReports];
|
|
12113
|
+
financialReportData = mapFinancialReportsToFinancialInformation(financialReportsArray, false);
|
|
12114
|
+
}
|
|
12082
12115
|
return {
|
|
12083
12116
|
...clonedHighExposureData,
|
|
12084
12117
|
...financialReportData,
|
|
@@ -12545,7 +12578,7 @@ const mapReceivedTaskType = (taskType) => {
|
|
|
12545
12578
|
return taskType;
|
|
12546
12579
|
}
|
|
12547
12580
|
};
|
|
12548
|
-
const logger$
|
|
12581
|
+
const logger$M = createLogger("globalStore");
|
|
12549
12582
|
const computed = dist.createComputed(
|
|
12550
12583
|
({
|
|
12551
12584
|
taskTypes,
|
|
@@ -12585,7 +12618,7 @@ const computed = dist.createComputed(
|
|
|
12585
12618
|
transferInstruments
|
|
12586
12619
|
});
|
|
12587
12620
|
} catch (err) {
|
|
12588
|
-
logger$
|
|
12621
|
+
logger$M.error(`Could not calculate task status for ${taskIdentifier}. `, err);
|
|
12589
12622
|
}
|
|
12590
12623
|
return acc;
|
|
12591
12624
|
}, {});
|
|
@@ -12639,7 +12672,7 @@ const useGetTaskStatus = () => {
|
|
|
12639
12672
|
const taskIdentifier = id ? `${taskType}-${id}` : taskType;
|
|
12640
12673
|
const status = (_a2 = taskStatuses[taskIdentifier]) == null ? void 0 : _a2.status;
|
|
12641
12674
|
if (status === void 0) {
|
|
12642
|
-
logger$
|
|
12675
|
+
logger$M.warn(`No status for task '${taskIdentifier}', returning UNKNOWN`);
|
|
12643
12676
|
return TaskStatus.UNKNOWN;
|
|
12644
12677
|
}
|
|
12645
12678
|
return status;
|
|
@@ -12699,7 +12732,7 @@ const removeAnimationStartListener = (element, listener) => {
|
|
|
12699
12732
|
};
|
|
12700
12733
|
const isProviderPlaidEmbedded = (redirectUrl) => !!(redirectUrl == null ? void 0 : redirectUrl.includes("/plaid/embedded-search/sdk?")) || !!(redirectUrl == null ? void 0 : redirectUrl.includes("/plaidEmbeddedSearch"));
|
|
12701
12734
|
const isProviderWidgetInline = (providerName) => !providerName ? true : ["PayWithMyBank"].includes(providerName);
|
|
12702
|
-
const logger$
|
|
12735
|
+
const logger$L = createLogger("Fetch");
|
|
12703
12736
|
const getRequestObject = (options, data) => {
|
|
12704
12737
|
const { headers = [], method = "GET", authentication } = options;
|
|
12705
12738
|
let authHeaders;
|
|
@@ -12740,10 +12773,10 @@ const logFetchError = (message, level) => {
|
|
|
12740
12773
|
case "info":
|
|
12741
12774
|
case "warn":
|
|
12742
12775
|
case "error":
|
|
12743
|
-
logger$
|
|
12776
|
+
logger$L[level](message);
|
|
12744
12777
|
break;
|
|
12745
12778
|
default:
|
|
12746
|
-
logger$
|
|
12779
|
+
logger$L.error(message);
|
|
12747
12780
|
}
|
|
12748
12781
|
};
|
|
12749
12782
|
const handleFetchResponse = async (response, responseType) => {
|
|
@@ -12827,7 +12860,7 @@ const RELEVANT_MESSAGE_TYPES = ["account_verification_report_id", "error"];
|
|
|
12827
12860
|
const TERMINAL_DATA_PROPS = ["accounts", "error", "reference"];
|
|
12828
12861
|
const MOUNT_TIMEOUT = 10 * 1e3;
|
|
12829
12862
|
const TINK_VENDOR = "Tink";
|
|
12830
|
-
const logger$
|
|
12863
|
+
const logger$K = createLogger("iframeWidget");
|
|
12831
12864
|
const isObjectData = (data) => typeof data === "object" && !Array.isArray(data) && data !== null;
|
|
12832
12865
|
const isTerminalMessageData = (data) => isObjectData(data) && Object.entries(data).some(([prop]) => TERMINAL_DATA_PROPS.includes(prop));
|
|
12833
12866
|
const parseMessageJson = (message) => {
|
|
@@ -12845,7 +12878,7 @@ const callbackErrorHandler = async (response) => {
|
|
|
12845
12878
|
try {
|
|
12846
12879
|
await response;
|
|
12847
12880
|
} catch (ex) {
|
|
12848
|
-
logger$
|
|
12881
|
+
logger$K.error(ex);
|
|
12849
12882
|
}
|
|
12850
12883
|
return {
|
|
12851
12884
|
error: "UNKNOWN_ERROR",
|
|
@@ -12941,7 +12974,7 @@ class IFrameWidget {
|
|
|
12941
12974
|
message = responseData.errorMessage;
|
|
12942
12975
|
}
|
|
12943
12976
|
} catch (ex) {
|
|
12944
|
-
logger$
|
|
12977
|
+
logger$K.error(ex);
|
|
12945
12978
|
}
|
|
12946
12979
|
throw new AdyenKycSdkError(reason, jsonData.error);
|
|
12947
12980
|
}
|
|
@@ -13897,7 +13930,7 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
|
|
|
13897
13930
|
};
|
|
13898
13931
|
};
|
|
13899
13932
|
const MISMATCH_ANIMATION_NAME = "mismatchShake";
|
|
13900
|
-
const logger$
|
|
13933
|
+
const logger$J = createLogger("MaskedInput");
|
|
13901
13934
|
const Inner = ({
|
|
13902
13935
|
name,
|
|
13903
13936
|
label,
|
|
@@ -14058,7 +14091,7 @@ const MaskedInput = ({
|
|
|
14058
14091
|
}, []);
|
|
14059
14092
|
useEffect(() => {
|
|
14060
14093
|
if (!mask) {
|
|
14061
|
-
logger$
|
|
14094
|
+
logger$J.warn("`mask` is undefined. No masking of input will take place.");
|
|
14062
14095
|
}
|
|
14063
14096
|
}, [mask]);
|
|
14064
14097
|
const getMaskResult = useCallback(
|
|
@@ -14102,7 +14135,7 @@ const MaskedInput = ({
|
|
|
14102
14135
|
onInput(strippedValue);
|
|
14103
14136
|
return;
|
|
14104
14137
|
}
|
|
14105
|
-
logger$
|
|
14138
|
+
logger$J.warn(
|
|
14106
14139
|
`Value received "${value}" does not match mask`,
|
|
14107
14140
|
maskResult,
|
|
14108
14141
|
`
|
|
@@ -15474,7 +15507,7 @@ function PayoutAccount(props) {
|
|
|
15474
15507
|
const link = "adyen-kyc-link";
|
|
15475
15508
|
const linkDefault = "adyen-kyc-link-default";
|
|
15476
15509
|
const linkInline = "adyen-kyc-link-inline";
|
|
15477
|
-
const styles$
|
|
15510
|
+
const styles$p = {
|
|
15478
15511
|
link,
|
|
15479
15512
|
linkDefault,
|
|
15480
15513
|
linkInline
|
|
@@ -15482,9 +15515,9 @@ const styles$r = {
|
|
|
15482
15515
|
const Link = ({ children: children2, external = false, href, inline = false }) => {
|
|
15483
15516
|
const rel = external ? "external noopener noreferrer" : void 0;
|
|
15484
15517
|
const target = external ? "_blank" : "_self";
|
|
15485
|
-
const className2 = cx(styles$
|
|
15486
|
-
[styles$
|
|
15487
|
-
[styles$
|
|
15518
|
+
const className2 = cx(styles$p.link, {
|
|
15519
|
+
[styles$p.linkInline]: inline,
|
|
15520
|
+
[styles$p.linkDefault]: !inline
|
|
15488
15521
|
});
|
|
15489
15522
|
return /* @__PURE__ */ jsxs("a", { className: className2, href, rel, target, children: [
|
|
15490
15523
|
children2,
|
|
@@ -15833,7 +15866,7 @@ const modalFooter = "adyen-kyc-modal-footer";
|
|
|
15833
15866
|
const modalButton = "adyen-kyc-modal-button";
|
|
15834
15867
|
const modalLarge = "adyen-kyc-modal-large";
|
|
15835
15868
|
const modalFullscreen = "adyen-kyc-modal-fullscreen";
|
|
15836
|
-
const styles$
|
|
15869
|
+
const styles$o = {
|
|
15837
15870
|
modal,
|
|
15838
15871
|
modalSmall,
|
|
15839
15872
|
modalMain,
|
|
@@ -15881,14 +15914,14 @@ const Modal = ({
|
|
|
15881
15914
|
{
|
|
15882
15915
|
title,
|
|
15883
15916
|
ref: dialogRef,
|
|
15884
|
-
className: cx(styles$
|
|
15885
|
-
[styles$
|
|
15886
|
-
[styles$
|
|
15887
|
-
[styles$
|
|
15917
|
+
className: cx(styles$o.modal, {
|
|
15918
|
+
[styles$o.modalSmall]: size === "small",
|
|
15919
|
+
[styles$o.modalLarge]: size === "large",
|
|
15920
|
+
[styles$o.modalFullscreen]: size === "fullscreen"
|
|
15888
15921
|
}),
|
|
15889
15922
|
onClose,
|
|
15890
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
15891
|
-
showCloseButton && /* @__PURE__ */ jsx("div", { className: styles$
|
|
15923
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$o.modalWrapper, children: /* @__PURE__ */ jsxs("div", { className: styles$o.modalMain, children: [
|
|
15924
|
+
showCloseButton && /* @__PURE__ */ jsx("div", { className: styles$o.modalButton, children: /* @__PURE__ */ jsx(
|
|
15892
15925
|
IconButton,
|
|
15893
15926
|
{
|
|
15894
15927
|
ariaLabel: "Close",
|
|
@@ -15903,12 +15936,12 @@ const Modal = ({
|
|
|
15903
15936
|
}
|
|
15904
15937
|
);
|
|
15905
15938
|
};
|
|
15906
|
-
const ModalHeader = ({ children: children2 }) => /* @__PURE__ */ jsx("header", { className: styles$
|
|
15907
|
-
const ModalContent = ({ children: children2 }) => /* @__PURE__ */ jsx("section", { className: styles$
|
|
15908
|
-
const ModalFooter = ({ children: children2 }) => /* @__PURE__ */ jsx("footer", { className: styles$
|
|
15939
|
+
const ModalHeader = ({ children: children2 }) => /* @__PURE__ */ jsx("header", { className: styles$o.modalHeader, children: children2 });
|
|
15940
|
+
const ModalContent = ({ children: children2 }) => /* @__PURE__ */ jsx("section", { className: styles$o.modalContent, children: children2 });
|
|
15941
|
+
const ModalFooter = ({ children: children2 }) => /* @__PURE__ */ jsx("footer", { className: styles$o.modalFooter, children: children2 });
|
|
15909
15942
|
const providerButton = "adyen-kyc-provider-button";
|
|
15910
15943
|
const providerButtonDisplayName = "adyen-kyc-provider-button-display-name";
|
|
15911
|
-
const styles$
|
|
15944
|
+
const styles$n = {
|
|
15912
15945
|
providerButton,
|
|
15913
15946
|
providerButtonDisplayName
|
|
15914
15947
|
};
|
|
@@ -15954,9 +15987,9 @@ const ProviderButton = ({
|
|
|
15954
15987
|
singpassMyInfo: i18n.get("retrieveMyinfoWith"),
|
|
15955
15988
|
singpassMyInfoBusiness: i18n.get("retrieveMyinfoBusinessWith")
|
|
15956
15989
|
};
|
|
15957
|
-
return /* @__PURE__ */ jsx(Button, { ...buttonProps, variant: buttonVariant, children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
15990
|
+
return /* @__PURE__ */ jsx(Button, { ...buttonProps, variant: buttonVariant, children: /* @__PURE__ */ jsxs("div", { className: styles$n.providerButton, children: [
|
|
15958
15991
|
buttonLabel2[provider],
|
|
15959
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
15992
|
+
/* @__PURE__ */ jsx("span", { className: styles$n.providerButtonDisplayName, children: providerDisplayName[provider] }),
|
|
15960
15993
|
/* @__PURE__ */ jsx(Svg, { name: providerLogo[provider], type: "image" })
|
|
15961
15994
|
] }) });
|
|
15962
15995
|
};
|
|
@@ -16028,7 +16061,7 @@ const preferInstantVerificationMethod = "adyen-kyc-prefer-instant-verification-m
|
|
|
16028
16061
|
const preferInstantVerificationMethodCard = "adyen-kyc-prefer-instant-verification-method-card";
|
|
16029
16062
|
const preferInstantVerificationMethodActions = "adyen-kyc-prefer-instant-verification-method-actions";
|
|
16030
16063
|
const preferInstantVerificationMethodModalFooter = "adyen-kyc-prefer-instant-verification-method-modal-footer";
|
|
16031
|
-
const styles$
|
|
16064
|
+
const styles$m = {
|
|
16032
16065
|
preferInstantVerificationMethod,
|
|
16033
16066
|
preferInstantVerificationMethodCard,
|
|
16034
16067
|
preferInstantVerificationMethodActions,
|
|
@@ -16118,9 +16151,9 @@ const PreferInstantVerificationMethod = ({
|
|
|
16118
16151
|
disabled: bankInfoValidated,
|
|
16119
16152
|
loading: !hideVerificationWidget
|
|
16120
16153
|
}
|
|
16121
|
-
) : /* @__PURE__ */ jsx(Card, { background: "secondary", className: styles$
|
|
16122
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
16123
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
16154
|
+
) : /* @__PURE__ */ jsx(Card, { background: "secondary", className: styles$m.preferInstantVerificationMethodCard, children: i18n.get("unfortunatelyAnInstantProvider") });
|
|
16155
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$m.preferInstantVerificationMethod, children: [
|
|
16156
|
+
/* @__PURE__ */ jsxs("div", { className: styles$m.preferInstantVerificationMethodActions, children: [
|
|
16124
16157
|
loadingStatus === "loading" ? /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-bottom-8", children: /* @__PURE__ */ jsx(Skeleton, { height: "2.5rem" }) }) : InstantButton,
|
|
16125
16158
|
/* @__PURE__ */ jsx(
|
|
16126
16159
|
Button,
|
|
@@ -16158,7 +16191,7 @@ const PreferInstantVerificationMethod = ({
|
|
|
16158
16191
|
isModalOpen ? /* @__PURE__ */ jsxs(Modal, { size: "small", onClose: () => setIsModalOpen(false), children: [
|
|
16159
16192
|
/* @__PURE__ */ jsx(ModalHeader, { children: i18n.get("manuallyAddAccountQuestion") }),
|
|
16160
16193
|
/* @__PURE__ */ jsx(ModalContent, { children: i18n.get("addingAndVerifiyingABankAccount") }),
|
|
16161
|
-
/* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
16194
|
+
/* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$m.preferInstantVerificationMethodModalFooter, children: [
|
|
16162
16195
|
/* @__PURE__ */ jsx(Button, { onClick: handleClickContinue, variant: "secondary", children: i18n.get("yesContinue") }),
|
|
16163
16196
|
/* @__PURE__ */ jsx(Button, { onClick: handleClickCancel, children: i18n.get("cancel") })
|
|
16164
16197
|
] }) })
|
|
@@ -19165,6 +19198,7 @@ const taxIdNumberOptions = {
|
|
|
19165
19198
|
],
|
|
19166
19199
|
[CountryCodes.Belgium]: [{ id: "BUSINESS_NUMMER", name: "businessNumber" }],
|
|
19167
19200
|
[CountryCodes.Brazil]: [{ id: "CNPJ", name: "CNPJ" }],
|
|
19201
|
+
[CountryCodes.Canada]: [{ id: "BUSINESS_NUMMER", name: "businessNumber" }],
|
|
19168
19202
|
[CountryCodes.Germany]: [
|
|
19169
19203
|
{
|
|
19170
19204
|
id: "STEUERNUMMER",
|
|
@@ -19302,8 +19336,6 @@ const vatNumberOptions = {
|
|
|
19302
19336
|
const getTaxIdNumberOptions = (country, companyType) => {
|
|
19303
19337
|
const optionsForCountry = taxIdNumberOptions[country];
|
|
19304
19338
|
if (!companyType || !optionsForCountry) return optionsForCountry;
|
|
19305
|
-
if (country === "US" || country === "PR")
|
|
19306
|
-
return optionsForCountry.filter((option) => option.id === "EIN");
|
|
19307
19339
|
return optionsForCountry.filter(
|
|
19308
19340
|
(option) => {
|
|
19309
19341
|
var _a2;
|
|
@@ -20011,6 +20043,7 @@ const defaultFieldConfig$4 = {
|
|
|
20011
20043
|
const inferTaxIdNumberType = (taxId, country, companyType) => {
|
|
20012
20044
|
const optionsForCountry = taxIdNumberOptions[country];
|
|
20013
20045
|
const metadataFn = defaultFieldConfig$4[country];
|
|
20046
|
+
if (optionsForCountry.length === 1) return optionsForCountry[0].id;
|
|
20014
20047
|
if (!optionsForCountry || !metadataFn || typeof metadataFn !== "function") return void 0;
|
|
20015
20048
|
for (const option of optionsForCountry) {
|
|
20016
20049
|
const fieldMetadata = metadataFn({
|
|
@@ -20882,7 +20915,8 @@ function TaxIdNumberTypeSelector({
|
|
|
20882
20915
|
companyType,
|
|
20883
20916
|
selected,
|
|
20884
20917
|
setSelected,
|
|
20885
|
-
exemptedOption
|
|
20918
|
+
exemptedOption,
|
|
20919
|
+
isUsSoleProp
|
|
20886
20920
|
}) {
|
|
20887
20921
|
const { i18n } = useI18nContext();
|
|
20888
20922
|
const handleSelect = useCallback(
|
|
@@ -20910,12 +20944,11 @@ function TaxIdNumberTypeSelector({
|
|
|
20910
20944
|
];
|
|
20911
20945
|
}, [country, companyType, exemptedOption]);
|
|
20912
20946
|
useEffect(() => {
|
|
20913
|
-
if (!selected && options.length > 0) {
|
|
20947
|
+
if (!isUsSoleProp && !selected && options.length > 0) {
|
|
20914
20948
|
handleSelect(options[0].id);
|
|
20915
20949
|
}
|
|
20916
|
-
}, [options, selected, handleSelect]);
|
|
20917
|
-
|
|
20918
|
-
if (options.length <= 1 || hideForCountry) return null;
|
|
20950
|
+
}, [options, selected, handleSelect, isUsSoleProp]);
|
|
20951
|
+
if (options.length <= 1) return null;
|
|
20919
20952
|
return /* @__PURE__ */ jsx(Field, { name: "taxIdNumberType", label: i18n.get("whichTypeOfTaxIdNumberDoYouHave"), children: (childProps) => /* @__PURE__ */ jsx(
|
|
20920
20953
|
RadioGroup,
|
|
20921
20954
|
{
|
|
@@ -20954,6 +20987,7 @@ function TaxInformationField({
|
|
|
20954
20987
|
}) {
|
|
20955
20988
|
var _a2;
|
|
20956
20989
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
20990
|
+
const { i18n } = useI18nContext();
|
|
20957
20991
|
const { accountHolder } = useCoreContext();
|
|
20958
20992
|
const currentCountryTaxInformation = useMemo(
|
|
20959
20993
|
() => {
|
|
@@ -20962,6 +20996,10 @@ function TaxInformationField({
|
|
|
20962
20996
|
},
|
|
20963
20997
|
[data, country]
|
|
20964
20998
|
);
|
|
20999
|
+
const isUsSoleProp = country === "US" && companyType === CompanyTypesValue.SOLE_PROPRIETORSHIP;
|
|
21000
|
+
const exemptionLabel = isUsSoleProp ? i18n.get("socialSecurityNumber") : labels2.exemptedFromTax;
|
|
21001
|
+
const shouldRenderInput = isUsSoleProp ? data.exemptedFromTax === false : !data.isUen;
|
|
21002
|
+
const showTaxIdExemptedOptions = canExempt && (((_a2 = getTaxIdNumberOptions(country, companyType)) == null ? void 0 : _a2.length) ?? 0) > 1 || isUsSoleProp;
|
|
20965
21003
|
const canSaveAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "theCompanyIWorkFor";
|
|
20966
21004
|
useEffect(() => {
|
|
20967
21005
|
const hasSavedTaxId = defaultData == null ? void 0 : defaultData.find((taxId) => taxId.country === country);
|
|
@@ -20969,7 +21007,6 @@ function TaxInformationField({
|
|
|
20969
21007
|
if (currentCountryTaxInformation && !hasSavedTaxId) return;
|
|
20970
21008
|
handleChangeFor("taxInformation", "input")(defaultData);
|
|
20971
21009
|
}, [country]);
|
|
20972
|
-
const showTaxIdExemptedOptions = canExempt && (((_a2 = getTaxIdNumberOptions(country, companyType)) == null ? void 0 : _a2.length) ?? 0) > 1;
|
|
20973
21010
|
const removeCurrentCountryTaxInformation = () => {
|
|
20974
21011
|
var _a3;
|
|
20975
21012
|
const filterdTaxInformation = (_a3 = data.taxInformation) == null ? void 0 : _a3.filter((taxId) => taxId.country !== country);
|
|
@@ -21119,21 +21156,16 @@ function TaxInformationField({
|
|
|
21119
21156
|
return handleChangeFor("taxInformation", "input")(updatedTaxInformation);
|
|
21120
21157
|
};
|
|
21121
21158
|
const handleTaxIdNumberTypeChange = (taxIdType) => {
|
|
21122
|
-
if (taxIdType === "exempted") {
|
|
21123
|
-
|
|
21124
|
-
|
|
21125
|
-
|
|
21126
|
-
|
|
21127
|
-
addTaxAbsentStatus(true);
|
|
21128
|
-
handleChangeFor("exemptedFromTax")(true);
|
|
21129
|
-
setTaxIdNumberType(void 0);
|
|
21130
|
-
return;
|
|
21131
|
-
} else {
|
|
21159
|
+
if (!canExempt && taxIdType === "exempted") {
|
|
21160
|
+
throw Error(`${country} does not allow tax exemptions`);
|
|
21161
|
+
}
|
|
21162
|
+
switch (taxIdType) {
|
|
21163
|
+
case "exempted":
|
|
21132
21164
|
handleChangeFor("exemptedFromTax")(true);
|
|
21133
|
-
removeCurrentCountryTaxInformation();
|
|
21134
21165
|
setTaxIdNumberType(void 0);
|
|
21135
|
-
return;
|
|
21136
|
-
|
|
21166
|
+
return canSaveAbsentState ? addTaxAbsentStatus(true) : removeCurrentCountryTaxInformation();
|
|
21167
|
+
default:
|
|
21168
|
+
handleChangeFor("exemptedFromTax")(false);
|
|
21137
21169
|
}
|
|
21138
21170
|
if (country === "SG") {
|
|
21139
21171
|
if (taxIdType === "UEN") {
|
|
@@ -21144,9 +21176,6 @@ function TaxInformationField({
|
|
|
21144
21176
|
removeCurrentCountryTaxInformation();
|
|
21145
21177
|
}
|
|
21146
21178
|
}
|
|
21147
|
-
if (canExempt && data.exemptedFromTax === true) {
|
|
21148
|
-
handleChangeFor("exemptedFromTax")(false);
|
|
21149
|
-
}
|
|
21150
21179
|
setTaxIdNumberType(taxIdType);
|
|
21151
21180
|
};
|
|
21152
21181
|
const handleExemptedFromTaxChange = (exempted) => {
|
|
@@ -21166,10 +21195,11 @@ function TaxInformationField({
|
|
|
21166
21195
|
companyType,
|
|
21167
21196
|
setSelected: handleTaxIdNumberTypeChange,
|
|
21168
21197
|
selected: data.exemptedFromTax ? "exempted" : taxIdNumberType,
|
|
21169
|
-
exemptedOption: showTaxIdExemptedOptions ?
|
|
21198
|
+
exemptedOption: showTaxIdExemptedOptions ? exemptionLabel : false,
|
|
21199
|
+
isUsSoleProp
|
|
21170
21200
|
}
|
|
21171
21201
|
),
|
|
21172
|
-
|
|
21202
|
+
shouldRenderInput && /* @__PURE__ */ jsx(
|
|
21173
21203
|
MaskedInput,
|
|
21174
21204
|
{
|
|
21175
21205
|
type: "text",
|
|
@@ -22300,10 +22330,10 @@ function NumberOfEmployees({
|
|
|
22300
22330
|
) });
|
|
22301
22331
|
}
|
|
22302
22332
|
const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
|
|
22303
|
-
const styles$
|
|
22333
|
+
const styles$l = {
|
|
22304
22334
|
financialInformationReportedValueOptions
|
|
22305
22335
|
};
|
|
22306
|
-
const logger$
|
|
22336
|
+
const logger$I = createLogger("InputCurrency");
|
|
22307
22337
|
const determineDecimalSeparator = (formatter) => formatter.formatToParts(0.1).find((part) => part.type === "decimal").value;
|
|
22308
22338
|
const determineCurrencySymbol = (formatter) => formatter.formatToParts(0).find((part) => part.type === "currency").value;
|
|
22309
22339
|
const getNumberFromFormattedCurrency = (formatted, decimalSeparator) => {
|
|
@@ -22334,7 +22364,7 @@ const InputCurrency = ({
|
|
|
22334
22364
|
const rawValue = e.target.value;
|
|
22335
22365
|
const value = getNumberFromFormattedCurrency(rawValue, decimalSeparator);
|
|
22336
22366
|
if (Number.isNaN(value)) {
|
|
22337
|
-
logger$
|
|
22367
|
+
logger$I.warn(`Unable to get number from formatted currency: "${rawValue}"`);
|
|
22338
22368
|
setText(isUndefinedOrNull(amount) ? currencySymbol : formatter.format(amount));
|
|
22339
22369
|
return;
|
|
22340
22370
|
}
|
|
@@ -22347,7 +22377,7 @@ const InputCurrency = ({
|
|
|
22347
22377
|
};
|
|
22348
22378
|
const reportedValue = "adyen-kyc-reported-value";
|
|
22349
22379
|
const reportedValueInput = "adyen-kyc-reported-value-input";
|
|
22350
|
-
const styles$
|
|
22380
|
+
const styles$k = {
|
|
22351
22381
|
reportedValue,
|
|
22352
22382
|
reportedValueInput
|
|
22353
22383
|
};
|
|
@@ -22362,7 +22392,7 @@ const ReportedValue = ({
|
|
|
22362
22392
|
isValid
|
|
22363
22393
|
}) => {
|
|
22364
22394
|
const { i18n } = useI18nContext();
|
|
22365
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
22395
|
+
return /* @__PURE__ */ jsx("div", { className: styles$k.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
|
|
22366
22396
|
InputCurrency,
|
|
22367
22397
|
{
|
|
22368
22398
|
...childProps,
|
|
@@ -22370,7 +22400,7 @@ const ReportedValue = ({
|
|
|
22370
22400
|
currency,
|
|
22371
22401
|
amount,
|
|
22372
22402
|
onAmountChanged,
|
|
22373
|
-
className: styles$
|
|
22403
|
+
className: styles$k.reportedValueInput,
|
|
22374
22404
|
"aria-label": label
|
|
22375
22405
|
}
|
|
22376
22406
|
) }) });
|
|
@@ -22551,7 +22581,7 @@ function FinancialInformation(props) {
|
|
|
22551
22581
|
],
|
|
22552
22582
|
onChange: updateReportedValueOption,
|
|
22553
22583
|
showContentOnlyOnSelected: true,
|
|
22554
|
-
className: styles$
|
|
22584
|
+
className: styles$l.financialInformationReportedValueOptions
|
|
22555
22585
|
}
|
|
22556
22586
|
)
|
|
22557
22587
|
}
|
|
@@ -22682,7 +22712,7 @@ function StateField({
|
|
|
22682
22712
|
}
|
|
22683
22713
|
);
|
|
22684
22714
|
}
|
|
22685
|
-
const logger$
|
|
22715
|
+
const logger$H = createLogger("AddressFieldContainer");
|
|
22686
22716
|
const formatAddressItem = (item) => {
|
|
22687
22717
|
if (item.description.includes("Addresses")) {
|
|
22688
22718
|
const splittedDescription = item.description.split(" - ");
|
|
@@ -22826,7 +22856,7 @@ function FieldContainer({
|
|
|
22826
22856
|
setItems([]);
|
|
22827
22857
|
}
|
|
22828
22858
|
} catch (e) {
|
|
22829
|
-
logger$
|
|
22859
|
+
logger$H.error(e);
|
|
22830
22860
|
} finally {
|
|
22831
22861
|
setSearchLoading(false);
|
|
22832
22862
|
}
|
|
@@ -22844,7 +22874,7 @@ function FieldContainer({
|
|
|
22844
22874
|
);
|
|
22845
22875
|
setItems((response == null ? void 0 : response.results) ?? []);
|
|
22846
22876
|
} catch (e) {
|
|
22847
|
-
logger$
|
|
22877
|
+
logger$H.error(e);
|
|
22848
22878
|
} finally {
|
|
22849
22879
|
setSearchLoading(false);
|
|
22850
22880
|
}
|
|
@@ -22886,7 +22916,7 @@ function FieldContainer({
|
|
|
22886
22916
|
});
|
|
22887
22917
|
}
|
|
22888
22918
|
} catch (e) {
|
|
22889
|
-
logger$
|
|
22919
|
+
logger$H.error(e);
|
|
22890
22920
|
} finally {
|
|
22891
22921
|
setFindLoading(false);
|
|
22892
22922
|
}
|
|
@@ -24883,7 +24913,7 @@ function IdDocumentManualUpload(props) {
|
|
|
24883
24913
|
}
|
|
24884
24914
|
const loaderWrapperLoader = "adyen-kyc-loader-wrapper-loader";
|
|
24885
24915
|
const loaderWrapperLoaderActive = "adyen-kyc-loader-wrapper-loader-active";
|
|
24886
|
-
const styles$
|
|
24916
|
+
const styles$j = {
|
|
24887
24917
|
loaderWrapperLoader,
|
|
24888
24918
|
loaderWrapperLoaderActive
|
|
24889
24919
|
};
|
|
@@ -24898,16 +24928,16 @@ const LoaderWrapper = ({
|
|
|
24898
24928
|
const opacitySyle = status === "loading" ? {
|
|
24899
24929
|
opacity: formOpacityWhenLoading
|
|
24900
24930
|
} : { opacity: 1 };
|
|
24901
|
-
const loaderWrapperClass = cx(styles$
|
|
24902
|
-
[styles$
|
|
24931
|
+
const loaderWrapperClass = cx(styles$j.loaderWrapperLoader, {
|
|
24932
|
+
[styles$j.loaderWrapperLoaderActive]: status === "loading" && showSpinner
|
|
24903
24933
|
});
|
|
24904
|
-
const overlayClass = cx(styles$
|
|
24934
|
+
const overlayClass = cx(styles$j.loaderWrapper, className2);
|
|
24905
24935
|
return /* @__PURE__ */ jsxs("div", { className: overlayClass, style: { position: "relative" }, children: [
|
|
24906
24936
|
/* @__PURE__ */ jsx("div", { className: loaderWrapperClass, children: /* @__PURE__ */ jsx(Loader, { size: loaderSize }) }),
|
|
24907
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
24937
|
+
/* @__PURE__ */ jsx("div", { className: styles$j.loaderWrapperForm, style: opacitySyle, children: children2 })
|
|
24908
24938
|
] });
|
|
24909
24939
|
};
|
|
24910
|
-
const logger$
|
|
24940
|
+
const logger$G = createLogger("useIdVerificationToken");
|
|
24911
24941
|
const useIdVerificationToken = ({
|
|
24912
24942
|
minimumApplicantDetails,
|
|
24913
24943
|
legalEntityId,
|
|
@@ -24921,7 +24951,7 @@ const useIdVerificationToken = ({
|
|
|
24921
24951
|
useEffect(() => {
|
|
24922
24952
|
(async () => {
|
|
24923
24953
|
if (!firstName || !lastName || !residencyCountry) {
|
|
24924
|
-
logger$
|
|
24954
|
+
logger$G.warn(
|
|
24925
24955
|
"Missing first name / last name / residencyCountry, cannot get id verification token",
|
|
24926
24956
|
minimumApplicantDetails
|
|
24927
24957
|
);
|
|
@@ -25006,7 +25036,7 @@ const initOnfido = async ({
|
|
|
25006
25036
|
language: getOnfidoLocaleConfig(i18n)
|
|
25007
25037
|
});
|
|
25008
25038
|
};
|
|
25009
|
-
const logger$
|
|
25039
|
+
const logger$F = createLogger("IdVerification");
|
|
25010
25040
|
function IdVerification({
|
|
25011
25041
|
minimumApplicantDetails,
|
|
25012
25042
|
legalEntityId,
|
|
@@ -25035,7 +25065,7 @@ function IdVerification({
|
|
|
25035
25065
|
language: getOnfidoLocaleConfig(i18n),
|
|
25036
25066
|
showMotionCapture: showIndividualMotionCapture.value
|
|
25037
25067
|
});
|
|
25038
|
-
})().catch(logger$
|
|
25068
|
+
})().catch(logger$F.error);
|
|
25039
25069
|
return async () => {
|
|
25040
25070
|
if (onfidoSdk.current) await onfidoSdk.current.tearDown();
|
|
25041
25071
|
};
|
|
@@ -25076,7 +25106,7 @@ function IdDocumentAlreadyUpload(props) {
|
|
|
25076
25106
|
] })
|
|
25077
25107
|
] });
|
|
25078
25108
|
}
|
|
25079
|
-
const logger$
|
|
25109
|
+
const logger$E = createLogger("IdDocumentInstantVerification");
|
|
25080
25110
|
function IdDocumentInstantVerification(props) {
|
|
25081
25111
|
const {
|
|
25082
25112
|
data,
|
|
@@ -25105,7 +25135,7 @@ function IdDocumentInstantVerification(props) {
|
|
|
25105
25135
|
minimumApplicantDetails,
|
|
25106
25136
|
legalEntityId,
|
|
25107
25137
|
onIdVerificationComplete: handleIdVerificationComplete,
|
|
25108
|
-
onIdVerificationError: logger$
|
|
25138
|
+
onIdVerificationError: logger$E.error
|
|
25109
25139
|
}
|
|
25110
25140
|
),
|
|
25111
25141
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-document-upload__manual-upload", children: [
|
|
@@ -25469,7 +25499,7 @@ const InputGroup = ({
|
|
|
25469
25499
|
return /* @__PURE__ */ jsx("div", { id, "data-testid": id, className: classNames, children: children2 });
|
|
25470
25500
|
};
|
|
25471
25501
|
const PHONE_FIELD = ["phoneNumber"];
|
|
25472
|
-
const logger$
|
|
25502
|
+
const logger$D = createLogger("PhoneField");
|
|
25473
25503
|
const usePhonePrefixes = () => {
|
|
25474
25504
|
const [phonePrefixes, setPhonePrefixes] = useState();
|
|
25475
25505
|
useEffect(() => {
|
|
@@ -25477,7 +25507,7 @@ const usePhonePrefixes = () => {
|
|
|
25477
25507
|
const loaded = (await import("./phonePrefixes-zV4hciyK.js")).default;
|
|
25478
25508
|
setPhonePrefixes(loaded);
|
|
25479
25509
|
};
|
|
25480
|
-
loadPhonePrefixes().catch(logger$
|
|
25510
|
+
loadPhonePrefixes().catch(logger$D.error);
|
|
25481
25511
|
}, []);
|
|
25482
25512
|
return phonePrefixes;
|
|
25483
25513
|
};
|
|
@@ -27729,7 +27759,7 @@ const individualForms = {
|
|
|
27729
27759
|
address: {
|
|
27730
27760
|
formId: "address",
|
|
27731
27761
|
formName: "address",
|
|
27732
|
-
fields:
|
|
27762
|
+
fields: addressFields
|
|
27733
27763
|
},
|
|
27734
27764
|
idVerificationMethod: {
|
|
27735
27765
|
formId: "idVerificationMethod",
|
|
@@ -28407,7 +28437,7 @@ function TrustRegistrationDetails(props) {
|
|
|
28407
28437
|
(currentData) => {
|
|
28408
28438
|
const fieldsToRemove = [];
|
|
28409
28439
|
if (!currentData.hasDoingBusinessAs) {
|
|
28410
|
-
fieldsToRemove.push("
|
|
28440
|
+
fieldsToRemove.push("doingBusinessAs");
|
|
28411
28441
|
}
|
|
28412
28442
|
return requiredFields.filter((field) => !fieldsToRemove.includes(field));
|
|
28413
28443
|
},
|
|
@@ -29433,7 +29463,7 @@ const useUnifyLoadingStatus = (setParentLoadingStatus, ...childLoadingStatuses)
|
|
|
29433
29463
|
setParentLoadingStatus(loadingStatus);
|
|
29434
29464
|
}, [...childLoadingStatuses]);
|
|
29435
29465
|
};
|
|
29436
|
-
const logger$
|
|
29466
|
+
const logger$C = createLogger("useScenarioConfiguration");
|
|
29437
29467
|
const useScenarioConfiguration = ({
|
|
29438
29468
|
getConfigurationData,
|
|
29439
29469
|
getPayoutAccountFormatData,
|
|
@@ -29456,12 +29486,12 @@ const useScenarioConfiguration = ({
|
|
|
29456
29486
|
const response = await getConfigurationData();
|
|
29457
29487
|
setConfigurationResponse(response);
|
|
29458
29488
|
} catch (err) {
|
|
29459
|
-
logger$
|
|
29489
|
+
logger$C.warn("WARNING: Configuration request failed - error:", err);
|
|
29460
29490
|
} finally {
|
|
29461
29491
|
setConfigurationLoadingStatus("success");
|
|
29462
29492
|
}
|
|
29463
29493
|
};
|
|
29464
|
-
makeConfigCallAndSave().catch(logger$
|
|
29494
|
+
makeConfigCallAndSave().catch(logger$C.error);
|
|
29465
29495
|
}, [getConfigurationData, setConfigurationLoadingStatus]);
|
|
29466
29496
|
useEffect(() => {
|
|
29467
29497
|
if (!getPayoutAccountFormatData) return;
|
|
@@ -29480,12 +29510,12 @@ const useScenarioConfiguration = ({
|
|
|
29480
29510
|
const defaultAccountFormat = defaultPayoutAccountFormat[country] ?? allowedBankAccountFormats[0];
|
|
29481
29511
|
setAccountFormat(existingBankAccountFormat ?? defaultAccountFormat);
|
|
29482
29512
|
} catch (err) {
|
|
29483
|
-
logger$
|
|
29513
|
+
logger$C.warn("WARNING: Payout format request failed - error:", err);
|
|
29484
29514
|
} finally {
|
|
29485
29515
|
setpayoutFormatLoadingStatus("success");
|
|
29486
29516
|
}
|
|
29487
29517
|
};
|
|
29488
|
-
makePayoutFormatCallAndSave().catch(logger$
|
|
29518
|
+
makePayoutFormatCallAndSave().catch(logger$C.error);
|
|
29489
29519
|
}, [
|
|
29490
29520
|
country,
|
|
29491
29521
|
setAccountFormat,
|
|
@@ -29613,6 +29643,156 @@ const identityBase = {
|
|
|
29613
29643
|
rule: "nomineeShareHolderRequiredForCountry"
|
|
29614
29644
|
}
|
|
29615
29645
|
};
|
|
29646
|
+
const identityNumber$1 = {
|
|
29647
|
+
idNumber: {
|
|
29648
|
+
rule: "idNumberRules",
|
|
29649
|
+
obscured: true
|
|
29650
|
+
},
|
|
29651
|
+
idNumberExempt: {
|
|
29652
|
+
rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
|
|
29653
|
+
},
|
|
29654
|
+
idDocumentType: {
|
|
29655
|
+
rule: "manualIdDocumentRequired"
|
|
29656
|
+
},
|
|
29657
|
+
idFrontPage: {
|
|
29658
|
+
rule: "idFrontPageIfManualUpload"
|
|
29659
|
+
},
|
|
29660
|
+
idBackPage: {
|
|
29661
|
+
rule: "backPageIfRequiredForDocumentType"
|
|
29662
|
+
},
|
|
29663
|
+
idVerificationMethod: {
|
|
29664
|
+
rule: "idVerificationRequired"
|
|
29665
|
+
},
|
|
29666
|
+
instantIdVerificationData: {
|
|
29667
|
+
rule: "instantVerificationDataRule"
|
|
29668
|
+
}
|
|
29669
|
+
};
|
|
29670
|
+
const additionalIdentityInfo$1 = {
|
|
29671
|
+
typeOfIdentity: {
|
|
29672
|
+
rules: ["requiredIfCountryUsesMultipleTypesOfIdentity", "isDirectorIdNumberRequiredForCountry"]
|
|
29673
|
+
},
|
|
29674
|
+
issuerState: {
|
|
29675
|
+
rule: "issuerStateRequired"
|
|
29676
|
+
},
|
|
29677
|
+
licenseCardNumber: {
|
|
29678
|
+
rule: "licenseCardNumberRules"
|
|
29679
|
+
},
|
|
29680
|
+
expiryDate: {
|
|
29681
|
+
rule: "expiryDateRequired"
|
|
29682
|
+
}
|
|
29683
|
+
};
|
|
29684
|
+
const idDocument = {
|
|
29685
|
+
idVerificationMethod: {
|
|
29686
|
+
rule: "REQUIRED"
|
|
29687
|
+
},
|
|
29688
|
+
idDocumentType: {
|
|
29689
|
+
rule: "REQUIRED"
|
|
29690
|
+
},
|
|
29691
|
+
idFrontPage: {
|
|
29692
|
+
rule: "idFrontPageIfManualUpload"
|
|
29693
|
+
},
|
|
29694
|
+
idBackPage: {
|
|
29695
|
+
rule: "backPageIfRequiredForDocumentType"
|
|
29696
|
+
}
|
|
29697
|
+
};
|
|
29698
|
+
const nationality$1 = {
|
|
29699
|
+
nationality: {
|
|
29700
|
+
rule: "REQUIRED"
|
|
29701
|
+
}
|
|
29702
|
+
};
|
|
29703
|
+
const phoneNumberBase$1 = {
|
|
29704
|
+
phoneNumber: {
|
|
29705
|
+
rule: "contactsIfRequiredForRole"
|
|
29706
|
+
}
|
|
29707
|
+
};
|
|
29708
|
+
const fieldsPerScenario$1 = {
|
|
29709
|
+
L0: drop("address", "birthDate").from(identityBase),
|
|
29710
|
+
L1: identityBase,
|
|
29711
|
+
L1_ID: {
|
|
29712
|
+
...identityBase,
|
|
29713
|
+
...identityNumber$1,
|
|
29714
|
+
...additionalIdentityInfo$1
|
|
29715
|
+
},
|
|
29716
|
+
L1_IDO: {
|
|
29717
|
+
// TODO: change idNumber rule to optional once optional fields are implemented
|
|
29718
|
+
...identityBase,
|
|
29719
|
+
...identityNumber$1,
|
|
29720
|
+
...additionalIdentityInfo$1
|
|
29721
|
+
},
|
|
29722
|
+
L1_NAT: {
|
|
29723
|
+
...identityBase,
|
|
29724
|
+
...identityNumber$1,
|
|
29725
|
+
...additionalIdentityInfo$1,
|
|
29726
|
+
...nationality$1
|
|
29727
|
+
},
|
|
29728
|
+
L1_IDDOC: idDocument,
|
|
29729
|
+
L_PH: phoneNumberBase$1
|
|
29730
|
+
};
|
|
29731
|
+
const identityOnfidoBase = {
|
|
29732
|
+
role: {
|
|
29733
|
+
rule: "requiredIfDecisionMakerTask"
|
|
29734
|
+
},
|
|
29735
|
+
firstName: {
|
|
29736
|
+
rule: "REQUIRED"
|
|
29737
|
+
},
|
|
29738
|
+
lastName: {
|
|
29739
|
+
rule: "REQUIRED"
|
|
29740
|
+
},
|
|
29741
|
+
birthDate: {
|
|
29742
|
+
rule: "REQUIRED"
|
|
29743
|
+
},
|
|
29744
|
+
phoneNumber: {
|
|
29745
|
+
rules: ["requiredIfPhoneScenarioDisabled", "contactsIfRequiredForRole"]
|
|
29746
|
+
},
|
|
29747
|
+
email: {
|
|
29748
|
+
rule: "contactsIfRequiredForRole"
|
|
29749
|
+
},
|
|
29750
|
+
jobTitle: {
|
|
29751
|
+
rule: "jobTitleIfRequiredForRole"
|
|
29752
|
+
},
|
|
29753
|
+
nationality: {
|
|
29754
|
+
rule: "nationalityIfRequiredForRole"
|
|
29755
|
+
},
|
|
29756
|
+
address: {
|
|
29757
|
+
rule: "addressIfRequiredForCountry"
|
|
29758
|
+
},
|
|
29759
|
+
otherAddressInformation: {
|
|
29760
|
+
rule: "otherAddressInfoIfRequiredForCountry"
|
|
29761
|
+
},
|
|
29762
|
+
country: {
|
|
29763
|
+
rule: "REQUIRED"
|
|
29764
|
+
},
|
|
29765
|
+
postalCode: {
|
|
29766
|
+
rule: "postalCodeIfRequiredForCountry"
|
|
29767
|
+
},
|
|
29768
|
+
city: {
|
|
29769
|
+
rule: "cityIfRequiredForCountry"
|
|
29770
|
+
},
|
|
29771
|
+
stateOrProvince: {
|
|
29772
|
+
rule: "stateOrProvinceIfRequiredForCountry"
|
|
29773
|
+
},
|
|
29774
|
+
residencyCountry: {
|
|
29775
|
+
rule: "REQUIRED"
|
|
29776
|
+
},
|
|
29777
|
+
proofOfResidency: {
|
|
29778
|
+
rule: "isProofOfResidencyRequired"
|
|
29779
|
+
},
|
|
29780
|
+
proofOfNationalId: {
|
|
29781
|
+
rule: "isProofOfNationalIdRequired"
|
|
29782
|
+
},
|
|
29783
|
+
relationship: {
|
|
29784
|
+
rule: "legalRepresentativeRelationshipRequired"
|
|
29785
|
+
},
|
|
29786
|
+
proofOfRelationship: {
|
|
29787
|
+
rule: "isProofOfRelationshipRequired"
|
|
29788
|
+
},
|
|
29789
|
+
nomineeDirector: {
|
|
29790
|
+
rule: "nomineeDirectorRequiredForCountry"
|
|
29791
|
+
},
|
|
29792
|
+
nomineeShareholder: {
|
|
29793
|
+
rule: "nomineeShareHolderRequiredForCountry"
|
|
29794
|
+
}
|
|
29795
|
+
};
|
|
29616
29796
|
const identityNumber = {
|
|
29617
29797
|
idNumber: {
|
|
29618
29798
|
rule: "idNumberRules",
|
|
@@ -29622,7 +29802,7 @@ const identityNumber = {
|
|
|
29622
29802
|
rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
|
|
29623
29803
|
},
|
|
29624
29804
|
idDocumentType: {
|
|
29625
|
-
rule: "
|
|
29805
|
+
rule: "manualIdDocumentRequired"
|
|
29626
29806
|
},
|
|
29627
29807
|
idFrontPage: {
|
|
29628
29808
|
rule: "idFrontPageIfManualUpload"
|
|
@@ -29631,10 +29811,9 @@ const identityNumber = {
|
|
|
29631
29811
|
rule: "backPageIfRequiredForDocumentType"
|
|
29632
29812
|
},
|
|
29633
29813
|
idVerificationMethod: {
|
|
29634
|
-
rule: "
|
|
29814
|
+
rule: "idVerificationRequired"
|
|
29635
29815
|
},
|
|
29636
29816
|
idDocument: {
|
|
29637
|
-
// TODO revisit this when we add support for manual ID upload
|
|
29638
29817
|
rule: "isUsingInstantVerification"
|
|
29639
29818
|
}
|
|
29640
29819
|
};
|
|
@@ -29652,7 +29831,7 @@ const additionalIdentityInfo = {
|
|
|
29652
29831
|
rule: "expiryDateRequired"
|
|
29653
29832
|
}
|
|
29654
29833
|
};
|
|
29655
|
-
const
|
|
29834
|
+
const idDocRequired = {
|
|
29656
29835
|
idVerificationMethod: {
|
|
29657
29836
|
rule: "REQUIRED"
|
|
29658
29837
|
},
|
|
@@ -29676,27 +29855,27 @@ const phoneNumberBase = {
|
|
|
29676
29855
|
rule: "contactsIfRequiredForRole"
|
|
29677
29856
|
}
|
|
29678
29857
|
};
|
|
29679
|
-
const
|
|
29680
|
-
L0: drop("address", "birthDate").from(
|
|
29681
|
-
L1:
|
|
29858
|
+
const individualOnfidoFieldsPerScenario = {
|
|
29859
|
+
L0: drop("address", "birthDate").from(identityOnfidoBase),
|
|
29860
|
+
L1: identityOnfidoBase,
|
|
29682
29861
|
L1_ID: {
|
|
29683
|
-
...
|
|
29862
|
+
...identityOnfidoBase,
|
|
29684
29863
|
...identityNumber,
|
|
29685
29864
|
...additionalIdentityInfo
|
|
29686
29865
|
},
|
|
29687
29866
|
L1_IDO: {
|
|
29688
29867
|
// TODO: change idNumber rule to optional once optional fields are implemented
|
|
29689
|
-
...
|
|
29868
|
+
...identityOnfidoBase,
|
|
29690
29869
|
...identityNumber,
|
|
29691
29870
|
...additionalIdentityInfo
|
|
29692
29871
|
},
|
|
29693
29872
|
L1_NAT: {
|
|
29694
|
-
...
|
|
29873
|
+
...identityOnfidoBase,
|
|
29695
29874
|
...identityNumber,
|
|
29696
29875
|
...additionalIdentityInfo,
|
|
29697
29876
|
...nationality
|
|
29698
29877
|
},
|
|
29699
|
-
L1_IDDOC:
|
|
29878
|
+
L1_IDDOC: idDocRequired,
|
|
29700
29879
|
L_PH: phoneNumberBase
|
|
29701
29880
|
};
|
|
29702
29881
|
const solePropBase = {
|
|
@@ -29792,6 +29971,13 @@ const parseIndividualScenarios = (scenario) => scenario == null ? void 0 : scena
|
|
|
29792
29971
|
(scenarios, scenarioName) => ({ ...scenarios, ...fieldsPerScenario$1[scenarioName] }),
|
|
29793
29972
|
{}
|
|
29794
29973
|
);
|
|
29974
|
+
const parseIndividualOnfidoScenarios = (scenario) => scenario == null ? void 0 : scenario.reduce(
|
|
29975
|
+
(scenarios, scenarioName) => ({
|
|
29976
|
+
...scenarios,
|
|
29977
|
+
...individualOnfidoFieldsPerScenario[scenarioName]
|
|
29978
|
+
}),
|
|
29979
|
+
{}
|
|
29980
|
+
);
|
|
29795
29981
|
function parseBusinessDetailsScenarios(scenario, country) {
|
|
29796
29982
|
if (scenario) {
|
|
29797
29983
|
let fieldConfigurations = scenario.reduce(
|
|
@@ -30181,10 +30367,10 @@ const MaybeModal = ({ children: children2, inline = false, onClose }) => {
|
|
|
30181
30367
|
return inline ? /* @__PURE__ */ jsx(Fragment, { children: children2 }) : /* @__PURE__ */ jsx(Modal, { onClose, children: /* @__PURE__ */ jsx(ToastContextProvider, { children: children2 }) });
|
|
30182
30368
|
};
|
|
30183
30369
|
const spacer = "adyen-kyc-spacer";
|
|
30184
|
-
const styles$
|
|
30370
|
+
const styles$i = {
|
|
30185
30371
|
spacer
|
|
30186
30372
|
};
|
|
30187
|
-
const Spacer = () => /* @__PURE__ */ jsx("div", { className: styles$
|
|
30373
|
+
const Spacer = () => /* @__PURE__ */ jsx("div", { className: styles$i.spacer });
|
|
30188
30374
|
const range = (stop, start = 0, step = 1) => Array.from({ length: (stop - start) / step + 1 }, (_, i) => start + i * step);
|
|
30189
30375
|
const progressBar = "adyen-kyc-progress-bar";
|
|
30190
30376
|
const progressBarThick = "adyen-kyc-progress-bar-thick";
|
|
@@ -30192,7 +30378,7 @@ const progressStep = "adyen-kyc-progress-step";
|
|
|
30192
30378
|
const progressStepActive = "adyen-kyc-progress-step-active";
|
|
30193
30379
|
const progressStepLabel = "adyen-kyc-progress-step-label";
|
|
30194
30380
|
const progressBarCircles = "adyen-kyc-progress-bar-circles";
|
|
30195
|
-
const styles$
|
|
30381
|
+
const styles$h = {
|
|
30196
30382
|
progressBar,
|
|
30197
30383
|
progressBarThick,
|
|
30198
30384
|
progressStep,
|
|
@@ -30218,14 +30404,14 @@ const StepProgressIndicator = ({
|
|
|
30218
30404
|
"div",
|
|
30219
30405
|
{
|
|
30220
30406
|
"aria-label": `Step ${activeStepIndex} of ${stepsCount}`,
|
|
30221
|
-
className: styles$
|
|
30407
|
+
className: styles$h.progress,
|
|
30222
30408
|
role: "group",
|
|
30223
30409
|
children: /* @__PURE__ */ jsx(
|
|
30224
30410
|
"ol",
|
|
30225
30411
|
{
|
|
30226
|
-
className: cx(styles$
|
|
30227
|
-
[styles$
|
|
30228
|
-
[styles$
|
|
30412
|
+
className: cx(styles$h.progressBar, {
|
|
30413
|
+
[styles$h.progressBarThick]: thick,
|
|
30414
|
+
[styles$h.progressBarCircles]: circles
|
|
30229
30415
|
}),
|
|
30230
30416
|
children: range(stepsCount).map((stepNumber) => {
|
|
30231
30417
|
const isHighlighted = shouldHighlight(activeStepIndex, stepNumber, fillBefore);
|
|
@@ -30233,10 +30419,10 @@ const StepProgressIndicator = ({
|
|
|
30233
30419
|
"li",
|
|
30234
30420
|
{
|
|
30235
30421
|
"aria-current": isHighlighted ? "step" : void 0,
|
|
30236
|
-
className: cx(styles$
|
|
30237
|
-
[styles$
|
|
30422
|
+
className: cx(styles$h.progressStep, {
|
|
30423
|
+
[styles$h.progressStepActive]: isHighlighted
|
|
30238
30424
|
}),
|
|
30239
|
-
children: /* @__PURE__ */ jsx("span", { className: styles$
|
|
30425
|
+
children: /* @__PURE__ */ jsx("span", { className: styles$h.progressStepLabel, children: `Step ${stepNumber}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}` })
|
|
30240
30426
|
},
|
|
30241
30427
|
stepNumber
|
|
30242
30428
|
);
|
|
@@ -30347,7 +30533,7 @@ const useExpiryThreshold = (expiry) => {
|
|
|
30347
30533
|
return { expiryStatus: "notYetCloseToExpiry", secondsUntilExpiry: void 0 };
|
|
30348
30534
|
};
|
|
30349
30535
|
const ExpiryContext = createContext$1(false);
|
|
30350
|
-
const logger$
|
|
30536
|
+
const logger$B = createLogger("ExpiryProvider");
|
|
30351
30537
|
const ExpiryProvider = ({
|
|
30352
30538
|
expiry: initialExpiry,
|
|
30353
30539
|
eventEmitter,
|
|
@@ -30376,7 +30562,7 @@ const ExpiryProvider = ({
|
|
|
30376
30562
|
refreshExpiry().then((newExpiry) => {
|
|
30377
30563
|
setExpiry(newExpiry);
|
|
30378
30564
|
setModalDismissed(false);
|
|
30379
|
-
}).catch(logger$
|
|
30565
|
+
}).catch(logger$B.error);
|
|
30380
30566
|
}
|
|
30381
30567
|
}
|
|
30382
30568
|
),
|
|
@@ -30398,7 +30584,7 @@ const ExpiryProvider = ({
|
|
|
30398
30584
|
return /* @__PURE__ */ jsx(ExpiryContext.Provider, { value: expiryStatus === "expired", children: children2 });
|
|
30399
30585
|
};
|
|
30400
30586
|
const useHasExpired = () => useContext$1(ExpiryContext);
|
|
30401
|
-
const logger$
|
|
30587
|
+
const logger$A = createLogger("FormRouterContextProvider");
|
|
30402
30588
|
function FormRouterContextProvider({
|
|
30403
30589
|
children: children2,
|
|
30404
30590
|
forms,
|
|
@@ -30421,7 +30607,7 @@ function FormRouterContextProvider({
|
|
|
30421
30607
|
if (formIndex > -1) {
|
|
30422
30608
|
setFormIndex(formIndex);
|
|
30423
30609
|
} else {
|
|
30424
|
-
logger$
|
|
30610
|
+
logger$A.error("No form was found to have that field so form navigation failed.");
|
|
30425
30611
|
}
|
|
30426
30612
|
}
|
|
30427
30613
|
}),
|
|
@@ -30474,7 +30660,7 @@ function FormNavigation({
|
|
|
30474
30660
|
gotoForm,
|
|
30475
30661
|
validateForm,
|
|
30476
30662
|
className: className2,
|
|
30477
|
-
taskName
|
|
30663
|
+
taskName,
|
|
30478
30664
|
verificationErrors,
|
|
30479
30665
|
trackNavigation: trackNavigation2 = noop$2
|
|
30480
30666
|
}) {
|
|
@@ -30507,13 +30693,13 @@ function FormNavigation({
|
|
|
30507
30693
|
};
|
|
30508
30694
|
};
|
|
30509
30695
|
return /* @__PURE__ */ jsxs("div", { className: cx("adyen-kyc-form-navigation", className2), children: [
|
|
30510
|
-
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-navigation__header", children: i18n.get(
|
|
30696
|
+
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-navigation__header", children: i18n.get(taskName) }),
|
|
30511
30697
|
/* @__PURE__ */ jsxs("ul", { className: "adyen-kyc-form-navigation__items", children: [
|
|
30512
30698
|
forms && /* @__PURE__ */ jsx("li", { className: "adyen-kyc-form-navigation__home-button-item", children: /* @__PURE__ */ jsx("span", { className: "adyen-kyc-form-navigation__step-count", children: i18n.get("stepsX/YofForm", {
|
|
30513
30699
|
values: {
|
|
30514
30700
|
activeFormIndex: getFormIndex(activeForm) + 1,
|
|
30515
30701
|
totalForms: forms.length,
|
|
30516
|
-
taskNameTranslated: i18n.get(
|
|
30702
|
+
taskNameTranslated: i18n.get(taskName)
|
|
30517
30703
|
}
|
|
30518
30704
|
}) }) }),
|
|
30519
30705
|
forms.map((form) => /* @__PURE__ */ jsx(
|
|
@@ -30532,7 +30718,7 @@ function FormNavigation({
|
|
|
30532
30718
|
const FormWrapper = ({
|
|
30533
30719
|
asModal = false,
|
|
30534
30720
|
summary: summary2,
|
|
30535
|
-
taskName
|
|
30721
|
+
taskName,
|
|
30536
30722
|
children: children2,
|
|
30537
30723
|
handleNextClick,
|
|
30538
30724
|
handleBackClick,
|
|
@@ -30563,13 +30749,13 @@ const FormWrapper = ({
|
|
|
30563
30749
|
finishLater: "finishLater"
|
|
30564
30750
|
};
|
|
30565
30751
|
const showLegalCaption = ["solePropDetails", "companyDetails", "businessDetails"].includes(
|
|
30566
|
-
|
|
30752
|
+
taskName
|
|
30567
30753
|
);
|
|
30568
30754
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
30569
30755
|
const showExtraTaxExemptionReasons = isExperimentEnabled(
|
|
30570
30756
|
ExperimentNames.ShowExtraTaxExemptionReasons
|
|
30571
30757
|
);
|
|
30572
|
-
const showTaxExemptedLegalCaption = showExtraTaxExemptionReasons && ((_a2 = summaryData == null ? void 0 : summaryData.companyRegistrationDetails) == null ? void 0 : _a2.vatAbsenceReason) && ["companyDetails", "businessDetails"].includes(
|
|
30758
|
+
const showTaxExemptedLegalCaption = showExtraTaxExemptionReasons && ((_a2 = summaryData == null ? void 0 : summaryData.companyRegistrationDetails) == null ? void 0 : _a2.vatAbsenceReason) && ["companyDetails", "businessDetails"].includes(taskName);
|
|
30573
30759
|
const handleTrackNavigation = useCallback(
|
|
30574
30760
|
(props) => {
|
|
30575
30761
|
trackNavigation({
|
|
@@ -30623,7 +30809,7 @@ const FormWrapper = ({
|
|
|
30623
30809
|
activeForm,
|
|
30624
30810
|
gotoForm: gotoFormByFormIndex,
|
|
30625
30811
|
validateForm,
|
|
30626
|
-
taskName
|
|
30812
|
+
taskName,
|
|
30627
30813
|
trackNavigation: handleTrackNavigation,
|
|
30628
30814
|
verificationErrors: problems == null ? void 0 : problems.verificationErrors
|
|
30629
30815
|
}
|
|
@@ -30830,7 +31016,7 @@ function PayoutDetailsDropin({
|
|
|
30830
31016
|
asModal = false,
|
|
30831
31017
|
handleCloseClick,
|
|
30832
31018
|
taskType: propTaskType,
|
|
30833
|
-
taskName
|
|
31019
|
+
taskName,
|
|
30834
31020
|
capabilities,
|
|
30835
31021
|
handleHomeClick,
|
|
30836
31022
|
refreshTransferInstrument,
|
|
@@ -31183,7 +31369,7 @@ function PayoutDetailsDropin({
|
|
|
31183
31369
|
return /* @__PURE__ */ jsx(
|
|
31184
31370
|
FormWrapper,
|
|
31185
31371
|
{
|
|
31186
|
-
taskName:
|
|
31372
|
+
taskName: taskName ?? "bankAccountDetails",
|
|
31187
31373
|
activeForm,
|
|
31188
31374
|
summary: {
|
|
31189
31375
|
data: formatDataForSummary2(),
|
|
@@ -31416,7 +31602,13 @@ const rules$1 = ({
|
|
|
31416
31602
|
return REQUIRED$1;
|
|
31417
31603
|
}
|
|
31418
31604
|
},
|
|
31419
|
-
|
|
31605
|
+
manualIdDocumentRequired: () => {
|
|
31606
|
+
var _a2;
|
|
31607
|
+
if (((_a2 = data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification") {
|
|
31608
|
+
return REQUIRED$1;
|
|
31609
|
+
}
|
|
31610
|
+
},
|
|
31611
|
+
idVerificationRequired: () => {
|
|
31420
31612
|
var _a2;
|
|
31421
31613
|
if ((_a2 = data.personalDetails) == null ? void 0 : _a2.idNumberExempt) {
|
|
31422
31614
|
return REQUIRED$1;
|
|
@@ -31830,7 +32022,7 @@ const structuredListSectionField = "adyen-kyc-structured-list-section-field";
|
|
|
31830
32022
|
const structuredListSectionLabel = "adyen-kyc-structured-list-section-label";
|
|
31831
32023
|
const structuredListSectionData = "adyen-kyc-structured-list-section-data";
|
|
31832
32024
|
const structuredListSectionDetail = "adyen-kyc-structured-list-section-detail";
|
|
31833
|
-
const styles$
|
|
32025
|
+
const styles$g = {
|
|
31834
32026
|
structuredList,
|
|
31835
32027
|
structuredListSectionField,
|
|
31836
32028
|
structuredListSectionLabel,
|
|
@@ -31842,11 +32034,11 @@ const StructuredList = ({
|
|
|
31842
32034
|
detailsGroupClassName,
|
|
31843
32035
|
items
|
|
31844
32036
|
}) => {
|
|
31845
|
-
const structuredListClassNames = cx(styles$
|
|
31846
|
-
const detailsGroupClassNames = cx(styles$
|
|
31847
|
-
return /* @__PURE__ */ jsx("dl", { className: structuredListClassNames, children: items.map(({ term, details }, index) => /* @__PURE__ */ jsxs("div", { className: styles$
|
|
31848
|
-
/* @__PURE__ */ jsx("dt", { className: styles$
|
|
31849
|
-
Array.isArray(details) ? /* @__PURE__ */ jsx("div", { className: detailsGroupClassNames, children: details.map((detail, index2) => /* @__PURE__ */ jsx("dd", { className: styles$
|
|
32037
|
+
const structuredListClassNames = cx(styles$g.structuredList, className2);
|
|
32038
|
+
const detailsGroupClassNames = cx(styles$g.structuredListSectionData, detailsGroupClassName);
|
|
32039
|
+
return /* @__PURE__ */ jsx("dl", { className: structuredListClassNames, children: items.map(({ term, details }, index) => /* @__PURE__ */ jsxs("div", { className: styles$g.structuredListSectionField, children: [
|
|
32040
|
+
/* @__PURE__ */ jsx("dt", { className: styles$g.structuredListSectionLabel, children: term }),
|
|
32041
|
+
Array.isArray(details) ? /* @__PURE__ */ jsx("div", { className: detailsGroupClassNames, children: details.map((detail, index2) => /* @__PURE__ */ jsx("dd", { className: styles$g.structuredListSectionDetail, children: detail }, index2)) }) : /* @__PURE__ */ jsx("dd", { className: detailsGroupClassNames, children: details })
|
|
31850
32042
|
] }, index)) });
|
|
31851
32043
|
};
|
|
31852
32044
|
function VerifiedBusinessCard({
|
|
@@ -32740,7 +32932,7 @@ function BusinessInformationCard({
|
|
|
32740
32932
|
}
|
|
32741
32933
|
);
|
|
32742
32934
|
}
|
|
32743
|
-
const logger$
|
|
32935
|
+
const logger$z = createLogger("BusinessSelection");
|
|
32744
32936
|
function BusinessSelection({
|
|
32745
32937
|
showCompanyStructure,
|
|
32746
32938
|
searching,
|
|
@@ -32792,7 +32984,7 @@ function BusinessSelection({
|
|
|
32792
32984
|
setCurrentBusinessSelection(businessData);
|
|
32793
32985
|
}
|
|
32794
32986
|
} catch (e) {
|
|
32795
|
-
logger$
|
|
32987
|
+
logger$z.error(e);
|
|
32796
32988
|
}
|
|
32797
32989
|
},
|
|
32798
32990
|
[basicInformation == null ? void 0 : basicInformation.stateOrProvince, fetchBusinessData, fetching, selectedBusinessId]
|
|
@@ -32806,7 +32998,7 @@ function BusinessSelection({
|
|
|
32806
32998
|
handleNextClick == null ? void 0 : handleNextClick();
|
|
32807
32999
|
}
|
|
32808
33000
|
} catch (e) {
|
|
32809
|
-
logger$
|
|
33001
|
+
logger$z.error(e);
|
|
32810
33002
|
}
|
|
32811
33003
|
},
|
|
32812
33004
|
[currentTin, handleNextClick, handleBusinessVerification]
|
|
@@ -32905,7 +33097,7 @@ function BasicInformation({
|
|
|
32905
33097
|
resetTinVerification,
|
|
32906
33098
|
disableCountry
|
|
32907
33099
|
}) {
|
|
32908
|
-
var _a2, _b2, _c2
|
|
33100
|
+
var _a2, _b2, _c2;
|
|
32909
33101
|
const { updateStateSlice, sliceData } = useGlobalDataSlice(BASIC_INFORMATION_FORM_ID);
|
|
32910
33102
|
const { i18n } = useI18nContext();
|
|
32911
33103
|
const { isSettingEnabled } = useSettingsContext();
|
|
@@ -32971,7 +33163,7 @@ function BasicInformation({
|
|
|
32971
33163
|
const defaultRegistrationNumberType = (data == null ? void 0 : data.registrationNumber) ? inferCompanyRegistrationNumberType(data == null ? void 0 : data.registrationNumber, country, companyType) : (_a2 = registrationNumberOptions == null ? void 0 : registrationNumberOptions[0]) == null ? void 0 : _a2.id;
|
|
32972
33164
|
const [registrationNumberType, setRegistrationNumberType] = useState(defaultRegistrationNumberType);
|
|
32973
33165
|
const existingTaxId = (_c2 = (_b2 = data == null ? void 0 : data.taxInformation) == null ? void 0 : _b2.find((taxId) => taxId.country === country)) == null ? void 0 : _c2.number;
|
|
32974
|
-
const defaultTaxIdNumberType = existingTaxId ? inferTaxIdNumberType(existingTaxId, country) :
|
|
33166
|
+
const defaultTaxIdNumberType = existingTaxId ? inferTaxIdNumberType(existingTaxId, country) : void 0;
|
|
32975
33167
|
const [taxIdNumberType, setTaxIdNumberType] = useState(
|
|
32976
33168
|
defaultTaxIdNumberType
|
|
32977
33169
|
);
|
|
@@ -33835,7 +34027,7 @@ function BusinessDetails(props) {
|
|
|
33835
34027
|
const businessVerificationModalHeader = "adyen-kyc-business-verification-modal-header";
|
|
33836
34028
|
const businessVerificationModalContent = "adyen-kyc-business-verification-modal-content";
|
|
33837
34029
|
const businessVerificationModalActions = "adyen-kyc-business-verification-modal-actions";
|
|
33838
|
-
const styles$
|
|
34030
|
+
const styles$f = {
|
|
33839
34031
|
businessVerificationModalHeader,
|
|
33840
34032
|
businessVerificationModalContent,
|
|
33841
34033
|
businessVerificationModalActions
|
|
@@ -33844,10 +34036,10 @@ const BusinessMismatchModal = ({ onContinue, onBackClick }) => {
|
|
|
33844
34036
|
const { i18n } = useI18nContext();
|
|
33845
34037
|
return /* @__PURE__ */ jsxs(Modal, { size: "small", onClose: () => {
|
|
33846
34038
|
}, showCloseButton: false, children: [
|
|
33847
|
-
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(Typography, { variant: "title", el: "h3", className: styles$
|
|
34039
|
+
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(Typography, { variant: "title", el: "h3", className: styles$f.businessVerificationModalHeader, children: i18n.get("businessSelection__tinVerificationFailureModalHeader") }) }),
|
|
33848
34040
|
/* @__PURE__ */ jsxs(ModalContent, { children: [
|
|
33849
|
-
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", className: styles$
|
|
33850
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
34041
|
+
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", className: styles$f.businessVerificationModalContent, children: i18n.get("businessSelection__tinVerificationFailureModalContent") }),
|
|
34042
|
+
/* @__PURE__ */ jsxs("div", { className: styles$f.businessVerificationModalActions, children: [
|
|
33851
34043
|
/* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onContinue, children: i18n.get("businessSelection__tinVerificationFailureModalPrimaryButton") }),
|
|
33852
34044
|
/* @__PURE__ */ jsx(Button, { onClick: onBackClick, children: i18n.get("businessSelection__tinVerificationFailureModalSecondaryButton") })
|
|
33853
34045
|
] })
|
|
@@ -33878,7 +34070,7 @@ const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [
|
|
|
33878
34070
|
StateCodesUS.California,
|
|
33879
34071
|
StateCodesUS.Texas
|
|
33880
34072
|
];
|
|
33881
|
-
const logger$
|
|
34073
|
+
const logger$y = createLogger("useBusinessData");
|
|
33882
34074
|
function useBusinessData({
|
|
33883
34075
|
handleCompanyIndexSearch,
|
|
33884
34076
|
handleCompanyDeepSearch,
|
|
@@ -33915,7 +34107,7 @@ function useBusinessData({
|
|
|
33915
34107
|
const searchByRegistrationNumber = useCallback(
|
|
33916
34108
|
async (data) => {
|
|
33917
34109
|
if (!handleCompanyRegistrationNumberDeepSearch || !handleCompanyRegistrationNumberIndexSearch) {
|
|
33918
|
-
logger$
|
|
34110
|
+
logger$y.error("Missing handlers for searchByRegistrationNumber");
|
|
33919
34111
|
return;
|
|
33920
34112
|
}
|
|
33921
34113
|
const requestPayload = {
|
|
@@ -33935,7 +34127,7 @@ function useBusinessData({
|
|
|
33935
34127
|
const searchByCompanyName = useCallback(
|
|
33936
34128
|
async (data) => {
|
|
33937
34129
|
if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
|
|
33938
|
-
logger$
|
|
34130
|
+
logger$y.error("Missing handlers for searchByCompanyName");
|
|
33939
34131
|
return;
|
|
33940
34132
|
}
|
|
33941
34133
|
return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await handleCompanyIndexSearch({
|
|
@@ -33979,7 +34171,7 @@ function useBusinessData({
|
|
|
33979
34171
|
return (response == null ? void 0 : response.results) || [];
|
|
33980
34172
|
} catch (e) {
|
|
33981
34173
|
setSearching("error");
|
|
33982
|
-
logger$
|
|
34174
|
+
logger$y.error(e);
|
|
33983
34175
|
} finally {
|
|
33984
34176
|
setCachedSearch(data);
|
|
33985
34177
|
setSearching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
@@ -33990,7 +34182,7 @@ function useBusinessData({
|
|
|
33990
34182
|
const fetchBusinessData = useCallback(
|
|
33991
34183
|
async (company, state) => {
|
|
33992
34184
|
if (!handleGetCompanyDataset || !handleRefreshCompanyDataset) {
|
|
33993
|
-
logger$
|
|
34185
|
+
logger$y.error("Missing handlers for fetchBusinessData");
|
|
33994
34186
|
return;
|
|
33995
34187
|
}
|
|
33996
34188
|
const date = (/* @__PURE__ */ new Date()).toDateString();
|
|
@@ -34019,7 +34211,7 @@ function useBusinessData({
|
|
|
34019
34211
|
});
|
|
34020
34212
|
} catch (e) {
|
|
34021
34213
|
setFetching("error");
|
|
34022
|
-
logger$
|
|
34214
|
+
logger$y.error(e);
|
|
34023
34215
|
} finally {
|
|
34024
34216
|
setFetching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
34025
34217
|
}
|
|
@@ -34029,7 +34221,7 @@ function useBusinessData({
|
|
|
34029
34221
|
const verifyTin2 = useCallback(
|
|
34030
34222
|
async (data, tin) => {
|
|
34031
34223
|
if (!handleVerifyTin) {
|
|
34032
|
-
logger$
|
|
34224
|
+
logger$y.log("Missing handlers for verifyTin");
|
|
34033
34225
|
return;
|
|
34034
34226
|
}
|
|
34035
34227
|
const name = typeof data === "string" ? data : data.name;
|
|
@@ -34046,7 +34238,7 @@ function useBusinessData({
|
|
|
34046
34238
|
return matched;
|
|
34047
34239
|
} catch (e) {
|
|
34048
34240
|
setVerifying("error");
|
|
34049
|
-
logger$
|
|
34241
|
+
logger$y.error(e);
|
|
34050
34242
|
} finally {
|
|
34051
34243
|
setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
34052
34244
|
}
|
|
@@ -34059,7 +34251,7 @@ function useBusinessData({
|
|
|
34059
34251
|
await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
|
|
34060
34252
|
} catch (e) {
|
|
34061
34253
|
setResettingTrustedData("error");
|
|
34062
|
-
logger$
|
|
34254
|
+
logger$y.error(e);
|
|
34063
34255
|
} finally {
|
|
34064
34256
|
setResettingTrustedData((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
34065
34257
|
}
|
|
@@ -34614,7 +34806,7 @@ function BusinessDetailsDropin({
|
|
|
34614
34806
|
nestedLegalEntityDetails,
|
|
34615
34807
|
// has entity roles for association logic
|
|
34616
34808
|
capabilities,
|
|
34617
|
-
taskName
|
|
34809
|
+
taskName,
|
|
34618
34810
|
hideSidebar,
|
|
34619
34811
|
taskType,
|
|
34620
34812
|
onChange,
|
|
@@ -35168,7 +35360,7 @@ function BusinessDetailsDropin({
|
|
|
35168
35360
|
return /* @__PURE__ */ jsxs(
|
|
35169
35361
|
FormWrapper,
|
|
35170
35362
|
{
|
|
35171
|
-
taskName:
|
|
35363
|
+
taskName: taskName ?? "businessDetails",
|
|
35172
35364
|
gotoFormByFormIndex: goToForm,
|
|
35173
35365
|
hideSidebar,
|
|
35174
35366
|
hideFooter,
|
|
@@ -35275,7 +35467,7 @@ function CompanyDropin({
|
|
|
35275
35467
|
country: parentCountry,
|
|
35276
35468
|
problems: propProblems,
|
|
35277
35469
|
hideSidebar,
|
|
35278
|
-
taskName
|
|
35470
|
+
taskName,
|
|
35279
35471
|
capabilities,
|
|
35280
35472
|
taskType = TaskTypes.COMPANY,
|
|
35281
35473
|
associationDetail,
|
|
@@ -35620,7 +35812,7 @@ function CompanyDropin({
|
|
|
35620
35812
|
return /* @__PURE__ */ jsx(
|
|
35621
35813
|
FormWrapper,
|
|
35622
35814
|
{
|
|
35623
|
-
taskName
|
|
35815
|
+
taskName,
|
|
35624
35816
|
handleNextClick,
|
|
35625
35817
|
gotoFormByFormIndex,
|
|
35626
35818
|
handleHomeClick,
|
|
@@ -35663,10 +35855,10 @@ function CompanyDropin({
|
|
|
35663
35855
|
);
|
|
35664
35856
|
}
|
|
35665
35857
|
const outlinedIcon = "adyen-kyc-outlined-icon";
|
|
35666
|
-
const styles$
|
|
35858
|
+
const styles$e = {
|
|
35667
35859
|
outlinedIcon
|
|
35668
35860
|
};
|
|
35669
|
-
const OutlinedIcon = ({ name }) => /* @__PURE__ */ jsx("div", { className: styles$
|
|
35861
|
+
const OutlinedIcon = ({ name }) => /* @__PURE__ */ jsx("div", { className: styles$e.outlinedIcon, children: /* @__PURE__ */ jsx(Icon, { name }) });
|
|
35670
35862
|
const FormEndState = ({ variant = "success", children: children2, className: className2 }) => {
|
|
35671
35863
|
const Slot = defineSlots(children2, ["title", "content", "icon", "actions"]);
|
|
35672
35864
|
return /* @__PURE__ */ jsxs(
|
|
@@ -35935,7 +36127,7 @@ const sourceOfFundsUploadModalContentField = "adyen-kyc-source-of-funds-upload-m
|
|
|
35935
36127
|
const sourceOfFundsUploadModalContentFieldRadioGroup = "adyen-kyc-source-of-funds-upload-modal-content-field-radio-group";
|
|
35936
36128
|
const sourceOfFundsUploadModalContentRequirementsContainer = "adyen-kyc-source-of-funds-upload-modal-content-requirements-container";
|
|
35937
36129
|
const sourceOfFundsUploadListHeading = "adyen-kyc-source-of-funds-upload-list-heading";
|
|
35938
|
-
const styles$
|
|
36130
|
+
const styles$d = {
|
|
35939
36131
|
sourceOfFunds,
|
|
35940
36132
|
sourceOfFundsWrapperLoading,
|
|
35941
36133
|
sourceOfFundsWrapperHeading,
|
|
@@ -36691,7 +36883,7 @@ function AdditionalDataForAssetSale(props) {
|
|
|
36691
36883
|
handleAmountChange("amount");
|
|
36692
36884
|
};
|
|
36693
36885
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36694
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
36886
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsGridContainer, children: [
|
|
36695
36887
|
/* @__PURE__ */ jsx(
|
|
36696
36888
|
Field,
|
|
36697
36889
|
{
|
|
@@ -36922,7 +37114,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
36922
37114
|
Field,
|
|
36923
37115
|
{
|
|
36924
37116
|
name: "originatorType",
|
|
36925
|
-
className: styles$
|
|
37117
|
+
className: styles$d.sourceOfFundsUploadModalContentField,
|
|
36926
37118
|
label: i18n.get(
|
|
36927
37119
|
isDonations ? "whereDidThisGiftOrDonationComeFrom" : "whereDidThisInheritanceComeFrom"
|
|
36928
37120
|
),
|
|
@@ -36933,7 +37125,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
36933
37125
|
{
|
|
36934
37126
|
...childProps,
|
|
36935
37127
|
name: "originatorType",
|
|
36936
|
-
className: styles$
|
|
37128
|
+
className: styles$d.sourceOfFundsUploadModalContentFieldRadioGroup,
|
|
36937
37129
|
items: radioItems,
|
|
36938
37130
|
value: data.originatorType,
|
|
36939
37131
|
disabled: false,
|
|
@@ -37092,7 +37284,7 @@ function AdditionalDataForDonation(props) {
|
|
|
37092
37284
|
sourceOfFundsType: "donations"
|
|
37093
37285
|
}
|
|
37094
37286
|
),
|
|
37095
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
37287
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsGridContainer, children: [
|
|
37096
37288
|
/* @__PURE__ */ jsx(
|
|
37097
37289
|
Field,
|
|
37098
37290
|
{
|
|
@@ -37287,7 +37479,7 @@ function AdditionalDataForInheritance(props) {
|
|
|
37287
37479
|
sourceOfFundsType: "inheritance"
|
|
37288
37480
|
}
|
|
37289
37481
|
),
|
|
37290
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
37482
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsGridContainer, children: [
|
|
37291
37483
|
/* @__PURE__ */ jsx(
|
|
37292
37484
|
Field,
|
|
37293
37485
|
{
|
|
@@ -37487,21 +37679,21 @@ const SOFFinancierModal = (props) => {
|
|
|
37487
37679
|
{
|
|
37488
37680
|
variant: "title-l",
|
|
37489
37681
|
el: "h3",
|
|
37490
|
-
className: styles$
|
|
37682
|
+
className: styles$d.sourceOfFundsGettingStartedHelpHeader,
|
|
37491
37683
|
children: i18n.get("investorDetails")
|
|
37492
37684
|
}
|
|
37493
37685
|
) }),
|
|
37494
|
-
/* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
37686
|
+
/* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsSofFinancierForm, children: [
|
|
37495
37687
|
errorMessage && /* @__PURE__ */ jsx(
|
|
37496
37688
|
Alert,
|
|
37497
37689
|
{
|
|
37498
37690
|
title: i18n.get("errorSubmittingData"),
|
|
37499
37691
|
variant: "error",
|
|
37500
|
-
className: styles$
|
|
37692
|
+
className: styles$d.sourceOfFundsSofFinancierFormError,
|
|
37501
37693
|
children: errorMessage
|
|
37502
37694
|
}
|
|
37503
37695
|
),
|
|
37504
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
37696
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsSofFinancierFormNameGroup, children: [
|
|
37505
37697
|
/* @__PURE__ */ jsx(
|
|
37506
37698
|
Field,
|
|
37507
37699
|
{
|
|
@@ -37614,7 +37806,7 @@ const SOFFinancierModal = (props) => {
|
|
|
37614
37806
|
}
|
|
37615
37807
|
)
|
|
37616
37808
|
] }) }),
|
|
37617
|
-
/* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
37809
|
+
/* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsFinancierFooter, children: [
|
|
37618
37810
|
Number.isFinite(indexNumber) && /* @__PURE__ */ jsx(
|
|
37619
37811
|
IconButton,
|
|
37620
37812
|
{
|
|
@@ -37693,7 +37885,7 @@ function AdditionalDataForThirdParty(props) {
|
|
|
37693
37885
|
formUtils.getErrorMessage("financiers", errors, fieldProblems)
|
|
37694
37886
|
),
|
|
37695
37887
|
variant: "error",
|
|
37696
|
-
className: styles$
|
|
37888
|
+
className: styles$d.sourceOfFundsSofFinancierFormError,
|
|
37697
37889
|
children: i18n.get("addAtLeastOneInvestor")
|
|
37698
37890
|
}
|
|
37699
37891
|
),
|
|
@@ -37704,11 +37896,11 @@ function AdditionalDataForThirdParty(props) {
|
|
|
37704
37896
|
{
|
|
37705
37897
|
type: "button",
|
|
37706
37898
|
onClick: () => handleShowUpdateFinancierModal(index),
|
|
37707
|
-
className: styles$
|
|
37899
|
+
className: styles$d.sourceOfFundsThirdPartyFundingFinancierGroup,
|
|
37708
37900
|
children: [
|
|
37709
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
37710
|
-
/* @__PURE__ */ jsx(Icon, { name: "user", className: styles$
|
|
37711
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
37901
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
|
|
37902
|
+
/* @__PURE__ */ jsx(Icon, { name: "user", className: styles$d.sourceOfFundsThirdPartyFundingAvatar }),
|
|
37903
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
|
|
37712
37904
|
/* @__PURE__ */ jsxs(Typography, { el: "div", variant: "body-strongest", children: [
|
|
37713
37905
|
financier.firstName,
|
|
37714
37906
|
" ",
|
|
@@ -37730,10 +37922,10 @@ function AdditionalDataForThirdParty(props) {
|
|
|
37730
37922
|
"button",
|
|
37731
37923
|
{
|
|
37732
37924
|
type: "button",
|
|
37733
|
-
className: styles$
|
|
37925
|
+
className: styles$d.sourceOfFundsThirdPartyFundingFinancierGroup,
|
|
37734
37926
|
onClick: handleToggleFinancierModal,
|
|
37735
|
-
children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
37736
|
-
/* @__PURE__ */ jsx(Icon, { name: "plus", className: styles$
|
|
37927
|
+
children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
|
|
37928
|
+
/* @__PURE__ */ jsx(Icon, { name: "plus", className: styles$d.sourceOfFundsThirdPartyFundingAvatarAdd }),
|
|
37737
37929
|
/* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("addInvestor") })
|
|
37738
37930
|
] })
|
|
37739
37931
|
}
|
|
@@ -38247,7 +38439,7 @@ function SourceOfFundsAdditionalData(props) {
|
|
|
38247
38439
|
return null;
|
|
38248
38440
|
}
|
|
38249
38441
|
};
|
|
38250
|
-
return /* @__PURE__ */ jsxs("form", { className: styles$
|
|
38442
|
+
return /* @__PURE__ */ jsxs("form", { className: styles$d.sourceOfFundsAdditionalDataForm, children: [
|
|
38251
38443
|
/* @__PURE__ */ jsx(
|
|
38252
38444
|
ErrorPanel,
|
|
38253
38445
|
{
|
|
@@ -38267,7 +38459,7 @@ const tileTitle = "adyen-kyc-tile-title";
|
|
|
38267
38459
|
const tileCheckbox = "adyen-kyc-tile-checkbox";
|
|
38268
38460
|
const tileContainerHorizontal = "adyen-kyc-tile-container-horizontal";
|
|
38269
38461
|
const tileLabel = "adyen-kyc-tile-label";
|
|
38270
|
-
const styles$
|
|
38462
|
+
const styles$c = {
|
|
38271
38463
|
tileContainer,
|
|
38272
38464
|
tile,
|
|
38273
38465
|
tileIcon,
|
|
@@ -38309,15 +38501,15 @@ function Tile({
|
|
|
38309
38501
|
return /* @__PURE__ */ jsxs(
|
|
38310
38502
|
"div",
|
|
38311
38503
|
{
|
|
38312
|
-
className: cx(styles$
|
|
38313
|
-
[styles$
|
|
38504
|
+
className: cx(styles$c.tileContainer, {
|
|
38505
|
+
[styles$c.tileContainerHorizontal]: isHorizontal
|
|
38314
38506
|
}),
|
|
38315
38507
|
children: [
|
|
38316
38508
|
/* @__PURE__ */ jsx(
|
|
38317
38509
|
"input",
|
|
38318
38510
|
{
|
|
38319
38511
|
ref: inputNode,
|
|
38320
|
-
className: styles$
|
|
38512
|
+
className: styles$c.tileCheckbox,
|
|
38321
38513
|
disabled,
|
|
38322
38514
|
checked: !!checked,
|
|
38323
38515
|
value,
|
|
@@ -38331,10 +38523,10 @@ function Tile({
|
|
|
38331
38523
|
tabIndex: disabled ? -1 : 0
|
|
38332
38524
|
}
|
|
38333
38525
|
),
|
|
38334
|
-
/* @__PURE__ */ jsxs("label", { htmlFor: idUse, className: styles$
|
|
38335
|
-
icon && /* @__PURE__ */ jsx("div", { className: styles$
|
|
38336
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
38337
|
-
/* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-strongest", className: styles$
|
|
38526
|
+
/* @__PURE__ */ jsxs("label", { htmlFor: idUse, className: styles$c.tile, children: [
|
|
38527
|
+
icon && /* @__PURE__ */ jsx("div", { className: styles$c.tileIcon, children: /* @__PURE__ */ jsx(Icon, { name: icon, testId: icon }) }),
|
|
38528
|
+
/* @__PURE__ */ jsxs("div", { className: styles$c.tileLabel, children: [
|
|
38529
|
+
/* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-strongest", className: styles$c.tileTitle, children: label }),
|
|
38338
38530
|
subTitle && /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: subTitle })
|
|
38339
38531
|
] })
|
|
38340
38532
|
] })
|
|
@@ -38346,7 +38538,7 @@ const tileGroup = "adyen-kyc-tile-group";
|
|
|
38346
38538
|
const tileGroupError = "adyen-kyc-tile-group-error";
|
|
38347
38539
|
const tileGroupErrorIcon = "adyen-kyc-tile-group-error-icon";
|
|
38348
38540
|
const tileGroupHorizontal = "adyen-kyc-tile-group-horizontal";
|
|
38349
|
-
const styles$
|
|
38541
|
+
const styles$b = {
|
|
38350
38542
|
tileGroup,
|
|
38351
38543
|
tileGroupError,
|
|
38352
38544
|
tileGroupErrorIcon,
|
|
@@ -38366,15 +38558,15 @@ function TileGroup({
|
|
|
38366
38558
|
const name = nameProp ?? uniqName;
|
|
38367
38559
|
const finalName = allowMultiple ? `${name}[]` : name;
|
|
38368
38560
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38369
|
-
!!errorMessage && /* @__PURE__ */ jsxs("div", { "aria-live": "polite", className: styles$
|
|
38370
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
38561
|
+
!!errorMessage && /* @__PURE__ */ jsxs("div", { "aria-live": "polite", className: styles$b.tileGroupError, children: [
|
|
38562
|
+
/* @__PURE__ */ jsx("span", { className: styles$b.tileGroupErrorIcon, children: /* @__PURE__ */ jsx(Icon, { name: "field-error" }) }),
|
|
38371
38563
|
errorMessage
|
|
38372
38564
|
] }),
|
|
38373
38565
|
/* @__PURE__ */ jsx(
|
|
38374
38566
|
"div",
|
|
38375
38567
|
{
|
|
38376
|
-
className: cx(styles$
|
|
38377
|
-
[styles$
|
|
38568
|
+
className: cx(styles$b.tileGroup, {
|
|
38569
|
+
[styles$b.tileGroupHorizontal]: isHorizontal
|
|
38378
38570
|
}),
|
|
38379
38571
|
children: tiles.map((tile2, index) => {
|
|
38380
38572
|
const { value, id, icon, subTitle, label, disabled } = tile2;
|
|
@@ -38516,7 +38708,7 @@ function getIconById(id) {
|
|
|
38516
38708
|
return "contract";
|
|
38517
38709
|
}
|
|
38518
38710
|
}
|
|
38519
|
-
const logger$
|
|
38711
|
+
const logger$x = createLogger("SourceOfFunds");
|
|
38520
38712
|
function SourceOfFunds(props) {
|
|
38521
38713
|
const { i18n } = useI18nContext();
|
|
38522
38714
|
const { activeForm, activeBusinessLine, sourceOfFundsType } = props;
|
|
@@ -38529,15 +38721,15 @@ function SourceOfFunds(props) {
|
|
|
38529
38721
|
if (response) {
|
|
38530
38722
|
setAllSoFTypes(response);
|
|
38531
38723
|
}
|
|
38532
|
-
}).catch(() => logger$
|
|
38724
|
+
}).catch(() => logger$x.error).finally(() => setLoading(false));
|
|
38533
38725
|
}, []);
|
|
38534
38726
|
const formWrapperClasses = (formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
|
|
38535
38727
|
const pageHeadings = useMemo(
|
|
38536
38728
|
() => getPageHeadings(sourceOfFundsType ?? "adyen"),
|
|
38537
38729
|
[sourceOfFundsType]
|
|
38538
38730
|
);
|
|
38539
|
-
return loading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
38540
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
38731
|
+
return loading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, { size: "medium" }) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
|
|
38732
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsWrapperHeading, children: [
|
|
38541
38733
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get(
|
|
38542
38734
|
(activeForm == null ? void 0 : activeForm.formId) === "additionalData" ? pageHeadings.heading : {
|
|
38543
38735
|
key: "selectASourceOfFunding",
|
|
@@ -38549,7 +38741,7 @@ function SourceOfFunds(props) {
|
|
|
38549
38741
|
}
|
|
38550
38742
|
}
|
|
38551
38743
|
) }),
|
|
38552
|
-
/* @__PURE__ */ jsxs(Typography, { className: styles$
|
|
38744
|
+
/* @__PURE__ */ jsxs(Typography, { className: styles$d.sourceOfFundsWrapperDescription, children: [
|
|
38553
38745
|
(activeForm == null ? void 0 : activeForm.formId) === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
|
|
38554
38746
|
allSoFTypes.length === 0 && i18n.get("noCategoriesAvailable")
|
|
38555
38747
|
] })
|
|
@@ -38591,9 +38783,9 @@ function SourceOfFundsGettingStartedCard(props) {
|
|
|
38591
38783
|
return /* @__PURE__ */ jsx(
|
|
38592
38784
|
Card,
|
|
38593
38785
|
{
|
|
38594
|
-
className: styles$
|
|
38595
|
-
headerClassName: styles$
|
|
38596
|
-
bodyClassName: styles$
|
|
38786
|
+
className: styles$d.sourceOfFundsGettingStartedCardsCard,
|
|
38787
|
+
headerClassName: styles$d.sourceOfFundsGettingStartedCardsCardHeader,
|
|
38788
|
+
bodyClassName: styles$d.sourceOfFundsGettingStartedCardsCardBody,
|
|
38597
38789
|
title,
|
|
38598
38790
|
stateful: true,
|
|
38599
38791
|
onClick,
|
|
@@ -38609,7 +38801,7 @@ function SourceOfFundsGettingStartedCard(props) {
|
|
|
38609
38801
|
children: isEdit && (meta == null ? void 0 : meta.length) && /* @__PURE__ */ jsx(
|
|
38610
38802
|
StructuredList,
|
|
38611
38803
|
{
|
|
38612
|
-
className: styles$
|
|
38804
|
+
className: styles$d.sourceOfFundsGettingStartedCardsCardDescription,
|
|
38613
38805
|
items: meta
|
|
38614
38806
|
}
|
|
38615
38807
|
)
|
|
@@ -38712,7 +38904,7 @@ const SourceOfFundsGettingStarted = ({
|
|
|
38712
38904
|
return /* @__PURE__ */ jsxs(
|
|
38713
38905
|
"div",
|
|
38714
38906
|
{
|
|
38715
|
-
className: styles$
|
|
38907
|
+
className: styles$d.sourceOfFundsGettingStarted,
|
|
38716
38908
|
"data-testid": "source-of-funds-getting-started",
|
|
38717
38909
|
children: [
|
|
38718
38910
|
!hasSourceOfFunds && /* @__PURE__ */ jsx(
|
|
@@ -38721,12 +38913,12 @@ const SourceOfFundsGettingStarted = ({
|
|
|
38721
38913
|
type: "image",
|
|
38722
38914
|
testId: "source-of-funds-getting-started-icon",
|
|
38723
38915
|
name: "source-of-funds",
|
|
38724
|
-
className: styles$
|
|
38916
|
+
className: styles$d.sourceOfFundsGettingStartedIcon
|
|
38725
38917
|
}
|
|
38726
38918
|
),
|
|
38727
|
-
/* @__PURE__ */ jsx(Typography, { className: styles$
|
|
38919
|
+
/* @__PURE__ */ jsx(Typography, { className: styles$d.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("financialProductFundingSources") }),
|
|
38728
38920
|
hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38729
|
-
/* @__PURE__ */ jsx(Typography, { className: styles$
|
|
38921
|
+
/* @__PURE__ */ jsx(Typography, { className: styles$d.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
|
|
38730
38922
|
errorObjects && errorObjects.map((errorObj, index) => {
|
|
38731
38923
|
var _a2;
|
|
38732
38924
|
const uniqueActions = getUniqueRemediationActions(errorObj);
|
|
@@ -38734,7 +38926,7 @@ const SourceOfFundsGettingStarted = ({
|
|
|
38734
38926
|
Alert,
|
|
38735
38927
|
{
|
|
38736
38928
|
title: errorObj.message,
|
|
38737
|
-
className: styles$
|
|
38929
|
+
className: styles$d.sourceOfFundsGettingStartedError,
|
|
38738
38930
|
variant: "error",
|
|
38739
38931
|
children: [
|
|
38740
38932
|
((_a2 = errorObj == null ? void 0 : errorObj.subErrors) == null ? void 0 : _a2.length) && /* @__PURE__ */ jsx(
|
|
@@ -38745,7 +38937,7 @@ const SourceOfFundsGettingStarted = ({
|
|
|
38745
38937
|
)
|
|
38746
38938
|
}
|
|
38747
38939
|
),
|
|
38748
|
-
uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
38940
|
+
uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsGettingStartedErrorActions, children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(
|
|
38749
38941
|
Button,
|
|
38750
38942
|
{
|
|
38751
38943
|
variant: "tertiary",
|
|
@@ -38760,7 +38952,7 @@ const SourceOfFundsGettingStarted = ({
|
|
|
38760
38952
|
`error-${index}`
|
|
38761
38953
|
);
|
|
38762
38954
|
}),
|
|
38763
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
38955
|
+
/* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsGettingStartedCards, children: mapBusinessLines(businessLines) }),
|
|
38764
38956
|
handleCancelClick && /* @__PURE__ */ jsx(
|
|
38765
38957
|
Button,
|
|
38766
38958
|
{
|
|
@@ -38772,8 +38964,8 @@ const SourceOfFundsGettingStarted = ({
|
|
|
38772
38964
|
)
|
|
38773
38965
|
] }),
|
|
38774
38966
|
!hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38775
|
-
/* @__PURE__ */ jsx(Typography, { className: styles$
|
|
38776
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
38967
|
+
/* @__PURE__ */ jsx(Typography, { className: styles$d.sourceOfFundsGettingStartedBody, children: i18n.get("inTheNextStepWellCollectInformation") }),
|
|
38968
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsGettingStartedActions, children: [
|
|
38777
38969
|
/* @__PURE__ */ jsx(
|
|
38778
38970
|
Button,
|
|
38779
38971
|
{
|
|
@@ -38872,20 +39064,20 @@ const SOFUploadModal = (props) => {
|
|
|
38872
39064
|
}
|
|
38873
39065
|
};
|
|
38874
39066
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Modal, { onClose: handleModalClose, children: [
|
|
38875
|
-
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
38876
|
-
/* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
39067
|
+
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsUploadModalHeader, children: /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: i18n.get("uploadASupportingDocument") }) }) }),
|
|
39068
|
+
/* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsUploadModalContent, children: [
|
|
38877
39069
|
(businessLines == null ? void 0 : businessLines.length) > 1 ? /* @__PURE__ */ jsx(
|
|
38878
39070
|
Field,
|
|
38879
39071
|
{
|
|
38880
39072
|
name: "service",
|
|
38881
|
-
className: styles$
|
|
39073
|
+
className: styles$d.sourceOfFundsUploadModalContentField,
|
|
38882
39074
|
label: i18n.get("whatFinancialProductIsThisFor"),
|
|
38883
39075
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
38884
39076
|
RadioGroup,
|
|
38885
39077
|
{
|
|
38886
39078
|
...childProps,
|
|
38887
39079
|
name: "service",
|
|
38888
|
-
className: styles$
|
|
39080
|
+
className: styles$d.sourceOfFundsUploadModalContentFieldRadioGroup,
|
|
38889
39081
|
items: serviceRadioItems,
|
|
38890
39082
|
value: selectedService,
|
|
38891
39083
|
disabled: false,
|
|
@@ -38902,7 +39094,7 @@ const SOFUploadModal = (props) => {
|
|
|
38902
39094
|
name: "documentType",
|
|
38903
39095
|
label: i18n.get("documentType"),
|
|
38904
39096
|
"data-testid": "documentType",
|
|
38905
|
-
className: styles$
|
|
39097
|
+
className: styles$d.sourceOfFundsUploadModalContentField,
|
|
38906
39098
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
38907
39099
|
Select,
|
|
38908
39100
|
{
|
|
@@ -38916,7 +39108,7 @@ const SOFUploadModal = (props) => {
|
|
|
38916
39108
|
)
|
|
38917
39109
|
}
|
|
38918
39110
|
),
|
|
38919
|
-
(documentRequirements == null ? void 0 : documentRequirements.length) ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
39111
|
+
(documentRequirements == null ? void 0 : documentRequirements.length) ? /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsUploadModalContentRequirementsContainer, children: [
|
|
38920
39112
|
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: i18n.get("documentShouldShow") }),
|
|
38921
39113
|
/* @__PURE__ */ jsx("ul", { children: documentRequirements == null ? void 0 : documentRequirements.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: i18n.get(requirement) }) }, requirement)) })
|
|
38922
39114
|
] }) : null,
|
|
@@ -38982,10 +39174,10 @@ const SourceOfFundsUpload = ({
|
|
|
38982
39174
|
}
|
|
38983
39175
|
}
|
|
38984
39176
|
};
|
|
38985
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
38986
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
39177
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsUploadList, children: [
|
|
39178
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsUploadListHeading, children: [
|
|
38987
39179
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("supportingDocuments") }),
|
|
38988
|
-
/* @__PURE__ */ jsx(Typography, { className: styles$
|
|
39180
|
+
/* @__PURE__ */ jsx(Typography, { className: styles$d.sourceOfFundsWrapperDescription, children: (sourceOfFundsCategories == null ? void 0 : sourceOfFundsCategories.length) ? i18n.get("weNeedProofOfFundingPlural", {
|
|
38989
39181
|
values: {
|
|
38990
39182
|
category1_name: sourceOfFundsCategories[0] ? i18n.get(
|
|
38991
39183
|
`sofType${toCapitalized(sourceOfFundsCategories[0])}Label`
|
|
@@ -39002,10 +39194,10 @@ const SourceOfFundsUpload = ({
|
|
|
39002
39194
|
}
|
|
39003
39195
|
}) })
|
|
39004
39196
|
] }),
|
|
39005
|
-
documents == null ? void 0 : documents.map((document2) => /* @__PURE__ */ jsxs("div", { className: styles$
|
|
39006
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
39007
|
-
/* @__PURE__ */ jsx(Icon, { name: "document", className: styles$
|
|
39008
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
39197
|
+
documents == null ? void 0 : documents.map((document2) => /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
|
|
39198
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
|
|
39199
|
+
/* @__PURE__ */ jsx(Icon, { name: "document", className: styles$d.sourceOfFundsThirdPartyFundingAvatar }),
|
|
39200
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
|
|
39009
39201
|
/* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: document2.fileName }),
|
|
39010
39202
|
/* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: parseSOFDocumentDescription(i18n, document2.description) })
|
|
39011
39203
|
] })
|
|
@@ -39025,16 +39217,16 @@ const SourceOfFundsUpload = ({
|
|
|
39025
39217
|
"button",
|
|
39026
39218
|
{
|
|
39027
39219
|
type: "button",
|
|
39028
|
-
className: styles$
|
|
39220
|
+
className: styles$d.sourceOfFundsThirdPartyFundingFinancierGroup,
|
|
39029
39221
|
onClick: openUploadModal,
|
|
39030
39222
|
"data-testId": "source-of-funds-upload-button",
|
|
39031
|
-
children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
39032
|
-
/* @__PURE__ */ jsx(Icon, { className: styles$
|
|
39223
|
+
children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
|
|
39224
|
+
/* @__PURE__ */ jsx(Icon, { className: styles$d.sourceOfFundsThirdPartyFundingAvatarAdd, name: "plus" }),
|
|
39033
39225
|
/* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("addDocument") })
|
|
39034
39226
|
] })
|
|
39035
39227
|
}
|
|
39036
39228
|
),
|
|
39037
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
39229
|
+
/* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsGettingStartedActions, children: handleNavigateToSummary && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: i18n.get("cancel") }) }),
|
|
39038
39230
|
!!docToDelete && /* @__PURE__ */ jsx(
|
|
39039
39231
|
Confirm,
|
|
39040
39232
|
{
|
|
@@ -39060,7 +39252,7 @@ const SourceOfFundsUpload = ({
|
|
|
39060
39252
|
)
|
|
39061
39253
|
] });
|
|
39062
39254
|
};
|
|
39063
|
-
const logger$
|
|
39255
|
+
const logger$w = createLogger("SourceOfFundsDropin");
|
|
39064
39256
|
function SourceOfFundsDropin({
|
|
39065
39257
|
legalEntityResponse,
|
|
39066
39258
|
country,
|
|
@@ -39146,7 +39338,7 @@ function SourceOfFundsDropin({
|
|
|
39146
39338
|
}
|
|
39147
39339
|
} catch (error) {
|
|
39148
39340
|
showToast({ label: i18n.get("failedToLoadBusinessLines"), type: "error" });
|
|
39149
|
-
logger$
|
|
39341
|
+
logger$w.error(error);
|
|
39150
39342
|
} finally {
|
|
39151
39343
|
setLoading(false);
|
|
39152
39344
|
}
|
|
@@ -39209,14 +39401,14 @@ function SourceOfFundsDropin({
|
|
|
39209
39401
|
const le = await handleUpdateLegalEntity(sofOriginator, sofOriginator.id);
|
|
39210
39402
|
originatorLegalEntityId = le == null ? void 0 : le.id;
|
|
39211
39403
|
} catch (e) {
|
|
39212
|
-
logger$
|
|
39404
|
+
logger$w.log("Error updating originator legal entity", e);
|
|
39213
39405
|
}
|
|
39214
39406
|
} else {
|
|
39215
39407
|
try {
|
|
39216
39408
|
const le = await handleCreateLegalEntity(sofOriginator);
|
|
39217
39409
|
originatorLegalEntityId = le == null ? void 0 : le.id;
|
|
39218
39410
|
} catch (e) {
|
|
39219
|
-
logger$
|
|
39411
|
+
logger$w.log("Error creating originator legal entity", e);
|
|
39220
39412
|
}
|
|
39221
39413
|
}
|
|
39222
39414
|
return originatorLegalEntityId;
|
|
@@ -39229,7 +39421,7 @@ function SourceOfFundsDropin({
|
|
|
39229
39421
|
return;
|
|
39230
39422
|
}
|
|
39231
39423
|
setLoadingStatus("loading");
|
|
39232
|
-
logger$
|
|
39424
|
+
logger$w.log("Submitting data");
|
|
39233
39425
|
const { additionalData } = sofData;
|
|
39234
39426
|
const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
|
|
39235
39427
|
if (sofType === "donations" || sofType === "inheritance") {
|
|
@@ -39244,7 +39436,7 @@ function SourceOfFundsDropin({
|
|
|
39244
39436
|
setActiveSourceOfFund({});
|
|
39245
39437
|
gotoFormByFormIndex(0);
|
|
39246
39438
|
} catch (e) {
|
|
39247
|
-
logger$
|
|
39439
|
+
logger$w.log("Error updating source of funds", e);
|
|
39248
39440
|
setSofErrorMessage((e == null ? void 0 : e.message) || i18n.get("errorUpdatingSourceOfFunds"));
|
|
39249
39441
|
}
|
|
39250
39442
|
setLoadingStatus("success");
|
|
@@ -39281,7 +39473,7 @@ function SourceOfFundsDropin({
|
|
|
39281
39473
|
const updatedLe = await handleGetLegalEntity(legalEntity.id);
|
|
39282
39474
|
setLegalEntity(updatedLe);
|
|
39283
39475
|
} catch (e) {
|
|
39284
|
-
logger$
|
|
39476
|
+
logger$w.log(e);
|
|
39285
39477
|
}
|
|
39286
39478
|
};
|
|
39287
39479
|
const handleNavigateToSummary = async () => {
|
|
@@ -39292,7 +39484,7 @@ function SourceOfFundsDropin({
|
|
|
39292
39484
|
const handleNavigateToUploadPage = () => {
|
|
39293
39485
|
setShowUploadPage(true);
|
|
39294
39486
|
};
|
|
39295
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
39487
|
+
return /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFunds, children: loading ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
39296
39488
|
gettingStarted && !showUploadPage && /* @__PURE__ */ jsx(
|
|
39297
39489
|
SourceOfFundsGettingStarted,
|
|
39298
39490
|
{
|
|
@@ -40101,7 +40293,7 @@ const saveBlobAsFile = (fileData, filename) => {
|
|
|
40101
40293
|
window.URL.revokeObjectURL(blobUrl);
|
|
40102
40294
|
}
|
|
40103
40295
|
};
|
|
40104
|
-
const logger$
|
|
40296
|
+
const logger$v = createLogger("useServiceAgreement");
|
|
40105
40297
|
const FALLBACK_LANGUAGE_CODE$1 = "en";
|
|
40106
40298
|
const useServiceAgreement = ({
|
|
40107
40299
|
handleGetServiceAgreement,
|
|
@@ -40131,7 +40323,7 @@ const useServiceAgreement = ({
|
|
|
40131
40323
|
const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
|
|
40132
40324
|
setServiceAgreement({ id, contract });
|
|
40133
40325
|
};
|
|
40134
|
-
requestAcceptedServiceAgreement().catch(logger$
|
|
40326
|
+
requestAcceptedServiceAgreement().catch(logger$v.error).finally(() => setLoading("success"));
|
|
40135
40327
|
}, [acceptanceId, handleViewAcceptedTermsOfServiceDocument]);
|
|
40136
40328
|
useEffect(() => {
|
|
40137
40329
|
const requestServiceAgreement = async () => {
|
|
@@ -40146,7 +40338,7 @@ const useServiceAgreement = ({
|
|
|
40146
40338
|
}
|
|
40147
40339
|
);
|
|
40148
40340
|
if (!document2) {
|
|
40149
|
-
logger$
|
|
40341
|
+
logger$v.log('"document" field was missing in response');
|
|
40150
40342
|
return;
|
|
40151
40343
|
}
|
|
40152
40344
|
const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
|
|
@@ -40161,7 +40353,7 @@ const useServiceAgreement = ({
|
|
|
40161
40353
|
throw err;
|
|
40162
40354
|
}
|
|
40163
40355
|
};
|
|
40164
|
-
requestServiceAgreement().catch(logger$
|
|
40356
|
+
requestServiceAgreement().catch(logger$v.error);
|
|
40165
40357
|
}, [
|
|
40166
40358
|
handleGetServiceAgreement,
|
|
40167
40359
|
handleServiceAgreementIsNotAvailableInThatLanguage,
|
|
@@ -40194,7 +40386,7 @@ const serviceAgreementTypesTranslationMapping = {
|
|
|
40194
40386
|
adyenPccr: "pccr",
|
|
40195
40387
|
adyenChargeCard: "chargeCardUserAgreement"
|
|
40196
40388
|
};
|
|
40197
|
-
const logger$
|
|
40389
|
+
const logger$u = createLogger("ServiceAgreementDropin");
|
|
40198
40390
|
const FALLBACK_LANGUAGE_CODE = "en";
|
|
40199
40391
|
function ServiceAgreementDropin({
|
|
40200
40392
|
legalEntityResponse,
|
|
@@ -40381,7 +40573,7 @@ function ServiceAgreementDropin({
|
|
|
40381
40573
|
await requestAndDownload(i18n.languageCode);
|
|
40382
40574
|
} catch {
|
|
40383
40575
|
if (i18n.languageCode !== FALLBACK_LANGUAGE_CODE) {
|
|
40384
|
-
await requestAndDownload(FALLBACK_LANGUAGE_CODE).catch(logger$
|
|
40576
|
+
await requestAndDownload(FALLBACK_LANGUAGE_CODE).catch(logger$u.error);
|
|
40385
40577
|
return;
|
|
40386
40578
|
}
|
|
40387
40579
|
showToast({
|
|
@@ -40587,7 +40779,7 @@ function ServiceAgreementDropin({
|
|
|
40587
40779
|
] })
|
|
40588
40780
|
] }) });
|
|
40589
40781
|
}
|
|
40590
|
-
const logger$
|
|
40782
|
+
const logger$t = createLogger("AcceptTermsOfService");
|
|
40591
40783
|
function AcceptTermsOfServiceComponent({
|
|
40592
40784
|
legalEntityId,
|
|
40593
40785
|
modalView,
|
|
@@ -40628,7 +40820,7 @@ function AcceptTermsOfServiceComponent({
|
|
|
40628
40820
|
onClose == null ? void 0 : onClose();
|
|
40629
40821
|
};
|
|
40630
40822
|
const fetchSigned = useCallback(async () => {
|
|
40631
|
-
await getServiceAgreementAcceptanceInfos2(legalEntityId).then(({ data }) => setServiceAgreementAcceptanceInfos(data)).catch(logger$
|
|
40823
|
+
await getServiceAgreementAcceptanceInfos2(legalEntityId).then(({ data }) => setServiceAgreementAcceptanceInfos(data)).catch(logger$t.error);
|
|
40632
40824
|
}, [getServiceAgreementAcceptanceInfos2, legalEntityId]);
|
|
40633
40825
|
const handleSign = useCallback(
|
|
40634
40826
|
async (...params) => {
|
|
@@ -40655,7 +40847,7 @@ function AcceptTermsOfServiceComponent({
|
|
|
40655
40847
|
(async () => {
|
|
40656
40848
|
setIsLoading(true);
|
|
40657
40849
|
await fetchSigned();
|
|
40658
|
-
})().catch(logger$
|
|
40850
|
+
})().catch(logger$t.error).finally(() => {
|
|
40659
40851
|
setIsLoading(false);
|
|
40660
40852
|
});
|
|
40661
40853
|
}, [fetchSigned]);
|
|
@@ -41387,7 +41579,7 @@ function reducer({
|
|
|
41387
41579
|
}
|
|
41388
41580
|
};
|
|
41389
41581
|
}
|
|
41390
|
-
const logger$
|
|
41582
|
+
const logger$s = createLogger("useAsyncValidator");
|
|
41391
41583
|
const useMultiFormAsyncValidator = (asyncRules) => {
|
|
41392
41584
|
const validResult = {
|
|
41393
41585
|
isValid: true,
|
|
@@ -41400,7 +41592,7 @@ const useMultiFormAsyncValidator = (asyncRules) => {
|
|
|
41400
41592
|
const rule = typeof asyncRules === "function" ? (_b2 = (_a2 = asyncRules == null ? void 0 : asyncRules(data)) == null ? void 0 : _a2[formName]) == null ? void 0 : _b2[field] : (_c2 = asyncRules == null ? void 0 : asyncRules[formName]) == null ? void 0 : _c2[field];
|
|
41401
41593
|
const value = (_d2 = data == null ? void 0 : data[formName]) == null ? void 0 : _d2[field];
|
|
41402
41594
|
if (!rule || !value) return new ValidationResult([validResult]);
|
|
41403
|
-
const isValid = await rule.asyncValidate(value).catch(logger$
|
|
41595
|
+
const isValid = await rule.asyncValidate(value).catch(logger$s.error);
|
|
41404
41596
|
if (isValid === false) {
|
|
41405
41597
|
return new ValidationResult([
|
|
41406
41598
|
{
|
|
@@ -41848,7 +42040,7 @@ const personalDetailsValidators = ({
|
|
|
41848
42040
|
};
|
|
41849
42041
|
};
|
|
41850
42042
|
const parseConfiguration$4 = ({ matchingScenario }) => parseIndividualScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.INDIVIDUAL]);
|
|
41851
|
-
const logger$
|
|
42043
|
+
const logger$r = createLogger("IndividualDropin");
|
|
41852
42044
|
function IndividualDropin({
|
|
41853
42045
|
handleCreateDocument,
|
|
41854
42046
|
handleGetDocument,
|
|
@@ -41861,7 +42053,7 @@ function IndividualDropin({
|
|
|
41861
42053
|
taskType = TaskTypes.INDIVIDUAL,
|
|
41862
42054
|
parentLegalEntity,
|
|
41863
42055
|
legalEntityResponse,
|
|
41864
|
-
taskName
|
|
42056
|
+
taskName,
|
|
41865
42057
|
handleCloseClick,
|
|
41866
42058
|
isTargetLegalEntityType,
|
|
41867
42059
|
country: parentCountry,
|
|
@@ -42162,11 +42354,11 @@ function IndividualDropin({
|
|
|
42162
42354
|
);
|
|
42163
42355
|
if (!formattedDocuments || formattedDocuments.length === 0) {
|
|
42164
42356
|
if (existingAttachments == null ? void 0 : existingAttachments.length)
|
|
42165
|
-
logger$
|
|
42357
|
+
logger$r.log(
|
|
42166
42358
|
"User has already uploaded documents and is not changing them, nothing needs to be done"
|
|
42167
42359
|
);
|
|
42168
42360
|
else
|
|
42169
|
-
logger$
|
|
42361
|
+
logger$r.error(
|
|
42170
42362
|
`formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
|
|
42171
42363
|
);
|
|
42172
42364
|
return;
|
|
@@ -42280,7 +42472,7 @@ function IndividualDropin({
|
|
|
42280
42472
|
clearToasts();
|
|
42281
42473
|
externalOnSubmit == null ? void 0 : externalOnSubmit(dataSubmitted);
|
|
42282
42474
|
} catch (e) {
|
|
42283
|
-
logger$
|
|
42475
|
+
logger$r.error("Failed to update individual", e);
|
|
42284
42476
|
if (isValidationError(e)) {
|
|
42285
42477
|
const validationErrors = processValidationErrors(e, TaskTypes.INDIVIDUAL);
|
|
42286
42478
|
setProblems({ ...problems, validationErrors });
|
|
@@ -42421,7 +42613,7 @@ function IndividualDropin({
|
|
|
42421
42613
|
return /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
|
|
42422
42614
|
FormWrapper,
|
|
42423
42615
|
{
|
|
42424
|
-
taskName:
|
|
42616
|
+
taskName: taskName ?? "individualDetails",
|
|
42425
42617
|
activeForm,
|
|
42426
42618
|
summary: {
|
|
42427
42619
|
data: formatDataForSummary2(),
|
|
@@ -42475,7 +42667,7 @@ function IndividualDropin({
|
|
|
42475
42667
|
}
|
|
42476
42668
|
) });
|
|
42477
42669
|
}
|
|
42478
|
-
const logger$
|
|
42670
|
+
const logger$q = createLogger("CreateIndividualComponent");
|
|
42479
42671
|
function CreateIndividualComponent({
|
|
42480
42672
|
parentLegalEntityId,
|
|
42481
42673
|
legalEntityId,
|
|
@@ -42526,11 +42718,11 @@ function CreateIndividualComponent({
|
|
|
42526
42718
|
setParentLegalEntity(parentEntity);
|
|
42527
42719
|
setLegalEntity(entity);
|
|
42528
42720
|
} catch (error) {
|
|
42529
|
-
logger$
|
|
42721
|
+
logger$q.error(error);
|
|
42530
42722
|
}
|
|
42531
42723
|
}, [parentLegalEntityId, legalEntityId, getLegalEntity2]);
|
|
42532
42724
|
useEffect(() => {
|
|
42533
|
-
fetchLegalEntity().catch(logger$
|
|
42725
|
+
fetchLegalEntity().catch(logger$q.error).finally(() => {
|
|
42534
42726
|
setIsLoading(false);
|
|
42535
42727
|
});
|
|
42536
42728
|
}, [fetchLegalEntity]);
|
|
@@ -42550,7 +42742,7 @@ function CreateIndividualComponent({
|
|
|
42550
42742
|
setIsAddressEnabled(res.statuses.address.enabled);
|
|
42551
42743
|
}, [country, getProviderStatus2]);
|
|
42552
42744
|
useEffect(() => {
|
|
42553
|
-
fetchProviderStatus().catch(logger$
|
|
42745
|
+
fetchProviderStatus().catch(logger$q.error);
|
|
42554
42746
|
}, [fetchProviderStatus]);
|
|
42555
42747
|
return isLoading || !legalEntity ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsx(
|
|
42556
42748
|
IndividualDropin,
|
|
@@ -42575,7 +42767,7 @@ function CreateIndividualComponent({
|
|
|
42575
42767
|
}
|
|
42576
42768
|
);
|
|
42577
42769
|
}
|
|
42578
|
-
const logger$
|
|
42770
|
+
const logger$p = createLogger("useAssociatedLegalArrangement");
|
|
42579
42771
|
function useAssociatedLegalArrangement({
|
|
42580
42772
|
rootLegalEntity,
|
|
42581
42773
|
getLegalEntity: getLegalEntity2
|
|
@@ -42591,7 +42783,7 @@ function useAssociatedLegalArrangement({
|
|
|
42591
42783
|
(entity) => entity.type === LegalEntityType.SOLE_PROPRIETORSHIP || entity.type === LegalEntityType.TRUST || entity.type === LegalEntityType.UNINCORPORATED_PARTNERSHIP
|
|
42592
42784
|
);
|
|
42593
42785
|
if (foundEntity == null ? void 0 : foundEntity.legalEntityId) {
|
|
42594
|
-
getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$
|
|
42786
|
+
getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$p.error);
|
|
42595
42787
|
}
|
|
42596
42788
|
}, [getAssociatedEntity, rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations]);
|
|
42597
42789
|
useEffect(() => {
|
|
@@ -42605,7 +42797,7 @@ function useAssociatedLegalArrangement({
|
|
|
42605
42797
|
refreshAssociatedLegalArrangement
|
|
42606
42798
|
};
|
|
42607
42799
|
}
|
|
42608
|
-
const logger$
|
|
42800
|
+
const logger$o = createLogger("CreateTransferInstrumentComponent");
|
|
42609
42801
|
function CreateTransferInstrumentComponent({
|
|
42610
42802
|
legalEntityId,
|
|
42611
42803
|
transferInstrumentId,
|
|
@@ -42645,7 +42837,7 @@ function CreateTransferInstrumentComponent({
|
|
|
42645
42837
|
try {
|
|
42646
42838
|
if (currentTransferInstrumentId) return getTransferInstrument2(currentTransferInstrumentId);
|
|
42647
42839
|
} catch (e) {
|
|
42648
|
-
logger$
|
|
42840
|
+
logger$o.error(e);
|
|
42649
42841
|
}
|
|
42650
42842
|
},
|
|
42651
42843
|
enabled: !!currentTransferInstrumentId
|
|
@@ -42727,7 +42919,7 @@ const tagOrange = "adyen-kyc-tag-orange";
|
|
|
42727
42919
|
const tagRed = "adyen-kyc-tag-red";
|
|
42728
42920
|
const tagTeal = "adyen-kyc-tag-teal";
|
|
42729
42921
|
const tagGreen = "adyen-kyc-tag-green";
|
|
42730
|
-
const styles$
|
|
42922
|
+
const styles$a = {
|
|
42731
42923
|
tag,
|
|
42732
42924
|
tagGrey,
|
|
42733
42925
|
tagBlue,
|
|
@@ -42737,15 +42929,15 @@ const styles$c = {
|
|
|
42737
42929
|
tagGreen
|
|
42738
42930
|
};
|
|
42739
42931
|
const variantMap = {
|
|
42740
|
-
grey: styles$
|
|
42741
|
-
teal: styles$
|
|
42742
|
-
red: styles$
|
|
42743
|
-
green: styles$
|
|
42744
|
-
orange: styles$
|
|
42745
|
-
blue: styles$
|
|
42932
|
+
grey: styles$a.tagGrey,
|
|
42933
|
+
teal: styles$a.tagTeal,
|
|
42934
|
+
red: styles$a.tagRed,
|
|
42935
|
+
green: styles$a.tagGreen,
|
|
42936
|
+
orange: styles$a.tagOrange,
|
|
42937
|
+
blue: styles$a.tagBlue
|
|
42746
42938
|
};
|
|
42747
42939
|
const Tag = ({ className: className2, variant = "blue", children: children2 }) => {
|
|
42748
|
-
return /* @__PURE__ */ jsx("span", { className: cx(styles$
|
|
42940
|
+
return /* @__PURE__ */ jsx("span", { className: cx(styles$a.tag, variantMap[variant], className2), children: children2 });
|
|
42749
42941
|
};
|
|
42750
42942
|
const embeddedStatus = "adyen-kyc-embedded-status";
|
|
42751
42943
|
const embeddedStatusLoading = "adyen-kyc-embedded-status-loading";
|
|
@@ -42753,7 +42945,7 @@ const embeddedStatusAvatar = "adyen-kyc-embedded-status-avatar";
|
|
|
42753
42945
|
const embeddedStatusLight = "adyen-kyc-embedded-status-light";
|
|
42754
42946
|
const embeddedStatusActionIndicator = "adyen-kyc-embedded-status-action-indicator";
|
|
42755
42947
|
const embeddedStatusInfo = "adyen-kyc-embedded-status-info";
|
|
42756
|
-
const styles$
|
|
42948
|
+
const styles$9 = {
|
|
42757
42949
|
embeddedStatus,
|
|
42758
42950
|
embeddedStatusLoading,
|
|
42759
42951
|
embeddedStatusAvatar,
|
|
@@ -42803,22 +42995,22 @@ const EmbeddedStatus = ({
|
|
|
42803
42995
|
"button",
|
|
42804
42996
|
{
|
|
42805
42997
|
type: "button",
|
|
42806
|
-
className: cx(className2, styles$
|
|
42807
|
-
[styles$
|
|
42808
|
-
[styles$
|
|
42998
|
+
className: cx(className2, styles$9.embeddedStatus, "adyen-kyc-externalComponent", {
|
|
42999
|
+
[styles$9.embeddedStatusLoading]: loading,
|
|
43000
|
+
[styles$9.embeddedStatusLight]: light
|
|
42809
43001
|
}),
|
|
42810
43002
|
onClick,
|
|
42811
43003
|
...props,
|
|
42812
43004
|
children: [
|
|
42813
|
-
/* @__PURE__ */ jsx("section", { className: styles$
|
|
42814
|
-
/* @__PURE__ */ jsx("section", { className: styles$
|
|
43005
|
+
/* @__PURE__ */ jsx("section", { className: styles$9.embeddedStatusAvatar, children: loading ? /* @__PURE__ */ jsx(Skeleton, { height: "100%", width: "100%", circle: true }) : /* @__PURE__ */ jsx(Icon, { className: styles$9.embeddedStatusIcon, name: iconName }) }),
|
|
43006
|
+
/* @__PURE__ */ jsx("section", { className: styles$9.embeddedStatusInfo, children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42815
43007
|
/* @__PURE__ */ jsx(Skeleton, { text: true, width: "20ch", height: "1em" }),
|
|
42816
43008
|
/* @__PURE__ */ jsx(Skeleton, { text: true, width: "90%", height: "1em" })
|
|
42817
43009
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42818
43010
|
/* @__PURE__ */ jsx(Typography, { variant: "body-stronger", children: title }),
|
|
42819
43011
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: subtitle })
|
|
42820
43012
|
] }) }),
|
|
42821
|
-
actionIndicator ? /* @__PURE__ */ jsx("section", { className: styles$
|
|
43013
|
+
actionIndicator ? /* @__PURE__ */ jsx("section", { className: styles$9.embeddedStatusButton, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "5em", height: "2em" }) : /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", className: styles$9.embeddedStatusActionIndicator, children: i18n.get(actionIndicator.labelKey) }) }) : (statusTag == null ? void 0 : statusTag.translationKey) && /* @__PURE__ */ jsx("section", { className: styles$9.embeddedStatusTag, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "8ch", height: "1em" }) : /* @__PURE__ */ jsx(Tag, { variant: statusTag.variant, children: i18n.get(statusTag.translationKey) }) })
|
|
42822
43014
|
]
|
|
42823
43015
|
}
|
|
42824
43016
|
);
|
|
@@ -43203,7 +43395,7 @@ function ManageTransferInstrumentOverviewItem({
|
|
|
43203
43395
|
)
|
|
43204
43396
|
] });
|
|
43205
43397
|
}
|
|
43206
|
-
const logger$
|
|
43398
|
+
const logger$n = createLogger("ManageTransferInstrumentOverview");
|
|
43207
43399
|
function ManageTransferInstrumentOverview({
|
|
43208
43400
|
transferInstrumentReferences,
|
|
43209
43401
|
legalEntityId,
|
|
@@ -43222,7 +43414,7 @@ function ManageTransferInstrumentOverview({
|
|
|
43222
43414
|
const ti = await getTransferInstrument2(transferInstrumentId);
|
|
43223
43415
|
setTransferInstrumentsMap({ [transferInstrumentId]: ti, ...transferInstrumentsMap });
|
|
43224
43416
|
} catch (e) {
|
|
43225
|
-
logger$
|
|
43417
|
+
logger$n.error(e);
|
|
43226
43418
|
}
|
|
43227
43419
|
};
|
|
43228
43420
|
const onRemoveTransferInstrument = async (transferInstrumentId) => {
|
|
@@ -43231,7 +43423,7 @@ function ManageTransferInstrumentOverview({
|
|
|
43231
43423
|
onRemove(transferInstrumentId);
|
|
43232
43424
|
} catch (e) {
|
|
43233
43425
|
showToast({ label: i18n.get("thereWasAnErrorTryAgain"), type: "error" });
|
|
43234
|
-
logger$
|
|
43426
|
+
logger$n.error(e);
|
|
43235
43427
|
}
|
|
43236
43428
|
};
|
|
43237
43429
|
const transferInstrumentListEle = transferInstrumentReferences.map((transferInstrumentRef) => /* @__PURE__ */ jsx(
|
|
@@ -43260,7 +43452,7 @@ function ManageTransferInstrumentOverview({
|
|
|
43260
43452
|
)
|
|
43261
43453
|
] });
|
|
43262
43454
|
}
|
|
43263
|
-
const logger$
|
|
43455
|
+
const logger$m = createLogger("ManageTransferInstrumentComponent");
|
|
43264
43456
|
function ManageTransferInstrumentComponent({
|
|
43265
43457
|
legalEntityId,
|
|
43266
43458
|
onAdd,
|
|
@@ -43286,7 +43478,7 @@ function ManageTransferInstrumentComponent({
|
|
|
43286
43478
|
setTransferInstruments(transferInstrumentRefs);
|
|
43287
43479
|
}, [getTransferInstruments2]);
|
|
43288
43480
|
useEffect(() => {
|
|
43289
|
-
init2().catch(logger$
|
|
43481
|
+
init2().catch(logger$m.error).finally(() => {
|
|
43290
43482
|
setLoadingStatus("success");
|
|
43291
43483
|
});
|
|
43292
43484
|
}, [init2]);
|
|
@@ -43296,7 +43488,7 @@ function ManageTransferInstrumentComponent({
|
|
|
43296
43488
|
}
|
|
43297
43489
|
}, [hasOnlyVerifiedTransferInstruments, timeoutId, transferInstruments]);
|
|
43298
43490
|
const onRemove = (transferInstrumentId) => {
|
|
43299
|
-
refreshTransferInstruments().catch(logger$
|
|
43491
|
+
refreshTransferInstruments().catch(logger$m.error);
|
|
43300
43492
|
onRemoveSuccess == null ? void 0 : onRemoveSuccess(transferInstrumentId, legalEntityId);
|
|
43301
43493
|
};
|
|
43302
43494
|
const render2 = () => {
|
|
@@ -43325,7 +43517,7 @@ function ManageTransferInstrumentComponent({
|
|
|
43325
43517
|
}
|
|
43326
43518
|
const IgnoreLocalStorageContext = createContext$1(false);
|
|
43327
43519
|
const useIgnoreLocalStorage = () => useContext$1(IgnoreLocalStorageContext);
|
|
43328
|
-
const logger$
|
|
43520
|
+
const logger$l = createLogger("useLocalStorage");
|
|
43329
43521
|
const useLocalStorage = (key, defaultValue, options) => {
|
|
43330
43522
|
const { serializer, parser, syncData } = useMemo(
|
|
43331
43523
|
() => ({
|
|
@@ -43345,7 +43537,7 @@ const useLocalStorage = (key, defaultValue, options) => {
|
|
|
43345
43537
|
const res = rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
|
|
43346
43538
|
return res;
|
|
43347
43539
|
} catch (err) {
|
|
43348
|
-
logger$
|
|
43540
|
+
logger$l.error(err);
|
|
43349
43541
|
return defaultValue;
|
|
43350
43542
|
}
|
|
43351
43543
|
});
|
|
@@ -43380,7 +43572,7 @@ const useLocalStorage = (key, defaultValue, options) => {
|
|
|
43380
43572
|
try {
|
|
43381
43573
|
updateLocalStorage();
|
|
43382
43574
|
} catch (err) {
|
|
43383
|
-
logger$
|
|
43575
|
+
logger$l.error(err);
|
|
43384
43576
|
}
|
|
43385
43577
|
}, [value, ignoreLocalStorage]);
|
|
43386
43578
|
useEffect(() => {
|
|
@@ -43393,7 +43585,7 @@ const useLocalStorage = (key, defaultValue, options) => {
|
|
|
43393
43585
|
setValue(event.newValue ? parser(event.newValue) : void 0);
|
|
43394
43586
|
}
|
|
43395
43587
|
} catch (err) {
|
|
43396
|
-
logger$
|
|
43588
|
+
logger$l.error(err);
|
|
43397
43589
|
}
|
|
43398
43590
|
};
|
|
43399
43591
|
if (ignoreLocalStorage) return;
|
|
@@ -44097,7 +44289,7 @@ const mapCustomerSupportSchemaToCustomerSupportType = (customerSupport) => {
|
|
|
44097
44289
|
}
|
|
44098
44290
|
};
|
|
44099
44291
|
};
|
|
44100
|
-
const logger$
|
|
44292
|
+
const logger$k = createLogger("CustomerSupport");
|
|
44101
44293
|
function CustomerSupport({
|
|
44102
44294
|
country,
|
|
44103
44295
|
onSubmit,
|
|
@@ -44170,7 +44362,7 @@ function CustomerSupport({
|
|
|
44170
44362
|
});
|
|
44171
44363
|
} catch {
|
|
44172
44364
|
const label = i18n.get("failedToUpdateDetails");
|
|
44173
|
-
logger$
|
|
44365
|
+
logger$k.error(label, payload);
|
|
44174
44366
|
showToast({ label, type: "error" });
|
|
44175
44367
|
}
|
|
44176
44368
|
};
|
|
@@ -45222,9 +45414,19 @@ const getTranslatedLegalInsolvency = (i18n, insolvencyData) => {
|
|
|
45222
45414
|
if (!insolvencyData) return void 0;
|
|
45223
45415
|
return insolvencyData === "noLegalActionsTaken" ? i18n.get("no") : i18n.get(insolvencyData);
|
|
45224
45416
|
};
|
|
45417
|
+
const getValidUserLocale = (locale) => {
|
|
45418
|
+
try {
|
|
45419
|
+
new Intl.NumberFormat(locale);
|
|
45420
|
+
return locale;
|
|
45421
|
+
} catch (error) {
|
|
45422
|
+
console.warn(`Invalid locale '${locale}' provided. Falling back to 'en-US'.`, error);
|
|
45423
|
+
return "en-US";
|
|
45424
|
+
}
|
|
45425
|
+
};
|
|
45225
45426
|
const getFormattedAmount = (value, currency) => {
|
|
45226
45427
|
if (!value) return void 0;
|
|
45227
|
-
const
|
|
45428
|
+
const userLocale = getValidUserLocale(USER_LOCALE);
|
|
45429
|
+
const formattedValue = Number(value).toLocaleString(userLocale);
|
|
45228
45430
|
return `${currency} ${formattedValue}`;
|
|
45229
45431
|
};
|
|
45230
45432
|
const formatDataForSummary = (data, i18n, datasetUtils) => {
|
|
@@ -45295,7 +45497,7 @@ const canSubmit$1 = (data) => mandatoryApiFields.HIGH_EXPOSURE.every((detail) =>
|
|
|
45295
45497
|
const value = getProp(data, detail);
|
|
45296
45498
|
return !isEmpty$1(value);
|
|
45297
45499
|
});
|
|
45298
|
-
const logger$
|
|
45500
|
+
const logger$j = createLogger("LegalFormField");
|
|
45299
45501
|
function LegalFormField({
|
|
45300
45502
|
name = "legalForm",
|
|
45301
45503
|
data,
|
|
@@ -45333,7 +45535,7 @@ function LegalFormField({
|
|
|
45333
45535
|
}));
|
|
45334
45536
|
setLegalForms(legalFormsResponse);
|
|
45335
45537
|
}
|
|
45336
|
-
}).catch(() => logger$
|
|
45538
|
+
}).catch(() => logger$j.error);
|
|
45337
45539
|
}, [countryCode]);
|
|
45338
45540
|
return /* @__PURE__ */ jsx(
|
|
45339
45541
|
Field,
|
|
@@ -45359,7 +45561,7 @@ function LegalFormField({
|
|
|
45359
45561
|
}
|
|
45360
45562
|
);
|
|
45361
45563
|
}
|
|
45362
|
-
const logger$
|
|
45564
|
+
const logger$i = createLogger("NaceCodeField");
|
|
45363
45565
|
function NaceCodeField({
|
|
45364
45566
|
name = "naceCode",
|
|
45365
45567
|
data,
|
|
@@ -45379,7 +45581,7 @@ function NaceCodeField({
|
|
|
45379
45581
|
if (response) {
|
|
45380
45582
|
setNaceCodes(response);
|
|
45381
45583
|
}
|
|
45382
|
-
}).catch(() => logger$
|
|
45584
|
+
}).catch(() => logger$i.error);
|
|
45383
45585
|
}, []);
|
|
45384
45586
|
const handleChangeForNaceCode = (e) => {
|
|
45385
45587
|
var _a2;
|
|
@@ -45967,6 +46169,7 @@ function HighExposureBasicCompanyInformation({
|
|
|
45967
46169
|
)
|
|
45968
46170
|
] });
|
|
45969
46171
|
}
|
|
46172
|
+
const OPTIONAL_ADDRESS_FIELDS = ["otherAddressInformation"];
|
|
45970
46173
|
function HighExposureRegisteredAddress({
|
|
45971
46174
|
formUtils,
|
|
45972
46175
|
valid,
|
|
@@ -45975,7 +46178,6 @@ function HighExposureRegisteredAddress({
|
|
|
45975
46178
|
handleChangeFor,
|
|
45976
46179
|
legalEntity,
|
|
45977
46180
|
sectionHeading,
|
|
45978
|
-
country,
|
|
45979
46181
|
handleAddressSearch,
|
|
45980
46182
|
handleFindAddress,
|
|
45981
46183
|
formId,
|
|
@@ -45988,13 +46190,18 @@ function HighExposureRegisteredAddress({
|
|
|
45988
46190
|
const { parentCompany, ultimateParentCompany } = useGlobalData();
|
|
45989
46191
|
const data = formId === "parentCompany" ? parentCompany : ultimateParentCompany;
|
|
45990
46192
|
const addressCountry = (_a2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a2.country;
|
|
45991
|
-
const addressSchema =
|
|
45992
|
-
|
|
45993
|
-
|
|
45994
|
-
|
|
45995
|
-
|
|
45996
|
-
|
|
46193
|
+
const addressSchema = useMemo(() => {
|
|
46194
|
+
return getAddressSchemaForCountry(addressCountry).filter((field) => {
|
|
46195
|
+
if (addressCountry) {
|
|
46196
|
+
return !COUNTRIES_WITH_STATES_DATASET.includes(addressCountry) ? field !== "stateOrProvince" : true;
|
|
46197
|
+
}
|
|
46198
|
+
return true;
|
|
46199
|
+
});
|
|
46200
|
+
}, [addressCountry]);
|
|
45997
46201
|
const handleRegistrationAddressChange = (state) => {
|
|
46202
|
+
if (!state.data.country) {
|
|
46203
|
+
state.data.country = addressCountry;
|
|
46204
|
+
}
|
|
45998
46205
|
handleChangeFor("registrationAddress")(state.data);
|
|
45999
46206
|
if (setValid) {
|
|
46000
46207
|
setValid("registrationAddress", Boolean(state.isValid));
|
|
@@ -46053,7 +46260,7 @@ function HighExposureRegisteredAddress({
|
|
|
46053
46260
|
labels: addressCountry ? getAddressSchemaLabelsByCountry(addressCountry) : void 0,
|
|
46054
46261
|
countryCode: addressCountry,
|
|
46055
46262
|
requiredFields: addressSchema,
|
|
46056
|
-
optionalFields:
|
|
46263
|
+
optionalFields: OPTIONAL_ADDRESS_FIELDS,
|
|
46057
46264
|
onChange: handleRegistrationAddressChange,
|
|
46058
46265
|
handleAddressSearch,
|
|
46059
46266
|
handleFindAddress,
|
|
@@ -46064,7 +46271,7 @@ function HighExposureRegisteredAddress({
|
|
|
46064
46271
|
}
|
|
46065
46272
|
const parentCompanyFormId$1 = highExposureForms.parentCompany.formId;
|
|
46066
46273
|
function AdditionalFieldsForHighExposureParentCompany(props) {
|
|
46067
|
-
var _a2
|
|
46274
|
+
var _a2;
|
|
46068
46275
|
const {
|
|
46069
46276
|
shouldValidate,
|
|
46070
46277
|
data: highExposureParentCompanyDetailsData,
|
|
@@ -46131,7 +46338,6 @@ function AdditionalFieldsForHighExposureParentCompany(props) {
|
|
|
46131
46338
|
{
|
|
46132
46339
|
...props,
|
|
46133
46340
|
formId: parentCompanyFormId$1,
|
|
46134
|
-
country: (_a2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a2.country,
|
|
46135
46341
|
handleChangeFor: highExposureHandleChangeFor,
|
|
46136
46342
|
sectionHeading: "registeredAddress",
|
|
46137
46343
|
errors,
|
|
@@ -46162,7 +46368,7 @@ function AdditionalFieldsForHighExposureParentCompany(props) {
|
|
|
46162
46368
|
targetPage: HighExposurePagesEnums.PARENT_COMPANY_PAGE
|
|
46163
46369
|
}
|
|
46164
46370
|
),
|
|
46165
|
-
isEeaCountry((
|
|
46371
|
+
isEeaCountry((_a2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a2.country) && /* @__PURE__ */ jsx(
|
|
46166
46372
|
HighExposureFinancialInformation,
|
|
46167
46373
|
{
|
|
46168
46374
|
...props,
|
|
@@ -46263,7 +46469,6 @@ function AdditionalFieldsForHighExposureUltimateParentCompany(props) {
|
|
|
46263
46469
|
{
|
|
46264
46470
|
...props,
|
|
46265
46471
|
formId: ultimateParentCompanyFormId$1,
|
|
46266
|
-
country,
|
|
46267
46472
|
handleChangeFor: highExposureHandleChangeFor,
|
|
46268
46473
|
sectionHeading: "registeredAddress",
|
|
46269
46474
|
errors,
|
|
@@ -46348,9 +46553,8 @@ function HighExposureDropin(props) {
|
|
|
46348
46553
|
isStandaloneComponent,
|
|
46349
46554
|
handleHomeClick
|
|
46350
46555
|
} = props;
|
|
46351
|
-
const
|
|
46352
|
-
const [
|
|
46353
|
-
const [data, setData] = useState(dataFromResponse);
|
|
46556
|
+
const [defaultData, setDefaultData] = useState({});
|
|
46557
|
+
const [data, setData] = useState({});
|
|
46354
46558
|
useRef(null);
|
|
46355
46559
|
const logger2 = createLogger("UpdateLegalEntityForHighExposure");
|
|
46356
46560
|
const fetchParentEntity = async (rootEntity, associationType) => {
|
|
@@ -46366,6 +46570,7 @@ function HighExposureDropin(props) {
|
|
|
46366
46570
|
const fetchLegalEntities = useCallback(async () => {
|
|
46367
46571
|
var _a3;
|
|
46368
46572
|
try {
|
|
46573
|
+
const dataFromResponse = {};
|
|
46369
46574
|
dataFromResponse.company = mapLegalEntityToHighExposure(
|
|
46370
46575
|
rootLegalEntity
|
|
46371
46576
|
);
|
|
@@ -46374,36 +46579,48 @@ function HighExposureDropin(props) {
|
|
|
46374
46579
|
dataFromResponse.company
|
|
46375
46580
|
);
|
|
46376
46581
|
if ((_a3 = rootLegalEntity.entityAssociations) == null ? void 0 : _a3.length) {
|
|
46582
|
+
const hasParentEntity = rootLegalEntity.entityAssociations.some(
|
|
46583
|
+
(association) => association.type === "immediateParentCompany"
|
|
46584
|
+
);
|
|
46585
|
+
const hasUltimateParentEntity = rootLegalEntity.entityAssociations.some(
|
|
46586
|
+
(association) => association.type === "ultimateParentCompany"
|
|
46587
|
+
);
|
|
46377
46588
|
try {
|
|
46378
|
-
|
|
46379
|
-
|
|
46380
|
-
|
|
46381
|
-
|
|
46382
|
-
|
|
46383
|
-
|
|
46384
|
-
|
|
46385
|
-
|
|
46386
|
-
|
|
46387
|
-
|
|
46388
|
-
dataFromResponse.company
|
|
46589
|
+
if (hasParentEntity) {
|
|
46590
|
+
const parentEntity = await fetchParentEntity(rootLegalEntity, "immediateParentCompany");
|
|
46591
|
+
if (parentEntity) {
|
|
46592
|
+
dataFromResponse.parentCompany = mapLegalEntityToHighExposure(
|
|
46593
|
+
parentEntity
|
|
46594
|
+
);
|
|
46595
|
+
dataFromResponse.parentCompany = appendHighExposureData(
|
|
46596
|
+
parentEntity.organization,
|
|
46597
|
+
dataFromResponse.parentCompany
|
|
46598
|
+
);
|
|
46599
|
+
if (dataFromResponse.company) {
|
|
46600
|
+
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "Yes";
|
|
46601
|
+
}
|
|
46602
|
+
} else if (dataFromResponse.company) {
|
|
46603
|
+
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "No";
|
|
46389
46604
|
}
|
|
46390
|
-
} else if (dataFromResponse.company) {
|
|
46391
|
-
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "No";
|
|
46392
46605
|
}
|
|
46393
|
-
|
|
46394
|
-
|
|
46395
|
-
|
|
46396
|
-
|
|
46397
|
-
if (ultimateParentEntity) {
|
|
46398
|
-
dataFromResponse.ultimateParentCompany = mapLegalEntityToHighExposure(
|
|
46399
|
-
ultimateParentEntity
|
|
46400
|
-
);
|
|
46401
|
-
dataFromResponse.ultimateParentCompany = appendHighExposureData(
|
|
46402
|
-
ultimateParentEntity.organization,
|
|
46403
|
-
dataFromResponse.ultimateParentCompany
|
|
46606
|
+
if (hasUltimateParentEntity) {
|
|
46607
|
+
const ultimateParentEntity = await fetchParentEntity(
|
|
46608
|
+
rootLegalEntity,
|
|
46609
|
+
"ultimateParentCompany"
|
|
46404
46610
|
);
|
|
46405
|
-
if (
|
|
46406
|
-
dataFromResponse.
|
|
46611
|
+
if (ultimateParentEntity) {
|
|
46612
|
+
dataFromResponse.ultimateParentCompany = mapLegalEntityToHighExposure(
|
|
46613
|
+
ultimateParentEntity
|
|
46614
|
+
);
|
|
46615
|
+
dataFromResponse.ultimateParentCompany = appendHighExposureData(
|
|
46616
|
+
ultimateParentEntity.organization,
|
|
46617
|
+
dataFromResponse.ultimateParentCompany
|
|
46618
|
+
);
|
|
46619
|
+
if (dataFromResponse.company) {
|
|
46620
|
+
dataFromResponse.company.isParentOwnedByAnotherCompany = "Yes";
|
|
46621
|
+
}
|
|
46622
|
+
} else if (dataFromResponse.company) {
|
|
46623
|
+
dataFromResponse.company.isParentOwnedByAnotherCompany = "No";
|
|
46407
46624
|
}
|
|
46408
46625
|
} else if (dataFromResponse.company) {
|
|
46409
46626
|
dataFromResponse.company.isParentOwnedByAnotherCompany = "No";
|
|
@@ -46790,7 +47007,8 @@ const additionalPersonalDetailsValidators = ({
|
|
|
46790
47007
|
idNumberExempt,
|
|
46791
47008
|
idNumber,
|
|
46792
47009
|
existingIdNumber,
|
|
46793
|
-
formVerificationErrors
|
|
47010
|
+
formVerificationErrors,
|
|
47011
|
+
i18n
|
|
46794
47012
|
}) => ({
|
|
46795
47013
|
birthDate: (() => {
|
|
46796
47014
|
const baseValidators = [
|
|
@@ -46828,7 +47046,16 @@ const additionalPersonalDetailsValidators = ({
|
|
|
46828
47046
|
defaultFieldMetadata$1
|
|
46829
47047
|
)) == null ? void 0 : _a2.validators;
|
|
46830
47048
|
})(),
|
|
46831
|
-
...nomineeDecisionMakerRoleValidationRules
|
|
47049
|
+
...nomineeDecisionMakerRoleValidationRules,
|
|
47050
|
+
...addressValidators({
|
|
47051
|
+
isExperimentEnabled,
|
|
47052
|
+
country,
|
|
47053
|
+
i18n,
|
|
47054
|
+
addressType: "residentialAddress"
|
|
47055
|
+
})
|
|
47056
|
+
});
|
|
47057
|
+
const basicDetailsValidators = () => ({
|
|
47058
|
+
...contactDetailsValidationRules
|
|
46832
47059
|
});
|
|
46833
47060
|
const REQUIRED = "REQUIRED";
|
|
46834
47061
|
const ID_NUMBER_EXEMPT_COUNTRIES = [
|
|
@@ -46851,6 +47078,15 @@ const DECISION_MAKER_TYPES_WITH_JOBTITLE = [
|
|
|
46851
47078
|
DecisionMakerType.SIGNATORY,
|
|
46852
47079
|
DecisionMakerType.CONTROLLING_PERSON
|
|
46853
47080
|
];
|
|
47081
|
+
const COUNTRIES_WITH_FIRST_ATTEMPT_ID_DOCUMENT_EXCEPTION = [
|
|
47082
|
+
CountryCodes.UnitedStates,
|
|
47083
|
+
CountryCodes.UnitedKingdom,
|
|
47084
|
+
CountryCodes.Austria,
|
|
47085
|
+
CountryCodes.Denmark,
|
|
47086
|
+
CountryCodes.Germany,
|
|
47087
|
+
CountryCodes.Italy,
|
|
47088
|
+
CountryCodes.Norway
|
|
47089
|
+
];
|
|
46854
47090
|
const IndividualOnfidoRules = ({
|
|
46855
47091
|
data,
|
|
46856
47092
|
country,
|
|
@@ -46892,12 +47128,9 @@ const IndividualOnfidoRules = ({
|
|
|
46892
47128
|
return REQUIRED;
|
|
46893
47129
|
}
|
|
46894
47130
|
},
|
|
46895
|
-
idDocumentIfIdNumberExempted: () => {
|
|
46896
|
-
return REQUIRED;
|
|
46897
|
-
},
|
|
46898
47131
|
idFrontPageIfManualUpload: () => {
|
|
46899
|
-
var _a2, _b2
|
|
46900
|
-
if (((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification" &&
|
|
47132
|
+
var _a2, _b2;
|
|
47133
|
+
if (((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification" && Boolean((_b2 = data == null ? void 0 : data.manualIdUpload) == null ? void 0 : _b2.idDocumentType)) {
|
|
46901
47134
|
return REQUIRED;
|
|
46902
47135
|
}
|
|
46903
47136
|
},
|
|
@@ -46905,8 +47138,8 @@ const IndividualOnfidoRules = ({
|
|
|
46905
47138
|
var _a2;
|
|
46906
47139
|
const idDocumentOption = idDocumentTypeOptions.find(
|
|
46907
47140
|
({ id }) => {
|
|
46908
|
-
var _a3
|
|
46909
|
-
return id === ((
|
|
47141
|
+
var _a3;
|
|
47142
|
+
return id === ((_a3 = data.manualIdUpload) == null ? void 0 : _a3.idDocumentType);
|
|
46910
47143
|
}
|
|
46911
47144
|
);
|
|
46912
47145
|
if (((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification" && (idDocumentOption == null ? void 0 : idDocumentOption.hasBackPage)) {
|
|
@@ -46972,6 +47205,17 @@ const IndividualOnfidoRules = ({
|
|
|
46972
47205
|
isUsingInstantVerification: () => {
|
|
46973
47206
|
var _a2;
|
|
46974
47207
|
return ((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "instantVerification" ? REQUIRED : void 0;
|
|
47208
|
+
},
|
|
47209
|
+
manualIdDocumentRequired: () => {
|
|
47210
|
+
var _a2, _b2;
|
|
47211
|
+
const isManualFlow = ((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification";
|
|
47212
|
+
if (!isManualFlow) return void 0;
|
|
47213
|
+
const country2 = (_b2 = data.additionalPersonalDetails) == null ? void 0 : _b2.country;
|
|
47214
|
+
if (!country2) return REQUIRED;
|
|
47215
|
+
return COUNTRIES_WITH_FIRST_ATTEMPT_ID_DOCUMENT_EXCEPTION.includes(country2) ? void 0 : REQUIRED;
|
|
47216
|
+
},
|
|
47217
|
+
idVerificationRequired: () => {
|
|
47218
|
+
return REQUIRED;
|
|
46975
47219
|
}
|
|
46976
47220
|
});
|
|
46977
47221
|
const TypeOfIdentity = ({
|
|
@@ -47252,7 +47496,6 @@ const additionalIdentityInfoFields = [
|
|
|
47252
47496
|
"issuerState",
|
|
47253
47497
|
"expiryDate"
|
|
47254
47498
|
];
|
|
47255
|
-
const ADDITIONAL_PERSONAL_DETAILS_FORM_ID = "additionalPersonalDetails";
|
|
47256
47499
|
const additionalPersonalDetailsFields = [
|
|
47257
47500
|
"birthDate",
|
|
47258
47501
|
...idNumberFields,
|
|
@@ -47284,12 +47527,6 @@ function AdditionalPersonalDetails(props) {
|
|
|
47284
47527
|
} = props;
|
|
47285
47528
|
const country = (data == null ? void 0 : data.country) ?? defaultCountry;
|
|
47286
47529
|
const isIndividual = taskType === TaskTypes.INDIVIDUAL;
|
|
47287
|
-
const addressSchema = useMemo(
|
|
47288
|
-
() => getAddressSchemaForCountry(country).filter(
|
|
47289
|
-
(field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
|
|
47290
|
-
),
|
|
47291
|
-
[country]
|
|
47292
|
-
);
|
|
47293
47530
|
const handleFieldChange = useCallback(
|
|
47294
47531
|
(fieldName, mode = "input") => handleChangeFor(fieldName, "additionalPersonalDetails", mode),
|
|
47295
47532
|
[handleChangeFor]
|
|
@@ -47300,6 +47537,7 @@ function AdditionalPersonalDetails(props) {
|
|
|
47300
47537
|
errors,
|
|
47301
47538
|
fieldValidationErrors
|
|
47302
47539
|
);
|
|
47540
|
+
const addressProps = getFieldProps(props, addressFields);
|
|
47303
47541
|
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__personal-details", "aria-describedby": "ariaErrorField", children: [
|
|
47304
47542
|
/* @__PURE__ */ jsx(FormHeader, { heading }),
|
|
47305
47543
|
/* @__PURE__ */ jsx(
|
|
@@ -47333,15 +47571,13 @@ function AdditionalPersonalDetails(props) {
|
|
|
47333
47571
|
/* @__PURE__ */ jsx(
|
|
47334
47572
|
Address,
|
|
47335
47573
|
{
|
|
47336
|
-
|
|
47574
|
+
...addressProps,
|
|
47337
47575
|
addressType: "residentialAddress",
|
|
47338
|
-
data,
|
|
47339
47576
|
errors,
|
|
47340
47577
|
valid,
|
|
47341
47578
|
fieldValidationErrors,
|
|
47342
47579
|
hideCountry: true,
|
|
47343
47580
|
labels: getAddressSchemaLabelsByCountry(country),
|
|
47344
|
-
requiredFields: addressSchema,
|
|
47345
47581
|
shouldValidate,
|
|
47346
47582
|
optionalFields: ["otherAddressInformation"],
|
|
47347
47583
|
handleFieldChange,
|
|
@@ -47597,7 +47833,7 @@ const listToRecord = (list2, getValue) => list2.reduce(
|
|
|
47597
47833
|
const conflictRowTable = "adyen-kyc-conflict-row-table";
|
|
47598
47834
|
const conflictRowList = "adyen-kyc-conflict-row-list";
|
|
47599
47835
|
const conflictRowListOptionLabel = "adyen-kyc-conflict-row-list-option-label";
|
|
47600
|
-
const styles$
|
|
47836
|
+
const styles$8 = {
|
|
47601
47837
|
conflictRowTable,
|
|
47602
47838
|
conflictRowList,
|
|
47603
47839
|
conflictRowListOptionLabel
|
|
@@ -47623,7 +47859,7 @@ const ConflictRow = ({
|
|
|
47623
47859
|
}
|
|
47624
47860
|
}, [hasOnlyProvided, hasOnlyDetected, onSelect, selected]);
|
|
47625
47861
|
if (hasOnlyProvided || hasOnlyDetected) return;
|
|
47626
|
-
return showAs === "listItem" ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
47862
|
+
return showAs === "listItem" ? /* @__PURE__ */ jsxs("div", { className: styles$8.conflictRowList, children: [
|
|
47627
47863
|
/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: i18n.get(label) }) }),
|
|
47628
47864
|
/* @__PURE__ */ jsxs("dd", { children: [
|
|
47629
47865
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -47632,7 +47868,7 @@ const ConflictRow = ({
|
|
|
47632
47868
|
{
|
|
47633
47869
|
variant: "caption",
|
|
47634
47870
|
color: "tertiary",
|
|
47635
|
-
className: styles$
|
|
47871
|
+
className: styles$8.conflictRowListOptionLabel,
|
|
47636
47872
|
children: i18n.get("original")
|
|
47637
47873
|
}
|
|
47638
47874
|
),
|
|
@@ -47652,7 +47888,7 @@ const ConflictRow = ({
|
|
|
47652
47888
|
{
|
|
47653
47889
|
variant: "caption",
|
|
47654
47890
|
color: "tertiary",
|
|
47655
|
-
className: styles$
|
|
47891
|
+
className: styles$8.conflictRowListOptionLabel,
|
|
47656
47892
|
children: i18n.get("detected")
|
|
47657
47893
|
}
|
|
47658
47894
|
),
|
|
@@ -47667,7 +47903,7 @@ const ConflictRow = ({
|
|
|
47667
47903
|
)
|
|
47668
47904
|
] })
|
|
47669
47905
|
] })
|
|
47670
|
-
] }) : /* @__PURE__ */ jsxs("tr", { className: styles$
|
|
47906
|
+
] }) : /* @__PURE__ */ jsxs("tr", { className: styles$8.conflictRowTable, children: [
|
|
47671
47907
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: i18n.get(label) }) }),
|
|
47672
47908
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
|
|
47673
47909
|
RadioWithLabel,
|
|
@@ -47693,7 +47929,7 @@ const dataConflictsWrapper = "adyen-kyc-data-conflicts-wrapper";
|
|
|
47693
47929
|
const dataConflictsHeader = "adyen-kyc-data-conflicts-header";
|
|
47694
47930
|
const dataConflictsTable = "adyen-kyc-data-conflicts-table";
|
|
47695
47931
|
const dataConflictsList = "adyen-kyc-data-conflicts-list";
|
|
47696
|
-
const styles$
|
|
47932
|
+
const styles$7 = {
|
|
47697
47933
|
dataConflictsWrapper,
|
|
47698
47934
|
dataConflictsHeader,
|
|
47699
47935
|
dataConflictsTable,
|
|
@@ -47744,13 +47980,13 @@ const DataConflictsModal = ({
|
|
|
47744
47980
|
size: "medium",
|
|
47745
47981
|
onClose: () => setShowCancelModal(true),
|
|
47746
47982
|
children: [
|
|
47747
|
-
/* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
47748
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
47983
|
+
/* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$7.dataConflictsWrapper, children: [
|
|
47984
|
+
/* @__PURE__ */ jsxs("div", { className: styles$7.dataConflictsHeader, children: [
|
|
47749
47985
|
/* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h1", children: i18n.get(title) }),
|
|
47750
47986
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: i18n.get(explanation) })
|
|
47751
47987
|
] }),
|
|
47752
47988
|
showError ? /* @__PURE__ */ jsx(Alert, { variant: "error", title: i18n.get("chooseTheCorrectDetailsBeforeProceeding") }) : void 0,
|
|
47753
|
-
/* @__PURE__ */ jsx("dl", { className: styles$
|
|
47989
|
+
/* @__PURE__ */ jsx("dl", { className: styles$7.dataConflictsList, children: keysOf(conflictItems).map((property) => /* @__PURE__ */ jsx(
|
|
47754
47990
|
ConflictRow,
|
|
47755
47991
|
{
|
|
47756
47992
|
showAs: "listItem",
|
|
@@ -47763,7 +47999,7 @@ const DataConflictsModal = ({
|
|
|
47763
47999
|
},
|
|
47764
48000
|
property
|
|
47765
48001
|
)) }),
|
|
47766
|
-
/* @__PURE__ */ jsxs("table", { className: styles$
|
|
48002
|
+
/* @__PURE__ */ jsxs("table", { className: styles$7.dataConflictsTable, children: [
|
|
47767
48003
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
47768
48004
|
/* @__PURE__ */ jsx("th", {}),
|
|
47769
48005
|
/* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("original") }) }),
|
|
@@ -47856,12 +48092,12 @@ const formatId = (id, i18n) => {
|
|
|
47856
48092
|
}
|
|
47857
48093
|
};
|
|
47858
48094
|
const verificationDisclaimer = "adyen-kyc-verification-disclaimer";
|
|
47859
|
-
const styles$
|
|
48095
|
+
const styles$6 = {
|
|
47860
48096
|
verificationDisclaimer
|
|
47861
48097
|
};
|
|
47862
48098
|
const IdVerificationDisclaimer = () => {
|
|
47863
48099
|
const { i18n } = useI18nContext();
|
|
47864
|
-
return /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "tertiary", className: styles$
|
|
48100
|
+
return /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "tertiary", className: styles$6.verificationDisclaimer, children: [
|
|
47865
48101
|
i18n.get("ifYouChooseToUseOnfido"),
|
|
47866
48102
|
" ",
|
|
47867
48103
|
/* @__PURE__ */ jsx(Link, { href: "https://onfido.com/privacy/", external: true, inline: true, children: i18n.get("onfidoPrivacyPolicy") }),
|
|
@@ -47874,25 +48110,25 @@ const IdVerificationDisclaimer = () => {
|
|
|
47874
48110
|
const verificationHeader = "adyen-kyc-verification-header";
|
|
47875
48111
|
const verificationHeaderImage = "adyen-kyc-verification-header-image";
|
|
47876
48112
|
const verificationHeaderContent = "adyen-kyc-verification-header-content";
|
|
47877
|
-
const styles$
|
|
48113
|
+
const styles$5 = {
|
|
47878
48114
|
verificationHeader,
|
|
47879
48115
|
verificationHeaderImage,
|
|
47880
48116
|
verificationHeaderContent
|
|
47881
48117
|
};
|
|
47882
48118
|
const IdVerificationHeader = () => {
|
|
47883
48119
|
const { i18n } = useI18nContext();
|
|
47884
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
48120
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$5.verificationHeader, children: [
|
|
47885
48121
|
/* @__PURE__ */ jsx(
|
|
47886
48122
|
Svg,
|
|
47887
48123
|
{
|
|
47888
|
-
className: styles$
|
|
48124
|
+
className: styles$5.verificationHeaderImage,
|
|
47889
48125
|
type: "image",
|
|
47890
48126
|
name: "passport-front-green",
|
|
47891
48127
|
title: i18n.get("instantIDVerificationDescription")
|
|
47892
48128
|
}
|
|
47893
48129
|
),
|
|
47894
48130
|
/* @__PURE__ */ jsx(Typography, { variant: "title-l", children: i18n.get("identityVerification") }),
|
|
47895
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "body", color: "primary", className: styles$
|
|
48131
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body", color: "primary", className: styles$5.verificationHeaderContent, children: [
|
|
47896
48132
|
i18n.get("takeOrUploadAPhoto"),
|
|
47897
48133
|
" ",
|
|
47898
48134
|
/* @__PURE__ */ jsx(Link, { href: "https://onfido.com", external: true, inline: true, children: i18n.get("onfido") })
|
|
@@ -47901,7 +48137,7 @@ const IdVerificationHeader = () => {
|
|
|
47901
48137
|
};
|
|
47902
48138
|
const verifyOnfidoContainer = "adyen-kyc-verify-onfido-container";
|
|
47903
48139
|
const verifyOnfidoContent = "adyen-kyc-verify-onfido-content";
|
|
47904
|
-
const styles$
|
|
48140
|
+
const styles$4 = {
|
|
47905
48141
|
verifyOnfidoContainer,
|
|
47906
48142
|
verifyOnfidoContent
|
|
47907
48143
|
};
|
|
@@ -47959,7 +48195,7 @@ const fromIndividualOnfidoConflictSchema = ({
|
|
|
47959
48195
|
...address
|
|
47960
48196
|
}
|
|
47961
48197
|
});
|
|
47962
|
-
const logger$
|
|
48198
|
+
const logger$h = createLogger("mapExtractionResultToSchema");
|
|
47963
48199
|
const mapExtractionResultToSchema = (result) => {
|
|
47964
48200
|
const {
|
|
47965
48201
|
firstName,
|
|
@@ -48006,7 +48242,7 @@ const mapExtractionResultToSchema = (result) => {
|
|
|
48006
48242
|
schema.additionalPersonalDetails.idNumber = documentNumber;
|
|
48007
48243
|
break;
|
|
48008
48244
|
default:
|
|
48009
|
-
logger$
|
|
48245
|
+
logger$h.warn(`document type "${documentType}" not recognised`);
|
|
48010
48246
|
break;
|
|
48011
48247
|
}
|
|
48012
48248
|
}
|
|
@@ -48045,12 +48281,12 @@ const OnfidoVerificationModal = ({
|
|
|
48045
48281
|
}
|
|
48046
48282
|
) }) });
|
|
48047
48283
|
const uploadedDocument = "adyen-kyc-uploaded-document";
|
|
48048
|
-
const styles$
|
|
48284
|
+
const styles$3 = {
|
|
48049
48285
|
uploadedDocument
|
|
48050
48286
|
};
|
|
48051
48287
|
const UploadedDocument = ({ document: document2, onDelete, onUpdate }) => {
|
|
48052
48288
|
const { i18n } = useI18nContext();
|
|
48053
|
-
return /* @__PURE__ */ jsxs("article", { className: styles$
|
|
48289
|
+
return /* @__PURE__ */ jsxs("article", { className: styles$3.uploadedDocument, children: [
|
|
48054
48290
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
48055
48291
|
/* @__PURE__ */ jsx(Typography, { el: "h4", variant: "title", children: i18n.get(document2.idDocumentType) }),
|
|
48056
48292
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("uploadedOn", {
|
|
@@ -48074,7 +48310,7 @@ const UploadedDocument = ({ document: document2, onDelete, onUpdate }) => {
|
|
|
48074
48310
|
/* @__PURE__ */ jsx(Button, { onClick: onUpdate, variant: "secondary", children: i18n.get("update") })
|
|
48075
48311
|
] });
|
|
48076
48312
|
};
|
|
48077
|
-
const logger$
|
|
48313
|
+
const logger$g = createLogger("IdVerificationMethod");
|
|
48078
48314
|
const idVerificationMethodFields = [
|
|
48079
48315
|
"idVerificationMethod",
|
|
48080
48316
|
"ocrExtractedData",
|
|
@@ -48140,7 +48376,7 @@ function IdVerificationMethod({ legalEntityId, handlers }) {
|
|
|
48140
48376
|
}
|
|
48141
48377
|
};
|
|
48142
48378
|
const handleOnfidoError = (error2) => {
|
|
48143
|
-
logger$
|
|
48379
|
+
logger$g.error("Onfido error", error2);
|
|
48144
48380
|
setError("weCouldNotReachOnfido");
|
|
48145
48381
|
setStatus("ready");
|
|
48146
48382
|
};
|
|
@@ -48168,10 +48404,10 @@ function IdVerificationMethod({ legalEntityId, handlers }) {
|
|
|
48168
48404
|
handlers.handleUpdateDocument();
|
|
48169
48405
|
};
|
|
48170
48406
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
48171
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
48407
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$4.verifyOnfidoContainer, children: [
|
|
48172
48408
|
/* @__PURE__ */ jsx(IdVerificationHeader, {}),
|
|
48173
48409
|
error ? /* @__PURE__ */ jsx(Alert, { variant: "error", title: i18n.get(error) }) : void 0,
|
|
48174
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
48410
|
+
/* @__PURE__ */ jsx("div", { className: styles$4.verifyOnfidoContent, children: hasExistingDocument ? /* @__PURE__ */ jsx(
|
|
48175
48411
|
UploadedDocument,
|
|
48176
48412
|
{
|
|
48177
48413
|
document: existingDocument,
|
|
@@ -48240,7 +48476,27 @@ function IdVerificationMethod({ legalEntityId, handlers }) {
|
|
|
48240
48476
|
) : void 0
|
|
48241
48477
|
] });
|
|
48242
48478
|
}
|
|
48243
|
-
const
|
|
48479
|
+
const ManualIdUpload = () => {
|
|
48480
|
+
var _a2, _b2;
|
|
48481
|
+
const { form } = useFormContext();
|
|
48482
|
+
const { handleChangeFor } = form;
|
|
48483
|
+
const data = form.data.manualIdUpload;
|
|
48484
|
+
const valid = form.valid.manualIdUpload;
|
|
48485
|
+
const errors = form.errors.manualIdUpload;
|
|
48486
|
+
const name = `${(_a2 = form.data.basicDetails) == null ? void 0 : _a2.firstName} ${(_b2 = form.data.basicDetails) == null ? void 0 : _b2.lastName}`;
|
|
48487
|
+
const handleFieldChange = (fieldName, mode) => handleChangeFor(fieldName, "manualIdUpload", mode);
|
|
48488
|
+
return /* @__PURE__ */ jsx(
|
|
48489
|
+
IdDocumentManualUpload,
|
|
48490
|
+
{
|
|
48491
|
+
data,
|
|
48492
|
+
valid,
|
|
48493
|
+
errors,
|
|
48494
|
+
name,
|
|
48495
|
+
handleFieldChange
|
|
48496
|
+
}
|
|
48497
|
+
);
|
|
48498
|
+
};
|
|
48499
|
+
const logger$f = createLogger("IndividualOnfido");
|
|
48244
48500
|
const individualOnfidoForms = {
|
|
48245
48501
|
basicDetails: {
|
|
48246
48502
|
formId: "basicDetails",
|
|
@@ -48256,11 +48512,17 @@ const individualOnfidoForms = {
|
|
|
48256
48512
|
formId: "additionalPersonalDetails",
|
|
48257
48513
|
formName: "additionalPersonalDetails",
|
|
48258
48514
|
fields: additionalPersonalDetailsFields
|
|
48515
|
+
},
|
|
48516
|
+
manualIdUpload: {
|
|
48517
|
+
formId: "manualIdUpload",
|
|
48518
|
+
formName: "idDocument",
|
|
48519
|
+
fields: idDocumentUploadFields
|
|
48259
48520
|
}
|
|
48260
48521
|
};
|
|
48261
48522
|
const basicDetailsFormID = individualOnfidoForms.basicDetails.formId;
|
|
48262
48523
|
const additionalPersonalDetailsFormID = individualOnfidoForms.additionalPersonalDetails.formId;
|
|
48263
48524
|
const idVerificationMethodFormID = individualOnfidoForms.idVerificationMethod.formId;
|
|
48525
|
+
const manualIdUploadFormID = individualOnfidoForms.manualIdUpload.formId;
|
|
48264
48526
|
function IndividualOnfido(props) {
|
|
48265
48527
|
var _a2, _b2;
|
|
48266
48528
|
const { i18n } = useI18nContext();
|
|
@@ -48295,10 +48557,10 @@ function IndividualOnfido(props) {
|
|
|
48295
48557
|
gotoFormByFormId(additionalPersonalDetailsFormID);
|
|
48296
48558
|
};
|
|
48297
48559
|
const handleDeleteDocument = () => {
|
|
48298
|
-
logger$
|
|
48560
|
+
logger$f.info("handle delete document");
|
|
48299
48561
|
};
|
|
48300
48562
|
const handleUpdateDocument = () => {
|
|
48301
|
-
logger$
|
|
48563
|
+
logger$f.info("handle update document");
|
|
48302
48564
|
};
|
|
48303
48565
|
useEffect(() => {
|
|
48304
48566
|
var _a3;
|
|
@@ -48310,55 +48572,65 @@ function IndividualOnfido(props) {
|
|
|
48310
48572
|
})
|
|
48311
48573
|
);
|
|
48312
48574
|
}, [(_b2 = data == null ? void 0 : data.basicDetails) == null ? void 0 : _b2.role, parentLegalEntity == null ? void 0 : parentLegalEntity.capabilities, taskType]);
|
|
48313
|
-
const renderActiveForm = (activeForm) =>
|
|
48314
|
-
activeForm.formId
|
|
48315
|
-
|
|
48316
|
-
|
|
48317
|
-
|
|
48318
|
-
|
|
48319
|
-
|
|
48320
|
-
|
|
48321
|
-
|
|
48322
|
-
|
|
48323
|
-
|
|
48324
|
-
|
|
48325
|
-
|
|
48326
|
-
|
|
48327
|
-
|
|
48328
|
-
|
|
48329
|
-
|
|
48330
|
-
|
|
48331
|
-
|
|
48332
|
-
|
|
48333
|
-
|
|
48334
|
-
|
|
48335
|
-
|
|
48336
|
-
|
|
48337
|
-
|
|
48338
|
-
|
|
48339
|
-
|
|
48340
|
-
|
|
48341
|
-
|
|
48342
|
-
|
|
48343
|
-
|
|
48344
|
-
|
|
48345
|
-
|
|
48346
|
-
|
|
48347
|
-
|
|
48348
|
-
|
|
48349
|
-
|
|
48350
|
-
|
|
48351
|
-
|
|
48352
|
-
|
|
48353
|
-
|
|
48354
|
-
|
|
48355
|
-
|
|
48356
|
-
|
|
48357
|
-
|
|
48358
|
-
|
|
48359
|
-
|
|
48360
|
-
|
|
48361
|
-
|
|
48575
|
+
const renderActiveForm = (activeForm) => {
|
|
48576
|
+
switch (activeForm.formId) {
|
|
48577
|
+
case basicDetailsFormID:
|
|
48578
|
+
return /* @__PURE__ */ jsx(
|
|
48579
|
+
BasicDetails,
|
|
48580
|
+
{
|
|
48581
|
+
...basicDetailsFormProps,
|
|
48582
|
+
data: (data == null ? void 0 : data.basicDetails) ?? {},
|
|
48583
|
+
heading: i18n.get("basicInformationFormName"),
|
|
48584
|
+
taskType,
|
|
48585
|
+
id: basicDetailsFormID,
|
|
48586
|
+
allowedRoles,
|
|
48587
|
+
capabilities,
|
|
48588
|
+
country: countryOfResidence,
|
|
48589
|
+
parentLegalEntity,
|
|
48590
|
+
trustedFieldsProvider,
|
|
48591
|
+
trustedRoles,
|
|
48592
|
+
errors: errors == null ? void 0 : errors.basicDetails,
|
|
48593
|
+
fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.basicDetails,
|
|
48594
|
+
valid: valid == null ? void 0 : valid.basicDetails
|
|
48595
|
+
}
|
|
48596
|
+
);
|
|
48597
|
+
case idVerificationMethodFormID:
|
|
48598
|
+
return /* @__PURE__ */ jsx(
|
|
48599
|
+
IdVerificationMethod,
|
|
48600
|
+
{
|
|
48601
|
+
legalEntityId,
|
|
48602
|
+
handlers: {
|
|
48603
|
+
handleContinueToAdditionalDetails,
|
|
48604
|
+
handleDeleteDocument,
|
|
48605
|
+
handleUpdateDocument,
|
|
48606
|
+
handleGetIdVerificationToken
|
|
48607
|
+
}
|
|
48608
|
+
}
|
|
48609
|
+
);
|
|
48610
|
+
case additionalPersonalDetailsFormID:
|
|
48611
|
+
return /* @__PURE__ */ jsx(
|
|
48612
|
+
AdditionalPersonalDetails,
|
|
48613
|
+
{
|
|
48614
|
+
...additionalPersonalDetailsFormProps,
|
|
48615
|
+
country: countryOfResidence,
|
|
48616
|
+
data: (data == null ? void 0 : data.additionalPersonalDetails) ?? {},
|
|
48617
|
+
heading: i18n.get("additionalPersonalDetails"),
|
|
48618
|
+
id: additionalPersonalDetailsFormID,
|
|
48619
|
+
errors: errors == null ? void 0 : errors.additionalPersonalDetails,
|
|
48620
|
+
fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.additionalPersonalDetails,
|
|
48621
|
+
valid: valid == null ? void 0 : valid.additionalPersonalDetails,
|
|
48622
|
+
handleAddressSearch,
|
|
48623
|
+
handleFindAddress,
|
|
48624
|
+
taskType
|
|
48625
|
+
}
|
|
48626
|
+
);
|
|
48627
|
+
case manualIdUploadFormID:
|
|
48628
|
+
return /* @__PURE__ */ jsx(ManualIdUpload, {});
|
|
48629
|
+
default:
|
|
48630
|
+
logger$f.warn(`Active form (${activeForm.formId}) is not supported'`);
|
|
48631
|
+
}
|
|
48632
|
+
};
|
|
48633
|
+
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-individual", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(propActiveForm) }) });
|
|
48362
48634
|
}
|
|
48363
48635
|
const mapIndividualOnfidoSchemaToLegalEntity = (individualOnfido) => {
|
|
48364
48636
|
var _a2, _b2;
|
|
@@ -48422,8 +48694,8 @@ const getIndividualSchemaFromAPI = {
|
|
|
48422
48694
|
const getAPISchemaFromIndividualSchema = {
|
|
48423
48695
|
...reverseObject(individualOnfidoBaseMapping)
|
|
48424
48696
|
};
|
|
48425
|
-
const parseConfiguration$2 = ({ matchingScenario }) =>
|
|
48426
|
-
const logger$
|
|
48697
|
+
const parseConfiguration$2 = ({ matchingScenario }) => parseIndividualOnfidoScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.INDIVIDUAL]);
|
|
48698
|
+
const logger$e = createLogger("IndividualOnfidoDropin");
|
|
48427
48699
|
function IndividualOnfidoDropin({
|
|
48428
48700
|
handleAddressSearch,
|
|
48429
48701
|
handleFindAddress,
|
|
@@ -48437,7 +48709,7 @@ function IndividualOnfidoDropin({
|
|
|
48437
48709
|
taskType = TaskTypes.INDIVIDUAL,
|
|
48438
48710
|
parentLegalEntity,
|
|
48439
48711
|
legalEntityResponse,
|
|
48440
|
-
taskName
|
|
48712
|
+
taskName,
|
|
48441
48713
|
handleCloseClick,
|
|
48442
48714
|
isTargetLegalEntityType,
|
|
48443
48715
|
country: parentCountry,
|
|
@@ -48452,7 +48724,7 @@ function IndividualOnfidoDropin({
|
|
|
48452
48724
|
trustedRoles,
|
|
48453
48725
|
isInstantVerificationEnabled = true
|
|
48454
48726
|
}) {
|
|
48455
|
-
var _a2, _b2, _c2, _d2;
|
|
48727
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
48456
48728
|
const { accountHolder, setAccountHolder, idVerificationProviderId } = useCoreContext();
|
|
48457
48729
|
const { isEmbeddedDropin } = useAuthContext();
|
|
48458
48730
|
const { i18n } = useI18nContext();
|
|
@@ -48474,12 +48746,8 @@ function IndividualOnfidoDropin({
|
|
|
48474
48746
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
48475
48747
|
const [existingAttachments, setExistingAttachments] = useState();
|
|
48476
48748
|
const [documents, setDocuments] = useState();
|
|
48477
|
-
const country =
|
|
48478
|
-
()
|
|
48479
|
-
var _a3;
|
|
48480
|
-
return ((_a3 = dataFromResponse == null ? void 0 : dataFromResponse.additionalPersonalDetails) == null ? void 0 : _a3.country) ?? parentCountry;
|
|
48481
|
-
},
|
|
48482
|
-
[(_a2 = dataFromResponse == null ? void 0 : dataFromResponse.additionalPersonalDetails) == null ? void 0 : _a2.country, parentCountry]
|
|
48749
|
+
const [country, setCountry] = useState(
|
|
48750
|
+
((_a2 = dataFromResponse == null ? void 0 : dataFromResponse.additionalPersonalDetails) == null ? void 0 : _a2.country) ?? parentCountry
|
|
48483
48751
|
);
|
|
48484
48752
|
const [hideFooter, setHideFooter] = useState(false);
|
|
48485
48753
|
const [derivedProps, setDerivedProps] = useState();
|
|
@@ -48496,8 +48764,9 @@ function IndividualOnfidoDropin({
|
|
|
48496
48764
|
}, []);
|
|
48497
48765
|
const individualFieldValidations = useCallback(
|
|
48498
48766
|
(data2) => {
|
|
48499
|
-
var _a3, _b3, _c3, _d3,
|
|
48767
|
+
var _a3, _b3, _c3, _d3, _e3, _f2;
|
|
48500
48768
|
return {
|
|
48769
|
+
basicDetails: basicDetailsValidators(),
|
|
48501
48770
|
additionalPersonalDetails: additionalPersonalDetailsValidators({
|
|
48502
48771
|
country: ((_a3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _a3.country) ?? country,
|
|
48503
48772
|
isExperimentEnabled,
|
|
@@ -48506,14 +48775,9 @@ function IndividualOnfidoDropin({
|
|
|
48506
48775
|
idNumberType: (_b3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _b3.typeOfIdentity,
|
|
48507
48776
|
idNumberExempt: (_c3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _c3.idNumberExempt,
|
|
48508
48777
|
idNumber: (_d3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _d3.idNumber,
|
|
48509
|
-
existingIdNumber: (
|
|
48510
|
-
formVerificationErrors: (_f2 = propProblems == null ? void 0 : propProblems.verificationErrors) == null ? void 0 : _f2.additionalPersonalDetails
|
|
48511
|
-
|
|
48512
|
-
address: addressValidators({
|
|
48513
|
-
isExperimentEnabled,
|
|
48514
|
-
country: ((_g2 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _g2.country) ?? country,
|
|
48515
|
-
i18n,
|
|
48516
|
-
addressType: "residentialAddress"
|
|
48778
|
+
existingIdNumber: (_e3 = dataFromResponse.additionalPersonalDetails) == null ? void 0 : _e3.idNumber,
|
|
48779
|
+
formVerificationErrors: (_f2 = propProblems == null ? void 0 : propProblems.verificationErrors) == null ? void 0 : _f2.additionalPersonalDetails,
|
|
48780
|
+
i18n
|
|
48517
48781
|
})
|
|
48518
48782
|
};
|
|
48519
48783
|
},
|
|
@@ -48527,14 +48791,17 @@ function IndividualOnfidoDropin({
|
|
|
48527
48791
|
taskType
|
|
48528
48792
|
]
|
|
48529
48793
|
);
|
|
48530
|
-
const { verifyIdNumber: verifyIdNumber2 } = useConfigurationApi();
|
|
48794
|
+
const { verifyIdNumber: verifyIdNumber2, validatePhoneNumber: validatePhoneNumber2 } = useConfigurationApi();
|
|
48531
48795
|
const individualFieldAsyncValidations = useCallback(
|
|
48532
48796
|
(data2) => ({
|
|
48797
|
+
basicDetails: {
|
|
48798
|
+
phoneNumber: getAsyncPhoneValidationRules(validatePhoneNumber2).phoneNumber
|
|
48799
|
+
},
|
|
48533
48800
|
additionalPersonalDetails: {
|
|
48534
48801
|
idNumber: getAsyncIdNumberValidationRule(verifyIdNumber2, data2 == null ? void 0 : data2.additionalPersonalDetails).idNumber
|
|
48535
48802
|
}
|
|
48536
48803
|
}),
|
|
48537
|
-
[verifyIdNumber2]
|
|
48804
|
+
[verifyIdNumber2, validatePhoneNumber2]
|
|
48538
48805
|
);
|
|
48539
48806
|
const defaultData = useMemo(() => {
|
|
48540
48807
|
if (!documents) return dataFromResponse;
|
|
@@ -48554,7 +48821,9 @@ function IndividualOnfidoDropin({
|
|
|
48554
48821
|
...derivedProps == null ? void 0 : derivedProps.requiredFields,
|
|
48555
48822
|
additionalPersonalDetails: [
|
|
48556
48823
|
...((_a3 = derivedProps == null ? void 0 : derivedProps.requiredFields) == null ? void 0 : _a3.additionalPersonalDetails) ?? [],
|
|
48557
|
-
...getAddressSchemaForCountry((_b3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _b3.country)
|
|
48824
|
+
...getAddressSchemaForCountry((_b3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _b3.country).filter(
|
|
48825
|
+
(field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
|
|
48826
|
+
)
|
|
48558
48827
|
]
|
|
48559
48828
|
// TODO see why the types aren't working properly
|
|
48560
48829
|
};
|
|
@@ -48570,6 +48839,10 @@ function IndividualOnfidoDropin({
|
|
|
48570
48839
|
handleUpdateDocument
|
|
48571
48840
|
);
|
|
48572
48841
|
const { data, requiredFields } = form;
|
|
48842
|
+
useEffect(() => {
|
|
48843
|
+
var _a3;
|
|
48844
|
+
setCountry(((_a3 = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _a3.country) ?? parentCountry);
|
|
48845
|
+
}, [(_d2 = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _d2.country, parentCountry]);
|
|
48573
48846
|
const getConfigurationData = useCallback(
|
|
48574
48847
|
() => getConfiguration2({
|
|
48575
48848
|
legalEntityType: LegalEntityType.INDIVIDUAL,
|
|
@@ -48699,11 +48972,11 @@ function IndividualOnfidoDropin({
|
|
|
48699
48972
|
);
|
|
48700
48973
|
if (!formattedDocuments || formattedDocuments.length === 0) {
|
|
48701
48974
|
if (existingAttachments == null ? void 0 : existingAttachments.length)
|
|
48702
|
-
logger$
|
|
48975
|
+
logger$e.log(
|
|
48703
48976
|
"User has already uploaded documents and is not changing them, nothing needs to be done"
|
|
48704
48977
|
);
|
|
48705
48978
|
else
|
|
48706
|
-
logger$
|
|
48979
|
+
logger$e.error(
|
|
48707
48980
|
`formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
|
|
48708
48981
|
);
|
|
48709
48982
|
return;
|
|
@@ -48758,7 +49031,7 @@ function IndividualOnfidoDropin({
|
|
|
48758
49031
|
clearToasts();
|
|
48759
49032
|
externalOnSubmit == null ? void 0 : externalOnSubmit(dataSubmitted);
|
|
48760
49033
|
} catch (e) {
|
|
48761
|
-
logger$
|
|
49034
|
+
logger$e.error("Failed to update individual", e);
|
|
48762
49035
|
if (isValidationError(e)) {
|
|
48763
49036
|
const validationErrors = processValidationErrors(e, TaskTypes.INDIVIDUAL);
|
|
48764
49037
|
setProblems({ ...problems, validationErrors });
|
|
@@ -48817,7 +49090,7 @@ function IndividualOnfidoDropin({
|
|
|
48817
49090
|
return summaryData;
|
|
48818
49091
|
};
|
|
48819
49092
|
const summaryOmittedKeys = [
|
|
48820
|
-
...((
|
|
49093
|
+
...((_e2 = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _e2.idNumberExempt) ? ["idNumber"] : []
|
|
48821
49094
|
];
|
|
48822
49095
|
const {
|
|
48823
49096
|
handleNextClick,
|
|
@@ -48841,7 +49114,7 @@ function IndividualOnfidoDropin({
|
|
|
48841
49114
|
return /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
|
|
48842
49115
|
FormWrapper,
|
|
48843
49116
|
{
|
|
48844
|
-
taskName:
|
|
49117
|
+
taskName: taskName ?? "individualDetails",
|
|
48845
49118
|
activeForm,
|
|
48846
49119
|
summary: {
|
|
48847
49120
|
data: formatDataForSummary2(),
|
|
@@ -48948,7 +49221,7 @@ const ClickAwayWrapper = ({ children: children2, onClickAway, ...divProps }) =>
|
|
|
48948
49221
|
return /* @__PURE__ */ jsx("div", { ref, ...divProps, children: children2 });
|
|
48949
49222
|
};
|
|
48950
49223
|
const actionsMenu = "adyen-kyc-actions-menu";
|
|
48951
|
-
const styles$
|
|
49224
|
+
const styles$2 = {
|
|
48952
49225
|
actionsMenu
|
|
48953
49226
|
};
|
|
48954
49227
|
const ActionsMenu = ({ options, open, setOpen }) => {
|
|
@@ -48966,7 +49239,7 @@ const ActionsMenu = ({ options, open, setOpen }) => {
|
|
|
48966
49239
|
},
|
|
48967
49240
|
label
|
|
48968
49241
|
));
|
|
48969
|
-
return open ? /* @__PURE__ */ jsx(ClickAwayWrapper, { onClickAway: () => setOpen(false), className: styles$
|
|
49242
|
+
return open ? /* @__PURE__ */ jsx(ClickAwayWrapper, { onClickAway: () => setOpen(false), className: styles$2.actionsMenu, role: "menu", children: menuItems }) : null;
|
|
48970
49243
|
};
|
|
48971
49244
|
const EntityAssociation = ({
|
|
48972
49245
|
name,
|
|
@@ -49316,7 +49589,7 @@ const DecisionMakers = ({
|
|
|
49316
49589
|
}
|
|
49317
49590
|
);
|
|
49318
49591
|
};
|
|
49319
|
-
const logger$
|
|
49592
|
+
const logger$d = createLogger("useExemptSettlor");
|
|
49320
49593
|
const useExemptSettlor = ({
|
|
49321
49594
|
trust,
|
|
49322
49595
|
handleGetLegalEntity
|
|
@@ -49334,7 +49607,7 @@ const useExemptSettlor = ({
|
|
|
49334
49607
|
);
|
|
49335
49608
|
useEffect(() => {
|
|
49336
49609
|
if (!(trust == null ? void 0 : trust.trust)) return;
|
|
49337
|
-
updateExemptSettlor(trust).catch(logger$
|
|
49610
|
+
updateExemptSettlor(trust).catch(logger$d.error);
|
|
49338
49611
|
}, [trust, updateExemptSettlor]);
|
|
49339
49612
|
return exemptSettlor;
|
|
49340
49613
|
};
|
|
@@ -50147,11 +50420,11 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
50147
50420
|
] });
|
|
50148
50421
|
};
|
|
50149
50422
|
const settlorExemptionReasonsList = "adyen-kyc-settlor-exemption-reasons-list";
|
|
50150
|
-
const styles$
|
|
50423
|
+
const styles$1 = {
|
|
50151
50424
|
settlorExemptionReasonsList
|
|
50152
50425
|
};
|
|
50153
50426
|
const formatRolesForSummary = (roles, i18n) => roles.map((role) => i18n.get(getRoleName(role))).join(", ");
|
|
50154
|
-
const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$
|
|
50427
|
+
const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$1.settlorExemptionReasonsList, children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: i18n.get(reason) }, reason)) });
|
|
50155
50428
|
const formatRoleAndEntityTypeSummary = (data, i18n, isOrganizationSettlorWithExemptionEnabled) => {
|
|
50156
50429
|
var _a2, _b2;
|
|
50157
50430
|
const { trustMemberType, roles } = data;
|
|
@@ -51459,10 +51732,10 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
|
|
|
51459
51732
|
return hasOwnEntityAssocation || !!hasOrganizationType;
|
|
51460
51733
|
};
|
|
51461
51734
|
const Introduction = lazy$1(
|
|
51462
|
-
async () => (await import("./Introduction-
|
|
51735
|
+
async () => (await import("./Introduction-DIW5vd8c.js")).Introduction
|
|
51463
51736
|
);
|
|
51464
51737
|
const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
51465
|
-
const logger$
|
|
51738
|
+
const logger$c = createLogger("DropinComposer");
|
|
51466
51739
|
const isOrganizationSettlorWithExemptionReasonEnabled = (country) => country === CountryCodes.Australia;
|
|
51467
51740
|
function DropinComposer({
|
|
51468
51741
|
legalEntityResponse,
|
|
@@ -51526,7 +51799,7 @@ function DropinComposer({
|
|
|
51526
51799
|
return args.handleGetTransferInstrument(currentTransferInstrumentId);
|
|
51527
51800
|
} catch (e) {
|
|
51528
51801
|
showToast({ label: i18n.get("failedToFetchPayoutAccount"), type: "error" });
|
|
51529
|
-
logger$
|
|
51802
|
+
logger$c.error(e);
|
|
51530
51803
|
}
|
|
51531
51804
|
},
|
|
51532
51805
|
enabled: !!currentTransferInstrumentId
|
|
@@ -51602,7 +51875,7 @@ function DropinComposer({
|
|
|
51602
51875
|
setPciStatus(response);
|
|
51603
51876
|
return response;
|
|
51604
51877
|
} catch {
|
|
51605
|
-
logger$
|
|
51878
|
+
logger$c.warn("failedToGetPciStatus");
|
|
51606
51879
|
}
|
|
51607
51880
|
}
|
|
51608
51881
|
return void 0;
|
|
@@ -51630,7 +51903,7 @@ function DropinComposer({
|
|
|
51630
51903
|
}, [additionalSalesChannels, i18n, rootLegalEntity.id, args.handleGetPciTemplate]);
|
|
51631
51904
|
useEffect(() => {
|
|
51632
51905
|
if (!taskTypes.includes(TaskTypes.PCI_DSS)) return;
|
|
51633
|
-
getPciTemplate2().catch(logger$
|
|
51906
|
+
getPciTemplate2().catch(logger$c.error);
|
|
51634
51907
|
}, [getPciTemplate2, taskTypes]);
|
|
51635
51908
|
const getServiceAgreementAcceptanceInfos2 = async () => {
|
|
51636
51909
|
if (rootLegalEntity.id && args.handleGetServiceAgreementAcceptanceInfos) {
|
|
@@ -51638,7 +51911,7 @@ function DropinComposer({
|
|
|
51638
51911
|
const response = await args.handleGetServiceAgreementAcceptanceInfos(rootLegalEntity.id);
|
|
51639
51912
|
setServiceAgreementAcceptanceInfos(response.data);
|
|
51640
51913
|
} catch {
|
|
51641
|
-
logger$
|
|
51914
|
+
logger$c.warn("failedToGetServiceAgreementStatus");
|
|
51642
51915
|
}
|
|
51643
51916
|
}
|
|
51644
51917
|
};
|
|
@@ -51648,7 +51921,7 @@ function DropinComposer({
|
|
|
51648
51921
|
const response = await args.handleGetServiceAgreementStatus(rootLegalEntity.id);
|
|
51649
51922
|
setServiceAgreementTypes(response.termsOfServiceTypes);
|
|
51650
51923
|
} catch {
|
|
51651
|
-
logger$
|
|
51924
|
+
logger$c.warn("failedToGetServiceAgreementStatus");
|
|
51652
51925
|
}
|
|
51653
51926
|
}
|
|
51654
51927
|
};
|
|
@@ -51700,7 +51973,7 @@ function DropinComposer({
|
|
|
51700
51973
|
await refreshAssociatedLegalArrangement();
|
|
51701
51974
|
showToast({ type: "success", label: i18n.get("successFullyRemovedTrustMember") });
|
|
51702
51975
|
} catch (err) {
|
|
51703
|
-
logger$
|
|
51976
|
+
logger$c.error(`Failed to delete trust member`, err);
|
|
51704
51977
|
showToast({ type: "error", label: i18n.get("failedToRemoveTrustMember") });
|
|
51705
51978
|
}
|
|
51706
51979
|
};
|
|
@@ -51770,14 +52043,14 @@ function DropinComposer({
|
|
|
51770
52043
|
}
|
|
51771
52044
|
break;
|
|
51772
52045
|
default:
|
|
51773
|
-
logger$
|
|
52046
|
+
logger$c.warn(
|
|
51774
52047
|
`Updating trust member type "${updated.trustMemberType}" is not implemented.`
|
|
51775
52048
|
);
|
|
51776
52049
|
}
|
|
51777
52050
|
showToast({ label: i18n.get("successfullyUpdatedDetails"), type: "success" });
|
|
51778
52051
|
await refreshLegalArrangementAndRunOnSubmit(associatedLegalArrangement, 1);
|
|
51779
52052
|
} catch (err) {
|
|
51780
|
-
logger$
|
|
52053
|
+
logger$c.error(err);
|
|
51781
52054
|
showToast({ label: i18n.get("failedToUpdateDetails"), type: "error" });
|
|
51782
52055
|
}
|
|
51783
52056
|
};
|
|
@@ -51790,7 +52063,7 @@ function DropinComposer({
|
|
|
51790
52063
|
singpassTabRef.current = window.open(authUrl, "_blank");
|
|
51791
52064
|
(_a3 = singpassTabRef.current) == null ? void 0 : _a3.focus();
|
|
51792
52065
|
} catch (e) {
|
|
51793
|
-
logger$
|
|
52066
|
+
logger$c.error(e);
|
|
51794
52067
|
if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
|
|
51795
52068
|
}
|
|
51796
52069
|
}
|
|
@@ -51964,7 +52237,7 @@ function DropinComposer({
|
|
|
51964
52237
|
}
|
|
51965
52238
|
};
|
|
51966
52239
|
setIsLoadingConfiguration(true);
|
|
51967
|
-
fetchConfiguration().catch(logger$
|
|
52240
|
+
fetchConfiguration().catch(logger$c.error).finally(() => {
|
|
51968
52241
|
setIsLoadingConfiguration(false);
|
|
51969
52242
|
onLoad();
|
|
51970
52243
|
});
|
|
@@ -51993,7 +52266,7 @@ function DropinComposer({
|
|
|
51993
52266
|
singpassTabRef.current = window.open(authUrl);
|
|
51994
52267
|
(_a3 = singpassTabRef.current) == null ? void 0 : _a3.focus();
|
|
51995
52268
|
} catch (e) {
|
|
51996
|
-
logger$
|
|
52269
|
+
logger$c.error(e);
|
|
51997
52270
|
if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
|
|
51998
52271
|
}
|
|
51999
52272
|
},
|
|
@@ -52585,7 +52858,7 @@ function DropinComposer({
|
|
|
52585
52858
|
return null;
|
|
52586
52859
|
}
|
|
52587
52860
|
}
|
|
52588
|
-
const logger$
|
|
52861
|
+
const logger$b = createLogger("OnboardingDropinComponent");
|
|
52589
52862
|
function OnboardingDropinComponent({
|
|
52590
52863
|
legalEntityId,
|
|
52591
52864
|
openBankingPartnerConfigId
|
|
@@ -52651,13 +52924,13 @@ function OnboardingDropinComponent({
|
|
|
52651
52924
|
setLegalEntity(le);
|
|
52652
52925
|
setProviderStatus(providerStatuses);
|
|
52653
52926
|
} catch (error) {
|
|
52654
|
-
logger$
|
|
52927
|
+
logger$b.error(error);
|
|
52655
52928
|
} finally {
|
|
52656
52929
|
setLoadingStatus("success");
|
|
52657
52930
|
}
|
|
52658
52931
|
}, [legalEntityId, getLegalEntity2, getProviderStatus2]);
|
|
52659
52932
|
useEffect(() => {
|
|
52660
|
-
init2().catch(logger$
|
|
52933
|
+
init2().catch(logger$b.error);
|
|
52661
52934
|
}, [init2]);
|
|
52662
52935
|
return loadingStatus === "loading" || !legalEntity ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsx(
|
|
52663
52936
|
DropinComposer,
|
|
@@ -52817,7 +53090,7 @@ function SignPCIComponent({
|
|
|
52817
53090
|
}
|
|
52818
53091
|
);
|
|
52819
53092
|
}
|
|
52820
|
-
const logger$
|
|
53093
|
+
const logger$a = createLogger("UpdateLegalEntityForHighExposure");
|
|
52821
53094
|
function UpdateLegalEntityForHighExposure({
|
|
52822
53095
|
legalEntityId,
|
|
52823
53096
|
onSubmitSuccess
|
|
@@ -52836,14 +53109,14 @@ function UpdateLegalEntityForHighExposure({
|
|
|
52836
53109
|
setCapabilities(getCapabilities(rootLegalEntityResponse));
|
|
52837
53110
|
setCountry(getLegalEntityCountry(rootLegalEntityResponse));
|
|
52838
53111
|
} catch (error) {
|
|
52839
|
-
logger$
|
|
53112
|
+
logger$a.error("Unable to fetch root legal entity", error);
|
|
52840
53113
|
showToast({ label: i18n.get("missingCompanyDetails"), type: "error" });
|
|
52841
53114
|
}
|
|
52842
53115
|
}, [legalEntityId]);
|
|
52843
53116
|
useEffect(() => {
|
|
52844
53117
|
(async () => {
|
|
52845
53118
|
await fetchRootLegalEntity();
|
|
52846
|
-
})().catch(logger$
|
|
53119
|
+
})().catch(logger$a.error);
|
|
52847
53120
|
}, [fetchRootLegalEntity]);
|
|
52848
53121
|
if (!rootLegalEntity || !country) {
|
|
52849
53122
|
return /* @__PURE__ */ jsx(Loader, { size: "medium" });
|
|
@@ -52921,12 +53194,12 @@ function getContentByStatus(status) {
|
|
|
52921
53194
|
}
|
|
52922
53195
|
const verification = "adyen-kyc-verification";
|
|
52923
53196
|
const verificationDescription = "adyen-kyc-verification-description";
|
|
52924
|
-
const styles
|
|
53197
|
+
const styles = {
|
|
52925
53198
|
verification,
|
|
52926
53199
|
verificationDescription
|
|
52927
53200
|
};
|
|
52928
53201
|
const FINAL_STATUSES = [OnboardingStatus.VERIFIED, OnboardingStatus.REJECTED];
|
|
52929
|
-
const logger$
|
|
53202
|
+
const logger$9 = createLogger("ViewVerificationStatusComponent");
|
|
52930
53203
|
function ViewVerificationStatusComponent({
|
|
52931
53204
|
legalEntityId,
|
|
52932
53205
|
hideExplanation = false,
|
|
@@ -52951,12 +53224,12 @@ function ViewVerificationStatusComponent({
|
|
|
52951
53224
|
if (!onboardingStatus) return;
|
|
52952
53225
|
const statusContent = getContentByStatus(onboardingStatus);
|
|
52953
53226
|
if (statusContent) return statusContent;
|
|
52954
|
-
logger$
|
|
53227
|
+
logger$9.error(`there is no content for status "${onboardingStatus}"`);
|
|
52955
53228
|
}, [onboardingStatus]);
|
|
52956
53229
|
const handleError2 = useCallback(
|
|
52957
53230
|
(rawError, userMessage) => {
|
|
52958
53231
|
const error = coerceError(rawError);
|
|
52959
|
-
logger$
|
|
53232
|
+
logger$9.error(error);
|
|
52960
53233
|
setAlertContent(userMessage);
|
|
52961
53234
|
onError == null ? void 0 : onError({
|
|
52962
53235
|
error,
|
|
@@ -53014,8 +53287,8 @@ function ViewVerificationStatusComponent({
|
|
|
53014
53287
|
if (!showAlert && (isLoading || !content)) {
|
|
53015
53288
|
return /* @__PURE__ */ jsx(Loader, { size: "medium" });
|
|
53016
53289
|
}
|
|
53017
|
-
return /* @__PURE__ */ jsx("section", { className: styles
|
|
53018
|
-
!hideExplanation && (content == null ? void 0 : content.description.map((key) => /* @__PURE__ */ jsx("p", { className: styles
|
|
53290
|
+
return /* @__PURE__ */ jsx("section", { className: styles.verification, children: showAlert ? /* @__PURE__ */ jsx(Alert, { title: i18n.get(alertContent ?? "onboardingRedirectLinkError"), variant: "error" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
53291
|
+
!hideExplanation && (content == null ? void 0 : content.description.map((key) => /* @__PURE__ */ jsx("p", { className: styles.verificationDescription, children: i18n.get(key) }, key))),
|
|
53019
53292
|
!hideButton && (content == null ? void 0 : content.ctaButton) && /* @__PURE__ */ jsx(
|
|
53020
53293
|
Button,
|
|
53021
53294
|
{
|
|
@@ -56453,7 +56726,7 @@ var TanstackQueryDevtools = (_k = class {
|
|
|
56453
56726
|
if (__privateGet(this, _Component)) {
|
|
56454
56727
|
Devtools = __privateGet(this, _Component);
|
|
56455
56728
|
} else {
|
|
56456
|
-
Devtools = lazy(() => import("./HO4MOOFI-
|
|
56729
|
+
Devtools = lazy(() => import("./HO4MOOFI-BYUilyom.js"));
|
|
56457
56730
|
__privateSet(this, _Component, Devtools);
|
|
56458
56731
|
}
|
|
56459
56732
|
setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
|
|
@@ -56575,7 +56848,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
|
|
|
56575
56848
|
if (__privateGet(this, _Component2)) {
|
|
56576
56849
|
Devtools = __privateGet(this, _Component2);
|
|
56577
56850
|
} else {
|
|
56578
|
-
Devtools = lazy(() => import("./HUY7CZI3-
|
|
56851
|
+
Devtools = lazy(() => import("./HUY7CZI3-BCSiY9T5.js"));
|
|
56579
56852
|
__privateSet(this, _Component2, Devtools);
|
|
56580
56853
|
}
|
|
56581
56854
|
setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
|
|
@@ -56796,7 +57069,7 @@ const useAnalytics = ({
|
|
|
56796
57069
|
componentName,
|
|
56797
57070
|
onboardingVersion
|
|
56798
57071
|
}) => {
|
|
56799
|
-
const sdkVersion = "3.
|
|
57072
|
+
const sdkVersion = "3.59.0";
|
|
56800
57073
|
const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
|
|
56801
57074
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
56802
57075
|
const countryCode = useGlobalStore((store) => store.rootLegalEntityCountry);
|
|
@@ -56866,7 +57139,7 @@ const getVersionConfiguration = async (context) => {
|
|
|
56866
57139
|
}
|
|
56867
57140
|
});
|
|
56868
57141
|
};
|
|
56869
|
-
const logger$
|
|
57142
|
+
const logger$8 = createLogger("UseVersionConfiguration");
|
|
56870
57143
|
const useVersionConfiguration = (legalEntityId) => {
|
|
56871
57144
|
const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
|
|
56872
57145
|
const [onboardingVersion, setOnboardingVersion] = useState(void 0);
|
|
@@ -56885,28 +57158,28 @@ const useVersionConfiguration = (legalEntityId) => {
|
|
|
56885
57158
|
(_b2 = (_a2 = versionConfiguration == null ? void 0 : versionConfiguration.features) == null ? void 0 : _a2.forEach) == null ? void 0 : _b2.call(_a2, (feature) => enableVersionExperiment(feature));
|
|
56886
57159
|
} catch (e) {
|
|
56887
57160
|
setOnboardingVersion(1);
|
|
56888
|
-
logger$
|
|
57161
|
+
logger$8.error("Failed to set version configuration", e);
|
|
56889
57162
|
}
|
|
56890
57163
|
})();
|
|
56891
57164
|
}, [enableVersionExperiment, isEmbeddedDropin, legalEntityId, loadingContext]);
|
|
56892
57165
|
return { onboardingVersion };
|
|
56893
57166
|
};
|
|
56894
|
-
const logger$
|
|
57167
|
+
const logger$7 = createLogger("loadCountries");
|
|
56895
57168
|
const countriesImports = /* @__PURE__ */ Object.assign({ "../countries/de-DE.json": () => import("./de-DE-Cx8Uim1K.js"), "../countries/el-GR.json": () => import("./el-GR-B7_JR3z5.js"), "../countries/en-US.json": () => import("./en-US-CkdCbOCX.js"), "../countries/es-ES.json": () => import("./es-ES-NBv3HHhn.js"), "../countries/fr-FR.json": () => import("./fr-FR-DdSVMVsp.js"), "../countries/it-IT.json": () => import("./it-IT-Bwdk3zuj.js"), "../countries/ja-JP.json": () => import("./ja-JP-Bsvzm8zu.js"), "../countries/nl-NL.json": () => import("./nl-NL-DofKaNkk.js"), "../countries/pt-PT.json": () => import("./pt-PT-DFEvMD1M.js"), "../countries/ru-RU.json": () => import("./ru-RU-PiM0ZI5h.js"), "../countries/sv-SE.json": () => import("./sv-SE-C0GoLwTg.js"), "../countries/zh-CN.json": () => import("./zh-CN-DJs6Hct-.js"), "../countries/zh-TW.json": () => import("./zh-TW-BWhLbns8.js") });
|
|
56896
57169
|
const loadCountriesDataset = async (locale) => {
|
|
56897
57170
|
const importForLocale = countriesImports[`../countries/${locale}.json`];
|
|
56898
57171
|
if (!importForLocale) {
|
|
56899
|
-
logger$
|
|
57172
|
+
logger$7.warn(`No countries dataset for ${locale}, falling back to en-US`);
|
|
56900
57173
|
return (await import("./en-US-CkdCbOCX.js")).default;
|
|
56901
57174
|
}
|
|
56902
57175
|
return (await importForLocale()).default;
|
|
56903
57176
|
};
|
|
56904
|
-
const logger$
|
|
57177
|
+
const logger$6 = createLogger("loadStates");
|
|
56905
57178
|
const statesImports = /* @__PURE__ */ Object.assign({ "../states/AU/en-US.json": () => import("./en-US-CQv3D6--.js"), "../states/BR/en-US.json": () => import("./en-US-eaysbh-g.js"), "../states/BR/pt-BR.json": () => import("./pt-BR-CNtbeGFJ.js"), "../states/CA/en-US.json": () => import("./en-US-gM26UC0X.js"), "../states/NZ/en-US.json": () => import("./en-US-CLmaFLwu.js"), "../states/US/en-US.json": () => import("./en-US-7uBFgKyC.js") });
|
|
56906
57179
|
const loadStatesDataset = async (country, locale) => {
|
|
56907
57180
|
const importForLocale = statesImports[`../states/${country}/${locale}.json`];
|
|
56908
57181
|
if (!importForLocale) {
|
|
56909
|
-
logger$
|
|
57182
|
+
logger$6.warn(`No ${country} states dataset for ${locale}, falling back to en-US`);
|
|
56910
57183
|
const fallbackImport = statesImports[`../states/${country}/en-US.json`];
|
|
56911
57184
|
return (await fallbackImport()).default;
|
|
56912
57185
|
}
|
|
@@ -57075,7 +57348,7 @@ const validatePhoneNumber$1 = async (context, phoneNumber) => {
|
|
|
57075
57348
|
{ number: phoneNumber }
|
|
57076
57349
|
);
|
|
57077
57350
|
};
|
|
57078
|
-
const logger$
|
|
57351
|
+
const logger$5 = createLogger("verify-id-number");
|
|
57079
57352
|
const verifyIdNumber$1 = async (context, request) => {
|
|
57080
57353
|
const { loadingContext, legalEntityId } = context;
|
|
57081
57354
|
try {
|
|
@@ -57098,13 +57371,13 @@ const verifyIdNumber$1 = async (context, request) => {
|
|
|
57098
57371
|
if (responseData.status === 500) {
|
|
57099
57372
|
return { status: 500, message: "Service did not respond, do not block verification" };
|
|
57100
57373
|
}
|
|
57101
|
-
return logger$
|
|
57374
|
+
return logger$5.warn(`Unexpected response status ${responseData.status}`);
|
|
57102
57375
|
}
|
|
57103
57376
|
},
|
|
57104
57377
|
request
|
|
57105
57378
|
);
|
|
57106
57379
|
} catch (e) {
|
|
57107
|
-
logger$
|
|
57380
|
+
logger$5.warn("WARNING: idNumber verification failed - error:", e);
|
|
57108
57381
|
}
|
|
57109
57382
|
};
|
|
57110
57383
|
const getEmbeddedApi = ({
|
|
@@ -57211,7 +57484,7 @@ const validatePhoneNumber = async (context, phoneNumber) => {
|
|
|
57211
57484
|
{ number: phoneNumber }
|
|
57212
57485
|
);
|
|
57213
57486
|
};
|
|
57214
|
-
const logger$
|
|
57487
|
+
const logger$4 = createLogger("verify-id-number");
|
|
57215
57488
|
const verifyIdNumber = async (context, request) => {
|
|
57216
57489
|
const { loadingContext, clientKey } = context;
|
|
57217
57490
|
try {
|
|
@@ -57229,7 +57502,7 @@ const verifyIdNumber = async (context, request) => {
|
|
|
57229
57502
|
if (responseData.status === 500) {
|
|
57230
57503
|
return { status: 500, message: "Service did not respond, do not block verification" };
|
|
57231
57504
|
}
|
|
57232
|
-
return logger$
|
|
57505
|
+
return logger$4.warn(`Unexpected response status ${responseData.status}`);
|
|
57233
57506
|
},
|
|
57234
57507
|
path: "v1/verification/idNumber",
|
|
57235
57508
|
clientKey
|
|
@@ -57237,7 +57510,7 @@ const verifyIdNumber = async (context, request) => {
|
|
|
57237
57510
|
request
|
|
57238
57511
|
);
|
|
57239
57512
|
} catch (e) {
|
|
57240
|
-
logger$
|
|
57513
|
+
logger$4.warn("WARNING: idNumber verification failed - error:", e);
|
|
57241
57514
|
}
|
|
57242
57515
|
};
|
|
57243
57516
|
const getKycExternalApi = ({
|
|
@@ -57287,7 +57560,7 @@ const ConfigurationApiProvider = ({
|
|
|
57287
57560
|
[authContext, rootLegalEntityId]
|
|
57288
57561
|
);
|
|
57289
57562
|
return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
|
|
57290
|
-
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.
|
|
57563
|
+
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.59.0" }),
|
|
57291
57564
|
children2
|
|
57292
57565
|
] });
|
|
57293
57566
|
};
|
|
@@ -57299,7 +57572,7 @@ const useAccountHolder = (legalEntityId) => {
|
|
|
57299
57572
|
setAccountHolder: setAccountHolderIntoLocalStorage
|
|
57300
57573
|
};
|
|
57301
57574
|
};
|
|
57302
|
-
const logger$
|
|
57575
|
+
const logger$3 = createLogger("useAllowedCountries");
|
|
57303
57576
|
const useAllowedCountries = () => {
|
|
57304
57577
|
const capabilities = useGlobalStore((state) => state.capabilities);
|
|
57305
57578
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
@@ -57324,11 +57597,11 @@ const useAllowedCountries = () => {
|
|
|
57324
57597
|
CountryCodes.Belgium
|
|
57325
57598
|
]);
|
|
57326
57599
|
}
|
|
57327
|
-
getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$
|
|
57600
|
+
getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$3.error);
|
|
57328
57601
|
}, [acceptedCountries]);
|
|
57329
57602
|
return allowedCountries;
|
|
57330
57603
|
};
|
|
57331
|
-
const logger$
|
|
57604
|
+
const logger$2 = createLogger("CoreProvider");
|
|
57332
57605
|
const CoreProvider = ({
|
|
57333
57606
|
contextCountry: initialContextCountry,
|
|
57334
57607
|
children: children2
|
|
@@ -57343,7 +57616,7 @@ const CoreProvider = ({
|
|
|
57343
57616
|
const isCountryAllowed = (allowedCountries == null ? void 0 : allowedCountries.includes(contextCountry)) ?? true;
|
|
57344
57617
|
useEffect(() => {
|
|
57345
57618
|
if (allowedCountries && !isCountryAllowed) {
|
|
57346
|
-
logger$
|
|
57619
|
+
logger$2.warn(`
|
|
57347
57620
|
|
|
57348
57621
|
"${contextCountry}" isn't a supported country. Please use one of the following:
|
|
57349
57622
|
- ${listify(
|
|
@@ -57396,12 +57669,12 @@ function ExperimentsContextProvider({
|
|
|
57396
57669
|
);
|
|
57397
57670
|
return /* @__PURE__ */ jsx(ExperimentsContext.Provider, { value: contextValue, children: children2 });
|
|
57398
57671
|
}
|
|
57399
|
-
const logger$
|
|
57672
|
+
const logger$1 = createLogger("useAllowedLocales");
|
|
57400
57673
|
const useAllowedLocales = () => {
|
|
57401
57674
|
const { getAllowedLocales: getAllowedLocales2 } = useConfigurationApi();
|
|
57402
57675
|
const [allowedLocales, setAllowedLocales] = useState();
|
|
57403
57676
|
useEffect(() => {
|
|
57404
|
-
getAllowedLocales2().then((response) => setAllowedLocales(response.locales)).catch(logger$
|
|
57677
|
+
getAllowedLocales2().then((response) => setAllowedLocales(response.locales)).catch(logger$1.error);
|
|
57405
57678
|
}, []);
|
|
57406
57679
|
return allowedLocales;
|
|
57407
57680
|
};
|
|
@@ -57413,7 +57686,7 @@ const loadLocale = async (locale) => {
|
|
|
57413
57686
|
}
|
|
57414
57687
|
return (await importForLocale()).default;
|
|
57415
57688
|
};
|
|
57416
|
-
const logger
|
|
57689
|
+
const logger = createLogger("useTranslations");
|
|
57417
57690
|
const useTranslations = ({
|
|
57418
57691
|
locale,
|
|
57419
57692
|
allowedLocales
|
|
@@ -57428,7 +57701,7 @@ const useTranslations = ({
|
|
|
57428
57701
|
const localeToUse = isLocaleAllowed ? locale : FALLBACK_LOCALE;
|
|
57429
57702
|
if (loaded.locale === localeToUse) return;
|
|
57430
57703
|
if (!isLocaleAllowed) {
|
|
57431
|
-
logger
|
|
57704
|
+
logger.error(
|
|
57432
57705
|
`
|
|
57433
57706
|
"${locale}" isn't a supported locale. Please use one of the following:
|
|
57434
57707
|
- ${listify(
|
|
@@ -57448,7 +57721,7 @@ const useTranslations = ({
|
|
|
57448
57721
|
translations: dataset,
|
|
57449
57722
|
locale: localeToUse
|
|
57450
57723
|
});
|
|
57451
|
-
}).catch((err) => logger
|
|
57724
|
+
}).catch((err) => logger.error("Error while loading translations", err));
|
|
57452
57725
|
}, [locale, allowedLocales, loaded.locale]);
|
|
57453
57726
|
return loaded;
|
|
57454
57727
|
};
|
|
@@ -57728,519 +58001,8 @@ function StateProvider({
|
|
|
57728
58001
|
);
|
|
57729
58002
|
return /* @__PURE__ */ jsx(StateContext.Provider, { value: contextValue, children: children2 });
|
|
57730
58003
|
}
|
|
57731
|
-
const
|
|
57732
|
-
const
|
|
57733
|
-
tabs
|
|
57734
|
-
};
|
|
57735
|
-
const Tabs = ({ tabs: tabs2, activeTab, onChange }) => /* @__PURE__ */ jsx("div", { className: styles$1.tabs, children: tabs2.map(({ name, label, disabled }) => {
|
|
57736
|
-
const buttonVariant = activeTab === name ? "secondary" : "tertiary";
|
|
57737
|
-
return /* @__PURE__ */ jsx(
|
|
57738
|
-
Button,
|
|
57739
|
-
{
|
|
57740
|
-
onClick: () => onChange(name),
|
|
57741
|
-
variant: buttonVariant,
|
|
57742
|
-
disabled,
|
|
57743
|
-
children: label
|
|
57744
|
-
},
|
|
57745
|
-
name
|
|
57746
|
-
);
|
|
57747
|
-
}) });
|
|
57748
|
-
const filterData = (data, searchTerm) => data.filter(({ key }) => key.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
57749
|
-
const sortData = (data) => [...data].sort(({ key: keyA }, { key: keyB }) => keyA.localeCompare(keyB));
|
|
57750
|
-
const DebugTable = ({
|
|
57751
|
-
data,
|
|
57752
|
-
heading,
|
|
57753
|
-
searchTerm,
|
|
57754
|
-
tagPosition = "after",
|
|
57755
|
-
sort = false
|
|
57756
|
-
}) => {
|
|
57757
|
-
const filteredData = useMemo(() => {
|
|
57758
|
-
const filtered = searchTerm ? filterData(data, searchTerm) : data;
|
|
57759
|
-
return sort ? sortData(filtered) : filtered;
|
|
57760
|
-
}, [data, searchTerm]);
|
|
57761
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
57762
|
-
heading ? /* @__PURE__ */ jsx("h3", { children: heading }) : void 0,
|
|
57763
|
-
filteredData.length === 0 ? /* @__PURE__ */ jsxs("p", { children: [
|
|
57764
|
-
"No results found for ",
|
|
57765
|
-
/* @__PURE__ */ jsx("strong", { children: searchTerm })
|
|
57766
|
-
] }) : /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsx("tbody", { children: filteredData.map(({ key, value, label, variant }) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
57767
|
-
tagPosition === "before" ? /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Tag, { variant: variant ?? "grey", children: value }) }) : void 0,
|
|
57768
|
-
/* @__PURE__ */ jsxs("td", { children: [
|
|
57769
|
-
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: key }),
|
|
57770
|
-
label && /* @__PURE__ */ jsx("span", { children: label })
|
|
57771
|
-
] }),
|
|
57772
|
-
tagPosition === "after" ? /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Tag, { variant: variant ?? "grey", children: value }) }) : void 0
|
|
57773
|
-
] }, key)) }) })
|
|
57774
|
-
] });
|
|
57775
|
-
};
|
|
57776
|
-
const getSettingVariant = (value) => {
|
|
57777
|
-
switch (value) {
|
|
57778
|
-
case void 0:
|
|
57779
|
-
return "orange";
|
|
57780
|
-
case true:
|
|
57781
|
-
return "green";
|
|
57782
|
-
case false:
|
|
57783
|
-
return "red";
|
|
57784
|
-
default:
|
|
57785
|
-
return "blue";
|
|
57786
|
-
}
|
|
57787
|
-
};
|
|
57788
|
-
const DebugExperimentsAndSettings = ({
|
|
57789
|
-
experiments,
|
|
57790
|
-
settings
|
|
57791
|
-
}) => {
|
|
57792
|
-
const [searchTerm, setSearchTerm] = useState("");
|
|
57793
|
-
const experimentRows = entriesOf(experiments).map(
|
|
57794
|
-
([experimentName, enabled]) => ({
|
|
57795
|
-
key: `${experimentName}`,
|
|
57796
|
-
value: enabled ? "Enabled" : "Disabled",
|
|
57797
|
-
variant: enabled ? "green" : "red"
|
|
57798
|
-
})
|
|
57799
|
-
);
|
|
57800
|
-
const settingRows = entriesOf(settings).map(([settingName, value]) => ({
|
|
57801
|
-
key: settingName,
|
|
57802
|
-
value: `${value}`,
|
|
57803
|
-
variant: getSettingVariant(value)
|
|
57804
|
-
}));
|
|
57805
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57806
|
-
/* @__PURE__ */ jsx(
|
|
57807
|
-
InputText,
|
|
57808
|
-
{
|
|
57809
|
-
name: "search",
|
|
57810
|
-
value: searchTerm,
|
|
57811
|
-
classNameModifiers: ["search"],
|
|
57812
|
-
onInput: (e) => setSearchTerm(e.target.value),
|
|
57813
|
-
placeholder: "Search for Experiments/Settings 🔎",
|
|
57814
|
-
trimOnBlur: true,
|
|
57815
|
-
spellCheck: false,
|
|
57816
|
-
"aria-label": "Search experiments or settings",
|
|
57817
|
-
"aria-invalid": false
|
|
57818
|
-
}
|
|
57819
|
-
),
|
|
57820
|
-
/* @__PURE__ */ jsx(
|
|
57821
|
-
DebugTable,
|
|
57822
|
-
{
|
|
57823
|
-
tagPosition: "before",
|
|
57824
|
-
data: experimentRows,
|
|
57825
|
-
heading: "Experiments",
|
|
57826
|
-
searchTerm,
|
|
57827
|
-
sort: true
|
|
57828
|
-
}
|
|
57829
|
-
),
|
|
57830
|
-
/* @__PURE__ */ jsx(DebugTable, { data: settingRows, heading: "Settings", searchTerm, sort: true })
|
|
57831
|
-
] });
|
|
57832
|
-
};
|
|
57833
|
-
const getRanges = (search, element) => {
|
|
57834
|
-
var _a2;
|
|
57835
|
-
const textNode = element.childNodes[0];
|
|
57836
|
-
const content = (_a2 = textNode.textContent) == null ? void 0 : _a2.toLowerCase();
|
|
57837
|
-
if (!content)
|
|
57838
|
-
return [];
|
|
57839
|
-
const indexes = [];
|
|
57840
|
-
const matches = [...content.matchAll(search)];
|
|
57841
|
-
matches.forEach((match) => {
|
|
57842
|
-
indexes.push({ s: match.index, e: match.index + match[0].length });
|
|
57843
|
-
});
|
|
57844
|
-
return indexes.map((index) => {
|
|
57845
|
-
const range2 = new Range();
|
|
57846
|
-
range2.setStart(textNode, index.s);
|
|
57847
|
-
range2.setEnd(textNode, index.e);
|
|
57848
|
-
return range2;
|
|
57849
|
-
});
|
|
57850
|
-
};
|
|
57851
|
-
const createHighlightFn = (name, highlight, el, scope) => {
|
|
57852
|
-
return CSS.highlights.set(`${name}-${scope}`, new Highlight(...getRanges(highlight.regex, el)));
|
|
57853
|
-
};
|
|
57854
|
-
const createHighlightCss = (name, highlight, scope) => {
|
|
57855
|
-
return `::highlight(${name}-${scope}) { color: var(${highlight.css}); }`;
|
|
57856
|
-
};
|
|
57857
|
-
const transformModule = (highlights, codeNode, scope) => {
|
|
57858
|
-
return Object.entries(highlights).map(([name, definition]) => ({
|
|
57859
|
-
apply: () => createHighlightFn(name, definition, codeNode, scope),
|
|
57860
|
-
css: createHighlightCss(name, definition, scope)
|
|
57861
|
-
}));
|
|
57862
|
-
};
|
|
57863
|
-
const supportedModules = ["plaintext", "json", "yaml", "css"];
|
|
57864
|
-
const moduleMap = {
|
|
57865
|
-
plaintext: () => import("./plaintext-DgDFLkbp.js"),
|
|
57866
|
-
json: () => import("./json-DpHF7B2M.js"),
|
|
57867
|
-
yaml: () => import("./yaml-B66s-9sv.js"),
|
|
57868
|
-
css: () => import("./css-BUQ-lDKy.js")
|
|
57869
|
-
};
|
|
57870
|
-
const getModule = async (name) => {
|
|
57871
|
-
if (!supportedModules.includes(name)) {
|
|
57872
|
-
const plaintext = await moduleMap["plaintext"]();
|
|
57873
|
-
return plaintext.default;
|
|
57874
|
-
}
|
|
57875
|
-
const module = await moduleMap[name]();
|
|
57876
|
-
if (!module) {
|
|
57877
|
-
const plaintext = await moduleMap["plaintext"]();
|
|
57878
|
-
return plaintext.default;
|
|
57879
|
-
}
|
|
57880
|
-
return module.default;
|
|
57881
|
-
};
|
|
57882
|
-
const cssProps = {
|
|
57883
|
-
text: "--mng-text",
|
|
57884
|
-
background: "--mng-background",
|
|
57885
|
-
string: "--mng-string",
|
|
57886
|
-
key: "--mng-key",
|
|
57887
|
-
number: "--mng-number",
|
|
57888
|
-
boolean: "--mng-boolean",
|
|
57889
|
-
null: "--mng-null",
|
|
57890
|
-
comment: "--mng-comment",
|
|
57891
|
-
curlyBrackets: "--mng-curly-brackets",
|
|
57892
|
-
squareBrackets: "--mng-square-brackets",
|
|
57893
|
-
keyword: "--mng-keyword",
|
|
57894
|
-
dashes: "--mng-dashes"
|
|
57895
|
-
};
|
|
57896
|
-
const css = `
|
|
57897
|
-
* {
|
|
57898
|
-
box-sizing: border-box;
|
|
57899
|
-
}
|
|
57900
|
-
:host {
|
|
57901
|
-
display: inline-grid;
|
|
57902
|
-
white-space: pre-line;
|
|
57903
|
-
}
|
|
57904
|
-
pre {
|
|
57905
|
-
width: 100%;
|
|
57906
|
-
height: 100%;
|
|
57907
|
-
padding: 1em;
|
|
57908
|
-
margin: 0;
|
|
57909
|
-
background-color: var(${cssProps.background});
|
|
57910
|
-
color: var(${cssProps.text});
|
|
57911
|
-
}
|
|
57912
|
-
code {
|
|
57913
|
-
width: 100%;
|
|
57914
|
-
height: 100%;
|
|
57915
|
-
display: inline-block;
|
|
57916
|
-
outline: none;
|
|
57917
|
-
white-space: pre-line;
|
|
57918
|
-
}
|
|
57919
|
-
|
|
57920
|
-
:host {
|
|
57921
|
-
${cssProps.text}: #213547;
|
|
57922
|
-
${cssProps.background}: #f1f1f1;
|
|
57923
|
-
${cssProps.string}: #8b251e;
|
|
57924
|
-
${cssProps.key}: #c32b1d;
|
|
57925
|
-
${cssProps.number}: #4a845b;
|
|
57926
|
-
${cssProps.boolean}: #3716f5;
|
|
57927
|
-
${cssProps.null}: #3716f5;
|
|
57928
|
-
${cssProps.comment}: #4e862d;
|
|
57929
|
-
${cssProps.curlyBrackets}: #59913e;
|
|
57930
|
-
${cssProps.squareBrackets}: #59913e;
|
|
57931
|
-
${cssProps.keyword}: #666;
|
|
57932
|
-
${cssProps.dashes}: #444;
|
|
57933
|
-
}
|
|
57934
|
-
|
|
57935
|
-
@media (prefers-color-scheme: dark) {
|
|
57936
|
-
:host {
|
|
57937
|
-
${cssProps.text}: #f1f1f1;
|
|
57938
|
-
${cssProps.background}: #1f1f1f;
|
|
57939
|
-
${cssProps.string}: #ce916f;
|
|
57940
|
-
${cssProps.key}: #9cdcfe;
|
|
57941
|
-
${cssProps.number}: #b5cea8;
|
|
57942
|
-
${cssProps.boolean}: #569cd6;
|
|
57943
|
-
${cssProps.null}: #569cd6;
|
|
57944
|
-
${cssProps.comment}: #438a55;
|
|
57945
|
-
${cssProps.curlyBrackets}: #ffd708;
|
|
57946
|
-
${cssProps.squareBrackets}: #da70b9;
|
|
57947
|
-
${cssProps.keyword}: #dcdcaa;
|
|
57948
|
-
${cssProps.dashes}: #ddd;
|
|
57949
|
-
}
|
|
57950
|
-
}`;
|
|
57951
|
-
let MonogonCode$1 = class MonogonCode extends HTMLElement {
|
|
57952
|
-
constructor() {
|
|
57953
|
-
super();
|
|
57954
|
-
Object.defineProperty(this, "value", {
|
|
57955
|
-
enumerable: true,
|
|
57956
|
-
configurable: true,
|
|
57957
|
-
writable: true,
|
|
57958
|
-
value: ""
|
|
57959
|
-
});
|
|
57960
|
-
Object.defineProperty(this, "codeEl", {
|
|
57961
|
-
enumerable: true,
|
|
57962
|
-
configurable: true,
|
|
57963
|
-
writable: true,
|
|
57964
|
-
value: null
|
|
57965
|
-
});
|
|
57966
|
-
Object.defineProperty(this, "styleEl", {
|
|
57967
|
-
enumerable: true,
|
|
57968
|
-
configurable: true,
|
|
57969
|
-
writable: true,
|
|
57970
|
-
value: null
|
|
57971
|
-
});
|
|
57972
|
-
Object.defineProperty(this, "applyHighlights", {
|
|
57973
|
-
enumerable: true,
|
|
57974
|
-
configurable: true,
|
|
57975
|
-
writable: true,
|
|
57976
|
-
value: () => {
|
|
57977
|
-
}
|
|
57978
|
-
});
|
|
57979
|
-
}
|
|
57980
|
-
async connectedCallback() {
|
|
57981
|
-
await this.prepare();
|
|
57982
|
-
setTimeout(() => {
|
|
57983
|
-
this.refresh();
|
|
57984
|
-
}, 1);
|
|
57985
|
-
}
|
|
57986
|
-
async attributeChangedCallback(oldValue, newValue) {
|
|
57987
|
-
if (oldValue !== newValue) {
|
|
57988
|
-
await this.refresh();
|
|
57989
|
-
}
|
|
57990
|
-
}
|
|
57991
|
-
async prepare() {
|
|
57992
|
-
const shadow = this.shadowRoot || this.attachShadow({ mode: "open" });
|
|
57993
|
-
shadow.innerHTML = "";
|
|
57994
|
-
const themeStyleEl = document.createElement("style");
|
|
57995
|
-
themeStyleEl.textContent = css;
|
|
57996
|
-
shadow.appendChild(themeStyleEl);
|
|
57997
|
-
const preEl = document.createElement("pre");
|
|
57998
|
-
const codeEl = document.createElement("code");
|
|
57999
|
-
codeEl.setAttribute("contenteditable", "plaintext-only");
|
|
58000
|
-
codeEl.setAttribute("spellcheck", "false");
|
|
58001
|
-
shadow.appendChild(preEl);
|
|
58002
|
-
preEl.appendChild(codeEl);
|
|
58003
|
-
codeEl.addEventListener("input", () => {
|
|
58004
|
-
this.codeEl.normalize();
|
|
58005
|
-
this.value = this.codeEl.textContent ?? "";
|
|
58006
|
-
this.applyHighlights();
|
|
58007
|
-
});
|
|
58008
|
-
this.codeEl = codeEl;
|
|
58009
|
-
this.styleEl = themeStyleEl;
|
|
58010
|
-
}
|
|
58011
|
-
async refresh() {
|
|
58012
|
-
var _a2;
|
|
58013
|
-
if (!this.codeEl)
|
|
58014
|
-
return;
|
|
58015
|
-
const moduleName = this.getAttribute("lang") ?? "plaintext";
|
|
58016
|
-
const module = await getModule(moduleName);
|
|
58017
|
-
const content = this.getAttribute("content") ?? "";
|
|
58018
|
-
this.value = content;
|
|
58019
|
-
this.codeEl.textContent = module.format ? module.format(content) : content;
|
|
58020
|
-
if (!((_a2 = this.codeEl.childNodes) == null ? void 0 : _a2[0]))
|
|
58021
|
-
return;
|
|
58022
|
-
const littleHash = window.crypto.randomUUID().substring(0, 6);
|
|
58023
|
-
const definitions = transformModule(module.definitions, this.codeEl, littleHash);
|
|
58024
|
-
const moduleCss = definitions.map((m) => m.css).join(" ");
|
|
58025
|
-
this.styleEl.textContent += `${moduleCss}`;
|
|
58026
|
-
this.applyHighlights = () => {
|
|
58027
|
-
definitions.forEach((highlight) => {
|
|
58028
|
-
highlight.apply();
|
|
58029
|
-
});
|
|
58030
|
-
};
|
|
58031
|
-
this.applyHighlights();
|
|
58032
|
-
}
|
|
58033
|
-
};
|
|
58034
|
-
Object.defineProperty(MonogonCode$1, "observedAttributes", {
|
|
58035
|
-
enumerable: true,
|
|
58036
|
-
configurable: true,
|
|
58037
|
-
writable: true,
|
|
58038
|
-
value: ["content", "lang"]
|
|
58039
|
-
});
|
|
58040
|
-
if (!customElements.get("monogon-code"))
|
|
58041
|
-
customElements.define("monogon-code", MonogonCode$1);
|
|
58042
|
-
const MonogonCode2 = ({ content, lang }) => {
|
|
58043
|
-
return /* @__PURE__ */ jsx("monogon-code", { content, lang });
|
|
58044
|
-
};
|
|
58045
|
-
const DebugLegalEntityData = ({ legalEntityData }) => {
|
|
58046
|
-
var _a2;
|
|
58047
|
-
if (!legalEntityData) return /* @__PURE__ */ jsx(Fragment, {});
|
|
58048
|
-
const { rootLegalEntity, rootLegalEntityType } = legalEntityData;
|
|
58049
|
-
const uboDetails = ((_a2 = rootLegalEntity.entityAssociations) == null ? void 0 : _a2.map(
|
|
58050
|
-
({ name, type, jobTitle }) => (
|
|
58051
|
-
// If `name` is undefined, replace the tuple with `null` to easily filter it out later. Checking this to ensure that the 'data' for DebugTable always has a keyName.
|
|
58052
|
-
name ? {
|
|
58053
|
-
key: name,
|
|
58054
|
-
value: `${type}`,
|
|
58055
|
-
label: jobTitle,
|
|
58056
|
-
variant: "blue"
|
|
58057
|
-
} : null
|
|
58058
|
-
)
|
|
58059
|
-
).filter(Boolean)) ?? [];
|
|
58060
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58061
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
58062
|
-
"Root legal entity type: ",
|
|
58063
|
-
/* @__PURE__ */ jsx(Tag, { children: rootLegalEntityType })
|
|
58064
|
-
] }),
|
|
58065
|
-
uboDetails.length ? /* @__PURE__ */ jsx(DebugTable, { data: uboDetails, heading: "Decision Makers" }) : void 0,
|
|
58066
|
-
rootLegalEntity ? /* @__PURE__ */ jsx(MonogonCode2, { lang: "json", content: JSON.stringify(rootLegalEntity, null, 2) }) : void 0
|
|
58067
|
-
] });
|
|
58068
|
-
};
|
|
58069
|
-
const DebugMetadata = ({
|
|
58070
|
-
metadata: { sdkVersion, locale, rootLegalEntityId }
|
|
58071
|
-
}) => {
|
|
58072
|
-
const rows = [
|
|
58073
|
-
{ key: "SDK version", value: sdkVersion, variant: "green" },
|
|
58074
|
-
{ key: "Locale", value: locale, variant: "blue" },
|
|
58075
|
-
{ key: "Root legal entity ID", value: rootLegalEntityId, variant: "teal" }
|
|
58076
|
-
];
|
|
58077
|
-
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx(DebugTable, { data: rows }) });
|
|
58078
|
-
};
|
|
58079
|
-
const header = "adyen-kyc-header";
|
|
58080
|
-
const taskName = "adyen-kyc-task-name";
|
|
58081
|
-
const table = "adyen-kyc-table";
|
|
58082
|
-
const styles = {
|
|
58083
|
-
header,
|
|
58084
|
-
taskName,
|
|
58085
|
-
table
|
|
58086
|
-
};
|
|
58087
|
-
const DebugTaskStatuses = ({ taskStatuses }) => {
|
|
58088
|
-
const { i18n } = useI18nContext();
|
|
58089
|
-
return /* @__PURE__ */ jsxs("table", { className: styles.table, children: [
|
|
58090
|
-
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: styles.header, children: [
|
|
58091
|
-
/* @__PURE__ */ jsx("th", { children: i18n.get("task") }),
|
|
58092
|
-
/* @__PURE__ */ jsx("th", { children: i18n.get("status") }),
|
|
58093
|
-
/* @__PURE__ */ jsx("th", { children: i18n.get("reason") })
|
|
58094
|
-
] }) }),
|
|
58095
|
-
/* @__PURE__ */ jsx("tbody", { children: entriesOf(taskStatuses).sort(([t1], [t2]) => t1.localeCompare(t2)).map(([task, status]) => {
|
|
58096
|
-
const { taskType, id } = splitTaskIdentifier(task);
|
|
58097
|
-
return /* @__PURE__ */ jsxs("tr", { children: [
|
|
58098
|
-
/* @__PURE__ */ jsxs("td", { className: styles.taskName, children: [
|
|
58099
|
-
taskType,
|
|
58100
|
-
id ? `: ${id}` : ""
|
|
58101
|
-
] }),
|
|
58102
|
-
status ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58103
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TaskItemStatus, { status: status.status }) }),
|
|
58104
|
-
/* @__PURE__ */ jsxs("td", { children: [
|
|
58105
|
-
i18n.get(status.reason),
|
|
58106
|
-
/* @__PURE__ */ jsx(ExplainDetails, { status })
|
|
58107
|
-
] })
|
|
58108
|
-
] }) : /* @__PURE__ */ jsx(Fragment, {})
|
|
58109
|
-
] }, task);
|
|
58110
|
-
}) })
|
|
58111
|
-
] });
|
|
58112
|
-
};
|
|
58113
|
-
const ExplainDetails = ({ status }) => {
|
|
58114
|
-
const { reason, details } = status;
|
|
58115
|
-
switch (reason) {
|
|
58116
|
-
case "invalidInputError": {
|
|
58117
|
-
const verificationError = details.verificationError;
|
|
58118
|
-
const subErrors = verificationError.subErrors;
|
|
58119
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
58120
|
-
verificationError.code,
|
|
58121
|
-
": ",
|
|
58122
|
-
verificationError.message,
|
|
58123
|
-
subErrors ? /* @__PURE__ */ jsx("ul", { children: (verificationError.subErrors ?? []).map((subError) => /* @__PURE__ */ jsxs("li", { children: [
|
|
58124
|
-
subError.code,
|
|
58125
|
-
": ",
|
|
58126
|
-
subError.message
|
|
58127
|
-
] }, subError.code)) }) : /* @__PURE__ */ jsx(Fragment, {})
|
|
58128
|
-
] });
|
|
58129
|
-
}
|
|
58130
|
-
case "dataMissingError": {
|
|
58131
|
-
const verificationError = details.verificationError;
|
|
58132
|
-
const subErrors = verificationError.subErrors;
|
|
58133
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
58134
|
-
verificationError.code,
|
|
58135
|
-
": ",
|
|
58136
|
-
verificationError.message,
|
|
58137
|
-
subErrors ? /* @__PURE__ */ jsx("ul", { children: (verificationError.subErrors ?? []).map((subError) => /* @__PURE__ */ jsxs("li", { children: [
|
|
58138
|
-
subError.code,
|
|
58139
|
-
": ",
|
|
58140
|
-
subError.message
|
|
58141
|
-
] }, subError.code)) }) : /* @__PURE__ */ jsx(Fragment, {})
|
|
58142
|
-
] });
|
|
58143
|
-
}
|
|
58144
|
-
case "pendingCapabilities": {
|
|
58145
|
-
const pendingCapabilities = details.pendingCapabilities;
|
|
58146
|
-
return /* @__PURE__ */ jsx("ul", { children: pendingCapabilities.map((capabilityName) => /* @__PURE__ */ jsx("li", { children: capabilityName }, capabilityName)) });
|
|
58147
|
-
}
|
|
58148
|
-
}
|
|
58149
|
-
};
|
|
58150
|
-
const logger = createLogger("DebugModal");
|
|
58151
|
-
const DebugModal = ({ onExit }) => {
|
|
58152
|
-
const { isExperimentEnabled } = useExperimentsContext();
|
|
58153
|
-
const { getSetting } = useSettingsContext();
|
|
58154
|
-
const [debugInfoCopied, setDebugInfoCopied] = useState(false);
|
|
58155
|
-
const { i18n } = useI18nContext();
|
|
58156
|
-
const [tab, setTab] = useState("metadata");
|
|
58157
|
-
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
58158
|
-
const metadata = {
|
|
58159
|
-
sdkVersion: "3.58.2",
|
|
58160
|
-
locale: i18n.locale,
|
|
58161
|
-
rootLegalEntityId: rootLegalEntity.id
|
|
58162
|
-
};
|
|
58163
|
-
const experiments = listToRecord(valuesOf(ExperimentNames), isExperimentEnabled);
|
|
58164
|
-
const settings = listToRecord(valuesOf(SettingNames), getSetting);
|
|
58165
|
-
const taskStatuses = useTaskStatuses();
|
|
58166
|
-
const legalEntityData = {
|
|
58167
|
-
rootLegalEntity,
|
|
58168
|
-
rootLegalEntityType: rootLegalEntity.type
|
|
58169
|
-
};
|
|
58170
|
-
const copyToClipboard = async () => {
|
|
58171
|
-
const toCopy = {
|
|
58172
|
-
metadata,
|
|
58173
|
-
experiments,
|
|
58174
|
-
settings,
|
|
58175
|
-
taskStatuses,
|
|
58176
|
-
legalEntityData
|
|
58177
|
-
};
|
|
58178
|
-
await window.navigator.clipboard.writeText(JSON.stringify(toCopy, null, 2));
|
|
58179
|
-
setDebugInfoCopied(true);
|
|
58180
|
-
setTimeout(() => {
|
|
58181
|
-
setDebugInfoCopied(false);
|
|
58182
|
-
}, 5e3);
|
|
58183
|
-
};
|
|
58184
|
-
return /* @__PURE__ */ jsxs(Modal, { size: "fullscreen", onClose: onExit, children: [
|
|
58185
|
-
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-debug-modal__header", children: [
|
|
58186
|
-
/* @__PURE__ */ jsx("h1", { children: "Debug" }),
|
|
58187
|
-
" ",
|
|
58188
|
-
/* @__PURE__ */ jsx(
|
|
58189
|
-
Tabs,
|
|
58190
|
-
{
|
|
58191
|
-
activeTab: tab,
|
|
58192
|
-
onChange: (tab2) => setTab(tab2),
|
|
58193
|
-
tabs: [
|
|
58194
|
-
{
|
|
58195
|
-
name: "metadata",
|
|
58196
|
-
label: "Metadata"
|
|
58197
|
-
},
|
|
58198
|
-
{
|
|
58199
|
-
name: "experimentsSettings",
|
|
58200
|
-
label: "Experiments & Settings"
|
|
58201
|
-
},
|
|
58202
|
-
{
|
|
58203
|
-
name: "taskStatuses",
|
|
58204
|
-
label: "Task Statuses"
|
|
58205
|
-
},
|
|
58206
|
-
{
|
|
58207
|
-
name: "legalEntityData",
|
|
58208
|
-
label: "Legal Entity Data"
|
|
58209
|
-
}
|
|
58210
|
-
]
|
|
58211
|
-
}
|
|
58212
|
-
)
|
|
58213
|
-
] }) }),
|
|
58214
|
-
/* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58215
|
-
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-debug-modal__content", children: [
|
|
58216
|
-
tab === "metadata" ? /* @__PURE__ */ jsx(DebugMetadata, { metadata }) : void 0,
|
|
58217
|
-
tab === "taskStatuses" ? /* @__PURE__ */ jsx(DebugTaskStatuses, { taskStatuses }) : void 0,
|
|
58218
|
-
tab === "experimentsSettings" ? /* @__PURE__ */ jsx(DebugExperimentsAndSettings, { experiments, settings }) : void 0,
|
|
58219
|
-
tab === "legalEntityData" ? /* @__PURE__ */ jsx(DebugLegalEntityData, { legalEntityData }) : void 0
|
|
58220
|
-
] }),
|
|
58221
|
-
" "
|
|
58222
|
-
] }) }),
|
|
58223
|
-
/* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__footer", children: /* @__PURE__ */ jsxs("div", { children: [
|
|
58224
|
-
/* @__PURE__ */ jsx(
|
|
58225
|
-
Button,
|
|
58226
|
-
{
|
|
58227
|
-
icon: "document",
|
|
58228
|
-
onClick: () => {
|
|
58229
|
-
copyToClipboard().catch((error) => {
|
|
58230
|
-
logger.error("Error copying to clipboard:", error);
|
|
58231
|
-
});
|
|
58232
|
-
},
|
|
58233
|
-
children: "Copy debug info"
|
|
58234
|
-
}
|
|
58235
|
-
),
|
|
58236
|
-
debugInfoCopied ? /* @__PURE__ */ jsxs("span", { className: "adyen-kyc-debug-modal__footer--copy-status", children: [
|
|
58237
|
-
/* @__PURE__ */ jsx(Icon, { name: "check" }),
|
|
58238
|
-
" Copied!"
|
|
58239
|
-
] }) : void 0
|
|
58240
|
-
] }) }) })
|
|
58241
|
-
] });
|
|
58242
|
-
};
|
|
58243
|
-
const DebugWrapper = ({ children: children2 }) => {
|
|
58004
|
+
const DebugModal = lazy$1(async () => (await import("./DebugModal-C7PUDNlI.js").then((n) => n.D)).DebugModal);
|
|
58005
|
+
const DebugListener = () => {
|
|
58244
58006
|
const [debugUiOpen, setDebugUiOpen] = useState(false);
|
|
58245
58007
|
const { isSettingEnabled } = useSettingsContext();
|
|
58246
58008
|
const debugUiAllowed = isSettingEnabled("allowDebugUi");
|
|
@@ -58255,10 +58017,7 @@ const DebugWrapper = ({ children: children2 }) => {
|
|
|
58255
58017
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
58256
58018
|
}, [debugUiAllowed]);
|
|
58257
58019
|
const isOpen = debugUiAllowed && debugUiOpen;
|
|
58258
|
-
return /* @__PURE__ */
|
|
58259
|
-
isOpen ? /* @__PURE__ */ jsx(DebugModal, { onExit: () => setDebugUiOpen(false) }) : null,
|
|
58260
|
-
children2
|
|
58261
|
-
] });
|
|
58020
|
+
return /* @__PURE__ */ jsx(Fragment, { children: isOpen ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("div", {}), children: /* @__PURE__ */ jsx(DebugModal, { onExit: () => setDebugUiOpen(false) }) }) : null });
|
|
58262
58021
|
};
|
|
58263
58022
|
const StoreProvider = ({
|
|
58264
58023
|
legalEntityId,
|
|
@@ -58431,19 +58190,22 @@ class UIElement extends BaseElement {
|
|
|
58431
58190
|
locale: this.props.locale,
|
|
58432
58191
|
customTranslations: this.props.customTranslations,
|
|
58433
58192
|
eventEmitter: this.eventEmitter,
|
|
58434
|
-
children: /* @__PURE__ */
|
|
58193
|
+
children: /* @__PURE__ */ jsxs(
|
|
58435
58194
|
ExpiryProvider,
|
|
58436
58195
|
{
|
|
58437
58196
|
expiry: this.props.expiry,
|
|
58438
58197
|
refreshExpiry: this.props.refreshExpiry,
|
|
58439
58198
|
eventEmitter: this.eventEmitter,
|
|
58440
|
-
children:
|
|
58441
|
-
|
|
58442
|
-
{
|
|
58443
|
-
|
|
58444
|
-
|
|
58445
|
-
|
|
58446
|
-
|
|
58199
|
+
children: [
|
|
58200
|
+
/* @__PURE__ */ jsx(DebugListener, {}),
|
|
58201
|
+
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container-wrapper", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container", children: /* @__PURE__ */ jsx(ToastContextProvider, { children: /* @__PURE__ */ jsx(StateProvider, { children: /* @__PURE__ */ jsx(
|
|
58202
|
+
UIElement2,
|
|
58203
|
+
{
|
|
58204
|
+
...this.props.componentProps,
|
|
58205
|
+
onUnmount: this.remove
|
|
58206
|
+
}
|
|
58207
|
+
) }) }) }) })
|
|
58208
|
+
]
|
|
58447
58209
|
}
|
|
58448
58210
|
)
|
|
58449
58211
|
}
|
|
@@ -58522,65 +58284,83 @@ if (CSS.supports("container", "foo / inline-size") === false) {
|
|
|
58522
58284
|
import("container-query-polyfill");
|
|
58523
58285
|
}
|
|
58524
58286
|
export {
|
|
58525
|
-
|
|
58526
|
-
|
|
58287
|
+
batch as $,
|
|
58288
|
+
createSignal as A,
|
|
58527
58289
|
Button as B,
|
|
58528
|
-
|
|
58529
|
-
|
|
58530
|
-
|
|
58531
|
-
|
|
58532
|
-
|
|
58533
|
-
|
|
58534
|
-
|
|
58535
|
-
|
|
58536
|
-
|
|
58290
|
+
onMount as C,
|
|
58291
|
+
createEffect as D,
|
|
58292
|
+
ExperimentNames as E,
|
|
58293
|
+
Show as F,
|
|
58294
|
+
template as G,
|
|
58295
|
+
insert as H,
|
|
58296
|
+
InputText as I,
|
|
58297
|
+
createRenderEffect as J,
|
|
58298
|
+
className as K,
|
|
58537
58299
|
LegalEntityType as L,
|
|
58538
|
-
|
|
58539
|
-
|
|
58540
|
-
|
|
58300
|
+
Modal as M,
|
|
58301
|
+
clearDelegatedEvents as N,
|
|
58302
|
+
delegateEvents as O,
|
|
58541
58303
|
Portal as P,
|
|
58542
|
-
|
|
58543
|
-
|
|
58304
|
+
useContext as Q,
|
|
58305
|
+
onCleanup as R,
|
|
58544
58306
|
StepProgressIndicator as S,
|
|
58545
58307
|
TaskTypes as T,
|
|
58546
|
-
|
|
58547
|
-
|
|
58548
|
-
|
|
58549
|
-
|
|
58550
|
-
|
|
58551
|
-
|
|
58552
|
-
|
|
58308
|
+
sortFns as U,
|
|
58309
|
+
mutationSortFns as V,
|
|
58310
|
+
on as W,
|
|
58311
|
+
setAttribute as X,
|
|
58312
|
+
getSidedProp as Y,
|
|
58313
|
+
use as Z,
|
|
58314
|
+
createUniqueId as _,
|
|
58553
58315
|
useLegalEntityType as a,
|
|
58554
|
-
|
|
58555
|
-
|
|
58556
|
-
|
|
58557
|
-
|
|
58558
|
-
|
|
58559
|
-
|
|
58560
|
-
|
|
58316
|
+
getQueryStatusLabel as a0,
|
|
58317
|
+
getMutationStatusColor as a1,
|
|
58318
|
+
getQueryStatusColor as a2,
|
|
58319
|
+
getQueryStatusColorByLabel as a3,
|
|
58320
|
+
displayValue as a4,
|
|
58321
|
+
For as a5,
|
|
58322
|
+
convertRemToPixels as a6,
|
|
58323
|
+
untrack as a7,
|
|
58324
|
+
$TRACK as a8,
|
|
58325
|
+
useTransition as a9,
|
|
58326
|
+
spread as aa,
|
|
58327
|
+
mergeProps as ab,
|
|
58328
|
+
createRoot as ac,
|
|
58329
|
+
serialize as ad,
|
|
58330
|
+
Index as ae,
|
|
58331
|
+
updateNestedDataByPath as af,
|
|
58332
|
+
addEventListener as ag,
|
|
58333
|
+
stringify as ah,
|
|
58334
|
+
Match as ai,
|
|
58335
|
+
Switch as aj,
|
|
58336
|
+
deleteNestedDataByPath as ak,
|
|
58337
|
+
splitProps as al,
|
|
58338
|
+
Dynamic as am,
|
|
58339
|
+
createComputed as an,
|
|
58340
|
+
Core as ao,
|
|
58561
58341
|
useI18nContext as b,
|
|
58562
58342
|
userEvents as c,
|
|
58563
|
-
|
|
58564
|
-
|
|
58565
|
-
|
|
58343
|
+
Tag as d,
|
|
58344
|
+
entriesOf as e,
|
|
58345
|
+
TaskItemStatus as f,
|
|
58566
58346
|
getTranslationKeysByPrefix as g,
|
|
58567
|
-
|
|
58568
|
-
|
|
58569
|
-
|
|
58570
|
-
|
|
58571
|
-
|
|
58572
|
-
|
|
58573
|
-
|
|
58574
|
-
|
|
58575
|
-
|
|
58576
|
-
|
|
58577
|
-
|
|
58578
|
-
|
|
58347
|
+
useExperimentsContext as h,
|
|
58348
|
+
useSettingsContext as i,
|
|
58349
|
+
useGlobalStore as j,
|
|
58350
|
+
useTaskStatuses as k,
|
|
58351
|
+
listToRecord as l,
|
|
58352
|
+
ModalHeader as m,
|
|
58353
|
+
ModalContent as n,
|
|
58354
|
+
ModalFooter as o,
|
|
58355
|
+
createLogger as p,
|
|
58356
|
+
Icon as q,
|
|
58357
|
+
SettingNames as r,
|
|
58358
|
+
splitTaskIdentifier as s,
|
|
58579
58359
|
toCapitalized as t,
|
|
58580
58360
|
useCanSeeIntroduction as u,
|
|
58581
|
-
|
|
58582
|
-
|
|
58583
|
-
|
|
58584
|
-
|
|
58585
|
-
|
|
58361
|
+
valuesOf as v,
|
|
58362
|
+
getPreferredColorScheme as w,
|
|
58363
|
+
createMemo as x,
|
|
58364
|
+
createComponent as y,
|
|
58365
|
+
createContext as z
|
|
58586
58366
|
};
|