diff --git a/.eslintrc.js b/.eslintrc.js
index 0c3c994d6f07..954b6299b3c4 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,5 +1,8 @@
module.exports = {
extends: ['@deriv/eslint-config-deriv'],
+ rules: {
+ 'global-require': 'off',
+ },
overrides: [
{
files: ['*.ts', '*.tsx'],
diff --git a/.lintstagedrc.json b/.lintstagedrc.json
index 22127938375e..28e394e87000 100644
--- a/.lintstagedrc.json
+++ b/.lintstagedrc.json
@@ -1,5 +1,5 @@
{
"*.{js,jsx,ts,tsx,md,html,css,scss}": "prettier --write",
- "*.{js,jsx,ts,tsx}": "eslint --fix --config .eslintrc.js",
+ "*.{js,jsx,ts,tsx}": "eslint --fix --config .eslintrc.js --rule 'simple-import-sort/imports: 0'",
"*.{css,scss}": "npx stylelint --fix"
}
diff --git a/__mocks__/globals.js b/__mocks__/globals.js
index 3085bcf192cf..c87fa63be2b6 100644
--- a/__mocks__/globals.js
+++ b/__mocks__/globals.js
@@ -2,3 +2,9 @@
jest.mock('copy-anything', () => ({
copy: jest.fn(),
}));
+
+const mock_onfido = {
+ init: jest.fn().mockResolvedValue({}),
+};
+
+window.Onfido = mock_onfido;
diff --git a/package-lock.json b/package-lock.json
index fd94a06889b6..62851c73e1af 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,8 +14,8 @@
"@datadog/browser-logs": "^4.36.0",
"@datadog/browser-rum": "^4.37.0",
"@deriv/api-types": "^1.0.118",
- "@deriv/deriv-api": "^1.0.11",
- "@deriv/deriv-charts": "1.3.6",
+ "@deriv/deriv-api": "^1.0.13",
+ "@deriv/deriv-charts": "1.4.0",
"@deriv/js-interpreter": "^3.0.0",
"@deriv/ui": "^0.6.0",
"@livechat/customer-sdk": "^2.0.4",
@@ -39,7 +39,9 @@
"@types/jsdom": "^20.0.0",
"@types/loadjs": "^4.0.1",
"@types/lodash.debounce": "^4.0.7",
+ "@types/lodash.groupby": "^4.6.7",
"@types/lodash.merge": "^4.6.7",
+ "@types/lodash.pickby": "^4.6.7",
"@types/lodash.throttle": "^4.1.7",
"@types/object.fromentries": "^2.0.0",
"@types/qrcode.react": "^1.0.2",
@@ -79,6 +81,7 @@
"eslint-formatter-pretty": "^4.0.0",
"eslint-import-resolver-webpack": "^0.13.0",
"eslint-plugin-import": "^2.23.4",
+ "eslint-plugin-local-rules": "2.0.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
@@ -109,7 +112,9 @@
"loadjs": "^4.2.0",
"localforage": "^1.9.0",
"lodash.debounce": "^4.0.8",
+ "lodash.groupby": "^4.6.0",
"lodash.merge": "^4.6.2",
+ "lodash.pickby": "^4.6.0",
"lodash.throttle": "^4.1.1",
"lz-string": "^1.4.4",
"mini-css-extract-plugin": "^1.3.4",
@@ -122,7 +127,6 @@
"moment": "^2.29.2",
"null-loader": "^4.0.1",
"object.fromentries": "^2.0.0",
- "onfido-sdk-ui": "^11.0.0",
"pako": "^1.0.11",
"postcss-loader": "^6.2.1",
"postcss-preset-env": "^7.4.3",
@@ -2898,9 +2902,9 @@
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/@deriv/deriv-charts": {
- "version": "1.3.6",
- "resolved": "https://registry.npmjs.org/@deriv/deriv-charts/-/deriv-charts-1.3.6.tgz",
- "integrity": "sha512-hxEgCIPPx87OO2NVn8cxbmUc4kVUPhjTzM8MGyviJkCWpl+mdBKizGKq+LQr9oNQwKfxw2dszFDBaVsoAFTXYQ==",
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/@deriv/deriv-charts/-/deriv-charts-1.4.0.tgz",
+ "integrity": "sha512-JWhDkE/c+CouMQ6FNsiKwg9EWFq3jgUu7dxK2Z4wNeDSDrcNe37VK13UagL40dmqJe/W3LJ2wUolFGYqAe3DIw==",
"dependencies": {
"@welldone-software/why-did-you-render": "^3.3.8",
"classnames": "^2.3.1",
@@ -2910,9 +2914,9 @@
"mobx-react-lite": "^3.4.0",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
- "react": "^16.13.1",
- "react-dom": "^16.13.1",
- "react-tabs": "^3.0.0",
+ "react": "^17.0.2",
+ "react-dom": "^17.0.2",
+ "react-tabs": "^4.3.0",
"react-transition-group": "^4.4.1",
"robust-websocket": "^1.0.0",
"sinon-chai": "^3.7.0",
@@ -2923,33 +2927,6 @@
"npm": ">=9.0.0"
}
},
- "node_modules/@deriv/deriv-charts/node_modules/react": {
- "version": "16.14.0",
- "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz",
- "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==",
- "dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "prop-types": "^15.6.2"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/@deriv/deriv-charts/node_modules/react-dom": {
- "version": "16.14.0",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz",
- "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==",
- "dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "prop-types": "^15.6.2",
- "scheduler": "^0.19.1"
- },
- "peerDependencies": {
- "react": "^16.14.0"
- }
- },
"node_modules/@deriv/eslint-config-deriv": {
"version": "1.0.0-beta.3",
"resolved": "https://registry.npmjs.org/@deriv/eslint-config-deriv/-/eslint-config-deriv-1.0.0-beta.3.tgz",
@@ -6311,16 +6288,6 @@
"url": "https://opencollective.com/unified"
}
},
- "node_modules/@mediapipe/face_detection": {
- "version": "0.4.1646425229",
- "resolved": "https://registry.npmjs.org/@mediapipe/face_detection/-/face_detection-0.4.1646425229.tgz",
- "integrity": "sha512-aeCN+fRAojv9ch3NXorP6r5tcGVLR3/gC1HmtqB0WEZBRXrdP6/3W/sGR0dHr1iT6ueiK95G9PVjbzFosf/hrg=="
- },
- "node_modules/@mediapipe/face_mesh": {
- "version": "0.4.1633559619",
- "resolved": "https://registry.npmjs.org/@mediapipe/face_mesh/-/face_mesh-0.4.1633559619.tgz",
- "integrity": "sha512-Vc8cdjxS5+O2gnjWH9KncYpUCVXT0h714KlWAsyqJvJbIgUJBqpppbIx8yWcAzBDxm/5cYSuBI5p5ySIPxzcEg=="
- },
"node_modules/@motionone/animation": {
"version": "10.16.3",
"resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.16.3.tgz",
@@ -7112,157 +7079,6 @@
"@octokit/openapi-types": "^14.0.0"
}
},
- "node_modules/@onfido/active-video-capture": {
- "version": "0.22.2",
- "resolved": "https://registry.npmjs.org/@onfido/active-video-capture/-/active-video-capture-0.22.2.tgz",
- "integrity": "sha512-wM7PJUdB0rwCpIdKoOczynqALW9zXXr/x43RGDpaGBFMdY5imbXpQtI/JaaZjQsWK6cH8FKAkKLvrxRNYCsMmQ==",
- "hasInstallScript": true,
- "dependencies": {
- "@mediapipe/face_detection": "^0.4.1646425229",
- "@mediapipe/face_mesh": "^0.4.1633559619",
- "@onfido/castor": "^2.2.2",
- "@onfido/castor-icons": "^2.12.0",
- "@tensorflow-models/face-detection": "^1.0.1",
- "@tensorflow-models/face-landmarks-detection": "^1.0.2",
- "@tensorflow/tfjs-backend-wasm": "^3.20.0",
- "@tensorflow/tfjs-backend-webgl": "^3.20.0",
- "@tensorflow/tfjs-converter": "^3.20.0",
- "@tensorflow/tfjs-core": "^3.20.0",
- "@typescript/lib-dom": "npm:@types/web",
- "patch-package": "^6.4.7",
- "postinstall-postinstall": "^2.1.0",
- "preact": "^10.10.6",
- "react-webcam": "^7.0.0"
- },
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@onfido/active-video-capture/node_modules/@tensorflow-models/face-landmarks-detection": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@tensorflow-models/face-landmarks-detection/-/face-landmarks-detection-1.0.5.tgz",
- "integrity": "sha512-54XJPi8g29/MknJ33ZBrLsEzr9kw/dJtrJMMD3xrCrnRlfFQPIKQ5PI2Wml55Fz2p4U2hemzBB0/H+S94JddIQ==",
- "dependencies": {
- "rimraf": "^3.0.2"
- },
- "peerDependencies": {
- "@mediapipe/face_mesh": "~0.4.0",
- "@tensorflow-models/face-detection": "~1.0.0",
- "@tensorflow/tfjs-backend-webgl": "^3.12.0",
- "@tensorflow/tfjs-converter": "^3.12.0",
- "@tensorflow/tfjs-core": "^3.12.0"
- }
- },
- "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-backend-cpu": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.21.0.tgz",
- "integrity": "sha512-88S21UAdzyK0CsLUrH17GPTD+26E85OP9CqmLZslaWjWUmBkeTQ5Zqyp6iK+gELnLxPx6q7JsNEeFuPv4254lQ==",
- "dependencies": {
- "@types/seedrandom": "^2.4.28",
- "seedrandom": "^3.0.5"
- },
- "engines": {
- "yarn": ">= 1.3.2"
- },
- "peerDependencies": {
- "@tensorflow/tfjs-core": "3.21.0"
- }
- },
- "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-backend-wasm": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.21.0.tgz",
- "integrity": "sha512-TVkJWrqukdxvIaQn9jZvtXR+7fmT7sti6NQH5OKVcBmFYIW7I3RiRRE66inVrHjEEvIVTUuW9yo9Ialn31EFIw==",
- "dependencies": {
- "@tensorflow/tfjs-backend-cpu": "3.21.0",
- "@types/emscripten": "~0.0.34"
- },
- "peerDependencies": {
- "@tensorflow/tfjs-core": "3.21.0"
- }
- },
- "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-backend-webgl": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.21.0.tgz",
- "integrity": "sha512-N4zitIAT9IX8B8oe489qM3f3VcESxGZIZvHmVP8varOQakTvTX859aaPo1s8hK1qCy4BjSGbweooZe4U8D4kTQ==",
- "dependencies": {
- "@tensorflow/tfjs-backend-cpu": "3.21.0",
- "@types/offscreencanvas": "~2019.3.0",
- "@types/seedrandom": "^2.4.28",
- "@types/webgl-ext": "0.0.30",
- "@types/webgl2": "0.0.6",
- "seedrandom": "^3.0.5"
- },
- "engines": {
- "yarn": ">= 1.3.2"
- },
- "peerDependencies": {
- "@tensorflow/tfjs-core": "3.21.0"
- }
- },
- "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-converter": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.21.0.tgz",
- "integrity": "sha512-12Y4zVDq3yW+wSjSDpSv4HnpL2sDZrNiGSg8XNiDE4HQBdjdA+a+Q3sZF/8NV9y2yoBhL5L7V4mMLDdbZBd9/Q==",
- "peerDependencies": {
- "@tensorflow/tfjs-core": "3.21.0"
- }
- },
- "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-core": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.21.0.tgz",
- "integrity": "sha512-YSfsswOqWfd+M4bXIhT3hwtAb+IV8+ODwIxwdFR/7jTAPZP1wMVnSlpKnXHAN64HFOiP+Tm3HmKusEZ0+09A0w==",
- "dependencies": {
- "@types/long": "^4.0.1",
- "@types/offscreencanvas": "~2019.3.0",
- "@types/seedrandom": "^2.4.28",
- "@types/webgl-ext": "0.0.30",
- "@webgpu/types": "0.1.16",
- "long": "4.0.0",
- "node-fetch": "~2.6.1",
- "seedrandom": "^3.0.5"
- },
- "engines": {
- "yarn": ">= 1.3.2"
- }
- },
- "node_modules/@onfido/active-video-capture/node_modules/@webgpu/types": {
- "version": "0.1.16",
- "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.16.tgz",
- "integrity": "sha512-9E61voMP4+Rze02jlTXud++Htpjyyk8vw5Hyw9FGRrmhHQg2GqbuOfwf5Klrb8vTxc2XWI3EfO7RUHMpxTj26A=="
- },
- "node_modules/@onfido/castor": {
- "version": "2.2.5",
- "resolved": "https://registry.npmjs.org/@onfido/castor/-/castor-2.2.5.tgz",
- "integrity": "sha512-Io3FTazT06FDFJGjHWNF9g0fsIKHw38L2apL//zp/vveyEV1Zce/U0fLzC8LcE5TuoMnoAYaRi6Jwogd8EN5TA==",
- "dependencies": {
- "@onfido/castor-tokens": "^1.0.0-beta.6",
- "csstype": "^3.1.1"
- },
- "peerDependencies": {
- "@onfido/castor-icons": ">=1.0.0"
- }
- },
- "node_modules/@onfido/castor-icons": {
- "version": "2.22.0",
- "resolved": "https://registry.npmjs.org/@onfido/castor-icons/-/castor-icons-2.22.0.tgz",
- "integrity": "sha512-7OnCvu5xqVWcBLqovZyb99NP0oHw7sjkVYXZhi438i0U6Pgecrhu/14Gc/IN/kvgDxWj9qmiYdd0qdjNaVckrQ==",
- "peerDependencies": {
- "react": ">=17 || ^16.14 || ^15.7 || ^0.14.10"
- }
- },
- "node_modules/@onfido/castor-tokens": {
- "version": "1.0.0-beta.6",
- "resolved": "https://registry.npmjs.org/@onfido/castor-tokens/-/castor-tokens-1.0.0-beta.6.tgz",
- "integrity": "sha512-MfwuSlNdM0Ay0cI3LLyqZGsHW0e1Y1R/0IdQKVU575PdWQx1Q/538aOZMo/a3/oSW0pMEgfOm+mNqPx057cvWA=="
- },
- "node_modules/@onfido/opencv": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@onfido/opencv/-/opencv-1.0.2.tgz",
- "integrity": "sha512-dgUj7NJ3tohlqU6WdYiey5NBTTjI0VYp2yyL8dz1g8c/nX5tM5toOgEgyaNz7fX2tlpJO877G/CT/n5yYSb+gg==",
- "dependencies": {
- "mirada": "^0.0.15"
- }
- },
"node_modules/@parcel/watcher": {
"version": "2.0.4",
"dev": true,
@@ -8261,82 +8077,6 @@
}
}
},
- "node_modules/@sentry-internal/tracing": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.70.0.tgz",
- "integrity": "sha512-SpbE6wZhs6QwG2ORWCt8r28o1T949qkWx/KeRTCdK4Ub95PQ3Y3DgnqD8Wz//3q50Wt6EZDEibmz4t067g6PPg==",
- "dependencies": {
- "@sentry/core": "7.70.0",
- "@sentry/types": "7.70.0",
- "@sentry/utils": "7.70.0",
- "tslib": "^2.4.1 || ^1.9.3"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@sentry/browser": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.70.0.tgz",
- "integrity": "sha512-PB+IP49/TLcnDHCj9eJ5tcHE0pzXg23wBakmF3KGMSd5nxEbUvmOsaFPZcgUUlL9JlU3v1Y40We7HdPStrY6oA==",
- "dependencies": {
- "@sentry-internal/tracing": "7.70.0",
- "@sentry/core": "7.70.0",
- "@sentry/replay": "7.70.0",
- "@sentry/types": "7.70.0",
- "@sentry/utils": "7.70.0",
- "tslib": "^2.4.1 || ^1.9.3"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@sentry/core": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.70.0.tgz",
- "integrity": "sha512-voUsGVM+jwRp99AQYFnRvr7sVd2tUhIMj1L6F42LtD3vp7t5ZnKp3NpXagtFW2vWzXESfyJUBhM0qI/bFvn7ZA==",
- "dependencies": {
- "@sentry/types": "7.70.0",
- "@sentry/utils": "7.70.0",
- "tslib": "^2.4.1 || ^1.9.3"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@sentry/replay": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.70.0.tgz",
- "integrity": "sha512-XjnyE6ORREz9kBWWHdXaIjS9P2Wo7uEw+y23vfLQwzV0Nx3xJ+FG4dwf8onyIoeCZDKbz7cqQIbugU1gkgUtZw==",
- "dependencies": {
- "@sentry/core": "7.70.0",
- "@sentry/types": "7.70.0",
- "@sentry/utils": "7.70.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@sentry/types": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.70.0.tgz",
- "integrity": "sha512-rY4DqpiDBtXSk4MDNBH3dwWqfPbNBI/9GA7Y5WJSIcObBtfBKp0fzYliHJZD0pgM7d4DPFrDn42K9Iiumgymkw==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@sentry/utils": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.70.0.tgz",
- "integrity": "sha512-0cChMH0lsGp+5I3D4wOHWwjFN19HVrGUs7iWTLTO5St3EaVbdeLbI1vFXHxMxvopbwgpeZafbreHw/loIdZKpw==",
- "dependencies": {
- "@sentry/types": "7.70.0",
- "tslib": "^2.4.1 || ^1.9.3"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/@sinonjs/commons": {
"version": "1.8.6",
"dev": true,
@@ -8379,11 +8119,6 @@
"integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==",
"peer": true
},
- "node_modules/@socket.io/component-emitter": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz",
- "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg=="
- },
"node_modules/@stitches/react": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@stitches/react/-/react-1.2.8.tgz",
@@ -15577,93 +15312,6 @@
"url": "https://github.com/sponsors/tannerlinsley"
}
},
- "node_modules/@tensorflow-models/face-detection": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@tensorflow-models/face-detection/-/face-detection-1.0.2.tgz",
- "integrity": "sha512-anjSxy3MnZdTiVluOEQZeaFWM30IPswFM+SltX6wseXKja/AbrHYqamGNZKUylAs2JAyudq+xqTRPS+nA2ourg==",
- "dependencies": {
- "rimraf": "^3.0.2",
- "tslib": "2.4.0"
- },
- "peerDependencies": {
- "@mediapipe/face_detection": "~0.4.0",
- "@tensorflow/tfjs-backend-webgl": "^4.4.0",
- "@tensorflow/tfjs-converter": "^4.4.0",
- "@tensorflow/tfjs-core": "^4.4.0"
- }
- },
- "node_modules/@tensorflow-models/face-detection/node_modules/tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
- },
- "node_modules/@tensorflow/tfjs-backend-cpu": {
- "version": "4.11.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-4.11.0.tgz",
- "integrity": "sha512-2zmGX9MuR8AwscSGOybz4fBOFgQDnj+ZCWGkLxDzbKecy9GxuilukT46xB2zU0kSq7Mf3ncfE/9eUEy6a7ZDqQ==",
- "peer": true,
- "dependencies": {
- "@types/seedrandom": "^2.4.28",
- "seedrandom": "^3.0.5"
- },
- "engines": {
- "yarn": ">= 1.3.2"
- },
- "peerDependencies": {
- "@tensorflow/tfjs-core": "4.11.0"
- }
- },
- "node_modules/@tensorflow/tfjs-backend-webgl": {
- "version": "4.11.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-4.11.0.tgz",
- "integrity": "sha512-sM/B65u+1T3U+Ctiq1fn5j6VmiLEZW7BpuSa3ZXDXtIS07MoZ2FTuO8BMudxEY4xGpTyoOzqTOGT9BaGO3qrWg==",
- "peer": true,
- "dependencies": {
- "@tensorflow/tfjs-backend-cpu": "4.11.0",
- "@types/offscreencanvas": "~2019.3.0",
- "@types/seedrandom": "^2.4.28",
- "seedrandom": "^3.0.5"
- },
- "engines": {
- "yarn": ">= 1.3.2"
- },
- "peerDependencies": {
- "@tensorflow/tfjs-core": "4.11.0"
- }
- },
- "node_modules/@tensorflow/tfjs-converter": {
- "version": "4.11.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-4.11.0.tgz",
- "integrity": "sha512-j2JEVwkqh+pyin+sxUiNUG7QOIU2S0+5SzN8LFXHlR90/bPvC2qiaaSPYdGG/BYidFc27QCHD3obBXrb1EE/ow==",
- "peer": true,
- "peerDependencies": {
- "@tensorflow/tfjs-core": "4.11.0"
- }
- },
- "node_modules/@tensorflow/tfjs-core": {
- "version": "4.11.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-4.11.0.tgz",
- "integrity": "sha512-t0mCNIco8wg6aZdHWT1d6ZuKtbbdY5y871ELWLSUA1+grXDvvaroHYh5eeJexJYXeg+EQ0/hzB0G8nLsLjlyVQ==",
- "peer": true,
- "dependencies": {
- "@types/long": "^4.0.1",
- "@types/offscreencanvas": "~2019.7.0",
- "@types/seedrandom": "^2.4.28",
- "@webgpu/types": "0.1.30",
- "long": "4.0.0",
- "node-fetch": "~2.6.1",
- "seedrandom": "^3.0.5"
- },
- "engines": {
- "yarn": ">= 1.3.2"
- }
- },
- "node_modules/@tensorflow/tfjs-core/node_modules/@types/offscreencanvas": {
- "version": "2019.7.1",
- "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.1.tgz",
- "integrity": "sha512-+HSrJgjBW77ALieQdMJvXhRZUIRN1597L+BKvsyeiIlHHERnqjcuOLyodK3auJ3Y3zRezNKtKAhuQWYJfEgFHQ==",
- "peer": true
- },
"node_modules/@testing-library/dom": {
"version": "8.19.0",
"license": "MIT",
@@ -15998,11 +15646,6 @@
"classnames": "*"
}
},
- "node_modules/@types/emscripten": {
- "version": "0.0.34",
- "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-0.0.34.tgz",
- "integrity": "sha512-QSb9ojDincskc+uKMI0KXp8e1NALFINCrMlp8VGKGcTSxeEyRTTKyjWw75NYrCZHUsVEEEpr1tYHpbtaC++/sQ=="
- },
"node_modules/@types/eslint": {
"version": "7.29.0",
"license": "MIT",
@@ -16139,6 +15782,14 @@
"@types/lodash": "*"
}
},
+ "node_modules/@types/lodash.groupby": {
+ "version": "4.6.7",
+ "resolved": "https://registry.npmjs.org/@types/lodash.groupby/-/lodash.groupby-4.6.7.tgz",
+ "integrity": "sha512-dFUR1pqdMgjIBbgPJ/8axJX6M1C7zsL+HF4qdYMQeJ7XOp0Qbf37I3zh9gpXr/ks6tgEYPDRqyZRAnFYvewYHQ==",
+ "dependencies": {
+ "@types/lodash": "*"
+ }
+ },
"node_modules/@types/lodash.merge": {
"version": "4.6.7",
"resolved": "https://registry.npmjs.org/@types/lodash.merge/-/lodash.merge-4.6.7.tgz",
@@ -16147,6 +15798,14 @@
"@types/lodash": "*"
}
},
+ "node_modules/@types/lodash.pickby": {
+ "version": "4.6.7",
+ "resolved": "https://registry.npmjs.org/@types/lodash.pickby/-/lodash.pickby-4.6.7.tgz",
+ "integrity": "sha512-4ebXRusuLflfscbD0PUX4eVknDHD9Yf+uMtBIvA/hrnTqeAzbuHuDjvnYriLjUrI9YrhCPVKUf4wkRSXJQ6gig==",
+ "dependencies": {
+ "@types/lodash": "*"
+ }
+ },
"node_modules/@types/lodash.throttle": {
"version": "4.1.7",
"resolved": "https://registry.npmjs.org/@types/lodash.throttle/-/lodash.throttle-4.1.7.tgz",
@@ -16155,11 +15814,6 @@
"@types/lodash": "*"
}
},
- "node_modules/@types/long": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
- "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA=="
- },
"node_modules/@types/mdast": {
"version": "3.0.10",
"license": "MIT",
@@ -16216,11 +15870,6 @@
"resolved": "https://registry.npmjs.org/@types/object.fromentries/-/object.fromentries-2.0.2.tgz",
"integrity": "sha512-yUrBe89bzuR2AT0XJU26cmMylc15AOTeZzrnzbYcaMCd8fobYPsre+BJku5JJq5iauUdZkdkrujjzEz0l3MrLg=="
},
- "node_modules/@types/offscreencanvas": {
- "version": "2019.3.0",
- "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz",
- "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q=="
- },
"node_modules/@types/parse-json": {
"version": "4.0.0",
"license": "MIT"
@@ -16378,11 +16027,6 @@
"version": "0.16.2",
"license": "MIT"
},
- "node_modules/@types/seedrandom": {
- "version": "2.4.30",
- "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-2.4.30.tgz",
- "integrity": "sha512-AnxLHewubLVzoF/A4qdxBGHCKifw8cY32iro3DQX9TPcetE95zBeVt3jnsvtvAUf1vwzMfwzp4t/L2yqPlnjkQ=="
- },
"node_modules/@types/semver": {
"version": "7.3.13",
"license": "MIT"
@@ -16437,16 +16081,6 @@
"version": "2.0.6",
"license": "MIT"
},
- "node_modules/@types/webgl-ext": {
- "version": "0.0.30",
- "resolved": "https://registry.npmjs.org/@types/webgl-ext/-/webgl-ext-0.0.30.tgz",
- "integrity": "sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg=="
- },
- "node_modules/@types/webgl2": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/@types/webgl2/-/webgl2-0.0.6.tgz",
- "integrity": "sha512-50GQhDVTq/herLMiqSQkdtRu+d5q/cWHn4VvKJtrj4DJAjo1MNkWYa2MA41BaBO1q1HgsUjuQvEOk0QHvlnAaQ=="
- },
"node_modules/@types/webpack": {
"version": "4.41.33",
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.33.tgz",
@@ -16874,12 +16508,6 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
- "node_modules/@typescript/lib-dom": {
- "name": "@types/web",
- "version": "0.0.115",
- "resolved": "https://registry.npmjs.org/@types/web/-/web-0.0.115.tgz",
- "integrity": "sha512-IBtUgtxnITC7WTCg4tv6kCnSP0T+fM+3PzQPIzLzJY1DDlhBFKM/9+uMURw14YweWPDiFNIZ94Gc1bJtwow97g=="
- },
"node_modules/@webassemblyjs/ast": {
"version": "1.11.5",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.5.tgz",
@@ -17110,12 +16738,6 @@
"@xtuc/long": "4.2.2"
}
},
- "node_modules/@webgpu/types": {
- "version": "0.1.30",
- "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.30.tgz",
- "integrity": "sha512-9AXJSmL3MzY8ZL//JjudA//q+2kBRGhLBFpkdGksWIuxrMy81nFrCzj2Am+mbh8WoU6rXmv7cY5E3rdlyru2Qg==",
- "peer": true
- },
"node_modules/@webpack-cli/configtest": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
@@ -17180,6 +16802,7 @@
},
"node_modules/@yarnpkg/lockfile": {
"version": "1.1.0",
+ "dev": true,
"license": "BSD-2-Clause"
},
"node_modules/@yarnpkg/parsers": {
@@ -19304,11 +18927,6 @@
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
},
- "node_modules/blueimp-load-image": {
- "version": "2.29.0",
- "resolved": "https://registry.npmjs.org/blueimp-load-image/-/blueimp-load-image-2.29.0.tgz",
- "integrity": "sha512-psm81GlZ0ffKxVT0QN9dvhpzXMv1KxgXSg8ars0XGAcEGsTwFT2IPo59HDXlw4Lo2oImdPzwrwkliZSiLLUpIw=="
- },
"node_modules/bn.js": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz",
@@ -19691,6 +19309,7 @@
},
"node_modules/buffer": {
"version": "5.7.1",
+ "dev": true,
"funding": [
{
"type": "github",
@@ -22068,14 +21687,6 @@
"which": "bin/which"
}
},
- "node_modules/cross-fetch": {
- "version": "3.1.8",
- "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz",
- "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==",
- "dependencies": {
- "node-fetch": "^2.6.12"
- }
- },
"node_modules/cross-spawn": {
"version": "7.0.3",
"license": "MIT",
@@ -23759,11 +23370,6 @@
"domelementtype": "1"
}
},
- "node_modules/dompurify": {
- "version": "2.4.7",
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz",
- "integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ=="
- },
"node_modules/domready": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/domready/-/domready-1.0.8.tgz",
@@ -24075,46 +23681,6 @@
"objectorarray": "^1.0.5"
}
},
- "node_modules/engine.io-client": {
- "version": "6.5.2",
- "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz",
- "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==",
- "dependencies": {
- "@socket.io/component-emitter": "~3.1.0",
- "debug": "~4.3.1",
- "engine.io-parser": "~5.2.1",
- "ws": "~8.11.0",
- "xmlhttprequest-ssl": "~2.0.0"
- }
- },
- "node_modules/engine.io-client/node_modules/ws": {
- "version": "8.11.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz",
- "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==",
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "bufferutil": "^4.0.1",
- "utf-8-validate": "^5.0.2"
- },
- "peerDependenciesMeta": {
- "bufferutil": {
- "optional": true
- },
- "utf-8-validate": {
- "optional": true
- }
- }
- },
- "node_modules/engine.io-parser": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz",
- "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==",
- "engines": {
- "node": ">=10.0.0"
- }
- },
"node_modules/enhanced-resolve": {
"version": "0.9.1",
"dependencies": {
@@ -24140,11 +23706,6 @@
"version": "1.1.2",
"license": "BSD-2-Clause"
},
- "node_modules/enumerate-devices": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/enumerate-devices/-/enumerate-devices-1.1.1.tgz",
- "integrity": "sha512-8zDbrc7ocusTL1ZGmvgy0cTwdyCaM7sGZoYLRmnWJalLQzmftDtce+uDU91gafOTo9MCtgjSIxyMv/F4+Hcchw=="
- },
"node_modules/env-paths": {
"version": "2.2.1",
"dev": true,
@@ -25232,6 +24793,11 @@
"eslint-plugin-playwright": "^0.9.0"
}
},
+ "node_modules/eslint-plugin-local-rules": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-local-rules/-/eslint-plugin-local-rules-2.0.0.tgz",
+ "integrity": "sha512-sWueme0kUcP0JC1+6OBDQ9edBDVFJR92WJHSRbhiRExlenMEuUisdaVBPR+ItFBFXo2Pdw6FD2UfGZWkz8e93g=="
+ },
"node_modules/eslint-plugin-playwright": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-0.9.0.tgz",
@@ -25957,11 +25523,6 @@
"resolved": "https://registry.npmjs.org/event-emitter-es6/-/event-emitter-es6-1.1.5.tgz",
"integrity": "sha512-/n7qzkJBySdbe1W9/FBDdO7gzDIaewgj+Rj6Ayc2BdvVcaGP+p40DyViOFudCgV47UU8+cUFmcD3tJgjwY65qQ=="
},
- "node_modules/eventemitter2": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz",
- "integrity": "sha512-AmQ734LWUB9Iyk+2WIU3Z8iRhdL1XQihEE0iF/QC5Xp11zST0Z5tn5jRHa/PgIld2QIPSCys3CREqOQLUhNvkw=="
- },
"node_modules/eventemitter3": {
"version": "4.0.7",
"license": "MIT"
@@ -26719,14 +26280,6 @@
"ramda": "^0.28.0"
}
},
- "node_modules/file-type": {
- "version": "12.4.2",
- "resolved": "https://registry.npmjs.org/file-type/-/file-type-12.4.2.tgz",
- "integrity": "sha512-UssQP5ZgIOKelfsaB5CuGAL+Y+q7EmONuiwF3N5HAH0t27rvrttgi6Ra9k/+DVaY9UF6+ybxu5pOXLUdA8N7Vg==",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
@@ -26956,14 +26509,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/find-yarn-workspace-root": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz",
- "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==",
- "dependencies": {
- "micromatch": "^4.0.2"
- }
- },
"node_modules/flat": {
"version": "5.0.2",
"dev": true,
@@ -33762,14 +33307,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/klaw-sync": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
- "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
- "dependencies": {
- "graceful-fs": "^4.1.11"
- }
- },
"node_modules/kleur": {
"version": "3.0.3",
"license": "MIT",
@@ -34371,6 +33908,11 @@
"integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==",
"peer": true
},
+ "node_modules/lodash.groupby": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz",
+ "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw=="
+ },
"node_modules/lodash.invokemap": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.invokemap/-/lodash.invokemap-4.6.0.tgz",
@@ -34414,6 +33956,11 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/lodash.pickby": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz",
+ "integrity": "sha512-AZV+GsS/6ckvPOVQPXSiFFacKvKB4kOQu6ynt9wz0F3LO4R9Ij4K1ddYsIytDpSgLz88JHd9P+oaLeej5/Sl7Q=="
+ },
"node_modules/lodash.pullall": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.pullall/-/lodash.pullall-4.2.0.tgz",
@@ -34617,11 +34164,6 @@
"url": "https://tidelift.com/funding/github/npm/loglevel"
}
},
- "node_modules/long": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
- "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
- },
"node_modules/longest-streak": {
"version": "2.0.4",
"dev": true,
@@ -35394,22 +34936,6 @@
"node": ">= 8"
}
},
- "node_modules/mirada": {
- "version": "0.0.15",
- "resolved": "https://registry.npmjs.org/mirada/-/mirada-0.0.15.tgz",
- "integrity": "sha512-mbm4c+wjBVcmUzHRLv/TfOAq+iy03D24KwGxx8H+NSXkD5EOZV9zFWbVxTvZCc9XwR0FIUhryU/kQm12SMSQ3g==",
- "dependencies": {
- "buffer": "^5.4.3",
- "cross-fetch": "^3.0.4",
- "file-type": "^12.3.0",
- "misc-utils-of-mine-generic": "^0.2.31"
- }
- },
- "node_modules/misc-utils-of-mine-generic": {
- "version": "0.2.45",
- "resolved": "https://registry.npmjs.org/misc-utils-of-mine-generic/-/misc-utils-of-mine-generic-0.2.45.tgz",
- "integrity": "sha512-WsG2zYiui2cdEbHF2pXmJfnjHb4zL+cy+PaYcLgIpMju98hwX89VbjlvGIfamCfEodbQ0qjCEvD3ocgkCXfMOQ=="
- },
"node_modules/mississippi": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
@@ -37213,80 +36739,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/onfido-sdk-ui": {
- "version": "11.0.1",
- "resolved": "https://registry.npmjs.org/onfido-sdk-ui/-/onfido-sdk-ui-11.0.1.tgz",
- "integrity": "sha512-S61h4njiuWQD3KNLRZaoobiaSjTvt1FjBOwqnsJmnkN7TD/knu8c1IyNlgztRe0Fg2CSE70rwEiO8tdlM3pqsg==",
- "dependencies": {
- "@onfido/active-video-capture": "^0.22.1",
- "@onfido/opencv": "^1.0.0",
- "@sentry/browser": "^7.2.0",
- "blueimp-load-image": "~2.29.0",
- "classnames": "~2.2.5",
- "core-js": "^3.21.1",
- "deepmerge": "^4.2.2",
- "dompurify": "^2.2.6",
- "enumerate-devices": "^1.1.1",
- "eventemitter2": "~2.2.2",
- "history": "~4.5.1",
- "hoist-non-react-statics": "^3.3.2",
- "js-cookie": "^3.0.1",
- "pdfobject": "^2.2.7",
- "preact": "^10.5.13",
- "redux": "^4.0.5",
- "socket.io-client": "^4.2.0",
- "supports-webp": "~1.0.3",
- "uuid": "^8.3.2",
- "visibilityjs": "~1.2.4",
- "xstate": "^4.33.6"
- },
- "bin": {
- "migrate_locales": "scripts/migrate_locales.js"
- }
- },
- "node_modules/onfido-sdk-ui/node_modules/classnames": {
- "version": "2.2.6",
- "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
- "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
- },
- "node_modules/onfido-sdk-ui/node_modules/core-js": {
- "version": "3.32.2",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.2.tgz",
- "integrity": "sha512-pxXSw1mYZPDGvTQqEc5vgIb83jGQKFGYWY76z4a7weZXUolw3G+OvpZqSRcfYOoOVUQJYEPsWeQK8pKEnUtWxQ==",
- "hasInstallScript": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/core-js"
- }
- },
- "node_modules/onfido-sdk-ui/node_modules/history": {
- "version": "4.5.1",
- "resolved": "https://registry.npmjs.org/history/-/history-4.5.1.tgz",
- "integrity": "sha512-gfHeJeYeMzFtos61gdA1AloO0hGXPF2Yum+2FRdJvlylYQOz51OnT1zuwg9UYst1BRrONhcAh3Nmsg9iblgl6g==",
- "dependencies": {
- "invariant": "^2.2.1",
- "loose-envify": "^1.2.0",
- "resolve-pathname": "^2.0.0",
- "value-equal": "^0.2.0",
- "warning": "^3.0.0"
- }
- },
- "node_modules/onfido-sdk-ui/node_modules/js-cookie": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz",
- "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==",
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/onfido-sdk-ui/node_modules/warning": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz",
- "integrity": "sha512-jMBt6pUrKn5I+OGgtQ4YZLdhIeJmObddh6CsibPxyQ5yPZm1XExSyzC1LCNX7BzhxWgiHmizBWJTHJIjMjTQYQ==",
- "dependencies": {
- "loose-envify": "^1.0.0"
- }
- },
"node_modules/open": {
"version": "8.4.0",
"license": "MIT",
@@ -37921,207 +37373,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/patch-package": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz",
- "integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==",
- "dependencies": {
- "@yarnpkg/lockfile": "^1.1.0",
- "chalk": "^4.1.2",
- "cross-spawn": "^6.0.5",
- "find-yarn-workspace-root": "^2.0.0",
- "fs-extra": "^9.0.0",
- "is-ci": "^2.0.0",
- "klaw-sync": "^6.0.0",
- "minimist": "^1.2.6",
- "open": "^7.4.2",
- "rimraf": "^2.6.3",
- "semver": "^5.6.0",
- "slash": "^2.0.0",
- "tmp": "^0.0.33",
- "yaml": "^1.10.2"
- },
- "bin": {
- "patch-package": "index.js"
- },
- "engines": {
- "node": ">=10",
- "npm": ">5"
- }
- },
- "node_modules/patch-package/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/patch-package/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/patch-package/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/patch-package/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/patch-package/node_modules/cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dependencies": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- },
- "engines": {
- "node": ">=4.8"
- }
- },
- "node_modules/patch-package/node_modules/fs-extra": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
- "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
- "dependencies": {
- "at-least-node": "^1.0.0",
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/patch-package/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/patch-package/node_modules/open": {
- "version": "7.4.2",
- "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
- "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
- "dependencies": {
- "is-docker": "^2.0.0",
- "is-wsl": "^2.1.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/patch-package/node_modules/path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/patch-package/node_modules/rimraf": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- }
- },
- "node_modules/patch-package/node_modules/semver": {
- "version": "5.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
- "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
- "bin": {
- "semver": "bin/semver"
- }
- },
- "node_modules/patch-package/node_modules/shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
- "dependencies": {
- "shebang-regex": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/patch-package/node_modules/shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/patch-package/node_modules/slash": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
- "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/patch-package/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/patch-package/node_modules/which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "which": "bin/which"
- }
- },
"node_modules/path-browserify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
@@ -38198,11 +37449,6 @@
"node": ">=0.12"
}
},
- "node_modules/pdfobject": {
- "version": "2.2.12",
- "resolved": "https://registry.npmjs.org/pdfobject/-/pdfobject-2.2.12.tgz",
- "integrity": "sha512-D0oyD/sj8j82AMaJhoyMaY1aD5TkbpU3FbJC6w9/cpJlZRpYHqAkutXw1Ca/FKjYPZmTAu58uGIfgOEaDlbY8A=="
- },
"node_modules/performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
@@ -39824,21 +39070,6 @@
"posthtml-render": "^1.0.6"
}
},
- "node_modules/postinstall-postinstall": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz",
- "integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==",
- "hasInstallScript": true
- },
- "node_modules/preact": {
- "version": "10.17.1",
- "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz",
- "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/preact"
- }
- },
"node_modules/preload-webpack-plugin": {
"version": "3.0.0-beta.4",
"resolved": "https://registry.npmjs.org/preload-webpack-plugin/-/preload-webpack-plugin-3.0.0-beta.4.tgz",
@@ -41332,15 +40563,15 @@
}
},
"node_modules/react-tabs": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-3.2.3.tgz",
- "integrity": "sha512-jx325RhRVnS9DdFbeF511z0T0WEqEoMl1uCE3LoZ6VaZZm7ytatxbum0B8bCTmaiV0KsU+4TtLGTGevCic7SWg==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-4.3.0.tgz",
+ "integrity": "sha512-2GfoG+f41kiBIIyd3gF+/GRCCYtamC8/2zlAcD8cqQmqI9Q+YVz7fJLHMmU9pXDVYYHpJeCgUSBJju85vu5q8Q==",
"dependencies": {
"clsx": "^1.1.0",
"prop-types": "^15.5.0"
},
"peerDependencies": {
- "react": "^16.3.0 || ^17.0.0-0"
+ "react": "^16.8.0 || ^17.0.0-0 || ^18.0.0"
}
},
"node_modules/react-tiny-popover": {
@@ -41385,15 +40616,6 @@
"react-dom": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0"
}
},
- "node_modules/react-webcam": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.1.1.tgz",
- "integrity": "sha512-2W5WN8wmEv8ZlxvyAlOxVuw6new8Bi7+KSPqoq5oa7z1KSKZ72ucaKqCFRtHSuFjZ5sh5ioS9lp4BGwnaZ6lDg==",
- "peerDependencies": {
- "react": ">=16.2.0",
- "react-dom": ">=16.2.0"
- }
- },
"node_modules/react-window": {
"version": "1.8.9",
"resolved": "https://registry.npmjs.org/react-window/-/react-window-1.8.9.tgz",
@@ -42551,11 +41773,6 @@
"node": ">=8"
}
},
- "node_modules/resolve-pathname": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz",
- "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg=="
- },
"node_modules/resolve-url": {
"version": "0.2.1",
"license": "MIT"
@@ -43445,11 +42662,6 @@
"resolved": "https://registry.npmjs.org/scrollparent/-/scrollparent-2.1.0.tgz",
"integrity": "sha512-bnnvJL28/Rtz/kz2+4wpBjHzWoEzXhVg/TE8BeVGJHUqE8THNIRnDxDWMktwM+qahvlRdvlLdsQfYe+cuqfZeA=="
},
- "node_modules/seedrandom": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
- "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
- },
"node_modules/select": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
@@ -44147,32 +43359,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/socket.io-client": {
- "version": "4.7.2",
- "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz",
- "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==",
- "dependencies": {
- "@socket.io/component-emitter": "~3.1.0",
- "debug": "~4.3.2",
- "engine.io-client": "~6.5.2",
- "socket.io-parser": "~4.2.4"
- },
- "engines": {
- "node": ">=10.0.0"
- }
- },
- "node_modules/socket.io-parser": {
- "version": "4.2.4",
- "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
- "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
- "dependencies": {
- "@socket.io/component-emitter": "~3.1.0",
- "debug": "~4.3.1"
- },
- "engines": {
- "node": ">=10.0.0"
- }
- },
"node_modules/sockjs": {
"version": "0.3.24",
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
@@ -45603,11 +44789,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/supports-webp": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/supports-webp/-/supports-webp-1.0.7.tgz",
- "integrity": "sha512-ZlqT+sCgZKcykOLrk8DYR4t3Em+nyVSHpiV3q7uzOutLwKIYU23n88KibCLw3FzM4NCQeRorvZ55AV/77lQyOQ=="
- },
"node_modules/svg-baker": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/svg-baker/-/svg-baker-1.7.0.tgz",
@@ -46343,6 +45524,7 @@
},
"node_modules/tmp": {
"version": "0.0.33",
+ "dev": true,
"license": "MIT",
"dependencies": {
"os-tmpdir": "~1.0.2"
@@ -47582,11 +46764,6 @@
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
- "node_modules/value-equal": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.2.1.tgz",
- "integrity": "sha512-yRL36Xb2K/HmFT5Fe3M86S7mu4+a12/3l7uytUh6eNPPjP77ldPBvsAvmnWff39sXn55naRMZN8LZWRO8PWaeQ=="
- },
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -47664,11 +46841,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/visibilityjs": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/visibilityjs/-/visibilityjs-1.2.8.tgz",
- "integrity": "sha512-Y+aL3OUX88b+/VSmkmC2ApuLbf0grzbNLpCfIDSw3BzTU6PqcPsdgIOaw8b+eZoy+DdQqnVN3y/Evow9vQq9Ig=="
- },
"node_modules/vm-browserify": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
@@ -49915,23 +49087,6 @@
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
},
- "node_modules/xmlhttprequest-ssl": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz",
- "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==",
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/xstate": {
- "version": "4.38.2",
- "resolved": "https://registry.npmjs.org/xstate/-/xstate-4.38.2.tgz",
- "integrity": "sha512-Fba/DwEPDLneHT3tbJ9F3zafbQXszOlyCJyQqqdzmtlY/cwE2th462KK48yaANf98jHlP6lJvxfNtN0LFKXPQg==",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/xstate"
- }
- },
"node_modules/xtend": {
"version": "4.0.2",
"license": "MIT",
@@ -51612,9 +50767,9 @@
}
},
"@deriv/deriv-charts": {
- "version": "1.3.6",
- "resolved": "https://registry.npmjs.org/@deriv/deriv-charts/-/deriv-charts-1.3.6.tgz",
- "integrity": "sha512-hxEgCIPPx87OO2NVn8cxbmUc4kVUPhjTzM8MGyviJkCWpl+mdBKizGKq+LQr9oNQwKfxw2dszFDBaVsoAFTXYQ==",
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/@deriv/deriv-charts/-/deriv-charts-1.4.0.tgz",
+ "integrity": "sha512-JWhDkE/c+CouMQ6FNsiKwg9EWFq3jgUu7dxK2Z4wNeDSDrcNe37VK13UagL40dmqJe/W3LJ2wUolFGYqAe3DIw==",
"requires": {
"@welldone-software/why-did-you-render": "^3.3.8",
"classnames": "^2.3.1",
@@ -51624,36 +50779,13 @@
"mobx-react-lite": "^3.4.0",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
- "react": "^16.13.1",
- "react-dom": "^16.13.1",
- "react-tabs": "^3.0.0",
+ "react": "^17.0.2",
+ "react-dom": "^17.0.2",
+ "react-tabs": "^4.3.0",
"react-transition-group": "^4.4.1",
"robust-websocket": "^1.0.0",
"sinon-chai": "^3.7.0",
"url-search-params-polyfill": "^7.0.0"
- },
- "dependencies": {
- "react": {
- "version": "16.14.0",
- "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz",
- "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==",
- "requires": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "prop-types": "^15.6.2"
- }
- },
- "react-dom": {
- "version": "16.14.0",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz",
- "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==",
- "requires": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "prop-types": "^15.6.2",
- "scheduler": "^0.19.1"
- }
- }
}
},
"@deriv/eslint-config-deriv": {
@@ -54117,16 +53249,6 @@
"resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz",
"integrity": "sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA=="
},
- "@mediapipe/face_detection": {
- "version": "0.4.1646425229",
- "resolved": "https://registry.npmjs.org/@mediapipe/face_detection/-/face_detection-0.4.1646425229.tgz",
- "integrity": "sha512-aeCN+fRAojv9ch3NXorP6r5tcGVLR3/gC1HmtqB0WEZBRXrdP6/3W/sGR0dHr1iT6ueiK95G9PVjbzFosf/hrg=="
- },
- "@mediapipe/face_mesh": {
- "version": "0.4.1633559619",
- "resolved": "https://registry.npmjs.org/@mediapipe/face_mesh/-/face_mesh-0.4.1633559619.tgz",
- "integrity": "sha512-Vc8cdjxS5+O2gnjWH9KncYpUCVXT0h714KlWAsyqJvJbIgUJBqpppbIx8yWcAzBDxm/5cYSuBI5p5ySIPxzcEg=="
- },
"@motionone/animation": {
"version": "10.16.3",
"resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.16.3.tgz",
@@ -54705,123 +53827,6 @@
"@octokit/openapi-types": "^14.0.0"
}
},
- "@onfido/active-video-capture": {
- "version": "0.22.2",
- "resolved": "https://registry.npmjs.org/@onfido/active-video-capture/-/active-video-capture-0.22.2.tgz",
- "integrity": "sha512-wM7PJUdB0rwCpIdKoOczynqALW9zXXr/x43RGDpaGBFMdY5imbXpQtI/JaaZjQsWK6cH8FKAkKLvrxRNYCsMmQ==",
- "requires": {
- "@mediapipe/face_detection": "^0.4.1646425229",
- "@mediapipe/face_mesh": "^0.4.1633559619",
- "@onfido/castor": "^2.2.2",
- "@onfido/castor-icons": "^2.12.0",
- "@tensorflow-models/face-detection": "^1.0.1",
- "@tensorflow-models/face-landmarks-detection": "^1.0.2",
- "@tensorflow/tfjs-backend-wasm": "^3.20.0",
- "@tensorflow/tfjs-backend-webgl": "^3.20.0",
- "@tensorflow/tfjs-converter": "^3.20.0",
- "@tensorflow/tfjs-core": "^3.20.0",
- "@typescript/lib-dom": "npm:@types/web",
- "patch-package": "^6.4.7",
- "postinstall-postinstall": "^2.1.0",
- "preact": "^10.10.6",
- "react-webcam": "^7.0.0"
- },
- "dependencies": {
- "@tensorflow-models/face-landmarks-detection": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@tensorflow-models/face-landmarks-detection/-/face-landmarks-detection-1.0.5.tgz",
- "integrity": "sha512-54XJPi8g29/MknJ33ZBrLsEzr9kw/dJtrJMMD3xrCrnRlfFQPIKQ5PI2Wml55Fz2p4U2hemzBB0/H+S94JddIQ==",
- "requires": {
- "rimraf": "^3.0.2"
- }
- },
- "@tensorflow/tfjs-backend-cpu": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.21.0.tgz",
- "integrity": "sha512-88S21UAdzyK0CsLUrH17GPTD+26E85OP9CqmLZslaWjWUmBkeTQ5Zqyp6iK+gELnLxPx6q7JsNEeFuPv4254lQ==",
- "requires": {
- "@types/seedrandom": "^2.4.28",
- "seedrandom": "^3.0.5"
- }
- },
- "@tensorflow/tfjs-backend-wasm": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.21.0.tgz",
- "integrity": "sha512-TVkJWrqukdxvIaQn9jZvtXR+7fmT7sti6NQH5OKVcBmFYIW7I3RiRRE66inVrHjEEvIVTUuW9yo9Ialn31EFIw==",
- "requires": {
- "@tensorflow/tfjs-backend-cpu": "3.21.0",
- "@types/emscripten": "~0.0.34"
- }
- },
- "@tensorflow/tfjs-backend-webgl": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.21.0.tgz",
- "integrity": "sha512-N4zitIAT9IX8B8oe489qM3f3VcESxGZIZvHmVP8varOQakTvTX859aaPo1s8hK1qCy4BjSGbweooZe4U8D4kTQ==",
- "requires": {
- "@tensorflow/tfjs-backend-cpu": "3.21.0",
- "@types/offscreencanvas": "~2019.3.0",
- "@types/seedrandom": "^2.4.28",
- "@types/webgl-ext": "0.0.30",
- "@types/webgl2": "0.0.6",
- "seedrandom": "^3.0.5"
- }
- },
- "@tensorflow/tfjs-converter": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.21.0.tgz",
- "integrity": "sha512-12Y4zVDq3yW+wSjSDpSv4HnpL2sDZrNiGSg8XNiDE4HQBdjdA+a+Q3sZF/8NV9y2yoBhL5L7V4mMLDdbZBd9/Q==",
- "requires": {}
- },
- "@tensorflow/tfjs-core": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.21.0.tgz",
- "integrity": "sha512-YSfsswOqWfd+M4bXIhT3hwtAb+IV8+ODwIxwdFR/7jTAPZP1wMVnSlpKnXHAN64HFOiP+Tm3HmKusEZ0+09A0w==",
- "requires": {
- "@types/long": "^4.0.1",
- "@types/offscreencanvas": "~2019.3.0",
- "@types/seedrandom": "^2.4.28",
- "@types/webgl-ext": "0.0.30",
- "@webgpu/types": "0.1.16",
- "long": "4.0.0",
- "node-fetch": "~2.6.1",
- "seedrandom": "^3.0.5"
- }
- },
- "@webgpu/types": {
- "version": "0.1.16",
- "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.16.tgz",
- "integrity": "sha512-9E61voMP4+Rze02jlTXud++Htpjyyk8vw5Hyw9FGRrmhHQg2GqbuOfwf5Klrb8vTxc2XWI3EfO7RUHMpxTj26A=="
- }
- }
- },
- "@onfido/castor": {
- "version": "2.2.5",
- "resolved": "https://registry.npmjs.org/@onfido/castor/-/castor-2.2.5.tgz",
- "integrity": "sha512-Io3FTazT06FDFJGjHWNF9g0fsIKHw38L2apL//zp/vveyEV1Zce/U0fLzC8LcE5TuoMnoAYaRi6Jwogd8EN5TA==",
- "requires": {
- "@onfido/castor-tokens": "^1.0.0-beta.6",
- "csstype": "^3.1.1"
- }
- },
- "@onfido/castor-icons": {
- "version": "2.22.0",
- "resolved": "https://registry.npmjs.org/@onfido/castor-icons/-/castor-icons-2.22.0.tgz",
- "integrity": "sha512-7OnCvu5xqVWcBLqovZyb99NP0oHw7sjkVYXZhi438i0U6Pgecrhu/14Gc/IN/kvgDxWj9qmiYdd0qdjNaVckrQ==",
- "requires": {}
- },
- "@onfido/castor-tokens": {
- "version": "1.0.0-beta.6",
- "resolved": "https://registry.npmjs.org/@onfido/castor-tokens/-/castor-tokens-1.0.0-beta.6.tgz",
- "integrity": "sha512-MfwuSlNdM0Ay0cI3LLyqZGsHW0e1Y1R/0IdQKVU575PdWQx1Q/538aOZMo/a3/oSW0pMEgfOm+mNqPx057cvWA=="
- },
- "@onfido/opencv": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@onfido/opencv/-/opencv-1.0.2.tgz",
- "integrity": "sha512-dgUj7NJ3tohlqU6WdYiey5NBTTjI0VYp2yyL8dz1g8c/nX5tM5toOgEgyaNz7fX2tlpJO877G/CT/n5yYSb+gg==",
- "requires": {
- "mirada": "^0.0.15"
- }
- },
"@parcel/watcher": {
"version": "2.0.4",
"dev": true,
@@ -55378,64 +54383,6 @@
"integrity": "sha512-VNipPeJT7B6hD/OBDi6IjcGW+Y8fJHNkVUkvFk0BUkkZLY1eefUmtrv2CWWbJ0hxfGFWe+wRVEjsdWDXqLN/DA==",
"requires": {}
},
- "@sentry-internal/tracing": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.70.0.tgz",
- "integrity": "sha512-SpbE6wZhs6QwG2ORWCt8r28o1T949qkWx/KeRTCdK4Ub95PQ3Y3DgnqD8Wz//3q50Wt6EZDEibmz4t067g6PPg==",
- "requires": {
- "@sentry/core": "7.70.0",
- "@sentry/types": "7.70.0",
- "@sentry/utils": "7.70.0",
- "tslib": "^2.4.1 || ^1.9.3"
- }
- },
- "@sentry/browser": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.70.0.tgz",
- "integrity": "sha512-PB+IP49/TLcnDHCj9eJ5tcHE0pzXg23wBakmF3KGMSd5nxEbUvmOsaFPZcgUUlL9JlU3v1Y40We7HdPStrY6oA==",
- "requires": {
- "@sentry-internal/tracing": "7.70.0",
- "@sentry/core": "7.70.0",
- "@sentry/replay": "7.70.0",
- "@sentry/types": "7.70.0",
- "@sentry/utils": "7.70.0",
- "tslib": "^2.4.1 || ^1.9.3"
- }
- },
- "@sentry/core": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.70.0.tgz",
- "integrity": "sha512-voUsGVM+jwRp99AQYFnRvr7sVd2tUhIMj1L6F42LtD3vp7t5ZnKp3NpXagtFW2vWzXESfyJUBhM0qI/bFvn7ZA==",
- "requires": {
- "@sentry/types": "7.70.0",
- "@sentry/utils": "7.70.0",
- "tslib": "^2.4.1 || ^1.9.3"
- }
- },
- "@sentry/replay": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.70.0.tgz",
- "integrity": "sha512-XjnyE6ORREz9kBWWHdXaIjS9P2Wo7uEw+y23vfLQwzV0Nx3xJ+FG4dwf8onyIoeCZDKbz7cqQIbugU1gkgUtZw==",
- "requires": {
- "@sentry/core": "7.70.0",
- "@sentry/types": "7.70.0",
- "@sentry/utils": "7.70.0"
- }
- },
- "@sentry/types": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.70.0.tgz",
- "integrity": "sha512-rY4DqpiDBtXSk4MDNBH3dwWqfPbNBI/9GA7Y5WJSIcObBtfBKp0fzYliHJZD0pgM7d4DPFrDn42K9Iiumgymkw=="
- },
- "@sentry/utils": {
- "version": "7.70.0",
- "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.70.0.tgz",
- "integrity": "sha512-0cChMH0lsGp+5I3D4wOHWwjFN19HVrGUs7iWTLTO5St3EaVbdeLbI1vFXHxMxvopbwgpeZafbreHw/loIdZKpw==",
- "requires": {
- "@sentry/types": "7.70.0",
- "tslib": "^2.4.1 || ^1.9.3"
- }
- },
"@sinonjs/commons": {
"version": "1.8.6",
"dev": true,
@@ -55478,11 +54425,6 @@
"integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==",
"peer": true
},
- "@socket.io/component-emitter": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz",
- "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg=="
- },
"@stitches/react": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@stitches/react/-/react-1.2.8.tgz",
@@ -60888,73 +59830,18 @@
"use-sync-external-store": "^1.2.0"
}
},
- "@tensorflow-models/face-detection": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@tensorflow-models/face-detection/-/face-detection-1.0.2.tgz",
- "integrity": "sha512-anjSxy3MnZdTiVluOEQZeaFWM30IPswFM+SltX6wseXKja/AbrHYqamGNZKUylAs2JAyudq+xqTRPS+nA2ourg==",
- "requires": {
- "rimraf": "^3.0.2",
- "tslib": "2.4.0"
- },
- "dependencies": {
- "tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
- }
- }
- },
- "@tensorflow/tfjs-backend-cpu": {
- "version": "4.11.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-4.11.0.tgz",
- "integrity": "sha512-2zmGX9MuR8AwscSGOybz4fBOFgQDnj+ZCWGkLxDzbKecy9GxuilukT46xB2zU0kSq7Mf3ncfE/9eUEy6a7ZDqQ==",
- "peer": true,
- "requires": {
- "@types/seedrandom": "^2.4.28",
- "seedrandom": "^3.0.5"
- }
- },
- "@tensorflow/tfjs-backend-webgl": {
- "version": "4.11.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-4.11.0.tgz",
- "integrity": "sha512-sM/B65u+1T3U+Ctiq1fn5j6VmiLEZW7BpuSa3ZXDXtIS07MoZ2FTuO8BMudxEY4xGpTyoOzqTOGT9BaGO3qrWg==",
- "peer": true,
+ "@tanstack/react-table": {
+ "version": "8.10.3",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-table/-/react-table-8.10.3.tgz",
+ "integrity": "sha512-Qya1cJ+91arAlW7IRDWksRDnYw28O446jJ/ljkRSc663EaftJoBCAU10M+VV1K6MpCBLrXq1BD5IQc1zj/ZEjA==",
"requires": {
- "@tensorflow/tfjs-backend-cpu": "4.11.0",
- "@types/offscreencanvas": "~2019.3.0",
- "@types/seedrandom": "^2.4.28",
- "seedrandom": "^3.0.5"
+ "@tanstack/table-core": "8.10.3"
}
},
- "@tensorflow/tfjs-converter": {
- "version": "4.11.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-4.11.0.tgz",
- "integrity": "sha512-j2JEVwkqh+pyin+sxUiNUG7QOIU2S0+5SzN8LFXHlR90/bPvC2qiaaSPYdGG/BYidFc27QCHD3obBXrb1EE/ow==",
- "peer": true,
- "requires": {}
- },
- "@tensorflow/tfjs-core": {
- "version": "4.11.0",
- "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-4.11.0.tgz",
- "integrity": "sha512-t0mCNIco8wg6aZdHWT1d6ZuKtbbdY5y871ELWLSUA1+grXDvvaroHYh5eeJexJYXeg+EQ0/hzB0G8nLsLjlyVQ==",
- "peer": true,
- "requires": {
- "@types/long": "^4.0.1",
- "@types/offscreencanvas": "~2019.7.0",
- "@types/seedrandom": "^2.4.28",
- "@webgpu/types": "0.1.30",
- "long": "4.0.0",
- "node-fetch": "~2.6.1",
- "seedrandom": "^3.0.5"
- },
- "dependencies": {
- "@types/offscreencanvas": {
- "version": "2019.7.1",
- "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.1.tgz",
- "integrity": "sha512-+HSrJgjBW77ALieQdMJvXhRZUIRN1597L+BKvsyeiIlHHERnqjcuOLyodK3auJ3Y3zRezNKtKAhuQWYJfEgFHQ==",
- "peer": true
- }
- }
+ "@tanstack/table-core": {
+ "version": "8.10.3",
+ "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.10.3.tgz",
+ "integrity": "sha512-hJ55YfJlWbfzRROfcyA/kC1aZr/shsLA8XNAwN8jXylhYWGLnPmiJJISrUfj4dMMWRiFi0xBlnlC7MLH+zSrcw=="
},
"@testing-library/dom": {
"version": "8.19.0",
@@ -61181,11 +60068,6 @@
"classnames": "*"
}
},
- "@types/emscripten": {
- "version": "0.0.34",
- "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-0.0.34.tgz",
- "integrity": "sha512-QSb9ojDincskc+uKMI0KXp8e1NALFINCrMlp8VGKGcTSxeEyRTTKyjWw75NYrCZHUsVEEEpr1tYHpbtaC++/sQ=="
- },
"@types/eslint": {
"version": "7.29.0",
"requires": {
@@ -61311,6 +60193,14 @@
"@types/lodash": "*"
}
},
+ "@types/lodash.groupby": {
+ "version": "4.6.7",
+ "resolved": "https://registry.npmjs.org/@types/lodash.groupby/-/lodash.groupby-4.6.7.tgz",
+ "integrity": "sha512-dFUR1pqdMgjIBbgPJ/8axJX6M1C7zsL+HF4qdYMQeJ7XOp0Qbf37I3zh9gpXr/ks6tgEYPDRqyZRAnFYvewYHQ==",
+ "requires": {
+ "@types/lodash": "*"
+ }
+ },
"@types/lodash.merge": {
"version": "4.6.7",
"resolved": "https://registry.npmjs.org/@types/lodash.merge/-/lodash.merge-4.6.7.tgz",
@@ -61319,6 +60209,14 @@
"@types/lodash": "*"
}
},
+ "@types/lodash.pickby": {
+ "version": "4.6.7",
+ "resolved": "https://registry.npmjs.org/@types/lodash.pickby/-/lodash.pickby-4.6.7.tgz",
+ "integrity": "sha512-4ebXRusuLflfscbD0PUX4eVknDHD9Yf+uMtBIvA/hrnTqeAzbuHuDjvnYriLjUrI9YrhCPVKUf4wkRSXJQ6gig==",
+ "requires": {
+ "@types/lodash": "*"
+ }
+ },
"@types/lodash.throttle": {
"version": "4.1.7",
"resolved": "https://registry.npmjs.org/@types/lodash.throttle/-/lodash.throttle-4.1.7.tgz",
@@ -61327,11 +60225,6 @@
"@types/lodash": "*"
}
},
- "@types/long": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
- "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA=="
- },
"@types/mdast": {
"version": "3.0.10",
"requires": {
@@ -61382,11 +60275,6 @@
"resolved": "https://registry.npmjs.org/@types/object.fromentries/-/object.fromentries-2.0.2.tgz",
"integrity": "sha512-yUrBe89bzuR2AT0XJU26cmMylc15AOTeZzrnzbYcaMCd8fobYPsre+BJku5JJq5iauUdZkdkrujjzEz0l3MrLg=="
},
- "@types/offscreencanvas": {
- "version": "2019.3.0",
- "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz",
- "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q=="
- },
"@types/parse-json": {
"version": "4.0.0"
},
@@ -61535,11 +60423,6 @@
"@types/scheduler": {
"version": "0.16.2"
},
- "@types/seedrandom": {
- "version": "2.4.30",
- "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-2.4.30.tgz",
- "integrity": "sha512-AnxLHewubLVzoF/A4qdxBGHCKifw8cY32iro3DQX9TPcetE95zBeVt3jnsvtvAUf1vwzMfwzp4t/L2yqPlnjkQ=="
- },
"@types/semver": {
"version": "7.3.13"
},
@@ -61590,16 +60473,6 @@
"@types/unist": {
"version": "2.0.6"
},
- "@types/webgl-ext": {
- "version": "0.0.30",
- "resolved": "https://registry.npmjs.org/@types/webgl-ext/-/webgl-ext-0.0.30.tgz",
- "integrity": "sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg=="
- },
- "@types/webgl2": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/@types/webgl2/-/webgl2-0.0.6.tgz",
- "integrity": "sha512-50GQhDVTq/herLMiqSQkdtRu+d5q/cWHn4VvKJtrj4DJAjo1MNkWYa2MA41BaBO1q1HgsUjuQvEOk0QHvlnAaQ=="
- },
"@types/webpack": {
"version": "4.41.33",
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.33.tgz",
@@ -61841,11 +60714,6 @@
}
}
},
- "@typescript/lib-dom": {
- "version": "npm:@types/web@0.0.115",
- "resolved": "https://registry.npmjs.org/@types/web/-/web-0.0.115.tgz",
- "integrity": "sha512-IBtUgtxnITC7WTCg4tv6kCnSP0T+fM+3PzQPIzLzJY1DDlhBFKM/9+uMURw14YweWPDiFNIZ94Gc1bJtwow97g=="
- },
"@webassemblyjs/ast": {
"version": "1.11.5",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.5.tgz",
@@ -62082,12 +60950,6 @@
"@xtuc/long": "4.2.2"
}
},
- "@webgpu/types": {
- "version": "0.1.30",
- "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.30.tgz",
- "integrity": "sha512-9AXJSmL3MzY8ZL//JjudA//q+2kBRGhLBFpkdGksWIuxrMy81nFrCzj2Am+mbh8WoU6rXmv7cY5E3rdlyru2Qg==",
- "peer": true
- },
"@webpack-cli/configtest": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
@@ -62132,7 +60994,8 @@
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
},
"@yarnpkg/lockfile": {
- "version": "1.1.0"
+ "version": "1.1.0",
+ "dev": true
},
"@yarnpkg/parsers": {
"version": "3.0.0-rc.32",
@@ -63708,11 +62571,6 @@
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
},
- "blueimp-load-image": {
- "version": "2.29.0",
- "resolved": "https://registry.npmjs.org/blueimp-load-image/-/blueimp-load-image-2.29.0.tgz",
- "integrity": "sha512-psm81GlZ0ffKxVT0QN9dvhpzXMv1KxgXSg8ars0XGAcEGsTwFT2IPo59HDXlw4Lo2oImdPzwrwkliZSiLLUpIw=="
- },
"bn.js": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz",
@@ -64013,6 +62871,7 @@
},
"buffer": {
"version": "5.7.1",
+ "dev": true,
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
@@ -65749,14 +64608,6 @@
}
}
},
- "cross-fetch": {
- "version": "3.1.8",
- "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz",
- "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==",
- "requires": {
- "node-fetch": "^2.6.12"
- }
- },
"cross-spawn": {
"version": "7.0.3",
"requires": {
@@ -66969,11 +65820,6 @@
"domelementtype": "1"
}
},
- "dompurify": {
- "version": "2.4.7",
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz",
- "integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ=="
- },
"domready": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/domready/-/domready-1.0.8.tgz",
@@ -67237,31 +66083,6 @@
"objectorarray": "^1.0.5"
}
},
- "engine.io-client": {
- "version": "6.5.2",
- "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz",
- "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==",
- "requires": {
- "@socket.io/component-emitter": "~3.1.0",
- "debug": "~4.3.1",
- "engine.io-parser": "~5.2.1",
- "ws": "~8.11.0",
- "xmlhttprequest-ssl": "~2.0.0"
- },
- "dependencies": {
- "ws": {
- "version": "8.11.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz",
- "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==",
- "requires": {}
- }
- }
- },
- "engine.io-parser": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz",
- "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ=="
- },
"enhanced-resolve": {
"version": "0.9.1",
"requires": {
@@ -67279,11 +66100,6 @@
"entities": {
"version": "1.1.2"
},
- "enumerate-devices": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/enumerate-devices/-/enumerate-devices-1.1.1.tgz",
- "integrity": "sha512-8zDbrc7ocusTL1ZGmvgy0cTwdyCaM7sGZoYLRmnWJalLQzmftDtce+uDU91gafOTo9MCtgjSIxyMv/F4+Hcchw=="
- },
"env-paths": {
"version": "2.2.1",
"dev": true
@@ -68476,11 +67292,6 @@
"resolved": "https://registry.npmjs.org/event-emitter-es6/-/event-emitter-es6-1.1.5.tgz",
"integrity": "sha512-/n7qzkJBySdbe1W9/FBDdO7gzDIaewgj+Rj6Ayc2BdvVcaGP+p40DyViOFudCgV47UU8+cUFmcD3tJgjwY65qQ=="
},
- "eventemitter2": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz",
- "integrity": "sha512-AmQ734LWUB9Iyk+2WIU3Z8iRhdL1XQihEE0iF/QC5Xp11zST0Z5tn5jRHa/PgIld2QIPSCys3CREqOQLUhNvkw=="
- },
"eventemitter3": {
"version": "4.0.7"
},
@@ -69041,11 +67852,6 @@
"ramda": "^0.28.0"
}
},
- "file-type": {
- "version": "12.4.2",
- "resolved": "https://registry.npmjs.org/file-type/-/file-type-12.4.2.tgz",
- "integrity": "sha512-UssQP5ZgIOKelfsaB5CuGAL+Y+q7EmONuiwF3N5HAH0t27rvrttgi6Ra9k/+DVaY9UF6+ybxu5pOXLUdA8N7Vg=="
- },
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
@@ -69218,14 +68024,6 @@
"path-exists": "^4.0.0"
}
},
- "find-yarn-workspace-root": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz",
- "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==",
- "requires": {
- "micromatch": "^4.0.2"
- }
- },
"flat": {
"version": "5.0.2",
"dev": true
@@ -73874,14 +72672,6 @@
"kind-of": {
"version": "6.0.3"
},
- "klaw-sync": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
- "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
- "requires": {
- "graceful-fs": "^4.1.11"
- }
- },
"kleur": {
"version": "3.0.3"
},
@@ -74313,6 +73103,11 @@
"integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==",
"peer": true
},
+ "lodash.groupby": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz",
+ "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw=="
+ },
"lodash.invokemap": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.invokemap/-/lodash.invokemap-4.6.0.tgz",
@@ -74350,6 +73145,11 @@
"version": "4.6.2",
"dev": true
},
+ "lodash.pickby": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz",
+ "integrity": "sha512-AZV+GsS/6ckvPOVQPXSiFFacKvKB4kOQu6ynt9wz0F3LO4R9Ij4K1ddYsIytDpSgLz88JHd9P+oaLeej5/Sl7Q=="
+ },
"lodash.pullall": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.pullall/-/lodash.pullall-4.2.0.tgz",
@@ -74481,11 +73281,6 @@
"resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz",
"integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg=="
},
- "long": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
- "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
- },
"longest-streak": {
"version": "2.0.4",
"dev": true
@@ -75026,22 +73821,6 @@
"yallist": "^4.0.0"
}
},
- "mirada": {
- "version": "0.0.15",
- "resolved": "https://registry.npmjs.org/mirada/-/mirada-0.0.15.tgz",
- "integrity": "sha512-mbm4c+wjBVcmUzHRLv/TfOAq+iy03D24KwGxx8H+NSXkD5EOZV9zFWbVxTvZCc9XwR0FIUhryU/kQm12SMSQ3g==",
- "requires": {
- "buffer": "^5.4.3",
- "cross-fetch": "^3.0.4",
- "file-type": "^12.3.0",
- "misc-utils-of-mine-generic": "^0.2.31"
- }
- },
- "misc-utils-of-mine-generic": {
- "version": "0.2.45",
- "resolved": "https://registry.npmjs.org/misc-utils-of-mine-generic/-/misc-utils-of-mine-generic-0.2.45.tgz",
- "integrity": "sha512-WsG2zYiui2cdEbHF2pXmJfnjHb4zL+cy+PaYcLgIpMju98hwX89VbjlvGIfamCfEodbQ0qjCEvD3ocgkCXfMOQ=="
- },
"mississippi": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
@@ -76330,71 +75109,6 @@
"mimic-fn": "^2.1.0"
}
},
- "onfido-sdk-ui": {
- "version": "11.0.1",
- "resolved": "https://registry.npmjs.org/onfido-sdk-ui/-/onfido-sdk-ui-11.0.1.tgz",
- "integrity": "sha512-S61h4njiuWQD3KNLRZaoobiaSjTvt1FjBOwqnsJmnkN7TD/knu8c1IyNlgztRe0Fg2CSE70rwEiO8tdlM3pqsg==",
- "requires": {
- "@onfido/active-video-capture": "^0.22.1",
- "@onfido/opencv": "^1.0.0",
- "@sentry/browser": "^7.2.0",
- "blueimp-load-image": "~2.29.0",
- "classnames": "~2.2.5",
- "core-js": "^3.21.1",
- "deepmerge": "^4.2.2",
- "dompurify": "^2.2.6",
- "enumerate-devices": "^1.1.1",
- "eventemitter2": "~2.2.2",
- "history": "~4.5.1",
- "hoist-non-react-statics": "^3.3.2",
- "js-cookie": "^3.0.1",
- "pdfobject": "^2.2.7",
- "preact": "^10.5.13",
- "redux": "^4.0.5",
- "socket.io-client": "^4.2.0",
- "supports-webp": "~1.0.3",
- "uuid": "^8.3.2",
- "visibilityjs": "~1.2.4",
- "xstate": "^4.33.6"
- },
- "dependencies": {
- "classnames": {
- "version": "2.2.6",
- "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
- "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
- },
- "core-js": {
- "version": "3.32.2",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.2.tgz",
- "integrity": "sha512-pxXSw1mYZPDGvTQqEc5vgIb83jGQKFGYWY76z4a7weZXUolw3G+OvpZqSRcfYOoOVUQJYEPsWeQK8pKEnUtWxQ=="
- },
- "history": {
- "version": "4.5.1",
- "resolved": "https://registry.npmjs.org/history/-/history-4.5.1.tgz",
- "integrity": "sha512-gfHeJeYeMzFtos61gdA1AloO0hGXPF2Yum+2FRdJvlylYQOz51OnT1zuwg9UYst1BRrONhcAh3Nmsg9iblgl6g==",
- "requires": {
- "invariant": "^2.2.1",
- "loose-envify": "^1.2.0",
- "resolve-pathname": "^2.0.0",
- "value-equal": "^0.2.0",
- "warning": "^3.0.0"
- }
- },
- "js-cookie": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz",
- "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw=="
- },
- "warning": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz",
- "integrity": "sha512-jMBt6pUrKn5I+OGgtQ4YZLdhIeJmObddh6CsibPxyQ5yPZm1XExSyzC1LCNX7BzhxWgiHmizBWJTHJIjMjTQYQ==",
- "requires": {
- "loose-envify": "^1.0.0"
- }
- }
- }
- },
"open": {
"version": "8.4.0",
"requires": {
@@ -76827,148 +75541,6 @@
"pascalcase": {
"version": "0.1.1"
},
- "patch-package": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz",
- "integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==",
- "requires": {
- "@yarnpkg/lockfile": "^1.1.0",
- "chalk": "^4.1.2",
- "cross-spawn": "^6.0.5",
- "find-yarn-workspace-root": "^2.0.0",
- "fs-extra": "^9.0.0",
- "is-ci": "^2.0.0",
- "klaw-sync": "^6.0.0",
- "minimist": "^1.2.6",
- "open": "^7.4.2",
- "rimraf": "^2.6.3",
- "semver": "^5.6.0",
- "slash": "^2.0.0",
- "tmp": "^0.0.33",
- "yaml": "^1.10.2"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "fs-extra": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
- "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
- "requires": {
- "at-least-node": "^1.0.0",
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- }
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
- },
- "open": {
- "version": "7.4.2",
- "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
- "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
- "requires": {
- "is-docker": "^2.0.0",
- "is-wsl": "^2.1.1"
- }
- },
- "path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw=="
- },
- "rimraf": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
- "requires": {
- "glob": "^7.1.3"
- }
- },
- "semver": {
- "version": "5.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
- "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="
- },
- "shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
- "requires": {
- "shebang-regex": "^1.0.0"
- }
- },
- "shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ=="
- },
- "slash": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
- "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A=="
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "requires": {
- "has-flag": "^4.0.0"
- }
- },
- "which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "requires": {
- "isexe": "^2.0.0"
- }
- }
- }
- },
"path-browserify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
@@ -77022,11 +75594,6 @@
"sha.js": "^2.4.8"
}
},
- "pdfobject": {
- "version": "2.2.12",
- "resolved": "https://registry.npmjs.org/pdfobject/-/pdfobject-2.2.12.tgz",
- "integrity": "sha512-D0oyD/sj8j82AMaJhoyMaY1aD5TkbpU3FbJC6w9/cpJlZRpYHqAkutXw1Ca/FKjYPZmTAu58uGIfgOEaDlbY8A=="
- },
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
@@ -78001,16 +76568,6 @@
"posthtml-render": "^1.0.6"
}
},
- "postinstall-postinstall": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz",
- "integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ=="
- },
- "preact": {
- "version": "10.17.1",
- "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz",
- "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA=="
- },
"preload-webpack-plugin": {
"version": "3.0.0-beta.4",
"resolved": "https://registry.npmjs.org/preload-webpack-plugin/-/preload-webpack-plugin-3.0.0-beta.4.tgz",
@@ -79123,9 +77680,9 @@
}
},
"react-tabs": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-3.2.3.tgz",
- "integrity": "sha512-jx325RhRVnS9DdFbeF511z0T0WEqEoMl1uCE3LoZ6VaZZm7ytatxbum0B8bCTmaiV0KsU+4TtLGTGevCic7SWg==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-4.3.0.tgz",
+ "integrity": "sha512-2GfoG+f41kiBIIyd3gF+/GRCCYtamC8/2zlAcD8cqQmqI9Q+YVz7fJLHMmU9pXDVYYHpJeCgUSBJju85vu5q8Q==",
"requires": {
"clsx": "^1.1.0",
"prop-types": "^15.5.0"
@@ -79161,12 +77718,6 @@
"react-lifecycles-compat": "^3.0.4"
}
},
- "react-webcam": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.1.1.tgz",
- "integrity": "sha512-2W5WN8wmEv8ZlxvyAlOxVuw6new8Bi7+KSPqoq5oa7z1KSKZ72ucaKqCFRtHSuFjZ5sh5ioS9lp4BGwnaZ6lDg==",
- "requires": {}
- },
"react-window": {
"version": "1.8.9",
"resolved": "https://registry.npmjs.org/react-window/-/react-window-1.8.9.tgz",
@@ -79973,11 +78524,6 @@
"global-dirs": "^0.1.1"
}
},
- "resolve-pathname": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz",
- "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg=="
- },
"resolve-url": {
"version": "0.2.1"
},
@@ -80614,11 +79160,6 @@
"resolved": "https://registry.npmjs.org/scrollparent/-/scrollparent-2.1.0.tgz",
"integrity": "sha512-bnnvJL28/Rtz/kz2+4wpBjHzWoEzXhVg/TE8BeVGJHUqE8THNIRnDxDWMktwM+qahvlRdvlLdsQfYe+cuqfZeA=="
},
- "seedrandom": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
- "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
- },
"select": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
@@ -81149,26 +79690,6 @@
}
}
},
- "socket.io-client": {
- "version": "4.7.2",
- "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz",
- "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==",
- "requires": {
- "@socket.io/component-emitter": "~3.1.0",
- "debug": "~4.3.2",
- "engine.io-client": "~6.5.2",
- "socket.io-parser": "~4.2.4"
- }
- },
- "socket.io-parser": {
- "version": "4.2.4",
- "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
- "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
- "requires": {
- "@socket.io/component-emitter": "~3.1.0",
- "debug": "~4.3.1"
- }
- },
"sockjs": {
"version": "0.3.24",
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
@@ -82168,11 +80689,6 @@
"supports-preserve-symlinks-flag": {
"version": "1.0.0"
},
- "supports-webp": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/supports-webp/-/supports-webp-1.0.7.tgz",
- "integrity": "sha512-ZlqT+sCgZKcykOLrk8DYR4t3Em+nyVSHpiV3q7uzOutLwKIYU23n88KibCLw3FzM4NCQeRorvZ55AV/77lQyOQ=="
- },
"svg-baker": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/svg-baker/-/svg-baker-1.7.0.tgz",
@@ -82715,6 +81231,7 @@
},
"tmp": {
"version": "0.0.33",
+ "dev": true,
"requires": {
"os-tmpdir": "~1.0.2"
}
@@ -83511,11 +82028,6 @@
"builtins": "^5.0.0"
}
},
- "value-equal": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.2.1.tgz",
- "integrity": "sha512-yRL36Xb2K/HmFT5Fe3M86S7mu4+a12/3l7uytUh6eNPPjP77ldPBvsAvmnWff39sXn55naRMZN8LZWRO8PWaeQ=="
- },
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -83574,11 +82086,6 @@
}
}
},
- "visibilityjs": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/visibilityjs/-/visibilityjs-1.2.8.tgz",
- "integrity": "sha512-Y+aL3OUX88b+/VSmkmC2ApuLbf0grzbNLpCfIDSw3BzTU6PqcPsdgIOaw8b+eZoy+DdQqnVN3y/Evow9vQq9Ig=="
- },
"vm-browserify": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
@@ -85313,16 +83820,6 @@
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
},
- "xmlhttprequest-ssl": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz",
- "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A=="
- },
- "xstate": {
- "version": "4.38.2",
- "resolved": "https://registry.npmjs.org/xstate/-/xstate-4.38.2.tgz",
- "integrity": "sha512-Fba/DwEPDLneHT3tbJ9F3zafbQXszOlyCJyQqqdzmtlY/cwE2th462KK48yaANf98jHlP6lJvxfNtN0LFKXPQg=="
- },
"xtend": {
"version": "4.0.2"
},
diff --git a/packages/account/package.json b/packages/account/package.json
index c8dc9ccc973e..9d5c57f8320b 100644
--- a/packages/account/package.json
+++ b/packages/account/package.json
@@ -28,6 +28,7 @@
},
"dependencies": {
"@binary-com/binary-document-uploader": "^2.4.8",
+ "@deriv/api": "^1.0.0",
"@deriv/api-types": "^1.0.118",
"@deriv/components": "^1.0.0",
"@deriv/hooks": "^1.0.0",
@@ -43,7 +44,6 @@
"js-cookie": "^2.2.1",
"mobx": "^6.6.1",
"mobx-react": "^7.5.1",
- "onfido-sdk-ui": "^11.0.0",
"prop-types": "^15.7.2",
"qrcode.react": "^1.0.0",
"react": "^17.0.2",
diff --git a/packages/account/src/App.tsx b/packages/account/src/App.tsx
index 6e8a413b434f..4d9ff2d1ebb8 100644
--- a/packages/account/src/App.tsx
+++ b/packages/account/src/App.tsx
@@ -1,10 +1,9 @@
import React from 'react';
import Routes from './Containers/routes';
import ResetTradingPassword from './Containers/reset-trading-password';
-import { setWebsocket } from '@deriv/shared';
+import { APIProvider } from '@deriv/api';
import { StoreProvider } from '@deriv/stores';
import { TCoreStores } from '@deriv/stores/types';
-import APIProvider from '../../api/src/APIProvider';
// TODO: add correct types for WS after implementing them
type TAppProps = {
@@ -15,8 +14,7 @@ type TAppProps = {
};
const App = ({ passthrough }: TAppProps) => {
- const { root_store, WS } = passthrough;
- setWebsocket(WS);
+ const { root_store } = passthrough;
const { notification_messages_ui: Notifications } = root_store.ui;
diff --git a/packages/account/src/Components/Routes/__tests__/binary-routes.spec.tsx b/packages/account/src/Components/Routes/__tests__/binary-routes.spec.tsx
index 2c3df1deceed..ca00b2294287 100644
--- a/packages/account/src/Components/Routes/__tests__/binary-routes.spec.tsx
+++ b/packages/account/src/Components/Routes/__tests__/binary-routes.spec.tsx
@@ -1,8 +1,10 @@
import React from 'react';
import { Router } from 'react-router-dom';
import { createBrowserHistory } from 'history';
+
+import { mockStore, StoreProvider } from '@deriv/stores';
import { render, screen } from '@testing-library/react';
-import { StoreProvider, mockStore } from '@deriv/stores';
+
import BinaryRoutes from '../binary-routes';
jest.mock('../route-with-sub-routes', () => jest.fn(() =>
RouteWithSubRoutes
));
diff --git a/packages/account/src/Components/Routes/binary-routes.tsx b/packages/account/src/Components/Routes/binary-routes.tsx
index de884830b996..6e361da601f1 100644
--- a/packages/account/src/Components/Routes/binary-routes.tsx
+++ b/packages/account/src/Components/Routes/binary-routes.tsx
@@ -1,9 +1,12 @@
import React from 'react';
import { Switch } from 'react-router-dom';
-import { Localize } from '@deriv/translations';
+
import { observer, useStore } from '@deriv/stores';
+import { Localize } from '@deriv/translations';
+
import getRoutesConfig from '../../Constants/routes-config';
import { TBinaryRoutes, TRoute } from '../../Types';
+
import RouteWithSubRoutes from './route-with-sub-routes';
const BinaryRoutes = observer((props: TBinaryRoutes) => {
diff --git a/packages/account/src/Components/Routes/helpers.ts b/packages/account/src/Components/Routes/helpers.ts
index 6d1798fc14c1..33427159d083 100644
--- a/packages/account/src/Components/Routes/helpers.ts
+++ b/packages/account/src/Components/Routes/helpers.ts
@@ -10,7 +10,7 @@ export const findRouteByPath = (path: string, routes_config?: TRouteConfig[]): R
routes_config?.some(route_info => {
let match_path: match | null = null;
try {
- match_path = matchPath(path, route_info);
+ match_path = matchPath(path, route_info as RouteProps);
} catch (e: unknown) {
if (/undefined/.test((e as Error).message)) {
return undefined;
@@ -18,7 +18,7 @@ export const findRouteByPath = (path: string, routes_config?: TRouteConfig[]): R
}
if (match_path) {
- result = route_info;
+ result = route_info as RouteProps;
return true;
} else if (route_info.routes) {
result = findRouteByPath(path, route_info.routes);
diff --git a/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-form.spec.tsx b/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-form.spec.tsx
new file mode 100644
index 000000000000..0b1f9dc9affe
--- /dev/null
+++ b/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-form.spec.tsx
@@ -0,0 +1,134 @@
+import React from 'react';
+import { render, screen, waitFor } from '@testing-library/react';
+import { StoreProvider, mockStore } from '@deriv/stores';
+import { AdditionalKycInfoForm } from '../additional-kyc-info-form';
+import userEvent from '@testing-library/user-event';
+import { useSettings } from '@deriv/api';
+
+jest.mock('@deriv/api', () => ({
+ ...jest.requireActual('@deriv/api'),
+ useSettings: jest.fn(),
+}));
+
+const mockedUseSettings = useSettings as jest.MockedFunction;
+
+const mock_settings: ReturnType = {
+ update: jest.fn(),
+ mutation: { isLoading: false, isSuccess: false, error: null, isError: false },
+ data: {
+ tax_identification_number: '',
+ tax_residence: '',
+ place_of_birth: '',
+ account_opening_reason: '',
+ },
+};
+
+jest.mock('@deriv/shared', () => ({
+ ...jest.requireActual('@deriv/shared'),
+ generateValidationFunction: jest.fn(),
+}));
+
+describe('AdditionalKycInfoForm', () => {
+ const setError = jest.fn();
+ const mock_store = mockStore({});
+
+ it('should render the form fields', () => {
+ mockedUseSettings.mockReturnValue(mock_settings);
+ render(
+
+
+
+ );
+
+ expect(screen.getByTestId('dt_place_of_birth')).toBeInTheDocument();
+ expect(screen.getByTestId('dt_tax_residence')).toBeInTheDocument();
+ expect(screen.getByTestId('dt_tax_identification_number')).toBeInTheDocument();
+ expect(screen.getByTestId('dt_account_opening_reason')).toBeInTheDocument();
+ });
+
+ it('should render loading state upon fetching data', () => {
+ mockedUseSettings.mockReturnValue({ ...mock_settings, isLoading: true });
+ render(
+
+
+
+ );
+
+ expect(screen.getByTestId('dt_initial_loader')).toBeInTheDocument();
+ });
+
+ it('should submit the form when all fields are valid', async () => {
+ mockedUseSettings.mockReturnValue(mock_settings);
+ render(
+
+
+
+ );
+
+ const submit_btn = screen.getByRole('button', { name: 'Submit' });
+
+ userEvent.type(screen.getByTestId('dt_place_of_birth'), 'Ghana');
+ userEvent.type(screen.getByTestId('dt_tax_residence'), 'Ghana');
+ userEvent.type(screen.getByTestId('dt_tax_identification_number'), 'GHA-000000000-0');
+ userEvent.type(screen.getByTestId('dt_account_opening_reason'), 'Speculative');
+
+ await waitFor(() => {
+ expect(submit_btn).toBeEnabled();
+ });
+ userEvent.click(screen.getByRole('button', { name: 'Submit' }));
+
+ expect(mockedUseSettings).toHaveBeenCalled();
+ });
+
+ it('should be able to submit the form without filling optional fields', async () => {
+ mockedUseSettings.mockReturnValue(mock_settings);
+ render(
+
+
+
+ );
+
+ const submit_btn = screen.getByRole('button', { name: 'Submit' });
+
+ userEvent.type(screen.getByTestId('dt_place_of_birth'), 'Ghana');
+ userEvent.type(screen.getByTestId('dt_account_opening_reason'), 'Speculative');
+
+ await waitFor(() => {
+ expect(submit_btn).toBeEnabled();
+ });
+ userEvent.click(screen.getByRole('button', { name: 'Submit' }));
+
+ expect(mockedUseSettings).toHaveBeenCalled();
+ });
+
+ it('should show an error message if form validation fails', async () => {
+ mockedUseSettings.mockReturnValue({
+ ...mock_settings,
+ mutation: {
+ ...mock_settings.mutation,
+ isError: true,
+ status: 'error',
+ error: {
+ message: 'Invalid TIN format',
+ },
+ },
+ });
+ render(
+
+
+
+ );
+
+ const submit_btn = screen.getByRole('button', { name: 'Submit' });
+
+ userEvent.type(screen.getByTestId('dt_place_of_birth'), 'Ghana');
+ userEvent.type(screen.getByTestId('dt_tax_residence'), 'Ghana');
+ userEvent.type(screen.getByTestId('dt_tax_identification_number'), 'GHA-00000000');
+ userEvent.type(screen.getByTestId('dt_account_opening_reason'), 'Speculative');
+
+ userEvent.click(submit_btn);
+
+ expect(mockedUseSettings).toHaveBeenCalled();
+ expect(setError).toHaveBeenCalled();
+ });
+});
diff --git a/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-modal.spec.tsx b/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-modal.spec.tsx
new file mode 100644
index 000000000000..13decd303a3c
--- /dev/null
+++ b/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-modal.spec.tsx
@@ -0,0 +1,36 @@
+import React from 'react';
+import { render, screen } from '@testing-library/react';
+import { StoreProvider, mockStore } from '@deriv/stores';
+import { AdditionalKycInfoModal } from '../additional-kyc-info-modal';
+
+jest.mock('../additional-kyc-info-form.tsx', () => jest.fn(() => AdditionalKycInfoForm
));
+
+describe('AdditionalKycInfoModal', () => {
+ let modal_root_el: HTMLElement;
+ const mock_store = mockStore({
+ ui: {
+ is_additional_kyc_info_modal_open: true,
+ toggleAdditionalKycInfoModal: jest.fn(),
+ },
+ });
+
+ beforeAll(() => {
+ modal_root_el = document.createElement('div');
+ modal_root_el.setAttribute('id', 'modal_root');
+ document.body.appendChild(modal_root_el);
+ });
+
+ afterAll(() => {
+ document.body.removeChild(modal_root_el);
+ });
+
+ it('should render the modal when is_additional_kyc_info_modal_open is true', () => {
+ render(
+
+
+
+ );
+ expect(screen.getByText(/additional information required/i)).toBeInTheDocument();
+ expect(screen.getByText(/AdditionalKycInfoForm/i)).toBeInTheDocument();
+ });
+});
diff --git a/packages/account/src/Components/additional-kyc-info-modal/__test__/form-config.spec.tsx b/packages/account/src/Components/additional-kyc-info-modal/__test__/form-config.spec.tsx
new file mode 100644
index 000000000000..015cb169b86d
--- /dev/null
+++ b/packages/account/src/Components/additional-kyc-info-modal/__test__/form-config.spec.tsx
@@ -0,0 +1,67 @@
+import { GetSettings, ResidenceList } from '@deriv/api-types';
+import { getFormFieldsConfig, getFormConfig, TFields } from '../form-config';
+
+const mockAccountSettings: GetSettings = {
+ immutable_fields: ['place_of_birth'],
+ place_of_birth: 'UK',
+ tax_residence: 'UK',
+ tax_identification_number: '12345',
+ account_opening_reason: 'Hedging',
+};
+
+const mockResidenceList: ResidenceList = [
+ { value: 'UK', text: 'United Kingdom' },
+ { value: 'US', text: 'United States' },
+];
+
+describe('getFormFieldsConfig', () => {
+ it('should return the correct form fields configuration', () => {
+ const requiredFields: TFields[] = ['place_of_birth', 'tax_residence'];
+ const config = getFormFieldsConfig(mockAccountSettings, mockResidenceList, requiredFields);
+
+ expect(config.place_of_birth.type).toBe('select');
+ expect(config.place_of_birth.initial_value).toBe('United Kingdom');
+ expect(config.place_of_birth.disabled).toBe(true);
+ expect(config.place_of_birth.required).toBe(true);
+
+ expect(config.tax_residence.type).toBe('select');
+ expect(config.tax_residence.initial_value).toBe('United Kingdom');
+ expect(config.tax_residence.disabled).toBe(false);
+ expect(config.tax_residence.required).toBe(true);
+ });
+});
+
+describe('getFormConfig', () => {
+ it('should return the correct form configuration', () => {
+ const requiredFields: TFields[] = ['place_of_birth', 'tax_residence'];
+ const formConfig = getFormConfig({
+ account_settings: mockAccountSettings,
+ residence_list: mockResidenceList,
+ required_fields: requiredFields,
+ });
+
+ expect(formConfig.fields.place_of_birth.disabled).toBe(true);
+ expect(formConfig.fields.place_of_birth.required).toBe(true);
+
+ expect(formConfig.fields.tax_residence.disabled).toBe(false);
+ expect(formConfig.fields.tax_residence.required).toBe(true);
+ });
+
+ it('should return the correct form configuration with input types', () => {
+ const requiredFields: TFields[] = ['place_of_birth', 'tax_residence'];
+ const formConfig = getFormConfig({
+ account_settings: { ...mockAccountSettings, immutable_fields: ['place_of_birth', 'tax_residence'] },
+ residence_list: mockResidenceList,
+ required_fields: requiredFields,
+ with_input_types: true,
+ });
+
+ expect(formConfig.fields.place_of_birth.type).toBe('select');
+ expect(formConfig.fields.place_of_birth.disabled).toBe(true);
+ expect(formConfig.fields.place_of_birth.required).toBe(true);
+
+ expect(formConfig.fields.tax_residence.type).toBe('select');
+ expect(formConfig.fields.tax_residence.disabled).toBe(true);
+ expect(formConfig.fields.tax_residence.required).toBe(true);
+ });
+});
diff --git a/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-form.tsx b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-form.tsx
new file mode 100644
index 000000000000..e0f4eef52830
--- /dev/null
+++ b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-form.tsx
@@ -0,0 +1,161 @@
+import { Button, Loading, Modal, Text } from '@deriv/components';
+import { isMobile } from '@deriv/shared';
+import { observer, useStore } from '@deriv/stores';
+import { Localize } from '@deriv/translations';
+import classNames from 'classnames';
+import { Form, Formik } from 'formik';
+import React from 'react';
+import { useSettings } from '@deriv/api';
+import { OECD_TIN_FORMAT_URL } from '../../Constants/external-urls';
+import FormFieldInfo from '../form-field-info';
+import { FormInputField } from '../forms/form-fields';
+import FormSelectField from '../forms/form-select-field';
+import { TListItem, getFormConfig } from './form-config';
+
+const FormTitle = () => (
+
+
+
+);
+
+type TAdditionalKycInfoFormProps = {
+ setError?: React.Dispatch>;
+};
+
+export const AdditionalKycInfoForm = observer(({ setError }: TAdditionalKycInfoFormProps) => {
+ const { client, ui, notifications } = useStore();
+ const { residence_list, updateAccountStatus } = client;
+ const {
+ update,
+ mutation: { isLoading, error, status },
+ data: account_settings,
+ isLoading: isAccountSettingsLoading,
+ } = useSettings();
+
+ const { fields, initialValues, validate } = getFormConfig({
+ account_settings,
+ residence_list,
+ required_fields: ['place_of_birth', 'account_opening_reason'],
+ });
+
+ const onSubmit = (values: typeof initialValues) => {
+ const place_of_birth = residence_list?.find(item => item.text === values.place_of_birth)?.value;
+
+ const payload: Record = {
+ place_of_birth,
+ account_opening_reason: values.account_opening_reason,
+ };
+
+ if (values.tax_identification_number) {
+ payload.tax_identification_number = values.tax_identification_number;
+ }
+
+ if (values.tax_residence) {
+ const tax_residence = residence_list?.find(item => item.text === values.tax_residence)?.value;
+ payload.tax_residence = tax_residence;
+ }
+
+ update(payload);
+ };
+
+ React.useEffect(() => {
+ if (status === 'success') {
+ updateAccountStatus();
+ notifications.refreshNotifications();
+ ui.toggleAdditionalKycInfoModal();
+ ui.toggleKycInformationSubmittedModal();
+ } else if (status === 'error') {
+ setError?.(error);
+ }
+ }, [error, notifications, setError, status, ui, updateAccountStatus]);
+
+ if (isAccountSettingsLoading) {
+ return ;
+ }
+
+ return (
+
+ {({ isValid, setFieldValue }) => (
+
+ )}
+
+ );
+});
+
+AdditionalKycInfoForm.displayName = 'AdditionalKycInfoForm';
+
+export default AdditionalKycInfoForm;
diff --git a/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.scss b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.scss
new file mode 100644
index 000000000000..873a8703237f
--- /dev/null
+++ b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.scss
@@ -0,0 +1,91 @@
+.dc-modal {
+ &__container {
+ &_additional-kyc-info {
+ &-header {
+ border-bottom: 2px solid var(--general-section-1);
+ }
+
+ &-footer {
+ padding: 1.6rem 0 0;
+ margin: unset;
+ }
+
+ .inline-message {
+ margin: 0.8rem 1.6rem;
+ width: calc(100% - 3.2rem);
+ justify-content: flex-start;
+ }
+ }
+ }
+}
+
+.additional-kyc-info-modal {
+ &__portal-header {
+ padding: 2.5rem 2rem;
+ }
+
+ &__form {
+ padding: unset;
+ height: 100%;
+ position: relative;
+
+ @include mobile {
+ width: 100%;
+ }
+
+ &--header {
+ margin: 1.6rem 0 2.4rem;
+
+ @include mobile {
+ padding: 0;
+ }
+ }
+
+ .dc-dropdown-list {
+ margin: 1rem 0;
+ }
+
+ &-layout {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+
+ &--fields {
+ display: flex;
+ flex-direction: column;
+ padding: 0 24.4rem;
+
+ @include mobile {
+ padding: 0 1.6rem;
+ }
+ }
+ }
+
+ &-field {
+ margin-bottom: 3.2rem;
+
+ &--info {
+ display: flex;
+ align-items: baseline;
+ gap: 0.8rem;
+ }
+ }
+
+ &-action {
+ padding: 1.6rem 2.4rem;
+
+ @include mobile {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ padding: 1.6rem;
+ }
+
+ .dc-btn {
+ @include mobile {
+ width: 100%;
+ }
+ }
+ }
+ }
+}
diff --git a/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.tsx b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.tsx
new file mode 100644
index 000000000000..5b3f86785759
--- /dev/null
+++ b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.tsx
@@ -0,0 +1,107 @@
+import {
+ DesktopWrapper,
+ Div100vhContainer,
+ InlineMessage,
+ MobileWrapper,
+ Modal,
+ PageOverlay,
+ Text,
+ UILoader,
+} from '@deriv/components';
+import { getPlatformSettings } from '@deriv/shared';
+import { observer, useStore } from '@deriv/stores';
+import { Localize } from '@deriv/translations';
+import React from 'react';
+import AdditionalKycInfoForm from './additional-kyc-info-form';
+
+type TAdditionalKycInfoFormWithHintBox = {
+ error?: unknown;
+ setError?: React.Dispatch>;
+};
+
+const AdditionalKycInfoFormWithHintBox = ({ error, setError }: TAdditionalKycInfoFormWithHintBox) => {
+ return (
+
+ {!!error && (
+
+ )}
+
+
+ );
+};
+
+export const AdditionalKycInfoModal = observer(() => {
+ const {
+ ui: { is_additional_kyc_info_modal_open: is_open, toggleAdditionalKycInfoModal },
+ } = useStore();
+ const [error, setError] = React.useState('');
+
+ const toggleModal = (e?: React.MouseEvent | undefined) => {
+ // if e.target is anchor tag, don't close modal for link click within modal
+ const target = e?.target as HTMLElement;
+ if (target.tagName === 'A') e?.stopPropagation();
+ toggleAdditionalKycInfoModal();
+ };
+
+ const mt5_platform_settings = getPlatformSettings('mt5');
+
+ const ModalTitle = () => (
+
+ );
+
+ return (
+ }>
+
+
+ }
+ toggleModal={toggleModal}
+ className='additional-kyc-info'
+ width='90.4rem'
+ height={error ? '54.4rem' : '49.6rem'}
+ >
+
+
+
+
+
+
+
+
+
+ }
+ onClickClose={toggleAdditionalKycInfoModal}
+ header_classname='additional-kyc-info-modal__portal-header'
+ >
+
+
+
+
+
+
+
+ );
+});
+
+AdditionalKycInfoModal.displayName = 'AdditionalKycInfoModal';
diff --git a/packages/account/src/Components/additional-kyc-info-modal/form-config.tsx b/packages/account/src/Components/additional-kyc-info-modal/form-config.tsx
new file mode 100644
index 000000000000..9b1bcd5a3c3b
--- /dev/null
+++ b/packages/account/src/Components/additional-kyc-info-modal/form-config.tsx
@@ -0,0 +1,259 @@
+import React from 'react';
+import { GetSettings, ResidenceList } from '@deriv/api-types';
+import { Localize, localize } from '@deriv/translations';
+import { generateValidationFunction } from '@deriv/shared';
+
+// Type for the list of items in a dropdown or select
+export type TListItem = {
+ /**
+ * The text of the item (e.g. 'United Kingdom', 'Germany', etc.)
+ */
+ text: string;
+ /**
+ * The value of the item
+ */
+ value: string;
+};
+
+export type TFields = 'place_of_birth' | 'tax_residence' | 'tax_identification_number' | 'account_opening_reason';
+
+type ReqRule = ['req', React.ReactNode];
+
+type LengthRule = ['length', React.ReactNode, { min: number; max: number }];
+
+type RegularRule = ['regular', React.ReactNode, { regex: RegExp }];
+
+type CustomValidator = (
+ value: string,
+ /**
+ * The options passed to the validation function
+ */
+ options: Record,
+ /**
+ * The values of all fields in the form
+ */
+ values: Record
+) => React.ReactNode;
+
+type CustomRule = [CustomValidator, React.ReactNode];
+
+type Rule = ReqRule | LengthRule | RegularRule | CustomRule;
+
+type TInputConfig = {
+ label: React.ReactNode;
+ /**
+ * The type of the input field (e.g. 'text', 'password', 'select', etc.)
+ */
+ type?: string;
+ initial_value: string;
+ required?: boolean;
+ disabled?: boolean;
+ placeholder?: string;
+ /**
+ * The list of items for the dropdown or select
+ */
+ list_items?: TListItem[];
+ /**
+ * The validation rules for the input field (e.g. 'req', 'length', 'regular', etc.)
+ */
+ rules?: Array;
+};
+
+export type TGetField = Omit & { name: string };
+
+export type TFormFieldsConfig = {
+ [key in TFields]: TInputConfig;
+};
+
+/**
+ * The base config for form fields with validation rules
+ * every field should have label, type, initial_value, disabled, required, placeholder, list_items, rules
+ *
+ * `list_items` is used for dropdowns and select
+ * @returns TFormFieldsConfig
+ */
+export const getFormFieldsConfig = (
+ account_settings: GetSettings,
+ residence_list: ResidenceList,
+ required_fields: TFields[]
+) => {
+ /**
+ * Check if the field is disabled based on the immutable_fields from API
+ */
+ const isFieldDisabled = (field: string) => account_settings?.immutable_fields?.includes(field);
+
+ /**
+ * Check if the field is required based on the required_fields array passed
+ */
+ const isFieldRequired = (field: TFields) => required_fields.includes(field);
+
+ const config: TFormFieldsConfig = {
+ place_of_birth: {
+ label: (
+
+ ),
+ type: 'select',
+ initial_value:
+ (account_settings.place_of_birth &&
+ residence_list.find(item => item.value === account_settings.place_of_birth)?.text) ??
+ '',
+ disabled: isFieldDisabled('place_of_birth'),
+ required: isFieldRequired('place_of_birth'),
+ list_items: residence_list as TListItem[],
+ rules: [['req', ]],
+ },
+ tax_residence: {
+ label: (
+
+ ),
+ type: 'select',
+ initial_value:
+ (account_settings.tax_residence &&
+ residence_list.find(item => item.value === account_settings.tax_residence)?.text) ??
+ '',
+ disabled: isFieldDisabled('tax_residence'),
+ required: isFieldRequired('tax_residence'),
+ list_items: residence_list as TListItem[],
+ rules: [],
+ },
+ tax_identification_number: {
+ label: (
+
+ ),
+ type: 'text',
+ initial_value: account_settings.tax_identification_number ?? '',
+ disabled: isFieldDisabled('tax_identification_number'),
+ required: isFieldRequired('tax_identification_number'),
+ rules: [
+ [
+ 'length',
+ ,
+ { min: 0, max: 25 },
+ ],
+ [
+ // check if the TIN value is available, then perform the regex test
+ // else return true (to pass the test)
+ // this is to allow empty string to pass the test in case of optioal TIN field
+ (value: string) => (value ? RegExp(/^(?!^$|\s+)[A-Za-z0-9./\s-]{0,25}$/).test(value) : true),
+ localize('Letters, numbers, spaces, periods, hyphens and forward slashes only.'),
+ ],
+ [
+ (value, options, { tax_residence }) => {
+ return value ? !!tax_residence : true;
+ },
+ ,
+ ],
+ [
+ (value: string, options, { tax_residence }) => {
+ const tin_format = residence_list.find(
+ res => res.text === tax_residence && res.tin_format
+ )?.tin_format;
+ return value && tin_format
+ ? tin_format.some(tax_regex => new RegExp(tax_regex).test(value))
+ : true;
+ },
+ ,
+ ],
+ ],
+ },
+ account_opening_reason: {
+ label: (
+
+ ),
+ type: 'select',
+ initial_value: account_settings.account_opening_reason ?? '',
+ disabled: isFieldDisabled('account_opening_reason'),
+ required: isFieldRequired('account_opening_reason'),
+ list_items: [
+ {
+ text: localize('Hedging'),
+ value: 'Hedging',
+ },
+ {
+ text: localize('Income Earning'),
+ value: 'Income Earning',
+ },
+ {
+ text: localize('Speculative'),
+ value: 'Speculative',
+ },
+ ],
+ rules: [
+ [
+ 'req',
+ ,
+ ],
+ ],
+ },
+ };
+ return config;
+};
+
+/**
+ * Generate initial values for form fields
+ */
+const generateInitialValues = (fields: ReturnType) => {
+ const initial_values: Record = {} as Record;
+ (Object.keys(fields) as TFields[]).forEach(field => {
+ initial_values[field] = fields[field].initial_value;
+ });
+ return initial_values;
+};
+
+/**
+ * This function is used to transform form fields config to the format that is used in Formik or Formik Field
+ */
+const getField = (fields: TFormFieldsConfig, name: TFields, with_input_types: boolean): TGetField => {
+ const { label, placeholder, required, disabled, type, list_items } = fields[name];
+
+ return {
+ name,
+ label,
+ required,
+ disabled,
+ ...(with_input_types ? { type } : {}),
+ ...(placeholder ? { placeholder } : {}),
+ ...(list_items ? { list_items } : {}),
+ };
+};
+
+/**
+ * Function to transform and return form config that can be used within the component that renders the form
+ */
+export const getFormConfig = (options: {
+ account_settings: GetSettings;
+ residence_list: ResidenceList;
+ required_fields: TFields[];
+ with_input_types?: boolean;
+}) => {
+ const { account_settings, residence_list, required_fields, with_input_types = false } = options;
+ const fields_config = getFormFieldsConfig(account_settings, residence_list, required_fields);
+ const inputs: Record = {} as Record;
+ Object.keys(fields_config).forEach(field_key => {
+ // @ts-expect-error `field_key` is always a key of `fields_config`, Hence can ignore the TS error.
+ inputs[field_key] = getField(fields_config, field_key, with_input_types);
+ });
+ return {
+ fields: inputs,
+ /** typing fields_config as any as this current config has different structure
+ * and generateValidationFunction should have generic types
+ * */
+ validate: generateValidationFunction('', fields_config as any),
+ initialValues: generateInitialValues(fields_config),
+ };
+};
diff --git a/packages/account/src/Components/additional-kyc-info-modal/index.ts b/packages/account/src/Components/additional-kyc-info-modal/index.ts
new file mode 100644
index 000000000000..8d987c7f7f09
--- /dev/null
+++ b/packages/account/src/Components/additional-kyc-info-modal/index.ts
@@ -0,0 +1,4 @@
+import { AdditionalKycInfoModal } from './additional-kyc-info-modal';
+import './additional-kyc-info-modal.scss';
+
+export default AdditionalKycInfoModal;
diff --git a/packages/account/src/Components/address-details/__tests__/address-details.spec.tsx b/packages/account/src/Components/address-details/__tests__/address-details.spec.tsx
index 96cd85212e52..abdf3767e41a 100644
--- a/packages/account/src/Components/address-details/__tests__/address-details.spec.tsx
+++ b/packages/account/src/Components/address-details/__tests__/address-details.spec.tsx
@@ -1,8 +1,11 @@
import React from 'react';
-import { FormikProps, FormikValues } from 'formik';
+import { FormikProps } from 'formik';
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
-import { isDesktop, isMobile, PlatformContext } from '@deriv/shared';
-import AddressDetails from '../address-details';
+import { useStatesList } from '@deriv/hooks';
+import { isDesktop, isMobile } from '@deriv/shared';
+import { StoreProvider, mockStore } from '@deriv/stores';
+import AddressDetails, { TAddressDetailFormProps } from '../address-details';
+import { TStores } from '@deriv/stores/types';
jest.mock('@deriv/shared', () => ({
...jest.requireActual('@deriv/shared'),
@@ -19,6 +22,11 @@ jest.mock('../../real-account-signup/helpers/utils.ts', () => ({
})),
}));
+jest.mock('@deriv/hooks', () => ({
+ ...jest.requireActual('@deriv/hooks'),
+ useStatesList: jest.fn(() => ({ data: [], isFetched: true })),
+}));
+
jest.mock('@deriv/components', () => {
const original_module = jest.requireActual('@deriv/components');
@@ -45,19 +53,16 @@ describe('', () => {
let modal_root_el: HTMLDivElement;
const mock_props: React.ComponentProps = {
- fetchStatesList: jest.fn(() => Promise.resolve([])),
getCurrentStep: jest.fn(),
goToNextStep: jest.fn(),
goToPreviousStep: jest.fn(),
- has_real_account: false,
is_gb_residence: '',
- is_svg: true,
onCancel: jest.fn(),
onSave: jest.fn(),
onSubmit: jest.fn(),
- onSubmitEnabledChange: jest.fn(),
- selected_step_ref: { current: { isSubmitting: false } } as React.RefObject>,
- states_list: [],
+ selected_step_ref: { current: { isSubmitting: false } } as React.RefObject<
+ FormikProps
+ >,
value: {
address_city: '',
address_line_1: '',
@@ -67,10 +72,12 @@ describe('', () => {
},
validate: jest.fn(),
disabled_items: [],
+ has_real_account: false,
};
+ const store = mockStore({});
+
const svgCommonRenderCheck = () => {
- expect(mock_props.onSubmitEnabledChange).toHaveBeenCalledTimes(1);
expect(screen.getByLabelText(address_line_1_marked)).toBeInTheDocument();
expect(screen.getByLabelText(address_line_2)).toBeInTheDocument();
expect(screen.getByLabelText(address_postcode)).toBeInTheDocument();
@@ -84,6 +91,14 @@ describe('', () => {
expect(screen.queryByLabelText(address_town)).not.toBeInTheDocument();
};
+ const renderComponent = ({ props = mock_props, store_config = store }) => {
+ return render(
+
+
+
+ );
+ };
+
beforeEach(() => {
(isDesktop as jest.Mock).mockReturnValue(true);
(isMobile as jest.Mock).mockReturnValue(false);
@@ -101,10 +116,15 @@ describe('', () => {
});
it('should render AddressDetails component for mobile', async () => {
- (isDesktop as jest.Mock).mockReturnValue(false);
- (isMobile as jest.Mock).mockReturnValue(true);
+ const new_store_config: TStores = {
+ ...store,
+ ui: {
+ ...store.ui,
+ is_mobile: true,
+ },
+ };
- render();
+ renderComponent({ store_config: new_store_config });
await waitFor(() => {
svgCommonRenderCheck();
@@ -117,33 +137,18 @@ describe('', () => {
expect(required_fields).toHaveLength(2);
});
- it('should call fetchResidenceList if states list is empty', async () => {
- render();
- expect(mock_props.fetchStatesList).toHaveBeenCalled();
- });
-
- it('should not call fetchResidenceList if states list is empty', async () => {
- render(
-
- );
-
- expect(mock_props.fetchStatesList).not.toHaveBeenCalled();
- expect(screen.queryByText('mockedLoading')).not.toBeInTheDocument();
- });
-
it('should show a loader when states list is not fully fetched', async () => {
- render();
+ (useStatesList as jest.Mock).mockReturnValue({
+ data: [],
+ isFetched: false,
+ });
+
+ renderComponent({});
expect(screen.getByText('mockedLoading')).toBeInTheDocument();
});
it('should render AddressDetails component and trigger buttons', async () => {
- render();
+ renderComponent({});
await waitFor(() => {
svgCommonRenderCheck();
@@ -202,80 +207,26 @@ describe('', () => {
});
});
- it('should render AddressDetails component not svg', async () => {
- mock_props.is_svg = false;
-
- render();
-
- expect(mock_props.onSubmitEnabledChange).toHaveBeenCalledTimes(1);
-
- const inputs: HTMLTextAreaElement[] = screen.getAllByRole('textbox');
- expect(inputs).toHaveLength(5);
- const required_fields = inputs.filter(input => input.required === true);
- expect(required_fields).toHaveLength(0);
-
- await waitFor(() => {
- expect(screen.getByLabelText(address_line_1)).toBeInTheDocument();
- expect(screen.getByLabelText(address_line_2)).toBeInTheDocument();
- expect(screen.getByLabelText(address_postcode)).toBeInTheDocument();
- expect(screen.getByLabelText(address_state)).toBeInTheDocument();
- expect(screen.getByLabelText(address_town)).toBeInTheDocument();
- expect(screen.getByText(use_address_info)).toBeInTheDocument();
- });
-
- expect(screen.queryByText(address_line_1_marked)).not.toBeInTheDocument();
- expect(screen.queryByText(address_line_2_marked)).not.toBeInTheDocument();
- expect(screen.queryByText(address_postcode_marked)).not.toBeInTheDocument();
- expect(screen.queryByText(address_town_marked)).not.toBeInTheDocument();
- expect(screen.queryByText(verification_info)).not.toBeInTheDocument();
- });
-
- it('should render AddressDetails component for appstore', async () => {
- render(
-
-
-
- );
-
- expect(mock_props.onSubmitEnabledChange).toHaveBeenCalledTimes(1);
- await waitFor(() => {
- expect(screen.getByText(verification_info)).toBeInTheDocument();
- });
- expect(screen.queryByText(use_address_info)).not.toBeInTheDocument();
-
- const inputs: HTMLTextAreaElement[] = screen.getAllByRole('textbox');
- expect(inputs).toHaveLength(5);
-
- const required_fields = inputs.filter(input => input.required === true);
- expect(required_fields).toHaveLength(4);
-
- expect(screen.getByLabelText(address_line_1_marked)).toBeInTheDocument();
- expect(screen.getByLabelText(address_line_2_marked)).toBeInTheDocument();
- expect(screen.getByLabelText(address_postcode_marked)).toBeInTheDocument();
- expect(screen.getByLabelText(address_state)).toBeInTheDocument();
- expect(screen.getByLabelText(address_town_marked)).toBeInTheDocument();
- expect(screen.getByText(verification_info)).toBeInTheDocument();
-
- expect(screen.queryByText(address_line_1)).not.toBeInTheDocument();
- expect(screen.queryByText(address_line_2)).not.toBeInTheDocument();
- expect(screen.queryByText(address_postcode)).not.toBeInTheDocument();
- expect(screen.queryByText(address_town)).not.toBeInTheDocument();
- expect(screen.queryByText(use_address_info)).not.toBeInTheDocument();
- });
-
it('should render AddressDetails component with states_list for mobile', async () => {
(isDesktop as jest.Mock).mockReturnValue(false);
(isMobile as jest.Mock).mockReturnValue(true);
-
- mock_props.states_list = [
- { text: 'State 1', value: 'State 1' },
- { text: 'State 2', value: 'State 2' },
- ];
-
- render();
+ (useStatesList as jest.Mock).mockReturnValue({
+ data: [
+ { text: 'State 1', value: 'State 1' },
+ { text: 'State 2', value: 'State 2' },
+ ],
+ isFetched: true,
+ });
+ const new_store_config: TStores = {
+ ...store,
+ ui: {
+ ...store.ui,
+ is_mobile: true,
+ },
+ };
+ renderComponent({ store_config: new_store_config });
expect(screen.getByText('Default test state')).toBeInTheDocument();
-
const address_state_input: HTMLInputElement = screen.getByRole('combobox');
expect(address_state_input.value).toBe('');
fireEvent.change(address_state_input, { target: { value: 'State 2' } });
@@ -285,12 +236,14 @@ describe('', () => {
});
it('should render AddressDetails component with states_list for desktop', async () => {
- mock_props.states_list = [
- { text: 'State 1', value: 'State 1' },
- { text: 'State 2', value: 'State 2' },
- ];
-
- render();
+ (useStatesList as jest.Mock).mockReturnValue({
+ data: [
+ { text: 'State 1', value: 'State 1' },
+ { text: 'State 2', value: 'State 2' },
+ ],
+ isFetched: true,
+ });
+ renderComponent({});
const address_state_input: HTMLTextAreaElement = screen.getByRole('textbox', { name: 'State/Province' });
expect(address_state_input).toHaveValue('Default test state');
@@ -300,18 +253,21 @@ describe('', () => {
});
});
- it('should disable the field if it is immuatble from BE', async () => {
- mock_props.disabled_items = ['address_line_1', 'address_line_2'];
- mock_props.value.address_state = '';
+ it('should disable the field if it is immutable from BE', async () => {
+ const new_props: React.ComponentProps = {
+ ...mock_props,
+ disabled_items: ['address_line_1', 'address_line_2'],
+ value: { ...mock_props.value, address_state: '' },
+ };
- render();
+ renderComponent({ props: new_props });
- expect(screen.getByLabelText(address_line_1)).toBeDisabled();
+ expect(screen.getByLabelText(address_line_1_marked)).toBeDisabled();
expect(screen.getByLabelText(address_line_2)).toBeDisabled();
await waitFor(() => {
expect(screen.getByRole('textbox', { name: 'State/Province' })).toBeEnabled();
});
- expect(screen.getByLabelText(address_town)).toBeEnabled();
+ expect(screen.getByLabelText(address_town_marked)).toBeEnabled();
expect(screen.getByLabelText(address_postcode)).toBeEnabled();
});
});
diff --git a/packages/account/src/Components/address-details/address-details.tsx b/packages/account/src/Components/address-details/address-details.tsx
index 0125c81be508..07a71265283a 100644
--- a/packages/account/src/Components/address-details/address-details.tsx
+++ b/packages/account/src/Components/address-details/address-details.tsx
@@ -1,58 +1,63 @@
import React from 'react';
-import { Formik, Field, FormikProps, FormikValues } from 'formik';
+import classNames from 'classnames';
+import {
+ Formik,
+ Field,
+ FormikProps,
+ FormikValues,
+ FormikErrors,
+ FormikHelpers,
+ FormikHandlers,
+ FormikState,
+} from 'formik';
import { StatesList } from '@deriv/api-types';
import {
- Modal,
Autocomplete,
AutoHeightWrapper,
DesktopWrapper,
Div100vhContainer,
FormSubmitButton,
- Input,
Loading,
MobileWrapper,
- ThemedScrollbars,
+ Modal,
SelectNative,
Text,
+ ThemedScrollbars,
} from '@deriv/components';
+import { useStatesList } from '@deriv/hooks';
+import { getLocation } from '@deriv/shared';
+import { observer, useStore } from '@deriv/stores';
import { localize, Localize } from '@deriv/translations';
-import { isDesktop, isMobile, getLocation, makeCancellablePromise, PlatformContext } from '@deriv/shared';
+import { FormInputField } from '../forms/form-fields';
import { splitValidationResultTypes } from '../real-account-signup/helpers/utils';
-import classNames from 'classnames';
+
+export type TAddressDetailFormProps = {
+ address_line_1: string;
+ address_line_2?: string;
+ address_city: string;
+ address_state?: string;
+ address_postcode?: string;
+};
type TAddressDetails = {
disabled_items: string[];
states_list: StatesList;
getCurrentStep?: () => number;
- onSave: (current_step: number, values: FormikValues) => void;
+ onSave: (current_step: number, values: TAddressDetailFormProps) => void;
onCancel: (current_step: number, goToPreviousStep: () => void) => void;
goToNextStep: () => void;
goToPreviousStep: () => void;
- validate: (values: FormikValues) => FormikValues;
+ validate: (values: TAddressDetailFormProps) => TAddressDetailFormProps;
onSubmit: (
current_step: number | null,
- values: FormikValues,
+ values: TAddressDetailFormProps,
action: (isSubmitting: boolean) => void,
next_step: () => void
) => void;
- is_svg: boolean;
- is_mf?: boolean;
is_gb_residence: boolean | string;
+ selected_step_ref?: React.RefObject>;
+ value: TAddressDetailFormProps;
has_real_account: boolean;
- onSubmitEnabledChange: (is_submit_disabled: boolean) => void;
- selected_step_ref?: React.RefObject>;
- fetchStatesList: () => Promise;
- value: FormikValues;
-};
-
-type TInputField = {
- name: string;
- required?: boolean | string;
- label: string;
- maxLength?: number | string;
- placeholder: string;
- onChange?: (e: any) => void;
- disabled?: string;
};
type TAutoComplete = {
@@ -60,122 +65,104 @@ type TAutoComplete = {
text: string;
};
-const InputField = (props: TInputField) => {
- return (
-
- {({ field, form: { errors, touched } }: FormikValues) => (
-
-
-
- )}
-
- );
-};
-
-const AddressDetails = ({
- states_list,
- getCurrentStep,
- onSave,
- onCancel,
- goToNextStep,
- goToPreviousStep,
- validate,
- onSubmit,
- is_svg,
- is_mf,
- is_gb_residence,
- onSubmitEnabledChange,
- selected_step_ref,
- disabled_items,
- has_real_account,
- ...props
-}: TAddressDetails) => {
- const { is_appstore } = React.useContext(PlatformContext);
- const [has_fetched_states_list, setHasFetchedStatesList] = React.useState(false);
- const [address_state_to_display, setAddressStateToDisplay] = React.useState('');
+/**
+ * Component to display address details form
+ * @name AddressDetails
+ * @param getCurrentStep - function to get current step
+ * @param states_list - array of states for the selected residence country
+ * @param onSave - function to save form values
+ * @param onCancel - function to cancel form values
+ * @param goToNextStep - function to go to next step
+ * @param goToPreviousStep - function to go to previous step
+ * @param validate - function to validate form values
+ * @param onSubmit - function to submit form values
+ * @param is_gb_residence - is residence Great Britan
+ * @param selected_step_ref - reference to selected step
+ * @param value - form values
+ * @param disabled_items - array of disabled fields
+ * @param has_real_account - has real account
+ * @returns react node
+ */
+const AddressDetails = observer(
+ ({
+ getCurrentStep,
+ onSave,
+ onCancel,
+ goToNextStep,
+ goToPreviousStep,
+ validate,
+ onSubmit,
+ is_gb_residence,
+ selected_step_ref,
+ disabled_items,
+ has_real_account,
+ ...props
+ }: TAddressDetails) => {
+ const [address_state_to_display, setAddressStateToDisplay] = React.useState('');
- React.useEffect(() => {
- let cancelFn: (() => void) | undefined;
- if (states_list.length) {
- setHasFetchedStatesList(true);
- } else {
- const { cancel, promise } = makeCancellablePromise(props.fetchStatesList());
- cancelFn = cancel;
- promise.then(() => {
- setHasFetchedStatesList(true);
- if (props.value?.address_state) {
- setAddressStateToDisplay(getLocation(states_list, props.value?.address_state, 'text'));
- }
- });
- }
- return () => {
- setHasFetchedStatesList(false);
- if (cancelFn) {
- cancelFn();
- }
- };
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
+ const {
+ ui,
+ client: { residence },
+ } = useStore();
- const is_submit_disabled_ref = React.useRef(true);
+ const { is_desktop, is_mobile } = ui;
+ const { data: states_list, isFetched } = useStatesList(residence);
- const isSubmitDisabled = (errors?: { [key: string]: string } | FormikValues) => {
- return selected_step_ref?.current?.isSubmitting || (errors && Object.keys(errors).length > 0);
- };
-
- const checkSubmitStatus = (errors?: { [key: string]: string } | FormikValues) => {
- const is_submit_disabled = isSubmitDisabled(errors);
+ const isSubmitDisabled = (errors: FormikErrors = {}): boolean => {
+ const is_submitting = selected_step_ref?.current?.isSubmitting ?? false;
+ return is_submitting || Object.keys(errors).length > 0;
+ };
- if (is_submit_disabled_ref.current !== is_submit_disabled) {
- is_submit_disabled_ref.current = is_submit_disabled;
- onSubmitEnabledChange?.(!is_submit_disabled);
- }
- };
+ const handleCancel = (values: TAddressDetailFormProps) => {
+ const current_step = (getCurrentStep?.() || 1) - 1;
+ onSave(current_step, values);
+ onCancel(current_step, goToPreviousStep);
+ };
- const handleCancel = (values: FormikValues) => {
- const current_step = (getCurrentStep?.() || 1) - 1;
- onSave(current_step, values);
- onCancel(current_step, goToPreviousStep);
- };
+ const handleValidate = (values: TAddressDetailFormProps) => {
+ const { errors } = splitValidationResultTypes(validate(values));
+ return errors;
+ };
- const handleValidate = (values: FormikValues) => {
- const { errors } = splitValidationResultTypes(validate(values));
- checkSubmitStatus(errors);
- return errors;
- };
+ const handleSubmitData = (values: TAddressDetailFormProps, actions: FormikHelpers) => {
+ if (values.address_state && states_list.length) {
+ values.address_state = address_state_to_display
+ ? getLocation(states_list, address_state_to_display, 'value')
+ : getLocation(states_list, values.address_state, 'value');
+ }
+ onSubmit((getCurrentStep?.() || 1) - 1, values, actions.setSubmitting, goToNextStep);
+ };
- return (
- {
- if (values.address_state && states_list.length) {
- values.address_state = address_state_to_display
- ? getLocation(states_list, address_state_to_display, 'value')
- : getLocation(states_list, values.address_state, 'value');
- }
- onSubmit((getCurrentStep?.() || 1) - 1, values, actions.setSubmitting, goToNextStep);
- }}
- >
- {({ handleSubmit, errors, values, setFieldValue, handleChange, setFieldTouched }: FormikValues) => (
-
- {({ setRef, height }: { setRef: (instance: HTMLFormElement) => void; height: number | string }) => (
-
+ )}
+
+ )}
+
+ );
+ }
+);
export default CurrencySelector;
diff --git a/packages/account/src/Components/currency-selector/index.js b/packages/account/src/Components/currency-selector/index.ts
similarity index 100%
rename from packages/account/src/Components/currency-selector/index.js
rename to packages/account/src/Components/currency-selector/index.ts
diff --git a/packages/account/src/Components/currency-selector/radio-button-group.tsx b/packages/account/src/Components/currency-selector/radio-button-group.tsx
index 31ae2ab10ead..239c7b4000ad 100644
--- a/packages/account/src/Components/currency-selector/radio-button-group.tsx
+++ b/packages/account/src/Components/currency-selector/radio-button-group.tsx
@@ -13,10 +13,22 @@ export type TRadioButtonGroup = {
has_fiat?: boolean;
};
+/**
+ * Wrapper component for RadioButton
+ * @name RadioButtonGroup
+ * @param {string} className - class name for styling
+ * @param {boolean} is_fiat - is fiat currency
+ * @param {boolean} is_title_enabled - is title enabled
+ * @param {number} item_count - number of items
+ * @param {string} label - label for the radio button
+ * @param {React.ReactNode} description - description for the radio button
+ * @param {boolean} has_fiat - has fiat currency
+ * @returns {React.ReactNode} - returns a React node
+ */
const RadioButtonGroup = ({
+ children,
label,
className,
- children,
is_title_enabled = true,
is_fiat,
item_count,
diff --git a/packages/account/src/Components/currency-selector/radio-button.tsx b/packages/account/src/Components/currency-selector/radio-button.tsx
index 903646d0dfe4..ccc2fd2110a0 100644
--- a/packages/account/src/Components/currency-selector/radio-button.tsx
+++ b/packages/account/src/Components/currency-selector/radio-button.tsx
@@ -1,60 +1,32 @@
-import React, { InputHTMLAttributes, AllHTMLAttributes, ReactElement } from 'react';
+import React, { AllHTMLAttributes } from 'react';
import classNames from 'classnames';
-import { Localize } from '@deriv/translations';
-import { Popover, Icon } from '@deriv/components';
+import { Icon } from '@deriv/components';
import { getCurrencyDisplayCode } from '@deriv/shared';
-
-export type TUSTPopover = {
- id: string;
-};
+import USTPopover from './ust-popover';
type TRadioButtonExtend = {
- field: InputHTMLAttributes;
+ field: React.InputHTMLAttributes;
icon?: string;
second_line_label?: string;
+ id: string;
+ label: string;
+ onClick?: (e: React.MouseEvent) => void;
};
export type TRadioButton = AllHTMLAttributes & TRadioButtonExtend;
-const USTPopover = ({ id }: TUSTPopover) => {
- let popover_message: ReactElement | undefined;
- if (/^UST$/i.test(id)) {
- popover_message = (
- ]}
- />
- );
- } else if (/^tUSDT$/i.test(id)) {
- popover_message = (
-
- );
- } else {
- popover_message = (
-
- );
- }
-
- return (
-
- );
-};
+/**
+ * RadioButton component to select currency
+ * @name RadioButton
+ * @param {React.InputHTMLAttributes} field - field props given by Formik
+ * @param {string} icon - icon name
+ * @param {string} id - currency id
+ * @param {string} label - currency name
+ * @param {string} second_line_label - currency code
+ * @param {Function} onClick - function to be called on click
+ * @param {AllHTMLAttributes} props - other props to be passed
+ * @returns {React.ReactNode} - returns a React node
+ */
const RadioButton = ({
field: { name, value, onChange, onBlur },
diff --git a/packages/account/src/Components/currency-selector/ust-popover.tsx b/packages/account/src/Components/currency-selector/ust-popover.tsx
new file mode 100644
index 000000000000..0a7f2443b676
--- /dev/null
+++ b/packages/account/src/Components/currency-selector/ust-popover.tsx
@@ -0,0 +1,49 @@
+import React from 'react';
+import { Popover } from '@deriv/components';
+import { Localize } from '@deriv/translations';
+
+export type TUSTPopover = {
+ id: string;
+};
+
+const USTPopover = ({ id }: TUSTPopover) => {
+ let popover_message: React.ReactElement;
+ if (/^UST$/i.test(id)) {
+ popover_message = (
+ ]}
+ />
+ );
+ } else if (/^tUSDT$/i.test(id)) {
+ popover_message = (
+
+ );
+ } else {
+ popover_message = (
+
+ );
+ }
+
+ return (
+
+ );
+};
+
+export default USTPopover;
diff --git a/packages/account/src/Components/financial-details/__tests__/financial-details.spec.tsx b/packages/account/src/Components/financial-details/__tests__/financial-details.spec.tsx
index 0096dd892061..b7683eef5b7f 100644
--- a/packages/account/src/Components/financial-details/__tests__/financial-details.spec.tsx
+++ b/packages/account/src/Components/financial-details/__tests__/financial-details.spec.tsx
@@ -1,8 +1,9 @@
+import { FormikValues } from 'formik';
import React from 'react';
-import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import { isDesktop, isMobile } from '@deriv/shared';
-import FinancialDetails, { TFinancialInformationAndTradingExperience, TFinancialDetails } from '../financial-details';
-import { FormikValues } from 'formik';
+import { fireEvent, render, screen, waitFor } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import FinancialDetails from '../financial-details';
jest.mock('@deriv/shared', () => ({
...jest.requireActual('@deriv/shared'),
@@ -14,48 +15,8 @@ const modal_root_el = document.createElement('div');
modal_root_el.setAttribute('id', 'modal_root');
document.body.appendChild(modal_root_el);
-const fields_enums: TFinancialInformationAndTradingExperience = {
- account_turnover_enum: [
- { value: 'account turnover 1', text: 'account turnover 1' },
- { value: 'account turnover 2', text: 'account turnover 2' },
- ],
- education_level_enum: [
- { value: 'education level 1', text: 'education level 1' },
- { value: 'education level 2', text: 'education level 2' },
- ],
- employment_industry_enum: [
- { value: 'employment industry 1', text: 'employment industry 1' },
- { value: 'employment industry 2', text: 'employment industry 2' },
- ],
- estimated_worth_enum: [
- { value: 'estimated worth 1', text: 'estimated worth 1' },
- { value: 'estimated worth 2', text: 'estimated worth 2' },
- ],
- income_source_enum: [
- { value: 'income source 1', text: 'income source 1' },
- { value: 'income source 2', text: 'income source 2' },
- ],
- net_income_enum: [
- { value: 'net income 1', text: 'net income 1' },
- { value: 'net income 2', text: 'net income 2' },
- ],
- occupation_enum: [
- { value: 'occupation 1', text: 'occupation 1' },
- { value: 'occupation 2', text: 'occupation 2' },
- ],
-
- source_of_wealth_enum: [
- { value: 'source of wealth 1', text: 'source of wealth 1' },
- { value: 'source of wealth 2', text: 'source of wealth 2' },
- ],
- employment_status_enum: [
- { value: 'employment status 1', text: 'employment status 1' },
- { value: 'employment status 2', text: 'employment status 2' },
- ],
-};
-
describe('', () => {
- let mock_props: TFinancialDetails & TFinancialInformationAndTradingExperience = {
+ const mock_props: React.ComponentProps = {
getCurrentStep: jest.fn(),
goToNextStep: jest.fn(),
onCancel: jest.fn(),
@@ -64,32 +25,8 @@ describe('', () => {
validate: jest.fn(() => ({ errors: {} })),
goToPreviousStep: jest.fn(() => ({ errors: {} })),
value: {},
- income_source_enum: [{}],
- employment_status_enum: [{}],
- employment_industry_enum: [{}],
- occupation_enum: [{}],
- source_of_wealth_enum: [{}],
- education_level_enum: [{}],
- net_income_enum: [{}],
- estimated_worth_enum: [{}],
- account_turnover_enum: [{}],
- forex_trading_experience_enum: [{}],
- forex_trading_frequency_enum: [{}],
- binary_options_trading_experience_enum: [{}],
- binary_options_trading_frequency_enum: [{}],
- cfd_trading_experience_enum: [{}],
- cfd_trading_frequency_enum: [{}],
- other_instruments_trading_experience_enum: [{}],
- other_instruments_trading_frequency_enum: [{}],
};
- beforeEach(() => {
- mock_props = {
- ...mock_props,
- ...fields_enums,
- };
- });
-
const fieldsRenderCheck = () => {
expect(screen.getByText('Anticipated annual turnover')).toBeInTheDocument();
expect(screen.getByText('Estimated net worth')).toBeInTheDocument();
@@ -107,7 +44,7 @@ describe('', () => {
fieldsRenderCheck();
const inputs = screen.getAllByTestId('dti_dropdown_display');
- expect(inputs.length).toBe(8);
+ expect(inputs).toHaveLength(8);
expect(screen.getByText('Next')).toBeInTheDocument();
expect(screen.getByText('Previous')).toBeInTheDocument();
@@ -122,7 +59,7 @@ describe('', () => {
fieldsRenderCheck();
const inputs = screen.getAllByRole('combobox');
- expect(inputs.length).toBe(8);
+ expect(inputs).toHaveLength(8);
expect(screen.getByText('Next')).toBeInTheDocument();
expect(screen.getByText('Previous')).toBeInTheDocument();
@@ -185,4 +122,19 @@ describe('', () => {
expect(mock_props.onSubmit).toHaveBeenCalledTimes(1);
});
});
+
+ it('should change the selected value when user changes the value in the dropdown', () => {
+ (isDesktop as jest.Mock).mockReturnValue(false);
+ (isMobile as jest.Mock).mockReturnValue(true);
+
+ render();
+
+ const select_inputs = screen.getAllByRole('combobox');
+
+ const income_source_select = select_inputs.find((option: FormikValues) => option.name === 'income_source');
+
+ userEvent.selectOptions(income_source_select as HTMLElement, 'Salaried Employee');
+
+ expect(screen.getByRole('option', { name: 'Salaried Employee' }).selected).toBe(true);
+ });
});
diff --git a/packages/account/src/Components/financial-details/financial-details-partials.tsx b/packages/account/src/Components/financial-details/financial-details-partials.tsx
index 37bfc4a8e149..1887f19849d0 100644
--- a/packages/account/src/Components/financial-details/financial-details-partials.tsx
+++ b/packages/account/src/Components/financial-details/financial-details-partials.tsx
@@ -1,966 +1,135 @@
-import { Field, FormikProps, FormikValues } from 'formik';
+import { Field, FormikValues, useFormikContext } from 'formik';
import React from 'react';
import { DesktopWrapper, MobileWrapper, Dropdown, SelectNative } from '@deriv/components';
import { localize } from '@deriv/translations';
-
-type TEmploymentStatus = {
- employment_status_enum: object[];
-};
-
-export const EmploymentStatus = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- employment_status_enum,
-}: Partial> & TEmploymentStatus) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('employment_status', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TIncomeSource = {
- income_source_enum: object[];
-};
-
-export const IncomeSource = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- income_source_enum,
-}: Partial> & TIncomeSource) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('income_source', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TEmploymentIndustry = {
- employment_industry_enum: object[];
-};
-
-export const EmploymentIndustry = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- employment_industry_enum,
-}: Partial> & TEmploymentIndustry) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('employment_industry', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TOccupation = {
- occupation_enum: object[];
-};
-
-export const Occupation = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- occupation_enum,
-}: Partial> & TOccupation) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('occupation', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TSourceOfWealth = {
- source_of_wealth_enum: object[];
-};
-
-export const SourceOfWealth = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- source_of_wealth_enum,
-}: Partial> & TSourceOfWealth) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('source_of_wealth', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TEducationLevel = {
- education_level_enum: object[];
-};
-
-export const EducationLevel = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- education_level_enum,
-}: Partial> & TEducationLevel) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('education_level', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TNetIncome = {
- net_income_enum: object[];
-};
-
-export const NetIncome = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- net_income_enum,
-}: Partial> & TNetIncome) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('net_income', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TEstimatedWorth = {
- estimated_worth_enum: object[];
-};
-
-export const EstimatedWorth = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- estimated_worth_enum,
-}: Partial> & TEstimatedWorth) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('estimated_worth', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TAccountTurnover = {
- account_turnover_enum: object[];
-};
-
-export const AccountTurnover = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- account_turnover_enum,
-}: Partial> & TAccountTurnover) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('account_turnover', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TForexTradingExperience = {
- forex_trading_experience_enum?: object[];
-};
-
-export const ForexTradingExperience = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- forex_trading_experience_enum,
-}: Partial> & TForexTradingExperience) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('forex_trading_experience', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TForexTradingFrequency = {
- forex_trading_frequency_enum?: object[];
-};
-
-export const ForexTradingFrequency = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- forex_trading_frequency_enum,
-}: Partial> & TForexTradingFrequency) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('forex_trading_frequency', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TBinaryOptionsTradingExperience = {
- binary_options_trading_experience_enum?: object[];
-};
-
-export const BinaryOptionsTradingExperience = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- binary_options_trading_experience_enum,
-}: Partial> & TBinaryOptionsTradingExperience) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('binary_options_trading_experience', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TBinaryOptionsTradingFrequency = {
- binary_options_trading_frequency_enum?: object[];
-};
-
-export const BinaryOptionsTradingFrequency = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- binary_options_trading_frequency_enum,
-}: Partial> & TBinaryOptionsTradingFrequency) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('binary_options_trading_frequency', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TCFDTradingExperience = {
- cfd_trading_experience_enum?: object[];
-};
-
-export const CFDTradingExperience = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- cfd_trading_experience_enum,
-}: Partial> & TCFDTradingExperience) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('cfd_trading_experience', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TCFDTradingFrequency = {
- cfd_trading_frequency_enum?: object[];
-};
-
-export const CFDTradingFrequency = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- cfd_trading_frequency_enum,
-}: Partial> & TCFDTradingFrequency) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('cfd_trading_frequency', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TOtherInstrumentsTradingExperience = {
- other_instruments_trading_experience_enum?: object[];
-};
-
-export const OtherInstrumentsTradingExperience = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- other_instruments_trading_experience_enum,
-}: Partial> & TOtherInstrumentsTradingExperience) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('other_instruments_trading_experience', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
-
-type TOtherInstrumentsTradingFrequency = {
- other_instruments_trading_frequency_enum?: object[];
-};
-
-export const OtherInstrumentsTradingFrequency = ({
- values,
- handleChange,
- handleBlur,
- touched,
- errors,
- setFieldValue,
- other_instruments_trading_frequency_enum,
-}: Partial> & TOtherInstrumentsTradingFrequency) => (
-
- {({ field }: FormikValues) => (
-
-
-
-
-
- ) => {
- if (typeof handleChange === 'function') {
- handleChange(e);
- }
- if (typeof setFieldValue === 'function') {
- setFieldValue('other_instruments_trading_frequency', e.target.value, true);
- }
- }}
- {...field}
- required
- />
-
-
- )}
-
-);
+import {
+ getAccountTurnoverList,
+ getEducationLevelList,
+ getEmploymentIndustryList,
+ getEstimatedWorthList,
+ getIncomeSourceList,
+ getNetIncomeList,
+ getOccupationList,
+ getSourceOfWealthList,
+} from 'Configs/financial-details-config';
+
+type TFinancialDetailsDropdownFieldProps = {
+ dropdown_list: Array