@adyen/kyc-components 2.57.4 → 2.58.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 +692 -232
- package/dist/es/{bg-BG-Cg7uHZ7u.js → bg-BG-DSGcxUqd.js} +1160 -1079
- package/dist/es/{cs-CZ-MP5JPvEI.js → cs-CZ-DAS2jbyW.js} +1167 -1086
- package/dist/es/{da-DK-Bf4-HdQJ.js → da-DK-CH9-Y2_h.js} +1151 -1070
- package/dist/es/{de-DE-CpV6Dp0r.js → de-DE-Cvre4fQ7.js} +1152 -1071
- package/dist/es/{el-GR-DzwQKvWE.js → el-GR-BLJi6VdO.js} +1149 -1068
- package/dist/es/{es-ES-E5qWUSQV.js → es-ES-BfHjS5Hb.js} +1166 -1085
- package/dist/es/{et-EE-DRZrZKKJ.js → et-EE-DG5Cjsj_.js} +1156 -1075
- package/dist/es/{fi-FI-Bk1rCYU6.js → fi-FI-RdmcbEt_.js} +1155 -1074
- package/dist/es/{fr-FR-tlByDhb7.js → fr-FR-Cuu7ywoh.js} +1154 -1073
- package/dist/es/{hr-HR-CZUCz_Lu.js → hr-HR-CwRw-oEW.js} +1155 -1074
- package/dist/es/{hu-HU-CmEicftd.js → hu-HU-PO0jI1sW.js} +1149 -1068
- package/dist/es/{it-IT-BNGHjXBu.js → it-IT-RXBJv4US.js} +1172 -1091
- package/dist/es/{lt-LT-BDv4TY99.js → lt-LT-BCLEVKxe.js} +1149 -1068
- package/dist/es/{lv-LV-HfHaTFsC.js → lv-LV-DfWQ_6E9.js} +1152 -1071
- package/dist/es/{nl-NL-CSyNOXAT.js → nl-NL-2CzcCtiM.js} +1156 -1075
- package/dist/es/{no-NO-BzBtvG7T.js → no-NO-r9q3S-TP.js} +1163 -1082
- package/dist/es/{pl-PL-CwUuiZyG.js → pl-PL-Nix6oaTv.js} +1154 -1073
- package/dist/es/{pt-PT-CY_ZCE9N.js → pt-PT-CGVej1Ae.js} +1168 -1087
- package/dist/es/{ro-RO-C-OpimQU.js → ro-RO-DhJK0CPN.js} +1163 -1082
- package/dist/es/{sk-SK-Vi54HLZU.js → sk-SK-Akja9ejH.js} +1156 -1075
- package/dist/es/{sl-SI-2FDuP5IV.js → sl-SI-Bq22qBey.js} +1154 -1073
- package/dist/es/{sv-SE-lw5yiImq.js → sv-SE-2gCnkRkv.js} +1156 -1075
- package/dist/style.css +29 -6
- package/dist/types/components/BusinessDetails/forms.d.ts +7 -0
- package/dist/types/components/Company/component/CompanyComponent.d.ts +8 -0
- package/dist/types/components/Company/rules.d.ts +1 -0
- package/dist/types/components/Company/types.d.ts +2 -0
- package/dist/types/components/Dropins/BusinessDetailsDropin/utils.d.ts +1 -1
- package/dist/types/components/FinancialInformation/component/FinancialInformation.d.ts +3 -0
- package/dist/types/components/FinancialInformation/component/ReportedValue.d.ts +13 -0
- package/dist/types/components/FinancialInformation/types.d.ts +14 -0
- package/dist/types/components/FinancialInformation/validate.d.ts +3 -0
- package/dist/types/components/RegistrationAddress/component/RegistrationAddressComponent.d.ts +1 -2
- package/dist/types/components/index.d.ts +8 -8
- package/dist/types/components/internal/Address/validate.d.ts +1 -1
- package/dist/types/components/internal/Currency/Currency.d.ts +2 -4
- package/dist/types/components/internal/Currency/types.d.ts +2 -2
- package/dist/types/components/internal/FinancialReportingDate/FinancialReportingDate.d.ts +3 -0
- package/dist/types/components/internal/FinancialReportingDate/types.d.ts +5 -0
- package/dist/types/components/internal/FormFields/InputCurrency.d.ts +11 -0
- package/dist/types/components/internal/FormFields/InputNumber.d.ts +2 -0
- package/dist/types/components/internal/FormFields/Radio/Radio.d.ts +11 -0
- package/dist/types/components/internal/FormFields/Radio/RadioWithLabel.d.ts +7 -0
- package/dist/types/components/internal/FormFields/RadioGroup/RadioGroup.d.ts +18 -2
- package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCard.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCardSelect.d.ts +2 -2
- package/dist/types/components/internal/FormFields/RadioGroupCard/RadioGroupCard.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroupCard/types.d.ts +1 -2
- package/dist/types/components/internal/NumberOfEmployees/NumberOfEmployees.d.ts +3 -0
- package/dist/types/components/internal/NumberOfEmployees/types.d.ts +5 -0
- package/dist/types/core/Context/ExperimentContext/types.d.ts +1 -0
- package/dist/types/core/Context/I18nProvider/I18nContext.d.ts +1 -1
- package/dist/types/core/Context/StateContext/useGlobalData.d.ts +1 -1
- package/dist/types/core/models/api/financialReport.d.ts +9 -0
- package/dist/types/core/models/api/organization.d.ts +2 -0
- package/dist/types/utils/formUtils.d.ts +1 -1
- package/dist/types/utils/formatCurrency.d.ts +2 -0
- package/dist/types/utils/get-name.d.ts +1 -1
- package/dist/types/utils/makeSelectItemForRole.d.ts +1 -1
- package/dist/types/utils/mapping/componentApiMapping.d.ts +10 -0
- package/dist/types/utils/trackNavigation.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/components/BankVerification/verification/widget/index.d.ts +0 -1
- package/dist/types/components/Dropins/CompanyDropin/index.d.ts +0 -1
- package/dist/types/components/Dropins/DropinComposer/index.d.ts +0 -1
- package/dist/types/components/Dropins/DropinLayout/ActionBar/index.d.ts +0 -1
- package/dist/types/components/Dropins/IndividualDropin/index.d.ts +0 -1
- package/dist/types/components/Dropins/PayoutDetailsDropin/index.d.ts +0 -1
- package/dist/types/components/Dropins/PciDropin/index.d.ts +0 -1
- package/dist/types/components/Dropins/RoleAndTypeDropin/index.d.ts +0 -1
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/index.d.ts +0 -1
- package/dist/types/components/Dropins/SolePropDropin/index.d.ts +0 -1
- package/dist/types/components/Dropins/TrustDropin/index.d.ts +0 -1
- package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/index.d.ts +0 -2
- package/dist/types/components/IdVerificationMethod/index.d.ts +0 -1
- package/dist/types/components/internal/Button/index.d.ts +0 -1
- package/dist/types/components/internal/ContextGuidance/index.d.ts +0 -1
- package/dist/types/components/internal/ContractViewer/index.d.ts +0 -1
- package/dist/types/components/internal/Currency/index.d.ts +0 -1
- package/dist/types/components/internal/FormFields/Checkbox/index.d.ts +0 -1
- package/dist/types/components/internal/FormFields/Field/index.d.ts +0 -1
- package/dist/types/components/internal/FormFields/InputDate/index.d.ts +0 -1
- package/dist/types/components/internal/FormFields/InputRadio/InputRadio.d.ts +0 -6
- package/dist/types/components/internal/FormFields/RadioGroup/index.d.ts +0 -1
- package/dist/types/components/internal/FormFields/RadioGroup/types.d.ts +0 -18
- package/dist/types/components/internal/FormFields/Select/index.d.ts +0 -1
- package/dist/types/components/internal/Icon/index.d.ts +0 -1
- package/dist/types/components/internal/Link/index.d.ts +0 -1
- package/dist/types/components/internal/LoaderWrapper/index.d.ts +0 -1
- package/dist/types/components/internal/PhoneInput/index.d.ts +0 -1
- package/dist/types/components/internal/Svg/index.d.ts +0 -1
- package/dist/types/language/index.d.ts +0 -1
- package/dist/types/utils/idGenerator.d.ts +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useContext, useState, useCallback, useEffect, useMemo, useReducer, useRef, useLayoutEffect } from "preact/hooks";
|
|
1
|
+
import { useContext, useState, useCallback, useEffect, useMemo, useReducer, useId, useRef, useLayoutEffect } from "preact/hooks";
|
|
2
2
|
import { createContext, isValidElement, createElement, render } from "preact";
|
|
3
3
|
import { sanitize } from "isomorphic-dompurify";
|
|
4
4
|
import cx from "classnames";
|
|
5
|
-
import { lazy, Suspense,
|
|
5
|
+
import { lazy, Suspense, forwardRef, memo, useMemo as useMemo$1 } from "preact/compat";
|
|
6
6
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
7
7
|
import debounce from "lodash-es/debounce";
|
|
8
8
|
import isEmpty$1 from "lodash-es/isEmpty";
|
|
@@ -243,6 +243,8 @@ const defaultTrans = {
|
|
|
243
243
|
codulDeIdentificareFiscala: "Codul de identificare fiscală (CIF)",
|
|
244
244
|
company: "Company",
|
|
245
245
|
companyDetails: "Company details",
|
|
246
|
+
companyFinancialInformationFormHeading: "Financial Details",
|
|
247
|
+
companyFinancialInformationFormDescription: "Financial information",
|
|
246
248
|
companyLegalName: "Company legal name",
|
|
247
249
|
companyName: "Company name",
|
|
248
250
|
companyNumber: "Company number",
|
|
@@ -298,6 +300,7 @@ const defaultTrans = {
|
|
|
298
300
|
cyRegistrationNumber: "Αριθμός Εγγραφής",
|
|
299
301
|
dateDeedWasSigned: "Date deed was signed",
|
|
300
302
|
dateOfIncorporation: "Date of incorporation",
|
|
303
|
+
dateOfTotalAssetsCalculation: "The date on which total assets and annual turnover were calculated is often the balance sheet date.",
|
|
301
304
|
dateOnDocumentNoOlderThanXMonths: "Date on the document is no older than %{numberOfMonths} months",
|
|
302
305
|
datePlaceholder: "dd/mm/yyyy",
|
|
303
306
|
dbaName: "Doing Business As (DBA) name",
|
|
@@ -821,6 +824,7 @@ const defaultTrans = {
|
|
|
821
824
|
invalidDateOfBirth: "Please enter a valid date of birth",
|
|
822
825
|
invalidDateOfIncorporation: "Please enter a valid date of incorporation",
|
|
823
826
|
invalidEmail: "Please enter a valid email",
|
|
827
|
+
invalidFinancialReportingDate: "Please enter a valid reporting date",
|
|
824
828
|
invalidFormat: "Invalid format",
|
|
825
829
|
invalidFormatBankStatementDescription: "Please ensure your input contains solely letters, digits, currency codes, and the specified special characters: -._,:;'*!@#%()+?¿/「」",
|
|
826
830
|
invalidFormatExpects: "Invalid format. Expected format: %{format}",
|
|
@@ -845,6 +849,7 @@ const defaultTrans = {
|
|
|
845
849
|
invalidFormatIdentityNumberSG: "Please use the NRIC format: S1234567A",
|
|
846
850
|
invalidFormatIdentityNumberUS: "Please provide last 4 digits",
|
|
847
851
|
invalidFormatIdentityNumberUS9: "Please use the SSN format: XXXXXXXXX",
|
|
852
|
+
invalidNumberOfEmployees: "Please enter a valid number",
|
|
848
853
|
invalidPhoneNumber: "Please enter a valid phone number.",
|
|
849
854
|
invalidRegistrationNumber: "Invalid registration number",
|
|
850
855
|
invalidRole: "Please select a role",
|
|
@@ -1329,7 +1334,7 @@ const defaultTrans = {
|
|
|
1329
1334
|
tooManyFiles: "Too many files",
|
|
1330
1335
|
totalAssets: "Total assets",
|
|
1331
1336
|
totalAssetsCurrency: "Total assets currency",
|
|
1332
|
-
totalAssetsHelper: "
|
|
1337
|
+
totalAssetsHelper: "The sum of total liabilities and total equity.",
|
|
1333
1338
|
totalAssetsValue: "Total assets value",
|
|
1334
1339
|
tradingName: "Trading name",
|
|
1335
1340
|
transferInstrumentDeleted: "Transfer instrument deleted",
|
|
@@ -1475,7 +1480,9 @@ const defaultTrans = {
|
|
|
1475
1480
|
yourIbanShouldBeginWith_: "Your IBAN should begin with %{countryCode}.",
|
|
1476
1481
|
zentralesVereinsregisterId: "Zentrales Vereinsregister ID",
|
|
1477
1482
|
zipCode: "ZIP code",
|
|
1478
|
-
incorporatedAssociationRegistrationNumber: "Incorporated association registration number"
|
|
1483
|
+
incorporatedAssociationRegistrationNumber: "Incorporated association registration number",
|
|
1484
|
+
reportingCurrency: "Reporting currency",
|
|
1485
|
+
reportedValue: "Reported value"
|
|
1479
1486
|
};
|
|
1480
1487
|
const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1481
1488
|
__proto__: null,
|
|
@@ -1781,7 +1788,7 @@ var StateCodesUS = /* @__PURE__ */ ((StateCodesUS2) => {
|
|
|
1781
1788
|
StateCodesUS2["Wyoming"] = "WY";
|
|
1782
1789
|
return StateCodesUS2;
|
|
1783
1790
|
})(StateCodesUS || {});
|
|
1784
|
-
const logger$
|
|
1791
|
+
const logger$E = createLogger("useBusinessData");
|
|
1785
1792
|
const LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 1577664e5;
|
|
1786
1793
|
const KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS = [StateCodesUS.Arkansas, StateCodesUS.Connecticut, StateCodesUS.Georgia, StateCodesUS.Hawaii, StateCodesUS.Indiana, StateCodesUS.Kentucky, StateCodesUS.Maryland, StateCodesUS.Minnesota, StateCodesUS.Missouri, StateCodesUS.Montana, StateCodesUS.NewHampshire, StateCodesUS.NewMexico, StateCodesUS.SouthCarolina, StateCodesUS.Utah, StateCodesUS.Vermont, StateCodesUS.Wisconsin, StateCodesUS.Wyoming];
|
|
1787
1794
|
const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [StateCodesUS.California, StateCodesUS.Texas];
|
|
@@ -1819,7 +1826,7 @@ function useBusinessData({
|
|
|
1819
1826
|
};
|
|
1820
1827
|
const searchForBusiness = useCallback(async (data) => {
|
|
1821
1828
|
if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
|
|
1822
|
-
logger$
|
|
1829
|
+
logger$E.log("Missing handlers for searchForBusiness");
|
|
1823
1830
|
return;
|
|
1824
1831
|
}
|
|
1825
1832
|
if (searchResults && objectsDeepEqual(cachedSearch, data)) return;
|
|
@@ -1836,7 +1843,7 @@ function useBusinessData({
|
|
|
1836
1843
|
return response == null ? void 0 : response.results;
|
|
1837
1844
|
} catch (e) {
|
|
1838
1845
|
setSearching("error");
|
|
1839
|
-
logger$
|
|
1846
|
+
logger$E.error(e);
|
|
1840
1847
|
} finally {
|
|
1841
1848
|
setCachedSearch(data);
|
|
1842
1849
|
setSearching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
@@ -1844,7 +1851,7 @@ function useBusinessData({
|
|
|
1844
1851
|
}, [handleCompanyDeepSearch, handleCompanyIndexSearch, searchResults, cachedSearch]);
|
|
1845
1852
|
const fetchBusinessData = useCallback(async (company, state) => {
|
|
1846
1853
|
if (!handleGetCompanyDataset || !handleRefreshCompanyDataset) {
|
|
1847
|
-
logger$
|
|
1854
|
+
logger$E.log("Missing handlers for fetchBusinessData");
|
|
1848
1855
|
return;
|
|
1849
1856
|
}
|
|
1850
1857
|
if (cachedBusiness && objectsDeepEqual({
|
|
@@ -1885,14 +1892,14 @@ function useBusinessData({
|
|
|
1885
1892
|
} catch (e) {
|
|
1886
1893
|
setFetching("error");
|
|
1887
1894
|
setCachedBusiness(void 0);
|
|
1888
|
-
logger$
|
|
1895
|
+
logger$E.error(e);
|
|
1889
1896
|
} finally {
|
|
1890
1897
|
setFetching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
1891
1898
|
}
|
|
1892
1899
|
}, [cachedBusiness, handleGetCompanyDataset, handleRefreshCompanyDataset]);
|
|
1893
1900
|
const verifyBusinessData = useCallback(async (data, tin) => {
|
|
1894
1901
|
if (!handleVerifyTin) {
|
|
1895
|
-
logger$
|
|
1902
|
+
logger$E.log("Missing handlers for verifyBusinessData");
|
|
1896
1903
|
return;
|
|
1897
1904
|
}
|
|
1898
1905
|
try {
|
|
@@ -1913,7 +1920,7 @@ function useBusinessData({
|
|
|
1913
1920
|
return matched;
|
|
1914
1921
|
} catch (e) {
|
|
1915
1922
|
setVerifying("error");
|
|
1916
|
-
logger$
|
|
1923
|
+
logger$E.error(e);
|
|
1917
1924
|
} finally {
|
|
1918
1925
|
setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
1919
1926
|
}
|
|
@@ -1924,7 +1931,7 @@ function useBusinessData({
|
|
|
1924
1931
|
await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
|
|
1925
1932
|
} catch (e) {
|
|
1926
1933
|
setResettingTrustedData("error");
|
|
1927
|
-
logger$
|
|
1934
|
+
logger$E.error(e);
|
|
1928
1935
|
} finally {
|
|
1929
1936
|
setResettingTrustedData((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
1930
1937
|
}
|
|
@@ -2137,8 +2144,8 @@ const getFormattingRegEx = (specChars, flags = "g") => new RegExp(`[${specChars}
|
|
|
2137
2144
|
const trimValWithOneSpace = (val) => val.trimStart().replace(/\s+/g, " ");
|
|
2138
2145
|
const EMOJI_REGEX = new RegExp("(\\p{Emoji}\\uFE0F|\\p{Emoji_Presentation}|\\p{Extended_Pictographic})", "gu");
|
|
2139
2146
|
const NO_ALPHABET_REGEX = /^[^a-zA-Z]*$/;
|
|
2140
|
-
const INDIVIDUAL_VALID_CHAR_REGEX = /^[\
|
|
2141
|
-
const OTHER_ENTITIES_VALID_CHAR_REGEX = /^[\w\s,.;:\-—&!?@()"'
|
|
2147
|
+
const INDIVIDUAL_VALID_CHAR_REGEX = /^[\p{L}\p{M}\d\s\-—./']*$/u;
|
|
2148
|
+
const OTHER_ENTITIES_VALID_CHAR_REGEX = /^[\w\s,.;:\-—&!?@()"'/\\+\p{L}\p{M}]+$/u;
|
|
2142
2149
|
const matchesRegex = (regex, input) => isString(input) && regex.test(input ?? "");
|
|
2143
2150
|
const hasRepeatedCharacters = (input) => !isEmpty(input) && input.length > 1 && new Set(input).size === 1;
|
|
2144
2151
|
const isValidMinLength = (input, minLength = 1) => !isEmpty(input) && input.length >= minLength;
|
|
@@ -2225,7 +2232,7 @@ const svgs = {
|
|
|
2225
2232
|
"trustly-logo": lazy(() => import("./trustly-logo-YJslAOYF.js"))
|
|
2226
2233
|
};
|
|
2227
2234
|
const unscalableIconNames = ["bin", "check", "checkmark", "checkmark-small", "chevron-right", "chevron-left", "company", "contract", "cross", "decision-maker", "document", "download", "edit", "info-circle", "image", "location", "payout", "pci", "plus", "remove", "save", "search", "trust", "user", "upload", "warning"];
|
|
2228
|
-
const logger$
|
|
2235
|
+
const logger$D = createLogger("Icon");
|
|
2229
2236
|
const Svg = ({
|
|
2230
2237
|
className,
|
|
2231
2238
|
name,
|
|
@@ -2236,7 +2243,7 @@ const Svg = ({
|
|
|
2236
2243
|
const LazyLoadedSvg = svgs[name];
|
|
2237
2244
|
const viewBox = unscalableIconNames.includes(name) ? "0 0 16 16" : void 0;
|
|
2238
2245
|
if (!LazyLoadedSvg) {
|
|
2239
|
-
logger$
|
|
2246
|
+
logger$D.error(`No such svg: "${name}"`);
|
|
2240
2247
|
return null;
|
|
2241
2248
|
}
|
|
2242
2249
|
return jsx("span", {
|
|
@@ -2526,10 +2533,10 @@ function useFormRouterContext() {
|
|
|
2526
2533
|
}
|
|
2527
2534
|
return context;
|
|
2528
2535
|
}
|
|
2529
|
-
const logger$
|
|
2536
|
+
const logger$C = createLogger("Link");
|
|
2530
2537
|
const isValidLink = (href) => {
|
|
2531
2538
|
if (href === "#") {
|
|
2532
|
-
logger$
|
|
2539
|
+
logger$C.error('Links must include a valid href. If your href is "#", consider using a Button instead');
|
|
2533
2540
|
return false;
|
|
2534
2541
|
}
|
|
2535
2542
|
return true;
|
|
@@ -2816,6 +2823,7 @@ var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
|
|
|
2816
2823
|
ExperimentNames2["EnableNationalitySGHK"] = "EnableNationalitySGHK";
|
|
2817
2824
|
ExperimentNames2["EnableAUGovernmentalOrganizationSkipRegistrationNumber"] = "EnableAUGovernmentalOrganizationSkipRegistrationNumber";
|
|
2818
2825
|
ExperimentNames2["EnableMinimalRegistrationNumberValidationForAuIncorporatedAssociation"] = "EnableMinimalRegistrationNumberValidationForAuIncorporatedAssociation";
|
|
2826
|
+
ExperimentNames2["EnableFinancialInformationComponentV4"] = "EnableFinancialInformationComponentV4";
|
|
2819
2827
|
ExperimentNames2["EnablePreferInstantVerificationFlow"] = "EnablePreferInstantVerificationFlow";
|
|
2820
2828
|
return ExperimentNames2;
|
|
2821
2829
|
})(ExperimentNames || {});
|
|
@@ -2877,7 +2885,7 @@ const useSetting = (settingName) => {
|
|
|
2877
2885
|
} = context;
|
|
2878
2886
|
return getSetting(settingName);
|
|
2879
2887
|
};
|
|
2880
|
-
const logger$
|
|
2888
|
+
const logger$B = createLogger("useAllowedCountries");
|
|
2881
2889
|
const useAllowedCountries = () => {
|
|
2882
2890
|
const acceptedCountries = useSetting("acceptedCountries");
|
|
2883
2891
|
const {
|
|
@@ -2886,7 +2894,7 @@ const useAllowedCountries = () => {
|
|
|
2886
2894
|
const [allowedCountries, setAllowedCountries] = useState(acceptedCountries);
|
|
2887
2895
|
useEffect(() => {
|
|
2888
2896
|
if (acceptedCountries !== void 0) return;
|
|
2889
|
-
getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$
|
|
2897
|
+
getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$B.error);
|
|
2890
2898
|
}, [acceptedCountries]);
|
|
2891
2899
|
return allowedCountries;
|
|
2892
2900
|
};
|
|
@@ -3245,7 +3253,7 @@ function reducer({
|
|
|
3245
3253
|
}
|
|
3246
3254
|
};
|
|
3247
3255
|
}
|
|
3248
|
-
const logger$
|
|
3256
|
+
const logger$A = createLogger("useAsyncValidator");
|
|
3249
3257
|
const useAsyncValidator = (asyncRules) => {
|
|
3250
3258
|
const [asyncValidationResults, setAsyncValidationResults] = useState({});
|
|
3251
3259
|
const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
|
|
@@ -3266,7 +3274,7 @@ const useAsyncValidator = (asyncRules) => {
|
|
|
3266
3274
|
hasError: !isValid
|
|
3267
3275
|
}])
|
|
3268
3276
|
});
|
|
3269
|
-
}).catch(logger$
|
|
3277
|
+
}).catch(logger$A.error);
|
|
3270
3278
|
}, [asyncRules, clearAsyncValidationResults]);
|
|
3271
3279
|
return {
|
|
3272
3280
|
asyncValidationResults,
|
|
@@ -3338,7 +3346,7 @@ function useForm({
|
|
|
3338
3346
|
asyncValidationResults
|
|
3339
3347
|
} = useAsyncValidator(asyncRules);
|
|
3340
3348
|
const getRequiredFields = useMemo(() => typeof schema === "function" ? schema : () => schema, [schema]);
|
|
3341
|
-
const
|
|
3349
|
+
const getSchema2 = useMemo(() => defaultData ? getRequiredFields(defaultData) : [], [defaultData, getRequiredFields]);
|
|
3342
3350
|
const getReducer = useCallback(() => reducer({
|
|
3343
3351
|
staticValidate: triggerStaticValidation,
|
|
3344
3352
|
asyncValidate: triggerAsyncValidation,
|
|
@@ -3348,7 +3356,7 @@ function useForm({
|
|
|
3348
3356
|
formatters
|
|
3349
3357
|
}), [triggerStaticValidation, triggerAsyncValidation, obscuredFields, optionalFields, trustedFields, formatters]);
|
|
3350
3358
|
const initialData = useMemo(() => ({
|
|
3351
|
-
schema:
|
|
3359
|
+
schema: getSchema2,
|
|
3352
3360
|
defaultData,
|
|
3353
3361
|
fieldProblems,
|
|
3354
3362
|
obscuredFields,
|
|
@@ -3357,7 +3365,7 @@ function useForm({
|
|
|
3357
3365
|
formatters,
|
|
3358
3366
|
staticValidate: triggerStaticValidation,
|
|
3359
3367
|
asyncValidate: triggerAsyncValidation
|
|
3360
|
-
}), [
|
|
3368
|
+
}), [getSchema2, defaultData, fieldProblems, obscuredFields, optionalFields, trustedFields, formatters, triggerStaticValidation, triggerAsyncValidation]);
|
|
3361
3369
|
const [state, dispatch] = useReducer(getReducer(), initialData, init);
|
|
3362
3370
|
const isValid = useMemo(() => {
|
|
3363
3371
|
var _a;
|
|
@@ -3416,7 +3424,7 @@ function useForm({
|
|
|
3416
3424
|
});
|
|
3417
3425
|
}, [defaultData]);
|
|
3418
3426
|
const resetToDefaultData = useCallback(() => {
|
|
3419
|
-
|
|
3427
|
+
getSchema2.forEach((field) => {
|
|
3420
3428
|
if (!defaultData || typeof defaultData[field] !== "undefined") {
|
|
3421
3429
|
return handleChangeFor(field)(defaultData == null ? void 0 : defaultData[field]);
|
|
3422
3430
|
}
|
|
@@ -3424,7 +3432,7 @@ function useForm({
|
|
|
3424
3432
|
setErrors(field, null);
|
|
3425
3433
|
setData(field, defaultData[field]);
|
|
3426
3434
|
});
|
|
3427
|
-
}, [defaultData,
|
|
3435
|
+
}, [defaultData, getSchema2, handleChangeFor, setData, setErrors, setValid]);
|
|
3428
3436
|
useEffect(() => {
|
|
3429
3437
|
const newSchema = getRequiredFields(state.data);
|
|
3430
3438
|
if (!doArraysMatch(state.schema, newSchema)) {
|
|
@@ -7219,7 +7227,7 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
|
|
|
7219
7227
|
};
|
|
7220
7228
|
};
|
|
7221
7229
|
const MISMATCH_ANIMATION_NAME = "mismatchShake";
|
|
7222
|
-
const logger$
|
|
7230
|
+
const logger$z = createLogger("MaskedInputText");
|
|
7223
7231
|
const MaskedInputText = ({
|
|
7224
7232
|
value,
|
|
7225
7233
|
onInput,
|
|
@@ -7268,7 +7276,7 @@ const MaskedInputText = ({
|
|
|
7268
7276
|
};
|
|
7269
7277
|
useEffect(() => {
|
|
7270
7278
|
if (!mask) {
|
|
7271
|
-
logger$
|
|
7279
|
+
logger$z.warn("`mask` is undefined. No masking of input will take place.");
|
|
7272
7280
|
}
|
|
7273
7281
|
}, [mask]);
|
|
7274
7282
|
const getMaskResult = useCallback((pureValue) => {
|
|
@@ -7293,13 +7301,13 @@ const MaskedInputText = ({
|
|
|
7293
7301
|
return;
|
|
7294
7302
|
}
|
|
7295
7303
|
if (preserveMismatchingInitialValue) {
|
|
7296
|
-
logger$
|
|
7304
|
+
logger$z.warn(`Value received "${value}" does not match mask`, maskResult, `
|
|
7297
7305
|
Preserving mismatched initial value until user input.`);
|
|
7298
7306
|
setPreservingMismatchedValue(true);
|
|
7299
7307
|
return;
|
|
7300
7308
|
}
|
|
7301
7309
|
const fallback = displayValueToPure(maskResult.partialDisplayValue);
|
|
7302
|
-
logger$
|
|
7310
|
+
logger$z.warn(`Value received "${value}" does not match mask`, maskResult, `
|
|
7303
7311
|
Falling back to partially valid value "${fallback}"`);
|
|
7304
7312
|
onInput(fallback);
|
|
7305
7313
|
}
|
|
@@ -7453,58 +7461,82 @@ Falling back to partially valid value "${fallback}"`);
|
|
|
7453
7461
|
})
|
|
7454
7462
|
});
|
|
7455
7463
|
};
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
+
const Radio = ({
|
|
7465
|
+
id,
|
|
7466
|
+
value,
|
|
7467
|
+
groupName,
|
|
7468
|
+
checked = false,
|
|
7469
|
+
disabled = false,
|
|
7470
|
+
onClick,
|
|
7471
|
+
className
|
|
7464
7472
|
}) => jsx("input", {
|
|
7465
|
-
|
|
7466
|
-
|
|
7473
|
+
className: cx(["adyen-kyc-input-radio__input", className]),
|
|
7474
|
+
id,
|
|
7475
|
+
type: "radio",
|
|
7476
|
+
checked,
|
|
7477
|
+
name: groupName,
|
|
7478
|
+
onClick,
|
|
7479
|
+
value,
|
|
7480
|
+
disabled
|
|
7467
7481
|
});
|
|
7482
|
+
const RadioWithLabel = ({
|
|
7483
|
+
value,
|
|
7484
|
+
label,
|
|
7485
|
+
content,
|
|
7486
|
+
groupName,
|
|
7487
|
+
checked = false,
|
|
7488
|
+
disabled = false,
|
|
7489
|
+
onClick
|
|
7490
|
+
}) => {
|
|
7491
|
+
const id = useId();
|
|
7492
|
+
return jsxs("label", {
|
|
7493
|
+
htmlFor: id,
|
|
7494
|
+
className: "adyen-kyc-input-radio",
|
|
7495
|
+
children: [jsx(Radio, {
|
|
7496
|
+
id,
|
|
7497
|
+
checked,
|
|
7498
|
+
groupName,
|
|
7499
|
+
onClick,
|
|
7500
|
+
value,
|
|
7501
|
+
disabled
|
|
7502
|
+
}), jsxs("div", {
|
|
7503
|
+
className: "adyen-kyc-input-radio__content",
|
|
7504
|
+
children: [jsx("span", {
|
|
7505
|
+
className: "adyen-kyc-input-radio__label adyen-kyc-label__text",
|
|
7506
|
+
children: label
|
|
7507
|
+
}), content]
|
|
7508
|
+
})]
|
|
7509
|
+
});
|
|
7510
|
+
};
|
|
7468
7511
|
function RadioGroup({
|
|
7469
7512
|
items = [],
|
|
7470
7513
|
name,
|
|
7471
7514
|
onChange = noop,
|
|
7472
7515
|
value,
|
|
7473
|
-
isInvalid,
|
|
7474
|
-
uniqueId,
|
|
7475
|
-
className,
|
|
7476
7516
|
disabled = false,
|
|
7477
|
-
horizontal = false
|
|
7517
|
+
horizontal = false,
|
|
7518
|
+
showContentOnlyOnSelected = false,
|
|
7519
|
+
className
|
|
7478
7520
|
}) {
|
|
7479
7521
|
const {
|
|
7480
7522
|
i18n
|
|
7481
7523
|
} = useI18nContext();
|
|
7482
|
-
const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
|
|
7483
|
-
const classes = horizontal ? "adyen-kyc-radio-group adyen-kyc-radio-group--horizontal" : "adyen-kyc-radio-group";
|
|
7484
7524
|
return jsx("div", {
|
|
7485
|
-
className:
|
|
7525
|
+
className: cx(["adyen-kyc-radio-group", {
|
|
7526
|
+
"adyen-kyc-radio-group--horizontal": horizontal
|
|
7527
|
+
}, className]),
|
|
7486
7528
|
children: items.map((item) => {
|
|
7487
|
-
const
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
onClick: onChange,
|
|
7499
|
-
value: item.id,
|
|
7500
|
-
disabled
|
|
7501
|
-
}), jsx("span", {
|
|
7502
|
-
className: cx(["adyen-kyc-input-radio__label", "adyen-kyc-label__text", className, {
|
|
7503
|
-
"adyen-kyc-radio-group__label--invalid": isInvalid
|
|
7504
|
-
}]),
|
|
7505
|
-
children: i18n.get(item.name)
|
|
7506
|
-
})]
|
|
7507
|
-
}, item.name || item.id);
|
|
7529
|
+
const isSelected = item.id === value;
|
|
7530
|
+
const visibleContent = isSelected || !showContentOnlyOnSelected ? item.content : void 0;
|
|
7531
|
+
return jsx(RadioWithLabel, {
|
|
7532
|
+
value: item.id,
|
|
7533
|
+
label: i18n.get(item.name),
|
|
7534
|
+
content: visibleContent,
|
|
7535
|
+
groupName: name,
|
|
7536
|
+
checked: isSelected,
|
|
7537
|
+
disabled,
|
|
7538
|
+
onClick: () => onChange(item.id)
|
|
7539
|
+
}, item.id);
|
|
7508
7540
|
})
|
|
7509
7541
|
});
|
|
7510
7542
|
}
|
|
@@ -7689,7 +7721,7 @@ function CompanyRegistrationNumberTypeSelector({
|
|
|
7689
7721
|
name: "companyRegistrationNumberType",
|
|
7690
7722
|
items: options,
|
|
7691
7723
|
value: selected,
|
|
7692
|
-
onChange:
|
|
7724
|
+
onChange: handleSelect
|
|
7693
7725
|
})
|
|
7694
7726
|
});
|
|
7695
7727
|
}
|
|
@@ -9215,7 +9247,7 @@ function TaxIdNumberTypeSelector({
|
|
|
9215
9247
|
name: "taxIdNumberType",
|
|
9216
9248
|
items: options,
|
|
9217
9249
|
value: selected,
|
|
9218
|
-
onChange:
|
|
9250
|
+
onChange: handleSelect
|
|
9219
9251
|
})
|
|
9220
9252
|
});
|
|
9221
9253
|
}
|
|
@@ -9909,6 +9941,9 @@ const companyBase = {
|
|
|
9909
9941
|
},
|
|
9910
9942
|
countryOfGoverningLaw: {
|
|
9911
9943
|
rule: "countryOfGoverningLawRequired"
|
|
9944
|
+
},
|
|
9945
|
+
numberOfEmployees: {
|
|
9946
|
+
rule: "countryRequiringFinancialInformation"
|
|
9912
9947
|
}
|
|
9913
9948
|
};
|
|
9914
9949
|
const businessDetailsBase = {
|
|
@@ -10301,7 +10336,6 @@ const RadioCard = ({
|
|
|
10301
10336
|
optionDescription,
|
|
10302
10337
|
optionSubtitle,
|
|
10303
10338
|
name,
|
|
10304
|
-
uniqueId,
|
|
10305
10339
|
isInvalid,
|
|
10306
10340
|
isSelected,
|
|
10307
10341
|
onSelect,
|
|
@@ -10310,13 +10344,15 @@ const RadioCard = ({
|
|
|
10310
10344
|
loading,
|
|
10311
10345
|
icon,
|
|
10312
10346
|
body,
|
|
10313
|
-
footer
|
|
10347
|
+
footer,
|
|
10348
|
+
floatingRadio
|
|
10314
10349
|
}) => {
|
|
10315
10350
|
const {
|
|
10316
10351
|
i18n
|
|
10317
10352
|
} = useI18nContext();
|
|
10353
|
+
const id = useId();
|
|
10318
10354
|
return jsxs("label", {
|
|
10319
|
-
htmlFor:
|
|
10355
|
+
htmlFor: id,
|
|
10320
10356
|
className: cx(["adyen-kyc-radio-card", classNames == null ? void 0 : classNames.label, {
|
|
10321
10357
|
"adyen-kyc-radio-card--disabled": disabled
|
|
10322
10358
|
}]),
|
|
@@ -10350,55 +10386,49 @@ const RadioCard = ({
|
|
|
10350
10386
|
size: "small",
|
|
10351
10387
|
dot: true
|
|
10352
10388
|
})
|
|
10353
|
-
}) : jsx(
|
|
10354
|
-
id
|
|
10355
|
-
type: "radio",
|
|
10389
|
+
}) : jsx(Radio, {
|
|
10390
|
+
id,
|
|
10356
10391
|
checked: isSelected,
|
|
10357
|
-
|
|
10358
|
-
name,
|
|
10359
|
-
onChange: onSelect,
|
|
10392
|
+
groupName: name,
|
|
10360
10393
|
onClick: onSelect,
|
|
10361
10394
|
value: optionId,
|
|
10362
|
-
|
|
10363
|
-
|
|
10395
|
+
disabled,
|
|
10396
|
+
className: cx({
|
|
10397
|
+
"adyen-kyc-radio-group-card__radio--floating": floatingRadio
|
|
10398
|
+
})
|
|
10364
10399
|
})]
|
|
10365
10400
|
}, optionId);
|
|
10366
10401
|
};
|
|
10367
|
-
|
|
10402
|
+
const RadioGroupCard = ({
|
|
10368
10403
|
items,
|
|
10369
10404
|
name,
|
|
10370
10405
|
onSelect,
|
|
10371
10406
|
selected,
|
|
10372
10407
|
isInvalid,
|
|
10373
|
-
uniqueId,
|
|
10374
10408
|
className,
|
|
10375
10409
|
itemClassNames,
|
|
10376
10410
|
itemIcon,
|
|
10377
10411
|
itemBody,
|
|
10378
10412
|
itemFooter,
|
|
10379
10413
|
isItemDisabled
|
|
10380
|
-
}) {
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
disabled: isItemDisabled == null ? void 0 : isItemDisabled(item)
|
|
10399
|
-
}, item.id))
|
|
10400
|
-
});
|
|
10401
|
-
}
|
|
10414
|
+
}) => jsx("div", {
|
|
10415
|
+
className: className ?? "adyen-kyc-radio-group-card",
|
|
10416
|
+
children: items.map((item) => jsx(RadioCard, {
|
|
10417
|
+
optionId: item.id,
|
|
10418
|
+
optionName: item.name,
|
|
10419
|
+
optionDescription: item.description,
|
|
10420
|
+
optionSubtitle: item.subtitle,
|
|
10421
|
+
isInvalid,
|
|
10422
|
+
isSelected: selected === item,
|
|
10423
|
+
onSelect: () => onSelect(item),
|
|
10424
|
+
name,
|
|
10425
|
+
classNames: itemClassNames == null ? void 0 : itemClassNames(item),
|
|
10426
|
+
icon: itemIcon == null ? void 0 : itemIcon(item),
|
|
10427
|
+
body: itemBody == null ? void 0 : itemBody(item),
|
|
10428
|
+
footer: itemFooter == null ? void 0 : itemFooter(item),
|
|
10429
|
+
disabled: isItemDisabled == null ? void 0 : isItemDisabled(item)
|
|
10430
|
+
}, item.id))
|
|
10431
|
+
});
|
|
10402
10432
|
const EntityTypeRadioGroupCard = ({
|
|
10403
10433
|
examples,
|
|
10404
10434
|
...baseProps
|
|
@@ -10924,7 +10954,7 @@ function Dropzone(props) {
|
|
|
10924
10954
|
})]
|
|
10925
10955
|
});
|
|
10926
10956
|
}
|
|
10927
|
-
const logger$
|
|
10957
|
+
const logger$y = createLogger("TextArea");
|
|
10928
10958
|
function TextArea(props) {
|
|
10929
10959
|
const {
|
|
10930
10960
|
classNameModifiers,
|
|
@@ -10945,7 +10975,7 @@ function TextArea(props) {
|
|
|
10945
10975
|
} = useI18nContext();
|
|
10946
10976
|
const [value, setValue] = useState("");
|
|
10947
10977
|
if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
|
|
10948
|
-
logger$
|
|
10978
|
+
logger$y.error("Error: Form fields that rely on InputBase may not have an onChange property");
|
|
10949
10979
|
}
|
|
10950
10980
|
const handleInput = (e) => {
|
|
10951
10981
|
var _a;
|
|
@@ -11121,6 +11151,433 @@ function DocumentUploadComponent({
|
|
|
11121
11151
|
});
|
|
11122
11152
|
}
|
|
11123
11153
|
const DocumentUpload = memo(DocumentUploadComponent, (prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.documentTypeSelect, nextProps.documentTypeSelect) && prevProps.documentField === nextProps.documentField && prevProps.name === nextProps.name && prevProps.country === nextProps.country && prevProps.companyType === nextProps.companyType);
|
|
11154
|
+
var Currencies = /* @__PURE__ */ ((Currencies2) => {
|
|
11155
|
+
Currencies2["AED"] = "AED";
|
|
11156
|
+
Currencies2["AUD"] = "AUD";
|
|
11157
|
+
Currencies2["BGN"] = "BGN";
|
|
11158
|
+
Currencies2["BRL"] = "BRL";
|
|
11159
|
+
Currencies2["CAD"] = "CAD";
|
|
11160
|
+
Currencies2["CHF"] = "CHF";
|
|
11161
|
+
Currencies2["CZK"] = "CZK";
|
|
11162
|
+
Currencies2["DKK"] = "DKK";
|
|
11163
|
+
Currencies2["EUR"] = "EUR";
|
|
11164
|
+
Currencies2["GBP"] = "GBP";
|
|
11165
|
+
Currencies2["HKD"] = "HKD";
|
|
11166
|
+
Currencies2["HRK"] = "HRK";
|
|
11167
|
+
Currencies2["HUF"] = "HUF";
|
|
11168
|
+
Currencies2["MXN"] = "MXN";
|
|
11169
|
+
Currencies2["MYR"] = "MYR";
|
|
11170
|
+
Currencies2["NOK"] = "NOK";
|
|
11171
|
+
Currencies2["NZD"] = "NZD";
|
|
11172
|
+
Currencies2["PLN"] = "PLN";
|
|
11173
|
+
Currencies2["RON"] = "RON";
|
|
11174
|
+
Currencies2["SEK"] = "SEK";
|
|
11175
|
+
Currencies2["SGD"] = "SGD";
|
|
11176
|
+
Currencies2["USD"] = "USD";
|
|
11177
|
+
return Currencies2;
|
|
11178
|
+
})(Currencies || {});
|
|
11179
|
+
const currencyByCountry = {
|
|
11180
|
+
[CountryCodes.Australia]: [Currencies.AUD],
|
|
11181
|
+
[CountryCodes.Austria]: [Currencies.EUR],
|
|
11182
|
+
[CountryCodes.Belgium]: [Currencies.EUR],
|
|
11183
|
+
[CountryCodes.Brazil]: [Currencies.BRL],
|
|
11184
|
+
[CountryCodes.Bulgaria]: [Currencies.BGN, Currencies.EUR],
|
|
11185
|
+
[CountryCodes.Canada]: [Currencies.CAD, Currencies.USD],
|
|
11186
|
+
[CountryCodes.Croatia]: [Currencies.HRK, Currencies.EUR],
|
|
11187
|
+
[CountryCodes.Cyprus]: [Currencies.EUR],
|
|
11188
|
+
[CountryCodes.CzechRepublic]: [Currencies.CZK, Currencies.EUR],
|
|
11189
|
+
[CountryCodes.Denmark]: [Currencies.DKK, Currencies.EUR],
|
|
11190
|
+
[CountryCodes.Estonia]: [Currencies.EUR],
|
|
11191
|
+
[CountryCodes.Finland]: [Currencies.EUR],
|
|
11192
|
+
[CountryCodes.France]: [Currencies.EUR],
|
|
11193
|
+
[CountryCodes.Germany]: [Currencies.EUR],
|
|
11194
|
+
[CountryCodes.Gibraltar]: [Currencies.GBP],
|
|
11195
|
+
[CountryCodes.Greece]: [Currencies.EUR],
|
|
11196
|
+
[CountryCodes.Guernsey]: [Currencies.GBP],
|
|
11197
|
+
[CountryCodes.HongKong]: [Currencies.HKD],
|
|
11198
|
+
[CountryCodes.Hungary]: [Currencies.HUF, Currencies.EUR],
|
|
11199
|
+
[CountryCodes.Ireland]: [Currencies.EUR],
|
|
11200
|
+
[CountryCodes.IsleOfMan]: [Currencies.GBP],
|
|
11201
|
+
[CountryCodes.Italy]: [Currencies.EUR],
|
|
11202
|
+
[CountryCodes.Jersey]: [Currencies.GBP],
|
|
11203
|
+
[CountryCodes.Latvia]: [Currencies.EUR],
|
|
11204
|
+
[CountryCodes.Liechtenstein]: [Currencies.CHF, Currencies.EUR],
|
|
11205
|
+
[CountryCodes.Lithuania]: [Currencies.EUR],
|
|
11206
|
+
[CountryCodes.Luxembourg]: [Currencies.EUR],
|
|
11207
|
+
[CountryCodes.Malaysia]: [Currencies.MYR],
|
|
11208
|
+
[CountryCodes.Malta]: [Currencies.EUR],
|
|
11209
|
+
[CountryCodes.Mexico]: [Currencies.MXN],
|
|
11210
|
+
[CountryCodes.Monaco]: [Currencies.EUR],
|
|
11211
|
+
[CountryCodes.Netherlands]: [Currencies.EUR],
|
|
11212
|
+
[CountryCodes.NewZealand]: [Currencies.NZD],
|
|
11213
|
+
[CountryCodes.Norway]: [Currencies.NOK, Currencies.EUR],
|
|
11214
|
+
[CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
|
|
11215
|
+
[CountryCodes.Portugal]: [Currencies.EUR],
|
|
11216
|
+
[CountryCodes.PuertoRico]: [Currencies.USD],
|
|
11217
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11218
|
+
[CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
|
|
11219
|
+
[CountryCodes.Singapore]: [Currencies.SGD],
|
|
11220
|
+
[CountryCodes.Slovakia]: [Currencies.EUR],
|
|
11221
|
+
[CountryCodes.Slovenia]: [Currencies.EUR],
|
|
11222
|
+
[CountryCodes.Spain]: [Currencies.EUR],
|
|
11223
|
+
[CountryCodes.Sweden]: [Currencies.SEK, Currencies.EUR],
|
|
11224
|
+
[CountryCodes.Switzerland]: [Currencies.CHF, Currencies.EUR],
|
|
11225
|
+
[CountryCodes.UnitedArabEmirates]: [Currencies.AED],
|
|
11226
|
+
[CountryCodes.UnitedKingdom]: [Currencies.GBP, Currencies.EUR],
|
|
11227
|
+
[CountryCodes.UnitedStates]: [Currencies.USD]
|
|
11228
|
+
};
|
|
11229
|
+
const CURRENCY_FIELD = ["currency"];
|
|
11230
|
+
function Currency({
|
|
11231
|
+
data,
|
|
11232
|
+
valid,
|
|
11233
|
+
errors,
|
|
11234
|
+
labels: labels2,
|
|
11235
|
+
readonly,
|
|
11236
|
+
handleChangeFor,
|
|
11237
|
+
helperText,
|
|
11238
|
+
country
|
|
11239
|
+
}) {
|
|
11240
|
+
const {
|
|
11241
|
+
i18n
|
|
11242
|
+
} = useI18nContext();
|
|
11243
|
+
const currenciesForCurrCountry = currencyByCountry[country];
|
|
11244
|
+
const countryCurrenciesItems = currenciesForCurrCountry ? currenciesForCurrCountry.map((currency) => ({
|
|
11245
|
+
id: currency,
|
|
11246
|
+
name: currency
|
|
11247
|
+
})) : [];
|
|
11248
|
+
return jsx("div", {
|
|
11249
|
+
className: "adyen-kyc-field__currency",
|
|
11250
|
+
children: jsx(Field, {
|
|
11251
|
+
name: "currency",
|
|
11252
|
+
label: labels2.currency,
|
|
11253
|
+
helper: helperText == null ? void 0 : helperText.currency,
|
|
11254
|
+
errorMessage: errors.currency,
|
|
11255
|
+
isValid: valid.currency,
|
|
11256
|
+
classNameModifiers: ["currency"],
|
|
11257
|
+
children: (childProps) => jsx(Select, {
|
|
11258
|
+
...childProps,
|
|
11259
|
+
onChange: handleChangeFor("currency", "input"),
|
|
11260
|
+
name: "currency",
|
|
11261
|
+
placeholder: i18n.get("currencyPlaceholder"),
|
|
11262
|
+
selected: data.currency,
|
|
11263
|
+
items: countryCurrenciesItems,
|
|
11264
|
+
readonly: countryCurrenciesItems.length === 1 || readonly && !!data.currency
|
|
11265
|
+
})
|
|
11266
|
+
})
|
|
11267
|
+
});
|
|
11268
|
+
}
|
|
11269
|
+
const FINANCIAL_REPORTING_DATE_FIELD = ["financialReportingDate"];
|
|
11270
|
+
function FinancialReportingDate({
|
|
11271
|
+
data,
|
|
11272
|
+
valid,
|
|
11273
|
+
errors,
|
|
11274
|
+
labels: labels2,
|
|
11275
|
+
readonly,
|
|
11276
|
+
handleChangeFor
|
|
11277
|
+
}) {
|
|
11278
|
+
const {
|
|
11279
|
+
i18n
|
|
11280
|
+
} = useI18nContext();
|
|
11281
|
+
return jsx("div", {
|
|
11282
|
+
children: jsx(Field, {
|
|
11283
|
+
name: "financialReportingDate",
|
|
11284
|
+
label: labels2.financialReportingDate,
|
|
11285
|
+
helper: i18n.get("dateOfTotalAssetsCalculation"),
|
|
11286
|
+
helperPosition: "below",
|
|
11287
|
+
errorMessage: errors.financialReportingDate,
|
|
11288
|
+
isValid: valid.financialReportingDate,
|
|
11289
|
+
classNameModifiers: ["financialReportingDate"],
|
|
11290
|
+
children: (childProps) => jsx(InputDate, {
|
|
11291
|
+
...childProps,
|
|
11292
|
+
name: "financialReportingDate",
|
|
11293
|
+
value: data.financialReportingDate,
|
|
11294
|
+
onInput: handleChangeFor("financialReportingDate", "input"),
|
|
11295
|
+
onBlur: handleChangeFor("financialReportingDate", "blur"),
|
|
11296
|
+
"aria-required": true,
|
|
11297
|
+
"aria-label": labels2.financialReportingDate,
|
|
11298
|
+
"aria-invalid": !valid.financialReportingDate,
|
|
11299
|
+
readonly,
|
|
11300
|
+
max: formatDateObj(/* @__PURE__ */ new Date())
|
|
11301
|
+
})
|
|
11302
|
+
})
|
|
11303
|
+
});
|
|
11304
|
+
}
|
|
11305
|
+
function InputNumber(props) {
|
|
11306
|
+
return jsx(InputBase, {
|
|
11307
|
+
...props,
|
|
11308
|
+
type: "number"
|
|
11309
|
+
});
|
|
11310
|
+
}
|
|
11311
|
+
const NUMBER_OF_EMPLOYEES_FIELD = ["numberOfEmployees"];
|
|
11312
|
+
function NumberOfEmployees({
|
|
11313
|
+
data,
|
|
11314
|
+
valid,
|
|
11315
|
+
errors,
|
|
11316
|
+
labels: labels2,
|
|
11317
|
+
readonly,
|
|
11318
|
+
handleChangeFor,
|
|
11319
|
+
helperText
|
|
11320
|
+
}) {
|
|
11321
|
+
return jsx("div", {
|
|
11322
|
+
children: jsx(Field, {
|
|
11323
|
+
name: "numberOfEmployees",
|
|
11324
|
+
label: labels2.numberOfEmployees,
|
|
11325
|
+
helper: helperText == null ? void 0 : helperText.numberOfEmployees,
|
|
11326
|
+
errorMessage: errors.numberOfEmployees,
|
|
11327
|
+
isValid: valid.numberOfEmployees,
|
|
11328
|
+
classNameModifiers: ["numberOfEmployees"],
|
|
11329
|
+
children: (childProps) => jsx(InputNumber, {
|
|
11330
|
+
...childProps,
|
|
11331
|
+
"aria-required": true,
|
|
11332
|
+
"aria-label": labels2.numberOfEmployees,
|
|
11333
|
+
"aria-invalid": !valid.numberOfEmployees,
|
|
11334
|
+
name: "numberOfEmployees",
|
|
11335
|
+
min: "0",
|
|
11336
|
+
step: "1",
|
|
11337
|
+
value: data.numberOfEmployees,
|
|
11338
|
+
readonly,
|
|
11339
|
+
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
11340
|
+
onBlur: handleChangeFor("numberOfEmployees", "blur")
|
|
11341
|
+
})
|
|
11342
|
+
})
|
|
11343
|
+
});
|
|
11344
|
+
}
|
|
11345
|
+
const financialInfoValidationRules = {
|
|
11346
|
+
numberOfEmployees: [{
|
|
11347
|
+
modes: ["blur"],
|
|
11348
|
+
validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
|
|
11349
|
+
errorMessage: "fieldIsRequired"
|
|
11350
|
+
}],
|
|
11351
|
+
financialReportingDate: [{
|
|
11352
|
+
modes: ["blur"],
|
|
11353
|
+
validate: (date) => !isEmpty(date),
|
|
11354
|
+
errorMessage: "fieldIsRequired"
|
|
11355
|
+
}, {
|
|
11356
|
+
modes: ["blur"],
|
|
11357
|
+
validate: (date) => date ? new Date(date) < /* @__PURE__ */ new Date() : false,
|
|
11358
|
+
errorMessage: "invalidFinancialReportingDate"
|
|
11359
|
+
}],
|
|
11360
|
+
currency: [{
|
|
11361
|
+
modes: ["blur"],
|
|
11362
|
+
validate: (currency) => !isEmpty(currency),
|
|
11363
|
+
errorMessage: "fieldIsRequired"
|
|
11364
|
+
}],
|
|
11365
|
+
reportedValueOption: {
|
|
11366
|
+
modes: ["blur"],
|
|
11367
|
+
validate: (option) => !isEmpty(option),
|
|
11368
|
+
errorMessage: "fieldIsRequired"
|
|
11369
|
+
},
|
|
11370
|
+
netAssets: {
|
|
11371
|
+
modes: ["blur"],
|
|
11372
|
+
validate: (amount) => !isUndefinedOrNull(amount),
|
|
11373
|
+
errorMessage: "fieldIsRequired"
|
|
11374
|
+
},
|
|
11375
|
+
annualTurnover: {
|
|
11376
|
+
modes: ["blur"],
|
|
11377
|
+
validate: (amount) => !isUndefinedOrNull(amount),
|
|
11378
|
+
errorMessage: "fieldIsRequired"
|
|
11379
|
+
}
|
|
11380
|
+
};
|
|
11381
|
+
const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
|
|
11382
|
+
const styles$6 = {
|
|
11383
|
+
"financial-information-reported-value-options": "adyen-kyc-financial-information-reported-value-options",
|
|
11384
|
+
financialInformationReportedValueOptions
|
|
11385
|
+
};
|
|
11386
|
+
const logger$x = createLogger("InputCurrency");
|
|
11387
|
+
const determineDecimalSeparator = (formatter) => formatter.formatToParts(0.1).find((part) => part.type === "decimal").value;
|
|
11388
|
+
const determineCurrencySymbol = (formatter) => formatter.formatToParts(0).find((part) => part.type === "currency").value;
|
|
11389
|
+
const getNumberFromFormattedCurrency = (formatted, decimalSeparator) => {
|
|
11390
|
+
const lastDecimalIndex = formatted.lastIndexOf(decimalSeparator);
|
|
11391
|
+
const normalized = Array.from(formatted).reduce((acc, curr, i) => {
|
|
11392
|
+
if (/[0-9]/.test(curr)) return acc + curr;
|
|
11393
|
+
if (i === lastDecimalIndex) return `${acc}.`;
|
|
11394
|
+
return acc;
|
|
11395
|
+
}, "");
|
|
11396
|
+
return parseFloat(normalized);
|
|
11397
|
+
};
|
|
11398
|
+
const InputCurrency = ({
|
|
11399
|
+
locale,
|
|
11400
|
+
currency,
|
|
11401
|
+
amount,
|
|
11402
|
+
onAmountChanged,
|
|
11403
|
+
...baseProps
|
|
11404
|
+
}) => {
|
|
11405
|
+
const formatter = useMemo(() => new Intl.NumberFormat(locale, {
|
|
11406
|
+
style: "currency",
|
|
11407
|
+
currency
|
|
11408
|
+
}), [locale, currency]);
|
|
11409
|
+
const decimalSeparator = useMemo(() => determineDecimalSeparator(formatter), [formatter]);
|
|
11410
|
+
const currencySymbol = useMemo(() => determineCurrencySymbol(formatter), [formatter]);
|
|
11411
|
+
const [text, setText] = useState("");
|
|
11412
|
+
const onInput = (e) => setText(e.target.value);
|
|
11413
|
+
const onBlur = (e) => {
|
|
11414
|
+
const rawValue = e.target.value;
|
|
11415
|
+
const value = getNumberFromFormattedCurrency(rawValue, decimalSeparator);
|
|
11416
|
+
if (Number.isNaN(value)) {
|
|
11417
|
+
logger$x.warn(`Unable to get number from formatted currency: "${rawValue}"`);
|
|
11418
|
+
setText(isUndefinedOrNull(amount) ? currencySymbol : formatter.format(amount));
|
|
11419
|
+
return;
|
|
11420
|
+
}
|
|
11421
|
+
onAmountChanged(value);
|
|
11422
|
+
};
|
|
11423
|
+
useEffect(() => {
|
|
11424
|
+
setText(isUndefinedOrNull(amount) ? currencySymbol : formatter.format(amount));
|
|
11425
|
+
}, [amount, currencySymbol, formatter]);
|
|
11426
|
+
return jsx(InputText, {
|
|
11427
|
+
...baseProps,
|
|
11428
|
+
value: text,
|
|
11429
|
+
onInput,
|
|
11430
|
+
onBlur
|
|
11431
|
+
});
|
|
11432
|
+
};
|
|
11433
|
+
const reportedValue = "adyen-kyc-reported-value";
|
|
11434
|
+
const reportedValueInput = "adyen-kyc-reported-value-input";
|
|
11435
|
+
const styles$5 = {
|
|
11436
|
+
"reported-value": "adyen-kyc-reported-value",
|
|
11437
|
+
reportedValue,
|
|
11438
|
+
"reported-value-input": "adyen-kyc-reported-value-input",
|
|
11439
|
+
reportedValueInput
|
|
11440
|
+
};
|
|
11441
|
+
const ReportedValue = ({
|
|
11442
|
+
currency,
|
|
11443
|
+
amount,
|
|
11444
|
+
onAmountChanged,
|
|
11445
|
+
helper,
|
|
11446
|
+
fieldName,
|
|
11447
|
+
errorMessage,
|
|
11448
|
+
isValid
|
|
11449
|
+
}) => {
|
|
11450
|
+
const {
|
|
11451
|
+
i18n
|
|
11452
|
+
} = useI18nContext();
|
|
11453
|
+
return jsx("div", {
|
|
11454
|
+
className: styles$5.reportedValue,
|
|
11455
|
+
children: jsx(Field, {
|
|
11456
|
+
name: fieldName,
|
|
11457
|
+
errorMessage,
|
|
11458
|
+
isValid,
|
|
11459
|
+
helper,
|
|
11460
|
+
children: (childProps) => jsx(InputCurrency, {
|
|
11461
|
+
...childProps,
|
|
11462
|
+
locale: i18n.locale,
|
|
11463
|
+
currency,
|
|
11464
|
+
amount,
|
|
11465
|
+
onAmountChanged,
|
|
11466
|
+
className: styles$5.reportedValueInput
|
|
11467
|
+
})
|
|
11468
|
+
})
|
|
11469
|
+
});
|
|
11470
|
+
};
|
|
11471
|
+
const financialInformationFields = [...NUMBER_OF_EMPLOYEES_FIELD, ...FINANCIAL_REPORTING_DATE_FIELD, ...CURRENCY_FIELD, "reportedValueOption"];
|
|
11472
|
+
const getSchema = (data) => [...financialInformationFields, ...data.reportedValueOption ? [data.reportedValueOption] : []];
|
|
11473
|
+
function FinancialInformation(props) {
|
|
11474
|
+
var _a;
|
|
11475
|
+
const {
|
|
11476
|
+
i18n
|
|
11477
|
+
} = useI18nContext();
|
|
11478
|
+
const defaultCurrency = ((_a = currencyByCountry[props.country]) == null ? void 0 : _a[0]) ?? "EUR";
|
|
11479
|
+
const {
|
|
11480
|
+
handleChangeFor,
|
|
11481
|
+
data,
|
|
11482
|
+
valid,
|
|
11483
|
+
errors,
|
|
11484
|
+
fieldProblems,
|
|
11485
|
+
schema
|
|
11486
|
+
} = useForm({
|
|
11487
|
+
...props,
|
|
11488
|
+
schema: getSchema,
|
|
11489
|
+
defaultData: props.data,
|
|
11490
|
+
rules: financialInfoValidationRules,
|
|
11491
|
+
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
11492
|
+
});
|
|
11493
|
+
const {
|
|
11494
|
+
updateStateSlice
|
|
11495
|
+
} = useGlobalDataSlice("companyFinancialInformation");
|
|
11496
|
+
useEffect(() => {
|
|
11497
|
+
updateStateSlice({
|
|
11498
|
+
data,
|
|
11499
|
+
valid,
|
|
11500
|
+
errors,
|
|
11501
|
+
fieldProblems,
|
|
11502
|
+
schema
|
|
11503
|
+
});
|
|
11504
|
+
}, [data, valid, errors, fieldProblems, schema, updateStateSlice]);
|
|
11505
|
+
const updateReportedValueOption = (option) => {
|
|
11506
|
+
if (data.reportedValueOption) {
|
|
11507
|
+
handleChangeFor(data.reportedValueOption)(null);
|
|
11508
|
+
}
|
|
11509
|
+
const newReportedValue = option;
|
|
11510
|
+
handleChangeFor("reportedValueOption")(newReportedValue);
|
|
11511
|
+
};
|
|
11512
|
+
const formUtils = formUtilities(props, i18n);
|
|
11513
|
+
return jsxs("div", {
|
|
11514
|
+
className: "adyen-kyc-company-financial-information",
|
|
11515
|
+
children: [jsx(FormHeader, {
|
|
11516
|
+
heading: props.heading
|
|
11517
|
+
}), jsx(NumberOfEmployees, {
|
|
11518
|
+
data: formUtils.getFieldData(data, NUMBER_OF_EMPLOYEES_FIELD),
|
|
11519
|
+
errors: formUtils.getFieldErrors(errors, fieldProblems, NUMBER_OF_EMPLOYEES_FIELD),
|
|
11520
|
+
handleChangeFor,
|
|
11521
|
+
labels: formUtils.getFieldLabels(NUMBER_OF_EMPLOYEES_FIELD),
|
|
11522
|
+
readonly: formUtils.isReadOnly("numberOfEmployees"),
|
|
11523
|
+
valid: formUtils.getFieldValid(valid, NUMBER_OF_EMPLOYEES_FIELD)
|
|
11524
|
+
}), jsx(FinancialReportingDate, {
|
|
11525
|
+
data: formUtils.getFieldData(data, FINANCIAL_REPORTING_DATE_FIELD),
|
|
11526
|
+
errors: formUtils.getFieldErrors(errors, fieldProblems, FINANCIAL_REPORTING_DATE_FIELD),
|
|
11527
|
+
handleChangeFor,
|
|
11528
|
+
labels: formUtils.getFieldLabels(FINANCIAL_REPORTING_DATE_FIELD),
|
|
11529
|
+
readonly: formUtils.isReadOnly("financialReportingDate"),
|
|
11530
|
+
valid: formUtils.getFieldValid(valid, FINANCIAL_REPORTING_DATE_FIELD)
|
|
11531
|
+
}), jsx(Currency, {
|
|
11532
|
+
country: props.country,
|
|
11533
|
+
data: formUtils.getFieldData(data, CURRENCY_FIELD),
|
|
11534
|
+
errors: formUtils.getFieldErrors(errors, fieldProblems, CURRENCY_FIELD),
|
|
11535
|
+
handleChangeFor,
|
|
11536
|
+
labels: {
|
|
11537
|
+
currency: i18n.get("reportingCurrency")
|
|
11538
|
+
},
|
|
11539
|
+
readonly: formUtils.isReadOnly("currency"),
|
|
11540
|
+
valid: formUtils.getFieldValid(valid, CURRENCY_FIELD)
|
|
11541
|
+
}), jsx(Field, {
|
|
11542
|
+
name: "reportedValueOption",
|
|
11543
|
+
label: i18n.get("reportedValue"),
|
|
11544
|
+
errorMessage: formUtils.getErrorMessage("reportedValueOption", errors, fieldProblems),
|
|
11545
|
+
isValid: valid.reportedValueOption,
|
|
11546
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
11547
|
+
...childProps,
|
|
11548
|
+
value: data.reportedValueOption,
|
|
11549
|
+
items: [{
|
|
11550
|
+
id: "netAssets",
|
|
11551
|
+
name: "totalAssets",
|
|
11552
|
+
content: jsx(ReportedValue, {
|
|
11553
|
+
currency: data.currency ?? defaultCurrency,
|
|
11554
|
+
amount: data.netAssets,
|
|
11555
|
+
onAmountChanged: handleChangeFor("netAssets"),
|
|
11556
|
+
helper: i18n.get("totalAssetsHelper"),
|
|
11557
|
+
fieldName: "netAssets",
|
|
11558
|
+
isValid: valid.netAssets,
|
|
11559
|
+
errorMessage: formUtils.getErrorMessage("netAssets", errors, fieldProblems)
|
|
11560
|
+
})
|
|
11561
|
+
}, {
|
|
11562
|
+
id: "annualTurnover",
|
|
11563
|
+
name: "annualTurnover",
|
|
11564
|
+
content: jsx(ReportedValue, {
|
|
11565
|
+
currency: data.currency ?? defaultCurrency,
|
|
11566
|
+
amount: data.annualTurnover,
|
|
11567
|
+
onAmountChanged: handleChangeFor("annualTurnover"),
|
|
11568
|
+
helper: i18n.get("annualTurnoverHelper"),
|
|
11569
|
+
fieldName: "annualTurnover",
|
|
11570
|
+
isValid: valid.annualTurnover,
|
|
11571
|
+
errorMessage: formUtils.getErrorMessage("annualTurnover", errors, fieldProblems)
|
|
11572
|
+
})
|
|
11573
|
+
}],
|
|
11574
|
+
onChange: updateReportedValueOption,
|
|
11575
|
+
showContentOnlyOnSelected: true,
|
|
11576
|
+
className: styles$6.financialInformationReportedValueOptions
|
|
11577
|
+
})
|
|
11578
|
+
})]
|
|
11579
|
+
});
|
|
11580
|
+
}
|
|
11124
11581
|
function List({
|
|
11125
11582
|
className,
|
|
11126
11583
|
nested,
|
|
@@ -12868,10 +13325,7 @@ function RegistrationAddressComponent(props) {
|
|
|
12868
13325
|
handleChangeFor("operationalAddress")(state.data);
|
|
12869
13326
|
setValid("operationalAddress", Boolean(state.isValid));
|
|
12870
13327
|
};
|
|
12871
|
-
const handleOperationalAddressIsSameChange = (
|
|
12872
|
-
const {
|
|
12873
|
-
value
|
|
12874
|
-
} = e.target;
|
|
13328
|
+
const handleOperationalAddressIsSameChange = (value) => {
|
|
12875
13329
|
handleChangeFor("operationalAddressIsSame")(value);
|
|
12876
13330
|
if (value === "OperationAddressAnswerYes") setValid("operationalAddress", true);
|
|
12877
13331
|
};
|
|
@@ -13230,6 +13684,13 @@ const companyForms = {
|
|
|
13230
13684
|
formHeading: "companyTaxDocumentFormHeading",
|
|
13231
13685
|
formDescription: "companyTaxDocumentFormDescription",
|
|
13232
13686
|
fields: ["taxDocument"]
|
|
13687
|
+
},
|
|
13688
|
+
companyFinancialInformation: {
|
|
13689
|
+
formId: "companyFinancialInformation",
|
|
13690
|
+
formName: "financialInformation",
|
|
13691
|
+
formHeading: "companyFinancialInformationFormHeading",
|
|
13692
|
+
formDescription: "companyFinancialInformationFormDescription",
|
|
13693
|
+
fields: financialInformationFields
|
|
13233
13694
|
}
|
|
13234
13695
|
};
|
|
13235
13696
|
const CompanyNameAndCountryFormID = companyForms.companyNameAndCountry.formId;
|
|
@@ -13238,6 +13699,7 @@ const CompanyRegistrationDetailsFormID = companyForms.companyRegistrationDetails
|
|
|
13238
13699
|
const CompanyRegistrationAddressFormID = companyForms.companyRegistrationAddress.formId;
|
|
13239
13700
|
const CompanyRegistrationDocumentFormID = companyForms.companyRegistrationDocument.formId;
|
|
13240
13701
|
const CompanyTaxDocumentFormID = companyForms.companyTaxDocument.formId;
|
|
13702
|
+
const CompanyFinancialInformationFormID = companyForms.companyFinancialInformation.formId;
|
|
13241
13703
|
const companyDocumentForms = [CompanyRegistrationDocumentFormID, CompanyTaxDocumentFormID];
|
|
13242
13704
|
function CompanyComponent(props) {
|
|
13243
13705
|
const {
|
|
@@ -13252,6 +13714,7 @@ function CompanyComponent(props) {
|
|
|
13252
13714
|
const companyRegistrationAddressFormProps = getNestedOuterFormPropsFromOuterFormProps(props, CompanyRegistrationAddressFormID);
|
|
13253
13715
|
const companyRegistrationDocumentFormProps = getFormProps(props, CompanyRegistrationDocumentFormID);
|
|
13254
13716
|
const companyTaxDocumentFormProps = getFormProps(props, CompanyTaxDocumentFormID);
|
|
13717
|
+
const companyFinancialInformationFormProps = getFormProps(props, CompanyFinancialInformationFormID);
|
|
13255
13718
|
const handleStateChange = ({
|
|
13256
13719
|
currentState,
|
|
13257
13720
|
prevState
|
|
@@ -13359,6 +13822,14 @@ function CompanyComponent(props) {
|
|
|
13359
13822
|
}),
|
|
13360
13823
|
id: CompanyTaxDocumentFormID
|
|
13361
13824
|
})
|
|
13825
|
+
}), jsx("div", {
|
|
13826
|
+
className: props.activeForm.formId !== CompanyFinancialInformationFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
|
|
13827
|
+
children: jsx(FinancialInformation, {
|
|
13828
|
+
...companyFinancialInformationFormProps,
|
|
13829
|
+
heading: i18n.get("financialInformation"),
|
|
13830
|
+
id: CompanyFinancialInformationFormID,
|
|
13831
|
+
country: props.country
|
|
13832
|
+
})
|
|
13362
13833
|
})]
|
|
13363
13834
|
});
|
|
13364
13835
|
}
|
|
@@ -13587,6 +14058,7 @@ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
|
13587
14058
|
const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
|
|
13588
14059
|
const COUNTRIES_THAT_USES_UEN_OR_GST = [CountryCodes.Singapore];
|
|
13589
14060
|
const COUNTRIES_USING_COMPANY_SEARCH = [CountryCodes.UnitedStates];
|
|
14061
|
+
const COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [CountryCodes.UnitedKingdom];
|
|
13590
14062
|
const rules$3 = ({
|
|
13591
14063
|
data,
|
|
13592
14064
|
country,
|
|
@@ -13702,6 +14174,11 @@ const rules$3 = ({
|
|
|
13702
14174
|
if (COUNTRIES_USING_COMPANY_SEARCH.includes(country)) {
|
|
13703
14175
|
return "REQUIRED";
|
|
13704
14176
|
}
|
|
14177
|
+
},
|
|
14178
|
+
countryRequiringFinancialInformation: () => {
|
|
14179
|
+
if (isExperimentEnabled("EnableFinancialInformationComponentV4") && COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
|
|
14180
|
+
return "REQUIRED";
|
|
14181
|
+
}
|
|
13705
14182
|
}
|
|
13706
14183
|
});
|
|
13707
14184
|
var LegalEntityType = /* @__PURE__ */ ((LegalEntityType2) => {
|
|
@@ -13880,6 +14357,13 @@ const highExposureBaseMapping = {
|
|
|
13880
14357
|
"parentCompany.numberOfEmployees": "parentCompany.numberOfEmployees",
|
|
13881
14358
|
"ultimateParentCompany.numberOfEmployees": "ultimateParentCompany.numberOfEmployees"
|
|
13882
14359
|
};
|
|
14360
|
+
const financialInformationComponentsKeyMapping = {
|
|
14361
|
+
numberOfEmployees: "employeeCount",
|
|
14362
|
+
annualTurnover: "annualTurnover",
|
|
14363
|
+
netAssets: "netAssets",
|
|
14364
|
+
financialReportingDate: "dateOfFinancialData",
|
|
14365
|
+
currency: "currencyOfFinancialData"
|
|
14366
|
+
};
|
|
13883
14367
|
const businessDetailsComponentsKeyMapping = {
|
|
13884
14368
|
"additionalInformation.exemptedFromVat": "organization.vatAbsenceReason",
|
|
13885
14369
|
...businessDetailsBaseMapping
|
|
@@ -13919,6 +14403,9 @@ const solePropComponentsKeyMapping = {
|
|
|
13919
14403
|
const solePropApiKeyMapping = {
|
|
13920
14404
|
...reverseObject(solePropBaseMapping)
|
|
13921
14405
|
};
|
|
14406
|
+
const financialInformationApiKeyMapping = {
|
|
14407
|
+
...reverseObject(financialInformationComponentsKeyMapping)
|
|
14408
|
+
};
|
|
13922
14409
|
const remediationBusinessDetailsApiKeyMapping = {
|
|
13923
14410
|
...businessDetailsApiKeyMapping,
|
|
13924
14411
|
"organization.registeredAddress": "additionalInformation.registrationAddress",
|
|
@@ -14082,6 +14569,21 @@ const mapPayoutAccountToTransferInstrument = ({
|
|
|
14082
14569
|
payoutAccountData.type = TransferInstrumentType.BANK_ACCOUNT;
|
|
14083
14570
|
return payoutAccountData;
|
|
14084
14571
|
};
|
|
14572
|
+
const mapFinancialReportsToFinancialInformation = (financialReports) => {
|
|
14573
|
+
const mostRecentReport = financialReports.reduce((latest, curr) => {
|
|
14574
|
+
if (!latest || curr.dateOfFinancialData > latest.dateOfFinancialData) {
|
|
14575
|
+
return curr;
|
|
14576
|
+
}
|
|
14577
|
+
return latest;
|
|
14578
|
+
}, void 0);
|
|
14579
|
+
const financialInfo = formatObject(mostRecentReport, financialInformationComponentsKeyMapping);
|
|
14580
|
+
if (financialInfo.netAssets !== void 0) {
|
|
14581
|
+
financialInfo.reportedValueOption = "netAssets";
|
|
14582
|
+
} else if (financialInfo.annualTurnover !== void 0) {
|
|
14583
|
+
financialInfo.reportedValueOption = "annualTurnover";
|
|
14584
|
+
}
|
|
14585
|
+
return financialInfo;
|
|
14586
|
+
};
|
|
14085
14587
|
const mapLegalEntityToIndividual = (legalEntity, isChangingType) => {
|
|
14086
14588
|
var _a, _b, _c;
|
|
14087
14589
|
let individualData = formatObject(legalEntity, individualComponentsKeyMapping);
|
|
@@ -14122,7 +14624,7 @@ const mapIndividualToLegalEntity = (data) => {
|
|
|
14122
14624
|
return requestObj;
|
|
14123
14625
|
};
|
|
14124
14626
|
const mapLegalEntityToCompany = (legalEntity) => {
|
|
14125
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
14627
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
14126
14628
|
let companyCompData;
|
|
14127
14629
|
if (legalEntity == null ? void 0 : legalEntity.organization) {
|
|
14128
14630
|
companyCompData = formatObject(legalEntity, companyComponentsKeyMapping);
|
|
@@ -14159,6 +14661,9 @@ const mapLegalEntityToCompany = (legalEntity) => {
|
|
|
14159
14661
|
...mapApiDocumentToCompanyDocuments(legalEntity == null ? void 0 : legalEntity.id)
|
|
14160
14662
|
};
|
|
14161
14663
|
}
|
|
14664
|
+
if ((_j = legalEntity == null ? void 0 : legalEntity.organization) == null ? void 0 : _j.financialReports) {
|
|
14665
|
+
companyCompData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(legalEntity.organization.financialReports);
|
|
14666
|
+
}
|
|
14162
14667
|
}
|
|
14163
14668
|
companyCompData = {
|
|
14164
14669
|
...companyCompData,
|
|
@@ -14190,6 +14695,9 @@ const mapCompanyToLegalEntity = (data) => {
|
|
|
14190
14695
|
});
|
|
14191
14696
|
}
|
|
14192
14697
|
requestObj.organization = transformCountryOfGoverningLawToLegalEntity(data.companyNameAndCountry, requestObj.organization);
|
|
14698
|
+
if (data.companyFinancialInformation) {
|
|
14699
|
+
requestObj.organization.financialReports = [formatObject(data.companyFinancialInformation, financialInformationApiKeyMapping)];
|
|
14700
|
+
}
|
|
14193
14701
|
requestObj.type = LegalEntityType.ORGANIZATION;
|
|
14194
14702
|
return requestObj;
|
|
14195
14703
|
};
|
|
@@ -15035,13 +15543,12 @@ function IdDocumentUploadComponent(props) {
|
|
|
15035
15543
|
...props
|
|
15036
15544
|
});
|
|
15037
15545
|
}
|
|
15038
|
-
|
|
15546
|
+
const RadioCardSelect = ({
|
|
15039
15547
|
options,
|
|
15040
15548
|
name,
|
|
15041
15549
|
onSelect,
|
|
15042
15550
|
selected,
|
|
15043
15551
|
isInvalid,
|
|
15044
|
-
uniqueId,
|
|
15045
15552
|
className,
|
|
15046
15553
|
optionId,
|
|
15047
15554
|
optionName,
|
|
@@ -15051,29 +15558,27 @@ function RadioCardSelect({
|
|
|
15051
15558
|
renderOptionIcon,
|
|
15052
15559
|
renderOptionBody,
|
|
15053
15560
|
renderOptionFooter,
|
|
15054
|
-
isOptionDisabled
|
|
15055
|
-
|
|
15056
|
-
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15070
|
-
|
|
15071
|
-
|
|
15072
|
-
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
});
|
|
15076
|
-
}
|
|
15561
|
+
isOptionDisabled,
|
|
15562
|
+
floatingRadio
|
|
15563
|
+
}) => jsx("div", {
|
|
15564
|
+
className: className ?? "adyen-kyc-radio-group-card",
|
|
15565
|
+
children: options.map((option) => jsx(RadioCard, {
|
|
15566
|
+
optionId: optionId(option),
|
|
15567
|
+
optionName: optionName(option),
|
|
15568
|
+
optionDescription: optionDescription == null ? void 0 : optionDescription(option),
|
|
15569
|
+
optionSubtitle: optionSubtitle == null ? void 0 : optionSubtitle(option),
|
|
15570
|
+
isInvalid,
|
|
15571
|
+
isSelected: selected === option,
|
|
15572
|
+
onSelect: () => onSelect(option),
|
|
15573
|
+
name,
|
|
15574
|
+
classNames: optionClassNames == null ? void 0 : optionClassNames(option),
|
|
15575
|
+
icon: renderOptionIcon == null ? void 0 : renderOptionIcon(option),
|
|
15576
|
+
body: renderOptionBody == null ? void 0 : renderOptionBody(option),
|
|
15577
|
+
footer: renderOptionFooter == null ? void 0 : renderOptionFooter(option),
|
|
15578
|
+
disabled: isOptionDisabled == null ? void 0 : isOptionDisabled(option),
|
|
15579
|
+
floatingRadio
|
|
15580
|
+
}, optionId(option)))
|
|
15581
|
+
});
|
|
15077
15582
|
const idVerificationMethodsMetadata = {
|
|
15078
15583
|
instantVerification: {
|
|
15079
15584
|
name: "instantVerification",
|
|
@@ -15211,14 +15716,15 @@ function IdVerificationMethodComponent(props) {
|
|
|
15211
15716
|
optionDescription: (method) => idVerificationMethodsMetadata[method].description,
|
|
15212
15717
|
className: "adyen-kyc-field-verification-methods",
|
|
15213
15718
|
optionClassNames: () => ({
|
|
15214
|
-
label: "adyen-kyc-field-verification-methods__card
|
|
15719
|
+
label: "adyen-kyc-field-verification-methods__card"
|
|
15215
15720
|
}),
|
|
15216
15721
|
renderOptionIcon: (method) => jsx(IdVerificationMethodOptionIcon, {
|
|
15217
15722
|
method
|
|
15218
15723
|
}),
|
|
15219
15724
|
renderOptionFooter: (method) => jsx(IdVerificationMethodOptionFooter, {
|
|
15220
15725
|
method
|
|
15221
|
-
})
|
|
15726
|
+
}),
|
|
15727
|
+
floatingRadio: true
|
|
15222
15728
|
})
|
|
15223
15729
|
}), jsx(ContextGuidance, {
|
|
15224
15730
|
page: "Instant verification with Onfido",
|
|
@@ -16570,10 +17076,7 @@ function IndividualIdNumberTypeSelector({
|
|
|
16570
17076
|
name: "individualIdNumberType",
|
|
16571
17077
|
items: options,
|
|
16572
17078
|
value: selected,
|
|
16573
|
-
onChange: (
|
|
16574
|
-
var _a;
|
|
16575
|
-
return setSelected == null ? void 0 : setSelected((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
|
|
16576
|
-
}
|
|
17079
|
+
onChange: (value) => setSelected(value)
|
|
16577
17080
|
})
|
|
16578
17081
|
});
|
|
16579
17082
|
}
|
|
@@ -18769,81 +19272,6 @@ const ActionBar = ({
|
|
|
18769
19272
|
})
|
|
18770
19273
|
})]
|
|
18771
19274
|
});
|
|
18772
|
-
var Currencies = /* @__PURE__ */ ((Currencies2) => {
|
|
18773
|
-
Currencies2["AED"] = "AED";
|
|
18774
|
-
Currencies2["AUD"] = "AUD";
|
|
18775
|
-
Currencies2["BGN"] = "BGN";
|
|
18776
|
-
Currencies2["BRL"] = "BRL";
|
|
18777
|
-
Currencies2["CAD"] = "CAD";
|
|
18778
|
-
Currencies2["CHF"] = "CHF";
|
|
18779
|
-
Currencies2["CZK"] = "CZK";
|
|
18780
|
-
Currencies2["DKK"] = "DKK";
|
|
18781
|
-
Currencies2["EUR"] = "EUR";
|
|
18782
|
-
Currencies2["GBP"] = "GBP";
|
|
18783
|
-
Currencies2["HKD"] = "HKD";
|
|
18784
|
-
Currencies2["HRK"] = "HRK";
|
|
18785
|
-
Currencies2["HUF"] = "HUF";
|
|
18786
|
-
Currencies2["MXN"] = "MXN";
|
|
18787
|
-
Currencies2["MYR"] = "MYR";
|
|
18788
|
-
Currencies2["NOK"] = "NOK";
|
|
18789
|
-
Currencies2["NZD"] = "NZD";
|
|
18790
|
-
Currencies2["PLN"] = "PLN";
|
|
18791
|
-
Currencies2["RON"] = "RON";
|
|
18792
|
-
Currencies2["SEK"] = "SEK";
|
|
18793
|
-
Currencies2["SGD"] = "SGD";
|
|
18794
|
-
Currencies2["USD"] = "USD";
|
|
18795
|
-
return Currencies2;
|
|
18796
|
-
})(Currencies || {});
|
|
18797
|
-
const currencyByCountry = {
|
|
18798
|
-
[CountryCodes.Australia]: [Currencies.AUD],
|
|
18799
|
-
[CountryCodes.Austria]: [Currencies.EUR],
|
|
18800
|
-
[CountryCodes.Belgium]: [Currencies.EUR],
|
|
18801
|
-
[CountryCodes.Brazil]: [Currencies.BRL],
|
|
18802
|
-
[CountryCodes.Bulgaria]: [Currencies.BGN, Currencies.EUR],
|
|
18803
|
-
[CountryCodes.Canada]: [Currencies.CAD, Currencies.USD],
|
|
18804
|
-
[CountryCodes.Croatia]: [Currencies.HRK, Currencies.EUR],
|
|
18805
|
-
[CountryCodes.Cyprus]: [Currencies.EUR],
|
|
18806
|
-
[CountryCodes.CzechRepublic]: [Currencies.CZK, Currencies.EUR],
|
|
18807
|
-
[CountryCodes.Denmark]: [Currencies.DKK, Currencies.EUR],
|
|
18808
|
-
[CountryCodes.Estonia]: [Currencies.EUR],
|
|
18809
|
-
[CountryCodes.Finland]: [Currencies.EUR],
|
|
18810
|
-
[CountryCodes.France]: [Currencies.EUR],
|
|
18811
|
-
[CountryCodes.Germany]: [Currencies.EUR],
|
|
18812
|
-
[CountryCodes.Gibraltar]: [Currencies.GBP],
|
|
18813
|
-
[CountryCodes.Greece]: [Currencies.EUR],
|
|
18814
|
-
[CountryCodes.Guernsey]: [Currencies.GBP],
|
|
18815
|
-
[CountryCodes.HongKong]: [Currencies.HKD],
|
|
18816
|
-
[CountryCodes.Hungary]: [Currencies.HUF, Currencies.EUR],
|
|
18817
|
-
[CountryCodes.Ireland]: [Currencies.EUR],
|
|
18818
|
-
[CountryCodes.IsleOfMan]: [Currencies.GBP],
|
|
18819
|
-
[CountryCodes.Italy]: [Currencies.EUR],
|
|
18820
|
-
[CountryCodes.Jersey]: [Currencies.GBP],
|
|
18821
|
-
[CountryCodes.Latvia]: [Currencies.EUR],
|
|
18822
|
-
[CountryCodes.Liechtenstein]: [Currencies.CHF, Currencies.EUR],
|
|
18823
|
-
[CountryCodes.Lithuania]: [Currencies.EUR],
|
|
18824
|
-
[CountryCodes.Luxembourg]: [Currencies.EUR],
|
|
18825
|
-
[CountryCodes.Malaysia]: [Currencies.MYR],
|
|
18826
|
-
[CountryCodes.Malta]: [Currencies.EUR],
|
|
18827
|
-
[CountryCodes.Mexico]: [Currencies.MXN],
|
|
18828
|
-
[CountryCodes.Monaco]: [Currencies.EUR],
|
|
18829
|
-
[CountryCodes.Netherlands]: [Currencies.EUR],
|
|
18830
|
-
[CountryCodes.NewZealand]: [Currencies.NZD],
|
|
18831
|
-
[CountryCodes.Norway]: [Currencies.NOK, Currencies.EUR],
|
|
18832
|
-
[CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
|
|
18833
|
-
[CountryCodes.Portugal]: [Currencies.EUR],
|
|
18834
|
-
[CountryCodes.PuertoRico]: [Currencies.USD],
|
|
18835
|
-
// should exactly match CountryCodes.UnitedStates
|
|
18836
|
-
[CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
|
|
18837
|
-
[CountryCodes.Singapore]: [Currencies.SGD],
|
|
18838
|
-
[CountryCodes.Slovakia]: [Currencies.EUR],
|
|
18839
|
-
[CountryCodes.Slovenia]: [Currencies.EUR],
|
|
18840
|
-
[CountryCodes.Spain]: [Currencies.EUR],
|
|
18841
|
-
[CountryCodes.Sweden]: [Currencies.SEK, Currencies.EUR],
|
|
18842
|
-
[CountryCodes.Switzerland]: [Currencies.CHF, Currencies.EUR],
|
|
18843
|
-
[CountryCodes.UnitedArabEmirates]: [Currencies.AED],
|
|
18844
|
-
[CountryCodes.UnitedKingdom]: [Currencies.GBP, Currencies.EUR],
|
|
18845
|
-
[CountryCodes.UnitedStates]: [Currencies.USD]
|
|
18846
|
-
};
|
|
18847
19275
|
const bankVerificationValidationRules = {
|
|
18848
19276
|
verifiedAccountHolder: {
|
|
18849
19277
|
modes: ["blur"],
|
|
@@ -20191,7 +20619,6 @@ function BranchCode(props) {
|
|
|
20191
20619
|
"aria-invalid": !valid.branchCode
|
|
20192
20620
|
});
|
|
20193
20621
|
}
|
|
20194
|
-
const currencyFields = ["currency"];
|
|
20195
20622
|
const bbanPatternsByCountry = {
|
|
20196
20623
|
[CountryCodes.Albania]: /\d{8}[\dA-Z]{16}/,
|
|
20197
20624
|
[CountryCodes.Andorra]: /\d{8}[\dA-Z]{12}/,
|
|
@@ -20545,7 +20972,7 @@ const CheckGuidance = ({
|
|
|
20545
20972
|
className: "adyen-kyc-check-guidance__image"
|
|
20546
20973
|
})]
|
|
20547
20974
|
});
|
|
20548
|
-
const payoutAccountFields = ["accountHolder", ...ibanFields, ...branchCodeFields, ...swiftCodeFields, ...
|
|
20975
|
+
const payoutAccountFields = ["accountHolder", ...ibanFields, ...branchCodeFields, ...swiftCodeFields, ...bankAccountNumberFields, ...bankNameFields, ...bankCodeFields];
|
|
20549
20976
|
function PayoutAccountComponent(props) {
|
|
20550
20977
|
const {
|
|
20551
20978
|
accountHolder,
|
|
@@ -21204,7 +21631,7 @@ function PayoutVerificationMethod(props) {
|
|
|
21204
21631
|
optionSubtitle: (method) => methodsMetadata[method].subtitle,
|
|
21205
21632
|
className: "adyen-kyc-field-verification-methods",
|
|
21206
21633
|
optionClassNames: () => ({
|
|
21207
|
-
label: "adyen-kyc-field-verification-methods__card
|
|
21634
|
+
label: "adyen-kyc-field-verification-methods__card"
|
|
21208
21635
|
}),
|
|
21209
21636
|
isOptionDisabled: (option) => bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
|
|
21210
21637
|
renderOptionIcon: (method) => jsx(PayoutVerificationMethodOptionIcon, {
|
|
@@ -21214,7 +21641,8 @@ function PayoutVerificationMethod(props) {
|
|
|
21214
21641
|
renderOptionFooter: (method) => jsx(PayoutVerificationMethodOptionFooter, {
|
|
21215
21642
|
method,
|
|
21216
21643
|
methodsMetadata
|
|
21217
|
-
})
|
|
21644
|
+
}),
|
|
21645
|
+
floatingRadio: true
|
|
21218
21646
|
})]
|
|
21219
21647
|
})
|
|
21220
21648
|
}), jsx(ErrorPanel, {
|
|
@@ -23226,7 +23654,7 @@ function Summary({
|
|
|
23226
23654
|
const fieldName = i18n.get(labelData[field]) || i18n.get(field);
|
|
23227
23655
|
if (typeof fieldData === "object") {
|
|
23228
23656
|
dataList.push(renderSummaryItems(fieldData, labelData));
|
|
23229
|
-
} else if (typeof fieldData
|
|
23657
|
+
} else if (["string", "number"].includes(typeof fieldData)) {
|
|
23230
23658
|
dataList.push(jsxs("div", {
|
|
23231
23659
|
className: "adyen-kyc-summary-section__field",
|
|
23232
23660
|
children: [jsx("dt", {
|
|
@@ -24230,7 +24658,7 @@ function DBANameField({
|
|
|
24230
24658
|
name: "no"
|
|
24231
24659
|
}],
|
|
24232
24660
|
value: selection,
|
|
24233
|
-
onChange: (
|
|
24661
|
+
onChange: (newValue) => handleChangeFor("hasDba")(newValue === "yes"),
|
|
24234
24662
|
horizontal: true
|
|
24235
24663
|
})
|
|
24236
24664
|
}), data.hasDba && jsx(Field, {
|
|
@@ -25674,6 +26102,13 @@ const getForms = (country) => ({
|
|
|
25674
26102
|
formHeading: "companyTaxDocumentFormHeading",
|
|
25675
26103
|
formDescription: "companyTaxDocumentFormDescription",
|
|
25676
26104
|
fields: ["taxDocument"]
|
|
26105
|
+
},
|
|
26106
|
+
financialInformation: {
|
|
26107
|
+
formId: "financialInformation",
|
|
26108
|
+
formName: "financialInformation",
|
|
26109
|
+
formHeading: "companyFinancialInformationFormHeading",
|
|
26110
|
+
formDescription: "companyFinancialInformationFormDescription",
|
|
26111
|
+
fields: financialInformationFields
|
|
25677
26112
|
}
|
|
25678
26113
|
});
|
|
25679
26114
|
const documentFormsIds = ["companyRegistrationDocument", "companyTaxDocument"];
|
|
@@ -27647,6 +28082,15 @@ function BusinessDetailsDropinComponent({
|
|
|
27647
28082
|
})
|
|
27648
28083
|
});
|
|
27649
28084
|
}
|
|
28085
|
+
const formatCurrency = (amount, currency, locale) => {
|
|
28086
|
+
const {
|
|
28087
|
+
format
|
|
28088
|
+
} = new Intl.NumberFormat(locale, currency ? {
|
|
28089
|
+
style: "currency",
|
|
28090
|
+
currency
|
|
28091
|
+
} : void 0);
|
|
28092
|
+
return format(amount);
|
|
28093
|
+
};
|
|
27650
28094
|
const parseConfiguration$5 = ({
|
|
27651
28095
|
country,
|
|
27652
28096
|
matchingScenario
|
|
@@ -27973,6 +28417,17 @@ function CompanyDropinComponent({
|
|
|
27973
28417
|
}
|
|
27974
28418
|
delete summaryData.companyRegistrationDetails.taxInformation;
|
|
27975
28419
|
}
|
|
28420
|
+
const financialInfoSummary = summaryData.companyFinancialInformation;
|
|
28421
|
+
if (financialInfoSummary) {
|
|
28422
|
+
delete financialInfoSummary.reportedValueOption;
|
|
28423
|
+
if (financialInfoSummary.netAssets) {
|
|
28424
|
+
financialInfoSummary.totalAssets = formatCurrency(financialInfoSummary.netAssets, financialInfoSummary.currency, i18n.locale);
|
|
28425
|
+
delete financialInfoSummary.netAssets;
|
|
28426
|
+
}
|
|
28427
|
+
if (financialInfoSummary.annualTurnover) {
|
|
28428
|
+
financialInfoSummary.annualTurnover = formatCurrency(financialInfoSummary.annualTurnover, financialInfoSummary.currency, i18n.locale);
|
|
28429
|
+
}
|
|
28430
|
+
}
|
|
27976
28431
|
if (isDocumentsRequired$1(forms2)) {
|
|
27977
28432
|
companyDocumentForms.forEach((formId) => delete summaryData[formId]);
|
|
27978
28433
|
summaryData = {
|
|
@@ -30378,14 +30833,15 @@ const SingpassSelection = (props) => {
|
|
|
30378
30833
|
className: "adyen-kyc-field-verification-methods",
|
|
30379
30834
|
optionClassNames: () => ({
|
|
30380
30835
|
icon: "adyen-kyc-radio-group-card__illustration",
|
|
30381
|
-
label: "adyen-kyc-field-verification-methods__card
|
|
30836
|
+
label: "adyen-kyc-field-verification-methods__card",
|
|
30382
30837
|
footer: "adyen-kyc-field-verification-methods__footer"
|
|
30383
30838
|
}),
|
|
30384
30839
|
renderOptionIcon: (method) => methodsMetadata[method].icon,
|
|
30385
30840
|
renderOptionFooter: (method) => {
|
|
30386
30841
|
var _a;
|
|
30387
30842
|
return (_a = methodsMetadata[method].provider) == null ? void 0 : _a.icon;
|
|
30388
|
-
}
|
|
30843
|
+
},
|
|
30844
|
+
floatingRadio: true
|
|
30389
30845
|
})
|
|
30390
30846
|
})
|
|
30391
30847
|
}), jsx(Button, {
|
|
@@ -33914,6 +34370,8 @@ function SolePropDropinComponent({
|
|
|
33914
34370
|
const {
|
|
33915
34371
|
handleNextClick,
|
|
33916
34372
|
handleBackClick,
|
|
34373
|
+
hideHomeButton,
|
|
34374
|
+
hideBackButton,
|
|
33917
34375
|
activeForm,
|
|
33918
34376
|
shouldValidate,
|
|
33919
34377
|
setShouldValidate,
|
|
@@ -33933,6 +34391,8 @@ function SolePropDropinComponent({
|
|
|
33933
34391
|
gotoFormByFormIndex,
|
|
33934
34392
|
handleHomeClick,
|
|
33935
34393
|
hideDropinLayout,
|
|
34394
|
+
hideHomeButton,
|
|
34395
|
+
hideBackButton,
|
|
33936
34396
|
nextButtonLabel,
|
|
33937
34397
|
homeButtonLabel,
|
|
33938
34398
|
loadingStatus,
|
|
@@ -38253,7 +38713,7 @@ const ConfigurationApiProvider = ({
|
|
|
38253
38713
|
isEmbeddedDropin,
|
|
38254
38714
|
loadingContext
|
|
38255
38715
|
} = authContext;
|
|
38256
|
-
const sdkVersion = "2.
|
|
38716
|
+
const sdkVersion = "2.58.0";
|
|
38257
38717
|
useAnalytics({
|
|
38258
38718
|
onUserEvent,
|
|
38259
38719
|
legalEntityId: rootLegalEntityId,
|
|
@@ -38346,7 +38806,7 @@ const useAllowedLocales = () => {
|
|
|
38346
38806
|
}, []);
|
|
38347
38807
|
return allowedLocales;
|
|
38348
38808
|
};
|
|
38349
|
-
const localeImports = /* @__PURE__ */ Object.assign({ "./locales/bg-BG.json": () => import("./bg-BG-
|
|
38809
|
+
const localeImports = /* @__PURE__ */ Object.assign({ "./locales/bg-BG.json": () => import("./bg-BG-DSGcxUqd.js"), "./locales/cs-CZ.json": () => import("./cs-CZ-DAS2jbyW.js"), "./locales/da-DK.json": () => import("./da-DK-CH9-Y2_h.js"), "./locales/de-DE.json": () => import("./de-DE-Cvre4fQ7.js"), "./locales/el-GR.json": () => import("./el-GR-BLJi6VdO.js"), "./locales/en-US.json": () => Promise.resolve().then(() => enUS), "./locales/es-ES.json": () => import("./es-ES-BfHjS5Hb.js"), "./locales/et-EE.json": () => import("./et-EE-DG5Cjsj_.js"), "./locales/fi-FI.json": () => import("./fi-FI-RdmcbEt_.js"), "./locales/fr-FR.json": () => import("./fr-FR-Cuu7ywoh.js"), "./locales/hr-HR.json": () => import("./hr-HR-CwRw-oEW.js"), "./locales/hu-HU.json": () => import("./hu-HU-PO0jI1sW.js"), "./locales/it-IT.json": () => import("./it-IT-RXBJv4US.js"), "./locales/lt-LT.json": () => import("./lt-LT-BCLEVKxe.js"), "./locales/lv-LV.json": () => import("./lv-LV-DfWQ_6E9.js"), "./locales/nl-NL.json": () => import("./nl-NL-2CzcCtiM.js"), "./locales/no-NO.json": () => import("./no-NO-r9q3S-TP.js"), "./locales/pl-PL.json": () => import("./pl-PL-Nix6oaTv.js"), "./locales/pt-PT.json": () => import("./pt-PT-CGVej1Ae.js"), "./locales/ro-RO.json": () => import("./ro-RO-DhJK0CPN.js"), "./locales/sk-SK.json": () => import("./sk-SK-Akja9ejH.js"), "./locales/sl-SI.json": () => import("./sl-SI-Bq22qBey.js"), "./locales/sv-SE.json": () => import("./sv-SE-2gCnkRkv.js") });
|
|
38350
38810
|
const loadLocale = async (locale) => {
|
|
38351
38811
|
const importForLocale = localeImports[`./locales/${locale}.json`];
|
|
38352
38812
|
if (!importForLocale) {
|
|
@@ -38649,7 +39109,7 @@ const Toast = ({
|
|
|
38649
39109
|
}) => {
|
|
38650
39110
|
const toastRef = useRef(null);
|
|
38651
39111
|
const isLoading = type === "loading";
|
|
38652
|
-
const labelId =
|
|
39112
|
+
const labelId = useId();
|
|
38653
39113
|
const handleShow = useCallback(() => {
|
|
38654
39114
|
var _a;
|
|
38655
39115
|
return (_a = toastRef.current) == null ? void 0 : _a.classList.add("adyen-kyc-toast--visible");
|
|
@@ -38936,7 +39396,7 @@ const DebugModal = ({
|
|
|
38936
39396
|
};
|
|
38937
39397
|
const copyToClipboard = async () => {
|
|
38938
39398
|
const toCopy = {
|
|
38939
|
-
sdkVersion: "2.
|
|
39399
|
+
sdkVersion: "2.58.0",
|
|
38940
39400
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
38941
39401
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
38942
39402
|
};
|
|
@@ -38975,7 +39435,7 @@ const DebugModal = ({
|
|
|
38975
39435
|
children: [jsxs("div", {
|
|
38976
39436
|
className: "adyen-kyc-debug-modal__meta",
|
|
38977
39437
|
children: [jsxs("span", {
|
|
38978
|
-
children: ["SDK version: ", "2.
|
|
39438
|
+
children: ["SDK version: ", "2.58.0"]
|
|
38979
39439
|
}), jsxs("span", {
|
|
38980
39440
|
children: ["rootLegalEntityId: ", rootLegalEntityId]
|
|
38981
39441
|
})]
|