@adyen/kyc-components 2.54.0 → 2.55.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 +403 -213
- 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 +31 -8
- 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/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/PayoutAccount/component/CheckGuidance/CheckGuidance.d.ts +6 -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/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/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
|
@@ -94,7 +94,6 @@ const defaultTrans = {
|
|
|
94
94
|
accountNumberOrIbanVisible: "Includes your account number or IBAN",
|
|
95
95
|
accountNumberVisible: "Includes your account number",
|
|
96
96
|
accountVerification: "Account Verification",
|
|
97
|
-
achRoutingNumber: "ACH routing number",
|
|
98
97
|
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.",
|
|
99
98
|
add: "Add",
|
|
100
99
|
addAndVerifyYourBankDetails: "Add and verify your bank account details",
|
|
@@ -204,6 +203,7 @@ const defaultTrans = {
|
|
|
204
203
|
businessSelection__footerButton: "Add details manually",
|
|
205
204
|
businessSelection__heading: "Select your business",
|
|
206
205
|
businessSelection__invalidTin: "This company's TIN doesn't match yours",
|
|
206
|
+
businessSelection__tinVerificationFailure: "Sorry, something went wrong. Try again or continue by pressing Add details manually",
|
|
207
207
|
businessStructure: "Business structure",
|
|
208
208
|
businessTrust: "Business trust",
|
|
209
209
|
businessTrusteeDetails: "Business trustee details",
|
|
@@ -225,6 +225,7 @@ const defaultTrans = {
|
|
|
225
225
|
chamberOfCommerceExtract: "Chamber of Commerce extract",
|
|
226
226
|
chamberOfCommerceRegistrationNumber: "Chamber of Commerce registration number",
|
|
227
227
|
changeYourBusinessSetup: "Change your business setup?",
|
|
228
|
+
chargeCardUserAgreement: "Charge Card User Agreement",
|
|
228
229
|
charitableTrust: "Charitable trust",
|
|
229
230
|
charityNumber: "Charity number",
|
|
230
231
|
charter: "Charter",
|
|
@@ -387,6 +388,7 @@ const defaultTrans = {
|
|
|
387
388
|
enterAMaximumOfNCharactersWithAMixForExample: "Enter a maximum of %{maxChars} characters, with a mix of letters and numbers. For example, %{example}",
|
|
388
389
|
enterAMaximumOfNDigitsForExample: "Enter a maximum of %{maxDigits} digits. For example, %{example}",
|
|
389
390
|
enterAMaximumOfNMoreDigitsForExample: "Enter a maximum of %{maxDigits} more digits. For example, %{example}",
|
|
391
|
+
enterEnglishLetterFollowedByXtoYDigitsForExample: "Enter an English-equivalent letter (C for HE, O for AE, P for Σ) followed by %{minDigits} - %{maxDigits} digits. For example, %{example}",
|
|
390
392
|
enterLastNDigitsForExample: "Enter the last %{numDigits} digits. For example, %{example}",
|
|
391
393
|
enterLastNameExactlyAsAppearInID: "Enter your last name(s) exactly as it appears on your identity document",
|
|
392
394
|
enterNCharactersForExample: "Enter %{numChars} characters. For example, %{example}",
|
|
@@ -999,6 +1001,7 @@ const defaultTrans = {
|
|
|
999
1001
|
parentCompany: "Parent company",
|
|
1000
1002
|
parentCompanyInformation: "Parent company information",
|
|
1001
1003
|
partitaIVA: "Partita IVA",
|
|
1004
|
+
codiceFiscalePartitaIVA: "Codice Fiscale / Partita IVA",
|
|
1002
1005
|
partnerShipAgreement: "Partnership agreement",
|
|
1003
1006
|
partnership: "Partnership",
|
|
1004
1007
|
partnershipIncorporated: "Incorporated partnership",
|
|
@@ -1082,7 +1085,7 @@ const defaultTrans = {
|
|
|
1082
1085
|
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.",
|
|
1083
1086
|
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.",
|
|
1084
1087
|
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.",
|
|
1085
|
-
reasonForFillingPayoutDetails: "
|
|
1088
|
+
reasonForFillingPayoutDetails: "This bank account will be verified to prevent fraud or other misuse of funds in compliance with global regulations.",
|
|
1086
1089
|
region: "Region",
|
|
1087
1090
|
registeredAddress: "Registered address",
|
|
1088
1091
|
registeredAddressHeaderDescription: "The address as it appears on your company's official registration documents.",
|
|
@@ -1171,6 +1174,7 @@ const defaultTrans = {
|
|
|
1171
1174
|
rnaNumber: "RNA number",
|
|
1172
1175
|
role: "Role",
|
|
1173
1176
|
roleAndEntityType: "Role and entity type",
|
|
1177
|
+
routingNumber: "Routing number",
|
|
1174
1178
|
routingNumberVisible: "Includes your routing number",
|
|
1175
1179
|
salarySlip: "Salary slip",
|
|
1176
1180
|
sameAsRegisteredAddress: "Same as registered business address",
|
|
@@ -1654,6 +1658,12 @@ function useToastContext() {
|
|
|
1654
1658
|
}
|
|
1655
1659
|
return context;
|
|
1656
1660
|
}
|
|
1661
|
+
const CoreContext = createContext(void 0);
|
|
1662
|
+
const useCoreContext = () => {
|
|
1663
|
+
const context = useContext(CoreContext);
|
|
1664
|
+
if (!context) throw Error("You need a <CoreProvider> to use core context");
|
|
1665
|
+
return context;
|
|
1666
|
+
};
|
|
1657
1667
|
let suppressed = false;
|
|
1658
1668
|
const consoleMethodsPrefixable = Object.freeze(["debug", "info", "log", "warn", "error", "trace"]);
|
|
1659
1669
|
const stringSubstitutionRegex = /%([soOc]|(\.\d)?[dif])/;
|
|
@@ -2008,15 +2018,30 @@ function useBusinessData({
|
|
|
2008
2018
|
handleVerifyTin,
|
|
2009
2019
|
handleClearCompanyData
|
|
2010
2020
|
}) {
|
|
2011
|
-
const [
|
|
2012
|
-
const [
|
|
2013
|
-
const [
|
|
2014
|
-
const [
|
|
2021
|
+
const [searching, setSearching] = useState("idle");
|
|
2022
|
+
const [fetching, setFetching] = useState("idle");
|
|
2023
|
+
const [verifying, setVerifying] = useState("idle");
|
|
2024
|
+
const [resettingTrustedData, setResettingTrustedData] = useState("idle");
|
|
2015
2025
|
const [searchResults, setSearchResults] = useState();
|
|
2016
2026
|
const [cachedSearch, setCachedSearch] = useState();
|
|
2017
2027
|
const [cachedBusiness, setCachedBusiness] = useState();
|
|
2018
2028
|
const [verifiedBusiness, setVerifiedBusiness] = useState();
|
|
2019
2029
|
const [invalidTin, setInvalidTin] = useState(false);
|
|
2030
|
+
const primarySourceSearch = async (data, indexSearch, deepSearch) => {
|
|
2031
|
+
let response;
|
|
2032
|
+
try {
|
|
2033
|
+
response = await deepSearch({
|
|
2034
|
+
...data,
|
|
2035
|
+
limit: data.limit ?? 15
|
|
2036
|
+
});
|
|
2037
|
+
} catch (e) {
|
|
2038
|
+
response = await indexSearch({
|
|
2039
|
+
...data,
|
|
2040
|
+
limit: data.limit ?? 15
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
return response;
|
|
2044
|
+
};
|
|
2020
2045
|
const searchForBusiness = useCallback(async (data) => {
|
|
2021
2046
|
if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
|
|
2022
2047
|
logger$E.log("Missing handlers for searchForBusiness");
|
|
@@ -2024,24 +2049,22 @@ function useBusinessData({
|
|
|
2024
2049
|
}
|
|
2025
2050
|
if (searchResults && objectsDeepEqual(cachedSearch, data)) return;
|
|
2026
2051
|
try {
|
|
2027
|
-
|
|
2028
|
-
const {
|
|
2029
|
-
results
|
|
2030
|
-
} = KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await handleCompanyIndexSearch({
|
|
2052
|
+
setSearching("loading");
|
|
2053
|
+
const response = KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await handleCompanyIndexSearch({
|
|
2031
2054
|
...data,
|
|
2032
2055
|
limit: data.limit ?? 15
|
|
2033
|
-
}) : await
|
|
2056
|
+
}) : await primarySourceSearch({
|
|
2034
2057
|
...data,
|
|
2035
2058
|
limit: data.limit ?? 15
|
|
2036
|
-
});
|
|
2037
|
-
setSearchResults(results);
|
|
2038
|
-
return results;
|
|
2059
|
+
}, handleCompanyIndexSearch, handleCompanyDeepSearch);
|
|
2060
|
+
setSearchResults(response == null ? void 0 : response.results);
|
|
2061
|
+
return response == null ? void 0 : response.results;
|
|
2039
2062
|
} catch (e) {
|
|
2040
|
-
|
|
2063
|
+
setSearching("error");
|
|
2041
2064
|
logger$E.error(e);
|
|
2042
2065
|
} finally {
|
|
2043
2066
|
setCachedSearch(data);
|
|
2044
|
-
|
|
2067
|
+
setSearching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
2045
2068
|
}
|
|
2046
2069
|
}, [handleCompanyDeepSearch, handleCompanyIndexSearch, searchResults, cachedSearch]);
|
|
2047
2070
|
const fetchBusinessData = useCallback(async (company) => {
|
|
@@ -2059,7 +2082,8 @@ function useBusinessData({
|
|
|
2059
2082
|
const date = (/* @__PURE__ */ new Date()).toDateString();
|
|
2060
2083
|
const isDataCompliant = company.lastUpdate ? Date.parse(date) - Date.parse(company.lastUpdate) < LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW : false;
|
|
2061
2084
|
try {
|
|
2062
|
-
|
|
2085
|
+
setFetching("loading");
|
|
2086
|
+
setVerifying("idle");
|
|
2063
2087
|
setInvalidTin(false);
|
|
2064
2088
|
const businessData = isDataCompliant ? await handleGetCompanyDataset({
|
|
2065
2089
|
companyId: company.id,
|
|
@@ -2071,11 +2095,11 @@ function useBusinessData({
|
|
|
2071
2095
|
setCachedBusiness(businessData);
|
|
2072
2096
|
return businessData;
|
|
2073
2097
|
} catch (e) {
|
|
2074
|
-
|
|
2098
|
+
setFetching("error");
|
|
2075
2099
|
setCachedBusiness(void 0);
|
|
2076
2100
|
logger$E.error(e);
|
|
2077
2101
|
} finally {
|
|
2078
|
-
|
|
2102
|
+
setFetching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
2079
2103
|
}
|
|
2080
2104
|
}, [cachedBusiness, handleGetCompanyDataset, handleRefreshCompanyDataset]);
|
|
2081
2105
|
const verifyBusinessData = useCallback(async (data, tin) => {
|
|
@@ -2084,7 +2108,7 @@ function useBusinessData({
|
|
|
2084
2108
|
return;
|
|
2085
2109
|
}
|
|
2086
2110
|
try {
|
|
2087
|
-
|
|
2111
|
+
setVerifying("loading");
|
|
2088
2112
|
setVerifiedBusiness(void 0);
|
|
2089
2113
|
setInvalidTin(false);
|
|
2090
2114
|
const {
|
|
@@ -2100,21 +2124,21 @@ function useBusinessData({
|
|
|
2100
2124
|
}
|
|
2101
2125
|
return matched;
|
|
2102
2126
|
} catch (e) {
|
|
2103
|
-
|
|
2127
|
+
setVerifying("error");
|
|
2104
2128
|
logger$E.error(e);
|
|
2105
2129
|
} finally {
|
|
2106
|
-
|
|
2130
|
+
setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
2107
2131
|
}
|
|
2108
2132
|
}, [handleVerifyTin]);
|
|
2109
2133
|
const clearTrustedBusinessData = useCallback(async () => {
|
|
2110
2134
|
try {
|
|
2111
|
-
|
|
2135
|
+
setResettingTrustedData("loading");
|
|
2112
2136
|
await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
|
|
2113
2137
|
} catch (e) {
|
|
2114
|
-
|
|
2138
|
+
setResettingTrustedData("error");
|
|
2115
2139
|
logger$E.error(e);
|
|
2116
2140
|
} finally {
|
|
2117
|
-
|
|
2141
|
+
setResettingTrustedData((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
2118
2142
|
}
|
|
2119
2143
|
}, [handleClearCompanyData]);
|
|
2120
2144
|
const resetBusinessData = () => {
|
|
@@ -2133,10 +2157,10 @@ function useBusinessData({
|
|
|
2133
2157
|
resetBusinessData,
|
|
2134
2158
|
resetTinVerification,
|
|
2135
2159
|
// Data
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2160
|
+
searching,
|
|
2161
|
+
fetching,
|
|
2162
|
+
verifying,
|
|
2163
|
+
resettingTrustedData,
|
|
2140
2164
|
currentSearchName: cachedSearch == null ? void 0 : cachedSearch.text,
|
|
2141
2165
|
searchResults,
|
|
2142
2166
|
verifiedBusiness,
|
|
@@ -2344,8 +2368,9 @@ const mergeFieldMetadataIntoProps = (fieldName, metadata, otherProps) => {
|
|
|
2344
2368
|
const MAX_LENGTH = 30;
|
|
2345
2369
|
const getMaxLengthByFieldAndCountry = (formattingRules, field, country, ignoreIfFormatterExists) => {
|
|
2346
2370
|
var _a, _b, _c, _d;
|
|
2371
|
+
if (!country) return void 0;
|
|
2347
2372
|
if ((_b = (_a = formattingRules[country]) == null ? void 0 : _a[field]) == null ? void 0 : _b.formatter) {
|
|
2348
|
-
return
|
|
2373
|
+
return void 0;
|
|
2349
2374
|
}
|
|
2350
2375
|
const maxLength = (_d = (_c = formattingRules[country]) == null ? void 0 : _c[field]) == null ? void 0 : _d.maxlength;
|
|
2351
2376
|
return maxLength || MAX_LENGTH;
|
|
@@ -2418,6 +2443,9 @@ const svgs = {
|
|
|
2418
2443
|
"document-cutoff": lazy(() => import("./document-cut-off-D2vCeeIS.js")),
|
|
2419
2444
|
"document-expired": lazy(() => import("./document-expired-_4Syh1xW.js")),
|
|
2420
2445
|
"document-front": lazy(() => import("./document-front-9Glzn7ZR.js")),
|
|
2446
|
+
"us-check": lazy(() => import("./us-check-o5Ax_0LS.js")),
|
|
2447
|
+
"us-check-routing-number": lazy(() => import("./us-check-routing-number-BtVf7GH3.js")),
|
|
2448
|
+
"us-check-account-number": lazy(() => import("./us-check-account-number-CHnzmLNd.js")),
|
|
2421
2449
|
"id-blurred": lazy(() => import("./id-blurred-A45CVnPk.js")),
|
|
2422
2450
|
"id-cutoff": lazy(() => import("./id-cut-off-DMoJYcGr.js")),
|
|
2423
2451
|
"id-front": lazy(() => import("./id-front-CTIDY7Nu.js")),
|
|
@@ -2504,6 +2532,7 @@ const Button = ({
|
|
|
2504
2532
|
role,
|
|
2505
2533
|
small,
|
|
2506
2534
|
block,
|
|
2535
|
+
critical,
|
|
2507
2536
|
shaded,
|
|
2508
2537
|
label = "",
|
|
2509
2538
|
icon,
|
|
@@ -2550,6 +2579,7 @@ const Button = ({
|
|
|
2550
2579
|
"adyen-kyc-button--secondary": secondary,
|
|
2551
2580
|
"adyen-kyc-button--tertiary": tertiary && !secondary,
|
|
2552
2581
|
"adyen-kyc-button--block": block,
|
|
2582
|
+
"adyen-kyc-button--critical": critical,
|
|
2553
2583
|
"adyen-kyc-button--small": small && label,
|
|
2554
2584
|
"adyen-kyc-button--shaded": shaded && icon && tertiary,
|
|
2555
2585
|
// disallow shaded effect if not just tertiary icon
|
|
@@ -3735,6 +3765,7 @@ const datasetIdentifier = {
|
|
|
3735
3765
|
function datasetUtilities(locale) {
|
|
3736
3766
|
return {
|
|
3737
3767
|
getCountryName: (countryCode) => {
|
|
3768
|
+
if (!countryCode) return null;
|
|
3738
3769
|
const datasetKey = createDatasetKey(datasetIdentifier.country, locale);
|
|
3739
3770
|
return getDataName(datasetKey, countryCode);
|
|
3740
3771
|
},
|
|
@@ -3926,15 +3957,31 @@ const Tag = ({
|
|
|
3926
3957
|
children
|
|
3927
3958
|
});
|
|
3928
3959
|
};
|
|
3929
|
-
const
|
|
3960
|
+
const adyenKycDropdown = "adyen-kyc-dropdown";
|
|
3961
|
+
const adyenKycDropdownButton = "adyen-kyc-dropdown-button";
|
|
3962
|
+
const adyenKycDropdownButtonActive = "adyen-kyc-dropdown-button--active";
|
|
3963
|
+
const adyenKycFilterInput = "adyen-kyc-filter-input";
|
|
3964
|
+
const adyenKycDropdownList = "adyen-kyc-dropdown-list";
|
|
3965
|
+
const adyenKycDropdownListTransformer = "adyen-kyc-dropdown-list__transformer";
|
|
3966
|
+
const adyenKycDropdownListActive = "adyen-kyc-dropdown-list--active";
|
|
3967
|
+
const adyenKycDropdownElement = "adyen-kyc-dropdown-element";
|
|
3968
|
+
const styles$6 = {
|
|
3930
3969
|
"adyen-kyc-dropdown": "adyen-kyc-dropdown",
|
|
3970
|
+
adyenKycDropdown,
|
|
3931
3971
|
"adyen-kyc-dropdown-button": "adyen-kyc-dropdown-button",
|
|
3972
|
+
adyenKycDropdownButton,
|
|
3932
3973
|
"adyen-kyc-dropdown-button--active": "adyen-kyc-dropdown-button--active",
|
|
3974
|
+
adyenKycDropdownButtonActive,
|
|
3933
3975
|
"adyen-kyc-filter-input": "adyen-kyc-filter-input",
|
|
3976
|
+
adyenKycFilterInput,
|
|
3934
3977
|
"adyen-kyc-dropdown-list": "adyen-kyc-dropdown-list",
|
|
3978
|
+
adyenKycDropdownList,
|
|
3935
3979
|
"adyen-kyc-dropdown-list__transformer": "adyen-kyc-dropdown-list__transformer",
|
|
3980
|
+
adyenKycDropdownListTransformer,
|
|
3936
3981
|
"adyen-kyc-dropdown-list--active": "adyen-kyc-dropdown-list--active",
|
|
3937
|
-
|
|
3982
|
+
adyenKycDropdownListActive,
|
|
3983
|
+
"adyen-kyc-dropdown-element": "adyen-kyc-dropdown-element",
|
|
3984
|
+
adyenKycDropdownElement
|
|
3938
3985
|
};
|
|
3939
3986
|
function SelectButtonElement({
|
|
3940
3987
|
filterable,
|
|
@@ -3983,10 +4030,10 @@ function SelectButton({
|
|
|
3983
4030
|
"aria-haspopup": "listbox",
|
|
3984
4031
|
className: cx({
|
|
3985
4032
|
"adyen-kyc-dropdown-button": true,
|
|
3986
|
-
[styles$
|
|
4033
|
+
[styles$6["adyen-kyc-dropdown-button"]]: true,
|
|
3987
4034
|
"adyen-kyc-dropdown-button--readonly": readonly,
|
|
3988
4035
|
"adyen-kyc-dropdown-button--active": showList,
|
|
3989
|
-
[styles$
|
|
4036
|
+
[styles$6["adyen-kyc-dropdown-button--active"]]: showList,
|
|
3990
4037
|
"adyen-kyc-dropdown-button--invalid": isInvalid,
|
|
3991
4038
|
"adyen-kyc-dropdown-field--valid": isValid,
|
|
3992
4039
|
"adyen-kyc-dropdown-button-search": isSearch
|
|
@@ -4056,7 +4103,7 @@ const SelectButtonContentSingle = ({
|
|
|
4056
4103
|
"aria-expanded": showList,
|
|
4057
4104
|
"aria-owns": selectListId,
|
|
4058
4105
|
autoComplete: "off",
|
|
4059
|
-
className: cx("adyen-kyc-filter-input", [styles$
|
|
4106
|
+
className: cx("adyen-kyc-filter-input", [styles$6["adyen-kyc-filter-input"]]),
|
|
4060
4107
|
onInput,
|
|
4061
4108
|
placeholder,
|
|
4062
4109
|
ref: filterInputRef,
|
|
@@ -4144,7 +4191,7 @@ const SelectListItem = ({
|
|
|
4144
4191
|
}) => jsx("li", {
|
|
4145
4192
|
"aria-disabled": !!item.disabled,
|
|
4146
4193
|
"aria-selected": selected,
|
|
4147
|
-
className: cx(["adyen-kyc-dropdown-element", styles$
|
|
4194
|
+
className: cx(["adyen-kyc-dropdown-element", styles$6["adyen-kyc-dropdown-element"], {
|
|
4148
4195
|
"adyen-kyc-dropdown-element--active": selected,
|
|
4149
4196
|
"adyen-kyc-dropdown-element--disabled": !!item.disabled,
|
|
4150
4197
|
"adyen-kyc-dropdown-multi-element": isMulti,
|
|
@@ -4275,9 +4322,9 @@ function SelectList({
|
|
|
4275
4322
|
test: true,
|
|
4276
4323
|
"adyen-kyc-dropdown-list--above": showAbove,
|
|
4277
4324
|
"adyen-kyc-dropdown-list": true,
|
|
4278
|
-
[styles$
|
|
4325
|
+
[styles$6["adyen-kyc-dropdown-list"]]: true,
|
|
4279
4326
|
"adyen-kyc-dropdown-list--active": showList,
|
|
4280
|
-
[styles$
|
|
4327
|
+
[styles$6["adyen-kyc-dropdown-list--active"]]: showList
|
|
4281
4328
|
}),
|
|
4282
4329
|
id: props.selectListId,
|
|
4283
4330
|
role: "listbox",
|
|
@@ -4480,7 +4527,7 @@ const Select = ({
|
|
|
4480
4527
|
};
|
|
4481
4528
|
}, []);
|
|
4482
4529
|
return jsxs("div", {
|
|
4483
|
-
className: cx(["adyen-kyc-dropdown", styles$
|
|
4530
|
+
className: cx(["adyen-kyc-dropdown", styles$6["adyen-kyc-dropdown"], className, ...classNameModifiers.map((m) => `adyen-kyc-dropdown--${m}`)]),
|
|
4484
4531
|
ref: selectContainerRef,
|
|
4485
4532
|
onClick: (e) => {
|
|
4486
4533
|
e.stopPropagation();
|
|
@@ -5514,7 +5561,7 @@ const businessRegistrationNumberMasks = {
|
|
|
5514
5561
|
},
|
|
5515
5562
|
[CountryCodes.Cyprus]: {
|
|
5516
5563
|
default: {
|
|
5517
|
-
mask: makeMask(...
|
|
5564
|
+
mask: makeMask(...customInputs(1, /^[COP]$/), ...numericInputs(1), ...numericInputs(7, true)),
|
|
5518
5565
|
transformOnType: uppercase
|
|
5519
5566
|
}
|
|
5520
5567
|
},
|
|
@@ -6355,7 +6402,7 @@ const businessRegistrationNumberPatterns = {
|
|
|
6355
6402
|
soleProprietorship: /^\d{8}$/
|
|
6356
6403
|
},
|
|
6357
6404
|
[CountryCodes.Cyprus]: {
|
|
6358
|
-
default: /^[
|
|
6405
|
+
default: /^[COP]{1}\d{1,8}$/
|
|
6359
6406
|
},
|
|
6360
6407
|
[CountryCodes.CzechRepublic]: {
|
|
6361
6408
|
default: /^\d{8,10}$/
|
|
@@ -6702,13 +6749,11 @@ const defaultFieldConfig$9 = {
|
|
|
6702
6749
|
mask: businessRegistrationNumberMasks[CountryCodes.Cyprus].default,
|
|
6703
6750
|
validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.Cyprus].default),
|
|
6704
6751
|
guidanceText: {
|
|
6705
|
-
key: "
|
|
6752
|
+
key: "enterEnglishLetterFollowedByXtoYDigitsForExample",
|
|
6706
6753
|
values: {
|
|
6707
|
-
minLetters: "1",
|
|
6708
|
-
maxLetters: "2",
|
|
6709
6754
|
minDigits: "1",
|
|
6710
6755
|
maxDigits: "8",
|
|
6711
|
-
example: "
|
|
6756
|
+
example: "C12345678"
|
|
6712
6757
|
}
|
|
6713
6758
|
}
|
|
6714
6759
|
},
|
|
@@ -6904,18 +6949,16 @@ const defaultFieldConfig$9 = {
|
|
|
6904
6949
|
case "partitaIVA":
|
|
6905
6950
|
default:
|
|
6906
6951
|
return {
|
|
6907
|
-
label: "
|
|
6952
|
+
label: "codiceFiscalePartitaIVA",
|
|
6908
6953
|
validators: validatePatternOnBlur(/^\d{11}$/),
|
|
6909
6954
|
mask: {
|
|
6910
|
-
mask: makeMask(...
|
|
6911
|
-
includeInValue: false
|
|
6912
|
-
}), spacer, ...numericInputs(11))
|
|
6955
|
+
mask: makeMask(spacer, ...numericInputs(11))
|
|
6913
6956
|
},
|
|
6914
6957
|
guidanceText: {
|
|
6915
6958
|
key: "enterTheRemainingNDigitsForExample",
|
|
6916
6959
|
values: {
|
|
6917
6960
|
numDigits: "11",
|
|
6918
|
-
example: "
|
|
6961
|
+
example: "47040001100"
|
|
6919
6962
|
}
|
|
6920
6963
|
}
|
|
6921
6964
|
};
|
|
@@ -7410,6 +7453,7 @@ const MaskedInputText = ({
|
|
|
7410
7453
|
value,
|
|
7411
7454
|
onInput,
|
|
7412
7455
|
onBlur,
|
|
7456
|
+
onFocus,
|
|
7413
7457
|
onMismatch: onMismatchExternal,
|
|
7414
7458
|
isValid: validationIsValid,
|
|
7415
7459
|
errorMessage,
|
|
@@ -7577,6 +7621,7 @@ Falling back to partially valid value "${fallback}"`);
|
|
|
7577
7621
|
}
|
|
7578
7622
|
},
|
|
7579
7623
|
onFocusHandler: (event) => {
|
|
7624
|
+
onFocus == null ? void 0 : onFocus();
|
|
7580
7625
|
fieldOnFocus(event);
|
|
7581
7626
|
setIsFocused(true);
|
|
7582
7627
|
},
|
|
@@ -7671,7 +7716,7 @@ const companyRegistrationNumberOptions = {
|
|
|
7671
7716
|
}],
|
|
7672
7717
|
[CountryCodes.Italy]: [{
|
|
7673
7718
|
id: "partitaIVA",
|
|
7674
|
-
name: "
|
|
7719
|
+
name: "codiceFiscalePartitaIVA"
|
|
7675
7720
|
}, {
|
|
7676
7721
|
id: "CCIAA",
|
|
7677
7722
|
name: "CCIAA"
|
|
@@ -11903,7 +11948,7 @@ const LABELS = {
|
|
|
11903
11948
|
}
|
|
11904
11949
|
};
|
|
11905
11950
|
const getKeyForField = (fieldName, country) => country ? LABELS[fieldName][country] || LABELS[fieldName].default : LABELS[fieldName].default;
|
|
11906
|
-
const getAddressSchemaForCountry = (country) => ADDRESS_SCHEMAS[country]
|
|
11951
|
+
const getAddressSchemaForCountry = (country) => country && ADDRESS_SCHEMAS[country] ? ADDRESS_SCHEMAS[country] : ADDRESS_SCHEMAS.default;
|
|
11907
11952
|
const getAddressSchemaLabelsByCountry = (country) => {
|
|
11908
11953
|
const schema = getAddressSchemaForCountry(country);
|
|
11909
11954
|
return schema.reduce((labels2, field) => ({
|
|
@@ -12739,11 +12784,10 @@ function Address(props) {
|
|
|
12739
12784
|
const stateRef = useRef({
|
|
12740
12785
|
setState: null
|
|
12741
12786
|
});
|
|
12742
|
-
const addressFields = ADDRESS_SCHEMAS[dataProp == null ? void 0 : dataProp.country] ?? ADDRESS_SCHEMAS.default;
|
|
12743
12787
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
12744
|
-
const requiredFields = (requiredFieldsProp == null ? void 0 : requiredFieldsProp.includes("stateOrProvince")) || dataProp.country && COUNTRIES_WITH_STATES_DATASET.includes(dataProp.country) ?
|
|
12745
|
-
const rules2 = useMemo(() => addressValidationRules(dataProp.country), [dataProp.country]);
|
|
12746
|
-
const rulesV4 = useMemo(() => addressValidationRulesV4(dataProp.country, i18n), [dataProp.country, i18n]);
|
|
12788
|
+
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");
|
|
12789
|
+
const rules2 = useMemo(() => (dataProp == null ? void 0 : dataProp.country) ? addressValidationRules(dataProp == null ? void 0 : dataProp.country) : {}, [dataProp == null ? void 0 : dataProp.country]);
|
|
12790
|
+
const rulesV4 = useMemo(() => (dataProp == null ? void 0 : dataProp.country) ? addressValidationRulesV4(dataProp == null ? void 0 : dataProp.country, i18n) : {}, [dataProp == null ? void 0 : dataProp.country, i18n]);
|
|
12747
12791
|
const {
|
|
12748
12792
|
data,
|
|
12749
12793
|
errors,
|
|
@@ -12771,7 +12815,7 @@ function Address(props) {
|
|
|
12771
12815
|
optionalFields: optionalFieldsProp
|
|
12772
12816
|
}, i18n);
|
|
12773
12817
|
useEffect(() => {
|
|
12774
|
-
if (dataProp.country !== data.country && dataProp.country) {
|
|
12818
|
+
if ((dataProp == null ? void 0 : dataProp.country) !== data.country && (dataProp == null ? void 0 : dataProp.country)) {
|
|
12775
12819
|
requiredFields.forEach((field) => {
|
|
12776
12820
|
handleChangeFor(field, "input")("");
|
|
12777
12821
|
});
|
|
@@ -12779,7 +12823,7 @@ function Address(props) {
|
|
|
12779
12823
|
setShowAutocompletedAddressFields(false);
|
|
12780
12824
|
setShowAddAddressButton(true);
|
|
12781
12825
|
}
|
|
12782
|
-
}, [dataProp.country]);
|
|
12826
|
+
}, [dataProp == null ? void 0 : dataProp.country]);
|
|
12783
12827
|
useEffect(() => {
|
|
12784
12828
|
if (handleAddressSearch && handleFindAddress) {
|
|
12785
12829
|
setIsHandlerPresent(true);
|
|
@@ -12790,12 +12834,13 @@ function Address(props) {
|
|
|
12790
12834
|
}
|
|
12791
12835
|
}, []);
|
|
12792
12836
|
useEffect(() => {
|
|
12837
|
+
var _a, _b;
|
|
12793
12838
|
const processedData = ADDRESS_SCHEMA.reduce((acc, cur) => {
|
|
12794
12839
|
if (!formUtils.isRequiredField(cur)) {
|
|
12795
12840
|
delete acc[cur];
|
|
12796
12841
|
return acc;
|
|
12797
12842
|
}
|
|
12798
|
-
const fallbackValue = !formUtils.isRequiredField(cur) && !data[cur] && dataProp[cur] ? dataProp[cur] : "N/A";
|
|
12843
|
+
const fallbackValue = !formUtils.isRequiredField(cur) && !data[cur] && (dataProp == null ? void 0 : dataProp[cur]) ? dataProp[cur] : "N/A";
|
|
12799
12844
|
return {
|
|
12800
12845
|
...acc,
|
|
12801
12846
|
[cur]: formUtils.isRequiredField(cur) || !!data[cur] ? data[cur] : fallbackValue
|
|
@@ -12830,7 +12875,7 @@ function Address(props) {
|
|
|
12830
12875
|
},
|
|
12831
12876
|
isValid
|
|
12832
12877
|
});
|
|
12833
|
-
stateRef.current.setState({
|
|
12878
|
+
(_b = (_a = stateRef.current).setState) == null ? void 0 : _b.call(_a, {
|
|
12834
12879
|
type: "addToState",
|
|
12835
12880
|
value: {
|
|
12836
12881
|
...addressState,
|
|
@@ -12890,8 +12935,8 @@ function Address(props) {
|
|
|
12890
12935
|
}) => {
|
|
12891
12936
|
const hasHouseNumber = !!houseNumberOrName;
|
|
12892
12937
|
if (hasHouseNumber) {
|
|
12893
|
-
const isHouseNumberFirst = COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country);
|
|
12894
|
-
const needsComma = COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country);
|
|
12938
|
+
const isHouseNumberFirst = data.country ? COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country) : false;
|
|
12939
|
+
const needsComma = data.country ? COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country) : false;
|
|
12895
12940
|
const formattedAddress = isHouseNumberFirst ? `${houseNumberOrName}${needsComma ? ", " : " "}${street}` : `${street}${needsComma ? ", " : " "}${houseNumberOrName}`;
|
|
12896
12941
|
return handleChangeFor("address", "input")(formattedAddress);
|
|
12897
12942
|
}
|
|
@@ -12933,7 +12978,7 @@ function Address(props) {
|
|
|
12933
12978
|
className: "adyen-kyc-search-address",
|
|
12934
12979
|
children: [jsx(SearchAddress, {
|
|
12935
12980
|
handleChangeFor,
|
|
12936
|
-
data: dataProp,
|
|
12981
|
+
data: dataProp ?? {},
|
|
12937
12982
|
handleAddressSearch,
|
|
12938
12983
|
handleFindAddress,
|
|
12939
12984
|
legalEntityId,
|
|
@@ -12947,7 +12992,7 @@ function Address(props) {
|
|
|
12947
12992
|
className: "adyen-kyc-search-address--below-location",
|
|
12948
12993
|
children: [jsx(Icon, {
|
|
12949
12994
|
name: "location"
|
|
12950
|
-
}), datasetUtils.getCountryName(dataProp.country)]
|
|
12995
|
+
}), datasetUtils.getCountryName(dataProp == null ? void 0 : dataProp.country)]
|
|
12951
12996
|
}), showAddAddressButton && jsx(Button, {
|
|
12952
12997
|
showAsLink: true,
|
|
12953
12998
|
testId: "addAddressManuallyBtn",
|
|
@@ -14940,21 +14985,49 @@ const useIdVerificationToken = ({
|
|
|
14940
14985
|
loadingStatus
|
|
14941
14986
|
};
|
|
14942
14987
|
};
|
|
14943
|
-
const
|
|
14988
|
+
const adyenKycLoadingInputForm = "adyen-kyc-loading-input__form";
|
|
14989
|
+
const adyenKycLoadingInputFormLoadingOpacity0 = "adyen-kyc-loading-input__form--loading-opacity0";
|
|
14990
|
+
const adyenKycLoadingInputFormLoadingOpacity01 = "adyen-kyc-loading-input__form--loading-opacity0-1";
|
|
14991
|
+
const adyenKycLoadingInputFormLoadingOpacity02 = "adyen-kyc-loading-input__form--loading-opacity0-2";
|
|
14992
|
+
const adyenKycLoadingInputFormLoadingOpacity03 = "adyen-kyc-loading-input__form--loading-opacity0-3";
|
|
14993
|
+
const adyenKycLoadingInputFormLoadingOpacity04 = "adyen-kyc-loading-input__form--loading-opacity0-4";
|
|
14994
|
+
const adyenKycLoadingInputFormLoadingOpacity05 = "adyen-kyc-loading-input__form--loading-opacity0-5";
|
|
14995
|
+
const adyenKycLoadingInputFormLoadingOpacity06 = "adyen-kyc-loading-input__form--loading-opacity0-6";
|
|
14996
|
+
const adyenKycLoadingInputFormLoadingOpacity07 = "adyen-kyc-loading-input__form--loading-opacity0-7";
|
|
14997
|
+
const adyenKycLoadingInputFormLoadingOpacity08 = "adyen-kyc-loading-input__form--loading-opacity0-8";
|
|
14998
|
+
const adyenKycLoadingInputFormLoadingOpacity09 = "adyen-kyc-loading-input__form--loading-opacity0-9";
|
|
14999
|
+
const adyenKycLoadingInputFormLoadingOpacity1 = "adyen-kyc-loading-input__form--loading-opacity1";
|
|
15000
|
+
const adyenKycLoadingInputLoader = "adyen-kyc-loading-input__loader";
|
|
15001
|
+
const adyenKycLoadingInputLoaderActive = "adyen-kyc-loading-input__loader--active";
|
|
15002
|
+
const styles$5 = {
|
|
14944
15003
|
"adyen-kyc-loading-input__form": "adyen-kyc-loading-input__form",
|
|
15004
|
+
adyenKycLoadingInputForm,
|
|
14945
15005
|
"adyen-kyc-loading-input__form--loading-opacity0": "adyen-kyc-loading-input__form--loading-opacity0",
|
|
15006
|
+
adyenKycLoadingInputFormLoadingOpacity0,
|
|
14946
15007
|
"adyen-kyc-loading-input__form--loading-opacity0-1": "adyen-kyc-loading-input__form--loading-opacity0-1",
|
|
15008
|
+
adyenKycLoadingInputFormLoadingOpacity01,
|
|
14947
15009
|
"adyen-kyc-loading-input__form--loading-opacity0-2": "adyen-kyc-loading-input__form--loading-opacity0-2",
|
|
15010
|
+
adyenKycLoadingInputFormLoadingOpacity02,
|
|
14948
15011
|
"adyen-kyc-loading-input__form--loading-opacity0-3": "adyen-kyc-loading-input__form--loading-opacity0-3",
|
|
15012
|
+
adyenKycLoadingInputFormLoadingOpacity03,
|
|
14949
15013
|
"adyen-kyc-loading-input__form--loading-opacity0-4": "adyen-kyc-loading-input__form--loading-opacity0-4",
|
|
15014
|
+
adyenKycLoadingInputFormLoadingOpacity04,
|
|
14950
15015
|
"adyen-kyc-loading-input__form--loading-opacity0-5": "adyen-kyc-loading-input__form--loading-opacity0-5",
|
|
15016
|
+
adyenKycLoadingInputFormLoadingOpacity05,
|
|
14951
15017
|
"adyen-kyc-loading-input__form--loading-opacity0-6": "adyen-kyc-loading-input__form--loading-opacity0-6",
|
|
15018
|
+
adyenKycLoadingInputFormLoadingOpacity06,
|
|
14952
15019
|
"adyen-kyc-loading-input__form--loading-opacity0-7": "adyen-kyc-loading-input__form--loading-opacity0-7",
|
|
15020
|
+
adyenKycLoadingInputFormLoadingOpacity07,
|
|
14953
15021
|
"adyen-kyc-loading-input__form--loading-opacity0-8": "adyen-kyc-loading-input__form--loading-opacity0-8",
|
|
15022
|
+
adyenKycLoadingInputFormLoadingOpacity08,
|
|
14954
15023
|
"adyen-kyc-loading-input__form--loading-opacity0-9": "adyen-kyc-loading-input__form--loading-opacity0-9",
|
|
15024
|
+
adyenKycLoadingInputFormLoadingOpacity09,
|
|
14955
15025
|
"adyen-kyc-loading-input__form--loading-opacity1": "adyen-kyc-loading-input__form--loading-opacity1",
|
|
15026
|
+
adyenKycLoadingInputFormLoadingOpacity1,
|
|
14956
15027
|
"adyen-kyc-loading-input__loader": "adyen-kyc-loading-input__loader",
|
|
14957
|
-
|
|
15028
|
+
adyenKycLoadingInputLoader,
|
|
15029
|
+
"adyen-kyc-loading-input__loader--active": "adyen-kyc-loading-input__loader--active",
|
|
15030
|
+
adyenKycLoadingInputLoaderActive
|
|
14958
15031
|
};
|
|
14959
15032
|
const LoaderWrapper = ({
|
|
14960
15033
|
children,
|
|
@@ -14968,12 +15041,12 @@ const LoaderWrapper = ({
|
|
|
14968
15041
|
const digit = formOpacityStrArr[0];
|
|
14969
15042
|
const decimal = formOpacityStrArr[1];
|
|
14970
15043
|
const opacity = decimal ? `${digit}-${decimal}` : `${digit}`;
|
|
14971
|
-
const wrapperClass = cx("adyen-kyc-loading-input__form", styles$
|
|
14972
|
-
[styles$
|
|
15044
|
+
const wrapperClass = cx("adyen-kyc-loading-input__form", styles$5["adyen-kyc-loading-input__form"], {
|
|
15045
|
+
[styles$5[`adyen-kyc-loading-input__form--loading-opacity${opacity}`]]: status === "loading"
|
|
14973
15046
|
});
|
|
14974
15047
|
const loaderWrapperClass = cx({
|
|
14975
|
-
[styles$
|
|
14976
|
-
[styles$
|
|
15048
|
+
[styles$5["adyen-kyc-loading-input__loader"]]: true,
|
|
15049
|
+
[styles$5["adyen-kyc-loading-input__loader--active"]]: status === "loading" && showSpinner
|
|
14977
15050
|
});
|
|
14978
15051
|
const overlayClass = cx("adyen-kyc-loading-input", className);
|
|
14979
15052
|
return jsxs("div", {
|
|
@@ -16483,11 +16556,19 @@ const handleKeys = (keys, callback, propagationMode = "stopIfMatches") => (event
|
|
|
16483
16556
|
callback();
|
|
16484
16557
|
}
|
|
16485
16558
|
};
|
|
16486
|
-
const
|
|
16559
|
+
const adyenKycMultiSelectList = "adyen-kyc-multi-select-list";
|
|
16560
|
+
const adyenKycMultiSelectListItem = "adyen-kyc-multi-select-list-item";
|
|
16561
|
+
const adyenKycMultiSelectListItemWithDescription = "adyen-kyc-multi-select-list-item--with-description";
|
|
16562
|
+
const adyenKycCheckboxLabel = "adyen-kyc-checkbox__label";
|
|
16563
|
+
const styles$4 = {
|
|
16487
16564
|
"adyen-kyc-multi-select-list": "adyen-kyc-multi-select-list",
|
|
16565
|
+
adyenKycMultiSelectList,
|
|
16488
16566
|
"adyen-kyc-multi-select-list-item": "adyen-kyc-multi-select-list-item",
|
|
16567
|
+
adyenKycMultiSelectListItem,
|
|
16489
16568
|
"adyen-kyc-multi-select-list-item--with-description": "adyen-kyc-multi-select-list-item--with-description",
|
|
16490
|
-
|
|
16569
|
+
adyenKycMultiSelectListItemWithDescription,
|
|
16570
|
+
"adyen-kyc-checkbox__label": "adyen-kyc-checkbox__label",
|
|
16571
|
+
adyenKycCheckboxLabel
|
|
16491
16572
|
};
|
|
16492
16573
|
const MultiSelectList = ({
|
|
16493
16574
|
options,
|
|
@@ -16495,7 +16576,7 @@ const MultiSelectList = ({
|
|
|
16495
16576
|
onSelect,
|
|
16496
16577
|
mapToSelectItem
|
|
16497
16578
|
}) => jsx("ul", {
|
|
16498
|
-
className: styles$
|
|
16579
|
+
className: styles$4["adyen-kyc-multi-select-list"],
|
|
16499
16580
|
children: options.map((option) => {
|
|
16500
16581
|
const item = mapToSelectItem(option);
|
|
16501
16582
|
const isSelected = selected.includes(option);
|
|
@@ -16509,8 +16590,8 @@ const MultiSelectList = ({
|
|
|
16509
16590
|
onKeyDown: handleKeys(["Enter", " "], handleSelect),
|
|
16510
16591
|
onSelect: handleSelect,
|
|
16511
16592
|
isMulti: true,
|
|
16512
|
-
className: cx([styles$
|
|
16513
|
-
[styles$
|
|
16593
|
+
className: cx([styles$4["adyen-kyc-multi-select-list-item"], {
|
|
16594
|
+
[styles$4["adyen-kyc-multi-select-list-item--with-description"]]: !!item.description
|
|
16514
16595
|
}])
|
|
16515
16596
|
}, item.id);
|
|
16516
16597
|
})
|
|
@@ -16531,7 +16612,7 @@ const DecisionMakerRoleComponent = (props) => {
|
|
|
16531
16612
|
fieldValidationErrors,
|
|
16532
16613
|
requiredFields,
|
|
16533
16614
|
allowedRoles,
|
|
16534
|
-
trustedRoles
|
|
16615
|
+
trustedRoles = []
|
|
16535
16616
|
} = props;
|
|
16536
16617
|
const {
|
|
16537
16618
|
i18n
|
|
@@ -16589,7 +16670,7 @@ const DecisionMakerRoleComponent = (props) => {
|
|
|
16589
16670
|
onSelect: changeRoles,
|
|
16590
16671
|
mapToSelectItem: (role) => ({
|
|
16591
16672
|
...makeSelectItemForRole(role, i18n),
|
|
16592
|
-
disabled: allowedRoles
|
|
16673
|
+
disabled: allowedRoles && !allowedRoles.includes(role) || trustedRoles.includes(role)
|
|
16593
16674
|
})
|
|
16594
16675
|
})
|
|
16595
16676
|
})]
|
|
@@ -19449,7 +19530,8 @@ function InstantBankVerification({
|
|
|
19449
19530
|
case "GENERIC_ERROR":
|
|
19450
19531
|
errorTitle = i18n.get("ranIntoTechnicalError");
|
|
19451
19532
|
break;
|
|
19452
|
-
case "UNKNOWN_ERROR":
|
|
19533
|
+
case "UNKNOWN_ERROR":
|
|
19534
|
+
default: {
|
|
19453
19535
|
errorTitle = i18n.get("couldNotCompleteAccountCheck");
|
|
19454
19536
|
break;
|
|
19455
19537
|
}
|
|
@@ -19608,12 +19690,6 @@ function BankVerification(props) {
|
|
|
19608
19690
|
});
|
|
19609
19691
|
}
|
|
19610
19692
|
const BankVerification$1 = memo(BankVerification);
|
|
19611
|
-
const CoreContext = createContext(void 0);
|
|
19612
|
-
const useCoreContext = () => {
|
|
19613
|
-
const context = useContext(CoreContext);
|
|
19614
|
-
if (!context) throw Error("You need a <CoreProvider> to use core context");
|
|
19615
|
-
return context;
|
|
19616
|
-
};
|
|
19617
19693
|
const countriesWithMultipleCurrencies = /* @__PURE__ */ new Set([CountryCodes.Bulgaria, CountryCodes.Canada, CountryCodes.Croatia, CountryCodes.CzechRepublic, CountryCodes.Hungary, CountryCodes.Romania, CountryCodes.Switzerland]);
|
|
19618
19694
|
const countriesWithLocalFormat = /* @__PURE__ */ new Set([CountryCodes.Denmark, CountryCodes.Norway, CountryCodes.Poland, CountryCodes.Sweden, CountryCodes.UnitedKingdom]);
|
|
19619
19695
|
const payoutCurrencySupport = {
|
|
@@ -19626,6 +19702,7 @@ const payoutCurrencySupport = {
|
|
|
19626
19702
|
iban: [Currencies.CAD, Currencies.USD]
|
|
19627
19703
|
}
|
|
19628
19704
|
};
|
|
19705
|
+
const shouldShowCheckGuidance = (country) => country === "US";
|
|
19629
19706
|
const shouldShowPayoutAccountFormatSelector = (country) => countriesWithLocalFormat.has(country);
|
|
19630
19707
|
const shouldShowPayoutAlert = (country) => shouldShowPayoutAccountFormatSelector(country) || countriesWithMultipleCurrencies.has(country);
|
|
19631
19708
|
const getSupportedCurrencyGuidance = (i18n, country, requiredFields) => {
|
|
@@ -19777,7 +19854,9 @@ function BankAccountNumber(props) {
|
|
|
19777
19854
|
} = useI18nContext();
|
|
19778
19855
|
const {
|
|
19779
19856
|
country,
|
|
19780
|
-
fieldConfig = defaultFieldConfig$4
|
|
19857
|
+
fieldConfig = defaultFieldConfig$4,
|
|
19858
|
+
onFocus,
|
|
19859
|
+
onBlur
|
|
19781
19860
|
} = props;
|
|
19782
19861
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$4);
|
|
19783
19862
|
const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata, props);
|
|
@@ -19795,6 +19874,10 @@ function BankAccountNumber(props) {
|
|
|
19795
19874
|
fieldProblems: mergedProps == null ? void 0 : mergedProps.fieldValidationErrors,
|
|
19796
19875
|
obscuredFields: mergedProps.obscuredFields
|
|
19797
19876
|
});
|
|
19877
|
+
const handleBlur = () => {
|
|
19878
|
+
onBlur == null ? void 0 : onBlur();
|
|
19879
|
+
handleChangeFor("bankAccountNumber", "blur");
|
|
19880
|
+
};
|
|
19798
19881
|
const {
|
|
19799
19882
|
updateStateSlice
|
|
19800
19883
|
} = useGlobalDataSlice("payoutAccountDetails", "bankAccountNumber");
|
|
@@ -19821,8 +19904,9 @@ function BankAccountNumber(props) {
|
|
|
19821
19904
|
field: ["bankAccountNumber"],
|
|
19822
19905
|
input: ["bankAccountNumber"]
|
|
19823
19906
|
},
|
|
19824
|
-
onBlur:
|
|
19907
|
+
onBlur: handleBlur,
|
|
19825
19908
|
onInput: handleChangeFor("bankAccountNumber", "input"),
|
|
19909
|
+
onFocus,
|
|
19826
19910
|
readonly: formUtils.isReadOnly("bankAccountNumber"),
|
|
19827
19911
|
value: data.bankAccountNumber ?? "",
|
|
19828
19912
|
acceptObscuredValue: formUtils.isObscured("bankAccountNumber")
|
|
@@ -20093,7 +20177,7 @@ const defaultFieldConfig$2 = {
|
|
|
20093
20177
|
}
|
|
20094
20178
|
},
|
|
20095
20179
|
[CountryCodes.UnitedStates]: {
|
|
20096
|
-
label: "
|
|
20180
|
+
label: "routingNumber",
|
|
20097
20181
|
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
20098
20182
|
mask: {
|
|
20099
20183
|
mask: makeMask(...numericInputs(9))
|
|
@@ -20136,7 +20220,9 @@ function BranchCode(props) {
|
|
|
20136
20220
|
} = useI18nContext();
|
|
20137
20221
|
const {
|
|
20138
20222
|
country,
|
|
20139
|
-
fieldConfig = defaultFieldConfig$2
|
|
20223
|
+
fieldConfig = defaultFieldConfig$2,
|
|
20224
|
+
onFocus,
|
|
20225
|
+
onBlur
|
|
20140
20226
|
} = props;
|
|
20141
20227
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$2);
|
|
20142
20228
|
const mergedProps = mergeFieldMetadataIntoProps("branchCode", metadata, props);
|
|
@@ -20156,6 +20242,10 @@ function BranchCode(props) {
|
|
|
20156
20242
|
const {
|
|
20157
20243
|
updateStateSlice
|
|
20158
20244
|
} = useGlobalDataSlice("payoutAccountDetails", "branchCode");
|
|
20245
|
+
const handleBlur = () => {
|
|
20246
|
+
onBlur == null ? void 0 : onBlur();
|
|
20247
|
+
handleChangeFor("branchCode", "blur");
|
|
20248
|
+
};
|
|
20159
20249
|
useEffect(() => {
|
|
20160
20250
|
updateStateSlice({
|
|
20161
20251
|
data,
|
|
@@ -20179,7 +20269,8 @@ function BranchCode(props) {
|
|
|
20179
20269
|
value: data.branchCode ?? "",
|
|
20180
20270
|
readonly: formUtils.isReadOnly("branchCode"),
|
|
20181
20271
|
onInput: handleChangeFor("branchCode", "input"),
|
|
20182
|
-
onBlur:
|
|
20272
|
+
onBlur: handleBlur,
|
|
20273
|
+
onFocus,
|
|
20183
20274
|
"aria-required": true,
|
|
20184
20275
|
"aria-label": formUtils.getLabel("branchCode"),
|
|
20185
20276
|
"aria-invalid": !valid.branchCode
|
|
@@ -20517,6 +20608,48 @@ function SwiftCode(props) {
|
|
|
20517
20608
|
"aria-invalid": !valid.swiftCode
|
|
20518
20609
|
});
|
|
20519
20610
|
}
|
|
20611
|
+
const adyenKycCheckGuidance = "adyen-kyc-check-guidance";
|
|
20612
|
+
const adyenKycCheckGuidanceImage = "adyen-kyc-check-guidance__image";
|
|
20613
|
+
const adyenKycCheckGuidanceImageAnnotated = "adyen-kyc-check-guidance__image--annotated";
|
|
20614
|
+
const adyenKycCheckGuidanceImageInactive = "adyen-kyc-check-guidance__image--inactive";
|
|
20615
|
+
const adyenKycUsCheckAccountNumber = "adyen-kyc-us-check-account-number";
|
|
20616
|
+
const adyenKycUsCheckRoutingNumber = "adyen-kyc-us-check-routing-number";
|
|
20617
|
+
const styles$3 = {
|
|
20618
|
+
"adyen-kyc-check-guidance": "adyen-kyc-check-guidance",
|
|
20619
|
+
adyenKycCheckGuidance,
|
|
20620
|
+
"adyen-kyc-check-guidance__image": "adyen-kyc-check-guidance__image",
|
|
20621
|
+
adyenKycCheckGuidanceImage,
|
|
20622
|
+
"adyen-kyc-check-guidance__image--annotated": "adyen-kyc-check-guidance__image--annotated",
|
|
20623
|
+
adyenKycCheckGuidanceImageAnnotated,
|
|
20624
|
+
"adyen-kyc-check-guidance__image--inactive": "adyen-kyc-check-guidance__image--inactive",
|
|
20625
|
+
adyenKycCheckGuidanceImageInactive,
|
|
20626
|
+
"adyen-kyc-us-check-account-number": "adyen-kyc-us-check-account-number",
|
|
20627
|
+
adyenKycUsCheckAccountNumber,
|
|
20628
|
+
"adyen-kyc-us-check-routing-number": "adyen-kyc-us-check-routing-number",
|
|
20629
|
+
adyenKycUsCheckRoutingNumber
|
|
20630
|
+
};
|
|
20631
|
+
const CheckGuidance = ({
|
|
20632
|
+
annotated
|
|
20633
|
+
}) => jsxs("div", {
|
|
20634
|
+
className: styles$3["adyen-kyc-check-guidance"],
|
|
20635
|
+
children: [jsx(Svg, {
|
|
20636
|
+
type: "image",
|
|
20637
|
+
name: "us-check-account-number",
|
|
20638
|
+
className: cx(styles$3["adyen-kyc-check-guidance__image"], styles$3["adyen-kyc-check-guidance__image--annotated"], {
|
|
20639
|
+
[styles$3["adyen-kyc-check-guidance__image--inactive"]]: annotated !== "account"
|
|
20640
|
+
})
|
|
20641
|
+
}), jsx(Svg, {
|
|
20642
|
+
type: "image",
|
|
20643
|
+
name: "us-check-routing-number",
|
|
20644
|
+
className: cx(styles$3["adyen-kyc-check-guidance__image"], styles$3["adyen-kyc-check-guidance__image--annotated"], {
|
|
20645
|
+
[styles$3["adyen-kyc-check-guidance__image--inactive"]]: annotated !== "routing"
|
|
20646
|
+
})
|
|
20647
|
+
}), jsx(Svg, {
|
|
20648
|
+
name: "us-check",
|
|
20649
|
+
type: "image",
|
|
20650
|
+
className: styles$3["adyen-kyc-check-guidance__image"]
|
|
20651
|
+
})]
|
|
20652
|
+
});
|
|
20520
20653
|
const payoutAccountFields = ["accountHolder", ...ibanFields, ...branchCodeFields, ...swiftCodeFields, ...currencyFields, ...bankAccountNumberFields, ...bankNameFields, ...bankCodeFields];
|
|
20521
20654
|
function PayoutAccountComponent(props) {
|
|
20522
20655
|
const {
|
|
@@ -20527,16 +20660,19 @@ function PayoutAccountComponent(props) {
|
|
|
20527
20660
|
const {
|
|
20528
20661
|
i18n
|
|
20529
20662
|
} = useI18nContext();
|
|
20663
|
+
const [checkAnnotation, setCheckAnnotation] = useState();
|
|
20530
20664
|
const {
|
|
20531
20665
|
isSettingEnabled
|
|
20532
20666
|
} = useSettingsContext();
|
|
20533
20667
|
const bankAccountFormatSelectionAllowed = isSettingEnabled(SettingNames.AllowBankAccountFormatSelection);
|
|
20534
20668
|
const {
|
|
20669
|
+
heading,
|
|
20535
20670
|
country,
|
|
20536
20671
|
id,
|
|
20537
20672
|
legalEntityResponse,
|
|
20538
20673
|
requiredFields = []
|
|
20539
20674
|
} = props;
|
|
20675
|
+
const showCheckGuidance = shouldShowCheckGuidance(country);
|
|
20540
20676
|
const {
|
|
20541
20677
|
data,
|
|
20542
20678
|
valid,
|
|
@@ -20579,19 +20715,15 @@ function PayoutAccountComponent(props) {
|
|
|
20579
20715
|
className: "adyen-kyc-individual__payout-account",
|
|
20580
20716
|
"aria-describedby": "ariaErrorField",
|
|
20581
20717
|
children: [jsx(FormHeader, {
|
|
20582
|
-
heading
|
|
20718
|
+
heading
|
|
20583
20719
|
}), jsx(ErrorPanel, {
|
|
20584
20720
|
verificationErrors: props == null ? void 0 : props.formVerificationErrors,
|
|
20585
20721
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
20586
20722
|
formUtils,
|
|
20587
20723
|
id: "ariaErrorField"
|
|
20588
|
-
}), jsx(
|
|
20589
|
-
|
|
20590
|
-
|
|
20591
|
-
contentId: "reasonForFillingPayoutDetails",
|
|
20592
|
-
title: i18n.get("whyDoINeedToFillInThisInformation"),
|
|
20593
|
-
content: i18n.get("reasonForFillingPayoutDetails")
|
|
20594
|
-
}), formUtils.isRequiredField("accountHolder") && jsx(Field, {
|
|
20724
|
+
}), showCheckGuidance ? jsx(CheckGuidance, {
|
|
20725
|
+
annotated: checkAnnotation
|
|
20726
|
+
}) : void 0, formUtils.isRequiredField("accountHolder") && jsx(Field, {
|
|
20595
20727
|
name: "accountHolder",
|
|
20596
20728
|
label: formUtils.getLabel("accountHolder"),
|
|
20597
20729
|
helper: i18n.get(accountHolderDescriptionKey),
|
|
@@ -20615,7 +20747,9 @@ function PayoutAccountComponent(props) {
|
|
|
20615
20747
|
}), formUtils.isRequiredField("bankAccountNumber") && jsx(BankAccountNumber, {
|
|
20616
20748
|
...bankAccountNumberProps,
|
|
20617
20749
|
country,
|
|
20618
|
-
dataStoreId: id
|
|
20750
|
+
dataStoreId: id,
|
|
20751
|
+
onFocus: showCheckGuidance ? () => setCheckAnnotation("account") : void 0,
|
|
20752
|
+
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
20619
20753
|
}), formUtils.isRequiredField("iban") && jsx(Iban, {
|
|
20620
20754
|
...ibanProps,
|
|
20621
20755
|
dataStoreId: id,
|
|
@@ -20633,12 +20767,18 @@ function PayoutAccountComponent(props) {
|
|
|
20633
20767
|
}), formUtils.isRequiredField("branchCode") && jsx(BranchCode, {
|
|
20634
20768
|
...branchCodeProps,
|
|
20635
20769
|
country,
|
|
20636
|
-
dataStoreId: id
|
|
20770
|
+
dataStoreId: id,
|
|
20771
|
+
onFocus: showCheckGuidance ? () => setCheckAnnotation("routing") : void 0,
|
|
20772
|
+
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
20637
20773
|
}), formUtils.isRequiredField("bankCity") && jsx(BankCity, {
|
|
20638
20774
|
...bankCityProps,
|
|
20639
20775
|
dataStoreId: id
|
|
20640
20776
|
}), shouldShowPayoutAlert(country) && jsx(Alert, {
|
|
20641
20777
|
title: getSupportedCurrencyGuidance(i18n, country, requiredFields)
|
|
20778
|
+
}), jsx(Typography, {
|
|
20779
|
+
variant: "caption",
|
|
20780
|
+
color: "tertiary",
|
|
20781
|
+
children: i18n.get("reasonForFillingPayoutDetails")
|
|
20642
20782
|
})]
|
|
20643
20783
|
});
|
|
20644
20784
|
}
|
|
@@ -23998,12 +24138,22 @@ const dbaNameFieldMetadata = {
|
|
|
23998
24138
|
label: "dbaName",
|
|
23999
24139
|
validators: [validateNotEmptyOnBlur]
|
|
24000
24140
|
};
|
|
24001
|
-
const
|
|
24141
|
+
const adyenKycStructuredList = "adyen-kyc-structured-list";
|
|
24142
|
+
const adyenKycStructuredListListItem = "adyen-kyc-structured-list__list-item";
|
|
24143
|
+
const adyenLayoutMd = "adyen-layout-md";
|
|
24144
|
+
const adyenKycStructuredListLabel = "adyen-kyc-structured-list__label";
|
|
24145
|
+
const adyenKycStructuredListValue = "adyen-kyc-structured-list__value";
|
|
24146
|
+
const styles$2 = {
|
|
24002
24147
|
"adyen-kyc-structured-list": "adyen-kyc-structured-list",
|
|
24148
|
+
adyenKycStructuredList,
|
|
24003
24149
|
"adyen-kyc-structured-list__list-item": "adyen-kyc-structured-list__list-item",
|
|
24150
|
+
adyenKycStructuredListListItem,
|
|
24004
24151
|
"adyen-layout-md": "adyen-layout-md",
|
|
24152
|
+
adyenLayoutMd,
|
|
24005
24153
|
"adyen-kyc-structured-list__label": "adyen-kyc-structured-list__label",
|
|
24006
|
-
|
|
24154
|
+
adyenKycStructuredListLabel,
|
|
24155
|
+
"adyen-kyc-structured-list__value": "adyen-kyc-structured-list__value",
|
|
24156
|
+
adyenKycStructuredListValue
|
|
24007
24157
|
};
|
|
24008
24158
|
const StructuredList = ({
|
|
24009
24159
|
items
|
|
@@ -24012,14 +24162,14 @@ const StructuredList = ({
|
|
|
24012
24162
|
i18n
|
|
24013
24163
|
} = useI18nContext();
|
|
24014
24164
|
return jsx("dl", {
|
|
24015
|
-
className: styles$
|
|
24165
|
+
className: styles$2["adyen-kyc-structured-list"],
|
|
24016
24166
|
children: items.map((item) => jsxs("div", {
|
|
24017
|
-
className: styles$
|
|
24167
|
+
className: styles$2["adyen-kyc-structured-list__list-item"],
|
|
24018
24168
|
children: [jsx("dt", {
|
|
24019
|
-
className: styles$
|
|
24169
|
+
className: styles$2["adyen-kyc-structured-list__label"],
|
|
24020
24170
|
children: i18n.get(item.labelKey)
|
|
24021
24171
|
}), jsx("dd", {
|
|
24022
|
-
className: styles$
|
|
24172
|
+
className: styles$2["adyen-kyc-structured-list__value"],
|
|
24023
24173
|
children: item.value
|
|
24024
24174
|
})]
|
|
24025
24175
|
}, item.labelKey))
|
|
@@ -24468,8 +24618,8 @@ function AdditionalInformationComponent({
|
|
|
24468
24618
|
variant: "title",
|
|
24469
24619
|
children: i18n.get("registeredBusinessAddress")
|
|
24470
24620
|
}), jsx(Typography, {
|
|
24471
|
-
el: "
|
|
24472
|
-
variant: "
|
|
24621
|
+
el: "p",
|
|
24622
|
+
variant: "body",
|
|
24473
24623
|
children: i18n.get("registeredBusinessAddressDescription")
|
|
24474
24624
|
})]
|
|
24475
24625
|
}), jsx(Address, {
|
|
@@ -24498,8 +24648,8 @@ function AdditionalInformationComponent({
|
|
|
24498
24648
|
variant: "title",
|
|
24499
24649
|
children: i18n.get("principalPlaceOfBusiness")
|
|
24500
24650
|
}), jsx(Typography, {
|
|
24501
|
-
el: "
|
|
24502
|
-
variant: "
|
|
24651
|
+
el: "p",
|
|
24652
|
+
variant: "body",
|
|
24503
24653
|
children: i18n.get("principalPlaceOfBusinessDescription")
|
|
24504
24654
|
})]
|
|
24505
24655
|
}), jsx(Field, {
|
|
@@ -24679,8 +24829,8 @@ function BusinessInformationCard({
|
|
|
24679
24829
|
result,
|
|
24680
24830
|
selectedBusinessId,
|
|
24681
24831
|
currentBusinessSelection,
|
|
24682
|
-
|
|
24683
|
-
|
|
24832
|
+
fetchStatus,
|
|
24833
|
+
verifyStatus,
|
|
24684
24834
|
invalidTin,
|
|
24685
24835
|
resetTinVerification,
|
|
24686
24836
|
setIsBusinessSelection,
|
|
@@ -24690,9 +24840,9 @@ function BusinessInformationCard({
|
|
|
24690
24840
|
const {
|
|
24691
24841
|
i18n
|
|
24692
24842
|
} = useI18nContext();
|
|
24693
|
-
const showSelectButton =
|
|
24843
|
+
const showSelectButton = fetchStatus !== "loading" && fetchStatus !== "error" && currentBusinessSelection;
|
|
24694
24844
|
const selectBusiness = (searchResult) => {
|
|
24695
|
-
if (
|
|
24845
|
+
if (fetchStatus === "error" && selectedBusinessId === searchResult.id) return;
|
|
24696
24846
|
return handleSelectBusiness(searchResult);
|
|
24697
24847
|
};
|
|
24698
24848
|
const handleGoBack = () => {
|
|
@@ -24705,7 +24855,7 @@ function BusinessInformationCard({
|
|
|
24705
24855
|
title: result.name,
|
|
24706
24856
|
subTitle: result.registrationNumber,
|
|
24707
24857
|
stateful: true,
|
|
24708
|
-
fetching:
|
|
24858
|
+
fetching: fetchStatus === "loading" && selectedBusinessId === result.id,
|
|
24709
24859
|
active: selectedBusinessId === result.id,
|
|
24710
24860
|
headerButton: selectedBusinessId === result.id && showSelectButton ? jsx(Button, {
|
|
24711
24861
|
label: i18n.get("thisIsMyBusiness"),
|
|
@@ -24727,7 +24877,11 @@ function BusinessInformationCard({
|
|
|
24727
24877
|
showAsLink: true
|
|
24728
24878
|
}),
|
|
24729
24879
|
testId: "invalidTin"
|
|
24730
|
-
}),
|
|
24880
|
+
}), verifyStatus === "error" && jsx(Alert, {
|
|
24881
|
+
variant: "error",
|
|
24882
|
+
title: i18n.get("businessSelection__tinVerificationFailure"),
|
|
24883
|
+
testId: "tinVerificationFailure"
|
|
24884
|
+
}), fetchStatus === "error" && jsx(Alert, {
|
|
24731
24885
|
variant: "info",
|
|
24732
24886
|
type: "callToAction",
|
|
24733
24887
|
title: i18n.get("businessSelection__failedToLoad"),
|
|
@@ -24738,8 +24892,8 @@ function BusinessInformationCard({
|
|
|
24738
24892
|
showAsLink: true
|
|
24739
24893
|
}),
|
|
24740
24894
|
testId: "failedToLoad"
|
|
24741
|
-
}),
|
|
24742
|
-
fetching,
|
|
24895
|
+
}), fetchStatus !== "error" && jsx(BusinessInformation, {
|
|
24896
|
+
fetching: fetchStatus === "loading",
|
|
24743
24897
|
selectedBusiness: currentBusinessSelection
|
|
24744
24898
|
})]
|
|
24745
24899
|
})
|
|
@@ -24748,10 +24902,10 @@ function BusinessInformationCard({
|
|
|
24748
24902
|
const logger$n = createLogger("BusinessSelection");
|
|
24749
24903
|
function BusinessSelectionComponent({
|
|
24750
24904
|
showCompanyStructure,
|
|
24751
|
-
|
|
24752
|
-
|
|
24753
|
-
|
|
24754
|
-
|
|
24905
|
+
searching,
|
|
24906
|
+
fetching,
|
|
24907
|
+
verifying,
|
|
24908
|
+
resettingTrustedData,
|
|
24755
24909
|
searchResults,
|
|
24756
24910
|
invalidTin,
|
|
24757
24911
|
fetchBusinessData,
|
|
@@ -24779,19 +24933,19 @@ function BusinessSelectionComponent({
|
|
|
24779
24933
|
}, [setShowCompanyStructure, verifyBusinessData]);
|
|
24780
24934
|
const handleSelectBusiness = useCallback(async (result) => {
|
|
24781
24935
|
try {
|
|
24782
|
-
if (
|
|
24936
|
+
if (fetching === "loading") return;
|
|
24783
24937
|
if (!selectedBusinessId || selectedBusinessId !== result.id) {
|
|
24784
24938
|
setSelectedBusinessId(result.id);
|
|
24785
24939
|
const businessData = await fetchBusinessData(result);
|
|
24786
24940
|
setCurrentBusinessSelection(businessData);
|
|
24787
|
-
} else if (
|
|
24941
|
+
} else if (fetching === "error") {
|
|
24788
24942
|
const businessData = await fetchBusinessData(result);
|
|
24789
24943
|
setCurrentBusinessSelection(businessData);
|
|
24790
24944
|
}
|
|
24791
24945
|
} catch (e) {
|
|
24792
24946
|
logger$n.error(e);
|
|
24793
24947
|
}
|
|
24794
|
-
}, [fetchBusinessData,
|
|
24948
|
+
}, [fetchBusinessData, fetching, selectedBusinessId]);
|
|
24795
24949
|
const handleConfirmSelection = useCallback(async (data) => {
|
|
24796
24950
|
if (!currentTin) return;
|
|
24797
24951
|
try {
|
|
@@ -24803,7 +24957,7 @@ function BusinessSelectionComponent({
|
|
|
24803
24957
|
logger$n.error(e);
|
|
24804
24958
|
}
|
|
24805
24959
|
}, [currentTin, handleNextClick, handleBusinessVerification]);
|
|
24806
|
-
const showLoader =
|
|
24960
|
+
const showLoader = searching === "loading" || verifying === "loading" || resettingTrustedData === "loading" || fetching === "loading" && (searchResults == null ? void 0 : searchResults.length) === 1;
|
|
24807
24961
|
const businessSelectionClasses = cx("adyen-kyc-business-selection", {
|
|
24808
24962
|
"adyen-kyc-business-selection--loading": showLoader
|
|
24809
24963
|
});
|
|
@@ -24828,8 +24982,8 @@ function BusinessSelectionComponent({
|
|
|
24828
24982
|
result,
|
|
24829
24983
|
selectedBusinessId,
|
|
24830
24984
|
currentBusinessSelection,
|
|
24831
|
-
|
|
24832
|
-
|
|
24985
|
+
fetchStatus: fetching,
|
|
24986
|
+
verifyStatus: verifying,
|
|
24833
24987
|
invalidTin,
|
|
24834
24988
|
resetTinVerification,
|
|
24835
24989
|
handleSelectBusiness,
|
|
@@ -24951,10 +25105,10 @@ function BasicInformationComponent({
|
|
|
24951
25105
|
showBusinessSelection,
|
|
24952
25106
|
showCompanyStructure,
|
|
24953
25107
|
isActiveForm,
|
|
24954
|
-
|
|
24955
|
-
|
|
24956
|
-
|
|
24957
|
-
|
|
25108
|
+
searching,
|
|
25109
|
+
fetching,
|
|
25110
|
+
verifying,
|
|
25111
|
+
resettingTrustedData,
|
|
24958
25112
|
searchResults,
|
|
24959
25113
|
invalidTin,
|
|
24960
25114
|
verifiedBusiness,
|
|
@@ -25079,10 +25233,10 @@ function BasicInformationComponent({
|
|
|
25079
25233
|
if (showBusinessSelection) {
|
|
25080
25234
|
return jsx(BusinessSelectionComponent, {
|
|
25081
25235
|
showCompanyStructure,
|
|
25082
|
-
|
|
25083
|
-
|
|
25084
|
-
|
|
25085
|
-
|
|
25236
|
+
searching,
|
|
25237
|
+
fetching,
|
|
25238
|
+
verifying,
|
|
25239
|
+
resettingTrustedData,
|
|
25086
25240
|
searchResults,
|
|
25087
25241
|
invalidTin,
|
|
25088
25242
|
fetchBusinessData,
|
|
@@ -25669,10 +25823,10 @@ function BusinessDetailsComponent(props) {
|
|
|
25669
25823
|
showBusinessSelection,
|
|
25670
25824
|
setShowBusinessSelection,
|
|
25671
25825
|
setShowCompanyStructure,
|
|
25672
|
-
|
|
25673
|
-
|
|
25674
|
-
|
|
25675
|
-
|
|
25826
|
+
searching,
|
|
25827
|
+
fetching,
|
|
25828
|
+
verifying,
|
|
25829
|
+
resettingTrustedData,
|
|
25676
25830
|
searchResults,
|
|
25677
25831
|
invalidTin,
|
|
25678
25832
|
verifiedBusiness,
|
|
@@ -25713,10 +25867,10 @@ function BusinessDetailsComponent(props) {
|
|
|
25713
25867
|
showBusinessSelection,
|
|
25714
25868
|
showCompanyStructure,
|
|
25715
25869
|
isActiveForm: (activeForm == null ? void 0 : activeForm.formId) === forms2.basicInformation.formId,
|
|
25716
|
-
|
|
25717
|
-
|
|
25718
|
-
|
|
25719
|
-
|
|
25870
|
+
searching,
|
|
25871
|
+
fetching,
|
|
25872
|
+
verifying,
|
|
25873
|
+
resettingTrustedData,
|
|
25720
25874
|
fetchBusinessData,
|
|
25721
25875
|
verifyBusinessData,
|
|
25722
25876
|
proceedToManualDataEntry,
|
|
@@ -26012,14 +26166,14 @@ const Modal = ({
|
|
|
26012
26166
|
tertiary: true,
|
|
26013
26167
|
"aria-label": "back",
|
|
26014
26168
|
icon: "arrow-left",
|
|
26015
|
-
className: "adyen-kyc-modal-button
|
|
26169
|
+
className: "adyen-kyc-modal-button",
|
|
26016
26170
|
onClick: onBack,
|
|
26017
26171
|
shaded: true
|
|
26018
26172
|
}) : jsx("div", {}), onClose ? jsx(Button, {
|
|
26019
26173
|
tertiary: true,
|
|
26020
26174
|
"aria-label": "close",
|
|
26021
26175
|
icon: "cross",
|
|
26022
|
-
className: "adyen-kyc-modal-button
|
|
26176
|
+
className: "adyen-kyc-modal-button",
|
|
26023
26177
|
onClick: onClose,
|
|
26024
26178
|
shaded: true
|
|
26025
26179
|
}) : jsx("div", {})]
|
|
@@ -26347,16 +26501,10 @@ const DropinLayout = ({
|
|
|
26347
26501
|
if (modalOpen) {
|
|
26348
26502
|
return jsx(Modal, {
|
|
26349
26503
|
footer,
|
|
26350
|
-
onClose: handleClose,
|
|
26504
|
+
onClose: !onBack ? handleClose : void 0,
|
|
26351
26505
|
onBack,
|
|
26352
26506
|
children: jsx("div", {
|
|
26353
|
-
|
|
26354
|
-
children: jsx("div", {
|
|
26355
|
-
className: "adyen-kyc-dropin__content",
|
|
26356
|
-
children: jsx("div", {
|
|
26357
|
-
children: content
|
|
26358
|
-
})
|
|
26359
|
-
})
|
|
26507
|
+
children: content
|
|
26360
26508
|
})
|
|
26361
26509
|
});
|
|
26362
26510
|
}
|
|
@@ -26890,9 +27038,10 @@ async function submit({
|
|
|
26890
27038
|
showToast,
|
|
26891
27039
|
clearToasts,
|
|
26892
27040
|
handleUpdateLegalEntity,
|
|
26893
|
-
onExternalSubmit
|
|
27041
|
+
onExternalSubmit,
|
|
27042
|
+
accountHolder
|
|
26894
27043
|
}) {
|
|
26895
|
-
var _a, _b, _c, _d;
|
|
27044
|
+
var _a, _b, _c, _d, _e;
|
|
26896
27045
|
const logger2 = createLogger("submitBusinessDetails");
|
|
26897
27046
|
setLoadingStatus("loading");
|
|
26898
27047
|
const trackingPayload = {
|
|
@@ -26905,7 +27054,7 @@ async function submit({
|
|
|
26905
27054
|
const filteredData = removeOldDataBySchema(data, savedLegalEntityData);
|
|
26906
27055
|
const legalEntity = {
|
|
26907
27056
|
...mapBusinessDetailsSchemaToLegalEntity(filteredData),
|
|
26908
|
-
entityAssociations: filterOutUnwantedAssociationsIfRootLE(TaskTypes.BUSINESS_DETAILS, legalEntityResponse,
|
|
27057
|
+
entityAssociations: filterOutUnwantedAssociationsIfRootLE(TaskTypes.BUSINESS_DETAILS, legalEntityResponse, ((_e = data.companyStructure) == null ? void 0 : _e.accountHolder) || accountHolder)
|
|
26909
27058
|
};
|
|
26910
27059
|
try {
|
|
26911
27060
|
userEvents.addEvent(BusinessDetailsEvents.TASK_SUBMIT, {
|
|
@@ -26977,7 +27126,6 @@ function BusinessDetailsDropinComponent({
|
|
|
26977
27126
|
parentLegalEntity,
|
|
26978
27127
|
trackingConfig,
|
|
26979
27128
|
capabilities,
|
|
26980
|
-
accountHolder,
|
|
26981
27129
|
taskName,
|
|
26982
27130
|
hideDropinLayout,
|
|
26983
27131
|
homeButtonLabel,
|
|
@@ -27020,6 +27168,10 @@ function BusinessDetailsDropinComponent({
|
|
|
27020
27168
|
});
|
|
27021
27169
|
}, []);
|
|
27022
27170
|
const formRef = useRef(null);
|
|
27171
|
+
const {
|
|
27172
|
+
accountHolder,
|
|
27173
|
+
setAccountHolder
|
|
27174
|
+
} = useCoreContext();
|
|
27023
27175
|
const {
|
|
27024
27176
|
showToast,
|
|
27025
27177
|
clearToasts
|
|
@@ -27038,7 +27190,7 @@ function BusinessDetailsDropinComponent({
|
|
|
27038
27190
|
var _a2;
|
|
27039
27191
|
return ((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.country) ?? country;
|
|
27040
27192
|
}, [(_a = currentState.data.basicInformation) == null ? void 0 : _a.country, country]);
|
|
27041
|
-
const [initialData, setInitialData] = useState(mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, Boolean(isTargetLegalEntityType), isNewEntryFlowEnabled ? accountHolder : void 0));
|
|
27193
|
+
const [initialData, setInitialData] = useState(mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, Boolean(isTargetLegalEntityType), isNewEntryFlowEnabled && accountHolder ? accountHolder : void 0));
|
|
27042
27194
|
const [trustedFields, setTrustedFields] = useState(legalEntityResponse.trustedFields);
|
|
27043
27195
|
const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
|
|
27044
27196
|
useEffect(() => {
|
|
@@ -27096,22 +27248,26 @@ function BusinessDetailsDropinComponent({
|
|
|
27096
27248
|
data: formatDataForSummary$1(currentState.data, forms2, derivedProps == null ? void 0 : derivedProps.labels, i18n),
|
|
27097
27249
|
omittedKeys: ["operationalAddressIsSame"]
|
|
27098
27250
|
}), [currentState.data, derivedProps == null ? void 0 : derivedProps.labels, forms2, i18n]);
|
|
27099
|
-
const submitTask = useCallback(() =>
|
|
27100
|
-
|
|
27101
|
-
|
|
27102
|
-
|
|
27103
|
-
|
|
27104
|
-
|
|
27105
|
-
|
|
27106
|
-
|
|
27107
|
-
|
|
27108
|
-
|
|
27109
|
-
|
|
27110
|
-
|
|
27111
|
-
|
|
27112
|
-
|
|
27113
|
-
|
|
27114
|
-
|
|
27251
|
+
const submitTask = useCallback(() => {
|
|
27252
|
+
var _a2;
|
|
27253
|
+
setAccountHolder(((_a2 = currentState.data.companyStructure) == null ? void 0 : _a2.accountHolder) || accountHolder);
|
|
27254
|
+
return submit({
|
|
27255
|
+
data: currentState.data,
|
|
27256
|
+
legalEntityResponse,
|
|
27257
|
+
isTargetLegalEntityType: Boolean(isTargetLegalEntityType),
|
|
27258
|
+
baseTrackingPayload,
|
|
27259
|
+
problems: currentProblems,
|
|
27260
|
+
forms: forms2,
|
|
27261
|
+
documentUtils,
|
|
27262
|
+
i18n,
|
|
27263
|
+
setLoadingStatus,
|
|
27264
|
+
setProblems: setCurrentProblems,
|
|
27265
|
+
showToast,
|
|
27266
|
+
clearToasts,
|
|
27267
|
+
handleUpdateLegalEntity,
|
|
27268
|
+
onExternalSubmit
|
|
27269
|
+
});
|
|
27270
|
+
}, [baseTrackingPayload, clearToasts, currentState.data, documentUtils, forms2, handleUpdateLegalEntity, i18n, isTargetLegalEntityType, legalEntityResponse, onExternalSubmit, currentProblems, showToast]);
|
|
27115
27271
|
const {
|
|
27116
27272
|
handleNextClick,
|
|
27117
27273
|
handleBackClick,
|
|
@@ -27136,10 +27292,10 @@ function BusinessDetailsDropinComponent({
|
|
|
27136
27292
|
clearTrustedBusinessData,
|
|
27137
27293
|
resetBusinessData,
|
|
27138
27294
|
resetTinVerification,
|
|
27139
|
-
|
|
27140
|
-
|
|
27141
|
-
|
|
27142
|
-
|
|
27295
|
+
searching,
|
|
27296
|
+
fetching,
|
|
27297
|
+
verifying,
|
|
27298
|
+
resettingTrustedData,
|
|
27143
27299
|
currentSearchName,
|
|
27144
27300
|
searchResults,
|
|
27145
27301
|
invalidTin,
|
|
@@ -27170,10 +27326,10 @@ function BusinessDetailsDropinComponent({
|
|
|
27170
27326
|
}
|
|
27171
27327
|
}, [currentCountry, (_e = currentState.data.basicInformation) == null ? void 0 : _e.taxInformation, fetchBusinessData, handleNextClick, searchForBusiness, handleVerifyBusinessData]);
|
|
27172
27328
|
useEffect(() => {
|
|
27173
|
-
if (searchResults && !searchResults.length ||
|
|
27329
|
+
if (searchResults && !searchResults.length || searching === "error") {
|
|
27174
27330
|
setShowCompanyStructure(true);
|
|
27175
27331
|
}
|
|
27176
|
-
}, [searchResults,
|
|
27332
|
+
}, [searchResults, searching]);
|
|
27177
27333
|
useEffect(() => {
|
|
27178
27334
|
var _a2;
|
|
27179
27335
|
if (((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.businessName) !== currentSearchName) {
|
|
@@ -27186,16 +27342,16 @@ function BusinessDetailsDropinComponent({
|
|
|
27186
27342
|
const hideBack = useMemo(() => {
|
|
27187
27343
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) return hideBackButton;
|
|
27188
27344
|
if (isBusinessSelection) {
|
|
27189
|
-
return
|
|
27345
|
+
return searching === "loading" || fetching === "loading" || verifying === "loading" || resettingTrustedData === "loading" ? hideBackButton : false;
|
|
27190
27346
|
}
|
|
27191
27347
|
return hideBackButton;
|
|
27192
|
-
}, [currentCountry, hideBackButton, isBusinessSelection,
|
|
27348
|
+
}, [currentCountry, hideBackButton, isBusinessSelection, searching, fetching, verifying, resettingTrustedData]);
|
|
27193
27349
|
const hideHome = useMemo(() => {
|
|
27194
27350
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) return hideHomeButton;
|
|
27195
27351
|
if (isBusinessSelection) {
|
|
27196
|
-
return
|
|
27352
|
+
return searching === "loading" || fetching === "loading" || verifying === "loading" || resettingTrustedData === "loading" ? true : hideHomeButton;
|
|
27197
27353
|
}
|
|
27198
|
-
}, [currentCountry, hideHomeButton, isBusinessSelection,
|
|
27354
|
+
}, [currentCountry, hideHomeButton, isBusinessSelection, searching, fetching, verifying, resettingTrustedData]);
|
|
27199
27355
|
const goToForm = useCallback((index) => {
|
|
27200
27356
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
27201
27357
|
const form = forms2[index].formId;
|
|
@@ -27258,12 +27414,12 @@ function BusinessDetailsDropinComponent({
|
|
|
27258
27414
|
return showBusinessSelection ? setShowBusinessSelection(false) : void 0;
|
|
27259
27415
|
}
|
|
27260
27416
|
case "companyStructure": {
|
|
27261
|
-
if (
|
|
27417
|
+
if (searching === "error") {
|
|
27262
27418
|
setShowBusinessSelection(false);
|
|
27263
27419
|
setShowCompanyStructure(false);
|
|
27264
27420
|
return handleBackClick == null ? void 0 : handleBackClick();
|
|
27265
27421
|
}
|
|
27266
|
-
if (
|
|
27422
|
+
if (searching !== "loading" && searchResults && !searchResults.length) {
|
|
27267
27423
|
setShowBusinessSelection(false);
|
|
27268
27424
|
} else if (!verifiedBusiness) setShowCompanyStructure(false);
|
|
27269
27425
|
return handleBackClick == null ? void 0 : handleBackClick();
|
|
@@ -27277,7 +27433,7 @@ function BusinessDetailsDropinComponent({
|
|
|
27277
27433
|
default:
|
|
27278
27434
|
return handleBackClick == null ? void 0 : handleBackClick();
|
|
27279
27435
|
}
|
|
27280
|
-
}, [activeForm.formId, country, handleBackClick, handleNextClick,
|
|
27436
|
+
}, [activeForm.formId, country, handleBackClick, handleNextClick, searching, searchResults, showBusinessSelection, verifiedBusiness]);
|
|
27281
27437
|
const proceedToManualDataEntry = useCallback(async () => {
|
|
27282
27438
|
await clearTrustedBusinessData().then(() => setShowCompanyStructure(true));
|
|
27283
27439
|
}, [clearTrustedBusinessData]);
|
|
@@ -27328,10 +27484,10 @@ function BusinessDetailsDropinComponent({
|
|
|
27328
27484
|
invalidTin,
|
|
27329
27485
|
resetTinVerification,
|
|
27330
27486
|
verifiedBusiness,
|
|
27331
|
-
|
|
27332
|
-
|
|
27333
|
-
|
|
27334
|
-
|
|
27487
|
+
searching,
|
|
27488
|
+
fetching,
|
|
27489
|
+
verifying,
|
|
27490
|
+
resettingTrustedData,
|
|
27335
27491
|
searchForBusiness,
|
|
27336
27492
|
fetchBusinessData,
|
|
27337
27493
|
verifyBusinessData,
|
|
@@ -28745,7 +28901,8 @@ function useCompanySearchTaskSubmit({
|
|
|
28745
28901
|
setProblems,
|
|
28746
28902
|
setLoadingStatus,
|
|
28747
28903
|
onExternalSubmit,
|
|
28748
|
-
handleUpdateLegalEntity
|
|
28904
|
+
handleUpdateLegalEntity,
|
|
28905
|
+
accountHolder
|
|
28749
28906
|
}) {
|
|
28750
28907
|
const {
|
|
28751
28908
|
showToast,
|
|
@@ -28790,7 +28947,7 @@ function useCompanySearchTaskSubmit({
|
|
|
28790
28947
|
const submit2 = useCallback(async ({
|
|
28791
28948
|
data
|
|
28792
28949
|
}) => {
|
|
28793
|
-
var _a, _b, _c, _d;
|
|
28950
|
+
var _a, _b, _c, _d, _e;
|
|
28794
28951
|
setLoadingStatus("loading");
|
|
28795
28952
|
const trackingPayload = {
|
|
28796
28953
|
companyStructure: ((_a = data.companyStructure) == null ? void 0 : _a.entityType) ?? null,
|
|
@@ -28802,7 +28959,7 @@ function useCompanySearchTaskSubmit({
|
|
|
28802
28959
|
const filteredData = removeOldDataBySchema(data, savedLegalEntityData);
|
|
28803
28960
|
const legalEntity = {
|
|
28804
28961
|
...mapCompanySearchSchemaToLegalEntity(filteredData),
|
|
28805
|
-
entityAssociations: filterOutUnwantedAssociationsIfRootLE(task, legalEntityResponse,
|
|
28962
|
+
entityAssociations: filterOutUnwantedAssociationsIfRootLE(task, legalEntityResponse, (((_e = data.companyStructure) == null ? void 0 : _e.accountHolder) || accountHolder) ?? void 0)
|
|
28806
28963
|
};
|
|
28807
28964
|
try {
|
|
28808
28965
|
userEvents.addEvent(CompanySearchEvents.TASK_SUBMIT, {
|
|
@@ -29009,7 +29166,6 @@ function CompanySearchDropinComponent({
|
|
|
29009
29166
|
taskName,
|
|
29010
29167
|
hideDropinLayout,
|
|
29011
29168
|
homeButtonLabel,
|
|
29012
|
-
accountHolder,
|
|
29013
29169
|
onChange,
|
|
29014
29170
|
onSubmit: onExternalSubmit,
|
|
29015
29171
|
handleHomeClick,
|
|
@@ -29036,6 +29192,10 @@ function CompanySearchDropinComponent({
|
|
|
29036
29192
|
useEffect(() => {
|
|
29037
29193
|
onChange == null ? void 0 : onChange(currentState);
|
|
29038
29194
|
}, [currentState, onChange]);
|
|
29195
|
+
const {
|
|
29196
|
+
accountHolder,
|
|
29197
|
+
setAccountHolder
|
|
29198
|
+
} = useCoreContext();
|
|
29039
29199
|
const formRef = useRef(null);
|
|
29040
29200
|
const {
|
|
29041
29201
|
showToast
|
|
@@ -29051,7 +29211,7 @@ function CompanySearchDropinComponent({
|
|
|
29051
29211
|
} = useExperimentsContext();
|
|
29052
29212
|
const isNewEntryFlowEnabled = useEnableNewEntryFlow();
|
|
29053
29213
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
29054
|
-
const [initialData, setInitialData] = useState(mapLegalEntityToCompanySearchSchema(legalEntityResponse, Boolean(isTargetLegalEntityType), isNewEntryFlowEnabled ? accountHolder : void 0));
|
|
29214
|
+
const [initialData, setInitialData] = useState(mapLegalEntityToCompanySearchSchema(legalEntityResponse, Boolean(isTargetLegalEntityType), isNewEntryFlowEnabled && accountHolder ? accountHolder : void 0));
|
|
29055
29215
|
const country = useMemo(() => {
|
|
29056
29216
|
var _a2;
|
|
29057
29217
|
return ((_a2 = currentState.data.companyBasics) == null ? void 0 : _a2.country) ?? parentCountry;
|
|
@@ -29141,7 +29301,8 @@ function CompanySearchDropinComponent({
|
|
|
29141
29301
|
setProblems,
|
|
29142
29302
|
setLoadingStatus,
|
|
29143
29303
|
onExternalSubmit,
|
|
29144
|
-
handleUpdateLegalEntity
|
|
29304
|
+
handleUpdateLegalEntity,
|
|
29305
|
+
accountHolder
|
|
29145
29306
|
});
|
|
29146
29307
|
const {
|
|
29147
29308
|
handleNextClick,
|
|
@@ -29179,9 +29340,13 @@ function CompanySearchDropinComponent({
|
|
|
29179
29340
|
activeForm,
|
|
29180
29341
|
validateForm: () => setShouldValidate(true),
|
|
29181
29342
|
baseTrackingPayload,
|
|
29182
|
-
onSubmit: () =>
|
|
29183
|
-
|
|
29184
|
-
|
|
29343
|
+
onSubmit: () => {
|
|
29344
|
+
var _a2;
|
|
29345
|
+
setAccountHolder(((_a2 = currentState.data.companyStructure) == null ? void 0 : _a2.accountHolder) || accountHolder);
|
|
29346
|
+
return submit2({
|
|
29347
|
+
data: currentState.data
|
|
29348
|
+
});
|
|
29349
|
+
},
|
|
29185
29350
|
problems,
|
|
29186
29351
|
canSubmit: canSubmitForm,
|
|
29187
29352
|
summary: summaryData,
|
|
@@ -32744,7 +32909,8 @@ function IndividualDropinComponent({
|
|
|
32744
32909
|
}
|
|
32745
32910
|
});
|
|
32746
32911
|
const accountHolderToEvaluated = ((_c2 = dataSubmitted.personalDetails) == null ? void 0 : _c2.accountHolder) || accountHolder;
|
|
32747
|
-
|
|
32912
|
+
const filteredEntityAssociation = filterOutUnwantedAssociationsIfRootLE(taskType, legalEntityResponse, accountHolderToEvaluated || void 0);
|
|
32913
|
+
legalEntity.entityAssociations = filteredEntityAssociation;
|
|
32748
32914
|
const createdLegalEntity = await submitLegalEntity({
|
|
32749
32915
|
dataSubmitted,
|
|
32750
32916
|
legalEntity,
|
|
@@ -34475,7 +34641,8 @@ const serviceAgreementTypesTranslationMapping = {
|
|
|
34475
34641
|
adyenAccount: "businessAccountTerms",
|
|
34476
34642
|
adyenCard: "cardUserTerms",
|
|
34477
34643
|
adyenFranchisee: "franchiseesTAndCs",
|
|
34478
|
-
adyenPccr: "pccr"
|
|
34644
|
+
adyenPccr: "pccr",
|
|
34645
|
+
adyenChargeCard: "chargeCardUserAgreement"
|
|
34479
34646
|
};
|
|
34480
34647
|
const logger$e = createLogger("ServiceAgreementDropinComponent");
|
|
34481
34648
|
const FALLBACK_LANGUAGE_CODE = "en";
|
|
@@ -36428,7 +36595,6 @@ function DropinComposerComponent({
|
|
|
36428
36595
|
handleVerifyTin: args.handleVerifyTin,
|
|
36429
36596
|
onTypeSwitch: navigateToTypeSwitcher,
|
|
36430
36597
|
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION,
|
|
36431
|
-
accountHolder,
|
|
36432
36598
|
trustedFields: singpassTrustedFields,
|
|
36433
36599
|
trustedFieldsProvider: isEligibleForSingpass && TrustedFieldsProvider.SINGPASS
|
|
36434
36600
|
});
|
|
@@ -36468,8 +36634,7 @@ function DropinComposerComponent({
|
|
|
36468
36634
|
handleVerifyTin: args.handleVerifyTin,
|
|
36469
36635
|
handleClearCompanyData: args.handleClearCompanyData,
|
|
36470
36636
|
onTypeSwitch: navigateToTypeSwitcher,
|
|
36471
|
-
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
36472
|
-
accountHolder
|
|
36637
|
+
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
36473
36638
|
})
|
|
36474
36639
|
});
|
|
36475
36640
|
case TaskTypes.TRUST_MEMBER_COMPANY:
|
|
@@ -37177,6 +37342,19 @@ var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
|
|
|
37177
37342
|
OnboardingStatus2["VERIFIED"] = "VERIFIED";
|
|
37178
37343
|
return OnboardingStatus2;
|
|
37179
37344
|
})(OnboardingStatus || {});
|
|
37345
|
+
const adyenKycSkeleton = "adyen-kyc-skeleton";
|
|
37346
|
+
const skeleton = "skeleton";
|
|
37347
|
+
const adyenKycSkeletonCircle = "adyen-kyc-skeleton__circle";
|
|
37348
|
+
const adyenKycSkeletonText = "adyen-kyc-skeleton__text";
|
|
37349
|
+
const styles$1 = {
|
|
37350
|
+
"adyen-kyc-skeleton": "adyen-kyc-skeleton",
|
|
37351
|
+
adyenKycSkeleton,
|
|
37352
|
+
skeleton,
|
|
37353
|
+
"adyen-kyc-skeleton__circle": "adyen-kyc-skeleton__circle",
|
|
37354
|
+
adyenKycSkeletonCircle,
|
|
37355
|
+
"adyen-kyc-skeleton__text": "adyen-kyc-skeleton__text",
|
|
37356
|
+
adyenKycSkeletonText
|
|
37357
|
+
};
|
|
37180
37358
|
const Skeleton = ({
|
|
37181
37359
|
circle = false,
|
|
37182
37360
|
text = false,
|
|
@@ -37184,8 +37362,8 @@ const Skeleton = ({
|
|
|
37184
37362
|
width
|
|
37185
37363
|
}) => {
|
|
37186
37364
|
const classNames = cx("adyen-kyc-skeleton", {
|
|
37187
|
-
"adyen-kyc-skeleton__circle": circle,
|
|
37188
|
-
"adyen-kyc-skeleton__text": text
|
|
37365
|
+
[styles$1["adyen-kyc-skeleton__circle"]]: circle,
|
|
37366
|
+
[styles$1["adyen-kyc-skeleton__text"]]: text
|
|
37189
37367
|
});
|
|
37190
37368
|
return jsx("div", {
|
|
37191
37369
|
className: classNames,
|
|
@@ -37195,13 +37373,25 @@ const Skeleton = ({
|
|
|
37195
37373
|
}
|
|
37196
37374
|
});
|
|
37197
37375
|
};
|
|
37376
|
+
const adyenKycEmbeddedStatus = "adyen-kyc-embedded-status";
|
|
37377
|
+
const adyenKycEmbeddedStatusLoading = "adyen-kyc-embedded-status--loading";
|
|
37378
|
+
const adyenKycEmbeddedStatusAvatar = "adyen-kyc-embedded-status__avatar";
|
|
37379
|
+
const adyenKycEmbeddedStatusLight = "adyen-kyc-embedded-status--light";
|
|
37380
|
+
const adyenKycEmbeddedStatusIcon = "adyen-kyc-embedded-status__icon";
|
|
37381
|
+
const adyenKycEmbeddedStatusInfo = "adyen-kyc-embedded-status__info";
|
|
37198
37382
|
const styles = {
|
|
37199
37383
|
"adyen-kyc-embedded-status": "adyen-kyc-embedded-status",
|
|
37384
|
+
adyenKycEmbeddedStatus,
|
|
37200
37385
|
"adyen-kyc-embedded-status--loading": "adyen-kyc-embedded-status--loading",
|
|
37386
|
+
adyenKycEmbeddedStatusLoading,
|
|
37201
37387
|
"adyen-kyc-embedded-status__avatar": "adyen-kyc-embedded-status__avatar",
|
|
37388
|
+
adyenKycEmbeddedStatusAvatar,
|
|
37202
37389
|
"adyen-kyc-embedded-status--light": "adyen-kyc-embedded-status--light",
|
|
37390
|
+
adyenKycEmbeddedStatusLight,
|
|
37203
37391
|
"adyen-kyc-embedded-status__icon": "adyen-kyc-embedded-status__icon",
|
|
37204
|
-
|
|
37392
|
+
adyenKycEmbeddedStatusIcon,
|
|
37393
|
+
"adyen-kyc-embedded-status__info": "adyen-kyc-embedded-status__info",
|
|
37394
|
+
adyenKycEmbeddedStatusInfo
|
|
37205
37395
|
};
|
|
37206
37396
|
const statusToTag = (status) => {
|
|
37207
37397
|
switch (status) {
|
|
@@ -37267,8 +37457,8 @@ const EmbeddedStatus = ({
|
|
|
37267
37457
|
return jsxs("button", {
|
|
37268
37458
|
type: "button",
|
|
37269
37459
|
className: cx(className, styles["adyen-kyc-embedded-status"], {
|
|
37270
|
-
"adyen-kyc-embedded-status--loading": loading,
|
|
37271
|
-
"adyen-kyc-embedded-status--light": light
|
|
37460
|
+
[styles["adyen-kyc-embedded-status--loading"]]: loading,
|
|
37461
|
+
[styles["adyen-kyc-embedded-status--light"]]: light
|
|
37272
37462
|
}),
|
|
37273
37463
|
onClick,
|
|
37274
37464
|
children: [jsx("section", {
|
|
@@ -39436,7 +39626,7 @@ const ConfigurationApiProvider = ({
|
|
|
39436
39626
|
isEmbeddedDropin,
|
|
39437
39627
|
loadingContext
|
|
39438
39628
|
} = authContext;
|
|
39439
|
-
const sdkVersion = "2.
|
|
39629
|
+
const sdkVersion = "2.55.0";
|
|
39440
39630
|
useAnalytics({
|
|
39441
39631
|
onUserEvent,
|
|
39442
39632
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40114,7 +40304,7 @@ const DebugModal = ({
|
|
|
40114
40304
|
};
|
|
40115
40305
|
const copyToClipboard = async () => {
|
|
40116
40306
|
const toCopy = {
|
|
40117
|
-
sdkVersion: "2.
|
|
40307
|
+
sdkVersion: "2.55.0",
|
|
40118
40308
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40119
40309
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40120
40310
|
};
|
|
@@ -40153,7 +40343,7 @@ const DebugModal = ({
|
|
|
40153
40343
|
children: [jsxs("div", {
|
|
40154
40344
|
className: "adyen-kyc-debug-modal__meta",
|
|
40155
40345
|
children: [jsxs("span", {
|
|
40156
|
-
children: ["SDK version: ", "2.
|
|
40346
|
+
children: ["SDK version: ", "2.55.0"]
|
|
40157
40347
|
}), jsxs("span", {
|
|
40158
40348
|
children: ["rootLegalEntityId: ", rootLegalEntityId]
|
|
40159
40349
|
})]
|