datakeen-session-react 1.1.11 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +156 -55
- package/dist/index.d.ts +19 -2
- package/dist/index.js +61 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +33 -17723
- package/dist/index.mjs.map +1 -1
- package/package.json +35 -37
- package/postcss.config.js +6 -0
- package/rollup.dev.config.js +55 -0
- package/tailwind.config.js +9 -0
- package/dist/assets/index.d.ts +0 -6
- package/dist/components/DatakeenSession.d.ts +0 -21
- package/dist/components/icons/PoweredByIcon.d.ts +0 -5
- package/dist/components/icons/StartIcon.d.ts +0 -5
- package/dist/components/id-check/BeforePhoto.d.ts +0 -5
- package/dist/components/id-check/BeforeVersoPhoto.d.ts +0 -5
- package/dist/components/id-check/CameraError.d.ts +0 -7
- package/dist/components/id-check/CameraMask.d.ts +0 -9
- package/dist/components/id-check/OrientationToggle.d.ts +0 -6
- package/dist/components/id-check/Photo.d.ts +0 -5
- package/dist/components/id-check/PhotoConfirmation.d.ts +0 -13
- package/dist/components/id-check/PhotoProcessingLoader.d.ts +0 -11
- package/dist/components/jdi/JDIDocumentSelection.d.ts +0 -8
- package/dist/components/jdi/JDIDocumentUpload.d.ts +0 -9
- package/dist/components/jdi/JDIError.d.ts +0 -7
- package/dist/components/jdi/JDIIntroduction.d.ts +0 -8
- package/dist/components/jdi/JDIPreIntroduction.d.ts +0 -7
- package/dist/components/jdi/JDIProcessing.d.ts +0 -9
- package/dist/components/jdi/JDISuccess.d.ts +0 -6
- package/dist/components/selfie/SelfieConfirmation.d.ts +0 -8
- package/dist/components/selfie/Video.d.ts +0 -8
- package/dist/components/selfie/VideoResetStyles.d.ts +0 -6
- package/dist/components/selfie/hooks/useVideoRecorderStyles.d.ts +0 -6
- package/dist/components/selfie/selfie-flow/InstructionsSelfie.d.ts +0 -6
- package/dist/components/selfie/selfie-flow/SelfieFlow.d.ts +0 -6
- package/dist/components/selfie/selfie-flow/SelfiePreIntroduction.d.ts +0 -6
- package/dist/components/selfie/selfie-flow/SelfieRecorder.d.ts +0 -7
- package/dist/components/selfie/utils/videoElementStyles.d.ts +0 -14
- package/dist/components/session/ChooseCountryJDI.d.ts +0 -48
- package/dist/components/session/ContactInfoForm.d.ts +0 -3
- package/dist/components/session/DocumentCheck.d.ts +0 -13
- package/dist/components/session/EndFlow.d.ts +0 -21
- package/dist/components/session/EndSession.d.ts +0 -0
- package/dist/components/session/IDCheck.d.ts +0 -8
- package/dist/components/session/JDICheck.d.ts +0 -9
- package/dist/components/session/MobileRedirect.d.ts +0 -8
- package/dist/components/session/OTPVerification.d.ts +0 -12
- package/dist/components/session/Selfie.d.ts +0 -9
- package/dist/components/session/SessionExpired.d.ts +0 -11
- package/dist/components/session/StartSession.d.ts +0 -5
- package/dist/components/session/UserInputForm.d.ts +0 -3
- package/dist/components/start-flow/CGU.d.ts +0 -4
- package/dist/components/start-flow/Start.d.ts +0 -4
- package/dist/components/ui/Body.d.ts +0 -5
- package/dist/components/ui/Button.d.ts +0 -21
- package/dist/components/ui/ButtonDesktop.d.ts +0 -9
- package/dist/components/ui/Camera.d.ts +0 -0
- package/dist/components/ui/Card.d.ts +0 -9
- package/dist/components/ui/OTPInput.d.ts +0 -11
- package/dist/components/ui/Paper.d.ts +0 -7
- package/dist/components/ui/PoweredBy.d.ts +0 -5
- package/dist/components/ui/QRCodeDisplay.d.ts +0 -10
- package/dist/components/ui/Select.d.ts +0 -3
- package/dist/components/ui/SelectComponent.d.ts +0 -16
- package/dist/components/ui/SelectDrawer.d.ts +0 -12
- package/dist/components/ui/Subtitle.d.ts +0 -5
- package/dist/components/ui/Title.d.ts +0 -5
- package/dist/config/env.d.ts +0 -5
- package/dist/context/DocumentContext.d.ts +0 -13
- package/dist/hooks/useIsMobile.d.ts +0 -2
- package/dist/hooks/useSession.d.ts +0 -9
- package/dist/index.css +0 -1
- package/dist/services/analysis.d.ts +0 -2
- package/dist/services/api.d.ts +0 -38
- package/dist/services/cameraService.d.ts +0 -17
- package/dist/services/documentDetectionService.d.ts +0 -14
- package/dist/services/documentService.d.ts +0 -0
- package/dist/services/sessionService.d.ts +0 -254
- package/dist/services/utils.d.ts +0 -3
- package/dist/types/camera.d.ts +0 -16
- package/dist/types/contactInfo.d.ts +0 -12
- package/dist/types/selfie.d.ts +0 -4
- package/dist/types/session.d.ts +0 -21
- package/dist/types/ui/select.d.ts +0 -11
- package/dist/types/uploadFiles.d.ts +0 -4
- package/dist/types/userInput.d.ts +0 -26
- package/dist/utils/chooseDocuments/frenchDocumentTypes.d.ts +0 -9
- package/dist/utils/chooseDocuments/spanishDocumentTypes.d.ts +0 -9
- package/dist/utils/jdiCountry.d.ts +0 -10
- package/dist/utils/languages.d.ts +0 -4
- package/dist/utils/mimeTypes.d.ts +0 -1
- package/dist/utils/stepsAnalysis.d.ts +0 -18
- package/dist/utils/utils.d.ts +0 -5
- package/vite.config.mts +0 -51
package/package.json
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datakeen-session-react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.21",
|
|
4
4
|
"description": "React SDK component to manage and render Datakeen session experiences easily.",
|
|
5
|
-
"main": "dist/index.
|
|
5
|
+
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "rollup -c --bundleConfigAsCjs",
|
|
10
|
+
"build:watch": "rollup -c --bundleConfigAsCjs --watch",
|
|
11
|
+
"dev": "rollup -c rollup.dev.config.js --bundleConfigAsCjs --watch",
|
|
12
|
+
"lint": "eslint . --ext .ts,.tsx",
|
|
13
|
+
"test": "jest",
|
|
14
|
+
"demo": "cd ../demo && npm run dev",
|
|
15
|
+
"dev:full": "concurrently \"npm run dev\" \"npm run demo\"",
|
|
16
|
+
"clean": "rm -rf dist",
|
|
17
|
+
"setup:env": "echo 'VITE_API_BASE_URL=http://localhost:8888' > .env && echo 'VITE_API_BASE_URL=http://localhost:8888' > ../demo/.env && echo 'Environment files created successfully'",
|
|
18
|
+
"build:test": "npm run build && cp -r dist example/node_modules/datakeen-session-react/"
|
|
19
|
+
},
|
|
8
20
|
"keywords": [
|
|
9
21
|
"datakeen",
|
|
10
22
|
"session",
|
|
@@ -22,19 +34,20 @@
|
|
|
22
34
|
"url": "https://gitlab.com/datakeenteam/teamfullstack/client-sessions-react-sdk.git"
|
|
23
35
|
},
|
|
24
36
|
"homepage": "https://www.datakeen.co/",
|
|
37
|
+
"packageManager": "pnpm@10.9.0",
|
|
25
38
|
"devDependencies": {
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
39
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
40
|
+
"@rollup/plugin-image": "^3.0.3",
|
|
41
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
42
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
43
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
44
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
45
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
31
46
|
"@tailwindcss/postcss": "^4.1.10",
|
|
32
47
|
"@types/qrcode": "^1.5.5",
|
|
33
48
|
"@types/react": "^18.0.0",
|
|
34
49
|
"@types/react-dom": "^18.0.0",
|
|
35
|
-
"@vitejs/plugin-react": "^4.3.3",
|
|
36
50
|
"autoprefixer": "^10.4.21",
|
|
37
|
-
"axios": "^1.8.0",
|
|
38
51
|
"concurrently": "^8.2.2",
|
|
39
52
|
"eslint": "^9.27.0",
|
|
40
53
|
"eslint-plugin-import": "^2.31.0",
|
|
@@ -42,50 +55,35 @@
|
|
|
42
55
|
"eslint-plugin-react": "^7.37.5",
|
|
43
56
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
44
57
|
"jest": "^29.7.0",
|
|
45
|
-
"lucide-react": "^0.511.0",
|
|
46
58
|
"postcss": "^8.5.3",
|
|
47
|
-
"react": "^18.0.0",
|
|
48
59
|
"react-dom": "^18.0.0",
|
|
60
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
61
|
+
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
62
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
63
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
49
64
|
"tailwindcss": "^4.1.7",
|
|
50
|
-
"@tailwindcss/vite": "^4.1.11",
|
|
51
|
-
"terser": "^5.36.0",
|
|
52
65
|
"tslib": "^2.8.1",
|
|
53
66
|
"typescript": "^5.8.3",
|
|
54
|
-
"typescript-eslint": "^8.32.1"
|
|
55
|
-
"vite": "^6.0.5",
|
|
56
|
-
"vite-plugin-dts": "^4.5.0"
|
|
67
|
+
"typescript-eslint": "^8.32.1"
|
|
57
68
|
},
|
|
58
69
|
"dependencies": {
|
|
70
|
+
"@headlessui/react": "^2.2.4",
|
|
71
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
72
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
73
|
+
"@radix-ui/react-label": "^2.1.6",
|
|
74
|
+
"@radix-ui/react-select": "^2.2.5",
|
|
59
75
|
"@tensorflow-models/coco-ssd": "^2.2.3",
|
|
60
76
|
"@tensorflow/tfjs": "^4.22.0",
|
|
61
77
|
"@tensorflow/tfjs-backend-webgl": "^4.22.0",
|
|
62
78
|
"@unissey-web/sdk-react": "^4.4.0",
|
|
63
79
|
"clsx": "^2.1.1",
|
|
80
|
+
"lucide-react": "^0.511.0",
|
|
64
81
|
"qrcode": "^1.5.4",
|
|
65
82
|
"tailwind-merge": "^3.3.1"
|
|
66
83
|
},
|
|
67
84
|
"peerDependencies": {
|
|
68
|
-
"@headlessui/react": "^2.2.4",
|
|
69
|
-
"@radix-ui/react-checkbox": "^1.3.2",
|
|
70
|
-
"@radix-ui/react-icons": "^1.3.2",
|
|
71
|
-
"@radix-ui/react-label": "^2.1.6",
|
|
72
|
-
"@radix-ui/react-select": "^2.2.5",
|
|
73
|
-
"axios": "^1.8.0",
|
|
74
|
-
"lucide-react": "^0.511.0",
|
|
75
85
|
"react": "^18.0.0",
|
|
76
86
|
"react-dom": "^18.0.0",
|
|
77
|
-
"
|
|
78
|
-
},
|
|
79
|
-
"scripts": {
|
|
80
|
-
"build": "vite build",
|
|
81
|
-
"build:watch": "vite build --watch",
|
|
82
|
-
"dev": "vite build --watch",
|
|
83
|
-
"lint": "eslint . --ext .ts,.tsx",
|
|
84
|
-
"test": "jest",
|
|
85
|
-
"demo": "cd ../demo && npm run dev",
|
|
86
|
-
"dev:full": "concurrently \"npm run dev\" \"npm run demo\"",
|
|
87
|
-
"clean": "rm -rf dist",
|
|
88
|
-
"setup:env": "echo 'VITE_API_BASE_URL=http://localhost:8888' > .env && echo 'VITE_API_BASE_URL=http://localhost:8888' > ../demo/.env && echo 'Environment files created successfully'",
|
|
89
|
-
"build:test": "npm run build && cp -r dist example/node_modules/datakeen-session-react/"
|
|
87
|
+
"axios": "^1.8.0"
|
|
90
88
|
}
|
|
91
|
-
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
2
|
+
import resolve from "@rollup/plugin-node-resolve";
|
|
3
|
+
import typescript from "@rollup/plugin-typescript";
|
|
4
|
+
import peerDepsExternalPlugin from "rollup-plugin-peer-deps-external";
|
|
5
|
+
import postcss from "rollup-plugin-postcss";
|
|
6
|
+
import image from "@rollup/plugin-image";
|
|
7
|
+
|
|
8
|
+
const packageJson = require("./package.json");
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
input: ["src/index.ts"],
|
|
12
|
+
output: [
|
|
13
|
+
{
|
|
14
|
+
file: packageJson.main,
|
|
15
|
+
format: "cjs",
|
|
16
|
+
sourcemap: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
file: packageJson.module,
|
|
20
|
+
format: "esm",
|
|
21
|
+
sourcemap: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
plugins: [
|
|
25
|
+
peerDepsExternalPlugin(),
|
|
26
|
+
resolve({
|
|
27
|
+
ignoreGlobal: false,
|
|
28
|
+
include: ["node_modules/**"],
|
|
29
|
+
skip: ["react", "react-dom"],
|
|
30
|
+
}),
|
|
31
|
+
commonjs(),
|
|
32
|
+
image(),
|
|
33
|
+
typescript({
|
|
34
|
+
tsconfig: "./tsconfig.json",
|
|
35
|
+
declaration: true,
|
|
36
|
+
declarationDir: "dist",
|
|
37
|
+
}),
|
|
38
|
+
postcss({
|
|
39
|
+
config: {
|
|
40
|
+
path: "./postcss.config.js",
|
|
41
|
+
},
|
|
42
|
+
extensions: [".css"],
|
|
43
|
+
minimize: false, // Pas de minification en dev
|
|
44
|
+
inject: {
|
|
45
|
+
insertAt: "top",
|
|
46
|
+
},
|
|
47
|
+
extract: false,
|
|
48
|
+
}),
|
|
49
|
+
],
|
|
50
|
+
external: ["react", "react-dom"],
|
|
51
|
+
watch: {
|
|
52
|
+
include: "src/**",
|
|
53
|
+
exclude: "node_modules/**",
|
|
54
|
+
},
|
|
55
|
+
};
|
package/dist/assets/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { default as beforePhotoIcon } from './before-photo.png';
|
|
2
|
-
import { default as beforeVersoIcon } from './before-verso.png';
|
|
3
|
-
import { default as DocCheckIcon } from './DocCheck.svg';
|
|
4
|
-
import { default as IdCheckIcon } from './idCheck.svg';
|
|
5
|
-
import { default as SelfieIcon } from './selfietake.svg';
|
|
6
|
-
export { beforePhotoIcon, beforeVersoIcon, DocCheckIcon, IdCheckIcon, SelfieIcon, };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DatakeenSessionProps } from '../types/session';
|
|
2
|
-
/**
|
|
3
|
-
* DatakeenSession Component
|
|
4
|
-
*
|
|
5
|
-
* The main component of the Datakeen SDK that manages the multi-step verification flow.
|
|
6
|
-
* This component handles the different steps of the session process, including:
|
|
7
|
-
* - Initial welcome screen
|
|
8
|
-
* - User information collection
|
|
9
|
-
* - Country selection for JDI verification
|
|
10
|
-
* - Mobile redirect when selfie is required
|
|
11
|
-
*
|
|
12
|
-
* The component maintains internal state for the current step and user input data,
|
|
13
|
-
* progressing through the verification workflow as the user completes each step.
|
|
14
|
-
*
|
|
15
|
-
* @param {DatakeenSessionProps} props - Component props
|
|
16
|
-
* @param {string} props.sessionId - Unique identifier for the verification session
|
|
17
|
-
* @param {SessionConfig} props.sessionConfig - Configuration for the session (e.g., selfie: true)
|
|
18
|
-
* @returns {JSX.Element} A Paper-wrapped container with the appropriate step component based on current state
|
|
19
|
-
*/
|
|
20
|
-
declare const DatakeenSession: ({ sessionId, sessionConfig, }: DatakeenSessionProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export default DatakeenSession;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { CameraFacingMode } from '../../types/camera';
|
|
3
|
-
interface CameraMaskProps {
|
|
4
|
-
isDetecting: boolean;
|
|
5
|
-
isPortrait?: boolean;
|
|
6
|
-
facingMode?: CameraFacingMode;
|
|
7
|
-
}
|
|
8
|
-
declare const CameraMask: React.FC<CameraMaskProps>;
|
|
9
|
-
export default CameraMask;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { onUploadFiles } from '../../types/uploadFiles';
|
|
3
|
-
interface PhotoConfirmationProps {
|
|
4
|
-
imageUrl: string;
|
|
5
|
-
versoImageUrl?: string;
|
|
6
|
-
requiresTwoSides?: boolean;
|
|
7
|
-
onConfirm: () => void;
|
|
8
|
-
onRetry: () => void;
|
|
9
|
-
onRetryAfterProcessing: () => void;
|
|
10
|
-
fileUploaded: onUploadFiles | null;
|
|
11
|
-
}
|
|
12
|
-
declare const PhotoConfirmation: React.FC<PhotoConfirmationProps>;
|
|
13
|
-
export default PhotoConfirmation;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { ProcessingStep } from '../../types/session';
|
|
3
|
-
import { onUploadFiles } from '../../types/uploadFiles';
|
|
4
|
-
interface PhotoProcessingLoaderProps {
|
|
5
|
-
onProcessingComplete: () => void;
|
|
6
|
-
onRetry?: () => void;
|
|
7
|
-
steps?: ProcessingStep[];
|
|
8
|
-
filesUploaded: onUploadFiles | null;
|
|
9
|
-
}
|
|
10
|
-
declare const PhotoProcessingLoader: React.FC<PhotoProcessingLoaderProps>;
|
|
11
|
-
export default PhotoProcessingLoader;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface JDIDocumentSelectionProps {
|
|
2
|
-
onDocumentSelect: (documentType: string) => void;
|
|
3
|
-
onBack: () => void;
|
|
4
|
-
documentTypeId?: string;
|
|
5
|
-
sessionId?: string;
|
|
6
|
-
}
|
|
7
|
-
declare const JDIDocumentSelection: ({ onDocumentSelect, onBack, documentTypeId, sessionId, }: JDIDocumentSelectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default JDIDocumentSelection;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { onUploadFiles } from '../../types/uploadFiles';
|
|
2
|
-
interface JDIDocumentUploadProps {
|
|
3
|
-
documentType: string;
|
|
4
|
-
onUpload: (files: onUploadFiles) => void;
|
|
5
|
-
onBack: () => void;
|
|
6
|
-
documentTypeId?: string;
|
|
7
|
-
}
|
|
8
|
-
declare const JDIDocumentUpload: ({ documentType, onUpload, onBack, documentTypeId, }: JDIDocumentUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default JDIDocumentUpload;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface JDIIntroductionProps {
|
|
2
|
-
onContinue: () => void;
|
|
3
|
-
onBack: () => void;
|
|
4
|
-
documentTypeId?: string;
|
|
5
|
-
sessionId?: string;
|
|
6
|
-
}
|
|
7
|
-
declare const JDIIntroduction: ({ onContinue, onBack, documentTypeId, sessionId, }: JDIIntroductionProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default JDIIntroduction;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface JDIPreIntroductionProps {
|
|
2
|
-
onContinue: () => void;
|
|
3
|
-
onBack: () => void;
|
|
4
|
-
documentTypeId?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const JDIPreIntroduction: ({ onContinue, onBack, documentTypeId, }: JDIPreIntroductionProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default JDIPreIntroduction;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { onUploadFiles } from '../../types/uploadFiles';
|
|
2
|
-
interface JDIProcessingProps {
|
|
3
|
-
onProcessingComplete: (success: boolean) => void;
|
|
4
|
-
documentType: string;
|
|
5
|
-
fileUploaded: onUploadFiles | null;
|
|
6
|
-
documentTypeId: string;
|
|
7
|
-
}
|
|
8
|
-
declare const JDIProcessing: ({ onProcessingComplete, documentType, fileUploaded, documentTypeId, }: JDIProcessingProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default JDIProcessing;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SelfieCaptureData } from '../../types/selfie';
|
|
2
|
-
interface SelfieConfirmationProps {
|
|
3
|
-
selfieData: SelfieCaptureData;
|
|
4
|
-
onConfirm: () => void;
|
|
5
|
-
onRetake: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const SelfieConfirmation: ({ selfieData, onConfirm, onRetake, }: SelfieConfirmationProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default SelfieConfirmation;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SelfieCaptureData } from '../../types/selfie';
|
|
2
|
-
interface VideoProps {
|
|
3
|
-
setSelfieData: (selfieData: SelfieCaptureData) => void;
|
|
4
|
-
setStep: (step: number) => void;
|
|
5
|
-
onBack?: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const Video: ({ setSelfieData, setStep, onBack }: VideoProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default Video;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook personnalisé pour injecter des styles CSS globaux qui ciblent spécifiquement
|
|
3
|
-
* le composant VideoRecorder d'Unissey et éliminent les bords arrondis et les fonds noirs.
|
|
4
|
-
*/
|
|
5
|
-
declare const useVideoRecorderStyles: () => void;
|
|
6
|
-
export default useVideoRecorderStyles;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface SelfieRecorderProps {
|
|
2
|
-
handleSelfie: (e: Event) => void;
|
|
3
|
-
onBeginCapture?: () => void;
|
|
4
|
-
isCapturing?: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare const SelfieRecorder: ({ handleSelfie, onBeginCapture, isCapturing, }: SelfieRecorderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default SelfieRecorder;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utilitaire pour appliquer des styles aux éléments de la vidéo, y compris les éléments shadow DOM
|
|
3
|
-
* du composant VideoRecorder d'Unissey.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Applique les styles nécessaires pour éliminer les bords arrondis et le fond noir
|
|
7
|
-
* à tous les éléments shadow DOM du VideoRecorder.
|
|
8
|
-
*/
|
|
9
|
-
export declare const applyStylesToVideoElements: () => void;
|
|
10
|
-
/**
|
|
11
|
-
* Configure un observateur de mutations pour détecter l'ajout de VideoRecorder
|
|
12
|
-
* et leur appliquer les styles nécessaires.
|
|
13
|
-
*/
|
|
14
|
-
export declare const setupVideoElementsObserver: () => () => void;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file ChooseCountryJDI.tsx
|
|
3
|
-
* @description This component provides a UI for users to se <Title className="mb-5 sm:mb-2">Document issuing country</Title>
|
|
4
|
-
<Subtitle>
|
|
5
|
-
Select the issuing country shown on your ID document, as well as the type of document you want to use
|
|
6
|
-
</Subtitle>their document's issuing country
|
|
7
|
-
* and document type for identity verification.
|
|
8
|
-
*
|
|
9
|
-
* @component ChooseCountryJDI
|
|
10
|
-
*
|
|
11
|
-
* @props {function} setStep - Callback function to change the current step in the parent component
|
|
12
|
-
* workflow. Called with 0 when the user proceeds to the next step.
|
|
13
|
-
* @props {function} setCountry - Callback function to set the selected country in the parent
|
|
14
|
-
* component. Receives the country ID or null.
|
|
15
|
-
* @props {function} setDocumentType - Callback function to set the selected document type in the
|
|
16
|
-
* parent component. Receives the document type ID or null.
|
|
17
|
-
*
|
|
18
|
-
* @state {DrawerItem|null} selectedCountry - Stores the user's selected country as a DrawerItem
|
|
19
|
-
* object containing id and label properties.
|
|
20
|
-
* @state {DrawerItem|null} selectedDocumentType - Stores the user's selected document type as a
|
|
21
|
-
* DrawerItem object.
|
|
22
|
-
*
|
|
23
|
-
* @flow
|
|
24
|
-
* 1. User selects a country from the dropdown
|
|
25
|
-
* 2. Based on the selected country, document type options are displayed
|
|
26
|
-
* 3. User selects a document type
|
|
27
|
-
* 4. User clicks "Commencer ma vérification" to proceed
|
|
28
|
-
* 5. Selected country and document type are passed to parent component via callbacks
|
|
29
|
-
*
|
|
30
|
-
* @dependencies
|
|
31
|
-
* - countries - Array of country objects imported from jdiCountry utils
|
|
32
|
-
* - documentTypesFromCountryId - Function to get document types based on country ID
|
|
33
|
-
* - SelectDrawer - UI component for selecting options from a drawer
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* <ChooseCountryJDI
|
|
37
|
-
* setStep={(step) => setCurrentStep(step)}
|
|
38
|
-
* setCountry={(country) => setSelectedCountry(country)}
|
|
39
|
-
* setDocumentType={(docType) => setSelectedDocType(docType)}
|
|
40
|
-
* />
|
|
41
|
-
*/
|
|
42
|
-
interface ChooseCountryJDIProps {
|
|
43
|
-
setStep: (nbr: number) => void;
|
|
44
|
-
setCountry: (country: string | null) => void;
|
|
45
|
-
setDocumentType: (documentType: string | null) => void;
|
|
46
|
-
}
|
|
47
|
-
declare const ChooseCountryJDI: ({ setStep, setCountry, setDocumentType, }: ChooseCountryJDIProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
-
export default ChooseCountryJDI;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { stepObject } from '../../types/session';
|
|
2
|
-
interface DocumentCheckProps {
|
|
3
|
-
stepObject: stepObject;
|
|
4
|
-
sessionId: string;
|
|
5
|
-
onContinueOnPC?: () => void;
|
|
6
|
-
documentTypeId: string;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Composant générique pour la vérification de document
|
|
10
|
-
* Ce composant remplace JDICheck en rendant le contenu dynamique en fonction du type de document
|
|
11
|
-
*/
|
|
12
|
-
declare const DocumentCheck: ({ stepObject, sessionId, onContinueOnPC, documentTypeId, }: DocumentCheckProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default DocumentCheck;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { stepObject } from '../../types/session';
|
|
3
|
-
interface EndFlowProps {
|
|
4
|
-
stepObject: stepObject;
|
|
5
|
-
sessionId: string;
|
|
6
|
-
sessionStatus?: string;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* EndFlow Component
|
|
10
|
-
*
|
|
11
|
-
* Composant affiché à la fin du flux de vérification lorsque toutes les étapes ont été complétées.
|
|
12
|
-
* Affiche un message de confirmation avec une icône de succès.
|
|
13
|
-
*
|
|
14
|
-
* @param {EndFlowProps} props - Propriétés du composant
|
|
15
|
-
* @param {stepObject} props.stepObject - Objet contenant l'état actuel et les fonctions de changement d'étape
|
|
16
|
-
* @param {string} props.sessionId - L'identifiant de la session
|
|
17
|
-
* @param {string} props.sessionStatus - Le statut actuel de la session
|
|
18
|
-
* @returns {JSX.Element} Le composant EndFlow
|
|
19
|
-
*/
|
|
20
|
-
declare const EndFlow: React.FC<EndFlowProps>;
|
|
21
|
-
export default EndFlow;
|
|
File without changes
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { stepObject } from '../../types/session';
|
|
2
|
-
interface IDCheckProps {
|
|
3
|
-
stepObject: stepObject;
|
|
4
|
-
documentTypeId?: string | null;
|
|
5
|
-
sessionId?: string;
|
|
6
|
-
}
|
|
7
|
-
declare const IDCheck: ({ stepObject, documentTypeId, sessionId, }: IDCheckProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default IDCheck;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { stepObject } from '../../types/session';
|
|
2
|
-
interface JDICheckProps {
|
|
3
|
-
stepObject: stepObject;
|
|
4
|
-
sessionId: string;
|
|
5
|
-
onContinueOnPC?: () => void;
|
|
6
|
-
documentTypeId?: string;
|
|
7
|
-
}
|
|
8
|
-
declare const JDICheck: ({ stepObject, sessionId, onContinueOnPC, documentTypeId, }: JDICheckProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
-
export default JDICheck;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface MobileRedirectProps {
|
|
2
|
-
sessionId: string;
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
onBack?: () => void;
|
|
5
|
-
onContinueOnPC?: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const MobileRedirect: ({ sessionId, children, onBack, onContinueOnPC, }: MobileRedirectProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default MobileRedirect;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface OTPVerificationProps {
|
|
2
|
-
stepObject: {
|
|
3
|
-
setStep: (step: number) => void;
|
|
4
|
-
step: number;
|
|
5
|
-
};
|
|
6
|
-
contactInfo?: {
|
|
7
|
-
email: string;
|
|
8
|
-
phoneNumber: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
declare const OTPVerification: ({ stepObject, contactInfo }: OTPVerificationProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default OTPVerification;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { stepObject } from '../../types/session';
|
|
2
|
-
/**
|
|
3
|
-
* Composant de gestion du flux selfie.
|
|
4
|
-
* Gère les étapes internes de capture et confirmation du selfie.
|
|
5
|
-
*/
|
|
6
|
-
declare const Selfie: ({ stepObject }: {
|
|
7
|
-
stepObject: stepObject;
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default Selfie;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
interface SessionExpiredProps {
|
|
3
|
-
onRetry?: () => void;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* SessionExpired Component
|
|
7
|
-
*
|
|
8
|
-
* Displays a session expired message with a retry button
|
|
9
|
-
*/
|
|
10
|
-
declare const SessionExpired: React.FC<SessionExpiredProps>;
|
|
11
|
-
export default SessionExpired;
|