idmission-web-sdk 1.0.348 → 1.0.350
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/camera/CameraProvider.d.ts +6 -23
- package/dist/lib/barcode/Parse.d.ts +2 -50
- package/dist/lib/camera/Camera.d.ts +22 -19
- package/dist/lib/utils/logger.d.ts +14 -0
- package/dist/lib/utils/resizeFile.d.ts +14 -0
- package/dist/sdk2.cjs.development.js +469 -327
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +469 -327
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +469 -327
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,31 +1,14 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
videoRef: MutableRefObject<HTMLVideoElement | null>;
|
|
5
|
-
videoLoaded: boolean;
|
|
6
|
-
setVideoLoaded: (value: boolean) => void;
|
|
7
|
-
cameraRef: MutableRefObject<Camera | null>;
|
|
8
|
-
cameraReady: boolean;
|
|
9
|
-
cameraAccessDenied: boolean;
|
|
10
|
-
retryCameraAccess: () => void;
|
|
11
|
-
releaseCameraAccess: () => void;
|
|
12
|
-
iphoneContinuityCameraAvailable: boolean;
|
|
13
|
-
iphoneContinuityCameraAllowed: boolean;
|
|
14
|
-
setIphoneContinuityCameraAllowed: (value: boolean) => void;
|
|
15
|
-
takePhoto: () => Promise<Blob | null>;
|
|
16
|
-
audioStream: MediaStream | null;
|
|
17
|
-
microphoneReady: boolean;
|
|
18
|
-
microphoneAccessDenied: boolean;
|
|
19
|
-
retryMicrophoneAccess: () => void;
|
|
20
|
-
};
|
|
21
|
-
export declare const CameraStateContext: React.Context<CameraState>;
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { CaptureDevice } from '../../lib/camera/Camera';
|
|
3
|
+
export declare const CameraStateContext: React.Context<CaptureDevice>;
|
|
22
4
|
export type CameraProviderProps = {
|
|
23
5
|
children: ReactElement;
|
|
6
|
+
requestAccessAutomatically?: boolean;
|
|
24
7
|
preferFrontFacingCamera?: boolean;
|
|
25
8
|
preferContinuityCamera?: boolean;
|
|
26
|
-
|
|
9
|
+
requireMicrophoneAccess?: boolean;
|
|
27
10
|
maxVideoWidth?: number;
|
|
28
11
|
maxFps?: number;
|
|
29
12
|
debugMode?: boolean;
|
|
30
13
|
};
|
|
31
|
-
export declare const CameraProvider: ({ children, preferFrontFacingCamera, preferContinuityCamera,
|
|
14
|
+
export declare const CameraProvider: ({ children, requestAccessAutomatically, preferFrontFacingCamera, preferContinuityCamera, requireMicrophoneAccess, maxVideoWidth, maxFps, debugMode, }: CameraProviderProps) => ReactElement;
|
|
@@ -1,53 +1,5 @@
|
|
|
1
|
-
declare function processBarcode(rawValue: string): Promise<unknown>;
|
|
2
|
-
declare
|
|
3
|
-
code: string;
|
|
4
|
-
match_pattern: string;
|
|
5
|
-
xslt_template: string;
|
|
6
|
-
is_disabled: string;
|
|
7
|
-
Country: string;
|
|
8
|
-
State: string;
|
|
9
|
-
DocumentType: string;
|
|
10
|
-
Side: string;
|
|
11
|
-
barcode_type: string;
|
|
12
|
-
}[];
|
|
13
|
-
declare function isBarcodePresentForSelectedCriteria(idSide: string): Promise<{
|
|
14
|
-
code: string;
|
|
15
|
-
match_pattern: string;
|
|
16
|
-
xslt_template: string;
|
|
17
|
-
is_disabled: string;
|
|
18
|
-
Country: string;
|
|
19
|
-
State: string;
|
|
20
|
-
DocumentType: string;
|
|
21
|
-
Side: string;
|
|
22
|
-
barcode_type: string;
|
|
23
|
-
} | null>;
|
|
24
|
-
type XSLTResponse = {
|
|
25
|
-
data: {
|
|
26
|
-
data: {
|
|
27
|
-
response: {
|
|
28
|
-
status: {
|
|
29
|
-
code: string;
|
|
30
|
-
};
|
|
31
|
-
listData: {
|
|
32
|
-
fieldValues: string[];
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
declare function getCompanyXSLTData(serviceParams: {
|
|
1
|
+
export declare function processBarcode(rawValue: string): Promise<unknown>;
|
|
2
|
+
export declare function getCompanyXSLTData(serviceParams: {
|
|
39
3
|
baseUrl: string;
|
|
40
4
|
tokenId: string;
|
|
41
5
|
}): Promise<void>;
|
|
42
|
-
declare function getXSLTDataHandler(resp: XSLTResponse | null): void;
|
|
43
|
-
declare function transformBarcodeUsingXSLT(barcodeScanResult: string, xsl: string): Promise<unknown>;
|
|
44
|
-
declare class Transformation {
|
|
45
|
-
xml: string;
|
|
46
|
-
xmlDoc: any;
|
|
47
|
-
xslt: any;
|
|
48
|
-
xsltDoc: any;
|
|
49
|
-
setXml(x: string): this;
|
|
50
|
-
setXslt(x: string): this;
|
|
51
|
-
transform(): Promise<unknown>;
|
|
52
|
-
}
|
|
53
|
-
declare function browserSupportsXSLT(): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
2
|
export type Camera = {
|
|
3
3
|
stream: MediaStream;
|
|
4
4
|
isRearFacing: boolean;
|
|
@@ -25,42 +25,45 @@ export declare function listAvailableCameras(facingMode?: FacingMode, requestMic
|
|
|
25
25
|
export declare function obtainCameraAccess(stream: MediaStream, deviceLabel: string, video?: HTMLVideoElement | null): Camera;
|
|
26
26
|
export declare function releaseCameraAccess(): void;
|
|
27
27
|
export declare function releaseMicrophoneAccess(): void;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
type UsePreferredCaptureDeviceParams = {
|
|
29
|
+
requestAccessAutomatically?: boolean;
|
|
30
|
+
preferFrontFacingCamera?: boolean;
|
|
31
|
+
preferContinuityCamera?: boolean;
|
|
32
|
+
requireMicrophoneAccess?: boolean;
|
|
33
|
+
maxVideoWidth?: number;
|
|
34
|
+
maxFps?: number;
|
|
35
|
+
debugMode?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export type CaptureDevice = {
|
|
38
|
+
videoRef: MutableRefObject<HTMLVideoElement | null>;
|
|
37
39
|
videoDevice: MediaDeviceInfo | null;
|
|
38
40
|
videoLoaded: boolean;
|
|
39
|
-
setVideoLoaded:
|
|
40
|
-
cameraRef:
|
|
41
|
+
setVideoLoaded: (value: boolean) => void;
|
|
42
|
+
cameraRef: MutableRefObject<Camera | null>;
|
|
41
43
|
cameraReady: boolean;
|
|
42
44
|
cameraAccessDenied: boolean;
|
|
43
|
-
|
|
44
|
-
releaseCameraAccess:
|
|
45
|
+
requestCameraAccess: () => void;
|
|
46
|
+
releaseCameraAccess: () => void;
|
|
45
47
|
iphoneContinuityCameraAvailable: boolean;
|
|
46
48
|
iphoneContinuityCameraAllowed: boolean;
|
|
47
|
-
setIphoneContinuityCameraAllowed:
|
|
49
|
+
setIphoneContinuityCameraAllowed: (value: boolean) => void;
|
|
48
50
|
takePhoto: () => Promise<Blob | null>;
|
|
49
51
|
audioStream: MediaStream | null;
|
|
50
52
|
microphoneReady: boolean;
|
|
51
53
|
microphoneAccessDenied: boolean;
|
|
52
|
-
|
|
54
|
+
requestMicrophoneAccess: () => void;
|
|
53
55
|
};
|
|
56
|
+
export declare function usePreferredCaptureDevice({ requestAccessAutomatically, preferFrontFacingCamera, preferContinuityCamera, requireMicrophoneAccess, maxVideoWidth, maxFps, debugMode, }?: UsePreferredCaptureDeviceParams): CaptureDevice;
|
|
54
57
|
export declare const useDualResCaptureDevice: () => {
|
|
55
|
-
minVideoRef:
|
|
56
|
-
maxVideoRef:
|
|
58
|
+
minVideoRef: MutableRefObject<HTMLVideoElement | null>;
|
|
59
|
+
maxVideoRef: MutableRefObject<HTMLVideoElement | null>;
|
|
57
60
|
minCamera: Camera | null;
|
|
58
61
|
maxCamera: Camera | null;
|
|
59
62
|
maxCameraReady: boolean;
|
|
60
63
|
minVideoLoaded: boolean;
|
|
61
64
|
maxVideoLoaded: boolean;
|
|
62
65
|
setMinVideoLoaded: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
63
|
-
setMaxVideoLoaded:
|
|
66
|
+
setMaxVideoLoaded: (value: boolean) => void;
|
|
64
67
|
takeFullResPhoto: () => Promise<Blob | null>;
|
|
65
68
|
};
|
|
66
69
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum LogLevel {
|
|
2
|
+
Off = 0,
|
|
3
|
+
Error = 1,
|
|
4
|
+
Warn = 2,
|
|
5
|
+
Info = 3,
|
|
6
|
+
Debug = 4
|
|
7
|
+
}
|
|
8
|
+
export declare function useLogLevel(newLogLevel: LogLevel): void;
|
|
9
|
+
export declare function useDebugLogging(enabled: boolean): void;
|
|
10
|
+
export declare function debug(...parts: unknown[]): void;
|
|
11
|
+
export declare function log(...parts: unknown[]): void;
|
|
12
|
+
export declare function warn(...parts: unknown[]): void;
|
|
13
|
+
export declare function error(...parts: unknown[]): void;
|
|
14
|
+
export default log;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function useFileState(): {
|
|
3
|
+
rawFile: File | undefined;
|
|
4
|
+
fileInputOnChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function useFileDataUrl(file?: File): {
|
|
7
|
+
url: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare function useResizeMaxEdge({ rawFile, maxEdgePx, }: {
|
|
10
|
+
rawFile?: File;
|
|
11
|
+
maxEdgePx?: number;
|
|
12
|
+
}): {
|
|
13
|
+
resizedImageFile: string | undefined;
|
|
14
|
+
};
|