@adyen/kyc-components 3.41.0 → 3.41.1
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.
|
@@ -1784,7 +1784,7 @@ const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [
|
|
|
1784
1784
|
StateCodesUS.California,
|
|
1785
1785
|
StateCodesUS.Texas
|
|
1786
1786
|
];
|
|
1787
|
-
const logger$
|
|
1787
|
+
const logger$P = createLogger("useBusinessData");
|
|
1788
1788
|
function useBusinessData({
|
|
1789
1789
|
handleCompanyIndexSearch,
|
|
1790
1790
|
handleCompanyDeepSearch,
|
|
@@ -1821,7 +1821,7 @@ function useBusinessData({
|
|
|
1821
1821
|
const searchByRegistrationNumber = useCallback(
|
|
1822
1822
|
async (data) => {
|
|
1823
1823
|
if (!handleCompanyRegistrationNumberDeepSearch || !handleCompanyRegistrationNumberIndexSearch) {
|
|
1824
|
-
logger$
|
|
1824
|
+
logger$P.error("Missing handlers for searchByRegistrationNumber");
|
|
1825
1825
|
return;
|
|
1826
1826
|
}
|
|
1827
1827
|
const requestPayload = {
|
|
@@ -1841,7 +1841,7 @@ function useBusinessData({
|
|
|
1841
1841
|
const searchByCompanyName = useCallback(
|
|
1842
1842
|
async (data) => {
|
|
1843
1843
|
if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
|
|
1844
|
-
logger$
|
|
1844
|
+
logger$P.error("Missing handlers for searchByCompanyName");
|
|
1845
1845
|
return;
|
|
1846
1846
|
}
|
|
1847
1847
|
return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await handleCompanyIndexSearch({
|
|
@@ -1880,7 +1880,7 @@ function useBusinessData({
|
|
|
1880
1880
|
return (response == null ? void 0 : response.results) || [];
|
|
1881
1881
|
} catch (e) {
|
|
1882
1882
|
setSearching("error");
|
|
1883
|
-
logger$
|
|
1883
|
+
logger$P.error(e);
|
|
1884
1884
|
} finally {
|
|
1885
1885
|
setCachedSearch(data);
|
|
1886
1886
|
setSearching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
@@ -1891,7 +1891,7 @@ function useBusinessData({
|
|
|
1891
1891
|
const fetchBusinessData = useCallback(
|
|
1892
1892
|
async (company, state) => {
|
|
1893
1893
|
if (!handleGetCompanyDataset || !handleRefreshCompanyDataset) {
|
|
1894
|
-
logger$
|
|
1894
|
+
logger$P.error("Missing handlers for fetchBusinessData");
|
|
1895
1895
|
return;
|
|
1896
1896
|
}
|
|
1897
1897
|
const date = (/* @__PURE__ */ new Date()).toDateString();
|
|
@@ -1920,7 +1920,7 @@ function useBusinessData({
|
|
|
1920
1920
|
});
|
|
1921
1921
|
} catch (e) {
|
|
1922
1922
|
setFetching("error");
|
|
1923
|
-
logger$
|
|
1923
|
+
logger$P.error(e);
|
|
1924
1924
|
} finally {
|
|
1925
1925
|
setFetching((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
1926
1926
|
}
|
|
@@ -1930,7 +1930,7 @@ function useBusinessData({
|
|
|
1930
1930
|
const verifyBusinessData = useCallback(
|
|
1931
1931
|
async (data, tin) => {
|
|
1932
1932
|
if (!handleVerifyTin) {
|
|
1933
|
-
logger$
|
|
1933
|
+
logger$P.log("Missing handlers for verifyBusinessData");
|
|
1934
1934
|
return;
|
|
1935
1935
|
}
|
|
1936
1936
|
try {
|
|
@@ -1946,7 +1946,7 @@ function useBusinessData({
|
|
|
1946
1946
|
return matched;
|
|
1947
1947
|
} catch (e) {
|
|
1948
1948
|
setVerifying("error");
|
|
1949
|
-
logger$
|
|
1949
|
+
logger$P.error(e);
|
|
1950
1950
|
} finally {
|
|
1951
1951
|
setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
1952
1952
|
}
|
|
@@ -1959,7 +1959,7 @@ function useBusinessData({
|
|
|
1959
1959
|
await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
|
|
1960
1960
|
} catch (e) {
|
|
1961
1961
|
setResettingTrustedData("error");
|
|
1962
|
-
logger$
|
|
1962
|
+
logger$P.error(e);
|
|
1963
1963
|
} finally {
|
|
1964
1964
|
setResettingTrustedData((prevState) => prevState !== "error" ? "loaded" : prevState);
|
|
1965
1965
|
}
|
|
@@ -2387,12 +2387,12 @@ const unscalableIconNames = [
|
|
|
2387
2387
|
"upload",
|
|
2388
2388
|
"warning"
|
|
2389
2389
|
];
|
|
2390
|
-
const logger$
|
|
2390
|
+
const logger$O = createLogger("Icon");
|
|
2391
2391
|
const Svg = ({ className, name, testId, title, type }) => {
|
|
2392
2392
|
const LazyLoadedSvg = svgs[name];
|
|
2393
2393
|
const viewBox = unscalableIconNames.includes(name) ? "0 0 16 16" : void 0;
|
|
2394
2394
|
if (!LazyLoadedSvg) {
|
|
2395
|
-
logger$
|
|
2395
|
+
logger$O.error(`No such svg: "${name}"`);
|
|
2396
2396
|
return null;
|
|
2397
2397
|
}
|
|
2398
2398
|
return /* @__PURE__ */ jsx("span", { className: cx(`adyen-kyc-${type}`, className), "data-testid": testId, children: /* @__PURE__ */ jsx(Suspense, { fallback: null, children: viewBox ? /* @__PURE__ */ jsx(LazyLoadedSvg, { "aria-hidden": type === "icon", viewBox, title: title || name }) : /* @__PURE__ */ jsx(LazyLoadedSvg, { "aria-hidden": type === "icon", title: title || name }) }) });
|
|
@@ -2630,10 +2630,10 @@ function useFormRouterContext() {
|
|
|
2630
2630
|
}
|
|
2631
2631
|
return context;
|
|
2632
2632
|
}
|
|
2633
|
-
const logger$
|
|
2633
|
+
const logger$N = createLogger("Link");
|
|
2634
2634
|
const isValidLink = (href) => {
|
|
2635
2635
|
if (href === "#") {
|
|
2636
|
-
logger$
|
|
2636
|
+
logger$N.error(
|
|
2637
2637
|
'Links must include a valid href. If your href is "#", consider using a Button instead'
|
|
2638
2638
|
);
|
|
2639
2639
|
return false;
|
|
@@ -2991,7 +2991,7 @@ class ValidationResult {
|
|
|
2991
2991
|
return this.validationResults.find((result) => result.hasError);
|
|
2992
2992
|
}
|
|
2993
2993
|
}
|
|
2994
|
-
const logger$
|
|
2994
|
+
const logger$M = createLogger("useAsyncValidator");
|
|
2995
2995
|
const useAsyncValidator = (asyncRules) => {
|
|
2996
2996
|
const [asyncValidationResults, setAsyncValidationResults] = useState({});
|
|
2997
2997
|
const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
|
|
@@ -3011,7 +3011,7 @@ const useAsyncValidator = (asyncRules) => {
|
|
|
3011
3011
|
}
|
|
3012
3012
|
])
|
|
3013
3013
|
});
|
|
3014
|
-
}).catch(logger$
|
|
3014
|
+
}).catch(logger$M.error);
|
|
3015
3015
|
},
|
|
3016
3016
|
[asyncRules, clearAsyncValidationResults]
|
|
3017
3017
|
);
|
|
@@ -7623,7 +7623,7 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
|
|
|
7623
7623
|
};
|
|
7624
7624
|
};
|
|
7625
7625
|
const MISMATCH_ANIMATION_NAME = "mismatchShake";
|
|
7626
|
-
const logger$
|
|
7626
|
+
const logger$L = createLogger("MaskedInput");
|
|
7627
7627
|
const Inner = ({
|
|
7628
7628
|
name,
|
|
7629
7629
|
label,
|
|
@@ -7773,7 +7773,7 @@ const MaskedInput = ({
|
|
|
7773
7773
|
);
|
|
7774
7774
|
useEffect(() => {
|
|
7775
7775
|
if (!mask) {
|
|
7776
|
-
logger$
|
|
7776
|
+
logger$L.warn("`mask` is undefined. No masking of input will take place.");
|
|
7777
7777
|
}
|
|
7778
7778
|
}, [mask]);
|
|
7779
7779
|
const getMaskResult = useCallback(
|
|
@@ -7817,7 +7817,7 @@ const MaskedInput = ({
|
|
|
7817
7817
|
return;
|
|
7818
7818
|
}
|
|
7819
7819
|
if (preserveMismatchingInitialValue) {
|
|
7820
|
-
logger$
|
|
7820
|
+
logger$L.warn(
|
|
7821
7821
|
`Value received "${value}" does not match mask`,
|
|
7822
7822
|
maskResult,
|
|
7823
7823
|
`
|
|
@@ -7827,7 +7827,7 @@ Preserving mismatched initial value until user input.`
|
|
|
7827
7827
|
return;
|
|
7828
7828
|
}
|
|
7829
7829
|
const fallback = displayValueToPure(maskResult.partialDisplayValue);
|
|
7830
|
-
logger$
|
|
7830
|
+
logger$L.warn(
|
|
7831
7831
|
`Value received "${value}" does not match mask`,
|
|
7832
7832
|
maskResult,
|
|
7833
7833
|
`
|
|
@@ -11716,7 +11716,7 @@ function Dropzone(props) {
|
|
|
11716
11716
|
isRequired && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-error-text", children: i18n.get("fieldIsRequired") })
|
|
11717
11717
|
] });
|
|
11718
11718
|
}
|
|
11719
|
-
const logger$
|
|
11719
|
+
const logger$K = createLogger("TextArea");
|
|
11720
11720
|
function TextArea(props) {
|
|
11721
11721
|
const { classNameModifiers, uniqueId, ...passedProps } = props;
|
|
11722
11722
|
const {
|
|
@@ -11731,7 +11731,7 @@ function TextArea(props) {
|
|
|
11731
11731
|
const { i18n } = useI18nContext();
|
|
11732
11732
|
const [value, setValue] = useState("");
|
|
11733
11733
|
if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
|
|
11734
|
-
logger$
|
|
11734
|
+
logger$K.error("Error: Form fields that rely on InputBase may not have an onChange property");
|
|
11735
11735
|
}
|
|
11736
11736
|
const handleInput = (e) => {
|
|
11737
11737
|
var _a;
|
|
@@ -12150,7 +12150,7 @@ const styles$8 = {
|
|
|
12150
12150
|
"financial-information-reported-value-options": "adyen-kyc-financial-information-reported-value-options",
|
|
12151
12151
|
financialInformationReportedValueOptions
|
|
12152
12152
|
};
|
|
12153
|
-
const logger$
|
|
12153
|
+
const logger$J = createLogger("InputCurrency");
|
|
12154
12154
|
const determineDecimalSeparator = (formatter) => formatter.formatToParts(0.1).find((part) => part.type === "decimal").value;
|
|
12155
12155
|
const determineCurrencySymbol = (formatter) => formatter.formatToParts(0).find((part) => part.type === "currency").value;
|
|
12156
12156
|
const getNumberFromFormattedCurrency = (formatted, decimalSeparator) => {
|
|
@@ -12181,7 +12181,7 @@ const InputCurrency = ({
|
|
|
12181
12181
|
const rawValue = e.target.value;
|
|
12182
12182
|
const value = getNumberFromFormattedCurrency(rawValue, decimalSeparator);
|
|
12183
12183
|
if (Number.isNaN(value)) {
|
|
12184
|
-
logger$
|
|
12184
|
+
logger$J.warn(`Unable to get number from formatted currency: "${rawValue}"`);
|
|
12185
12185
|
setText(isUndefinedOrNull(amount) ? currencySymbol : formatter.format(amount));
|
|
12186
12186
|
return;
|
|
12187
12187
|
}
|
|
@@ -12651,7 +12651,7 @@ function FieldContainer$1(props) {
|
|
|
12651
12651
|
}
|
|
12652
12652
|
return renderField(fieldName);
|
|
12653
12653
|
}
|
|
12654
|
-
const logger$
|
|
12654
|
+
const logger$I = createLogger("SearchAddress");
|
|
12655
12655
|
const SearchAddress = ({
|
|
12656
12656
|
data,
|
|
12657
12657
|
legalEntityId,
|
|
@@ -12684,7 +12684,7 @@ const SearchAddress = ({
|
|
|
12684
12684
|
const response = await handleFindAddress(selectedAddressId);
|
|
12685
12685
|
autocompleteAddressForm(response);
|
|
12686
12686
|
} catch (e) {
|
|
12687
|
-
logger$
|
|
12687
|
+
logger$I.error(e);
|
|
12688
12688
|
}
|
|
12689
12689
|
};
|
|
12690
12690
|
const onDrilldown = async (selectedAddress) => {
|
|
@@ -12695,7 +12695,7 @@ const SearchAddress = ({
|
|
|
12695
12695
|
);
|
|
12696
12696
|
setItems((response == null ? void 0 : response.results) || []);
|
|
12697
12697
|
} catch (e) {
|
|
12698
|
-
logger$
|
|
12698
|
+
logger$I.error(e);
|
|
12699
12699
|
}
|
|
12700
12700
|
};
|
|
12701
12701
|
const onChange = (e) => {
|
|
@@ -12747,7 +12747,7 @@ const SearchAddress = ({
|
|
|
12747
12747
|
setItems([]);
|
|
12748
12748
|
}
|
|
12749
12749
|
} catch (e) {
|
|
12750
|
-
logger$
|
|
12750
|
+
logger$I.error(e);
|
|
12751
12751
|
}
|
|
12752
12752
|
setLoading(false);
|
|
12753
12753
|
}
|
|
@@ -13390,7 +13390,7 @@ AddressForm.defaultProps = {
|
|
|
13390
13390
|
requiredFields: ADDRESS_SCHEMA,
|
|
13391
13391
|
countryCode: null
|
|
13392
13392
|
};
|
|
13393
|
-
const logger$
|
|
13393
|
+
const logger$H = createLogger("AddressFieldContainer");
|
|
13394
13394
|
const formatAddressItem = (item) => {
|
|
13395
13395
|
if (item.description.includes("Addresses")) {
|
|
13396
13396
|
const splittedDescription = item.description.split(" - ");
|
|
@@ -13528,7 +13528,7 @@ function FieldContainer({
|
|
|
13528
13528
|
setItems([]);
|
|
13529
13529
|
}
|
|
13530
13530
|
} catch (e) {
|
|
13531
|
-
logger$
|
|
13531
|
+
logger$H.error(e);
|
|
13532
13532
|
}
|
|
13533
13533
|
setLoading(false);
|
|
13534
13534
|
};
|
|
@@ -13562,7 +13562,7 @@ function FieldContainer({
|
|
|
13562
13562
|
});
|
|
13563
13563
|
}
|
|
13564
13564
|
} catch (e) {
|
|
13565
|
-
logger$
|
|
13565
|
+
logger$H.error(e);
|
|
13566
13566
|
}
|
|
13567
13567
|
};
|
|
13568
13568
|
const onDrilldown = async (address) => {
|
|
@@ -13574,7 +13574,7 @@ function FieldContainer({
|
|
|
13574
13574
|
));
|
|
13575
13575
|
setItems((response == null ? void 0 : response.results) || []);
|
|
13576
13576
|
} catch (e) {
|
|
13577
|
-
logger$
|
|
13577
|
+
logger$H.error(e);
|
|
13578
13578
|
}
|
|
13579
13579
|
};
|
|
13580
13580
|
const handleOnChange = (e) => {
|
|
@@ -15048,7 +15048,7 @@ const rules$3 = ({
|
|
|
15048
15048
|
}
|
|
15049
15049
|
}
|
|
15050
15050
|
});
|
|
15051
|
-
const logger$
|
|
15051
|
+
const logger$G = createLogger("mapPayoutAccountSchemaToApiBankAccount");
|
|
15052
15052
|
const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCountry) => {
|
|
15053
15053
|
var _a;
|
|
15054
15054
|
if ("iban" in payoutAccount && payoutAccount.iban)
|
|
@@ -15128,7 +15128,7 @@ const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCoun
|
|
|
15128
15128
|
routingNumber: payoutAccount.branchCode
|
|
15129
15129
|
};
|
|
15130
15130
|
default:
|
|
15131
|
-
logger$
|
|
15131
|
+
logger$G.log(`${bankCountry.toLowerCase()}Local is not a configured region`);
|
|
15132
15132
|
return {
|
|
15133
15133
|
type: `${bankCountry.toLowerCase()}Local`,
|
|
15134
15134
|
accountNumber: payoutAccount.bankAccountNumber
|
|
@@ -16352,7 +16352,7 @@ const initOnfido = async ({
|
|
|
16352
16352
|
language: getOnfidoLocaleConfig(i18n)
|
|
16353
16353
|
});
|
|
16354
16354
|
};
|
|
16355
|
-
const logger$
|
|
16355
|
+
const logger$F = createLogger("IdVerification");
|
|
16356
16356
|
function IdVerification({
|
|
16357
16357
|
userDetails,
|
|
16358
16358
|
legalEntityId,
|
|
@@ -16380,7 +16380,7 @@ function IdVerification({
|
|
|
16380
16380
|
onIdVerificationComplete,
|
|
16381
16381
|
language: getOnfidoLocaleConfig(i18n)
|
|
16382
16382
|
});
|
|
16383
|
-
})().catch(logger$
|
|
16383
|
+
})().catch(logger$F.error);
|
|
16384
16384
|
return async () => {
|
|
16385
16385
|
if (onfidoSdk.current) await onfidoSdk.current.tearDown();
|
|
16386
16386
|
};
|
|
@@ -16420,7 +16420,7 @@ function IdDocumentAlreadyUpload(props) {
|
|
|
16420
16420
|
] })
|
|
16421
16421
|
] });
|
|
16422
16422
|
}
|
|
16423
|
-
const logger$
|
|
16423
|
+
const logger$E = createLogger("IdDocumentInstantVerification");
|
|
16424
16424
|
const idVerificationSchema = [
|
|
16425
16425
|
"instantIdVerificationData",
|
|
16426
16426
|
"idDocumentType"
|
|
@@ -16492,7 +16492,7 @@ function IdDocumentInstantVerification(props) {
|
|
|
16492
16492
|
userDetails: props.userDetails,
|
|
16493
16493
|
legalEntityId: props.legalEntityId,
|
|
16494
16494
|
onIdVerificationComplete: handleIdVerificationComplete,
|
|
16495
|
-
onIdVerificationError: logger$
|
|
16495
|
+
onIdVerificationError: logger$E.error
|
|
16496
16496
|
}
|
|
16497
16497
|
),
|
|
16498
16498
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-document-upload__manual-upload", children: [
|
|
@@ -16869,7 +16869,7 @@ const phoneFormatters = {
|
|
|
16869
16869
|
};
|
|
16870
16870
|
const phoneFields = ["phoneNumber"];
|
|
16871
16871
|
const DEFAULT_PHONE_PREFIX = "+1";
|
|
16872
|
-
const logger$
|
|
16872
|
+
const logger$D = createLogger("PhoneInput");
|
|
16873
16873
|
const usePhonePrefixes = () => {
|
|
16874
16874
|
const [phonePrefixes, setPhonePrefixes] = useState();
|
|
16875
16875
|
useEffect(() => {
|
|
@@ -16877,7 +16877,7 @@ const usePhonePrefixes = () => {
|
|
|
16877
16877
|
const loaded = (await import("./phonePrefixes-zV4hciyK.js")).default;
|
|
16878
16878
|
setPhonePrefixes(loaded);
|
|
16879
16879
|
};
|
|
16880
|
-
loadPhonePrefixes().catch(logger$
|
|
16880
|
+
loadPhonePrefixes().catch(logger$D.error);
|
|
16881
16881
|
}, []);
|
|
16882
16882
|
return phonePrefixes;
|
|
16883
16883
|
};
|
|
@@ -20856,7 +20856,7 @@ class AdyenKycSdkError extends Error {
|
|
|
20856
20856
|
}
|
|
20857
20857
|
let sdkToken;
|
|
20858
20858
|
let fetchSdkToken;
|
|
20859
|
-
const logger$
|
|
20859
|
+
const logger$C = createLogger("Session");
|
|
20860
20860
|
const setSdkToken = (token) => {
|
|
20861
20861
|
sdkToken = token;
|
|
20862
20862
|
};
|
|
@@ -20881,7 +20881,7 @@ const refreshSession = async () => {
|
|
|
20881
20881
|
setSdkToken(token);
|
|
20882
20882
|
isSessionRefreshed = true;
|
|
20883
20883
|
} catch (e) {
|
|
20884
|
-
logger$
|
|
20884
|
+
logger$C.error("Failed to fetch sdk token", e);
|
|
20885
20885
|
}
|
|
20886
20886
|
return isSessionRefreshed;
|
|
20887
20887
|
};
|
|
@@ -20891,7 +20891,7 @@ const addAnimationStartListener = (element, listener) => {
|
|
|
20891
20891
|
const removeAnimationStartListener = (element, listener) => {
|
|
20892
20892
|
element.removeEventListener("animationstart", listener, false);
|
|
20893
20893
|
};
|
|
20894
|
-
const logger$
|
|
20894
|
+
const logger$B = createLogger("Fetch");
|
|
20895
20895
|
const getRequestObject = (options, data) => {
|
|
20896
20896
|
const { headers = [], method = "GET", authentication } = options;
|
|
20897
20897
|
let authHeaders;
|
|
@@ -20932,10 +20932,10 @@ const logFetchError = (message, level) => {
|
|
|
20932
20932
|
case "info":
|
|
20933
20933
|
case "warn":
|
|
20934
20934
|
case "error":
|
|
20935
|
-
logger$
|
|
20935
|
+
logger$B[level](message);
|
|
20936
20936
|
break;
|
|
20937
20937
|
default:
|
|
20938
|
-
logger$
|
|
20938
|
+
logger$B.error(message);
|
|
20939
20939
|
}
|
|
20940
20940
|
};
|
|
20941
20941
|
const handleFetchResponse = async (response, responseType) => {
|
|
@@ -21019,7 +21019,7 @@ const RELEVANT_MESSAGE_TYPES = ["account_verification_report_id", "error"];
|
|
|
21019
21019
|
const TERMINAL_DATA_PROPS = ["accounts", "error", "reference"];
|
|
21020
21020
|
const MOUNT_TIMEOUT = 10 * 1e3;
|
|
21021
21021
|
const TINK_VENDOR = "Tink";
|
|
21022
|
-
const logger$
|
|
21022
|
+
const logger$A = createLogger("iframeWidget");
|
|
21023
21023
|
const isObjectData = (data) => typeof data === "object" && !Array.isArray(data) && data !== null;
|
|
21024
21024
|
const isTerminalMessageData = (data) => isObjectData(data) && Object.entries(data).some(([prop]) => TERMINAL_DATA_PROPS.includes(prop));
|
|
21025
21025
|
const parseMessageJson = (message) => {
|
|
@@ -21037,7 +21037,7 @@ const callbackErrorHandler = async (response) => {
|
|
|
21037
21037
|
try {
|
|
21038
21038
|
await response;
|
|
21039
21039
|
} catch (ex) {
|
|
21040
|
-
logger$
|
|
21040
|
+
logger$A.error(ex);
|
|
21041
21041
|
}
|
|
21042
21042
|
return {
|
|
21043
21043
|
error: "UNKNOWN_ERROR",
|
|
@@ -21133,7 +21133,7 @@ class IFrameWidget {
|
|
|
21133
21133
|
message = responseData.errorMessage;
|
|
21134
21134
|
}
|
|
21135
21135
|
} catch (ex) {
|
|
21136
|
-
logger$
|
|
21136
|
+
logger$A.error(ex);
|
|
21137
21137
|
}
|
|
21138
21138
|
throw new AdyenKycSdkError(reason, jsonData.error);
|
|
21139
21139
|
}
|
|
@@ -25663,7 +25663,7 @@ const useUnifyLoadingStatus = (setParentLoadingStatus, ...childLoadingStatuses)
|
|
|
25663
25663
|
setParentLoadingStatus(loadingStatus);
|
|
25664
25664
|
}, [...childLoadingStatuses]);
|
|
25665
25665
|
};
|
|
25666
|
-
const logger$
|
|
25666
|
+
const logger$z = createLogger("useScenarioConfiguration");
|
|
25667
25667
|
const useScenarioConfiguration = ({
|
|
25668
25668
|
getConfigurationData,
|
|
25669
25669
|
getPayoutAccountFormatData,
|
|
@@ -25686,12 +25686,12 @@ const useScenarioConfiguration = ({
|
|
|
25686
25686
|
const response = await getConfigurationData();
|
|
25687
25687
|
setConfigurationResponse(response);
|
|
25688
25688
|
} catch (err) {
|
|
25689
|
-
logger$
|
|
25689
|
+
logger$z.warn("WARNING: Configuration request failed - error:", err);
|
|
25690
25690
|
} finally {
|
|
25691
25691
|
setConfigurationLoadingStatus("success");
|
|
25692
25692
|
}
|
|
25693
25693
|
};
|
|
25694
|
-
makeConfigCallAndSave().catch(logger$
|
|
25694
|
+
makeConfigCallAndSave().catch(logger$z.error);
|
|
25695
25695
|
}, [getConfigurationData, setConfigurationLoadingStatus]);
|
|
25696
25696
|
useEffect(() => {
|
|
25697
25697
|
if (!getPayoutAccountFormatData) return;
|
|
@@ -25710,12 +25710,12 @@ const useScenarioConfiguration = ({
|
|
|
25710
25710
|
const defaultAccountFormat = defaultPayoutAccountFormat[country] ?? allowedBankAccountFormats[0];
|
|
25711
25711
|
setAccountFormat(existingBankAccountFormat ?? defaultAccountFormat);
|
|
25712
25712
|
} catch (err) {
|
|
25713
|
-
logger$
|
|
25713
|
+
logger$z.warn("WARNING: Payout format request failed - error:", err);
|
|
25714
25714
|
} finally {
|
|
25715
25715
|
setpayoutFormatLoadingStatus("success");
|
|
25716
25716
|
}
|
|
25717
25717
|
};
|
|
25718
|
-
makePayoutFormatCallAndSave().catch(logger$
|
|
25718
|
+
makePayoutFormatCallAndSave().catch(logger$z.error);
|
|
25719
25719
|
}, [
|
|
25720
25720
|
country,
|
|
25721
25721
|
setAccountFormat,
|
|
@@ -27294,7 +27294,7 @@ function BusinessInformationCard({
|
|
|
27294
27294
|
}
|
|
27295
27295
|
);
|
|
27296
27296
|
}
|
|
27297
|
-
const logger$
|
|
27297
|
+
const logger$y = createLogger("BusinessSelection");
|
|
27298
27298
|
function BusinessSelection({
|
|
27299
27299
|
showCompanyStructure,
|
|
27300
27300
|
searching,
|
|
@@ -27346,7 +27346,7 @@ function BusinessSelection({
|
|
|
27346
27346
|
setCurrentBusinessSelection(businessData);
|
|
27347
27347
|
}
|
|
27348
27348
|
} catch (e) {
|
|
27349
|
-
logger$
|
|
27349
|
+
logger$y.error(e);
|
|
27350
27350
|
}
|
|
27351
27351
|
},
|
|
27352
27352
|
[basicInformation == null ? void 0 : basicInformation.stateOrProvince, fetchBusinessData, fetching, selectedBusinessId]
|
|
@@ -27360,7 +27360,7 @@ function BusinessSelection({
|
|
|
27360
27360
|
handleNextClick == null ? void 0 : handleNextClick();
|
|
27361
27361
|
}
|
|
27362
27362
|
} catch (e) {
|
|
27363
|
-
logger$
|
|
27363
|
+
logger$y.error(e);
|
|
27364
27364
|
}
|
|
27365
27365
|
},
|
|
27366
27366
|
[currentTin, handleNextClick, handleBusinessVerification]
|
|
@@ -28962,7 +28962,7 @@ const useExpiryThreshold = (expiry) => {
|
|
|
28962
28962
|
return { expiryStatus: "notYetCloseToExpiry", secondsUntilExpiry: void 0 };
|
|
28963
28963
|
};
|
|
28964
28964
|
const ExpiryContext = createContext(false);
|
|
28965
|
-
const logger$
|
|
28965
|
+
const logger$x = createLogger("ExpiryProvider");
|
|
28966
28966
|
const ExpiryProvider = ({
|
|
28967
28967
|
expiry: initialExpiry,
|
|
28968
28968
|
eventEmitter,
|
|
@@ -28991,7 +28991,7 @@ const ExpiryProvider = ({
|
|
|
28991
28991
|
refreshExpiry().then((newExpiry) => {
|
|
28992
28992
|
setExpiry(newExpiry);
|
|
28993
28993
|
setModalDismissed(false);
|
|
28994
|
-
}).catch(logger$
|
|
28994
|
+
}).catch(logger$x.error);
|
|
28995
28995
|
}
|
|
28996
28996
|
}
|
|
28997
28997
|
),
|
|
@@ -29013,7 +29013,7 @@ const ExpiryProvider = ({
|
|
|
29013
29013
|
return /* @__PURE__ */ jsx(ExpiryContext.Provider, { value: expiryStatus === "expired", children });
|
|
29014
29014
|
};
|
|
29015
29015
|
const useHasExpired = () => useContext(ExpiryContext);
|
|
29016
|
-
const logger$
|
|
29016
|
+
const logger$w = createLogger("FormRouterContextProvider");
|
|
29017
29017
|
function FormRouterContextProvider({
|
|
29018
29018
|
children,
|
|
29019
29019
|
forms,
|
|
@@ -29036,7 +29036,7 @@ function FormRouterContextProvider({
|
|
|
29036
29036
|
if (formIndex > -1) {
|
|
29037
29037
|
setFormIndex(formIndex);
|
|
29038
29038
|
} else {
|
|
29039
|
-
logger$
|
|
29039
|
+
logger$w.error("No form was found to have that field so form navigation failed.");
|
|
29040
29040
|
}
|
|
29041
29041
|
}
|
|
29042
29042
|
}),
|
|
@@ -30755,7 +30755,7 @@ function CompanyDropinComponent({
|
|
|
30755
30755
|
}
|
|
30756
30756
|
const IgnoreLocalStorageContext = createContext(false);
|
|
30757
30757
|
const useIgnoreLocalStorage = () => useContext(IgnoreLocalStorageContext);
|
|
30758
|
-
const logger$
|
|
30758
|
+
const logger$v = createLogger("useLocalStorage");
|
|
30759
30759
|
const useLocalStorage = (key, defaultValue, options) => {
|
|
30760
30760
|
const { serializer, parser, syncData } = useMemo(
|
|
30761
30761
|
() => ({
|
|
@@ -30775,7 +30775,7 @@ const useLocalStorage = (key, defaultValue, options) => {
|
|
|
30775
30775
|
const res = rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
|
|
30776
30776
|
return res;
|
|
30777
30777
|
} catch (err) {
|
|
30778
|
-
logger$
|
|
30778
|
+
logger$v.error(err);
|
|
30779
30779
|
return defaultValue;
|
|
30780
30780
|
}
|
|
30781
30781
|
});
|
|
@@ -30810,7 +30810,7 @@ const useLocalStorage = (key, defaultValue, options) => {
|
|
|
30810
30810
|
try {
|
|
30811
30811
|
updateLocalStorage();
|
|
30812
30812
|
} catch (err) {
|
|
30813
|
-
logger$
|
|
30813
|
+
logger$v.error(err);
|
|
30814
30814
|
}
|
|
30815
30815
|
}, [value, ignoreLocalStorage]);
|
|
30816
30816
|
useEffect(() => {
|
|
@@ -30823,7 +30823,7 @@ const useLocalStorage = (key, defaultValue, options) => {
|
|
|
30823
30823
|
setValue(event.newValue ? parser(event.newValue) : void 0);
|
|
30824
30824
|
}
|
|
30825
30825
|
} catch (err) {
|
|
30826
|
-
logger$
|
|
30826
|
+
logger$v.error(err);
|
|
30827
30827
|
}
|
|
30828
30828
|
};
|
|
30829
30829
|
if (ignoreLocalStorage) return;
|
|
@@ -31007,7 +31007,7 @@ const useSingpassMyInfoLogin = ({
|
|
|
31007
31007
|
trustedEntityAssociations
|
|
31008
31008
|
};
|
|
31009
31009
|
};
|
|
31010
|
-
const logger$
|
|
31010
|
+
const logger$u = createLogger("useAssociatedLegalArrangement");
|
|
31011
31011
|
function useAssociatedLegalArrangement({
|
|
31012
31012
|
rootLegalEntity,
|
|
31013
31013
|
getLegalEntity: getLegalEntity2
|
|
@@ -31023,7 +31023,7 @@ function useAssociatedLegalArrangement({
|
|
|
31023
31023
|
(entity) => entity.type === LegalEntityType.SOLE_PROPRIETORSHIP || entity.type === LegalEntityType.TRUST
|
|
31024
31024
|
);
|
|
31025
31025
|
if (foundEntity == null ? void 0 : foundEntity.legalEntityId) {
|
|
31026
|
-
getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$
|
|
31026
|
+
getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$u.error);
|
|
31027
31027
|
}
|
|
31028
31028
|
}, [getAssociatedEntity, rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations]);
|
|
31029
31029
|
useEffect(() => {
|
|
@@ -31073,7 +31073,7 @@ const useCanSeeEntitySelection = (legalEntityId) => {
|
|
|
31073
31073
|
setCanSeeEntitySelection: setCanSeeEntitySelectionIntoLocalStorage
|
|
31074
31074
|
};
|
|
31075
31075
|
};
|
|
31076
|
-
const logger$
|
|
31076
|
+
const logger$t = createLogger("useExemptSettlor");
|
|
31077
31077
|
const useExemptSettlor = ({
|
|
31078
31078
|
trust,
|
|
31079
31079
|
handleGetLegalEntity
|
|
@@ -31091,7 +31091,7 @@ const useExemptSettlor = ({
|
|
|
31091
31091
|
);
|
|
31092
31092
|
useEffect(() => {
|
|
31093
31093
|
if (!(trust == null ? void 0 : trust.trust)) return;
|
|
31094
|
-
updateExemptSettlor(trust).catch(logger$
|
|
31094
|
+
updateExemptSettlor(trust).catch(logger$t.error);
|
|
31095
31095
|
}, [trust, updateExemptSettlor]);
|
|
31096
31096
|
return exemptSettlor;
|
|
31097
31097
|
};
|
|
@@ -31915,7 +31915,7 @@ const mapCustomerSupportSchemaToCustomerSupportType = (customerSupport) => {
|
|
|
31915
31915
|
phone: phone2
|
|
31916
31916
|
};
|
|
31917
31917
|
};
|
|
31918
|
-
const logger$
|
|
31918
|
+
const logger$s = createLogger("CustomerSupport");
|
|
31919
31919
|
function CustomerSupport(props) {
|
|
31920
31920
|
var _a, _b, _c, _d, _e, _f;
|
|
31921
31921
|
const { i18n } = useI18nContext();
|
|
@@ -31949,7 +31949,7 @@ function CustomerSupport(props) {
|
|
|
31949
31949
|
onSubmit();
|
|
31950
31950
|
} catch {
|
|
31951
31951
|
const label = i18n.get("failedToUpdateDetails");
|
|
31952
|
-
logger$
|
|
31952
|
+
logger$s.error(label, payload);
|
|
31953
31953
|
showToast({ label, type: "error" });
|
|
31954
31954
|
}
|
|
31955
31955
|
};
|
|
@@ -32765,7 +32765,7 @@ const mapReceivedTaskType = (taskType) => {
|
|
|
32765
32765
|
return taskType;
|
|
32766
32766
|
}
|
|
32767
32767
|
};
|
|
32768
|
-
const logger$
|
|
32768
|
+
const logger$r = createLogger("taskStore");
|
|
32769
32769
|
const computed = dist.createComputed(
|
|
32770
32770
|
({
|
|
32771
32771
|
taskTypes,
|
|
@@ -32841,7 +32841,7 @@ const useGetTaskStatus = () => {
|
|
|
32841
32841
|
const taskIdentifier = id ? `${taskType}-${id}` : taskType;
|
|
32842
32842
|
const status = (_a = taskStatuses[taskIdentifier]) == null ? void 0 : _a.status;
|
|
32843
32843
|
if (!status) {
|
|
32844
|
-
logger$
|
|
32844
|
+
logger$r.warn(`No status for task '${taskIdentifier}', returning EMPTY`);
|
|
32845
32845
|
return TaskStatus.EMPTY;
|
|
32846
32846
|
}
|
|
32847
32847
|
return status;
|
|
@@ -34556,6 +34556,7 @@ const validators = ({
|
|
|
34556
34556
|
})
|
|
34557
34557
|
});
|
|
34558
34558
|
const parseConfiguration$4 = ({ matchingScenario }) => parseIndividualScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.INDIVIDUAL]);
|
|
34559
|
+
const logger$q = createLogger("IndividualDropin");
|
|
34559
34560
|
function IndividualDropinComponent({
|
|
34560
34561
|
handleCreateDocument,
|
|
34561
34562
|
handleGetDocument,
|
|
@@ -34816,13 +34817,21 @@ function IndividualDropinComponent({
|
|
|
34816
34817
|
dataSubmitted,
|
|
34817
34818
|
legalEntity.id
|
|
34818
34819
|
);
|
|
34820
|
+
if (!formattedDocuments || formattedDocuments.length === 0) {
|
|
34821
|
+
if (existingAttachments == null ? void 0 : existingAttachments.length)
|
|
34822
|
+
logger$q.log(
|
|
34823
|
+
"User has already uploaded documents and is not changing them, nothing needs to be done"
|
|
34824
|
+
);
|
|
34825
|
+
else
|
|
34826
|
+
logger$q.error(
|
|
34827
|
+
`formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
|
|
34828
|
+
);
|
|
34829
|
+
return;
|
|
34830
|
+
}
|
|
34819
34831
|
formattedDocuments[0].attachments = mergeAttachments(
|
|
34820
34832
|
existingAttachments ?? [],
|
|
34821
34833
|
((_b2 = formattedDocuments[0]) == null ? void 0 : _b2.attachments) ?? []
|
|
34822
34834
|
);
|
|
34823
|
-
if (!formattedDocuments || formattedDocuments.length === 0) {
|
|
34824
|
-
throw new Error("formattedDocuments is empty");
|
|
34825
|
-
}
|
|
34826
34835
|
const uploadedDocuments = await documentUtils.uploadDocuments(
|
|
34827
34836
|
formattedDocuments,
|
|
34828
34837
|
legalEntity.id
|
|
@@ -34936,6 +34945,7 @@ function IndividualDropinComponent({
|
|
|
34936
34945
|
clearToasts();
|
|
34937
34946
|
externalOnSubmit == null ? void 0 : externalOnSubmit(dataSubmitted);
|
|
34938
34947
|
} catch (e) {
|
|
34948
|
+
logger$q.error("Failed to update individual", e);
|
|
34939
34949
|
if (isValidationError(e)) {
|
|
34940
34950
|
const validationErrors = processValidationErrors(e, TaskTypes.INDIVIDUAL);
|
|
34941
34951
|
setProblems({ ...problems, validationErrors });
|
|
@@ -43602,7 +43612,7 @@ const ConfigurationApiProvider = ({
|
|
|
43602
43612
|
}) => {
|
|
43603
43613
|
const authContext = useAuthContext();
|
|
43604
43614
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
43605
|
-
const sdkVersion = "3.41.
|
|
43615
|
+
const sdkVersion = "3.41.1";
|
|
43606
43616
|
useAnalytics({
|
|
43607
43617
|
onUserEvent,
|
|
43608
43618
|
legalEntityId: rootLegalEntityId,
|
|
@@ -44283,7 +44293,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
44283
44293
|
(settingName) => [settingName, getSetting(settingName)]
|
|
44284
44294
|
);
|
|
44285
44295
|
const debugModalMetaData = [
|
|
44286
|
-
{ key: "SDK version", value: "3.41.
|
|
44296
|
+
{ key: "SDK version", value: "3.41.1", variant: "green" },
|
|
44287
44297
|
{ key: "rootLegalEntityId", value: rootLegalEntityId, variant: "blue" },
|
|
44288
44298
|
{ key: "Locale", value: i18n.locale, variant: "blue" },
|
|
44289
44299
|
{ key: "Language", value: i18n.languageCode, variant: "blue" },
|
|
@@ -44315,7 +44325,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
44315
44325
|
};
|
|
44316
44326
|
const copyToClipboard = async () => {
|
|
44317
44327
|
const toCopy = {
|
|
44318
|
-
sdkVersion: "3.41.
|
|
44328
|
+
sdkVersion: "3.41.1",
|
|
44319
44329
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
44320
44330
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
44321
44331
|
};
|