@adyen/kyc-components 2.59.6 → 2.59.8
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.
|
@@ -4,6 +4,7 @@ import { createContext, isValidElement, createElement, render } from "preact";
|
|
|
4
4
|
import { sanitize } from "isomorphic-dompurify";
|
|
5
5
|
import cx from "classnames";
|
|
6
6
|
import { lazy, Suspense, forwardRef, memo, useMemo as useMemo$1 } from "preact/compat";
|
|
7
|
+
import debounce$1 from "lodash-es/debounce";
|
|
7
8
|
import isISIN from "validator/es/lib/isISIN.js";
|
|
8
9
|
import OpenBankingSDK from "@adyen/openbankingsdk";
|
|
9
10
|
import { jsxs as jsxs$1, jsx as jsx$1 } from "preact/compat/jsx-runtime";
|
|
@@ -3726,14 +3727,6 @@ const Field = ({
|
|
|
3726
3727
|
}
|
|
3727
3728
|
);
|
|
3728
3729
|
};
|
|
3729
|
-
const useDebounce = (value, delay) => {
|
|
3730
|
-
const [debouncedValue, setDebouncedValue] = useState(value);
|
|
3731
|
-
useEffect(() => {
|
|
3732
|
-
const handler = setTimeout(() => setDebouncedValue(value), delay);
|
|
3733
|
-
return () => clearTimeout(handler);
|
|
3734
|
-
}, [value, delay]);
|
|
3735
|
-
return debouncedValue;
|
|
3736
|
-
};
|
|
3737
3730
|
const getScrollParent = (node) => {
|
|
3738
3731
|
if (!node) return null;
|
|
3739
3732
|
const isElement = node instanceof HTMLElement;
|
|
@@ -4153,6 +4146,7 @@ const Select = ({
|
|
|
4153
4146
|
const active = items.filter((i) => !isMulti ? i.id === selected : selected == null ? void 0 : selected.includes(i.id)) || [];
|
|
4154
4147
|
const [isShowListAbove, setIsShowListAbove] = useState(false);
|
|
4155
4148
|
const [scrollParent, setScrollParent] = useState(null);
|
|
4149
|
+
const debouncedOnSearch = useCallback(debounce$1(onSearch, 500), [onSearch]);
|
|
4156
4150
|
const closeList = () => {
|
|
4157
4151
|
if (!onSearchTextChange) setTextFilter(null);
|
|
4158
4152
|
setIsShowList(false);
|
|
@@ -4251,6 +4245,9 @@ const Select = ({
|
|
|
4251
4245
|
};
|
|
4252
4246
|
const handleTextFilter = (e) => {
|
|
4253
4247
|
const { value } = e.target;
|
|
4248
|
+
if (isSearch && value.length > 2) {
|
|
4249
|
+
debouncedOnSearch(value);
|
|
4250
|
+
}
|
|
4254
4251
|
if (onSearchTextChange) {
|
|
4255
4252
|
onSearchTextChange == null ? void 0 : onSearchTextChange(value);
|
|
4256
4253
|
setTextFilter(value);
|
|
@@ -4258,12 +4255,6 @@ const Select = ({
|
|
|
4258
4255
|
setTextFilter(value.toLowerCase());
|
|
4259
4256
|
}
|
|
4260
4257
|
};
|
|
4261
|
-
const debouncedTextFilter = useDebounce(textFilter, 500);
|
|
4262
|
-
useEffect(() => {
|
|
4263
|
-
if (isSearch && (debouncedTextFilter == null ? void 0 : debouncedTextFilter.length) > 2) {
|
|
4264
|
-
onSearch(debouncedTextFilter);
|
|
4265
|
-
}
|
|
4266
|
-
}, [debouncedTextFilter]);
|
|
4267
4258
|
const toggleList = (e) => {
|
|
4268
4259
|
e.preventDefault();
|
|
4269
4260
|
if (isShowList) {
|
|
@@ -24894,7 +24885,7 @@ function AdditionalInformationComponent({
|
|
|
24894
24885
|
if (currentData.exemptedFromVat) {
|
|
24895
24886
|
fieldsToRemove.push("vatNumber");
|
|
24896
24887
|
} else {
|
|
24897
|
-
fieldsToRemove.push("
|
|
24888
|
+
fieldsToRemove.push("vatAbsenceReason");
|
|
24898
24889
|
}
|
|
24899
24890
|
if (currentData.exemptedFromTax) {
|
|
24900
24891
|
fieldsToRemove.push("taxInformation");
|
|
@@ -39419,7 +39410,7 @@ const ConfigurationApiProvider = ({
|
|
|
39419
39410
|
}) => {
|
|
39420
39411
|
const authContext = useAuthContext();
|
|
39421
39412
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
39422
|
-
const sdkVersion = "2.59.
|
|
39413
|
+
const sdkVersion = "2.59.8";
|
|
39423
39414
|
useAnalytics({
|
|
39424
39415
|
onUserEvent,
|
|
39425
39416
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40092,7 +40083,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40092
40083
|
};
|
|
40093
40084
|
const copyToClipboard = async () => {
|
|
40094
40085
|
const toCopy = {
|
|
40095
|
-
sdkVersion: "2.59.
|
|
40086
|
+
sdkVersion: "2.59.8",
|
|
40096
40087
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40097
40088
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40098
40089
|
};
|
|
@@ -40157,7 +40148,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40157
40148
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
40158
40149
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40159
40150
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
40160
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.59.
|
|
40151
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.59.8" })
|
|
40161
40152
|
] }) }),
|
|
40162
40153
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40163
40154
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/kyc-components",
|
|
3
|
-
"version": "2.59.
|
|
3
|
+
"version": "2.59.8",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"adyen",
|
|
6
6
|
"adyen-kyc",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"@adyen/ui-assets-icons-16": "^4.3.0",
|
|
85
85
|
"classnames": "^2.3.2",
|
|
86
86
|
"isomorphic-dompurify": "^0.13.0",
|
|
87
|
+
"lodash-es": "^4.17.21",
|
|
87
88
|
"onfido-sdk-ui": "12.3.5",
|
|
88
89
|
"preact": "^10.17.1",
|
|
89
90
|
"validator": "^13.5.2"
|
|
@@ -132,7 +133,6 @@
|
|
|
132
133
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
133
134
|
"inquirer": "^9.2.10",
|
|
134
135
|
"jsdom": "^20.0.3",
|
|
135
|
-
"lodash-es": "^4.17.21",
|
|
136
136
|
"msw": "^2.3.5",
|
|
137
137
|
"phone": "^3.1.40",
|
|
138
138
|
"postcss": "^8.4.29",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useDebounce: <T extends string>(value: T, delay: number) => T;
|