@adyen/kyc-components 3.28.0 → 3.29.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/adyen-kyc-components.es.js +647 -252
- package/dist/es/us-check-account-number-CHnzmLNd.js +39 -0
- package/dist/es/us-check-o5Ax_0LS.js +37 -0
- package/dist/es/us-check-routing-number-BtVf7GH3.js +40 -0
- package/dist/style.css +65 -11
- package/dist/types/components/BasicInformation/component/BasicInformationComponent.d.ts +1 -1
- package/dist/types/components/BasicInformation/types.d.ts +4 -4
- package/dist/types/components/BusinessDetails/types.d.ts +4 -4
- package/dist/types/components/BusinessSelection/BusinessInformationCard.d.ts +4 -3
- package/dist/types/components/BusinessSelection/component/BusinessSelectionComponent.d.ts +1 -1
- package/dist/types/components/BusinessSelection/types.d.ts +4 -4
- package/dist/types/components/ContractingStatus/ContractingStatus.d.ts +12 -0
- package/dist/types/components/Dropins/BusinessDetailsDropin/components/BusinessDetailsDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/BusinessDetailsDropin/types.d.ts +2 -2
- package/dist/types/components/Dropins/BusinessDetailsDropin/utils.d.ts +1 -1
- package/dist/types/components/Dropins/CompanySearchDropin/components/CompanySearchDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/CompanySearchDropin/types.d.ts +0 -2
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/ManageContractingComponent/ManageContractingComponent.d.ts +6 -0
- package/dist/types/components/PayoutAccount/component/CheckGuidance/CheckGuidance.d.ts +6 -0
- package/dist/types/components/embedded-ui/OutlinedIcon/OutlinedIcon.d.ts +5 -0
- package/dist/types/components/embedded-ui/Splashscreen/Splashscreen.d.ts +10 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/internal/Address/types.d.ts +1 -1
- package/dist/types/components/internal/Address/utils.d.ts +1 -1
- package/dist/types/components/internal/BankAccountNumber/types.d.ts +2 -0
- package/dist/types/components/internal/BranchCode/types.d.ts +2 -0
- package/dist/types/components/internal/Button/Button.d.ts +1 -1
- package/dist/types/components/internal/Button/types.d.ts +1 -0
- package/dist/types/components/internal/Confirm/Confirm.d.ts +2 -0
- package/dist/types/components/internal/Confirm/types.d.ts +6 -0
- package/dist/types/components/internal/DecisionMakerRole/types.d.ts +1 -1
- package/dist/types/components/internal/FormFields/MaskedInputText/MaskedInputText.d.ts +2 -1
- package/dist/types/components/internal/IdFieldTypeSelector/countryIdNumberTypes.d.ts +1 -1
- package/dist/types/components/internal/Modal/Modal.d.ts +1 -1
- package/dist/types/components/internal/Skeleton/Skeleton.d.ts +0 -1
- package/dist/types/components/internal/Svg/svgs.d.ts +3 -0
- package/dist/types/core/hooks/useBusinessData/types.d.ts +4 -4
- package/dist/types/core/hooks/useCompanySearchTaskSubmit.d.ts +3 -1
- package/dist/types/utils/datasetUtil.d.ts +1 -1
- package/dist/types/utils/payout-account-util.d.ts +1 -0
- package/dist/types/utils/validatorUtils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -95,7 +95,6 @@ const defaultTrans = {
|
|
|
95
95
|
accountNumberOrIbanVisible: "Includes your account number or IBAN",
|
|
96
96
|
accountNumberVisible: "Includes your account number",
|
|
97
97
|
accountVerification: "Account Verification",
|
|
98
|
-
achRoutingNumber: "ACH routing number",
|
|
99
98
|
acknowledgePciRequirements: "We hereby acknowledge that we must remain compliant with the aforementioned PCI DSS requirements at all times as long as we want to receive payments. Consequently, we must continuously reassess our environment and implement any additional PCI DSS requirements if our environment changes.",
|
|
100
99
|
actionNeeded: "Action needed",
|
|
101
100
|
add: "Add",
|
|
@@ -137,6 +136,7 @@ const defaultTrans = {
|
|
|
137
136
|
areYouACompany: "Are you a company?",
|
|
138
137
|
areYouAnIndividual: "Are you an individual?",
|
|
139
138
|
areYouSureToLeave: "Are you sure you want to leave?",
|
|
139
|
+
areYouSureYouWantToDeleteThisBankAccount: "Are you sure you want to delete this bank account?",
|
|
140
140
|
arithmosEngraphes: "Αριθμός Εγγραφής Φ.Π.Α.",
|
|
141
141
|
articlesOfIncorporation: "Articles of incorporation",
|
|
142
142
|
arvonlisaveronumeroMervardesskattenummer: "Arvonlisäveronumero Mervärdesskattenummer",
|
|
@@ -216,6 +216,7 @@ const defaultTrans = {
|
|
|
216
216
|
businessSelection__footerButton: "Add details manually",
|
|
217
217
|
businessSelection__heading: "Select your business",
|
|
218
218
|
businessSelection__invalidTin: "This company's TIN doesn't match yours",
|
|
219
|
+
businessSelection__tinVerificationFailure: "Sorry, something went wrong. Try again or continue by pressing Add details manually",
|
|
219
220
|
businessStructure: "Business structure",
|
|
220
221
|
businessTrust: "Business trust",
|
|
221
222
|
businessTrusteeDetails: "Business trustee details",
|
|
@@ -237,6 +238,7 @@ const defaultTrans = {
|
|
|
237
238
|
chamberOfCommerceExtract: "Chamber of Commerce extract",
|
|
238
239
|
chamberOfCommerceRegistrationNumber: "Chamber of Commerce registration number",
|
|
239
240
|
changeYourBusinessSetup: "Change your business setup?",
|
|
241
|
+
chargeCardUserAgreement: "Charge Card User Agreement",
|
|
240
242
|
charitableTrust: "Charitable trust",
|
|
241
243
|
charityNumber: "Charity number",
|
|
242
244
|
charter: "Charter",
|
|
@@ -334,6 +336,7 @@ const defaultTrans = {
|
|
|
334
336
|
decisionMakers: "Decision-makers",
|
|
335
337
|
definedBeneficiary: "Defined beneficiary",
|
|
336
338
|
definedBeneficiaryDescription: "A natural person, corporate entity, or member of a class in whose interest the trust is principally constituted or operates.",
|
|
339
|
+
"delete": "Delete",
|
|
337
340
|
depositSlip: "Deposit slip",
|
|
338
341
|
describeWhoIsABeneficiaryInYourTrust: "Describe in open format who is set to be a beneficiary in your trust deed",
|
|
339
342
|
description: "Description",
|
|
@@ -405,6 +408,7 @@ const defaultTrans = {
|
|
|
405
408
|
enterAMaximumOfNCharactersWithAMixForExample: "Enter a maximum of %{maxChars} characters, with a mix of letters and numbers. For example, %{example}",
|
|
406
409
|
enterAMaximumOfNDigitsForExample: "Enter a maximum of %{maxDigits} digits. For example, %{example}",
|
|
407
410
|
enterAMaximumOfNMoreDigitsForExample: "Enter a maximum of %{maxDigits} more digits. For example, %{example}",
|
|
411
|
+
enterEnglishLetterFollowedByXtoYDigitsForExample: "Enter an English-equivalent letter (C for HE, O for AE, P for Σ) followed by %{minDigits} - %{maxDigits} digits. For example, %{example}",
|
|
408
412
|
enterLastNDigitsForExample: "Enter the last %{numDigits} digits. For example, %{example}",
|
|
409
413
|
enterLastNameExactlyAsAppearInID: "Enter your last name(s) exactly as it appears on your identity document",
|
|
410
414
|
enterNCharactersForExample: "Enter %{numChars} characters. For example, %{example}",
|
|
@@ -1022,6 +1026,7 @@ const defaultTrans = {
|
|
|
1022
1026
|
parentCompany: "Parent company",
|
|
1023
1027
|
parentCompanyInformation: "Parent company information",
|
|
1024
1028
|
partitaIVA: "Partita IVA",
|
|
1029
|
+
codiceFiscalePartitaIVA: "Codice Fiscale / Partita IVA",
|
|
1025
1030
|
partnerShipAgreement: "Partnership agreement",
|
|
1026
1031
|
partnership: "Partnership",
|
|
1027
1032
|
partnershipIncorporated: "Incorporated partnership",
|
|
@@ -1052,6 +1057,7 @@ const defaultTrans = {
|
|
|
1052
1057
|
pciDssQuestionnaire: "PCI DSS questionnaire",
|
|
1053
1058
|
pciSignFailed: "PCI signing failed",
|
|
1054
1059
|
pciSignedSuccessfully: "PCI signed successfully",
|
|
1060
|
+
pciDssSelfAssesmentSignedSuccessfully: "PCI-DSS Self assesment questionnaire signed and dated",
|
|
1055
1061
|
personAppointmentUnderTrustInstrument: "The person appointed under the trust instrument to direct or restrain the trustees in relation to their administration of the trust.",
|
|
1056
1062
|
personalDetails: "Personal details",
|
|
1057
1063
|
personnummer: "Personnummer",
|
|
@@ -1107,7 +1113,7 @@ const defaultTrans = {
|
|
|
1107
1113
|
reasonForFillingIndividualAddressDetails: "We have to make sure that everyone who uses our services is who they say they are. To do that, we'll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",
|
|
1108
1114
|
reasonForFillingIndividualPersonalDetails: "We have to make sure that everyone who uses our services is who they say they are. To do that, we'll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",
|
|
1109
1115
|
reasonForFillingPayoutAccountDetails: "We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we'll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",
|
|
1110
|
-
reasonForFillingPayoutDetails: "
|
|
1116
|
+
reasonForFillingPayoutDetails: "This bank account will be verified to prevent fraud or other misuse of funds in compliance with global regulations.",
|
|
1111
1117
|
region: "Region",
|
|
1112
1118
|
registeredAddress: "Registered address",
|
|
1113
1119
|
registeredAddressHeaderDescription: "The address as it appears on your company's official registration documents.",
|
|
@@ -1224,8 +1230,10 @@ const defaultTrans = {
|
|
|
1224
1230
|
selectTheApplicableRoles: "Select the applicable role(s)",
|
|
1225
1231
|
selectTheBankToReceivePayouts: "After this page, you can select the bank where you would like to receive the payouts.",
|
|
1226
1232
|
selectedSomeRolesBasedOnMyinfo: "We selected some roles based on Myinfo business data about your company's appointment holders and shareholders.",
|
|
1233
|
+
serviceAgreements: "Service agreements",
|
|
1227
1234
|
serviceAgreementSignFailed: "Service agreement signing failed",
|
|
1228
1235
|
serviceAgreementSignedSuccessfully: "Service agreement signed successfully",
|
|
1236
|
+
serviceAgreementSignedAndDated: "Service agreement signed and dated",
|
|
1229
1237
|
sessionTimeout: "Session timeout",
|
|
1230
1238
|
setUpYourAccount: "Set up your account",
|
|
1231
1239
|
settlerDetailsIncl: "Settlor details including their full legal name and home address",
|
|
@@ -1682,6 +1690,12 @@ function useToastContext() {
|
|
|
1682
1690
|
}
|
|
1683
1691
|
return context;
|
|
1684
1692
|
}
|
|
1693
|
+
const CoreContext = createContext(void 0);
|
|
1694
|
+
const useCoreContext = () => {
|
|
1695
|
+
const context = useContext(CoreContext);
|
|
1696
|
+
if (!context) throw Error("You need a <CoreProvider> to use core context");
|
|
1697
|
+
return context;
|
|
1698
|
+
};
|
|
1685
1699
|
let suppressed = false;
|
|
1686
1700
|
const consoleMethodsPrefixable = Object.freeze(["debug", "info", "log", "warn", "error", "trace"]);
|
|
1687
1701
|
const stringSubstitutionRegex = /%([soOc]|(\.\d)?[dif])/;
|
|
@@ -2036,15 +2050,30 @@ function useBusinessData({
|
|
|
2036
2050
|
handleVerifyTin,
|
|
2037
2051
|
handleClearCompanyData
|
|
2038
2052
|
}) {
|
|
2039
|
-
const [
|
|
2040
|
-
const [
|
|
2041
|
-
const [
|
|
2042
|
-
const [
|
|
2053
|
+
const [searching, setSearching] = useState("idle");
|
|
2054
|
+
const [fetching, setFetching] = useState("idle");
|
|
2055
|
+
const [verifying, setVerifying] = useState("idle");
|
|
2056
|
+
const [resettingTrustedData, setResettingTrustedData] = useState("idle");
|
|
2043
2057
|
const [searchResults, setSearchResults] = useState();
|
|
2044
2058
|
const [cachedSearch, setCachedSearch] = useState();
|
|
2045
2059
|
const [cachedBusiness, setCachedBusiness] = useState();
|
|
2046
2060
|
const [verifiedBusiness, setVerifiedBusiness] = useState();
|
|
2047
2061
|
const [invalidTin, setInvalidTin] = useState(false);
|
|
2062
|
+
const primarySourceSearch = async (data, indexSearch, deepSearch) => {
|
|
2063
|
+
let response;
|
|
2064
|
+
try {
|
|
2065
|
+
response = await deepSearch({
|
|
2066
|
+
...data,
|
|
2067
|
+
limit: data.limit ?? 15
|
|
2068
|
+
});
|
|
2069
|
+
} catch (e) {
|
|
2070
|
+
response = await indexSearch({
|
|
2071
|
+
...data,
|
|
2072
|
+
limit: data.limit ?? 15
|
|
2073
|
+
});
|
|
2074
|
+
}
|
|
2075
|
+
return response;
|
|
2076
|
+
};
|
|
2048
2077
|
const searchForBusiness = useCallback(async (data) => {
|
|
2049
2078
|
if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
|
|
2050
2079
|
logger$I.log("Missing handlers for searchForBusiness");
|
|
@@ -2052,24 +2081,22 @@ function useBusinessData({
|
|
|
2052
2081
|
}
|
|
2053
2082
|
if (searchResults && objectsDeepEqual(cachedSearch, data)) return;
|
|
2054
2083
|
try {
|
|
2055
|
-
|
|
2056
|
-
const {
|
|
2057
|
-
results
|
|
2058
|
-
} = KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await handleCompanyIndexSearch({
|
|
2084
|
+
setSearching("loading");
|
|
2085
|
+
const response = KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await handleCompanyIndexSearch({
|
|
2059
2086
|
...data,
|
|
2060
2087
|
limit: data.limit ?? 15
|
|
2061
|
-
}) : await
|
|
2088
|
+
}) : await primarySourceSearch({
|
|
2062
2089
|
...data,
|
|
2063
2090
|
limit: data.limit ?? 15
|
|
2064
|
-
});
|
|
2065
|
-
setSearchResults(results);
|
|
2066
|
-
return results;
|
|
2091
|
+
}, handleCompanyIndexSearch, handleCompanyDeepSearch);
|
|
2092
|
+
setSearchResults(response == null ? void 0 : response.results);
|
|
2093
|
+
return response == null ? void 0 : response.results;
|
|
2067
2094
|
} catch (e) {
|
|
2068
|
-
|
|
2095
|
+
setSearching("error");
|
|
2069
2096
|
logger$I.error(e);
|
|
2070
2097
|
} finally {
|
|
2071
2098
|
setCachedSearch(data);
|
|
2072
|
-
|
|
2099
|
+
setSearching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
2073
2100
|
}
|
|
2074
2101
|
}, [handleCompanyDeepSearch, handleCompanyIndexSearch, searchResults, cachedSearch]);
|
|
2075
2102
|
const fetchBusinessData = useCallback(async (company) => {
|
|
@@ -2087,7 +2114,8 @@ function useBusinessData({
|
|
|
2087
2114
|
const date = (/* @__PURE__ */ new Date()).toDateString();
|
|
2088
2115
|
const isDataCompliant = company.lastUpdate ? Date.parse(date) - Date.parse(company.lastUpdate) < LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW : false;
|
|
2089
2116
|
try {
|
|
2090
|
-
|
|
2117
|
+
setFetching("loading");
|
|
2118
|
+
setVerifying("idle");
|
|
2091
2119
|
setInvalidTin(false);
|
|
2092
2120
|
const businessData = isDataCompliant ? await handleGetCompanyDataset({
|
|
2093
2121
|
companyId: company.id,
|
|
@@ -2099,11 +2127,11 @@ function useBusinessData({
|
|
|
2099
2127
|
setCachedBusiness(businessData);
|
|
2100
2128
|
return businessData;
|
|
2101
2129
|
} catch (e) {
|
|
2102
|
-
|
|
2130
|
+
setFetching("error");
|
|
2103
2131
|
setCachedBusiness(void 0);
|
|
2104
2132
|
logger$I.error(e);
|
|
2105
2133
|
} finally {
|
|
2106
|
-
|
|
2134
|
+
setFetching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
2107
2135
|
}
|
|
2108
2136
|
}, [cachedBusiness, handleGetCompanyDataset, handleRefreshCompanyDataset]);
|
|
2109
2137
|
const verifyBusinessData = useCallback(async (data, tin) => {
|
|
@@ -2112,7 +2140,7 @@ function useBusinessData({
|
|
|
2112
2140
|
return;
|
|
2113
2141
|
}
|
|
2114
2142
|
try {
|
|
2115
|
-
|
|
2143
|
+
setVerifying("loading");
|
|
2116
2144
|
setVerifiedBusiness(void 0);
|
|
2117
2145
|
setInvalidTin(false);
|
|
2118
2146
|
const {
|
|
@@ -2128,21 +2156,21 @@ function useBusinessData({
|
|
|
2128
2156
|
}
|
|
2129
2157
|
return matched;
|
|
2130
2158
|
} catch (e) {
|
|
2131
|
-
|
|
2159
|
+
setVerifying("error");
|
|
2132
2160
|
logger$I.error(e);
|
|
2133
2161
|
} finally {
|
|
2134
|
-
|
|
2162
|
+
setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
2135
2163
|
}
|
|
2136
2164
|
}, [handleVerifyTin]);
|
|
2137
2165
|
const clearTrustedBusinessData = useCallback(async () => {
|
|
2138
2166
|
try {
|
|
2139
|
-
|
|
2167
|
+
setResettingTrustedData("loading");
|
|
2140
2168
|
await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
|
|
2141
2169
|
} catch (e) {
|
|
2142
|
-
|
|
2170
|
+
setResettingTrustedData("error");
|
|
2143
2171
|
logger$I.error(e);
|
|
2144
2172
|
} finally {
|
|
2145
|
-
|
|
2173
|
+
setResettingTrustedData((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
2146
2174
|
}
|
|
2147
2175
|
}, [handleClearCompanyData]);
|
|
2148
2176
|
const resetBusinessData = () => {
|
|
@@ -2161,10 +2189,10 @@ function useBusinessData({
|
|
|
2161
2189
|
resetBusinessData,
|
|
2162
2190
|
resetTinVerification,
|
|
2163
2191
|
// Data
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2192
|
+
searching,
|
|
2193
|
+
fetching,
|
|
2194
|
+
verifying,
|
|
2195
|
+
resettingTrustedData,
|
|
2168
2196
|
currentSearchName: cachedSearch == null ? void 0 : cachedSearch.text,
|
|
2169
2197
|
searchResults,
|
|
2170
2198
|
verifiedBusiness,
|
|
@@ -2373,8 +2401,9 @@ const mergeFieldMetadataIntoProps = (fieldName, metadata, otherProps) => {
|
|
|
2373
2401
|
const MAX_LENGTH = 30;
|
|
2374
2402
|
const getMaxLengthByFieldAndCountry = (formattingRules, field, country, ignoreIfFormatterExists) => {
|
|
2375
2403
|
var _a, _b, _c, _d;
|
|
2404
|
+
if (!country) return void 0;
|
|
2376
2405
|
if ((_b = (_a = formattingRules[country]) == null ? void 0 : _a[field]) == null ? void 0 : _b.formatter) {
|
|
2377
|
-
return
|
|
2406
|
+
return void 0;
|
|
2378
2407
|
}
|
|
2379
2408
|
const maxLength = (_d = (_c = formattingRules[country]) == null ? void 0 : _c[field]) == null ? void 0 : _d.maxlength;
|
|
2380
2409
|
return maxLength || MAX_LENGTH;
|
|
@@ -2458,6 +2487,9 @@ const svgs = {
|
|
|
2458
2487
|
"document-cutoff": lazy(() => import("./document-cut-off-D2vCeeIS.js")),
|
|
2459
2488
|
"document-expired": lazy(() => import("./document-expired-_4Syh1xW.js")),
|
|
2460
2489
|
"document-front": lazy(() => import("./document-front-9Glzn7ZR.js")),
|
|
2490
|
+
"us-check": lazy(() => import("./us-check-o5Ax_0LS.js")),
|
|
2491
|
+
"us-check-routing-number": lazy(() => import("./us-check-routing-number-BtVf7GH3.js")),
|
|
2492
|
+
"us-check-account-number": lazy(() => import("./us-check-account-number-CHnzmLNd.js")),
|
|
2461
2493
|
"id-blurred": lazy(() => import("./id-blurred-A45CVnPk.js")),
|
|
2462
2494
|
"id-cutoff": lazy(() => import("./id-cut-off-DMoJYcGr.js")),
|
|
2463
2495
|
"id-front": lazy(() => import("./id-front-CTIDY7Nu.js")),
|
|
@@ -2544,6 +2576,7 @@ const Button = ({
|
|
|
2544
2576
|
role,
|
|
2545
2577
|
small,
|
|
2546
2578
|
block,
|
|
2579
|
+
critical,
|
|
2547
2580
|
shaded,
|
|
2548
2581
|
label = "",
|
|
2549
2582
|
icon,
|
|
@@ -2590,6 +2623,7 @@ const Button = ({
|
|
|
2590
2623
|
"adyen-kyc-button--secondary": secondary,
|
|
2591
2624
|
"adyen-kyc-button--tertiary": tertiary && !secondary,
|
|
2592
2625
|
"adyen-kyc-button--block": block,
|
|
2626
|
+
"adyen-kyc-button--critical": critical,
|
|
2593
2627
|
"adyen-kyc-button--small": small && label,
|
|
2594
2628
|
"adyen-kyc-button--shaded": shaded && icon && tertiary,
|
|
2595
2629
|
// disallow shaded effect if not just tertiary icon
|
|
@@ -3775,6 +3809,7 @@ const datasetIdentifier = {
|
|
|
3775
3809
|
function datasetUtilities(locale) {
|
|
3776
3810
|
return {
|
|
3777
3811
|
getCountryName: (countryCode) => {
|
|
3812
|
+
if (!countryCode) return null;
|
|
3778
3813
|
const datasetKey = createDatasetKey(datasetIdentifier.country, locale);
|
|
3779
3814
|
return getDataName(datasetKey, countryCode);
|
|
3780
3815
|
},
|
|
@@ -3966,15 +4001,31 @@ const Tag = ({
|
|
|
3966
4001
|
children
|
|
3967
4002
|
});
|
|
3968
4003
|
};
|
|
3969
|
-
const
|
|
4004
|
+
const adyenKycDropdown = "adyen-kyc-dropdown";
|
|
4005
|
+
const adyenKycDropdownButton = "adyen-kyc-dropdown-button";
|
|
4006
|
+
const adyenKycDropdownButtonActive = "adyen-kyc-dropdown-button--active";
|
|
4007
|
+
const adyenKycFilterInput = "adyen-kyc-filter-input";
|
|
4008
|
+
const adyenKycDropdownList = "adyen-kyc-dropdown-list";
|
|
4009
|
+
const adyenKycDropdownListTransformer = "adyen-kyc-dropdown-list__transformer";
|
|
4010
|
+
const adyenKycDropdownListActive = "adyen-kyc-dropdown-list--active";
|
|
4011
|
+
const adyenKycDropdownElement = "adyen-kyc-dropdown-element";
|
|
4012
|
+
const styles$7 = {
|
|
3970
4013
|
"adyen-kyc-dropdown": "adyen-kyc-dropdown",
|
|
4014
|
+
adyenKycDropdown,
|
|
3971
4015
|
"adyen-kyc-dropdown-button": "adyen-kyc-dropdown-button",
|
|
4016
|
+
adyenKycDropdownButton,
|
|
3972
4017
|
"adyen-kyc-dropdown-button--active": "adyen-kyc-dropdown-button--active",
|
|
4018
|
+
adyenKycDropdownButtonActive,
|
|
3973
4019
|
"adyen-kyc-filter-input": "adyen-kyc-filter-input",
|
|
4020
|
+
adyenKycFilterInput,
|
|
3974
4021
|
"adyen-kyc-dropdown-list": "adyen-kyc-dropdown-list",
|
|
4022
|
+
adyenKycDropdownList,
|
|
3975
4023
|
"adyen-kyc-dropdown-list__transformer": "adyen-kyc-dropdown-list__transformer",
|
|
4024
|
+
adyenKycDropdownListTransformer,
|
|
3976
4025
|
"adyen-kyc-dropdown-list--active": "adyen-kyc-dropdown-list--active",
|
|
3977
|
-
|
|
4026
|
+
adyenKycDropdownListActive,
|
|
4027
|
+
"adyen-kyc-dropdown-element": "adyen-kyc-dropdown-element",
|
|
4028
|
+
adyenKycDropdownElement
|
|
3978
4029
|
};
|
|
3979
4030
|
function SelectButtonElement({
|
|
3980
4031
|
filterable,
|
|
@@ -4023,10 +4074,10 @@ function SelectButton({
|
|
|
4023
4074
|
"aria-haspopup": "listbox",
|
|
4024
4075
|
className: cx({
|
|
4025
4076
|
"adyen-kyc-dropdown-button": true,
|
|
4026
|
-
[styles$
|
|
4077
|
+
[styles$7["adyen-kyc-dropdown-button"]]: true,
|
|
4027
4078
|
"adyen-kyc-dropdown-button--readonly": readonly,
|
|
4028
4079
|
"adyen-kyc-dropdown-button--active": showList,
|
|
4029
|
-
[styles$
|
|
4080
|
+
[styles$7["adyen-kyc-dropdown-button--active"]]: showList,
|
|
4030
4081
|
"adyen-kyc-dropdown-button--invalid": isInvalid,
|
|
4031
4082
|
"adyen-kyc-dropdown-field--valid": isValid,
|
|
4032
4083
|
"adyen-kyc-dropdown-button-search": isSearch
|
|
@@ -4096,7 +4147,7 @@ const SelectButtonContentSingle = ({
|
|
|
4096
4147
|
"aria-expanded": showList,
|
|
4097
4148
|
"aria-owns": selectListId,
|
|
4098
4149
|
autoComplete: "off",
|
|
4099
|
-
className: cx("adyen-kyc-filter-input", [styles$
|
|
4150
|
+
className: cx("adyen-kyc-filter-input", [styles$7["adyen-kyc-filter-input"]]),
|
|
4100
4151
|
onInput,
|
|
4101
4152
|
placeholder,
|
|
4102
4153
|
ref: filterInputRef,
|
|
@@ -4184,7 +4235,7 @@ const SelectListItem = ({
|
|
|
4184
4235
|
}) => jsx("li", {
|
|
4185
4236
|
"aria-disabled": !!item.disabled,
|
|
4186
4237
|
"aria-selected": selected,
|
|
4187
|
-
className: cx(["adyen-kyc-dropdown-element", styles$
|
|
4238
|
+
className: cx(["adyen-kyc-dropdown-element", styles$7["adyen-kyc-dropdown-element"], {
|
|
4188
4239
|
"adyen-kyc-dropdown-element--active": selected,
|
|
4189
4240
|
"adyen-kyc-dropdown-element--disabled": !!item.disabled,
|
|
4190
4241
|
"adyen-kyc-dropdown-multi-element": isMulti,
|
|
@@ -4315,9 +4366,9 @@ function SelectList({
|
|
|
4315
4366
|
test: true,
|
|
4316
4367
|
"adyen-kyc-dropdown-list--above": showAbove,
|
|
4317
4368
|
"adyen-kyc-dropdown-list": true,
|
|
4318
|
-
[styles$
|
|
4369
|
+
[styles$7["adyen-kyc-dropdown-list"]]: true,
|
|
4319
4370
|
"adyen-kyc-dropdown-list--active": showList,
|
|
4320
|
-
[styles$
|
|
4371
|
+
[styles$7["adyen-kyc-dropdown-list--active"]]: showList
|
|
4321
4372
|
}),
|
|
4322
4373
|
id: props.selectListId,
|
|
4323
4374
|
role: "listbox",
|
|
@@ -4520,7 +4571,7 @@ const Select = ({
|
|
|
4520
4571
|
};
|
|
4521
4572
|
}, []);
|
|
4522
4573
|
return jsxs("div", {
|
|
4523
|
-
className: cx(["adyen-kyc-dropdown", styles$
|
|
4574
|
+
className: cx(["adyen-kyc-dropdown", styles$7["adyen-kyc-dropdown"], className, ...classNameModifiers.map((m) => `adyen-kyc-dropdown--${m}`)]),
|
|
4524
4575
|
ref: selectContainerRef,
|
|
4525
4576
|
onClick: (e) => {
|
|
4526
4577
|
e.stopPropagation();
|
|
@@ -5554,7 +5605,7 @@ const businessRegistrationNumberMasks = {
|
|
|
5554
5605
|
},
|
|
5555
5606
|
[CountryCodes.Cyprus]: {
|
|
5556
5607
|
default: {
|
|
5557
|
-
mask: makeMask(...
|
|
5608
|
+
mask: makeMask(...customInputs(1, /^[COP]$/), ...numericInputs(1), ...numericInputs(7, true)),
|
|
5558
5609
|
transformOnType: uppercase
|
|
5559
5610
|
}
|
|
5560
5611
|
},
|
|
@@ -6395,7 +6446,7 @@ const businessRegistrationNumberPatterns = {
|
|
|
6395
6446
|
soleProprietorship: /^\d{8}$/
|
|
6396
6447
|
},
|
|
6397
6448
|
[CountryCodes.Cyprus]: {
|
|
6398
|
-
default: /^[
|
|
6449
|
+
default: /^[COP]{1}\d{1,8}$/
|
|
6399
6450
|
},
|
|
6400
6451
|
[CountryCodes.CzechRepublic]: {
|
|
6401
6452
|
default: /^\d{8,10}$/
|
|
@@ -6742,13 +6793,11 @@ const defaultFieldConfig$9 = {
|
|
|
6742
6793
|
mask: businessRegistrationNumberMasks[CountryCodes.Cyprus].default,
|
|
6743
6794
|
validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.Cyprus].default),
|
|
6744
6795
|
guidanceText: {
|
|
6745
|
-
key: "
|
|
6796
|
+
key: "enterEnglishLetterFollowedByXtoYDigitsForExample",
|
|
6746
6797
|
values: {
|
|
6747
|
-
minLetters: "1",
|
|
6748
|
-
maxLetters: "2",
|
|
6749
6798
|
minDigits: "1",
|
|
6750
6799
|
maxDigits: "8",
|
|
6751
|
-
example: "
|
|
6800
|
+
example: "C12345678"
|
|
6752
6801
|
}
|
|
6753
6802
|
}
|
|
6754
6803
|
},
|
|
@@ -6944,18 +6993,16 @@ const defaultFieldConfig$9 = {
|
|
|
6944
6993
|
case "partitaIVA":
|
|
6945
6994
|
default:
|
|
6946
6995
|
return {
|
|
6947
|
-
label: "
|
|
6996
|
+
label: "codiceFiscalePartitaIVA",
|
|
6948
6997
|
validators: validatePatternOnBlur(/^\d{11}$/),
|
|
6949
6998
|
mask: {
|
|
6950
|
-
mask: makeMask(...
|
|
6951
|
-
includeInValue: false
|
|
6952
|
-
}), spacer, ...numericInputs(11))
|
|
6999
|
+
mask: makeMask(spacer, ...numericInputs(11))
|
|
6953
7000
|
},
|
|
6954
7001
|
guidanceText: {
|
|
6955
7002
|
key: "enterTheRemainingNDigitsForExample",
|
|
6956
7003
|
values: {
|
|
6957
7004
|
numDigits: "11",
|
|
6958
|
-
example: "
|
|
7005
|
+
example: "47040001100"
|
|
6959
7006
|
}
|
|
6960
7007
|
}
|
|
6961
7008
|
};
|
|
@@ -7450,6 +7497,7 @@ const MaskedInputText = ({
|
|
|
7450
7497
|
value,
|
|
7451
7498
|
onInput,
|
|
7452
7499
|
onBlur,
|
|
7500
|
+
onFocus,
|
|
7453
7501
|
onMismatch: onMismatchExternal,
|
|
7454
7502
|
isValid: validationIsValid,
|
|
7455
7503
|
errorMessage,
|
|
@@ -7617,6 +7665,7 @@ Falling back to partially valid value "${fallback}"`);
|
|
|
7617
7665
|
}
|
|
7618
7666
|
},
|
|
7619
7667
|
onFocusHandler: (event) => {
|
|
7668
|
+
onFocus == null ? void 0 : onFocus();
|
|
7620
7669
|
fieldOnFocus(event);
|
|
7621
7670
|
setIsFocused(true);
|
|
7622
7671
|
},
|
|
@@ -7711,7 +7760,7 @@ const companyRegistrationNumberOptions = {
|
|
|
7711
7760
|
}],
|
|
7712
7761
|
[CountryCodes.Italy]: [{
|
|
7713
7762
|
id: "partitaIVA",
|
|
7714
|
-
name: "
|
|
7763
|
+
name: "codiceFiscalePartitaIVA"
|
|
7715
7764
|
}, {
|
|
7716
7765
|
id: "CCIAA",
|
|
7717
7766
|
name: "CCIAA"
|
|
@@ -11942,7 +11991,7 @@ const LABELS = {
|
|
|
11942
11991
|
}
|
|
11943
11992
|
};
|
|
11944
11993
|
const getKeyForField = (fieldName, country) => country ? LABELS[fieldName][country] || LABELS[fieldName].default : LABELS[fieldName].default;
|
|
11945
|
-
const getAddressSchemaForCountry = (country) => ADDRESS_SCHEMAS[country]
|
|
11994
|
+
const getAddressSchemaForCountry = (country) => country && ADDRESS_SCHEMAS[country] ? ADDRESS_SCHEMAS[country] : ADDRESS_SCHEMAS.default;
|
|
11946
11995
|
const getAddressSchemaLabelsByCountry = (country) => {
|
|
11947
11996
|
const schema = getAddressSchemaForCountry(country);
|
|
11948
11997
|
return schema.reduce((labels2, field) => ({
|
|
@@ -12778,11 +12827,10 @@ function Address(props) {
|
|
|
12778
12827
|
const stateRef = useRef({
|
|
12779
12828
|
setState: null
|
|
12780
12829
|
});
|
|
12781
|
-
const addressFields = ADDRESS_SCHEMAS[dataProp == null ? void 0 : dataProp.country] ?? ADDRESS_SCHEMAS.default;
|
|
12782
12830
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
12783
|
-
const requiredFields = (requiredFieldsProp == null ? void 0 : requiredFieldsProp.includes("stateOrProvince")) || dataProp.country && COUNTRIES_WITH_STATES_DATASET.includes(dataProp.country) ?
|
|
12784
|
-
const rules2 = useMemo(() => addressValidationRules(dataProp.country), [dataProp.country]);
|
|
12785
|
-
const rulesV4 = useMemo(() => addressValidationRulesV4(dataProp.country, i18n), [dataProp.country, i18n]);
|
|
12831
|
+
const requiredFields = (requiredFieldsProp == null ? void 0 : requiredFieldsProp.includes("stateOrProvince")) || (dataProp == null ? void 0 : dataProp.country) && COUNTRIES_WITH_STATES_DATASET.includes(dataProp == null ? void 0 : dataProp.country) ? getAddressSchemaForCountry(dataProp == null ? void 0 : dataProp.country) : getAddressSchemaForCountry(dataProp == null ? void 0 : dataProp.country).filter((ad) => ad !== "stateOrProvince");
|
|
12832
|
+
const rules2 = useMemo(() => (dataProp == null ? void 0 : dataProp.country) ? addressValidationRules(dataProp == null ? void 0 : dataProp.country) : {}, [dataProp == null ? void 0 : dataProp.country]);
|
|
12833
|
+
const rulesV4 = useMemo(() => (dataProp == null ? void 0 : dataProp.country) ? addressValidationRulesV4(dataProp == null ? void 0 : dataProp.country, i18n) : {}, [dataProp == null ? void 0 : dataProp.country, i18n]);
|
|
12786
12834
|
const {
|
|
12787
12835
|
data,
|
|
12788
12836
|
errors,
|
|
@@ -12810,7 +12858,7 @@ function Address(props) {
|
|
|
12810
12858
|
optionalFields: optionalFieldsProp
|
|
12811
12859
|
}, i18n);
|
|
12812
12860
|
useEffect(() => {
|
|
12813
|
-
if (dataProp.country !== data.country && dataProp.country) {
|
|
12861
|
+
if ((dataProp == null ? void 0 : dataProp.country) !== data.country && (dataProp == null ? void 0 : dataProp.country)) {
|
|
12814
12862
|
requiredFields.forEach((field) => {
|
|
12815
12863
|
handleChangeFor(field, "input")("");
|
|
12816
12864
|
});
|
|
@@ -12818,7 +12866,7 @@ function Address(props) {
|
|
|
12818
12866
|
setShowAutocompletedAddressFields(false);
|
|
12819
12867
|
setShowAddAddressButton(true);
|
|
12820
12868
|
}
|
|
12821
|
-
}, [dataProp.country]);
|
|
12869
|
+
}, [dataProp == null ? void 0 : dataProp.country]);
|
|
12822
12870
|
useEffect(() => {
|
|
12823
12871
|
if (handleAddressSearch && handleFindAddress) {
|
|
12824
12872
|
setIsHandlerPresent(true);
|
|
@@ -12829,12 +12877,13 @@ function Address(props) {
|
|
|
12829
12877
|
}
|
|
12830
12878
|
}, []);
|
|
12831
12879
|
useEffect(() => {
|
|
12880
|
+
var _a, _b;
|
|
12832
12881
|
const processedData = ADDRESS_SCHEMA.reduce((acc, cur) => {
|
|
12833
12882
|
if (!formUtils.isRequiredField(cur)) {
|
|
12834
12883
|
delete acc[cur];
|
|
12835
12884
|
return acc;
|
|
12836
12885
|
}
|
|
12837
|
-
const fallbackValue = !formUtils.isRequiredField(cur) && !data[cur] && dataProp[cur] ? dataProp[cur] : "N/A";
|
|
12886
|
+
const fallbackValue = !formUtils.isRequiredField(cur) && !data[cur] && (dataProp == null ? void 0 : dataProp[cur]) ? dataProp[cur] : "N/A";
|
|
12838
12887
|
return {
|
|
12839
12888
|
...acc,
|
|
12840
12889
|
[cur]: formUtils.isRequiredField(cur) || !!data[cur] ? data[cur] : fallbackValue
|
|
@@ -12869,7 +12918,7 @@ function Address(props) {
|
|
|
12869
12918
|
},
|
|
12870
12919
|
isValid
|
|
12871
12920
|
});
|
|
12872
|
-
stateRef.current.setState({
|
|
12921
|
+
(_b = (_a = stateRef.current).setState) == null ? void 0 : _b.call(_a, {
|
|
12873
12922
|
type: "addToState",
|
|
12874
12923
|
value: {
|
|
12875
12924
|
...addressState,
|
|
@@ -12929,8 +12978,8 @@ function Address(props) {
|
|
|
12929
12978
|
}) => {
|
|
12930
12979
|
const hasHouseNumber = !!houseNumberOrName;
|
|
12931
12980
|
if (hasHouseNumber) {
|
|
12932
|
-
const isHouseNumberFirst = COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country);
|
|
12933
|
-
const needsComma = COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country);
|
|
12981
|
+
const isHouseNumberFirst = data.country ? COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country) : false;
|
|
12982
|
+
const needsComma = data.country ? COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country) : false;
|
|
12934
12983
|
const formattedAddress = isHouseNumberFirst ? `${houseNumberOrName}${needsComma ? ", " : " "}${street}` : `${street}${needsComma ? ", " : " "}${houseNumberOrName}`;
|
|
12935
12984
|
return handleChangeFor("address", "input")(formattedAddress);
|
|
12936
12985
|
}
|
|
@@ -12972,7 +13021,7 @@ function Address(props) {
|
|
|
12972
13021
|
className: "adyen-kyc-search-address",
|
|
12973
13022
|
children: [jsx(SearchAddress, {
|
|
12974
13023
|
handleChangeFor,
|
|
12975
|
-
data: dataProp,
|
|
13024
|
+
data: dataProp ?? {},
|
|
12976
13025
|
handleAddressSearch,
|
|
12977
13026
|
handleFindAddress,
|
|
12978
13027
|
legalEntityId,
|
|
@@ -12986,7 +13035,7 @@ function Address(props) {
|
|
|
12986
13035
|
className: "adyen-kyc-search-address--below-location",
|
|
12987
13036
|
children: [jsx(Icon, {
|
|
12988
13037
|
name: "location"
|
|
12989
|
-
}), datasetUtils.getCountryName(dataProp.country)]
|
|
13038
|
+
}), datasetUtils.getCountryName(dataProp == null ? void 0 : dataProp.country)]
|
|
12990
13039
|
}), showAddAddressButton && jsx(Button, {
|
|
12991
13040
|
showAsLink: true,
|
|
12992
13041
|
testId: "addAddressManuallyBtn",
|
|
@@ -15027,12 +15076,6 @@ function IdDocumentManualUploadComponent(props) {
|
|
|
15027
15076
|
});
|
|
15028
15077
|
}
|
|
15029
15078
|
const IdDocumentManualUpload = memo(IdDocumentManualUploadComponent, (prevProps, nextProps) => objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.name === nextProps.name);
|
|
15030
|
-
const CoreContext = createContext(void 0);
|
|
15031
|
-
const useCoreContext = () => {
|
|
15032
|
-
const context = useContext(CoreContext);
|
|
15033
|
-
if (!context) throw Error("You need a <CoreProvider> to use core context");
|
|
15034
|
-
return context;
|
|
15035
|
-
};
|
|
15036
15079
|
const useIdVerificationToken = ({
|
|
15037
15080
|
userDetails,
|
|
15038
15081
|
legalEntityId,
|
|
@@ -15088,21 +15131,49 @@ const useIdVerificationToken = ({
|
|
|
15088
15131
|
loadingStatus
|
|
15089
15132
|
};
|
|
15090
15133
|
};
|
|
15091
|
-
const
|
|
15134
|
+
const adyenKycLoadingInputForm = "adyen-kyc-loading-input__form";
|
|
15135
|
+
const adyenKycLoadingInputFormLoadingOpacity0 = "adyen-kyc-loading-input__form--loading-opacity0";
|
|
15136
|
+
const adyenKycLoadingInputFormLoadingOpacity01 = "adyen-kyc-loading-input__form--loading-opacity0-1";
|
|
15137
|
+
const adyenKycLoadingInputFormLoadingOpacity02 = "adyen-kyc-loading-input__form--loading-opacity0-2";
|
|
15138
|
+
const adyenKycLoadingInputFormLoadingOpacity03 = "adyen-kyc-loading-input__form--loading-opacity0-3";
|
|
15139
|
+
const adyenKycLoadingInputFormLoadingOpacity04 = "adyen-kyc-loading-input__form--loading-opacity0-4";
|
|
15140
|
+
const adyenKycLoadingInputFormLoadingOpacity05 = "adyen-kyc-loading-input__form--loading-opacity0-5";
|
|
15141
|
+
const adyenKycLoadingInputFormLoadingOpacity06 = "adyen-kyc-loading-input__form--loading-opacity0-6";
|
|
15142
|
+
const adyenKycLoadingInputFormLoadingOpacity07 = "adyen-kyc-loading-input__form--loading-opacity0-7";
|
|
15143
|
+
const adyenKycLoadingInputFormLoadingOpacity08 = "adyen-kyc-loading-input__form--loading-opacity0-8";
|
|
15144
|
+
const adyenKycLoadingInputFormLoadingOpacity09 = "adyen-kyc-loading-input__form--loading-opacity0-9";
|
|
15145
|
+
const adyenKycLoadingInputFormLoadingOpacity1 = "adyen-kyc-loading-input__form--loading-opacity1";
|
|
15146
|
+
const adyenKycLoadingInputLoader = "adyen-kyc-loading-input__loader";
|
|
15147
|
+
const adyenKycLoadingInputLoaderActive = "adyen-kyc-loading-input__loader--active";
|
|
15148
|
+
const styles$6 = {
|
|
15092
15149
|
"adyen-kyc-loading-input__form": "adyen-kyc-loading-input__form",
|
|
15150
|
+
adyenKycLoadingInputForm,
|
|
15093
15151
|
"adyen-kyc-loading-input__form--loading-opacity0": "adyen-kyc-loading-input__form--loading-opacity0",
|
|
15152
|
+
adyenKycLoadingInputFormLoadingOpacity0,
|
|
15094
15153
|
"adyen-kyc-loading-input__form--loading-opacity0-1": "adyen-kyc-loading-input__form--loading-opacity0-1",
|
|
15154
|
+
adyenKycLoadingInputFormLoadingOpacity01,
|
|
15095
15155
|
"adyen-kyc-loading-input__form--loading-opacity0-2": "adyen-kyc-loading-input__form--loading-opacity0-2",
|
|
15156
|
+
adyenKycLoadingInputFormLoadingOpacity02,
|
|
15096
15157
|
"adyen-kyc-loading-input__form--loading-opacity0-3": "adyen-kyc-loading-input__form--loading-opacity0-3",
|
|
15158
|
+
adyenKycLoadingInputFormLoadingOpacity03,
|
|
15097
15159
|
"adyen-kyc-loading-input__form--loading-opacity0-4": "adyen-kyc-loading-input__form--loading-opacity0-4",
|
|
15160
|
+
adyenKycLoadingInputFormLoadingOpacity04,
|
|
15098
15161
|
"adyen-kyc-loading-input__form--loading-opacity0-5": "adyen-kyc-loading-input__form--loading-opacity0-5",
|
|
15162
|
+
adyenKycLoadingInputFormLoadingOpacity05,
|
|
15099
15163
|
"adyen-kyc-loading-input__form--loading-opacity0-6": "adyen-kyc-loading-input__form--loading-opacity0-6",
|
|
15164
|
+
adyenKycLoadingInputFormLoadingOpacity06,
|
|
15100
15165
|
"adyen-kyc-loading-input__form--loading-opacity0-7": "adyen-kyc-loading-input__form--loading-opacity0-7",
|
|
15166
|
+
adyenKycLoadingInputFormLoadingOpacity07,
|
|
15101
15167
|
"adyen-kyc-loading-input__form--loading-opacity0-8": "adyen-kyc-loading-input__form--loading-opacity0-8",
|
|
15168
|
+
adyenKycLoadingInputFormLoadingOpacity08,
|
|
15102
15169
|
"adyen-kyc-loading-input__form--loading-opacity0-9": "adyen-kyc-loading-input__form--loading-opacity0-9",
|
|
15170
|
+
adyenKycLoadingInputFormLoadingOpacity09,
|
|
15103
15171
|
"adyen-kyc-loading-input__form--loading-opacity1": "adyen-kyc-loading-input__form--loading-opacity1",
|
|
15172
|
+
adyenKycLoadingInputFormLoadingOpacity1,
|
|
15104
15173
|
"adyen-kyc-loading-input__loader": "adyen-kyc-loading-input__loader",
|
|
15105
|
-
|
|
15174
|
+
adyenKycLoadingInputLoader,
|
|
15175
|
+
"adyen-kyc-loading-input__loader--active": "adyen-kyc-loading-input__loader--active",
|
|
15176
|
+
adyenKycLoadingInputLoaderActive
|
|
15106
15177
|
};
|
|
15107
15178
|
const LoaderWrapper = ({
|
|
15108
15179
|
children,
|
|
@@ -15116,12 +15187,12 @@ const LoaderWrapper = ({
|
|
|
15116
15187
|
const digit = formOpacityStrArr[0];
|
|
15117
15188
|
const decimal = formOpacityStrArr[1];
|
|
15118
15189
|
const opacity = decimal ? `${digit}-${decimal}` : `${digit}`;
|
|
15119
|
-
const wrapperClass = cx("adyen-kyc-loading-input__form", styles$
|
|
15120
|
-
[styles$
|
|
15190
|
+
const wrapperClass = cx("adyen-kyc-loading-input__form", styles$6["adyen-kyc-loading-input__form"], {
|
|
15191
|
+
[styles$6[`adyen-kyc-loading-input__form--loading-opacity${opacity}`]]: status === "loading"
|
|
15121
15192
|
});
|
|
15122
15193
|
const loaderWrapperClass = cx({
|
|
15123
|
-
[styles$
|
|
15124
|
-
[styles$
|
|
15194
|
+
[styles$6["adyen-kyc-loading-input__loader"]]: true,
|
|
15195
|
+
[styles$6["adyen-kyc-loading-input__loader--active"]]: status === "loading" && showSpinner
|
|
15125
15196
|
});
|
|
15126
15197
|
const overlayClass = cx("adyen-kyc-loading-input", className);
|
|
15127
15198
|
return jsxs("div", {
|
|
@@ -16636,11 +16707,19 @@ const handleKeys = (keys, callback, propagationMode = "stopIfMatches") => (event
|
|
|
16636
16707
|
callback();
|
|
16637
16708
|
}
|
|
16638
16709
|
};
|
|
16639
|
-
const
|
|
16710
|
+
const adyenKycMultiSelectList = "adyen-kyc-multi-select-list";
|
|
16711
|
+
const adyenKycMultiSelectListItem = "adyen-kyc-multi-select-list-item";
|
|
16712
|
+
const adyenKycMultiSelectListItemWithDescription = "adyen-kyc-multi-select-list-item--with-description";
|
|
16713
|
+
const adyenKycCheckboxLabel = "adyen-kyc-checkbox__label";
|
|
16714
|
+
const styles$5 = {
|
|
16640
16715
|
"adyen-kyc-multi-select-list": "adyen-kyc-multi-select-list",
|
|
16716
|
+
adyenKycMultiSelectList,
|
|
16641
16717
|
"adyen-kyc-multi-select-list-item": "adyen-kyc-multi-select-list-item",
|
|
16718
|
+
adyenKycMultiSelectListItem,
|
|
16642
16719
|
"adyen-kyc-multi-select-list-item--with-description": "adyen-kyc-multi-select-list-item--with-description",
|
|
16643
|
-
|
|
16720
|
+
adyenKycMultiSelectListItemWithDescription,
|
|
16721
|
+
"adyen-kyc-checkbox__label": "adyen-kyc-checkbox__label",
|
|
16722
|
+
adyenKycCheckboxLabel
|
|
16644
16723
|
};
|
|
16645
16724
|
const MultiSelectList = ({
|
|
16646
16725
|
options,
|
|
@@ -16648,7 +16727,7 @@ const MultiSelectList = ({
|
|
|
16648
16727
|
onSelect,
|
|
16649
16728
|
mapToSelectItem
|
|
16650
16729
|
}) => jsx("ul", {
|
|
16651
|
-
className: styles$
|
|
16730
|
+
className: styles$5["adyen-kyc-multi-select-list"],
|
|
16652
16731
|
children: options.map((option) => {
|
|
16653
16732
|
const item = mapToSelectItem(option);
|
|
16654
16733
|
const isSelected = selected.includes(option);
|
|
@@ -16662,8 +16741,8 @@ const MultiSelectList = ({
|
|
|
16662
16741
|
onKeyDown: handleKeys(["Enter", " "], handleSelect),
|
|
16663
16742
|
onSelect: handleSelect,
|
|
16664
16743
|
isMulti: true,
|
|
16665
|
-
className: cx([styles$
|
|
16666
|
-
[styles$
|
|
16744
|
+
className: cx([styles$5["adyen-kyc-multi-select-list-item"], {
|
|
16745
|
+
[styles$5["adyen-kyc-multi-select-list-item--with-description"]]: !!item.description
|
|
16667
16746
|
}])
|
|
16668
16747
|
}, item.id);
|
|
16669
16748
|
})
|
|
@@ -16684,7 +16763,7 @@ const DecisionMakerRoleComponent = (props) => {
|
|
|
16684
16763
|
fieldValidationErrors,
|
|
16685
16764
|
requiredFields,
|
|
16686
16765
|
allowedRoles,
|
|
16687
|
-
trustedRoles
|
|
16766
|
+
trustedRoles = []
|
|
16688
16767
|
} = props;
|
|
16689
16768
|
const {
|
|
16690
16769
|
i18n
|
|
@@ -16742,7 +16821,7 @@ const DecisionMakerRoleComponent = (props) => {
|
|
|
16742
16821
|
onSelect: changeRoles,
|
|
16743
16822
|
mapToSelectItem: (role) => ({
|
|
16744
16823
|
...makeSelectItemForRole(role, i18n),
|
|
16745
|
-
disabled: allowedRoles
|
|
16824
|
+
disabled: allowedRoles && !allowedRoles.includes(role) || trustedRoles.includes(role)
|
|
16746
16825
|
})
|
|
16747
16826
|
})
|
|
16748
16827
|
})]
|
|
@@ -19639,7 +19718,8 @@ function InstantBankVerification({
|
|
|
19639
19718
|
case "GENERIC_ERROR":
|
|
19640
19719
|
errorTitle = i18n.get("ranIntoTechnicalError");
|
|
19641
19720
|
break;
|
|
19642
|
-
case "UNKNOWN_ERROR":
|
|
19721
|
+
case "UNKNOWN_ERROR":
|
|
19722
|
+
default: {
|
|
19643
19723
|
errorTitle = i18n.get("couldNotCompleteAccountCheck");
|
|
19644
19724
|
break;
|
|
19645
19725
|
}
|
|
@@ -19810,6 +19890,7 @@ const payoutCurrencySupport = {
|
|
|
19810
19890
|
iban: [Currencies.CAD, Currencies.USD]
|
|
19811
19891
|
}
|
|
19812
19892
|
};
|
|
19893
|
+
const shouldShowCheckGuidance = (country) => country === "US";
|
|
19813
19894
|
const shouldShowPayoutAccountFormatSelector = (country) => countriesWithLocalFormat.has(country);
|
|
19814
19895
|
const shouldShowPayoutAlert = (country) => shouldShowPayoutAccountFormatSelector(country) || countriesWithMultipleCurrencies.has(country);
|
|
19815
19896
|
const getSupportedCurrencyGuidance = (i18n, country, requiredFields) => {
|
|
@@ -19961,7 +20042,9 @@ function BankAccountNumber(props) {
|
|
|
19961
20042
|
} = useI18nContext();
|
|
19962
20043
|
const {
|
|
19963
20044
|
country,
|
|
19964
|
-
fieldConfig = defaultFieldConfig$4
|
|
20045
|
+
fieldConfig = defaultFieldConfig$4,
|
|
20046
|
+
onFocus,
|
|
20047
|
+
onBlur
|
|
19965
20048
|
} = props;
|
|
19966
20049
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$4);
|
|
19967
20050
|
const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata, props);
|
|
@@ -19979,6 +20062,10 @@ function BankAccountNumber(props) {
|
|
|
19979
20062
|
fieldProblems: mergedProps == null ? void 0 : mergedProps.fieldValidationErrors,
|
|
19980
20063
|
obscuredFields: mergedProps.obscuredFields
|
|
19981
20064
|
});
|
|
20065
|
+
const handleBlur = () => {
|
|
20066
|
+
onBlur == null ? void 0 : onBlur();
|
|
20067
|
+
handleChangeFor("bankAccountNumber", "blur");
|
|
20068
|
+
};
|
|
19982
20069
|
const {
|
|
19983
20070
|
updateStateSlice
|
|
19984
20071
|
} = useGlobalDataSlice("payoutAccountDetails", "bankAccountNumber");
|
|
@@ -20005,8 +20092,9 @@ function BankAccountNumber(props) {
|
|
|
20005
20092
|
field: ["bankAccountNumber"],
|
|
20006
20093
|
input: ["bankAccountNumber"]
|
|
20007
20094
|
},
|
|
20008
|
-
onBlur:
|
|
20095
|
+
onBlur: handleBlur,
|
|
20009
20096
|
onInput: handleChangeFor("bankAccountNumber", "input"),
|
|
20097
|
+
onFocus,
|
|
20010
20098
|
readonly: formUtils.isReadOnly("bankAccountNumber"),
|
|
20011
20099
|
value: data.bankAccountNumber ?? "",
|
|
20012
20100
|
acceptObscuredValue: formUtils.isObscured("bankAccountNumber")
|
|
@@ -20263,7 +20351,7 @@ const defaultFieldConfig$2 = {
|
|
|
20263
20351
|
}
|
|
20264
20352
|
},
|
|
20265
20353
|
[CountryCodes.UnitedStates]: {
|
|
20266
|
-
label: "
|
|
20354
|
+
label: "routingNumber",
|
|
20267
20355
|
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
20268
20356
|
mask: {
|
|
20269
20357
|
mask: makeMask(...numericInputs(9))
|
|
@@ -20306,7 +20394,9 @@ function BranchCode(props) {
|
|
|
20306
20394
|
} = useI18nContext();
|
|
20307
20395
|
const {
|
|
20308
20396
|
country,
|
|
20309
|
-
fieldConfig = defaultFieldConfig$2
|
|
20397
|
+
fieldConfig = defaultFieldConfig$2,
|
|
20398
|
+
onFocus,
|
|
20399
|
+
onBlur
|
|
20310
20400
|
} = props;
|
|
20311
20401
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$2);
|
|
20312
20402
|
const mergedProps = mergeFieldMetadataIntoProps("branchCode", metadata, props);
|
|
@@ -20326,6 +20416,10 @@ function BranchCode(props) {
|
|
|
20326
20416
|
const {
|
|
20327
20417
|
updateStateSlice
|
|
20328
20418
|
} = useGlobalDataSlice("payoutAccountDetails", "branchCode");
|
|
20419
|
+
const handleBlur = () => {
|
|
20420
|
+
onBlur == null ? void 0 : onBlur();
|
|
20421
|
+
handleChangeFor("branchCode", "blur");
|
|
20422
|
+
};
|
|
20329
20423
|
useEffect(() => {
|
|
20330
20424
|
updateStateSlice({
|
|
20331
20425
|
data,
|
|
@@ -20349,7 +20443,8 @@ function BranchCode(props) {
|
|
|
20349
20443
|
value: data.branchCode ?? "",
|
|
20350
20444
|
readonly: formUtils.isReadOnly("branchCode"),
|
|
20351
20445
|
onInput: handleChangeFor("branchCode", "input"),
|
|
20352
|
-
onBlur:
|
|
20446
|
+
onBlur: handleBlur,
|
|
20447
|
+
onFocus,
|
|
20353
20448
|
"aria-required": true,
|
|
20354
20449
|
"aria-label": formUtils.getLabel("branchCode"),
|
|
20355
20450
|
"aria-invalid": !valid.branchCode
|
|
@@ -20687,6 +20782,48 @@ function SwiftCode(props) {
|
|
|
20687
20782
|
"aria-invalid": !valid.swiftCode
|
|
20688
20783
|
});
|
|
20689
20784
|
}
|
|
20785
|
+
const adyenKycCheckGuidance = "adyen-kyc-check-guidance";
|
|
20786
|
+
const adyenKycCheckGuidanceImage = "adyen-kyc-check-guidance__image";
|
|
20787
|
+
const adyenKycCheckGuidanceImageAnnotated = "adyen-kyc-check-guidance__image--annotated";
|
|
20788
|
+
const adyenKycCheckGuidanceImageInactive = "adyen-kyc-check-guidance__image--inactive";
|
|
20789
|
+
const adyenKycUsCheckAccountNumber = "adyen-kyc-us-check-account-number";
|
|
20790
|
+
const adyenKycUsCheckRoutingNumber = "adyen-kyc-us-check-routing-number";
|
|
20791
|
+
const styles$4 = {
|
|
20792
|
+
"adyen-kyc-check-guidance": "adyen-kyc-check-guidance",
|
|
20793
|
+
adyenKycCheckGuidance,
|
|
20794
|
+
"adyen-kyc-check-guidance__image": "adyen-kyc-check-guidance__image",
|
|
20795
|
+
adyenKycCheckGuidanceImage,
|
|
20796
|
+
"adyen-kyc-check-guidance__image--annotated": "adyen-kyc-check-guidance__image--annotated",
|
|
20797
|
+
adyenKycCheckGuidanceImageAnnotated,
|
|
20798
|
+
"adyen-kyc-check-guidance__image--inactive": "adyen-kyc-check-guidance__image--inactive",
|
|
20799
|
+
adyenKycCheckGuidanceImageInactive,
|
|
20800
|
+
"adyen-kyc-us-check-account-number": "adyen-kyc-us-check-account-number",
|
|
20801
|
+
adyenKycUsCheckAccountNumber,
|
|
20802
|
+
"adyen-kyc-us-check-routing-number": "adyen-kyc-us-check-routing-number",
|
|
20803
|
+
adyenKycUsCheckRoutingNumber
|
|
20804
|
+
};
|
|
20805
|
+
const CheckGuidance = ({
|
|
20806
|
+
annotated
|
|
20807
|
+
}) => jsxs("div", {
|
|
20808
|
+
className: styles$4["adyen-kyc-check-guidance"],
|
|
20809
|
+
children: [jsx(Svg, {
|
|
20810
|
+
type: "image",
|
|
20811
|
+
name: "us-check-account-number",
|
|
20812
|
+
className: cx(styles$4["adyen-kyc-check-guidance__image"], styles$4["adyen-kyc-check-guidance__image--annotated"], {
|
|
20813
|
+
[styles$4["adyen-kyc-check-guidance__image--inactive"]]: annotated !== "account"
|
|
20814
|
+
})
|
|
20815
|
+
}), jsx(Svg, {
|
|
20816
|
+
type: "image",
|
|
20817
|
+
name: "us-check-routing-number",
|
|
20818
|
+
className: cx(styles$4["adyen-kyc-check-guidance__image"], styles$4["adyen-kyc-check-guidance__image--annotated"], {
|
|
20819
|
+
[styles$4["adyen-kyc-check-guidance__image--inactive"]]: annotated !== "routing"
|
|
20820
|
+
})
|
|
20821
|
+
}), jsx(Svg, {
|
|
20822
|
+
name: "us-check",
|
|
20823
|
+
type: "image",
|
|
20824
|
+
className: styles$4["adyen-kyc-check-guidance__image"]
|
|
20825
|
+
})]
|
|
20826
|
+
});
|
|
20690
20827
|
const payoutAccountFields = ["accountHolder", ...ibanFields, ...branchCodeFields, ...swiftCodeFields, ...currencyFields, ...bankAccountNumberFields, ...bankNameFields, ...bankCodeFields];
|
|
20691
20828
|
function PayoutAccountComponent(props) {
|
|
20692
20829
|
const {
|
|
@@ -20697,11 +20834,13 @@ function PayoutAccountComponent(props) {
|
|
|
20697
20834
|
const {
|
|
20698
20835
|
i18n
|
|
20699
20836
|
} = useI18nContext();
|
|
20837
|
+
const [checkAnnotation, setCheckAnnotation] = useState();
|
|
20700
20838
|
const {
|
|
20701
20839
|
isSettingEnabled
|
|
20702
20840
|
} = useSettingsContext();
|
|
20703
20841
|
const bankAccountFormatSelectionAllowed = isSettingEnabled(SettingNames.AllowBankAccountFormatSelection);
|
|
20704
20842
|
const {
|
|
20843
|
+
heading,
|
|
20705
20844
|
country,
|
|
20706
20845
|
id,
|
|
20707
20846
|
legalEntityResponse,
|
|
@@ -20709,6 +20848,7 @@ function PayoutAccountComponent(props) {
|
|
|
20709
20848
|
arePayoutAccountDetailsInvalid,
|
|
20710
20849
|
invalidFieldNames
|
|
20711
20850
|
} = props;
|
|
20851
|
+
const showCheckGuidance = shouldShowCheckGuidance(country);
|
|
20712
20852
|
const {
|
|
20713
20853
|
data,
|
|
20714
20854
|
valid,
|
|
@@ -20751,19 +20891,15 @@ function PayoutAccountComponent(props) {
|
|
|
20751
20891
|
className: "adyen-kyc-individual__payout-account",
|
|
20752
20892
|
"aria-describedby": "ariaErrorField",
|
|
20753
20893
|
children: [jsx(FormHeader, {
|
|
20754
|
-
heading
|
|
20894
|
+
heading
|
|
20755
20895
|
}), jsx(ErrorPanel, {
|
|
20756
20896
|
verificationErrors: props == null ? void 0 : props.formVerificationErrors,
|
|
20757
20897
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
20758
20898
|
formUtils,
|
|
20759
20899
|
id: "ariaErrorField"
|
|
20760
|
-
}), jsx(
|
|
20761
|
-
|
|
20762
|
-
|
|
20763
|
-
contentId: "reasonForFillingPayoutDetails",
|
|
20764
|
-
title: i18n.get("whyDoINeedToFillInThisInformation"),
|
|
20765
|
-
content: i18n.get("reasonForFillingPayoutDetails")
|
|
20766
|
-
}), formUtils.isRequiredField("accountHolder") && jsx(Field, {
|
|
20900
|
+
}), showCheckGuidance ? jsx(CheckGuidance, {
|
|
20901
|
+
annotated: checkAnnotation
|
|
20902
|
+
}) : void 0, formUtils.isRequiredField("accountHolder") && jsx(Field, {
|
|
20767
20903
|
name: "accountHolder",
|
|
20768
20904
|
label: formUtils.getLabel("accountHolder"),
|
|
20769
20905
|
helper: i18n.get(accountHolderDescriptionKey),
|
|
@@ -20787,7 +20923,9 @@ function PayoutAccountComponent(props) {
|
|
|
20787
20923
|
}), formUtils.isRequiredField("bankAccountNumber") && jsx(BankAccountNumber, {
|
|
20788
20924
|
...bankAccountNumberProps,
|
|
20789
20925
|
country,
|
|
20790
|
-
dataStoreId: id
|
|
20926
|
+
dataStoreId: id,
|
|
20927
|
+
onFocus: showCheckGuidance ? () => setCheckAnnotation("account") : void 0,
|
|
20928
|
+
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
20791
20929
|
}), formUtils.isRequiredField("iban") && jsx(Iban, {
|
|
20792
20930
|
...ibanProps,
|
|
20793
20931
|
dataStoreId: id,
|
|
@@ -20805,12 +20943,18 @@ function PayoutAccountComponent(props) {
|
|
|
20805
20943
|
}), formUtils.isRequiredField("branchCode") && jsx(BranchCode, {
|
|
20806
20944
|
...branchCodeProps,
|
|
20807
20945
|
country,
|
|
20808
|
-
dataStoreId: id
|
|
20946
|
+
dataStoreId: id,
|
|
20947
|
+
onFocus: showCheckGuidance ? () => setCheckAnnotation("routing") : void 0,
|
|
20948
|
+
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
20809
20949
|
}), formUtils.isRequiredField("bankCity") && jsx(BankCity, {
|
|
20810
20950
|
...bankCityProps,
|
|
20811
20951
|
dataStoreId: id
|
|
20812
20952
|
}), shouldShowPayoutAlert(country) && jsx(Alert, {
|
|
20813
20953
|
title: getSupportedCurrencyGuidance(i18n, country, requiredFields)
|
|
20954
|
+
}), jsx(Typography, {
|
|
20955
|
+
variant: "caption",
|
|
20956
|
+
color: "tertiary",
|
|
20957
|
+
children: i18n.get("reasonForFillingPayoutDetails")
|
|
20814
20958
|
}), arePayoutAccountDetailsInvalid && jsx(Alert, {
|
|
20815
20959
|
className: "adyen-kyc-u-margin-top-16",
|
|
20816
20960
|
variant: "error",
|
|
@@ -24252,12 +24396,22 @@ const dbaNameFieldMetadata = {
|
|
|
24252
24396
|
label: "dbaName",
|
|
24253
24397
|
validators: [validateNotEmptyOnBlur]
|
|
24254
24398
|
};
|
|
24255
|
-
const
|
|
24399
|
+
const adyenKycStructuredList = "adyen-kyc-structured-list";
|
|
24400
|
+
const adyenKycStructuredListListItem = "adyen-kyc-structured-list__list-item";
|
|
24401
|
+
const adyenLayoutMd = "adyen-layout-md";
|
|
24402
|
+
const adyenKycStructuredListLabel = "adyen-kyc-structured-list__label";
|
|
24403
|
+
const adyenKycStructuredListValue = "adyen-kyc-structured-list__value";
|
|
24404
|
+
const styles$3 = {
|
|
24256
24405
|
"adyen-kyc-structured-list": "adyen-kyc-structured-list",
|
|
24406
|
+
adyenKycStructuredList,
|
|
24257
24407
|
"adyen-kyc-structured-list__list-item": "adyen-kyc-structured-list__list-item",
|
|
24408
|
+
adyenKycStructuredListListItem,
|
|
24258
24409
|
"adyen-layout-md": "adyen-layout-md",
|
|
24410
|
+
adyenLayoutMd,
|
|
24259
24411
|
"adyen-kyc-structured-list__label": "adyen-kyc-structured-list__label",
|
|
24260
|
-
|
|
24412
|
+
adyenKycStructuredListLabel,
|
|
24413
|
+
"adyen-kyc-structured-list__value": "adyen-kyc-structured-list__value",
|
|
24414
|
+
adyenKycStructuredListValue
|
|
24261
24415
|
};
|
|
24262
24416
|
const StructuredList = ({
|
|
24263
24417
|
items
|
|
@@ -24266,14 +24420,14 @@ const StructuredList = ({
|
|
|
24266
24420
|
i18n
|
|
24267
24421
|
} = useI18nContext();
|
|
24268
24422
|
return jsx("dl", {
|
|
24269
|
-
className: styles$
|
|
24423
|
+
className: styles$3["adyen-kyc-structured-list"],
|
|
24270
24424
|
children: items.map((item) => jsxs("div", {
|
|
24271
|
-
className: styles$
|
|
24425
|
+
className: styles$3["adyen-kyc-structured-list__list-item"],
|
|
24272
24426
|
children: [jsx("dt", {
|
|
24273
|
-
className: styles$
|
|
24427
|
+
className: styles$3["adyen-kyc-structured-list__label"],
|
|
24274
24428
|
children: i18n.get(item.labelKey)
|
|
24275
24429
|
}), jsx("dd", {
|
|
24276
|
-
className: styles$
|
|
24430
|
+
className: styles$3["adyen-kyc-structured-list__value"],
|
|
24277
24431
|
children: item.value
|
|
24278
24432
|
})]
|
|
24279
24433
|
}, item.labelKey))
|
|
@@ -24722,8 +24876,8 @@ function AdditionalInformationComponent({
|
|
|
24722
24876
|
variant: "title",
|
|
24723
24877
|
children: i18n.get("registeredBusinessAddress")
|
|
24724
24878
|
}), jsx(Typography, {
|
|
24725
|
-
el: "
|
|
24726
|
-
variant: "
|
|
24879
|
+
el: "p",
|
|
24880
|
+
variant: "body",
|
|
24727
24881
|
children: i18n.get("registeredBusinessAddressDescription")
|
|
24728
24882
|
})]
|
|
24729
24883
|
}), jsx(Address, {
|
|
@@ -24752,8 +24906,8 @@ function AdditionalInformationComponent({
|
|
|
24752
24906
|
variant: "title",
|
|
24753
24907
|
children: i18n.get("principalPlaceOfBusiness")
|
|
24754
24908
|
}), jsx(Typography, {
|
|
24755
|
-
el: "
|
|
24756
|
-
variant: "
|
|
24909
|
+
el: "p",
|
|
24910
|
+
variant: "body",
|
|
24757
24911
|
children: i18n.get("principalPlaceOfBusinessDescription")
|
|
24758
24912
|
})]
|
|
24759
24913
|
}), jsx(Field, {
|
|
@@ -24933,8 +25087,8 @@ function BusinessInformationCard({
|
|
|
24933
25087
|
result,
|
|
24934
25088
|
selectedBusinessId,
|
|
24935
25089
|
currentBusinessSelection,
|
|
24936
|
-
|
|
24937
|
-
|
|
25090
|
+
fetchStatus,
|
|
25091
|
+
verifyStatus,
|
|
24938
25092
|
invalidTin,
|
|
24939
25093
|
resetTinVerification,
|
|
24940
25094
|
setIsBusinessSelection,
|
|
@@ -24944,9 +25098,9 @@ function BusinessInformationCard({
|
|
|
24944
25098
|
const {
|
|
24945
25099
|
i18n
|
|
24946
25100
|
} = useI18nContext();
|
|
24947
|
-
const showSelectButton =
|
|
25101
|
+
const showSelectButton = fetchStatus !== "loading" && fetchStatus !== "error" && currentBusinessSelection;
|
|
24948
25102
|
const selectBusiness = (searchResult) => {
|
|
24949
|
-
if (
|
|
25103
|
+
if (fetchStatus === "error" && selectedBusinessId === searchResult.id) return;
|
|
24950
25104
|
return handleSelectBusiness(searchResult);
|
|
24951
25105
|
};
|
|
24952
25106
|
const handleGoBack = () => {
|
|
@@ -24959,7 +25113,7 @@ function BusinessInformationCard({
|
|
|
24959
25113
|
title: result.name,
|
|
24960
25114
|
subTitle: result.registrationNumber,
|
|
24961
25115
|
stateful: true,
|
|
24962
|
-
fetching:
|
|
25116
|
+
fetching: fetchStatus === "loading" && selectedBusinessId === result.id,
|
|
24963
25117
|
active: selectedBusinessId === result.id,
|
|
24964
25118
|
headerButton: selectedBusinessId === result.id && showSelectButton ? jsx(Button, {
|
|
24965
25119
|
label: i18n.get("thisIsMyBusiness"),
|
|
@@ -24981,7 +25135,11 @@ function BusinessInformationCard({
|
|
|
24981
25135
|
showAsLink: true
|
|
24982
25136
|
}),
|
|
24983
25137
|
testId: "invalidTin"
|
|
24984
|
-
}),
|
|
25138
|
+
}), verifyStatus === "error" && jsx(Alert, {
|
|
25139
|
+
variant: "error",
|
|
25140
|
+
title: i18n.get("businessSelection__tinVerificationFailure"),
|
|
25141
|
+
testId: "tinVerificationFailure"
|
|
25142
|
+
}), fetchStatus === "error" && jsx(Alert, {
|
|
24985
25143
|
variant: "info",
|
|
24986
25144
|
type: "callToAction",
|
|
24987
25145
|
title: i18n.get("businessSelection__failedToLoad"),
|
|
@@ -24992,8 +25150,8 @@ function BusinessInformationCard({
|
|
|
24992
25150
|
showAsLink: true
|
|
24993
25151
|
}),
|
|
24994
25152
|
testId: "failedToLoad"
|
|
24995
|
-
}),
|
|
24996
|
-
fetching,
|
|
25153
|
+
}), fetchStatus !== "error" && jsx(BusinessInformation, {
|
|
25154
|
+
fetching: fetchStatus === "loading",
|
|
24997
25155
|
selectedBusiness: currentBusinessSelection
|
|
24998
25156
|
})]
|
|
24999
25157
|
})
|
|
@@ -25002,10 +25160,10 @@ function BusinessInformationCard({
|
|
|
25002
25160
|
const logger$r = createLogger("BusinessSelection");
|
|
25003
25161
|
function BusinessSelectionComponent({
|
|
25004
25162
|
showCompanyStructure,
|
|
25005
|
-
|
|
25006
|
-
|
|
25007
|
-
|
|
25008
|
-
|
|
25163
|
+
searching,
|
|
25164
|
+
fetching,
|
|
25165
|
+
verifying,
|
|
25166
|
+
resettingTrustedData,
|
|
25009
25167
|
searchResults,
|
|
25010
25168
|
invalidTin,
|
|
25011
25169
|
fetchBusinessData,
|
|
@@ -25033,19 +25191,19 @@ function BusinessSelectionComponent({
|
|
|
25033
25191
|
}, [setShowCompanyStructure, verifyBusinessData]);
|
|
25034
25192
|
const handleSelectBusiness = useCallback(async (result) => {
|
|
25035
25193
|
try {
|
|
25036
|
-
if (
|
|
25194
|
+
if (fetching === "loading") return;
|
|
25037
25195
|
if (!selectedBusinessId || selectedBusinessId !== result.id) {
|
|
25038
25196
|
setSelectedBusinessId(result.id);
|
|
25039
25197
|
const businessData = await fetchBusinessData(result);
|
|
25040
25198
|
setCurrentBusinessSelection(businessData);
|
|
25041
|
-
} else if (
|
|
25199
|
+
} else if (fetching === "error") {
|
|
25042
25200
|
const businessData = await fetchBusinessData(result);
|
|
25043
25201
|
setCurrentBusinessSelection(businessData);
|
|
25044
25202
|
}
|
|
25045
25203
|
} catch (e) {
|
|
25046
25204
|
logger$r.error(e);
|
|
25047
25205
|
}
|
|
25048
|
-
}, [fetchBusinessData,
|
|
25206
|
+
}, [fetchBusinessData, fetching, selectedBusinessId]);
|
|
25049
25207
|
const handleConfirmSelection = useCallback(async (data) => {
|
|
25050
25208
|
if (!currentTin) return;
|
|
25051
25209
|
try {
|
|
@@ -25057,7 +25215,7 @@ function BusinessSelectionComponent({
|
|
|
25057
25215
|
logger$r.error(e);
|
|
25058
25216
|
}
|
|
25059
25217
|
}, [currentTin, handleNextClick, handleBusinessVerification]);
|
|
25060
|
-
const showLoader =
|
|
25218
|
+
const showLoader = searching === "loading" || verifying === "loading" || resettingTrustedData === "loading" || fetching === "loading" && (searchResults == null ? void 0 : searchResults.length) === 1;
|
|
25061
25219
|
const businessSelectionClasses = cx("adyen-kyc-business-selection", {
|
|
25062
25220
|
"adyen-kyc-business-selection--loading": showLoader
|
|
25063
25221
|
});
|
|
@@ -25082,8 +25240,8 @@ function BusinessSelectionComponent({
|
|
|
25082
25240
|
result,
|
|
25083
25241
|
selectedBusinessId,
|
|
25084
25242
|
currentBusinessSelection,
|
|
25085
|
-
|
|
25086
|
-
|
|
25243
|
+
fetchStatus: fetching,
|
|
25244
|
+
verifyStatus: verifying,
|
|
25087
25245
|
invalidTin,
|
|
25088
25246
|
resetTinVerification,
|
|
25089
25247
|
handleSelectBusiness,
|
|
@@ -25205,10 +25363,10 @@ function BasicInformationComponent({
|
|
|
25205
25363
|
showBusinessSelection,
|
|
25206
25364
|
showCompanyStructure,
|
|
25207
25365
|
isActiveForm,
|
|
25208
|
-
|
|
25209
|
-
|
|
25210
|
-
|
|
25211
|
-
|
|
25366
|
+
searching,
|
|
25367
|
+
fetching,
|
|
25368
|
+
verifying,
|
|
25369
|
+
resettingTrustedData,
|
|
25212
25370
|
searchResults,
|
|
25213
25371
|
invalidTin,
|
|
25214
25372
|
verifiedBusiness,
|
|
@@ -25333,10 +25491,10 @@ function BasicInformationComponent({
|
|
|
25333
25491
|
if (showBusinessSelection) {
|
|
25334
25492
|
return jsx(BusinessSelectionComponent, {
|
|
25335
25493
|
showCompanyStructure,
|
|
25336
|
-
|
|
25337
|
-
|
|
25338
|
-
|
|
25339
|
-
|
|
25494
|
+
searching,
|
|
25495
|
+
fetching,
|
|
25496
|
+
verifying,
|
|
25497
|
+
resettingTrustedData,
|
|
25340
25498
|
searchResults,
|
|
25341
25499
|
invalidTin,
|
|
25342
25500
|
fetchBusinessData,
|
|
@@ -25923,10 +26081,10 @@ function BusinessDetailsComponent(props) {
|
|
|
25923
26081
|
showBusinessSelection,
|
|
25924
26082
|
setShowBusinessSelection,
|
|
25925
26083
|
setShowCompanyStructure,
|
|
25926
|
-
|
|
25927
|
-
|
|
25928
|
-
|
|
25929
|
-
|
|
26084
|
+
searching,
|
|
26085
|
+
fetching,
|
|
26086
|
+
verifying,
|
|
26087
|
+
resettingTrustedData,
|
|
25930
26088
|
searchResults,
|
|
25931
26089
|
invalidTin,
|
|
25932
26090
|
verifiedBusiness,
|
|
@@ -25967,10 +26125,10 @@ function BusinessDetailsComponent(props) {
|
|
|
25967
26125
|
showBusinessSelection,
|
|
25968
26126
|
showCompanyStructure,
|
|
25969
26127
|
isActiveForm: (activeForm == null ? void 0 : activeForm.formId) === forms2.basicInformation.formId,
|
|
25970
|
-
|
|
25971
|
-
|
|
25972
|
-
|
|
25973
|
-
|
|
26128
|
+
searching,
|
|
26129
|
+
fetching,
|
|
26130
|
+
verifying,
|
|
26131
|
+
resettingTrustedData,
|
|
25974
26132
|
fetchBusinessData,
|
|
25975
26133
|
verifyBusinessData,
|
|
25976
26134
|
proceedToManualDataEntry,
|
|
@@ -26266,14 +26424,14 @@ const Modal = ({
|
|
|
26266
26424
|
tertiary: true,
|
|
26267
26425
|
"aria-label": "back",
|
|
26268
26426
|
icon: "arrow-left",
|
|
26269
|
-
className: "adyen-kyc-modal-button
|
|
26427
|
+
className: "adyen-kyc-modal-button",
|
|
26270
26428
|
onClick: onBack,
|
|
26271
26429
|
shaded: true
|
|
26272
26430
|
}) : jsx("div", {}), onClose ? jsx(Button, {
|
|
26273
26431
|
tertiary: true,
|
|
26274
26432
|
"aria-label": "close",
|
|
26275
26433
|
icon: "cross",
|
|
26276
|
-
className: "adyen-kyc-modal-button
|
|
26434
|
+
className: "adyen-kyc-modal-button",
|
|
26277
26435
|
onClick: onClose,
|
|
26278
26436
|
shaded: true
|
|
26279
26437
|
}) : jsx("div", {})]
|
|
@@ -26601,16 +26759,11 @@ const DropinLayout = ({
|
|
|
26601
26759
|
if (modalOpen) {
|
|
26602
26760
|
return jsx(Modal, {
|
|
26603
26761
|
footer,
|
|
26604
|
-
onClose: handleClose,
|
|
26762
|
+
onClose: !onBack ? handleClose : void 0,
|
|
26605
26763
|
onBack,
|
|
26606
26764
|
children: jsx("div", {
|
|
26607
|
-
className: "adyen-kyc-
|
|
26608
|
-
children:
|
|
26609
|
-
className: "adyen-kyc-dropin__content",
|
|
26610
|
-
children: jsx("div", {
|
|
26611
|
-
children: content
|
|
26612
|
-
})
|
|
26613
|
-
})
|
|
26765
|
+
className: "adyen-kyc-modal-content",
|
|
26766
|
+
children: content
|
|
26614
26767
|
})
|
|
26615
26768
|
});
|
|
26616
26769
|
}
|
|
@@ -27142,9 +27295,10 @@ async function submit({
|
|
|
27142
27295
|
showToast,
|
|
27143
27296
|
clearToasts,
|
|
27144
27297
|
handleUpdateLegalEntity,
|
|
27145
|
-
onExternalSubmit
|
|
27298
|
+
onExternalSubmit,
|
|
27299
|
+
accountHolder
|
|
27146
27300
|
}) {
|
|
27147
|
-
var _a, _b, _c, _d;
|
|
27301
|
+
var _a, _b, _c, _d, _e;
|
|
27148
27302
|
const logger2 = createLogger("submitBusinessDetails");
|
|
27149
27303
|
setLoadingStatus("loading");
|
|
27150
27304
|
const trackingPayload = {
|
|
@@ -27157,7 +27311,7 @@ async function submit({
|
|
|
27157
27311
|
const filteredData = removeOldDataBySchema(data, savedLegalEntityData);
|
|
27158
27312
|
const legalEntity = {
|
|
27159
27313
|
...mapBusinessDetailsSchemaToLegalEntity(filteredData),
|
|
27160
|
-
entityAssociations: filterOutUnwantedAssociationsIfRootLE(TaskTypes.BUSINESS_DETAILS, legalEntityResponse,
|
|
27314
|
+
entityAssociations: filterOutUnwantedAssociationsIfRootLE(TaskTypes.BUSINESS_DETAILS, legalEntityResponse, ((_e = data.companyStructure) == null ? void 0 : _e.accountHolder) || accountHolder)
|
|
27161
27315
|
};
|
|
27162
27316
|
try {
|
|
27163
27317
|
userEvents.addEvent(BusinessDetailsEvents.TASK_SUBMIT, {
|
|
@@ -27229,7 +27383,6 @@ function BusinessDetailsDropinComponent({
|
|
|
27229
27383
|
parentLegalEntity,
|
|
27230
27384
|
trackingConfig,
|
|
27231
27385
|
capabilities,
|
|
27232
|
-
accountHolder,
|
|
27233
27386
|
taskName,
|
|
27234
27387
|
hideDropinLayout,
|
|
27235
27388
|
homeButtonLabel,
|
|
@@ -27272,6 +27425,10 @@ function BusinessDetailsDropinComponent({
|
|
|
27272
27425
|
});
|
|
27273
27426
|
}, []);
|
|
27274
27427
|
const formRef = useRef(null);
|
|
27428
|
+
const {
|
|
27429
|
+
accountHolder,
|
|
27430
|
+
setAccountHolder
|
|
27431
|
+
} = useCoreContext();
|
|
27275
27432
|
const {
|
|
27276
27433
|
showToast,
|
|
27277
27434
|
clearToasts
|
|
@@ -27290,7 +27447,7 @@ function BusinessDetailsDropinComponent({
|
|
|
27290
27447
|
var _a2;
|
|
27291
27448
|
return ((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.country) ?? country;
|
|
27292
27449
|
}, [(_a = currentState.data.basicInformation) == null ? void 0 : _a.country, country]);
|
|
27293
|
-
const [initialData, setInitialData] = useState(mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, Boolean(isTargetLegalEntityType), isNewEntryFlowEnabled ? accountHolder : void 0));
|
|
27450
|
+
const [initialData, setInitialData] = useState(mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, Boolean(isTargetLegalEntityType), isNewEntryFlowEnabled && accountHolder ? accountHolder : void 0));
|
|
27294
27451
|
const [trustedFields, setTrustedFields] = useState(legalEntityResponse.trustedFields);
|
|
27295
27452
|
const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
|
|
27296
27453
|
useEffect(() => {
|
|
@@ -27348,22 +27505,26 @@ function BusinessDetailsDropinComponent({
|
|
|
27348
27505
|
data: formatDataForSummary$1(currentState.data, forms2, derivedProps == null ? void 0 : derivedProps.labels, i18n),
|
|
27349
27506
|
omittedKeys: ["operationalAddressIsSame"]
|
|
27350
27507
|
}), [currentState.data, derivedProps == null ? void 0 : derivedProps.labels, forms2, i18n]);
|
|
27351
|
-
const submitTask = useCallback(() =>
|
|
27352
|
-
|
|
27353
|
-
|
|
27354
|
-
|
|
27355
|
-
|
|
27356
|
-
|
|
27357
|
-
|
|
27358
|
-
|
|
27359
|
-
|
|
27360
|
-
|
|
27361
|
-
|
|
27362
|
-
|
|
27363
|
-
|
|
27364
|
-
|
|
27365
|
-
|
|
27366
|
-
|
|
27508
|
+
const submitTask = useCallback(() => {
|
|
27509
|
+
var _a2;
|
|
27510
|
+
setAccountHolder(((_a2 = currentState.data.companyStructure) == null ? void 0 : _a2.accountHolder) || accountHolder);
|
|
27511
|
+
return submit({
|
|
27512
|
+
data: currentState.data,
|
|
27513
|
+
legalEntityResponse,
|
|
27514
|
+
isTargetLegalEntityType: Boolean(isTargetLegalEntityType),
|
|
27515
|
+
baseTrackingPayload,
|
|
27516
|
+
problems: currentProblems,
|
|
27517
|
+
forms: forms2,
|
|
27518
|
+
documentUtils,
|
|
27519
|
+
i18n,
|
|
27520
|
+
setLoadingStatus,
|
|
27521
|
+
setProblems: setCurrentProblems,
|
|
27522
|
+
showToast,
|
|
27523
|
+
clearToasts,
|
|
27524
|
+
handleUpdateLegalEntity,
|
|
27525
|
+
onExternalSubmit
|
|
27526
|
+
});
|
|
27527
|
+
}, [baseTrackingPayload, clearToasts, currentState.data, documentUtils, forms2, handleUpdateLegalEntity, i18n, isTargetLegalEntityType, legalEntityResponse, onExternalSubmit, currentProblems, showToast]);
|
|
27367
27528
|
const {
|
|
27368
27529
|
handleNextClick,
|
|
27369
27530
|
handleBackClick,
|
|
@@ -27388,10 +27549,10 @@ function BusinessDetailsDropinComponent({
|
|
|
27388
27549
|
clearTrustedBusinessData,
|
|
27389
27550
|
resetBusinessData,
|
|
27390
27551
|
resetTinVerification,
|
|
27391
|
-
|
|
27392
|
-
|
|
27393
|
-
|
|
27394
|
-
|
|
27552
|
+
searching,
|
|
27553
|
+
fetching,
|
|
27554
|
+
verifying,
|
|
27555
|
+
resettingTrustedData,
|
|
27395
27556
|
currentSearchName,
|
|
27396
27557
|
searchResults,
|
|
27397
27558
|
invalidTin,
|
|
@@ -27422,10 +27583,10 @@ function BusinessDetailsDropinComponent({
|
|
|
27422
27583
|
}
|
|
27423
27584
|
}, [currentCountry, (_e = currentState.data.basicInformation) == null ? void 0 : _e.taxInformation, fetchBusinessData, handleNextClick, searchForBusiness, handleVerifyBusinessData]);
|
|
27424
27585
|
useEffect(() => {
|
|
27425
|
-
if (searchResults && !searchResults.length ||
|
|
27586
|
+
if (searchResults && !searchResults.length || searching === "error") {
|
|
27426
27587
|
setShowCompanyStructure(true);
|
|
27427
27588
|
}
|
|
27428
|
-
}, [searchResults,
|
|
27589
|
+
}, [searchResults, searching]);
|
|
27429
27590
|
useEffect(() => {
|
|
27430
27591
|
var _a2;
|
|
27431
27592
|
if (((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.businessName) !== currentSearchName) {
|
|
@@ -27438,16 +27599,16 @@ function BusinessDetailsDropinComponent({
|
|
|
27438
27599
|
const hideBack = useMemo(() => {
|
|
27439
27600
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) return hideBackButton;
|
|
27440
27601
|
if (isBusinessSelection) {
|
|
27441
|
-
return
|
|
27602
|
+
return searching === "loading" || fetching === "loading" || verifying === "loading" || resettingTrustedData === "loading" ? hideBackButton : false;
|
|
27442
27603
|
}
|
|
27443
27604
|
return hideBackButton;
|
|
27444
|
-
}, [currentCountry, hideBackButton, isBusinessSelection,
|
|
27605
|
+
}, [currentCountry, hideBackButton, isBusinessSelection, searching, fetching, verifying, resettingTrustedData]);
|
|
27445
27606
|
const hideHome = useMemo(() => {
|
|
27446
27607
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) return hideHomeButton;
|
|
27447
27608
|
if (isBusinessSelection) {
|
|
27448
|
-
return
|
|
27609
|
+
return searching === "loading" || fetching === "loading" || verifying === "loading" || resettingTrustedData === "loading" ? true : hideHomeButton;
|
|
27449
27610
|
}
|
|
27450
|
-
}, [currentCountry, hideHomeButton, isBusinessSelection,
|
|
27611
|
+
}, [currentCountry, hideHomeButton, isBusinessSelection, searching, fetching, verifying, resettingTrustedData]);
|
|
27451
27612
|
const goToForm = useCallback((index) => {
|
|
27452
27613
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
27453
27614
|
const form = forms2[index].formId;
|
|
@@ -27510,12 +27671,12 @@ function BusinessDetailsDropinComponent({
|
|
|
27510
27671
|
return showBusinessSelection ? setShowBusinessSelection(false) : void 0;
|
|
27511
27672
|
}
|
|
27512
27673
|
case "companyStructure": {
|
|
27513
|
-
if (
|
|
27674
|
+
if (searching === "error") {
|
|
27514
27675
|
setShowBusinessSelection(false);
|
|
27515
27676
|
setShowCompanyStructure(false);
|
|
27516
27677
|
return handleBackClick == null ? void 0 : handleBackClick();
|
|
27517
27678
|
}
|
|
27518
|
-
if (
|
|
27679
|
+
if (searching !== "loading" && searchResults && !searchResults.length) {
|
|
27519
27680
|
setShowBusinessSelection(false);
|
|
27520
27681
|
} else if (!verifiedBusiness) setShowCompanyStructure(false);
|
|
27521
27682
|
return handleBackClick == null ? void 0 : handleBackClick();
|
|
@@ -27529,7 +27690,7 @@ function BusinessDetailsDropinComponent({
|
|
|
27529
27690
|
default:
|
|
27530
27691
|
return handleBackClick == null ? void 0 : handleBackClick();
|
|
27531
27692
|
}
|
|
27532
|
-
}, [activeForm.formId, country, handleBackClick, handleNextClick,
|
|
27693
|
+
}, [activeForm.formId, country, handleBackClick, handleNextClick, searching, searchResults, showBusinessSelection, verifiedBusiness]);
|
|
27533
27694
|
const proceedToManualDataEntry = useCallback(async () => {
|
|
27534
27695
|
await clearTrustedBusinessData().then(() => setShowCompanyStructure(true));
|
|
27535
27696
|
}, [clearTrustedBusinessData]);
|
|
@@ -27580,10 +27741,10 @@ function BusinessDetailsDropinComponent({
|
|
|
27580
27741
|
invalidTin,
|
|
27581
27742
|
resetTinVerification,
|
|
27582
27743
|
verifiedBusiness,
|
|
27583
|
-
|
|
27584
|
-
|
|
27585
|
-
|
|
27586
|
-
|
|
27744
|
+
searching,
|
|
27745
|
+
fetching,
|
|
27746
|
+
verifying,
|
|
27747
|
+
resettingTrustedData,
|
|
27587
27748
|
searchForBusiness,
|
|
27588
27749
|
fetchBusinessData,
|
|
27589
27750
|
verifyBusinessData,
|
|
@@ -28997,7 +29158,8 @@ function useCompanySearchTaskSubmit({
|
|
|
28997
29158
|
setProblems,
|
|
28998
29159
|
setLoadingStatus,
|
|
28999
29160
|
onExternalSubmit,
|
|
29000
|
-
handleUpdateLegalEntity
|
|
29161
|
+
handleUpdateLegalEntity,
|
|
29162
|
+
accountHolder
|
|
29001
29163
|
}) {
|
|
29002
29164
|
const {
|
|
29003
29165
|
showToast,
|
|
@@ -29042,7 +29204,7 @@ function useCompanySearchTaskSubmit({
|
|
|
29042
29204
|
const submit2 = useCallback(async ({
|
|
29043
29205
|
data
|
|
29044
29206
|
}) => {
|
|
29045
|
-
var _a, _b, _c, _d;
|
|
29207
|
+
var _a, _b, _c, _d, _e;
|
|
29046
29208
|
setLoadingStatus("loading");
|
|
29047
29209
|
const trackingPayload = {
|
|
29048
29210
|
companyStructure: ((_a = data.companyStructure) == null ? void 0 : _a.entityType) ?? null,
|
|
@@ -29054,7 +29216,7 @@ function useCompanySearchTaskSubmit({
|
|
|
29054
29216
|
const filteredData = removeOldDataBySchema(data, savedLegalEntityData);
|
|
29055
29217
|
const legalEntity = {
|
|
29056
29218
|
...mapCompanySearchSchemaToLegalEntity(filteredData),
|
|
29057
|
-
entityAssociations: filterOutUnwantedAssociationsIfRootLE(task, legalEntityResponse,
|
|
29219
|
+
entityAssociations: filterOutUnwantedAssociationsIfRootLE(task, legalEntityResponse, (((_e = data.companyStructure) == null ? void 0 : _e.accountHolder) || accountHolder) ?? void 0)
|
|
29058
29220
|
};
|
|
29059
29221
|
try {
|
|
29060
29222
|
userEvents.addEvent(CompanySearchEvents.TASK_SUBMIT, {
|
|
@@ -29261,7 +29423,6 @@ function CompanySearchDropinComponent({
|
|
|
29261
29423
|
taskName,
|
|
29262
29424
|
hideDropinLayout,
|
|
29263
29425
|
homeButtonLabel,
|
|
29264
|
-
accountHolder,
|
|
29265
29426
|
onChange,
|
|
29266
29427
|
onSubmit: onExternalSubmit,
|
|
29267
29428
|
handleHomeClick,
|
|
@@ -29288,6 +29449,10 @@ function CompanySearchDropinComponent({
|
|
|
29288
29449
|
useEffect(() => {
|
|
29289
29450
|
onChange == null ? void 0 : onChange(currentState);
|
|
29290
29451
|
}, [currentState, onChange]);
|
|
29452
|
+
const {
|
|
29453
|
+
accountHolder,
|
|
29454
|
+
setAccountHolder
|
|
29455
|
+
} = useCoreContext();
|
|
29291
29456
|
const formRef = useRef(null);
|
|
29292
29457
|
const {
|
|
29293
29458
|
showToast
|
|
@@ -29303,7 +29468,7 @@ function CompanySearchDropinComponent({
|
|
|
29303
29468
|
} = useExperimentsContext();
|
|
29304
29469
|
const isNewEntryFlowEnabled = useEnableNewEntryFlow();
|
|
29305
29470
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
29306
|
-
const [initialData, setInitialData] = useState(mapLegalEntityToCompanySearchSchema(legalEntityResponse, Boolean(isTargetLegalEntityType), isNewEntryFlowEnabled ? accountHolder : void 0));
|
|
29471
|
+
const [initialData, setInitialData] = useState(mapLegalEntityToCompanySearchSchema(legalEntityResponse, Boolean(isTargetLegalEntityType), isNewEntryFlowEnabled && accountHolder ? accountHolder : void 0));
|
|
29307
29472
|
const country = useMemo(() => {
|
|
29308
29473
|
var _a2;
|
|
29309
29474
|
return ((_a2 = currentState.data.companyBasics) == null ? void 0 : _a2.country) ?? parentCountry;
|
|
@@ -29393,7 +29558,8 @@ function CompanySearchDropinComponent({
|
|
|
29393
29558
|
setProblems,
|
|
29394
29559
|
setLoadingStatus,
|
|
29395
29560
|
onExternalSubmit,
|
|
29396
|
-
handleUpdateLegalEntity
|
|
29561
|
+
handleUpdateLegalEntity,
|
|
29562
|
+
accountHolder
|
|
29397
29563
|
});
|
|
29398
29564
|
const {
|
|
29399
29565
|
handleNextClick,
|
|
@@ -29431,9 +29597,13 @@ function CompanySearchDropinComponent({
|
|
|
29431
29597
|
activeForm,
|
|
29432
29598
|
validateForm: () => setShouldValidate(true),
|
|
29433
29599
|
baseTrackingPayload,
|
|
29434
|
-
onSubmit: () =>
|
|
29435
|
-
|
|
29436
|
-
|
|
29600
|
+
onSubmit: () => {
|
|
29601
|
+
var _a2;
|
|
29602
|
+
setAccountHolder(((_a2 = currentState.data.companyStructure) == null ? void 0 : _a2.accountHolder) || accountHolder);
|
|
29603
|
+
return submit2({
|
|
29604
|
+
data: currentState.data
|
|
29605
|
+
});
|
|
29606
|
+
},
|
|
29437
29607
|
problems,
|
|
29438
29608
|
canSubmit: canSubmitForm,
|
|
29439
29609
|
summary: summaryData,
|
|
@@ -33021,7 +33191,8 @@ function IndividualDropinComponent({
|
|
|
33021
33191
|
}
|
|
33022
33192
|
});
|
|
33023
33193
|
const accountHolderToEvaluated = ((_c2 = dataSubmitted.personalDetails) == null ? void 0 : _c2.accountHolder) || accountHolder;
|
|
33024
|
-
|
|
33194
|
+
const filteredEntityAssociation = filterOutUnwantedAssociationsIfRootLE(taskType, legalEntityResponse, accountHolderToEvaluated || void 0);
|
|
33195
|
+
legalEntity.entityAssociations = filteredEntityAssociation;
|
|
33025
33196
|
const createdLegalEntity = await submitLegalEntity({
|
|
33026
33197
|
dataSubmitted,
|
|
33027
33198
|
legalEntity,
|
|
@@ -34652,6 +34823,47 @@ function RoleAndTypeDropinComponent({
|
|
|
34652
34823
|
content
|
|
34653
34824
|
});
|
|
34654
34825
|
}
|
|
34826
|
+
const adyenKycOutlinedIcon = "adyen-kyc-outlined-icon";
|
|
34827
|
+
const styles$2 = {
|
|
34828
|
+
"adyen-kyc-outlined-icon": "adyen-kyc-outlined-icon",
|
|
34829
|
+
adyenKycOutlinedIcon
|
|
34830
|
+
};
|
|
34831
|
+
const OutlinedIcon = ({
|
|
34832
|
+
name
|
|
34833
|
+
}) => jsx("div", {
|
|
34834
|
+
className: styles$2["adyen-kyc-outlined-icon"],
|
|
34835
|
+
children: jsx(Icon, {
|
|
34836
|
+
name
|
|
34837
|
+
})
|
|
34838
|
+
});
|
|
34839
|
+
const Splashscreen = ({
|
|
34840
|
+
title,
|
|
34841
|
+
subtitle,
|
|
34842
|
+
icon,
|
|
34843
|
+
buttonText,
|
|
34844
|
+
onClick
|
|
34845
|
+
}) => {
|
|
34846
|
+
const {
|
|
34847
|
+
i18n
|
|
34848
|
+
} = useI18nContext();
|
|
34849
|
+
return jsxs("div", {
|
|
34850
|
+
className: "adyen-kyc-splashscreen",
|
|
34851
|
+
children: [icon && jsx(OutlinedIcon, {
|
|
34852
|
+
name: icon
|
|
34853
|
+
}), jsx(Typography, {
|
|
34854
|
+
el: "h2",
|
|
34855
|
+
variant: "title-l",
|
|
34856
|
+
children: title
|
|
34857
|
+
}), jsx(Typography, {
|
|
34858
|
+
el: "p",
|
|
34859
|
+
variant: "body",
|
|
34860
|
+
children: subtitle
|
|
34861
|
+
}), onClick && jsx(Button, {
|
|
34862
|
+
onClick,
|
|
34863
|
+
label: buttonText ?? i18n.get("finish")
|
|
34864
|
+
})]
|
|
34865
|
+
});
|
|
34866
|
+
};
|
|
34655
34867
|
const serviceAgreementValidationRules = {
|
|
34656
34868
|
signer: {
|
|
34657
34869
|
modes: ["blur"],
|
|
@@ -34745,7 +34957,8 @@ const serviceAgreementTypesTranslationMapping = {
|
|
|
34745
34957
|
adyenAccount: "businessAccountTerms",
|
|
34746
34958
|
adyenCard: "cardUserTerms",
|
|
34747
34959
|
adyenFranchisee: "franchiseesTAndCs",
|
|
34748
|
-
adyenPccr: "pccr"
|
|
34960
|
+
adyenPccr: "pccr",
|
|
34961
|
+
adyenChargeCard: "chargeCardUserAgreement"
|
|
34749
34962
|
};
|
|
34750
34963
|
const logger$i = createLogger("ServiceAgreementDropinComponent");
|
|
34751
34964
|
const FALLBACK_LANGUAGE_CODE = "en";
|
|
@@ -34799,7 +35012,9 @@ function ServiceAgreementDropinComponent({
|
|
|
34799
35012
|
const forms2 = [...signedForms, ...formsToBeSigned];
|
|
34800
35013
|
const [activeFormIndex, setActiveFormIndex] = useState(0);
|
|
34801
35014
|
const [activeForm, setActiveForm] = useState(forms2[activeFormIndex]);
|
|
35015
|
+
const [hasFinished, setHasFinished] = useState(false);
|
|
34802
35016
|
const canSign = (serviceAgreementTypes == null ? void 0 : serviceAgreementTypes.includes(activeForm.serviceAgreementType)) && !activeForm.acceptanceId;
|
|
35017
|
+
const isLastStep = activeFormIndex === forms2.length - 1;
|
|
34803
35018
|
const showSignerCard = !!activeForm.acceptanceId;
|
|
34804
35019
|
const handleServiceAgreementIsNotAvailableInThatLanguage = useCallback(() => {
|
|
34805
35020
|
showToast({
|
|
@@ -35052,7 +35267,7 @@ function ServiceAgreementDropinComponent({
|
|
|
35052
35267
|
homeButtonLabel: i18n.get("goToOverview"),
|
|
35053
35268
|
onNext: canSign ? handleSignClick : () => gotoForm(activeFormIndex + 1),
|
|
35054
35269
|
nextButtonLabel: i18n.get(canSign ? "sign" : "next"),
|
|
35055
|
-
nextButtonDisabled: !canSign &&
|
|
35270
|
+
nextButtonDisabled: !canSign && isLastStep,
|
|
35056
35271
|
onBack: () => gotoForm(activeFormIndex - 1),
|
|
35057
35272
|
hideBackButton: activeFormIndex === 0,
|
|
35058
35273
|
backButtonLabel: i18n.get("previous")
|
|
@@ -35060,6 +35275,15 @@ function ServiceAgreementDropinComponent({
|
|
|
35060
35275
|
});
|
|
35061
35276
|
const currentStep = signedForms.length;
|
|
35062
35277
|
const totalSteps = forms2.length;
|
|
35278
|
+
const handleClick = async () => {
|
|
35279
|
+
if (canSign) {
|
|
35280
|
+
await handleSignClick();
|
|
35281
|
+
} else if (!isLastStep) {
|
|
35282
|
+
gotoForm(activeFormIndex + 1);
|
|
35283
|
+
} else {
|
|
35284
|
+
setHasFinished(true);
|
|
35285
|
+
}
|
|
35286
|
+
};
|
|
35063
35287
|
const footer = jsx(EmbeddedActionBar, {
|
|
35064
35288
|
left: jsx(StepProgressIndicator, {
|
|
35065
35289
|
activeStepIndex: currentStep ?? 0,
|
|
@@ -35072,15 +35296,20 @@ function ServiceAgreementDropinComponent({
|
|
|
35072
35296
|
jsx(Button, {
|
|
35073
35297
|
secondary: !canSign,
|
|
35074
35298
|
label: i18n.get(canSign ? "signAndContinue" : "next"),
|
|
35075
|
-
onClick:
|
|
35299
|
+
onClick: handleClick
|
|
35076
35300
|
})
|
|
35077
35301
|
)
|
|
35078
35302
|
});
|
|
35303
|
+
const endScreen = hasFinished && jsx(Splashscreen, {
|
|
35304
|
+
icon: "check",
|
|
35305
|
+
title: i18n.get("serviceAgreementSignedAndDated"),
|
|
35306
|
+
onClick: handleCloseClick
|
|
35307
|
+
});
|
|
35079
35308
|
return jsx(DropinLayout, {
|
|
35080
35309
|
showAsModal: asModal,
|
|
35081
35310
|
onClose: handleCloseClick,
|
|
35082
35311
|
content: jsxs(Fragment, {
|
|
35083
|
-
children: [!asEmbedded && sidebar, content]
|
|
35312
|
+
children: [!asEmbedded && sidebar, endScreen || content]
|
|
35084
35313
|
}),
|
|
35085
35314
|
footer: asEmbedded ? footer : void 0
|
|
35086
35315
|
});
|
|
@@ -36722,7 +36951,6 @@ function DropinComposerComponent({
|
|
|
36722
36951
|
handleVerifyTin: args.handleVerifyTin,
|
|
36723
36952
|
onTypeSwitch: navigateToTypeSwitcher,
|
|
36724
36953
|
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION,
|
|
36725
|
-
accountHolder,
|
|
36726
36954
|
trustedFields: singpassTrustedFields,
|
|
36727
36955
|
trustedFieldsProvider: isEligibleForSingpass && TrustedFieldsProvider.SINGPASS
|
|
36728
36956
|
});
|
|
@@ -36762,8 +36990,7 @@ function DropinComposerComponent({
|
|
|
36762
36990
|
handleVerifyTin: args.handleVerifyTin,
|
|
36763
36991
|
handleClearCompanyData: args.handleClearCompanyData,
|
|
36764
36992
|
onTypeSwitch: navigateToTypeSwitcher,
|
|
36765
|
-
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
36766
|
-
accountHolder
|
|
36993
|
+
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
36767
36994
|
})
|
|
36768
36995
|
});
|
|
36769
36996
|
case TaskTypes.TRUST_MEMBER_COMPANY:
|
|
@@ -37642,7 +37869,8 @@ function CreateContractingComponent({
|
|
|
37642
37869
|
getServiceAgreementAcceptanceInfos: getServiceAgreementAcceptanceInfos2,
|
|
37643
37870
|
getAcceptedServiceAgreement: getAcceptedServiceAgreement2,
|
|
37644
37871
|
downloadAcceptedServiceAgreement,
|
|
37645
|
-
downloadUnacceptedServiceAgreement
|
|
37872
|
+
downloadUnacceptedServiceAgreement,
|
|
37873
|
+
acceptServiceAgreement: acceptServiceAgreement2
|
|
37646
37874
|
} = useComponentApi(legalEntityId);
|
|
37647
37875
|
const [isLoading, setIsLoading] = useState(true);
|
|
37648
37876
|
const [legalEntity, setLegalEntity] = useState();
|
|
@@ -37664,6 +37892,14 @@ function CreateContractingComponent({
|
|
|
37664
37892
|
data
|
|
37665
37893
|
}) => setServiceAgreementAcceptanceInfos(data)).catch(logger$g.error);
|
|
37666
37894
|
}, [getServiceAgreementAcceptanceInfos2, legalEntityId]);
|
|
37895
|
+
const handleSign = useCallback(
|
|
37896
|
+
// @ts-ignore-error:next-line ts does not infer type correctly
|
|
37897
|
+
async (...params) => {
|
|
37898
|
+
await acceptServiceAgreement2(...params);
|
|
37899
|
+
await Promise.all([fetchLegalEntity(), fetchUnsigned(), fetchSigned()]);
|
|
37900
|
+
},
|
|
37901
|
+
[acceptServiceAgreement2, fetchLegalEntity, fetchSigned, fetchUnsigned]
|
|
37902
|
+
);
|
|
37667
37903
|
useEffect(() => {
|
|
37668
37904
|
(async () => {
|
|
37669
37905
|
setIsLoading(true);
|
|
@@ -37674,8 +37910,6 @@ function CreateContractingComponent({
|
|
|
37674
37910
|
}, [fetchLegalEntity, fetchSigned, fetchUnsigned]);
|
|
37675
37911
|
const handleHomeClick = () => {
|
|
37676
37912
|
};
|
|
37677
|
-
const handleSign = () => {
|
|
37678
|
-
};
|
|
37679
37913
|
return isLoading || !legalEntity ? jsx(Loader, {
|
|
37680
37914
|
size: "medium"
|
|
37681
37915
|
}) : jsx(ServiceAgreementDropinComponent, {
|
|
@@ -37851,14 +38085,19 @@ function CreateTransferInstrumentComponent({
|
|
|
37851
38085
|
taskType: TaskTypes.PAYOUT
|
|
37852
38086
|
});
|
|
37853
38087
|
}
|
|
37854
|
-
|
|
37855
|
-
|
|
37856
|
-
|
|
37857
|
-
|
|
37858
|
-
|
|
37859
|
-
|
|
37860
|
-
|
|
37861
|
-
|
|
38088
|
+
const adyenKycSkeleton = "adyen-kyc-skeleton";
|
|
38089
|
+
const skeleton = "skeleton";
|
|
38090
|
+
const adyenKycSkeletonCircle = "adyen-kyc-skeleton__circle";
|
|
38091
|
+
const adyenKycSkeletonText = "adyen-kyc-skeleton__text";
|
|
38092
|
+
const styles$1 = {
|
|
38093
|
+
"adyen-kyc-skeleton": "adyen-kyc-skeleton",
|
|
38094
|
+
adyenKycSkeleton,
|
|
38095
|
+
skeleton,
|
|
38096
|
+
"adyen-kyc-skeleton__circle": "adyen-kyc-skeleton__circle",
|
|
38097
|
+
adyenKycSkeletonCircle,
|
|
38098
|
+
"adyen-kyc-skeleton__text": "adyen-kyc-skeleton__text",
|
|
38099
|
+
adyenKycSkeletonText
|
|
38100
|
+
};
|
|
37862
38101
|
const Skeleton = ({
|
|
37863
38102
|
circle = false,
|
|
37864
38103
|
text = false,
|
|
@@ -37866,8 +38105,8 @@ const Skeleton = ({
|
|
|
37866
38105
|
width
|
|
37867
38106
|
}) => {
|
|
37868
38107
|
const classNames = cx("adyen-kyc-skeleton", {
|
|
37869
|
-
"adyen-kyc-skeleton__circle": circle,
|
|
37870
|
-
"adyen-kyc-skeleton__text": text
|
|
38108
|
+
[styles$1["adyen-kyc-skeleton__circle"]]: circle,
|
|
38109
|
+
[styles$1["adyen-kyc-skeleton__text"]]: text
|
|
37871
38110
|
});
|
|
37872
38111
|
return jsx("div", {
|
|
37873
38112
|
className: classNames,
|
|
@@ -37877,14 +38116,34 @@ const Skeleton = ({
|
|
|
37877
38116
|
}
|
|
37878
38117
|
});
|
|
37879
38118
|
};
|
|
38119
|
+
const adyenKycEmbeddedStatus = "adyen-kyc-embedded-status";
|
|
38120
|
+
const adyenKycEmbeddedStatusLoading = "adyen-kyc-embedded-status--loading";
|
|
38121
|
+
const adyenKycEmbeddedStatusAvatar = "adyen-kyc-embedded-status__avatar";
|
|
38122
|
+
const adyenKycEmbeddedStatusLight = "adyen-kyc-embedded-status--light";
|
|
38123
|
+
const adyenKycEmbeddedStatusIcon = "adyen-kyc-embedded-status__icon";
|
|
38124
|
+
const adyenKycEmbeddedStatusInfo = "adyen-kyc-embedded-status__info";
|
|
37880
38125
|
const styles = {
|
|
37881
38126
|
"adyen-kyc-embedded-status": "adyen-kyc-embedded-status",
|
|
38127
|
+
adyenKycEmbeddedStatus,
|
|
37882
38128
|
"adyen-kyc-embedded-status--loading": "adyen-kyc-embedded-status--loading",
|
|
38129
|
+
adyenKycEmbeddedStatusLoading,
|
|
37883
38130
|
"adyen-kyc-embedded-status__avatar": "adyen-kyc-embedded-status__avatar",
|
|
38131
|
+
adyenKycEmbeddedStatusAvatar,
|
|
37884
38132
|
"adyen-kyc-embedded-status--light": "adyen-kyc-embedded-status--light",
|
|
38133
|
+
adyenKycEmbeddedStatusLight,
|
|
37885
38134
|
"adyen-kyc-embedded-status__icon": "adyen-kyc-embedded-status__icon",
|
|
37886
|
-
|
|
38135
|
+
adyenKycEmbeddedStatusIcon,
|
|
38136
|
+
"adyen-kyc-embedded-status__info": "adyen-kyc-embedded-status__info",
|
|
38137
|
+
adyenKycEmbeddedStatusInfo
|
|
37887
38138
|
};
|
|
38139
|
+
var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
|
|
38140
|
+
OnboardingStatus2["AWAITING_DATA"] = "AWAITING_DATA";
|
|
38141
|
+
OnboardingStatus2["IN_REVIEW"] = "IN_REVIEW";
|
|
38142
|
+
OnboardingStatus2["UNSUCCESSFUL"] = "UNSUCCESSFUL";
|
|
38143
|
+
OnboardingStatus2["REJECTED"] = "REJECTED";
|
|
38144
|
+
OnboardingStatus2["VERIFIED"] = "VERIFIED";
|
|
38145
|
+
return OnboardingStatus2;
|
|
38146
|
+
})(OnboardingStatus || {});
|
|
37888
38147
|
const statusToTag = (status) => {
|
|
37889
38148
|
switch (status) {
|
|
37890
38149
|
case OnboardingStatus.IN_REVIEW:
|
|
@@ -37952,8 +38211,8 @@ const EmbeddedStatus = ({
|
|
|
37952
38211
|
return jsxs("button", {
|
|
37953
38212
|
type: "button",
|
|
37954
38213
|
className: cx(className, styles["adyen-kyc-embedded-status"], {
|
|
37955
|
-
"adyen-kyc-embedded-status--loading": loading,
|
|
37956
|
-
"adyen-kyc-embedded-status--light": light
|
|
38214
|
+
[styles["adyen-kyc-embedded-status--loading"]]: loading,
|
|
38215
|
+
[styles["adyen-kyc-embedded-status--light"]]: light
|
|
37957
38216
|
}),
|
|
37958
38217
|
onClick,
|
|
37959
38218
|
...props,
|
|
@@ -38015,6 +38274,66 @@ const EmbeddedStatus = ({
|
|
|
38015
38274
|
})]
|
|
38016
38275
|
});
|
|
38017
38276
|
};
|
|
38277
|
+
function ContractingStatus({
|
|
38278
|
+
legalEntityId,
|
|
38279
|
+
onClick,
|
|
38280
|
+
title,
|
|
38281
|
+
subtitle = ""
|
|
38282
|
+
}) {
|
|
38283
|
+
const {
|
|
38284
|
+
getServiceAgreementStatus: getServiceAgreementStatus2,
|
|
38285
|
+
getServiceAgreementAcceptanceInfos: getServiceAgreementAcceptanceInfos2
|
|
38286
|
+
} = useComponentApi(legalEntityId);
|
|
38287
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
38288
|
+
const [hasSignedAll, setHasSignedAll] = useState(false);
|
|
38289
|
+
const getUnsigned = useCallback(async () => getServiceAgreementStatus2(legalEntityId), [getServiceAgreementStatus2, legalEntityId]);
|
|
38290
|
+
const getSigned = useCallback(async () => getServiceAgreementAcceptanceInfos2(legalEntityId), [getServiceAgreementAcceptanceInfos2, legalEntityId]);
|
|
38291
|
+
const getStatus = useCallback(async () => {
|
|
38292
|
+
const [signedRes, unsignedRes] = await Promise.all([getSigned(), getUnsigned()]);
|
|
38293
|
+
const signed = signedRes.data.map((d) => d.type);
|
|
38294
|
+
const unsigned = unsignedRes.termsOfServiceTypes;
|
|
38295
|
+
return signed.length !== 0 && unsigned.length === 0;
|
|
38296
|
+
}, [getUnsigned, getSigned]);
|
|
38297
|
+
useEffect(() => {
|
|
38298
|
+
getStatus().then((allSigned) => {
|
|
38299
|
+
setIsLoading(false);
|
|
38300
|
+
setHasSignedAll(allSigned);
|
|
38301
|
+
}).catch(() => {
|
|
38302
|
+
});
|
|
38303
|
+
});
|
|
38304
|
+
const handleClick = () => {
|
|
38305
|
+
onClick == null ? void 0 : onClick();
|
|
38306
|
+
};
|
|
38307
|
+
return hasSignedAll ? jsx(EmbeddedStatus, {
|
|
38308
|
+
onClick,
|
|
38309
|
+
title,
|
|
38310
|
+
subtitle,
|
|
38311
|
+
tagLabel: "complete",
|
|
38312
|
+
loading: isLoading
|
|
38313
|
+
}) : jsx(EmbeddedStatus, {
|
|
38314
|
+
onClick,
|
|
38315
|
+
actionButton: {
|
|
38316
|
+
labelKey: "sign",
|
|
38317
|
+
onClick: handleClick
|
|
38318
|
+
},
|
|
38319
|
+
title,
|
|
38320
|
+
subtitle,
|
|
38321
|
+
loading: isLoading
|
|
38322
|
+
});
|
|
38323
|
+
}
|
|
38324
|
+
function ManageContractingComponent({
|
|
38325
|
+
legalEntityId,
|
|
38326
|
+
onClick
|
|
38327
|
+
}) {
|
|
38328
|
+
const {
|
|
38329
|
+
i18n
|
|
38330
|
+
} = useI18nContext();
|
|
38331
|
+
return jsx(ContractingStatus, {
|
|
38332
|
+
legalEntityId,
|
|
38333
|
+
title: i18n.get("serviceAgreements"),
|
|
38334
|
+
onClick
|
|
38335
|
+
});
|
|
38336
|
+
}
|
|
38018
38337
|
function LegalEntityStatus({
|
|
38019
38338
|
legalEntityId,
|
|
38020
38339
|
onClick
|
|
@@ -38103,6 +38422,51 @@ function useInterval(callback, initialDelay = DEFAULT_POLLING_INTERVAL) {
|
|
|
38103
38422
|
}, [timeoutId]);
|
|
38104
38423
|
return timeoutId;
|
|
38105
38424
|
}
|
|
38425
|
+
const Confirm = ({
|
|
38426
|
+
onConfirm,
|
|
38427
|
+
title,
|
|
38428
|
+
confirmBtnLabel,
|
|
38429
|
+
onClose
|
|
38430
|
+
}) => {
|
|
38431
|
+
const {
|
|
38432
|
+
i18n
|
|
38433
|
+
} = useI18nContext();
|
|
38434
|
+
const [isInFlight, setIsInFlight] = useState(false);
|
|
38435
|
+
const handleConfirm = async () => {
|
|
38436
|
+
setIsInFlight(true);
|
|
38437
|
+
try {
|
|
38438
|
+
await onConfirm();
|
|
38439
|
+
} finally {
|
|
38440
|
+
setIsInFlight(false);
|
|
38441
|
+
onClose();
|
|
38442
|
+
}
|
|
38443
|
+
};
|
|
38444
|
+
const modalHeader = jsx(Typography, {
|
|
38445
|
+
variant: "title",
|
|
38446
|
+
el: "h3",
|
|
38447
|
+
className: "adyen-kyc-u-margin-top-8 adyen-kyc-u-margin-left-8",
|
|
38448
|
+
children: title
|
|
38449
|
+
});
|
|
38450
|
+
const modalFooter = jsx(EmbeddedActionBar, {
|
|
38451
|
+
right: jsxs(Fragment, {
|
|
38452
|
+
children: [jsx(Button, {
|
|
38453
|
+
label: i18n.get("cancel"),
|
|
38454
|
+
onClick: onClose,
|
|
38455
|
+
secondary: true
|
|
38456
|
+
}), jsx(Button, {
|
|
38457
|
+
label: confirmBtnLabel || i18n.get("confirm"),
|
|
38458
|
+
onClick: handleConfirm,
|
|
38459
|
+
critical: true,
|
|
38460
|
+
disabled: isInFlight
|
|
38461
|
+
})]
|
|
38462
|
+
})
|
|
38463
|
+
});
|
|
38464
|
+
return jsx(Modal, {
|
|
38465
|
+
header: modalHeader,
|
|
38466
|
+
footer: modalFooter,
|
|
38467
|
+
size: "small"
|
|
38468
|
+
});
|
|
38469
|
+
};
|
|
38106
38470
|
function ManageTransferInstrumentOverviewItemModal({
|
|
38107
38471
|
status,
|
|
38108
38472
|
transferInstrument,
|
|
@@ -38114,6 +38478,7 @@ function ManageTransferInstrumentOverviewItemModal({
|
|
|
38114
38478
|
const {
|
|
38115
38479
|
i18n
|
|
38116
38480
|
} = useI18nContext();
|
|
38481
|
+
const [confirmOpen, setConfirmOpen] = useState(false);
|
|
38117
38482
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
38118
38483
|
const isReviewInProgress = status === "PROCESSING";
|
|
38119
38484
|
const showEditButton = status !== "ERROR" && !(transferInstrument == null ? void 0 : transferInstrument.bankAccount.trustedSource);
|
|
@@ -38170,14 +38535,23 @@ function ManageTransferInstrumentOverviewItemModal({
|
|
|
38170
38535
|
};
|
|
38171
38536
|
const modalHeader = jsx(Typography, {
|
|
38172
38537
|
variant: "title-l",
|
|
38538
|
+
el: "h3",
|
|
38539
|
+
className: "adyen-kyc-manage-ti-overview-item-summary__header",
|
|
38173
38540
|
children: i18n.get("bankAccount")
|
|
38174
38541
|
});
|
|
38542
|
+
const handleRemove = async () => {
|
|
38543
|
+
await onRemove(transferInstrument.id);
|
|
38544
|
+
onClose();
|
|
38545
|
+
};
|
|
38175
38546
|
const modalFooter = () => {
|
|
38176
38547
|
if (!transferInstrument) return;
|
|
38177
38548
|
const actions = jsxs(Fragment, {
|
|
38178
|
-
children: [jsx(
|
|
38179
|
-
|
|
38180
|
-
|
|
38549
|
+
children: [jsx(Button, {
|
|
38550
|
+
title: i18n.get("delete"),
|
|
38551
|
+
icon: "bin",
|
|
38552
|
+
secondary: true,
|
|
38553
|
+
disabled: isReviewInProgress,
|
|
38554
|
+
onClick: () => setConfirmOpen(true)
|
|
38181
38555
|
}), showEditButton && jsx(Button, {
|
|
38182
38556
|
label: i18n.get("edit"),
|
|
38183
38557
|
onClick: () => onEdit(transferInstrument.id),
|
|
@@ -38188,28 +38562,35 @@ function ManageTransferInstrumentOverviewItemModal({
|
|
|
38188
38562
|
right: actions
|
|
38189
38563
|
});
|
|
38190
38564
|
};
|
|
38191
|
-
return
|
|
38192
|
-
|
|
38193
|
-
|
|
38194
|
-
|
|
38195
|
-
|
|
38196
|
-
|
|
38197
|
-
|
|
38198
|
-
|
|
38199
|
-
|
|
38200
|
-
|
|
38201
|
-
|
|
38202
|
-
|
|
38203
|
-
|
|
38204
|
-
|
|
38205
|
-
|
|
38206
|
-
|
|
38207
|
-
|
|
38208
|
-
|
|
38209
|
-
|
|
38210
|
-
|
|
38211
|
-
|
|
38212
|
-
|
|
38565
|
+
return jsxs(Fragment, {
|
|
38566
|
+
children: [jsx(Modal, {
|
|
38567
|
+
header: modalHeader,
|
|
38568
|
+
onClose,
|
|
38569
|
+
footer: modalFooter(),
|
|
38570
|
+
children: !transferInstrument ? jsx(Loader, {}) : jsxs("div", {
|
|
38571
|
+
className: "adyen-kyc-manage-ti-overview-item-summary",
|
|
38572
|
+
children: [!!((_b = (_a = problems.BankAccount) == null ? void 0 : _a[transferInstrument.id]) == null ? void 0 : _b.verificationErrors) && jsx(VerificationErrorAlert, {
|
|
38573
|
+
className: "adyen-kyc-manage-ti-overview-item-summary__error",
|
|
38574
|
+
problems: (_c = problems.BankAccount) == null ? void 0 : _c[transferInstrument.id],
|
|
38575
|
+
children: jsx(Button, {
|
|
38576
|
+
className: "adyen-kyc-manage-ti-overview-item-summary__error-button",
|
|
38577
|
+
label: i18n.get("editDetails"),
|
|
38578
|
+
tertiary: true,
|
|
38579
|
+
onClick: () => onEdit(transferInstrument.id)
|
|
38580
|
+
})
|
|
38581
|
+
}), getStructuredLists().map((listItems) => jsx(Card, {
|
|
38582
|
+
className: "adyen-kyc-manage-ti-overview-item-summary__card",
|
|
38583
|
+
children: jsx(StructuredList, {
|
|
38584
|
+
items: listItems
|
|
38585
|
+
})
|
|
38586
|
+
}, listItems))]
|
|
38587
|
+
})
|
|
38588
|
+
}), confirmOpen && jsx(Confirm, {
|
|
38589
|
+
title: i18n.get("areYouSureYouWantToDeleteThisBankAccount"),
|
|
38590
|
+
confirmBtnLabel: i18n.get("delete"),
|
|
38591
|
+
onConfirm: handleRemove,
|
|
38592
|
+
onClose: () => setConfirmOpen(false)
|
|
38593
|
+
})]
|
|
38213
38594
|
});
|
|
38214
38595
|
}
|
|
38215
38596
|
function ManageTransferInstrumentOverviewItem({
|
|
@@ -38263,6 +38644,9 @@ function ManageTransferInstrumentOverview({
|
|
|
38263
38644
|
const {
|
|
38264
38645
|
i18n
|
|
38265
38646
|
} = useI18nContext();
|
|
38647
|
+
const {
|
|
38648
|
+
showToast
|
|
38649
|
+
} = useToastContext();
|
|
38266
38650
|
const {
|
|
38267
38651
|
getTransferInstrument: getTransferInstrument2,
|
|
38268
38652
|
deleteTransferInstrument: deleteTransferInstrument2
|
|
@@ -38285,6 +38669,10 @@ function ManageTransferInstrumentOverview({
|
|
|
38285
38669
|
await deleteTransferInstrument2(transferInstrumentId);
|
|
38286
38670
|
onRemove(transferInstrumentId);
|
|
38287
38671
|
} catch (e) {
|
|
38672
|
+
showToast({
|
|
38673
|
+
label: i18n.get("thereWasAnErrorTryAgain"),
|
|
38674
|
+
type: "error"
|
|
38675
|
+
});
|
|
38288
38676
|
logger$d.error(e);
|
|
38289
38677
|
}
|
|
38290
38678
|
};
|
|
@@ -40387,6 +40775,7 @@ const componentsMap = {
|
|
|
40387
40775
|
onboardingDropinComponent: OnboardingDropinComponent,
|
|
40388
40776
|
manageIndividualComponent: ManageIndividualComponent,
|
|
40389
40777
|
createContractingComponent: CreateContractingComponent,
|
|
40778
|
+
manageContractingComponent: ManageContractingComponent,
|
|
40390
40779
|
viewVerificationStatusComponent: ViewVerificationStatusComponent,
|
|
40391
40780
|
updateLegalEntityForHighExposureComponent: UpdateLegalEntityForHighExposure
|
|
40392
40781
|
};
|
|
@@ -40843,7 +41232,7 @@ const ConfigurationApiProvider = ({
|
|
|
40843
41232
|
isEmbeddedDropin,
|
|
40844
41233
|
loadingContext
|
|
40845
41234
|
} = authContext;
|
|
40846
|
-
const sdkVersion = "3.
|
|
41235
|
+
const sdkVersion = "3.29.0";
|
|
40847
41236
|
useAnalytics({
|
|
40848
41237
|
onUserEvent,
|
|
40849
41238
|
legalEntityId: rootLegalEntityId,
|
|
@@ -41525,7 +41914,7 @@ const DebugModal = ({
|
|
|
41525
41914
|
};
|
|
41526
41915
|
const copyToClipboard = async () => {
|
|
41527
41916
|
const toCopy = {
|
|
41528
|
-
sdkVersion: "3.
|
|
41917
|
+
sdkVersion: "3.29.0",
|
|
41529
41918
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
41530
41919
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
41531
41920
|
};
|
|
@@ -41564,7 +41953,7 @@ const DebugModal = ({
|
|
|
41564
41953
|
children: [jsxs("div", {
|
|
41565
41954
|
className: "adyen-kyc-debug-modal__meta",
|
|
41566
41955
|
children: [jsxs("span", {
|
|
41567
|
-
children: ["SDK version: ", "3.
|
|
41956
|
+
children: ["SDK version: ", "3.29.0"]
|
|
41568
41957
|
}), jsxs("span", {
|
|
41569
41958
|
children: ["rootLegalEntityId: ", rootLegalEntityId]
|
|
41570
41959
|
})]
|
|
@@ -42483,6 +42872,11 @@ const createContractingComponentSchema = {
|
|
|
42483
42872
|
type: "boolean"
|
|
42484
42873
|
}
|
|
42485
42874
|
};
|
|
42875
|
+
const manageContractingComponentSchema = {
|
|
42876
|
+
legalEntityId: {
|
|
42877
|
+
type: "string"
|
|
42878
|
+
}
|
|
42879
|
+
};
|
|
42486
42880
|
const viewVerificationStatusComponentSchema = {
|
|
42487
42881
|
legalEntityId: {
|
|
42488
42882
|
type: "string",
|
|
@@ -42543,6 +42937,7 @@ const componentsSchemaMap = {
|
|
|
42543
42937
|
createIndividualComponent: createIndividualComponentSchema,
|
|
42544
42938
|
manageIndividualComponent: manageIndividualComponentSchema,
|
|
42545
42939
|
createContractingComponent: createContractingComponentSchema,
|
|
42940
|
+
manageContractingComponent: manageContractingComponentSchema,
|
|
42546
42941
|
createTransferInstrumentComponent: createTransferInstrumentComponentSchema,
|
|
42547
42942
|
viewVerificationStatusComponent: viewVerificationStatusComponentSchema,
|
|
42548
42943
|
updateLegalEntityForHighExposureComponent: updateLegalEntityForHighExposureComponentSchema,
|