@adyen/kyc-components 3.32.4 → 3.33.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 +785 -265
- 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 +31 -8
- 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/Dropins/HighExposureDropin/types.d.ts +6 -0
- package/dist/types/components/Dropins/HighExposureDropin/utils.d.ts +3 -2
- package/dist/types/components/Dropins/HighExposureDropin/validate.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 +3 -1
- 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 -8
- 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 +8 -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";
|
|
@@ -258,6 +258,8 @@ const defaultTrans = {
|
|
|
258
258
|
codulDeIdentificareFiscala: "Codul de identificare fiscală (CIF)",
|
|
259
259
|
company: "Company",
|
|
260
260
|
companyDetails: "Company details",
|
|
261
|
+
companyFinancialInformationFormHeading: "Financial Details",
|
|
262
|
+
companyFinancialInformationFormDescription: "Financial information",
|
|
261
263
|
companyLegalName: "Company legal name",
|
|
262
264
|
companyName: "Company name",
|
|
263
265
|
companyNumber: "Company number",
|
|
@@ -315,6 +317,7 @@ const defaultTrans = {
|
|
|
315
317
|
dateCannotBeInTheFuture: "Date cannot be in the future",
|
|
316
318
|
dateDeedWasSigned: "Date deed was signed",
|
|
317
319
|
dateOfIncorporation: "Date of incorporation",
|
|
320
|
+
dateOfTotalAssetsCalculation: "The date on which total assets and annual turnover were calculated is often the balance sheet date.",
|
|
318
321
|
dateOnDocumentNoOlderThanXMonths: "Date on the document is no older than %{numberOfMonths} months",
|
|
319
322
|
datePlaceholder: "dd/mm/yyyy",
|
|
320
323
|
dbaName: "Doing Business As (DBA) name",
|
|
@@ -354,6 +357,7 @@ const defaultTrans = {
|
|
|
354
357
|
doNotHaveTaxIdNumber: "I do not have a Tax Identification Number",
|
|
355
358
|
doNotHaveYTunnus: "I do not have a Y-TUNNUS",
|
|
356
359
|
doNotHaveAbn: "I do not have an ABN",
|
|
360
|
+
doNotHaveAcn: "I do not have an ACN",
|
|
357
361
|
documentAddressedToName: "The document has to be addressed to %{name}",
|
|
358
362
|
documentCannotBeDamaged: "The document cannot be damaged",
|
|
359
363
|
documentIssuedByGovernmentAuthority: "The document has to be issued by a government authority. It's usually given when a business is created at the local commercial register",
|
|
@@ -844,6 +848,7 @@ const defaultTrans = {
|
|
|
844
848
|
invalidDateOfBirth: "Please enter a valid date of birth",
|
|
845
849
|
invalidDateOfIncorporation: "Please enter a valid date of incorporation",
|
|
846
850
|
invalidEmail: "Please enter a valid email",
|
|
851
|
+
invalidFinancialReportingDate: "Please enter a valid reporting date",
|
|
847
852
|
invalidFormat: "Invalid format",
|
|
848
853
|
invalidFormatBankStatementDescription: "Please ensure your input contains solely letters, digits, currency codes, and the specified special characters: -._,:;'*!@#%()+?¿/「」",
|
|
849
854
|
invalidFormatExpects: "Invalid format. Expected format: %{format}",
|
|
@@ -868,6 +873,7 @@ const defaultTrans = {
|
|
|
868
873
|
invalidFormatIdentityNumberSG: "Please use the NRIC format: S1234567A",
|
|
869
874
|
invalidFormatIdentityNumberUS: "Please provide last 4 digits",
|
|
870
875
|
invalidFormatIdentityNumberUS9: "Please use the SSN format: XXXXXXXXX",
|
|
876
|
+
invalidNumberOfEmployees: "Please enter a valid number",
|
|
871
877
|
invalidPhoneNumber: "Please enter a valid phone number.",
|
|
872
878
|
invalidRegistrationNumber: "Invalid registration number",
|
|
873
879
|
invalidRole: "Please select a role",
|
|
@@ -926,6 +932,7 @@ const defaultTrans = {
|
|
|
926
932
|
listedPublicUnitTrust: "Listed public unit trust",
|
|
927
933
|
listitemVoidedChequeBankLetterBankStatementOnline: "Voided cheque/Bank letter/Bank statement/Online banking environment",
|
|
928
934
|
loading: "Loading",
|
|
935
|
+
loanApplication: "Loan application",
|
|
929
936
|
localFormat: "Local format",
|
|
930
937
|
loginIntoYourBankingEnvironment: "Log into your banking environment via mobile app or internet browser.",
|
|
931
938
|
lookUpYourLEI: "Look up your LEI.",
|
|
@@ -1364,7 +1371,7 @@ const defaultTrans = {
|
|
|
1364
1371
|
tooManyFiles: "Too many files",
|
|
1365
1372
|
totalAssets: "Total assets",
|
|
1366
1373
|
totalAssetsCurrency: "Total assets currency",
|
|
1367
|
-
totalAssetsHelper: "
|
|
1374
|
+
totalAssetsHelper: "The sum of total liabilities and total equity.",
|
|
1368
1375
|
totalAssetsValue: "Total assets value",
|
|
1369
1376
|
tradingName: "Trading name",
|
|
1370
1377
|
transferInstrumentDeleted: "Transfer instrument deleted",
|
|
@@ -1501,6 +1508,7 @@ const defaultTrans = {
|
|
|
1501
1508
|
youSuccessfullyVerifiedAccount: "You've successfully verified your bank account.",
|
|
1502
1509
|
yourAssociationIsRegisteredItWasSetUpForNonCommercialPurpose: "Your association is registered. It was set up for recreational, cultural, or non-profit purposes.",
|
|
1503
1510
|
yourBankWillConfirmYourAccountDetails: "Your bank will confirm your account details to us.",
|
|
1511
|
+
yourBusiness: "Your business",
|
|
1504
1512
|
yourBusinessInformation: "Your business information",
|
|
1505
1513
|
yourBusinessIsRegisteredAsASeparateLegalEntityFromItsOwners: "Your business is registered as a separate legal entity from its owners.",
|
|
1506
1514
|
yourBusinessSetup: "Your business setup: %{businessSetup}",
|
|
@@ -1509,7 +1517,9 @@ const defaultTrans = {
|
|
|
1509
1517
|
yourIbanShouldBeginWith_: "Your IBAN should begin with %{countryCode}.",
|
|
1510
1518
|
zentralesVereinsregisterId: "Zentrales Vereinsregister ID",
|
|
1511
1519
|
zipCode: "ZIP code",
|
|
1512
|
-
incorporatedAssociationRegistrationNumber: "Incorporated association registration number"
|
|
1520
|
+
incorporatedAssociationRegistrationNumber: "Incorporated association registration number",
|
|
1521
|
+
reportingCurrency: "Reporting currency",
|
|
1522
|
+
reportedValue: "Reported value"
|
|
1513
1523
|
};
|
|
1514
1524
|
const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1515
1525
|
__proto__: null,
|
|
@@ -1816,7 +1826,7 @@ var StateCodesUS = /* @__PURE__ */ ((StateCodesUS2) => {
|
|
|
1816
1826
|
StateCodesUS2["Wyoming"] = "WY";
|
|
1817
1827
|
return StateCodesUS2;
|
|
1818
1828
|
})(StateCodesUS || {});
|
|
1819
|
-
const logger$
|
|
1829
|
+
const logger$K = createLogger("useBusinessData");
|
|
1820
1830
|
const LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 1577664e5;
|
|
1821
1831
|
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];
|
|
1822
1832
|
const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [StateCodesUS.California, StateCodesUS.Texas];
|
|
@@ -1854,7 +1864,7 @@ function useBusinessData({
|
|
|
1854
1864
|
};
|
|
1855
1865
|
const searchForBusiness = useCallback(async (data) => {
|
|
1856
1866
|
if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
|
|
1857
|
-
logger$
|
|
1867
|
+
logger$K.log("Missing handlers for searchForBusiness");
|
|
1858
1868
|
return;
|
|
1859
1869
|
}
|
|
1860
1870
|
if (searchResults && objectsDeepEqual(cachedSearch, data)) return;
|
|
@@ -1871,7 +1881,7 @@ function useBusinessData({
|
|
|
1871
1881
|
return response == null ? void 0 : response.results;
|
|
1872
1882
|
} catch (e) {
|
|
1873
1883
|
setSearching("error");
|
|
1874
|
-
logger$
|
|
1884
|
+
logger$K.error(e);
|
|
1875
1885
|
} finally {
|
|
1876
1886
|
setCachedSearch(data);
|
|
1877
1887
|
setSearching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
@@ -1879,7 +1889,7 @@ function useBusinessData({
|
|
|
1879
1889
|
}, [handleCompanyDeepSearch, handleCompanyIndexSearch, searchResults, cachedSearch]);
|
|
1880
1890
|
const fetchBusinessData = useCallback(async (company, state) => {
|
|
1881
1891
|
if (!handleGetCompanyDataset || !handleRefreshCompanyDataset) {
|
|
1882
|
-
logger$
|
|
1892
|
+
logger$K.log("Missing handlers for fetchBusinessData");
|
|
1883
1893
|
return;
|
|
1884
1894
|
}
|
|
1885
1895
|
if (cachedBusiness && objectsDeepEqual({
|
|
@@ -1920,14 +1930,14 @@ function useBusinessData({
|
|
|
1920
1930
|
} catch (e) {
|
|
1921
1931
|
setFetching("error");
|
|
1922
1932
|
setCachedBusiness(void 0);
|
|
1923
|
-
logger$
|
|
1933
|
+
logger$K.error(e);
|
|
1924
1934
|
} finally {
|
|
1925
1935
|
setFetching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
1926
1936
|
}
|
|
1927
1937
|
}, [cachedBusiness, handleGetCompanyDataset, handleRefreshCompanyDataset]);
|
|
1928
1938
|
const verifyBusinessData = useCallback(async (data, tin) => {
|
|
1929
1939
|
if (!handleVerifyTin) {
|
|
1930
|
-
logger$
|
|
1940
|
+
logger$K.log("Missing handlers for verifyBusinessData");
|
|
1931
1941
|
return;
|
|
1932
1942
|
}
|
|
1933
1943
|
try {
|
|
@@ -1948,7 +1958,7 @@ function useBusinessData({
|
|
|
1948
1958
|
return matched;
|
|
1949
1959
|
} catch (e) {
|
|
1950
1960
|
setVerifying("error");
|
|
1951
|
-
logger$
|
|
1961
|
+
logger$K.error(e);
|
|
1952
1962
|
} finally {
|
|
1953
1963
|
setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
1954
1964
|
}
|
|
@@ -1959,7 +1969,7 @@ function useBusinessData({
|
|
|
1959
1969
|
await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
|
|
1960
1970
|
} catch (e) {
|
|
1961
1971
|
setResettingTrustedData("error");
|
|
1962
|
-
logger$
|
|
1972
|
+
logger$K.error(e);
|
|
1963
1973
|
} finally {
|
|
1964
1974
|
setResettingTrustedData((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
1965
1975
|
}
|
|
@@ -2183,8 +2193,8 @@ const getFormattingRegEx = (specChars, flags = "g") => new RegExp(`[${specChars}
|
|
|
2183
2193
|
const trimValWithOneSpace = (val) => val.trimStart().replace(/\s+/g, " ");
|
|
2184
2194
|
const EMOJI_REGEX = new RegExp("(\\p{Emoji}\\uFE0F|\\p{Emoji_Presentation}|\\p{Extended_Pictographic})", "gu");
|
|
2185
2195
|
const NO_ALPHABET_REGEX = /^[^a-zA-Z]*$/;
|
|
2186
|
-
const INDIVIDUAL_VALID_CHAR_REGEX = /^[\
|
|
2187
|
-
const OTHER_ENTITIES_VALID_CHAR_REGEX = /^[\w\s,.;:\-—&!?@()"'
|
|
2196
|
+
const INDIVIDUAL_VALID_CHAR_REGEX = /^[\p{L}\p{M}\d\s\-—./']*$/u;
|
|
2197
|
+
const OTHER_ENTITIES_VALID_CHAR_REGEX = /^[\w\s,.;:\-—&!?@()"'/\\+\p{L}\p{M}]+$/u;
|
|
2188
2198
|
const matchesRegex = (regex, input) => isString(input) && regex.test(input ?? "");
|
|
2189
2199
|
const hasRepeatedCharacters = (input) => !isEmpty(input) && input.length > 1 && new Set(input).size === 1;
|
|
2190
2200
|
const isValidMinLength = (input, minLength = 1) => !isEmpty(input) && input.length >= minLength;
|
|
@@ -2271,7 +2281,7 @@ const svgs = {
|
|
|
2271
2281
|
"trustly-logo": lazy(() => import("./trustly-logo-YJslAOYF.js"))
|
|
2272
2282
|
};
|
|
2273
2283
|
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"];
|
|
2274
|
-
const logger$
|
|
2284
|
+
const logger$J = createLogger("Icon");
|
|
2275
2285
|
const Svg = ({
|
|
2276
2286
|
className,
|
|
2277
2287
|
name,
|
|
@@ -2282,7 +2292,7 @@ const Svg = ({
|
|
|
2282
2292
|
const LazyLoadedSvg = svgs[name];
|
|
2283
2293
|
const viewBox = unscalableIconNames.includes(name) ? "0 0 16 16" : void 0;
|
|
2284
2294
|
if (!LazyLoadedSvg) {
|
|
2285
|
-
logger$
|
|
2295
|
+
logger$J.error(`No such svg: "${name}"`);
|
|
2286
2296
|
return null;
|
|
2287
2297
|
}
|
|
2288
2298
|
return jsx("span", {
|
|
@@ -2572,10 +2582,10 @@ function useFormRouterContext() {
|
|
|
2572
2582
|
}
|
|
2573
2583
|
return context;
|
|
2574
2584
|
}
|
|
2575
|
-
const logger$
|
|
2585
|
+
const logger$I = createLogger("Link");
|
|
2576
2586
|
const isValidLink = (href) => {
|
|
2577
2587
|
if (href === "#") {
|
|
2578
|
-
logger$
|
|
2588
|
+
logger$I.error('Links must include a valid href. If your href is "#", consider using a Button instead');
|
|
2579
2589
|
return false;
|
|
2580
2590
|
}
|
|
2581
2591
|
return true;
|
|
@@ -2862,7 +2872,9 @@ var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
|
|
|
2862
2872
|
ExperimentNames2["EnableNationalitySGHK"] = "EnableNationalitySGHK";
|
|
2863
2873
|
ExperimentNames2["EnableAUGovernmentalOrganizationSkipRegistrationNumber"] = "EnableAUGovernmentalOrganizationSkipRegistrationNumber";
|
|
2864
2874
|
ExperimentNames2["EnableMinimalRegistrationNumberValidationForAuIncorporatedAssociation"] = "EnableMinimalRegistrationNumberValidationForAuIncorporatedAssociation";
|
|
2875
|
+
ExperimentNames2["EnableFinancialInformationComponentV4"] = "EnableFinancialInformationComponentV4";
|
|
2865
2876
|
ExperimentNames2["EnablePreferInstantVerificationFlow"] = "EnablePreferInstantVerificationFlow";
|
|
2877
|
+
ExperimentNames2["EnableAUIncorporatedPartnershipSkipRegistrationNumber"] = "EnableAUIncorporatedPartnershipSkipRegistrationNumber";
|
|
2866
2878
|
return ExperimentNames2;
|
|
2867
2879
|
})(ExperimentNames || {});
|
|
2868
2880
|
const ON_CHANGE_DEBOUNCE_DURATION = 200;
|
|
@@ -2923,7 +2935,7 @@ const useSetting = (settingName) => {
|
|
|
2923
2935
|
} = context;
|
|
2924
2936
|
return getSetting(settingName);
|
|
2925
2937
|
};
|
|
2926
|
-
const logger$
|
|
2938
|
+
const logger$H = createLogger("useAllowedCountries");
|
|
2927
2939
|
const useAllowedCountries = () => {
|
|
2928
2940
|
const acceptedCountries = useSetting("acceptedCountries");
|
|
2929
2941
|
const {
|
|
@@ -2932,7 +2944,7 @@ const useAllowedCountries = () => {
|
|
|
2932
2944
|
const [allowedCountries, setAllowedCountries] = useState(acceptedCountries);
|
|
2933
2945
|
useEffect(() => {
|
|
2934
2946
|
if (acceptedCountries !== void 0) return;
|
|
2935
|
-
getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$
|
|
2947
|
+
getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$H.error);
|
|
2936
2948
|
}, [acceptedCountries]);
|
|
2937
2949
|
return allowedCountries;
|
|
2938
2950
|
};
|
|
@@ -3291,7 +3303,7 @@ function reducer({
|
|
|
3291
3303
|
}
|
|
3292
3304
|
};
|
|
3293
3305
|
}
|
|
3294
|
-
const logger$
|
|
3306
|
+
const logger$G = createLogger("useAsyncValidator");
|
|
3295
3307
|
const useAsyncValidator = (asyncRules) => {
|
|
3296
3308
|
const [asyncValidationResults, setAsyncValidationResults] = useState({});
|
|
3297
3309
|
const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
|
|
@@ -3312,7 +3324,7 @@ const useAsyncValidator = (asyncRules) => {
|
|
|
3312
3324
|
hasError: !isValid
|
|
3313
3325
|
}])
|
|
3314
3326
|
});
|
|
3315
|
-
}).catch(logger$
|
|
3327
|
+
}).catch(logger$G.error);
|
|
3316
3328
|
}, [asyncRules, clearAsyncValidationResults]);
|
|
3317
3329
|
return {
|
|
3318
3330
|
asyncValidationResults,
|
|
@@ -3384,7 +3396,7 @@ function useForm({
|
|
|
3384
3396
|
asyncValidationResults
|
|
3385
3397
|
} = useAsyncValidator(asyncRules);
|
|
3386
3398
|
const getRequiredFields = useMemo(() => typeof schema === "function" ? schema : () => schema, [schema]);
|
|
3387
|
-
const
|
|
3399
|
+
const getSchema2 = useMemo(() => defaultData ? getRequiredFields(defaultData) : [], [defaultData, getRequiredFields]);
|
|
3388
3400
|
const getReducer = useCallback(() => reducer({
|
|
3389
3401
|
staticValidate: triggerStaticValidation,
|
|
3390
3402
|
asyncValidate: triggerAsyncValidation,
|
|
@@ -3394,7 +3406,7 @@ function useForm({
|
|
|
3394
3406
|
formatters
|
|
3395
3407
|
}), [triggerStaticValidation, triggerAsyncValidation, obscuredFields, optionalFields, trustedFields, formatters]);
|
|
3396
3408
|
const initialData = useMemo(() => ({
|
|
3397
|
-
schema:
|
|
3409
|
+
schema: getSchema2,
|
|
3398
3410
|
defaultData,
|
|
3399
3411
|
fieldProblems,
|
|
3400
3412
|
obscuredFields,
|
|
@@ -3403,7 +3415,7 @@ function useForm({
|
|
|
3403
3415
|
formatters,
|
|
3404
3416
|
staticValidate: triggerStaticValidation,
|
|
3405
3417
|
asyncValidate: triggerAsyncValidation
|
|
3406
|
-
}), [
|
|
3418
|
+
}), [getSchema2, defaultData, fieldProblems, obscuredFields, optionalFields, trustedFields, formatters, triggerStaticValidation, triggerAsyncValidation]);
|
|
3407
3419
|
const [state, dispatch] = useReducer(getReducer(), initialData, init);
|
|
3408
3420
|
const isValid = useMemo(() => {
|
|
3409
3421
|
var _a;
|
|
@@ -3462,7 +3474,7 @@ function useForm({
|
|
|
3462
3474
|
});
|
|
3463
3475
|
}, [defaultData]);
|
|
3464
3476
|
const resetToDefaultData = useCallback(() => {
|
|
3465
|
-
|
|
3477
|
+
getSchema2.forEach((field) => {
|
|
3466
3478
|
if (!defaultData || typeof defaultData[field] !== "undefined") {
|
|
3467
3479
|
return handleChangeFor(field)(defaultData == null ? void 0 : defaultData[field]);
|
|
3468
3480
|
}
|
|
@@ -3470,7 +3482,7 @@ function useForm({
|
|
|
3470
3482
|
setErrors(field, null);
|
|
3471
3483
|
setData(field, defaultData[field]);
|
|
3472
3484
|
});
|
|
3473
|
-
}, [defaultData,
|
|
3485
|
+
}, [defaultData, getSchema2, handleChangeFor, setData, setErrors, setValid]);
|
|
3474
3486
|
useEffect(() => {
|
|
3475
3487
|
const newSchema = getRequiredFields(state.data);
|
|
3476
3488
|
if (!doArraysMatch(state.schema, newSchema)) {
|
|
@@ -6403,10 +6415,10 @@ const CountryIdNumberPatterns = {
|
|
|
6403
6415
|
};
|
|
6404
6416
|
const DriversLicenseCardNumberPatterns = {
|
|
6405
6417
|
[CountryCodes.NewZealand]: /^[\d]{3}$/,
|
|
6406
|
-
[CountryCodes.Australia]: /^[A-Z0-9]{
|
|
6418
|
+
[CountryCodes.Australia]: /^[A-Z0-9]{5,11}$/
|
|
6407
6419
|
};
|
|
6408
6420
|
const DriversLicenseNumberPatterns = {
|
|
6409
|
-
[CountryCodes.Australia]: /^[A-Za-z0-9]{
|
|
6421
|
+
[CountryCodes.Australia]: /^[A-Za-z0-9]{5,11}$/,
|
|
6410
6422
|
[CountryCodes.HongKong]: /^[A-Z0-9]{8}$/,
|
|
6411
6423
|
[CountryCodes.NewZealand]: /^[A-Z]{2}[0-9]{6}$/
|
|
6412
6424
|
};
|
|
@@ -7265,7 +7277,7 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
|
|
|
7265
7277
|
};
|
|
7266
7278
|
};
|
|
7267
7279
|
const MISMATCH_ANIMATION_NAME = "mismatchShake";
|
|
7268
|
-
const logger$
|
|
7280
|
+
const logger$F = createLogger("MaskedInputText");
|
|
7269
7281
|
const MaskedInputText = ({
|
|
7270
7282
|
value,
|
|
7271
7283
|
onInput,
|
|
@@ -7314,7 +7326,7 @@ const MaskedInputText = ({
|
|
|
7314
7326
|
};
|
|
7315
7327
|
useEffect(() => {
|
|
7316
7328
|
if (!mask) {
|
|
7317
|
-
logger$
|
|
7329
|
+
logger$F.warn("`mask` is undefined. No masking of input will take place.");
|
|
7318
7330
|
}
|
|
7319
7331
|
}, [mask]);
|
|
7320
7332
|
const getMaskResult = useCallback((pureValue) => {
|
|
@@ -7339,13 +7351,13 @@ const MaskedInputText = ({
|
|
|
7339
7351
|
return;
|
|
7340
7352
|
}
|
|
7341
7353
|
if (preserveMismatchingInitialValue) {
|
|
7342
|
-
logger$
|
|
7354
|
+
logger$F.warn(`Value received "${value}" does not match mask`, maskResult, `
|
|
7343
7355
|
Preserving mismatched initial value until user input.`);
|
|
7344
7356
|
setPreservingMismatchedValue(true);
|
|
7345
7357
|
return;
|
|
7346
7358
|
}
|
|
7347
7359
|
const fallback = displayValueToPure(maskResult.partialDisplayValue);
|
|
7348
|
-
logger$
|
|
7360
|
+
logger$F.warn(`Value received "${value}" does not match mask`, maskResult, `
|
|
7349
7361
|
Falling back to partially valid value "${fallback}"`);
|
|
7350
7362
|
onInput(fallback);
|
|
7351
7363
|
}
|
|
@@ -7499,58 +7511,82 @@ Falling back to partially valid value "${fallback}"`);
|
|
|
7499
7511
|
})
|
|
7500
7512
|
});
|
|
7501
7513
|
};
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7514
|
+
const Radio = ({
|
|
7515
|
+
id,
|
|
7516
|
+
value,
|
|
7517
|
+
groupName,
|
|
7518
|
+
checked = false,
|
|
7519
|
+
disabled = false,
|
|
7520
|
+
onClick,
|
|
7521
|
+
className
|
|
7510
7522
|
}) => jsx("input", {
|
|
7511
|
-
|
|
7512
|
-
|
|
7523
|
+
className: cx(["adyen-kyc-input-radio__input", className]),
|
|
7524
|
+
id,
|
|
7525
|
+
type: "radio",
|
|
7526
|
+
checked,
|
|
7527
|
+
name: groupName,
|
|
7528
|
+
onClick,
|
|
7529
|
+
value,
|
|
7530
|
+
disabled
|
|
7513
7531
|
});
|
|
7532
|
+
const RadioWithLabel = ({
|
|
7533
|
+
value,
|
|
7534
|
+
label,
|
|
7535
|
+
content,
|
|
7536
|
+
groupName,
|
|
7537
|
+
checked = false,
|
|
7538
|
+
disabled = false,
|
|
7539
|
+
onClick
|
|
7540
|
+
}) => {
|
|
7541
|
+
const id = useId();
|
|
7542
|
+
return jsxs("label", {
|
|
7543
|
+
htmlFor: id,
|
|
7544
|
+
className: "adyen-kyc-input-radio",
|
|
7545
|
+
children: [jsx(Radio, {
|
|
7546
|
+
id,
|
|
7547
|
+
checked,
|
|
7548
|
+
groupName,
|
|
7549
|
+
onClick,
|
|
7550
|
+
value,
|
|
7551
|
+
disabled
|
|
7552
|
+
}), jsxs("div", {
|
|
7553
|
+
className: "adyen-kyc-input-radio__content",
|
|
7554
|
+
children: [jsx("span", {
|
|
7555
|
+
className: "adyen-kyc-input-radio__label adyen-kyc-label__text",
|
|
7556
|
+
children: label
|
|
7557
|
+
}), content]
|
|
7558
|
+
})]
|
|
7559
|
+
});
|
|
7560
|
+
};
|
|
7514
7561
|
function RadioGroup({
|
|
7515
7562
|
items = [],
|
|
7516
7563
|
name,
|
|
7517
7564
|
onChange = noop,
|
|
7518
7565
|
value,
|
|
7519
|
-
isInvalid,
|
|
7520
|
-
uniqueId,
|
|
7521
|
-
className,
|
|
7522
7566
|
disabled = false,
|
|
7523
|
-
horizontal = false
|
|
7567
|
+
horizontal = false,
|
|
7568
|
+
showContentOnlyOnSelected = false,
|
|
7569
|
+
className
|
|
7524
7570
|
}) {
|
|
7525
7571
|
const {
|
|
7526
7572
|
i18n
|
|
7527
7573
|
} = useI18nContext();
|
|
7528
|
-
const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
|
|
7529
|
-
const classes = horizontal ? "adyen-kyc-radio-group adyen-kyc-radio-group--horizontal" : "adyen-kyc-radio-group";
|
|
7530
7574
|
return jsx("div", {
|
|
7531
|
-
className:
|
|
7575
|
+
className: cx(["adyen-kyc-radio-group", {
|
|
7576
|
+
"adyen-kyc-radio-group--horizontal": horizontal
|
|
7577
|
+
}, className]),
|
|
7532
7578
|
children: items.map((item) => {
|
|
7533
|
-
const
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
onClick: onChange,
|
|
7545
|
-
value: item.id,
|
|
7546
|
-
disabled
|
|
7547
|
-
}), jsx("span", {
|
|
7548
|
-
className: cx(["adyen-kyc-input-radio__label", "adyen-kyc-label__text", className, {
|
|
7549
|
-
"adyen-kyc-radio-group__label--invalid": isInvalid
|
|
7550
|
-
}]),
|
|
7551
|
-
children: i18n.get(item.name)
|
|
7552
|
-
})]
|
|
7553
|
-
}, item.name || item.id);
|
|
7579
|
+
const isSelected = item.id === value;
|
|
7580
|
+
const visibleContent = isSelected || !showContentOnlyOnSelected ? item.content : void 0;
|
|
7581
|
+
return jsx(RadioWithLabel, {
|
|
7582
|
+
value: item.id,
|
|
7583
|
+
label: i18n.get(item.name),
|
|
7584
|
+
content: visibleContent,
|
|
7585
|
+
groupName: name,
|
|
7586
|
+
checked: isSelected,
|
|
7587
|
+
disabled,
|
|
7588
|
+
onClick: () => onChange(item.id)
|
|
7589
|
+
}, item.id);
|
|
7554
7590
|
})
|
|
7555
7591
|
});
|
|
7556
7592
|
}
|
|
@@ -7735,7 +7771,7 @@ function CompanyRegistrationNumberTypeSelector({
|
|
|
7735
7771
|
name: "companyRegistrationNumberType",
|
|
7736
7772
|
items: options,
|
|
7737
7773
|
value: selected,
|
|
7738
|
-
onChange:
|
|
7774
|
+
onChange: handleSelect
|
|
7739
7775
|
})
|
|
7740
7776
|
});
|
|
7741
7777
|
}
|
|
@@ -9261,7 +9297,7 @@ function TaxIdNumberTypeSelector({
|
|
|
9261
9297
|
name: "taxIdNumberType",
|
|
9262
9298
|
items: options,
|
|
9263
9299
|
value: selected,
|
|
9264
|
-
onChange:
|
|
9300
|
+
onChange: handleSelect
|
|
9265
9301
|
})
|
|
9266
9302
|
});
|
|
9267
9303
|
}
|
|
@@ -9955,6 +9991,9 @@ const companyBase = {
|
|
|
9955
9991
|
},
|
|
9956
9992
|
countryOfGoverningLaw: {
|
|
9957
9993
|
rule: "countryOfGoverningLawRequired"
|
|
9994
|
+
},
|
|
9995
|
+
numberOfEmployees: {
|
|
9996
|
+
rule: "countryRequiringFinancialInformation"
|
|
9958
9997
|
}
|
|
9959
9998
|
};
|
|
9960
9999
|
const businessDetailsBase = {
|
|
@@ -10129,6 +10168,9 @@ const countryConfig$3 = {
|
|
|
10129
10168
|
},
|
|
10130
10169
|
exemptedFromTax: {
|
|
10131
10170
|
label: "doNotHaveAbn"
|
|
10171
|
+
},
|
|
10172
|
+
exemptedFromRegistrationNumber: {
|
|
10173
|
+
label: "doNotHaveAcn"
|
|
10132
10174
|
}
|
|
10133
10175
|
},
|
|
10134
10176
|
[CountryCodes.Austria]: {
|
|
@@ -10347,7 +10389,6 @@ const RadioCard = ({
|
|
|
10347
10389
|
optionDescription,
|
|
10348
10390
|
optionSubtitle,
|
|
10349
10391
|
name,
|
|
10350
|
-
uniqueId,
|
|
10351
10392
|
isInvalid,
|
|
10352
10393
|
isSelected,
|
|
10353
10394
|
onSelect,
|
|
@@ -10356,13 +10397,15 @@ const RadioCard = ({
|
|
|
10356
10397
|
loading,
|
|
10357
10398
|
icon,
|
|
10358
10399
|
body,
|
|
10359
|
-
footer
|
|
10400
|
+
footer,
|
|
10401
|
+
floatingRadio
|
|
10360
10402
|
}) => {
|
|
10361
10403
|
const {
|
|
10362
10404
|
i18n
|
|
10363
10405
|
} = useI18nContext();
|
|
10406
|
+
const id = useId();
|
|
10364
10407
|
return jsxs("label", {
|
|
10365
|
-
htmlFor:
|
|
10408
|
+
htmlFor: id,
|
|
10366
10409
|
className: cx(["adyen-kyc-radio-card", classNames == null ? void 0 : classNames.label, {
|
|
10367
10410
|
"adyen-kyc-radio-card--disabled": disabled
|
|
10368
10411
|
}]),
|
|
@@ -10396,55 +10439,49 @@ const RadioCard = ({
|
|
|
10396
10439
|
size: "small",
|
|
10397
10440
|
dot: true
|
|
10398
10441
|
})
|
|
10399
|
-
}) : jsx(
|
|
10400
|
-
id
|
|
10401
|
-
type: "radio",
|
|
10442
|
+
}) : jsx(Radio, {
|
|
10443
|
+
id,
|
|
10402
10444
|
checked: isSelected,
|
|
10403
|
-
|
|
10404
|
-
name,
|
|
10405
|
-
onChange: onSelect,
|
|
10445
|
+
groupName: name,
|
|
10406
10446
|
onClick: onSelect,
|
|
10407
10447
|
value: optionId,
|
|
10408
|
-
|
|
10409
|
-
|
|
10448
|
+
disabled,
|
|
10449
|
+
className: cx({
|
|
10450
|
+
"adyen-kyc-radio-group-card__radio--floating": floatingRadio
|
|
10451
|
+
})
|
|
10410
10452
|
})]
|
|
10411
10453
|
}, optionId);
|
|
10412
10454
|
};
|
|
10413
|
-
|
|
10455
|
+
const RadioGroupCard = ({
|
|
10414
10456
|
items,
|
|
10415
10457
|
name,
|
|
10416
10458
|
onSelect,
|
|
10417
10459
|
selected,
|
|
10418
10460
|
isInvalid,
|
|
10419
|
-
uniqueId,
|
|
10420
10461
|
className,
|
|
10421
10462
|
itemClassNames,
|
|
10422
10463
|
itemIcon,
|
|
10423
10464
|
itemBody,
|
|
10424
10465
|
itemFooter,
|
|
10425
10466
|
isItemDisabled
|
|
10426
|
-
}) {
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
disabled: isItemDisabled == null ? void 0 : isItemDisabled(item)
|
|
10445
|
-
}, item.id))
|
|
10446
|
-
});
|
|
10447
|
-
}
|
|
10467
|
+
}) => jsx("div", {
|
|
10468
|
+
className: className ?? "adyen-kyc-radio-group-card",
|
|
10469
|
+
children: items.map((item) => jsx(RadioCard, {
|
|
10470
|
+
optionId: item.id,
|
|
10471
|
+
optionName: item.name,
|
|
10472
|
+
optionDescription: item.description,
|
|
10473
|
+
optionSubtitle: item.subtitle,
|
|
10474
|
+
isInvalid,
|
|
10475
|
+
isSelected: selected === item,
|
|
10476
|
+
onSelect: () => onSelect(item),
|
|
10477
|
+
name,
|
|
10478
|
+
classNames: itemClassNames == null ? void 0 : itemClassNames(item),
|
|
10479
|
+
icon: itemIcon == null ? void 0 : itemIcon(item),
|
|
10480
|
+
body: itemBody == null ? void 0 : itemBody(item),
|
|
10481
|
+
footer: itemFooter == null ? void 0 : itemFooter(item),
|
|
10482
|
+
disabled: isItemDisabled == null ? void 0 : isItemDisabled(item)
|
|
10483
|
+
}, item.id))
|
|
10484
|
+
});
|
|
10448
10485
|
const EntityTypeRadioGroupCard = ({
|
|
10449
10486
|
examples,
|
|
10450
10487
|
...baseProps
|
|
@@ -10970,7 +11007,7 @@ function Dropzone(props) {
|
|
|
10970
11007
|
})]
|
|
10971
11008
|
});
|
|
10972
11009
|
}
|
|
10973
|
-
const logger$
|
|
11010
|
+
const logger$E = createLogger("TextArea");
|
|
10974
11011
|
function TextArea(props) {
|
|
10975
11012
|
const {
|
|
10976
11013
|
classNameModifiers,
|
|
@@ -10991,7 +11028,7 @@ function TextArea(props) {
|
|
|
10991
11028
|
} = useI18nContext();
|
|
10992
11029
|
const [value, setValue] = useState("");
|
|
10993
11030
|
if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
|
|
10994
|
-
logger$
|
|
11031
|
+
logger$E.error("Error: Form fields that rely on InputBase may not have an onChange property");
|
|
10995
11032
|
}
|
|
10996
11033
|
const handleInput = (e) => {
|
|
10997
11034
|
var _a;
|
|
@@ -11167,6 +11204,433 @@ function DocumentUploadComponent({
|
|
|
11167
11204
|
});
|
|
11168
11205
|
}
|
|
11169
11206
|
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);
|
|
11207
|
+
var Currencies = /* @__PURE__ */ ((Currencies2) => {
|
|
11208
|
+
Currencies2["AED"] = "AED";
|
|
11209
|
+
Currencies2["AUD"] = "AUD";
|
|
11210
|
+
Currencies2["BGN"] = "BGN";
|
|
11211
|
+
Currencies2["BRL"] = "BRL";
|
|
11212
|
+
Currencies2["CAD"] = "CAD";
|
|
11213
|
+
Currencies2["CHF"] = "CHF";
|
|
11214
|
+
Currencies2["CZK"] = "CZK";
|
|
11215
|
+
Currencies2["DKK"] = "DKK";
|
|
11216
|
+
Currencies2["EUR"] = "EUR";
|
|
11217
|
+
Currencies2["GBP"] = "GBP";
|
|
11218
|
+
Currencies2["HKD"] = "HKD";
|
|
11219
|
+
Currencies2["HRK"] = "HRK";
|
|
11220
|
+
Currencies2["HUF"] = "HUF";
|
|
11221
|
+
Currencies2["MXN"] = "MXN";
|
|
11222
|
+
Currencies2["MYR"] = "MYR";
|
|
11223
|
+
Currencies2["NOK"] = "NOK";
|
|
11224
|
+
Currencies2["NZD"] = "NZD";
|
|
11225
|
+
Currencies2["PLN"] = "PLN";
|
|
11226
|
+
Currencies2["RON"] = "RON";
|
|
11227
|
+
Currencies2["SEK"] = "SEK";
|
|
11228
|
+
Currencies2["SGD"] = "SGD";
|
|
11229
|
+
Currencies2["USD"] = "USD";
|
|
11230
|
+
return Currencies2;
|
|
11231
|
+
})(Currencies || {});
|
|
11232
|
+
const currencyByCountry = {
|
|
11233
|
+
[CountryCodes.Australia]: [Currencies.AUD],
|
|
11234
|
+
[CountryCodes.Austria]: [Currencies.EUR],
|
|
11235
|
+
[CountryCodes.Belgium]: [Currencies.EUR],
|
|
11236
|
+
[CountryCodes.Brazil]: [Currencies.BRL],
|
|
11237
|
+
[CountryCodes.Bulgaria]: [Currencies.BGN, Currencies.EUR],
|
|
11238
|
+
[CountryCodes.Canada]: [Currencies.CAD, Currencies.USD],
|
|
11239
|
+
[CountryCodes.Croatia]: [Currencies.HRK, Currencies.EUR],
|
|
11240
|
+
[CountryCodes.Cyprus]: [Currencies.EUR],
|
|
11241
|
+
[CountryCodes.CzechRepublic]: [Currencies.CZK, Currencies.EUR],
|
|
11242
|
+
[CountryCodes.Denmark]: [Currencies.DKK, Currencies.EUR],
|
|
11243
|
+
[CountryCodes.Estonia]: [Currencies.EUR],
|
|
11244
|
+
[CountryCodes.Finland]: [Currencies.EUR],
|
|
11245
|
+
[CountryCodes.France]: [Currencies.EUR],
|
|
11246
|
+
[CountryCodes.Germany]: [Currencies.EUR],
|
|
11247
|
+
[CountryCodes.Gibraltar]: [Currencies.GBP],
|
|
11248
|
+
[CountryCodes.Greece]: [Currencies.EUR],
|
|
11249
|
+
[CountryCodes.Guernsey]: [Currencies.GBP],
|
|
11250
|
+
[CountryCodes.HongKong]: [Currencies.HKD],
|
|
11251
|
+
[CountryCodes.Hungary]: [Currencies.HUF, Currencies.EUR],
|
|
11252
|
+
[CountryCodes.Ireland]: [Currencies.EUR],
|
|
11253
|
+
[CountryCodes.IsleOfMan]: [Currencies.GBP],
|
|
11254
|
+
[CountryCodes.Italy]: [Currencies.EUR],
|
|
11255
|
+
[CountryCodes.Jersey]: [Currencies.GBP],
|
|
11256
|
+
[CountryCodes.Latvia]: [Currencies.EUR],
|
|
11257
|
+
[CountryCodes.Liechtenstein]: [Currencies.CHF, Currencies.EUR],
|
|
11258
|
+
[CountryCodes.Lithuania]: [Currencies.EUR],
|
|
11259
|
+
[CountryCodes.Luxembourg]: [Currencies.EUR],
|
|
11260
|
+
[CountryCodes.Malaysia]: [Currencies.MYR],
|
|
11261
|
+
[CountryCodes.Malta]: [Currencies.EUR],
|
|
11262
|
+
[CountryCodes.Mexico]: [Currencies.MXN],
|
|
11263
|
+
[CountryCodes.Monaco]: [Currencies.EUR],
|
|
11264
|
+
[CountryCodes.Netherlands]: [Currencies.EUR],
|
|
11265
|
+
[CountryCodes.NewZealand]: [Currencies.NZD],
|
|
11266
|
+
[CountryCodes.Norway]: [Currencies.NOK, Currencies.EUR],
|
|
11267
|
+
[CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
|
|
11268
|
+
[CountryCodes.Portugal]: [Currencies.EUR],
|
|
11269
|
+
[CountryCodes.PuertoRico]: [Currencies.USD],
|
|
11270
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11271
|
+
[CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
|
|
11272
|
+
[CountryCodes.Singapore]: [Currencies.SGD],
|
|
11273
|
+
[CountryCodes.Slovakia]: [Currencies.EUR],
|
|
11274
|
+
[CountryCodes.Slovenia]: [Currencies.EUR],
|
|
11275
|
+
[CountryCodes.Spain]: [Currencies.EUR],
|
|
11276
|
+
[CountryCodes.Sweden]: [Currencies.SEK, Currencies.EUR],
|
|
11277
|
+
[CountryCodes.Switzerland]: [Currencies.CHF, Currencies.EUR],
|
|
11278
|
+
[CountryCodes.UnitedArabEmirates]: [Currencies.AED],
|
|
11279
|
+
[CountryCodes.UnitedKingdom]: [Currencies.GBP, Currencies.EUR],
|
|
11280
|
+
[CountryCodes.UnitedStates]: [Currencies.USD]
|
|
11281
|
+
};
|
|
11282
|
+
const CURRENCY_FIELD = ["currency"];
|
|
11283
|
+
function Currency({
|
|
11284
|
+
data,
|
|
11285
|
+
valid,
|
|
11286
|
+
errors,
|
|
11287
|
+
labels: labels2,
|
|
11288
|
+
readonly,
|
|
11289
|
+
handleChangeFor,
|
|
11290
|
+
helperText,
|
|
11291
|
+
country
|
|
11292
|
+
}) {
|
|
11293
|
+
const {
|
|
11294
|
+
i18n
|
|
11295
|
+
} = useI18nContext();
|
|
11296
|
+
const currenciesForCurrCountry = currencyByCountry[country];
|
|
11297
|
+
const countryCurrenciesItems = currenciesForCurrCountry ? currenciesForCurrCountry.map((currency) => ({
|
|
11298
|
+
id: currency,
|
|
11299
|
+
name: currency
|
|
11300
|
+
})) : [];
|
|
11301
|
+
return jsx("div", {
|
|
11302
|
+
className: "adyen-kyc-field__currency",
|
|
11303
|
+
children: jsx(Field, {
|
|
11304
|
+
name: "currency",
|
|
11305
|
+
label: labels2.currency,
|
|
11306
|
+
helper: helperText == null ? void 0 : helperText.currency,
|
|
11307
|
+
errorMessage: errors.currency,
|
|
11308
|
+
isValid: valid.currency,
|
|
11309
|
+
classNameModifiers: ["currency"],
|
|
11310
|
+
children: (childProps) => jsx(Select, {
|
|
11311
|
+
...childProps,
|
|
11312
|
+
onChange: handleChangeFor("currency", "input"),
|
|
11313
|
+
name: "currency",
|
|
11314
|
+
placeholder: i18n.get("currencyPlaceholder"),
|
|
11315
|
+
selected: data.currency,
|
|
11316
|
+
items: countryCurrenciesItems,
|
|
11317
|
+
readonly: countryCurrenciesItems.length === 1 || readonly && !!data.currency
|
|
11318
|
+
})
|
|
11319
|
+
})
|
|
11320
|
+
});
|
|
11321
|
+
}
|
|
11322
|
+
const FINANCIAL_REPORTING_DATE_FIELD = ["financialReportingDate"];
|
|
11323
|
+
function FinancialReportingDate({
|
|
11324
|
+
data,
|
|
11325
|
+
valid,
|
|
11326
|
+
errors,
|
|
11327
|
+
labels: labels2,
|
|
11328
|
+
readonly,
|
|
11329
|
+
handleChangeFor
|
|
11330
|
+
}) {
|
|
11331
|
+
const {
|
|
11332
|
+
i18n
|
|
11333
|
+
} = useI18nContext();
|
|
11334
|
+
return jsx("div", {
|
|
11335
|
+
children: jsx(Field, {
|
|
11336
|
+
name: "financialReportingDate",
|
|
11337
|
+
label: labels2.financialReportingDate,
|
|
11338
|
+
helper: i18n.get("dateOfTotalAssetsCalculation"),
|
|
11339
|
+
helperPosition: "below",
|
|
11340
|
+
errorMessage: errors.financialReportingDate,
|
|
11341
|
+
isValid: valid.financialReportingDate,
|
|
11342
|
+
classNameModifiers: ["financialReportingDate"],
|
|
11343
|
+
children: (childProps) => jsx(InputDate, {
|
|
11344
|
+
...childProps,
|
|
11345
|
+
name: "financialReportingDate",
|
|
11346
|
+
value: data.financialReportingDate,
|
|
11347
|
+
onInput: handleChangeFor("financialReportingDate", "input"),
|
|
11348
|
+
onBlur: handleChangeFor("financialReportingDate", "blur"),
|
|
11349
|
+
"aria-required": true,
|
|
11350
|
+
"aria-label": labels2.financialReportingDate,
|
|
11351
|
+
"aria-invalid": !valid.financialReportingDate,
|
|
11352
|
+
readonly,
|
|
11353
|
+
max: formatDateObj(/* @__PURE__ */ new Date())
|
|
11354
|
+
})
|
|
11355
|
+
})
|
|
11356
|
+
});
|
|
11357
|
+
}
|
|
11358
|
+
function InputNumber(props) {
|
|
11359
|
+
return jsx(InputBase, {
|
|
11360
|
+
...props,
|
|
11361
|
+
type: "number"
|
|
11362
|
+
});
|
|
11363
|
+
}
|
|
11364
|
+
const NUMBER_OF_EMPLOYEES_FIELD = ["numberOfEmployees"];
|
|
11365
|
+
function NumberOfEmployees({
|
|
11366
|
+
data,
|
|
11367
|
+
valid,
|
|
11368
|
+
errors,
|
|
11369
|
+
labels: labels2,
|
|
11370
|
+
readonly,
|
|
11371
|
+
handleChangeFor,
|
|
11372
|
+
helperText
|
|
11373
|
+
}) {
|
|
11374
|
+
return jsx("div", {
|
|
11375
|
+
children: jsx(Field, {
|
|
11376
|
+
name: "numberOfEmployees",
|
|
11377
|
+
label: labels2.numberOfEmployees,
|
|
11378
|
+
helper: helperText == null ? void 0 : helperText.numberOfEmployees,
|
|
11379
|
+
errorMessage: errors.numberOfEmployees,
|
|
11380
|
+
isValid: valid.numberOfEmployees,
|
|
11381
|
+
classNameModifiers: ["numberOfEmployees"],
|
|
11382
|
+
children: (childProps) => jsx(InputNumber, {
|
|
11383
|
+
...childProps,
|
|
11384
|
+
"aria-required": true,
|
|
11385
|
+
"aria-label": labels2.numberOfEmployees,
|
|
11386
|
+
"aria-invalid": !valid.numberOfEmployees,
|
|
11387
|
+
name: "numberOfEmployees",
|
|
11388
|
+
min: "0",
|
|
11389
|
+
step: "1",
|
|
11390
|
+
value: data.numberOfEmployees,
|
|
11391
|
+
readonly,
|
|
11392
|
+
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
11393
|
+
onBlur: handleChangeFor("numberOfEmployees", "blur")
|
|
11394
|
+
})
|
|
11395
|
+
})
|
|
11396
|
+
});
|
|
11397
|
+
}
|
|
11398
|
+
const financialInfoValidationRules = {
|
|
11399
|
+
numberOfEmployees: [{
|
|
11400
|
+
modes: ["blur"],
|
|
11401
|
+
validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
|
|
11402
|
+
errorMessage: "fieldIsRequired"
|
|
11403
|
+
}],
|
|
11404
|
+
financialReportingDate: [{
|
|
11405
|
+
modes: ["blur"],
|
|
11406
|
+
validate: (date) => !isEmpty(date),
|
|
11407
|
+
errorMessage: "fieldIsRequired"
|
|
11408
|
+
}, {
|
|
11409
|
+
modes: ["blur"],
|
|
11410
|
+
validate: (date) => date ? new Date(date) < /* @__PURE__ */ new Date() : false,
|
|
11411
|
+
errorMessage: "invalidFinancialReportingDate"
|
|
11412
|
+
}],
|
|
11413
|
+
currency: [{
|
|
11414
|
+
modes: ["blur"],
|
|
11415
|
+
validate: (currency) => !isEmpty(currency),
|
|
11416
|
+
errorMessage: "fieldIsRequired"
|
|
11417
|
+
}],
|
|
11418
|
+
reportedValueOption: {
|
|
11419
|
+
modes: ["blur"],
|
|
11420
|
+
validate: (option) => !isEmpty(option),
|
|
11421
|
+
errorMessage: "fieldIsRequired"
|
|
11422
|
+
},
|
|
11423
|
+
netAssets: {
|
|
11424
|
+
modes: ["blur"],
|
|
11425
|
+
validate: (amount) => !isUndefinedOrNull(amount),
|
|
11426
|
+
errorMessage: "fieldIsRequired"
|
|
11427
|
+
},
|
|
11428
|
+
annualTurnover: {
|
|
11429
|
+
modes: ["blur"],
|
|
11430
|
+
validate: (amount) => !isUndefinedOrNull(amount),
|
|
11431
|
+
errorMessage: "fieldIsRequired"
|
|
11432
|
+
}
|
|
11433
|
+
};
|
|
11434
|
+
const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
|
|
11435
|
+
const styles$7 = {
|
|
11436
|
+
"financial-information-reported-value-options": "adyen-kyc-financial-information-reported-value-options",
|
|
11437
|
+
financialInformationReportedValueOptions
|
|
11438
|
+
};
|
|
11439
|
+
const logger$D = createLogger("InputCurrency");
|
|
11440
|
+
const determineDecimalSeparator = (formatter) => formatter.formatToParts(0.1).find((part) => part.type === "decimal").value;
|
|
11441
|
+
const determineCurrencySymbol = (formatter) => formatter.formatToParts(0).find((part) => part.type === "currency").value;
|
|
11442
|
+
const getNumberFromFormattedCurrency = (formatted, decimalSeparator) => {
|
|
11443
|
+
const lastDecimalIndex = formatted.lastIndexOf(decimalSeparator);
|
|
11444
|
+
const normalized = Array.from(formatted).reduce((acc, curr, i) => {
|
|
11445
|
+
if (/[0-9]/.test(curr)) return acc + curr;
|
|
11446
|
+
if (i === lastDecimalIndex) return `${acc}.`;
|
|
11447
|
+
return acc;
|
|
11448
|
+
}, "");
|
|
11449
|
+
return parseFloat(normalized);
|
|
11450
|
+
};
|
|
11451
|
+
const InputCurrency = ({
|
|
11452
|
+
locale,
|
|
11453
|
+
currency,
|
|
11454
|
+
amount,
|
|
11455
|
+
onAmountChanged,
|
|
11456
|
+
...baseProps
|
|
11457
|
+
}) => {
|
|
11458
|
+
const formatter = useMemo(() => new Intl.NumberFormat(locale, {
|
|
11459
|
+
style: "currency",
|
|
11460
|
+
currency
|
|
11461
|
+
}), [locale, currency]);
|
|
11462
|
+
const decimalSeparator = useMemo(() => determineDecimalSeparator(formatter), [formatter]);
|
|
11463
|
+
const currencySymbol = useMemo(() => determineCurrencySymbol(formatter), [formatter]);
|
|
11464
|
+
const [text, setText] = useState("");
|
|
11465
|
+
const onInput = (e) => setText(e.target.value);
|
|
11466
|
+
const onBlur = (e) => {
|
|
11467
|
+
const rawValue = e.target.value;
|
|
11468
|
+
const value = getNumberFromFormattedCurrency(rawValue, decimalSeparator);
|
|
11469
|
+
if (Number.isNaN(value)) {
|
|
11470
|
+
logger$D.warn(`Unable to get number from formatted currency: "${rawValue}"`);
|
|
11471
|
+
setText(isUndefinedOrNull(amount) ? currencySymbol : formatter.format(amount));
|
|
11472
|
+
return;
|
|
11473
|
+
}
|
|
11474
|
+
onAmountChanged(value);
|
|
11475
|
+
};
|
|
11476
|
+
useEffect(() => {
|
|
11477
|
+
setText(isUndefinedOrNull(amount) ? currencySymbol : formatter.format(amount));
|
|
11478
|
+
}, [amount, currencySymbol, formatter]);
|
|
11479
|
+
return jsx(InputText, {
|
|
11480
|
+
...baseProps,
|
|
11481
|
+
value: text,
|
|
11482
|
+
onInput,
|
|
11483
|
+
onBlur
|
|
11484
|
+
});
|
|
11485
|
+
};
|
|
11486
|
+
const reportedValue = "adyen-kyc-reported-value";
|
|
11487
|
+
const reportedValueInput = "adyen-kyc-reported-value-input";
|
|
11488
|
+
const styles$6 = {
|
|
11489
|
+
"reported-value": "adyen-kyc-reported-value",
|
|
11490
|
+
reportedValue,
|
|
11491
|
+
"reported-value-input": "adyen-kyc-reported-value-input",
|
|
11492
|
+
reportedValueInput
|
|
11493
|
+
};
|
|
11494
|
+
const ReportedValue = ({
|
|
11495
|
+
currency,
|
|
11496
|
+
amount,
|
|
11497
|
+
onAmountChanged,
|
|
11498
|
+
helper,
|
|
11499
|
+
fieldName,
|
|
11500
|
+
errorMessage,
|
|
11501
|
+
isValid
|
|
11502
|
+
}) => {
|
|
11503
|
+
const {
|
|
11504
|
+
i18n
|
|
11505
|
+
} = useI18nContext();
|
|
11506
|
+
return jsx("div", {
|
|
11507
|
+
className: styles$6.reportedValue,
|
|
11508
|
+
children: jsx(Field, {
|
|
11509
|
+
name: fieldName,
|
|
11510
|
+
errorMessage,
|
|
11511
|
+
isValid,
|
|
11512
|
+
helper,
|
|
11513
|
+
children: (childProps) => jsx(InputCurrency, {
|
|
11514
|
+
...childProps,
|
|
11515
|
+
locale: i18n.locale,
|
|
11516
|
+
currency,
|
|
11517
|
+
amount,
|
|
11518
|
+
onAmountChanged,
|
|
11519
|
+
className: styles$6.reportedValueInput
|
|
11520
|
+
})
|
|
11521
|
+
})
|
|
11522
|
+
});
|
|
11523
|
+
};
|
|
11524
|
+
const financialInformationFields = [...NUMBER_OF_EMPLOYEES_FIELD, ...FINANCIAL_REPORTING_DATE_FIELD, ...CURRENCY_FIELD, "reportedValueOption"];
|
|
11525
|
+
const getSchema = (data) => [...financialInformationFields, ...data.reportedValueOption ? [data.reportedValueOption] : []];
|
|
11526
|
+
function FinancialInformation(props) {
|
|
11527
|
+
var _a;
|
|
11528
|
+
const {
|
|
11529
|
+
i18n
|
|
11530
|
+
} = useI18nContext();
|
|
11531
|
+
const defaultCurrency = ((_a = currencyByCountry[props.country]) == null ? void 0 : _a[0]) ?? "EUR";
|
|
11532
|
+
const {
|
|
11533
|
+
handleChangeFor,
|
|
11534
|
+
data,
|
|
11535
|
+
valid,
|
|
11536
|
+
errors,
|
|
11537
|
+
fieldProblems,
|
|
11538
|
+
schema
|
|
11539
|
+
} = useForm({
|
|
11540
|
+
...props,
|
|
11541
|
+
schema: getSchema,
|
|
11542
|
+
defaultData: props.data,
|
|
11543
|
+
rules: financialInfoValidationRules,
|
|
11544
|
+
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
11545
|
+
});
|
|
11546
|
+
const {
|
|
11547
|
+
updateStateSlice
|
|
11548
|
+
} = useGlobalDataSlice("companyFinancialInformation");
|
|
11549
|
+
useEffect(() => {
|
|
11550
|
+
updateStateSlice({
|
|
11551
|
+
data,
|
|
11552
|
+
valid,
|
|
11553
|
+
errors,
|
|
11554
|
+
fieldProblems,
|
|
11555
|
+
schema
|
|
11556
|
+
});
|
|
11557
|
+
}, [data, valid, errors, fieldProblems, schema, updateStateSlice]);
|
|
11558
|
+
const updateReportedValueOption = (option) => {
|
|
11559
|
+
if (data.reportedValueOption) {
|
|
11560
|
+
handleChangeFor(data.reportedValueOption)(null);
|
|
11561
|
+
}
|
|
11562
|
+
const newReportedValue = option;
|
|
11563
|
+
handleChangeFor("reportedValueOption")(newReportedValue);
|
|
11564
|
+
};
|
|
11565
|
+
const formUtils = formUtilities(props, i18n);
|
|
11566
|
+
return jsxs("div", {
|
|
11567
|
+
className: "adyen-kyc-company-financial-information",
|
|
11568
|
+
children: [jsx(FormHeader, {
|
|
11569
|
+
heading: props.heading
|
|
11570
|
+
}), jsx(NumberOfEmployees, {
|
|
11571
|
+
data: formUtils.getFieldData(data, NUMBER_OF_EMPLOYEES_FIELD),
|
|
11572
|
+
errors: formUtils.getFieldErrors(errors, fieldProblems, NUMBER_OF_EMPLOYEES_FIELD),
|
|
11573
|
+
handleChangeFor,
|
|
11574
|
+
labels: formUtils.getFieldLabels(NUMBER_OF_EMPLOYEES_FIELD),
|
|
11575
|
+
readonly: formUtils.isReadOnly("numberOfEmployees"),
|
|
11576
|
+
valid: formUtils.getFieldValid(valid, NUMBER_OF_EMPLOYEES_FIELD)
|
|
11577
|
+
}), jsx(FinancialReportingDate, {
|
|
11578
|
+
data: formUtils.getFieldData(data, FINANCIAL_REPORTING_DATE_FIELD),
|
|
11579
|
+
errors: formUtils.getFieldErrors(errors, fieldProblems, FINANCIAL_REPORTING_DATE_FIELD),
|
|
11580
|
+
handleChangeFor,
|
|
11581
|
+
labels: formUtils.getFieldLabels(FINANCIAL_REPORTING_DATE_FIELD),
|
|
11582
|
+
readonly: formUtils.isReadOnly("financialReportingDate"),
|
|
11583
|
+
valid: formUtils.getFieldValid(valid, FINANCIAL_REPORTING_DATE_FIELD)
|
|
11584
|
+
}), jsx(Currency, {
|
|
11585
|
+
country: props.country,
|
|
11586
|
+
data: formUtils.getFieldData(data, CURRENCY_FIELD),
|
|
11587
|
+
errors: formUtils.getFieldErrors(errors, fieldProblems, CURRENCY_FIELD),
|
|
11588
|
+
handleChangeFor,
|
|
11589
|
+
labels: {
|
|
11590
|
+
currency: i18n.get("reportingCurrency")
|
|
11591
|
+
},
|
|
11592
|
+
readonly: formUtils.isReadOnly("currency"),
|
|
11593
|
+
valid: formUtils.getFieldValid(valid, CURRENCY_FIELD)
|
|
11594
|
+
}), jsx(Field, {
|
|
11595
|
+
name: "reportedValueOption",
|
|
11596
|
+
label: i18n.get("reportedValue"),
|
|
11597
|
+
errorMessage: formUtils.getErrorMessage("reportedValueOption", errors, fieldProblems),
|
|
11598
|
+
isValid: valid.reportedValueOption,
|
|
11599
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
11600
|
+
...childProps,
|
|
11601
|
+
value: data.reportedValueOption,
|
|
11602
|
+
items: [{
|
|
11603
|
+
id: "netAssets",
|
|
11604
|
+
name: "totalAssets",
|
|
11605
|
+
content: jsx(ReportedValue, {
|
|
11606
|
+
currency: data.currency ?? defaultCurrency,
|
|
11607
|
+
amount: data.netAssets,
|
|
11608
|
+
onAmountChanged: handleChangeFor("netAssets"),
|
|
11609
|
+
helper: i18n.get("totalAssetsHelper"),
|
|
11610
|
+
fieldName: "netAssets",
|
|
11611
|
+
isValid: valid.netAssets,
|
|
11612
|
+
errorMessage: formUtils.getErrorMessage("netAssets", errors, fieldProblems)
|
|
11613
|
+
})
|
|
11614
|
+
}, {
|
|
11615
|
+
id: "annualTurnover",
|
|
11616
|
+
name: "annualTurnover",
|
|
11617
|
+
content: jsx(ReportedValue, {
|
|
11618
|
+
currency: data.currency ?? defaultCurrency,
|
|
11619
|
+
amount: data.annualTurnover,
|
|
11620
|
+
onAmountChanged: handleChangeFor("annualTurnover"),
|
|
11621
|
+
helper: i18n.get("annualTurnoverHelper"),
|
|
11622
|
+
fieldName: "annualTurnover",
|
|
11623
|
+
isValid: valid.annualTurnover,
|
|
11624
|
+
errorMessage: formUtils.getErrorMessage("annualTurnover", errors, fieldProblems)
|
|
11625
|
+
})
|
|
11626
|
+
}],
|
|
11627
|
+
onChange: updateReportedValueOption,
|
|
11628
|
+
showContentOnlyOnSelected: true,
|
|
11629
|
+
className: styles$7.financialInformationReportedValueOptions
|
|
11630
|
+
})
|
|
11631
|
+
})]
|
|
11632
|
+
});
|
|
11633
|
+
}
|
|
11170
11634
|
function List({
|
|
11171
11635
|
className,
|
|
11172
11636
|
nested,
|
|
@@ -12914,10 +13378,7 @@ function RegistrationAddressComponent(props) {
|
|
|
12914
13378
|
handleChangeFor("operationalAddress")(state.data);
|
|
12915
13379
|
setValid("operationalAddress", Boolean(state.isValid));
|
|
12916
13380
|
};
|
|
12917
|
-
const handleOperationalAddressIsSameChange = (
|
|
12918
|
-
const {
|
|
12919
|
-
value
|
|
12920
|
-
} = e.target;
|
|
13381
|
+
const handleOperationalAddressIsSameChange = (value) => {
|
|
12921
13382
|
handleChangeFor("operationalAddressIsSame")(value);
|
|
12922
13383
|
if (value === "OperationAddressAnswerYes") setValid("operationalAddress", true);
|
|
12923
13384
|
};
|
|
@@ -13276,6 +13737,13 @@ const companyForms = {
|
|
|
13276
13737
|
formHeading: "companyTaxDocumentFormHeading",
|
|
13277
13738
|
formDescription: "companyTaxDocumentFormDescription",
|
|
13278
13739
|
fields: ["taxDocument"]
|
|
13740
|
+
},
|
|
13741
|
+
companyFinancialInformation: {
|
|
13742
|
+
formId: "companyFinancialInformation",
|
|
13743
|
+
formName: "financialInformation",
|
|
13744
|
+
formHeading: "companyFinancialInformationFormHeading",
|
|
13745
|
+
formDescription: "companyFinancialInformationFormDescription",
|
|
13746
|
+
fields: financialInformationFields
|
|
13279
13747
|
}
|
|
13280
13748
|
};
|
|
13281
13749
|
const CompanyNameAndCountryFormID = companyForms.companyNameAndCountry.formId;
|
|
@@ -13284,6 +13752,7 @@ const CompanyRegistrationDetailsFormID = companyForms.companyRegistrationDetails
|
|
|
13284
13752
|
const CompanyRegistrationAddressFormID = companyForms.companyRegistrationAddress.formId;
|
|
13285
13753
|
const CompanyRegistrationDocumentFormID = companyForms.companyRegistrationDocument.formId;
|
|
13286
13754
|
const CompanyTaxDocumentFormID = companyForms.companyTaxDocument.formId;
|
|
13755
|
+
const CompanyFinancialInformationFormID = companyForms.companyFinancialInformation.formId;
|
|
13287
13756
|
const companyDocumentForms = [CompanyRegistrationDocumentFormID, CompanyTaxDocumentFormID];
|
|
13288
13757
|
function CompanyComponent(props) {
|
|
13289
13758
|
const {
|
|
@@ -13298,6 +13767,7 @@ function CompanyComponent(props) {
|
|
|
13298
13767
|
const companyRegistrationAddressFormProps = getNestedOuterFormPropsFromOuterFormProps(props, CompanyRegistrationAddressFormID);
|
|
13299
13768
|
const companyRegistrationDocumentFormProps = getFormProps(props, CompanyRegistrationDocumentFormID);
|
|
13300
13769
|
const companyTaxDocumentFormProps = getFormProps(props, CompanyTaxDocumentFormID);
|
|
13770
|
+
const companyFinancialInformationFormProps = getFormProps(props, CompanyFinancialInformationFormID);
|
|
13301
13771
|
const handleStateChange = ({
|
|
13302
13772
|
currentState,
|
|
13303
13773
|
prevState
|
|
@@ -13405,6 +13875,14 @@ function CompanyComponent(props) {
|
|
|
13405
13875
|
}),
|
|
13406
13876
|
id: CompanyTaxDocumentFormID
|
|
13407
13877
|
})
|
|
13878
|
+
}), jsx("div", {
|
|
13879
|
+
className: props.activeForm.formId !== CompanyFinancialInformationFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
|
|
13880
|
+
children: jsx(FinancialInformation, {
|
|
13881
|
+
...companyFinancialInformationFormProps,
|
|
13882
|
+
heading: i18n.get("financialInformation"),
|
|
13883
|
+
id: CompanyFinancialInformationFormID,
|
|
13884
|
+
country: props.country
|
|
13885
|
+
})
|
|
13408
13886
|
})]
|
|
13409
13887
|
});
|
|
13410
13888
|
}
|
|
@@ -13633,6 +14111,7 @@ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
|
13633
14111
|
const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
|
|
13634
14112
|
const COUNTRIES_THAT_USES_UEN_OR_GST = [CountryCodes.Singapore];
|
|
13635
14113
|
const COUNTRIES_USING_COMPANY_SEARCH = [CountryCodes.UnitedStates];
|
|
14114
|
+
const COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [CountryCodes.UnitedKingdom];
|
|
13636
14115
|
const rules$3 = ({
|
|
13637
14116
|
data,
|
|
13638
14117
|
country,
|
|
@@ -13670,7 +14149,7 @@ const rules$3 = ({
|
|
|
13670
14149
|
}
|
|
13671
14150
|
},
|
|
13672
14151
|
companyRegistrationNumberExemptionAllowed: () => {
|
|
13673
|
-
var _a, _b, _c, _d, _e, _f;
|
|
14152
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
13674
14153
|
if ("companyType" in data) {
|
|
13675
14154
|
if (country === CountryCodes.Germany && (((_a = data.companyType) == null ? void 0 : _a.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_b = data.companyType) == null ? void 0 : _b.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
|
|
13676
14155
|
return "REQUIRED";
|
|
@@ -13678,12 +14157,18 @@ const rules$3 = ({
|
|
|
13678
14157
|
if (country === CountryCodes.Denmark && ((_c = data.companyType) == null ? void 0 : _c.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
|
|
13679
14158
|
return "REQUIRED";
|
|
13680
14159
|
}
|
|
14160
|
+
if (isExperimentEnabled("EnableAUIncorporatedPartnershipSkipRegistrationNumber") && country === CountryCodes.Australia && ((_d = data.companyType) == null ? void 0 : _d.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP) {
|
|
14161
|
+
return "REQUIRED";
|
|
14162
|
+
}
|
|
13681
14163
|
}
|
|
13682
14164
|
if ("companyStructure" in data) {
|
|
13683
|
-
if (country === CountryCodes.Germany && (((
|
|
14165
|
+
if (country === CountryCodes.Germany && (((_e = data.companyStructure) == null ? void 0 : _e.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_f = data.companyStructure) == null ? void 0 : _f.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
|
|
13684
14166
|
return "REQUIRED";
|
|
13685
14167
|
}
|
|
13686
|
-
if (country === CountryCodes.Denmark && ((
|
|
14168
|
+
if (country === CountryCodes.Denmark && ((_g = data.companyStructure) == null ? void 0 : _g.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
|
|
14169
|
+
return "REQUIRED";
|
|
14170
|
+
}
|
|
14171
|
+
if (isExperimentEnabled("EnableAUIncorporatedPartnershipSkipRegistrationNumber") && country === CountryCodes.Australia && ((_h = data.companyStructure) == null ? void 0 : _h.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP) {
|
|
13687
14172
|
return "REQUIRED";
|
|
13688
14173
|
}
|
|
13689
14174
|
}
|
|
@@ -13748,6 +14233,11 @@ const rules$3 = ({
|
|
|
13748
14233
|
if (COUNTRIES_USING_COMPANY_SEARCH.includes(country)) {
|
|
13749
14234
|
return "REQUIRED";
|
|
13750
14235
|
}
|
|
14236
|
+
},
|
|
14237
|
+
countryRequiringFinancialInformation: () => {
|
|
14238
|
+
if (isExperimentEnabled("EnableFinancialInformationComponentV4") && COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
|
|
14239
|
+
return "REQUIRED";
|
|
14240
|
+
}
|
|
13751
14241
|
}
|
|
13752
14242
|
});
|
|
13753
14243
|
const logger$A = createLogger("mapPayoutAccountSchemaToApiBankAccount");
|
|
@@ -14033,6 +14523,13 @@ const highExposureBaseMapping = {
|
|
|
14033
14523
|
stateOrProvince: "organization.registeredAddress.stateOrProvince",
|
|
14034
14524
|
country: "organization.registeredAddress.country"
|
|
14035
14525
|
};
|
|
14526
|
+
const financialInformationComponentsKeyMapping = {
|
|
14527
|
+
numberOfEmployees: "employeeCount",
|
|
14528
|
+
annualTurnover: "annualTurnover",
|
|
14529
|
+
netAssets: "netAssets",
|
|
14530
|
+
financialReportingDate: "dateOfFinancialData",
|
|
14531
|
+
currency: "currencyOfFinancialData"
|
|
14532
|
+
};
|
|
14036
14533
|
const businessDetailsComponentsKeyMapping = {
|
|
14037
14534
|
"additionalInformation.exemptedFromVat": "organization.vatAbsenceReason",
|
|
14038
14535
|
...businessDetailsBaseMapping
|
|
@@ -14072,6 +14569,9 @@ const solePropComponentsKeyMapping = {
|
|
|
14072
14569
|
const solePropApiKeyMapping = {
|
|
14073
14570
|
...reverseObject(solePropBaseMapping)
|
|
14074
14571
|
};
|
|
14572
|
+
const financialInformationApiKeyMapping = {
|
|
14573
|
+
...reverseObject(financialInformationComponentsKeyMapping)
|
|
14574
|
+
};
|
|
14075
14575
|
const remediationCompanyApiKeyMapping = {
|
|
14076
14576
|
...businessDetailsApiKeyMapping,
|
|
14077
14577
|
"organization.registeredAddress": "additionalInformation.companyRegistrationAddress.registrationAddress",
|
|
@@ -14234,6 +14734,21 @@ const mapPayoutDetailsToTransferInstrument = ({
|
|
|
14234
14734
|
legalEntityId: legalEntity.id,
|
|
14235
14735
|
type: TransferInstrumentType.BANK_ACCOUNT
|
|
14236
14736
|
});
|
|
14737
|
+
const mapFinancialReportsToFinancialInformation = (financialReports) => {
|
|
14738
|
+
const mostRecentReport = financialReports.reduce((latest, curr) => {
|
|
14739
|
+
if (!latest || curr.dateOfFinancialData > latest.dateOfFinancialData) {
|
|
14740
|
+
return curr;
|
|
14741
|
+
}
|
|
14742
|
+
return latest;
|
|
14743
|
+
}, void 0);
|
|
14744
|
+
const financialInfo = formatObject(mostRecentReport, financialInformationComponentsKeyMapping);
|
|
14745
|
+
if (financialInfo.netAssets !== void 0) {
|
|
14746
|
+
financialInfo.reportedValueOption = "netAssets";
|
|
14747
|
+
} else if (financialInfo.annualTurnover !== void 0) {
|
|
14748
|
+
financialInfo.reportedValueOption = "annualTurnover";
|
|
14749
|
+
}
|
|
14750
|
+
return financialInfo;
|
|
14751
|
+
};
|
|
14237
14752
|
const mapLegalEntityToIndividual = (legalEntity, isChangingType) => {
|
|
14238
14753
|
var _a, _b, _c;
|
|
14239
14754
|
let individualData = formatObject(legalEntity, individualComponentsKeyMapping);
|
|
@@ -14274,7 +14789,7 @@ const mapIndividualToLegalEntity = (data) => {
|
|
|
14274
14789
|
return requestObj;
|
|
14275
14790
|
};
|
|
14276
14791
|
const mapLegalEntityToCompany = (legalEntity) => {
|
|
14277
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
14792
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
14278
14793
|
let companyCompData;
|
|
14279
14794
|
if (legalEntity == null ? void 0 : legalEntity.organization) {
|
|
14280
14795
|
companyCompData = formatObject(legalEntity, companyComponentsKeyMapping);
|
|
@@ -14311,6 +14826,9 @@ const mapLegalEntityToCompany = (legalEntity) => {
|
|
|
14311
14826
|
...mapApiDocumentToCompanyDocuments(legalEntity == null ? void 0 : legalEntity.id)
|
|
14312
14827
|
};
|
|
14313
14828
|
}
|
|
14829
|
+
if ((_j = legalEntity == null ? void 0 : legalEntity.organization) == null ? void 0 : _j.financialReports) {
|
|
14830
|
+
companyCompData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(legalEntity.organization.financialReports);
|
|
14831
|
+
}
|
|
14314
14832
|
}
|
|
14315
14833
|
companyCompData = {
|
|
14316
14834
|
...companyCompData,
|
|
@@ -14342,6 +14860,9 @@ const mapCompanyToLegalEntity = (data) => {
|
|
|
14342
14860
|
});
|
|
14343
14861
|
}
|
|
14344
14862
|
requestObj.organization = transformCountryOfGoverningLawToLegalEntity(data.companyNameAndCountry, requestObj.organization);
|
|
14863
|
+
if (data.companyFinancialInformation) {
|
|
14864
|
+
requestObj.organization.financialReports = [formatObject(data.companyFinancialInformation, financialInformationApiKeyMapping)];
|
|
14865
|
+
}
|
|
14345
14866
|
requestObj.type = LegalEntityType.ORGANIZATION;
|
|
14346
14867
|
return requestObj;
|
|
14347
14868
|
};
|
|
@@ -15206,13 +15727,12 @@ function IdDocumentUploadComponent(props) {
|
|
|
15206
15727
|
...props
|
|
15207
15728
|
});
|
|
15208
15729
|
}
|
|
15209
|
-
|
|
15730
|
+
const RadioCardSelect = ({
|
|
15210
15731
|
options,
|
|
15211
15732
|
name,
|
|
15212
15733
|
onSelect,
|
|
15213
15734
|
selected,
|
|
15214
15735
|
isInvalid,
|
|
15215
|
-
uniqueId,
|
|
15216
15736
|
className,
|
|
15217
15737
|
optionId,
|
|
15218
15738
|
optionName,
|
|
@@ -15222,29 +15742,27 @@ function RadioCardSelect({
|
|
|
15222
15742
|
renderOptionIcon,
|
|
15223
15743
|
renderOptionBody,
|
|
15224
15744
|
renderOptionFooter,
|
|
15225
|
-
isOptionDisabled
|
|
15226
|
-
|
|
15227
|
-
|
|
15228
|
-
|
|
15229
|
-
|
|
15230
|
-
|
|
15231
|
-
|
|
15232
|
-
|
|
15233
|
-
|
|
15234
|
-
|
|
15235
|
-
|
|
15236
|
-
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
});
|
|
15247
|
-
}
|
|
15745
|
+
isOptionDisabled,
|
|
15746
|
+
floatingRadio
|
|
15747
|
+
}) => jsx("div", {
|
|
15748
|
+
className: className ?? "adyen-kyc-radio-group-card",
|
|
15749
|
+
children: options.map((option) => jsx(RadioCard, {
|
|
15750
|
+
optionId: optionId(option),
|
|
15751
|
+
optionName: optionName(option),
|
|
15752
|
+
optionDescription: optionDescription == null ? void 0 : optionDescription(option),
|
|
15753
|
+
optionSubtitle: optionSubtitle == null ? void 0 : optionSubtitle(option),
|
|
15754
|
+
isInvalid,
|
|
15755
|
+
isSelected: selected === option,
|
|
15756
|
+
onSelect: () => onSelect(option),
|
|
15757
|
+
name,
|
|
15758
|
+
classNames: optionClassNames == null ? void 0 : optionClassNames(option),
|
|
15759
|
+
icon: renderOptionIcon == null ? void 0 : renderOptionIcon(option),
|
|
15760
|
+
body: renderOptionBody == null ? void 0 : renderOptionBody(option),
|
|
15761
|
+
footer: renderOptionFooter == null ? void 0 : renderOptionFooter(option),
|
|
15762
|
+
disabled: isOptionDisabled == null ? void 0 : isOptionDisabled(option),
|
|
15763
|
+
floatingRadio
|
|
15764
|
+
}, optionId(option)))
|
|
15765
|
+
});
|
|
15248
15766
|
const idVerificationMethodsMetadata = {
|
|
15249
15767
|
instantVerification: {
|
|
15250
15768
|
name: "instantVerification",
|
|
@@ -15382,14 +15900,15 @@ function IdVerificationMethodComponent(props) {
|
|
|
15382
15900
|
optionDescription: (method) => idVerificationMethodsMetadata[method].description,
|
|
15383
15901
|
className: "adyen-kyc-field-verification-methods",
|
|
15384
15902
|
optionClassNames: () => ({
|
|
15385
|
-
label: "adyen-kyc-field-verification-methods__card
|
|
15903
|
+
label: "adyen-kyc-field-verification-methods__card"
|
|
15386
15904
|
}),
|
|
15387
15905
|
renderOptionIcon: (method) => jsx(IdVerificationMethodOptionIcon, {
|
|
15388
15906
|
method
|
|
15389
15907
|
}),
|
|
15390
15908
|
renderOptionFooter: (method) => jsx(IdVerificationMethodOptionFooter, {
|
|
15391
15909
|
method
|
|
15392
|
-
})
|
|
15910
|
+
}),
|
|
15911
|
+
floatingRadio: true
|
|
15393
15912
|
})
|
|
15394
15913
|
}), jsx(ContextGuidance, {
|
|
15395
15914
|
page: "Instant verification with Onfido",
|
|
@@ -16211,9 +16730,9 @@ const defaultFieldConfig$5 = {
|
|
|
16211
16730
|
guidanceText: {
|
|
16212
16731
|
key: "enterXToYCharactersWithAMixForExample",
|
|
16213
16732
|
values: {
|
|
16214
|
-
minChars: "
|
|
16733
|
+
minChars: "5",
|
|
16215
16734
|
maxChars: "11",
|
|
16216
|
-
example: "
|
|
16735
|
+
example: "2093628291"
|
|
16217
16736
|
}
|
|
16218
16737
|
}
|
|
16219
16738
|
};
|
|
@@ -16241,16 +16760,16 @@ const licenseCardNumberDefaultConfig = {
|
|
|
16241
16760
|
[CountryCodes.Australia]: {
|
|
16242
16761
|
label: "licenseCardNumber",
|
|
16243
16762
|
mask: {
|
|
16244
|
-
mask: makeMask(...alphanumericInputs(6), ...alphanumericInputs(
|
|
16763
|
+
mask: makeMask(...alphanumericInputs(6), ...alphanumericInputs(5, true)),
|
|
16245
16764
|
transformOnType: uppercase
|
|
16246
16765
|
},
|
|
16247
16766
|
validators: validatePatternOnBlur(DriversLicenseCardNumberPatterns[CountryCodes.Australia]),
|
|
16248
16767
|
guidanceText: {
|
|
16249
16768
|
key: "enterXToYCharactersWithAMixForExample",
|
|
16250
16769
|
values: {
|
|
16251
|
-
minChars: "
|
|
16252
|
-
maxChars: "
|
|
16253
|
-
example: "
|
|
16770
|
+
minChars: "5",
|
|
16771
|
+
maxChars: "11",
|
|
16772
|
+
example: "2093628291"
|
|
16254
16773
|
}
|
|
16255
16774
|
}
|
|
16256
16775
|
}
|
|
@@ -16741,10 +17260,7 @@ function IndividualIdNumberTypeSelector({
|
|
|
16741
17260
|
name: "individualIdNumberType",
|
|
16742
17261
|
items: options,
|
|
16743
17262
|
value: selected,
|
|
16744
|
-
onChange: (
|
|
16745
|
-
var _a;
|
|
16746
|
-
return setSelected == null ? void 0 : setSelected((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
|
|
16747
|
-
}
|
|
17263
|
+
onChange: (value) => setSelected(value)
|
|
16748
17264
|
})
|
|
16749
17265
|
});
|
|
16750
17266
|
}
|
|
@@ -18970,81 +19486,6 @@ const ActionBar = ({
|
|
|
18970
19486
|
})
|
|
18971
19487
|
})]
|
|
18972
19488
|
});
|
|
18973
|
-
var Currencies = /* @__PURE__ */ ((Currencies2) => {
|
|
18974
|
-
Currencies2["AED"] = "AED";
|
|
18975
|
-
Currencies2["AUD"] = "AUD";
|
|
18976
|
-
Currencies2["BGN"] = "BGN";
|
|
18977
|
-
Currencies2["BRL"] = "BRL";
|
|
18978
|
-
Currencies2["CAD"] = "CAD";
|
|
18979
|
-
Currencies2["CHF"] = "CHF";
|
|
18980
|
-
Currencies2["CZK"] = "CZK";
|
|
18981
|
-
Currencies2["DKK"] = "DKK";
|
|
18982
|
-
Currencies2["EUR"] = "EUR";
|
|
18983
|
-
Currencies2["GBP"] = "GBP";
|
|
18984
|
-
Currencies2["HKD"] = "HKD";
|
|
18985
|
-
Currencies2["HRK"] = "HRK";
|
|
18986
|
-
Currencies2["HUF"] = "HUF";
|
|
18987
|
-
Currencies2["MXN"] = "MXN";
|
|
18988
|
-
Currencies2["MYR"] = "MYR";
|
|
18989
|
-
Currencies2["NOK"] = "NOK";
|
|
18990
|
-
Currencies2["NZD"] = "NZD";
|
|
18991
|
-
Currencies2["PLN"] = "PLN";
|
|
18992
|
-
Currencies2["RON"] = "RON";
|
|
18993
|
-
Currencies2["SEK"] = "SEK";
|
|
18994
|
-
Currencies2["SGD"] = "SGD";
|
|
18995
|
-
Currencies2["USD"] = "USD";
|
|
18996
|
-
return Currencies2;
|
|
18997
|
-
})(Currencies || {});
|
|
18998
|
-
const currencyByCountry = {
|
|
18999
|
-
[CountryCodes.Australia]: [Currencies.AUD],
|
|
19000
|
-
[CountryCodes.Austria]: [Currencies.EUR],
|
|
19001
|
-
[CountryCodes.Belgium]: [Currencies.EUR],
|
|
19002
|
-
[CountryCodes.Brazil]: [Currencies.BRL],
|
|
19003
|
-
[CountryCodes.Bulgaria]: [Currencies.BGN, Currencies.EUR],
|
|
19004
|
-
[CountryCodes.Canada]: [Currencies.CAD, Currencies.USD],
|
|
19005
|
-
[CountryCodes.Croatia]: [Currencies.HRK, Currencies.EUR],
|
|
19006
|
-
[CountryCodes.Cyprus]: [Currencies.EUR],
|
|
19007
|
-
[CountryCodes.CzechRepublic]: [Currencies.CZK, Currencies.EUR],
|
|
19008
|
-
[CountryCodes.Denmark]: [Currencies.DKK, Currencies.EUR],
|
|
19009
|
-
[CountryCodes.Estonia]: [Currencies.EUR],
|
|
19010
|
-
[CountryCodes.Finland]: [Currencies.EUR],
|
|
19011
|
-
[CountryCodes.France]: [Currencies.EUR],
|
|
19012
|
-
[CountryCodes.Germany]: [Currencies.EUR],
|
|
19013
|
-
[CountryCodes.Gibraltar]: [Currencies.GBP],
|
|
19014
|
-
[CountryCodes.Greece]: [Currencies.EUR],
|
|
19015
|
-
[CountryCodes.Guernsey]: [Currencies.GBP],
|
|
19016
|
-
[CountryCodes.HongKong]: [Currencies.HKD],
|
|
19017
|
-
[CountryCodes.Hungary]: [Currencies.HUF, Currencies.EUR],
|
|
19018
|
-
[CountryCodes.Ireland]: [Currencies.EUR],
|
|
19019
|
-
[CountryCodes.IsleOfMan]: [Currencies.GBP],
|
|
19020
|
-
[CountryCodes.Italy]: [Currencies.EUR],
|
|
19021
|
-
[CountryCodes.Jersey]: [Currencies.GBP],
|
|
19022
|
-
[CountryCodes.Latvia]: [Currencies.EUR],
|
|
19023
|
-
[CountryCodes.Liechtenstein]: [Currencies.CHF, Currencies.EUR],
|
|
19024
|
-
[CountryCodes.Lithuania]: [Currencies.EUR],
|
|
19025
|
-
[CountryCodes.Luxembourg]: [Currencies.EUR],
|
|
19026
|
-
[CountryCodes.Malaysia]: [Currencies.MYR],
|
|
19027
|
-
[CountryCodes.Malta]: [Currencies.EUR],
|
|
19028
|
-
[CountryCodes.Mexico]: [Currencies.MXN],
|
|
19029
|
-
[CountryCodes.Monaco]: [Currencies.EUR],
|
|
19030
|
-
[CountryCodes.Netherlands]: [Currencies.EUR],
|
|
19031
|
-
[CountryCodes.NewZealand]: [Currencies.NZD],
|
|
19032
|
-
[CountryCodes.Norway]: [Currencies.NOK, Currencies.EUR],
|
|
19033
|
-
[CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
|
|
19034
|
-
[CountryCodes.Portugal]: [Currencies.EUR],
|
|
19035
|
-
[CountryCodes.PuertoRico]: [Currencies.USD],
|
|
19036
|
-
// should exactly match CountryCodes.UnitedStates
|
|
19037
|
-
[CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
|
|
19038
|
-
[CountryCodes.Singapore]: [Currencies.SGD],
|
|
19039
|
-
[CountryCodes.Slovakia]: [Currencies.EUR],
|
|
19040
|
-
[CountryCodes.Slovenia]: [Currencies.EUR],
|
|
19041
|
-
[CountryCodes.Spain]: [Currencies.EUR],
|
|
19042
|
-
[CountryCodes.Sweden]: [Currencies.SEK, Currencies.EUR],
|
|
19043
|
-
[CountryCodes.Switzerland]: [Currencies.CHF, Currencies.EUR],
|
|
19044
|
-
[CountryCodes.UnitedArabEmirates]: [Currencies.AED],
|
|
19045
|
-
[CountryCodes.UnitedKingdom]: [Currencies.GBP, Currencies.EUR],
|
|
19046
|
-
[CountryCodes.UnitedStates]: [Currencies.USD]
|
|
19047
|
-
};
|
|
19048
19489
|
const bankVerificationValidationRules = {
|
|
19049
19490
|
verifiedAccountHolder: {
|
|
19050
19491
|
modes: ["blur"],
|
|
@@ -20385,7 +20826,6 @@ function BranchCode(props) {
|
|
|
20385
20826
|
"aria-invalid": !valid.branchCode
|
|
20386
20827
|
});
|
|
20387
20828
|
}
|
|
20388
|
-
const currencyFields = ["currency"];
|
|
20389
20829
|
const bbanPatternsByCountry = {
|
|
20390
20830
|
[CountryCodes.Albania]: /\d{8}[\dA-Z]{16}/,
|
|
20391
20831
|
[CountryCodes.Andorra]: /\d{8}[\dA-Z]{12}/,
|
|
@@ -20739,7 +21179,7 @@ const CheckGuidance = ({
|
|
|
20739
21179
|
className: "adyen-kyc-check-guidance__image"
|
|
20740
21180
|
})]
|
|
20741
21181
|
});
|
|
20742
|
-
const payoutAccountFields = ["accountHolder", ...ibanFields, ...branchCodeFields, ...swiftCodeFields, ...
|
|
21182
|
+
const payoutAccountFields = ["accountHolder", ...ibanFields, ...branchCodeFields, ...swiftCodeFields, ...bankAccountNumberFields, ...bankNameFields, ...bankCodeFields];
|
|
20743
21183
|
function PayoutAccountComponent(props) {
|
|
20744
21184
|
const {
|
|
20745
21185
|
accountHolder,
|
|
@@ -21200,7 +21640,7 @@ const PayoutVerificationMethodOptionFooter = ({
|
|
|
21200
21640
|
variant: "caption",
|
|
21201
21641
|
className: "adyen-kyc-field-verification-methods__footer",
|
|
21202
21642
|
children: [i18n.get("poweredBy"), jsx(Svg, {
|
|
21203
|
-
type: "
|
|
21643
|
+
type: "icon",
|
|
21204
21644
|
name: provider.svgName,
|
|
21205
21645
|
alt: provider.name
|
|
21206
21646
|
})]
|
|
@@ -21408,7 +21848,7 @@ function PayoutVerificationMethod(props) {
|
|
|
21408
21848
|
optionSubtitle: (method) => methodsMetadata[method].subtitle,
|
|
21409
21849
|
className: "adyen-kyc-field-verification-methods",
|
|
21410
21850
|
optionClassNames: () => ({
|
|
21411
|
-
label: "adyen-kyc-field-verification-methods__card
|
|
21851
|
+
label: "adyen-kyc-field-verification-methods__card"
|
|
21412
21852
|
}),
|
|
21413
21853
|
isOptionDisabled: (option) => bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
|
|
21414
21854
|
renderOptionIcon: (method) => jsx(PayoutVerificationMethodOptionIcon, {
|
|
@@ -21418,7 +21858,8 @@ function PayoutVerificationMethod(props) {
|
|
|
21418
21858
|
renderOptionFooter: (method) => jsx(PayoutVerificationMethodOptionFooter, {
|
|
21419
21859
|
method,
|
|
21420
21860
|
methodsMetadata
|
|
21421
|
-
})
|
|
21861
|
+
}),
|
|
21862
|
+
floatingRadio: true
|
|
21422
21863
|
})]
|
|
21423
21864
|
})
|
|
21424
21865
|
}), jsx(ErrorPanel, {
|
|
@@ -23509,7 +23950,7 @@ function Summary({
|
|
|
23509
23950
|
const fieldName = i18n.get(labelData[field]) || i18n.get(field);
|
|
23510
23951
|
if (typeof fieldData === "object") {
|
|
23511
23952
|
dataList.push(renderSummaryItems(fieldData, labelData));
|
|
23512
|
-
} else if (typeof fieldData
|
|
23953
|
+
} else if (["string", "number"].includes(typeof fieldData)) {
|
|
23513
23954
|
dataList.push(jsxs("div", {
|
|
23514
23955
|
className: "adyen-kyc-summary-section__field",
|
|
23515
23956
|
children: [jsx("dt", {
|
|
@@ -24513,7 +24954,7 @@ function DBANameField({
|
|
|
24513
24954
|
name: "no"
|
|
24514
24955
|
}],
|
|
24515
24956
|
value: selection,
|
|
24516
|
-
onChange: (
|
|
24957
|
+
onChange: (newValue) => handleChangeFor("hasDba")(newValue === "yes"),
|
|
24517
24958
|
horizontal: true
|
|
24518
24959
|
})
|
|
24519
24960
|
}), data.hasDba && jsx(Field, {
|
|
@@ -25957,6 +26398,13 @@ const getForms = (country) => ({
|
|
|
25957
26398
|
formHeading: "companyTaxDocumentFormHeading",
|
|
25958
26399
|
formDescription: "companyTaxDocumentFormDescription",
|
|
25959
26400
|
fields: ["taxDocument"]
|
|
26401
|
+
},
|
|
26402
|
+
financialInformation: {
|
|
26403
|
+
formId: "financialInformation",
|
|
26404
|
+
formName: "financialInformation",
|
|
26405
|
+
formHeading: "companyFinancialInformationFormHeading",
|
|
26406
|
+
formDescription: "companyFinancialInformationFormDescription",
|
|
26407
|
+
fields: financialInformationFields
|
|
25960
26408
|
}
|
|
25961
26409
|
});
|
|
25962
26410
|
const documentFormsIds = ["companyRegistrationDocument", "companyTaxDocument"];
|
|
@@ -27928,6 +28376,15 @@ function BusinessDetailsDropinComponent({
|
|
|
27928
28376
|
})
|
|
27929
28377
|
});
|
|
27930
28378
|
}
|
|
28379
|
+
const formatCurrency = (amount, currency, locale) => {
|
|
28380
|
+
const {
|
|
28381
|
+
format
|
|
28382
|
+
} = new Intl.NumberFormat(locale, currency ? {
|
|
28383
|
+
style: "currency",
|
|
28384
|
+
currency
|
|
28385
|
+
} : void 0);
|
|
28386
|
+
return format(amount);
|
|
28387
|
+
};
|
|
27931
28388
|
const parseConfiguration$5 = ({
|
|
27932
28389
|
country,
|
|
27933
28390
|
matchingScenario
|
|
@@ -28254,6 +28711,17 @@ function CompanyDropinComponent({
|
|
|
28254
28711
|
}
|
|
28255
28712
|
delete summaryData.companyRegistrationDetails.taxInformation;
|
|
28256
28713
|
}
|
|
28714
|
+
const financialInfoSummary = summaryData.companyFinancialInformation;
|
|
28715
|
+
if (financialInfoSummary) {
|
|
28716
|
+
delete financialInfoSummary.reportedValueOption;
|
|
28717
|
+
if (financialInfoSummary.netAssets) {
|
|
28718
|
+
financialInfoSummary.totalAssets = formatCurrency(financialInfoSummary.netAssets, financialInfoSummary.currency, i18n.locale);
|
|
28719
|
+
delete financialInfoSummary.netAssets;
|
|
28720
|
+
}
|
|
28721
|
+
if (financialInfoSummary.annualTurnover) {
|
|
28722
|
+
financialInfoSummary.annualTurnover = formatCurrency(financialInfoSummary.annualTurnover, financialInfoSummary.currency, i18n.locale);
|
|
28723
|
+
}
|
|
28724
|
+
}
|
|
28257
28725
|
if (isDocumentsRequired$1(forms2)) {
|
|
28258
28726
|
companyDocumentForms.forEach((formId) => delete summaryData[formId]);
|
|
28259
28727
|
summaryData = {
|
|
@@ -30680,14 +31148,15 @@ const SingpassSelection = (props) => {
|
|
|
30680
31148
|
className: "adyen-kyc-field-verification-methods",
|
|
30681
31149
|
optionClassNames: () => ({
|
|
30682
31150
|
icon: "adyen-kyc-radio-group-card__illustration",
|
|
30683
|
-
label: "adyen-kyc-field-verification-methods__card
|
|
31151
|
+
label: "adyen-kyc-field-verification-methods__card",
|
|
30684
31152
|
footer: "adyen-kyc-field-verification-methods__footer"
|
|
30685
31153
|
}),
|
|
30686
31154
|
renderOptionIcon: (method) => methodsMetadata[method].icon,
|
|
30687
31155
|
renderOptionFooter: (method) => {
|
|
30688
31156
|
var _a;
|
|
30689
31157
|
return (_a = methodsMetadata[method].provider) == null ? void 0 : _a.icon;
|
|
30690
|
-
}
|
|
31158
|
+
},
|
|
31159
|
+
floatingRadio: true
|
|
30691
31160
|
})
|
|
30692
31161
|
})
|
|
30693
31162
|
}), jsx(Button, {
|
|
@@ -34163,7 +34632,7 @@ function SolePropDropinComponent({
|
|
|
34163
34632
|
requiredFields,
|
|
34164
34633
|
isSettingEnabled
|
|
34165
34634
|
}), [country, data, taskType, requiredFields, isSettingEnabled]);
|
|
34166
|
-
const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, solePropForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules, {}, {}, legalEntityResponse.type), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions, legalEntityResponse]);
|
|
34635
|
+
const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, solePropForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules, {}, {}, legalEntityResponse == null ? void 0 : legalEntityResponse.type), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions, legalEntityResponse]);
|
|
34167
34636
|
const forms = useMemo(() => {
|
|
34168
34637
|
const requiredForms = getRequiredForms(solePropForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
|
|
34169
34638
|
return addValidityToForms(requiredForms, formValidity, problems);
|
|
@@ -34311,6 +34780,8 @@ function SolePropDropinComponent({
|
|
|
34311
34780
|
const {
|
|
34312
34781
|
handleNextClick,
|
|
34313
34782
|
handleBackClick,
|
|
34783
|
+
hideHomeButton,
|
|
34784
|
+
hideBackButton,
|
|
34314
34785
|
activeForm,
|
|
34315
34786
|
shouldValidate,
|
|
34316
34787
|
setShouldValidate,
|
|
@@ -34330,6 +34801,8 @@ function SolePropDropinComponent({
|
|
|
34330
34801
|
gotoFormByFormIndex,
|
|
34331
34802
|
handleHomeClick,
|
|
34332
34803
|
hideDropinLayout,
|
|
34804
|
+
hideHomeButton,
|
|
34805
|
+
hideBackButton,
|
|
34333
34806
|
nextButtonLabel,
|
|
34334
34807
|
homeButtonLabel,
|
|
34335
34808
|
loadingStatus,
|
|
@@ -37925,9 +38398,9 @@ const validateLegalProceedingsDate = (legalProceedingsDate, legalInformationInso
|
|
|
37925
38398
|
const isRequired = legalInformationInsolvency && !["noLegalActionsTaken", "iDontKnow"].includes(legalInformationInsolvency);
|
|
37926
38399
|
return isRequired ? !isEmpty(legalProceedingsDate) : true;
|
|
37927
38400
|
};
|
|
37928
|
-
const validateDateNotInTheFuture = (
|
|
37929
|
-
if (!
|
|
37930
|
-
return new Date(
|
|
38401
|
+
const validateDateNotInTheFuture = (selectedDate) => {
|
|
38402
|
+
if (!selectedDate) return true;
|
|
38403
|
+
return new Date(selectedDate) <= /* @__PURE__ */ new Date();
|
|
37931
38404
|
};
|
|
37932
38405
|
const highExposureCompanyDetailsValidations = {
|
|
37933
38406
|
numberOfEmployees: [{
|
|
@@ -38157,6 +38630,19 @@ function LegalFormField({
|
|
|
38157
38630
|
const {
|
|
38158
38631
|
getLegalForms: getLegalForms2
|
|
38159
38632
|
} = useConfigurationApi();
|
|
38633
|
+
const handleChangeForLegalForm = (e) => {
|
|
38634
|
+
var _a;
|
|
38635
|
+
const legalFormValue = e.target.value;
|
|
38636
|
+
const selectedLabel = (_a = legalForms.find((legalForm) => legalForm.id === legalFormValue)) == null ? void 0 : _a.name;
|
|
38637
|
+
const legalFormEvent = {
|
|
38638
|
+
target: {
|
|
38639
|
+
name: "legalForm",
|
|
38640
|
+
value: e.target.value,
|
|
38641
|
+
label: selectedLabel
|
|
38642
|
+
}
|
|
38643
|
+
};
|
|
38644
|
+
handleChangeFor("legalForm")(legalFormEvent);
|
|
38645
|
+
};
|
|
38160
38646
|
useEffect(() => {
|
|
38161
38647
|
getLegalForms2(countryCode).then((response) => {
|
|
38162
38648
|
if (response) {
|
|
@@ -38182,7 +38668,7 @@ function LegalFormField({
|
|
|
38182
38668
|
selected: data.legalForm,
|
|
38183
38669
|
items: legalForms,
|
|
38184
38670
|
readonly: readonly && !!data,
|
|
38185
|
-
onChange:
|
|
38671
|
+
onChange: handleChangeForLegalForm
|
|
38186
38672
|
})
|
|
38187
38673
|
});
|
|
38188
38674
|
}
|
|
@@ -38212,6 +38698,19 @@ function NaceCodeField({
|
|
|
38212
38698
|
}
|
|
38213
38699
|
}).catch(() => logger$9.error);
|
|
38214
38700
|
}, []);
|
|
38701
|
+
const handleChangeForNaceCode = (e) => {
|
|
38702
|
+
var _a;
|
|
38703
|
+
const naceCodeFormValue = e.target.value;
|
|
38704
|
+
const selectedLabel = (_a = naceCodes.find((naceCode) => naceCode.id === naceCodeFormValue)) == null ? void 0 : _a.name;
|
|
38705
|
+
const naceCodeEvent = {
|
|
38706
|
+
target: {
|
|
38707
|
+
name: "naceCode",
|
|
38708
|
+
value: e.target.value,
|
|
38709
|
+
label: selectedLabel
|
|
38710
|
+
}
|
|
38711
|
+
};
|
|
38712
|
+
handleChangeFor("naceCode")(naceCodeEvent);
|
|
38713
|
+
};
|
|
38215
38714
|
return jsx(Field, {
|
|
38216
38715
|
name,
|
|
38217
38716
|
label: label || i18n.get("industryAndNaceCode"),
|
|
@@ -38226,7 +38725,7 @@ function NaceCodeField({
|
|
|
38226
38725
|
selected: data.naceCode,
|
|
38227
38726
|
items: naceCodes,
|
|
38228
38727
|
readonly: readonly && !!data,
|
|
38229
|
-
onChange:
|
|
38728
|
+
onChange: handleChangeForNaceCode
|
|
38230
38729
|
})
|
|
38231
38730
|
});
|
|
38232
38731
|
}
|
|
@@ -38247,6 +38746,23 @@ function HighExposureBusinessInformation({
|
|
|
38247
38746
|
const isMainCompany = targetPage === HighExposurePagesEnums.COMPANY_PAGE;
|
|
38248
38747
|
const companyCountry = targetPage === HighExposurePagesEnums.COMPANY_PAGE ? country : data.country;
|
|
38249
38748
|
const isEuCountry = euCountries.includes(companyCountry);
|
|
38749
|
+
const handleChangeWithLabel = (key) => (e) => {
|
|
38750
|
+
const labelKey = `${key}Label`;
|
|
38751
|
+
const fieldEvent = {
|
|
38752
|
+
target: {
|
|
38753
|
+
name: key,
|
|
38754
|
+
value: e.target.value
|
|
38755
|
+
}
|
|
38756
|
+
};
|
|
38757
|
+
const labelEvent = {
|
|
38758
|
+
target: {
|
|
38759
|
+
name: labelKey,
|
|
38760
|
+
value: e.target.label
|
|
38761
|
+
}
|
|
38762
|
+
};
|
|
38763
|
+
handleChangeFor(key)(fieldEvent);
|
|
38764
|
+
handleChangeFor(labelKey)(labelEvent);
|
|
38765
|
+
};
|
|
38250
38766
|
return jsxs(Fragment, {
|
|
38251
38767
|
children: [jsx(Typography, {
|
|
38252
38768
|
el: "h3",
|
|
@@ -38262,7 +38778,7 @@ function HighExposureBusinessInformation({
|
|
|
38262
38778
|
legalForm: valid.legalForm
|
|
38263
38779
|
},
|
|
38264
38780
|
errorMessage: formUtils.getErrorMessage("legalForm", errors, fieldProblems),
|
|
38265
|
-
handleChangeFor:
|
|
38781
|
+
handleChangeFor: handleChangeWithLabel,
|
|
38266
38782
|
readonly: false,
|
|
38267
38783
|
label: formUtils.getLabel("legalForm", "businessStructure")
|
|
38268
38784
|
}), jsx(NaceCodeField, {
|
|
@@ -38274,7 +38790,7 @@ function HighExposureBusinessInformation({
|
|
|
38274
38790
|
naceCode: valid.naceCode
|
|
38275
38791
|
},
|
|
38276
38792
|
errorMessage: formUtils.getErrorMessage("naceCode", errors, fieldProblems),
|
|
38277
|
-
handleChangeFor:
|
|
38793
|
+
handleChangeFor: handleChangeWithLabel,
|
|
38278
38794
|
readonly: false,
|
|
38279
38795
|
label: formUtils.getLabel("naceCode", "industryAndNaceCode")
|
|
38280
38796
|
}), jsx(Field, {
|
|
@@ -39023,7 +39539,7 @@ function AdditionalFieldsForHighExposureUltimateParentCompany(props) {
|
|
|
39023
39539
|
const highExposureForms = {
|
|
39024
39540
|
company: {
|
|
39025
39541
|
formId: "company",
|
|
39026
|
-
formName: "
|
|
39542
|
+
formName: "yourBusiness",
|
|
39027
39543
|
fields: [...companySchemaKeys]
|
|
39028
39544
|
},
|
|
39029
39545
|
parentCompany: {
|
|
@@ -39116,7 +39632,6 @@ const entityHasUltimateParentCompany = (data) => {
|
|
|
39116
39632
|
return ((_a = data.company) == null ? void 0 : _a.isParentOwnedByAnotherCompany) && ((_b = data.company) == null ? void 0 : _b.isParentOwnedByAnotherCompany) === "Yes";
|
|
39117
39633
|
};
|
|
39118
39634
|
const prepareExposureSubmitData = (exposureIndex, data, rootLegalEntity) => {
|
|
39119
|
-
var _a, _b, _c;
|
|
39120
39635
|
const exposureData = data[exposureIndex];
|
|
39121
39636
|
if (!exposureData) return null;
|
|
39122
39637
|
if (exposureIndex === HighExposureIndex.PARENT_COMPANY && !entityHasParentCompany(data)) {
|
|
@@ -39129,9 +39644,9 @@ const prepareExposureSubmitData = (exposureIndex, data, rootLegalEntity) => {
|
|
|
39129
39644
|
if (!exposureDetails.organization) return null;
|
|
39130
39645
|
if (exposureDetails.organization.financialReports) {
|
|
39131
39646
|
const exposureFinancialReports = {
|
|
39132
|
-
employeeCount:
|
|
39133
|
-
annualTurnover:
|
|
39134
|
-
netAssets:
|
|
39647
|
+
employeeCount: exposureData.numberOfEmployees,
|
|
39648
|
+
annualTurnover: exposureData.annualTurnoverValue,
|
|
39649
|
+
netAssets: exposureData.totalAssetsValue,
|
|
39135
39650
|
dateOfFinancialData: exposureData.financialReportingDate,
|
|
39136
39651
|
currencyOfFinancialData: exposureData.annualTurnoverCurrency
|
|
39137
39652
|
};
|
|
@@ -39250,6 +39765,7 @@ function UpdateLegalEntityForHighExposure({
|
|
|
39250
39765
|
const {
|
|
39251
39766
|
i18n
|
|
39252
39767
|
} = useI18nContext();
|
|
39768
|
+
const datasetUtils = datasetUtilities(i18n.locale);
|
|
39253
39769
|
const [rootLegalEntity, setRootLegalEntity] = useState();
|
|
39254
39770
|
const dataFromResponse = {};
|
|
39255
39771
|
const [defaultData, setDefaultData] = useState(dataFromResponse);
|
|
@@ -39495,11 +40011,11 @@ function UpdateLegalEntityForHighExposure({
|
|
|
39495
40011
|
var _a2, _b2, _c2;
|
|
39496
40012
|
const summaryData = cloneObject(data2) || {};
|
|
39497
40013
|
if (summaryData.company) {
|
|
40014
|
+
summaryData.company.legalForm = summaryData.company.legalFormLabel;
|
|
40015
|
+
summaryData.company.naceCode = summaryData.company.naceCodeLabel;
|
|
39498
40016
|
summaryData.company.legalInformationInsolvency = getTranslatedLegalInsolvency((_a2 = summaryData.company) == null ? void 0 : _a2.legalInformationInsolvency);
|
|
39499
40017
|
summaryData.company.annualTurnoverValue = getFormattedAmount(summaryData.company.annualTurnoverValue, summaryData.company.annualTurnoverCurrency);
|
|
39500
|
-
delete summaryData.company.annualTurnoverCurrency;
|
|
39501
40018
|
summaryData.company.totalAssetsValue = getFormattedAmount(summaryData.company.totalAssetsValue, summaryData.company.totalAssetsCurrency);
|
|
39502
|
-
delete summaryData.company.totalAssetsCurrency;
|
|
39503
40019
|
const {
|
|
39504
40020
|
legalProceedingsDate,
|
|
39505
40021
|
financialReportingDate
|
|
@@ -39508,11 +40024,12 @@ function UpdateLegalEntityForHighExposure({
|
|
|
39508
40024
|
summaryData.company.financialReportingDate = getIntlDate(financialReportingDate);
|
|
39509
40025
|
}
|
|
39510
40026
|
if (summaryData.parentCompany) {
|
|
40027
|
+
summaryData.parentCompany.legalForm = summaryData.parentCompany.legalFormLabel;
|
|
40028
|
+
summaryData.parentCompany.naceCode = summaryData.parentCompany.naceCodeLabel;
|
|
40029
|
+
summaryData.parentCompany.country = datasetUtils.getCountryName(summaryData.parentCompany.country);
|
|
39511
40030
|
summaryData.parentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency((_b2 = summaryData.parentCompany) == null ? void 0 : _b2.legalInformationInsolvency);
|
|
39512
40031
|
summaryData.parentCompany.annualTurnoverValue = getFormattedAmount(summaryData.parentCompany.annualTurnoverValue, summaryData.parentCompany.annualTurnoverCurrency);
|
|
39513
|
-
delete summaryData.parentCompany.annualTurnoverCurrency;
|
|
39514
40032
|
summaryData.parentCompany.totalAssetsValue = getFormattedAmount(summaryData.parentCompany.totalAssetsValue, summaryData.parentCompany.totalAssetsCurrency);
|
|
39515
|
-
delete summaryData.parentCompany.totalAssetsCurrency;
|
|
39516
40033
|
const {
|
|
39517
40034
|
legalProceedingsDate,
|
|
39518
40035
|
financialReportingDate
|
|
@@ -39521,11 +40038,12 @@ function UpdateLegalEntityForHighExposure({
|
|
|
39521
40038
|
summaryData.parentCompany.financialReportingDate = getIntlDate(financialReportingDate);
|
|
39522
40039
|
}
|
|
39523
40040
|
if (summaryData.ultimateParentCompany) {
|
|
40041
|
+
summaryData.ultimateParentCompany.legalForm = summaryData.ultimateParentCompany.legalFormLabel;
|
|
40042
|
+
summaryData.ultimateParentCompany.naceCode = summaryData.ultimateParentCompany.naceCodeLabel;
|
|
40043
|
+
summaryData.ultimateParentCompany.country = datasetUtils.getCountryName(summaryData.ultimateParentCompany.country);
|
|
39524
40044
|
summaryData.ultimateParentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency((_c2 = summaryData.ultimateParentCompany) == null ? void 0 : _c2.legalInformationInsolvency);
|
|
39525
40045
|
summaryData.ultimateParentCompany.annualTurnoverValue = getFormattedAmount(summaryData.ultimateParentCompany.annualTurnoverValue, summaryData.ultimateParentCompany.annualTurnoverCurrency);
|
|
39526
|
-
delete summaryData.ultimateParentCompany.annualTurnoverCurrency;
|
|
39527
40046
|
summaryData.ultimateParentCompany.totalAssetsValue = getFormattedAmount(summaryData.ultimateParentCompany.totalAssetsValue, summaryData.ultimateParentCompany.totalAssetsCurrency);
|
|
39528
|
-
delete summaryData.ultimateParentCompany.totalAssetsCurrency;
|
|
39529
40047
|
const {
|
|
39530
40048
|
legalProceedingsDate,
|
|
39531
40049
|
financialReportingDate
|
|
@@ -39544,6 +40062,7 @@ function UpdateLegalEntityForHighExposure({
|
|
|
39544
40062
|
parentLegalEntity,
|
|
39545
40063
|
legalEntity: rootLegalEntity
|
|
39546
40064
|
});
|
|
40065
|
+
const omittedSummaryKeys = ["naceCodeLabel", "legalFormLabel", "totalAssetsCurrency", "annualTurnoverCurrency"];
|
|
39547
40066
|
const {
|
|
39548
40067
|
handleNextClick,
|
|
39549
40068
|
handleBackClick,
|
|
@@ -39565,7 +40084,7 @@ function UpdateLegalEntityForHighExposure({
|
|
|
39565
40084
|
});
|
|
39566
40085
|
}
|
|
39567
40086
|
return jsx(FormWrapper, {
|
|
39568
|
-
taskName: "
|
|
40087
|
+
taskName: "loanApplication",
|
|
39569
40088
|
handleNextClick,
|
|
39570
40089
|
handleBackClick,
|
|
39571
40090
|
gotoFormByFormIndex,
|
|
@@ -39583,7 +40102,8 @@ function UpdateLegalEntityForHighExposure({
|
|
|
39583
40102
|
problems,
|
|
39584
40103
|
summary: {
|
|
39585
40104
|
data: formatDataForSummary2(data),
|
|
39586
|
-
labels: customLabels
|
|
40105
|
+
labels: customLabels,
|
|
40106
|
+
omittedKeys: omittedSummaryKeys
|
|
39587
40107
|
},
|
|
39588
40108
|
children: jsx(HighExposureDropinComponent, {
|
|
39589
40109
|
...derivedProps,
|
|
@@ -40244,7 +40764,7 @@ const ConfigurationApiProvider = ({
|
|
|
40244
40764
|
isEmbeddedDropin,
|
|
40245
40765
|
loadingContext
|
|
40246
40766
|
} = authContext;
|
|
40247
|
-
const sdkVersion = "3.
|
|
40767
|
+
const sdkVersion = "3.33.0";
|
|
40248
40768
|
useAnalytics({
|
|
40249
40769
|
onUserEvent,
|
|
40250
40770
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40340,7 +40860,7 @@ const useAllowedLocales = () => {
|
|
|
40340
40860
|
}, []);
|
|
40341
40861
|
return allowedLocales;
|
|
40342
40862
|
};
|
|
40343
|
-
const localeImports = /* @__PURE__ */ Object.assign({ "./locales/bg-BG.json": () => import("./bg-BG-
|
|
40863
|
+
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") });
|
|
40344
40864
|
const loadLocale = async (locale) => {
|
|
40345
40865
|
const importForLocale = localeImports[`./locales/${locale}.json`];
|
|
40346
40866
|
if (!importForLocale) {
|
|
@@ -40644,7 +41164,7 @@ const Toast = ({
|
|
|
40644
41164
|
}) => {
|
|
40645
41165
|
const toastRef = useRef(null);
|
|
40646
41166
|
const isLoading = type === "loading";
|
|
40647
|
-
const labelId =
|
|
41167
|
+
const labelId = useId();
|
|
40648
41168
|
const handleShow = useCallback(() => {
|
|
40649
41169
|
var _a;
|
|
40650
41170
|
return (_a = toastRef.current) == null ? void 0 : _a.classList.add("adyen-kyc-toast--visible");
|
|
@@ -40931,7 +41451,7 @@ const DebugModal = ({
|
|
|
40931
41451
|
};
|
|
40932
41452
|
const copyToClipboard = async () => {
|
|
40933
41453
|
const toCopy = {
|
|
40934
|
-
sdkVersion: "3.
|
|
41454
|
+
sdkVersion: "3.33.0",
|
|
40935
41455
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40936
41456
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40937
41457
|
};
|
|
@@ -40970,7 +41490,7 @@ const DebugModal = ({
|
|
|
40970
41490
|
children: [jsxs("div", {
|
|
40971
41491
|
className: "adyen-kyc-debug-modal__meta",
|
|
40972
41492
|
children: [jsxs("span", {
|
|
40973
|
-
children: ["SDK version: ", "3.
|
|
41493
|
+
children: ["SDK version: ", "3.33.0"]
|
|
40974
41494
|
}), jsxs("span", {
|
|
40975
41495
|
children: ["rootLegalEntityId: ", rootLegalEntityId]
|
|
40976
41496
|
})]
|