@regulaforensics/vp-frontend-document-components 2.1.0 → 2.2.0
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 +129 -35
- package/dist/main.js +1 -1
- package/esm/main.js +1 -1
- package/lib/common/Message.d.ts +2 -1
- package/lib/common/NoGlareIconLivenessDetection.d.ts +5 -0
- package/lib/common/NoSmilingIconLivenessDetection.d.ts +5 -0
- package/lib/common/PortraitOrientationOnlyIcon.d.ts +6 -0
- package/lib/common/RegulaLogoLivenessDetection.d.ts +5 -0
- package/lib/components/ButtonFaceLiveness.d.ts +7 -0
- package/lib/components/DocumentReaderLayout.d.ts +4 -6
- package/lib/components/FaceCapture.d.ts +15 -6
- package/lib/components/FaceFullScreenOverlay.d.ts +2 -3
- package/lib/components/FaceHintAnimaition.d.ts +16 -0
- package/lib/components/FaceLayout.d.ts +10 -5
- package/lib/components/InfoScreenFaceLiveness.d.ts +11 -0
- package/lib/components/InstructionVideoScreen.d.ts +9 -0
- package/lib/components/ProcessScreenFaceLiveness.d.ts +6 -0
- package/lib/components/RetryScreenFaceLiveness.d.ts +7 -0
- package/lib/components/SectorAnimationSvg.d.ts +11 -0
- package/lib/constants.d.ts +86 -10
- package/lib/contexts/DocumentAttributesContext.d.ts +4 -2
- package/lib/contexts/DocumentSDKContext.d.ts +3 -1
- package/lib/contexts/FaceAttributesContext.d.ts +6 -3
- package/lib/hoc/withLocalize.d.ts +5 -4
- package/lib/hooks/useDocumentReaderSeries.d.ts +2 -5
- package/lib/hooks/useFaceLiveness.d.ts +13 -3
- package/lib/hooks/useStateCallback.d.ts +1 -0
- package/lib/i18n/dictionaries/_dictionaries.d.ts +2212 -2052
- package/lib/index-document.d.ts +3 -4
- package/lib/media-resources/resourcesBase64.d.ts +7 -0
- package/lib/services/DebugService.d.ts +4 -0
- package/lib/services/DocumentReaderProcessor.d.ts +3 -2
- package/lib/services/FaceLivenessService.d.ts +70 -16
- package/lib/services/FaceService.d.ts +18 -5
- package/lib/types.d.ts +92 -75
- package/lib/web-components/CameraSnapshot.d.ts +6 -3
- package/lib/web-components/DocumentReader.d.ts +6 -3
- package/lib/web-components/FaceDetection.d.ts +2 -3
- package/lib/web-components/FaceLiveness.d.ts +6 -4
- package/lib/web-components/FullScreenContainer.d.ts +1 -1
- package/package.json +6 -4
- package/lib/common/InstructionIconFaceDetection.d.ts +0 -5
- package/lib/common/InstructionIconFaceLiveness.d.ts +0 -5
- package/lib/common/NoGlareIcon.d.ts +0 -5
- package/lib/common/NoSmilingIcon.d.ts +0 -5
- package/lib/components/InstructionScreen.d.ts +0 -9
- package/lib/components/RetryScreen.d.ts +0 -7
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { logLevels } from '../constants';
|
|
2
2
|
declare class DebugService {
|
|
3
3
|
private readonly logLvl;
|
|
4
|
+
private prevTime;
|
|
5
|
+
private frameResults;
|
|
4
6
|
constructor(logLvl: logLevels);
|
|
5
7
|
private log;
|
|
8
|
+
private frameInfoLog;
|
|
9
|
+
private shutDownInfoLog;
|
|
6
10
|
private time;
|
|
7
11
|
debug(message: string, ...optionalParams: Array<any>): void;
|
|
8
12
|
info(message: string, ...optionalParams: Array<any>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CurrentPage,
|
|
1
|
+
import { CurrentPage, ImageProcessingRequest, ProcessingRequest, StreamParams } from '../types';
|
|
2
2
|
import { Response } from '../models/DocReaderWebclient/ext';
|
|
3
3
|
declare type ServiceListener = ((data: Response) => void) | null;
|
|
4
4
|
declare type ResponseListener = (currentPage: CurrentPage) => void;
|
|
@@ -30,10 +30,11 @@ declare class DocumentReaderProcessor {
|
|
|
30
30
|
get isInitialized(): boolean;
|
|
31
31
|
get isProcessing(): boolean;
|
|
32
32
|
private startStream;
|
|
33
|
+
private getImageData;
|
|
33
34
|
private detect;
|
|
34
35
|
private startNewPage;
|
|
35
36
|
private startNewDocument;
|
|
36
|
-
startRecognition(responseListener?: ResponseListener): Promise<Response>;
|
|
37
|
+
startRecognition(responseListener?: ResponseListener): Promise<Response | null>;
|
|
37
38
|
processImage(images: FileList | Array<Blob>): Promise<Response>;
|
|
38
39
|
stopRecognition(): void;
|
|
39
40
|
prepare(): Promise<void>;
|
|
@@ -1,36 +1,90 @@
|
|
|
1
|
-
import { UserAgentType } from '../types';
|
|
2
1
|
import EventEmitter from './EventEmitter';
|
|
3
2
|
import CameraModel from '../models/CameraModel';
|
|
4
|
-
declare type
|
|
3
|
+
declare type ConfigParams = {
|
|
4
|
+
ballSmoothingWeight: number;
|
|
5
|
+
ballVelocityX: number;
|
|
6
|
+
ballVelocityY: number;
|
|
7
|
+
debugOutput: boolean | undefined;
|
|
8
|
+
dontShowReadinessTimeoutMs: number;
|
|
9
|
+
fitFaceMultNear: number;
|
|
10
|
+
fixFaceOrientationMsgDurationMs: number;
|
|
11
|
+
fixFaceOrientationMsgTimeoutMs: number;
|
|
12
|
+
frameHeight: number;
|
|
13
|
+
frameWidth: number;
|
|
14
|
+
holdStillIOUMinNear: number;
|
|
15
|
+
holdStillIOUMinNormal: number;
|
|
16
|
+
holdStillNearTimeoutMs: number;
|
|
17
|
+
holdStillNormalTimeoutMs: number;
|
|
18
|
+
lookStraightMsgTimeoutMs: number;
|
|
19
|
+
maxPitchNear: number;
|
|
20
|
+
maxPitchNormal: number;
|
|
21
|
+
maxRollNormal: number;
|
|
22
|
+
maxYawNear: number;
|
|
23
|
+
maxYawNormal: number;
|
|
24
|
+
minReadiness: number;
|
|
25
|
+
moveAwayMultNear: number;
|
|
26
|
+
moveCloserMultNear: number;
|
|
27
|
+
nearTimeoutMs: number;
|
|
28
|
+
noMovementIOUMax: number;
|
|
29
|
+
noMovementMsgTimeoutMs: number;
|
|
30
|
+
normalTimeoutMs: number;
|
|
31
|
+
numChannels: number;
|
|
32
|
+
numSectors: number;
|
|
33
|
+
pin: number[];
|
|
34
|
+
resizedFrameHeight: number;
|
|
35
|
+
resizedFrameWidth: number;
|
|
36
|
+
};
|
|
37
|
+
export declare type InitializedLivenessDetectionData = {
|
|
38
|
+
config: ConfigParams;
|
|
39
|
+
publicKey: string;
|
|
40
|
+
schema: string;
|
|
41
|
+
sessionId: string;
|
|
42
|
+
transactionId: string;
|
|
43
|
+
metadata: {
|
|
44
|
+
serverTime: string;
|
|
45
|
+
sdkVersion: string;
|
|
46
|
+
hostAppId: string;
|
|
47
|
+
deviceModel: string;
|
|
48
|
+
camera: CameraModel;
|
|
49
|
+
deviceCameras: {
|
|
50
|
+
frontCameras: CameraModel[];
|
|
51
|
+
backCameras: CameraModel[];
|
|
52
|
+
};
|
|
53
|
+
ctx: {
|
|
54
|
+
userIp: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare type InitializedFaceCaptureData = {
|
|
59
|
+
config: {
|
|
60
|
+
scenario: number;
|
|
61
|
+
frameWidth: number;
|
|
62
|
+
frameHeight: number;
|
|
63
|
+
debugOutput: boolean | undefined;
|
|
64
|
+
numChannels: number;
|
|
65
|
+
};
|
|
5
66
|
metadata: {
|
|
6
67
|
hostAppId: string;
|
|
7
68
|
sdkVersion: string;
|
|
8
69
|
deviceModel: string;
|
|
9
70
|
camera: CameraModel;
|
|
10
71
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
72
|
+
};
|
|
73
|
+
declare type InitializeData = InitializedLivenessDetectionData | InitializedFaceCaptureData;
|
|
74
|
+
declare type ParamsData = {
|
|
75
|
+
initializedData: InitializeData;
|
|
15
76
|
};
|
|
16
77
|
declare class FaceLivenessService {
|
|
17
78
|
initialized: boolean;
|
|
18
79
|
processing: boolean;
|
|
19
80
|
prepared: boolean;
|
|
20
81
|
worker: Worker | null;
|
|
21
|
-
params:
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
metadata?: MetadataType;
|
|
25
|
-
};
|
|
82
|
+
params: ParamsData | null;
|
|
26
83
|
eventEmitter: EventEmitter;
|
|
27
84
|
constructor();
|
|
28
85
|
prepare(listener: (data: any) => void): Promise<void>;
|
|
29
86
|
initialize(params: {
|
|
30
|
-
|
|
31
|
-
height: number;
|
|
32
|
-
metadata: MetadataType;
|
|
33
|
-
debug?: boolean;
|
|
87
|
+
initializedData: InitializeData;
|
|
34
88
|
}): void;
|
|
35
89
|
private postCustomMessage;
|
|
36
90
|
private emit;
|
|
@@ -38,6 +92,6 @@ declare class FaceLivenessService {
|
|
|
38
92
|
private printErr;
|
|
39
93
|
private onWorkerMessage;
|
|
40
94
|
shutdown(): void;
|
|
41
|
-
processImage(videoFrame: Uint8ClampedArray): void;
|
|
95
|
+
processImage(videoFrame: Uint8ClampedArray, abortSession?: boolean): void;
|
|
42
96
|
}
|
|
43
97
|
export default FaceLivenessService;
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { FaceLivenessResultType } from '../types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { InitializedLivenessDetectionData } from './FaceLivenessService';
|
|
3
|
+
import CameraModel from '../models/CameraModel';
|
|
4
|
+
declare type GetLivenessDetectionResultOptions = {
|
|
5
|
+
transactionId: string;
|
|
5
6
|
backendURL?: string;
|
|
6
7
|
headers?: Record<string, string>;
|
|
8
|
+
publicKey: string;
|
|
7
9
|
};
|
|
8
|
-
declare
|
|
10
|
+
declare type DeviceMetadata = {
|
|
11
|
+
platform: string;
|
|
12
|
+
osVersion: string;
|
|
13
|
+
sdkVersion: string;
|
|
14
|
+
hostAppId: string;
|
|
15
|
+
deviceModel: string;
|
|
16
|
+
currentCameraId: string;
|
|
17
|
+
cameraState: CameraModel[];
|
|
18
|
+
};
|
|
19
|
+
declare function getLivenessDetectionResult(encryptedBody: Uint8Array, { transactionId, backendURL, headers, publicKey }: GetLivenessDetectionResultOptions): Promise<FaceLivenessResultType>;
|
|
20
|
+
declare function getInitialisingData(deviceMetadata: DeviceMetadata, sessionId?: string, backendUrl?: string): Promise<InitializedLivenessDetectionData>;
|
|
9
21
|
declare const _default: {
|
|
10
|
-
|
|
22
|
+
getInitialisingData: typeof getInitialisingData;
|
|
23
|
+
getLivenessDetectionResult: typeof getLivenessDetectionResult;
|
|
11
24
|
};
|
|
12
25
|
export default _default;
|
package/lib/types.d.ts
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
import { Response } from './models/DocReaderWebclient/ext';
|
|
2
|
+
import dictionaries from './i18n/dictionaries/_dictionaries';
|
|
2
3
|
import { DocumentEventActions, FaceEventActions, InternalScenarios, ObjectFit, ResponseCode, StreamStatus, ErrorTypes, CameraFacingMode } from './constants';
|
|
3
4
|
import CameraModel from './models/CameraModel';
|
|
5
|
+
declare type DocumentTranslations = {
|
|
6
|
+
scanIDInBrowser?: string;
|
|
7
|
+
useYourDeviceCamera?: string;
|
|
8
|
+
success?: string;
|
|
9
|
+
processingFinished?: string;
|
|
10
|
+
largeFile?: string;
|
|
11
|
+
selectSmallerFile?: string;
|
|
12
|
+
versionNotSupported?: string;
|
|
13
|
+
updateBrowser?: string;
|
|
14
|
+
licenseError?: string;
|
|
15
|
+
licenseExpired?: string;
|
|
16
|
+
fileCorrupt?: string;
|
|
17
|
+
selectAnotherFile?: string;
|
|
18
|
+
timeout?: string;
|
|
19
|
+
error?: string;
|
|
20
|
+
somethingWentWrong?: string;
|
|
21
|
+
tryAgain?: string;
|
|
22
|
+
fromCamera?: string;
|
|
23
|
+
fromGallery?: string;
|
|
24
|
+
processing?: string;
|
|
25
|
+
preparingService?: string;
|
|
26
|
+
detectingDocument?: string;
|
|
27
|
+
placeDocumentIntoFrame?: string;
|
|
28
|
+
positionDocumentCenter?: string;
|
|
29
|
+
noFocus?: string;
|
|
30
|
+
moveCloser?: string;
|
|
31
|
+
glaresOnDocument?: string;
|
|
32
|
+
holdDocumentStraight?: string;
|
|
33
|
+
documentProcessing?: string;
|
|
34
|
+
flipDocument?: string;
|
|
35
|
+
cameraUnavailable?: string;
|
|
36
|
+
preparingCamera?: string;
|
|
37
|
+
noCameraAvailable?: string;
|
|
38
|
+
incorrectCameraId?: string;
|
|
39
|
+
allowAccessToCamera?: string;
|
|
40
|
+
cameraConnection?: string;
|
|
41
|
+
checkCameraId?: string;
|
|
42
|
+
verified?: string;
|
|
43
|
+
photoCapturedSuccessfully?: string;
|
|
44
|
+
uploadPhoto?: string;
|
|
45
|
+
useCameraOrGallery?: string;
|
|
46
|
+
};
|
|
47
|
+
export declare type Locales = keyof typeof dictionaries | string;
|
|
48
|
+
export declare type DocumentDictionaries = Partial<Record<Locales, DocumentTranslations>>;
|
|
4
49
|
export declare type XY = {
|
|
5
50
|
x: number;
|
|
6
51
|
y: number;
|
|
@@ -29,7 +74,6 @@ export declare type FacingModeType = keyof typeof CameraFacingMode;
|
|
|
29
74
|
export declare type VideoStatusParamsType = {
|
|
30
75
|
videoStatus: StreamStatus;
|
|
31
76
|
camera: CameraTypes;
|
|
32
|
-
twoFacingModesAvailable: boolean;
|
|
33
77
|
};
|
|
34
78
|
export declare type CaptureFrameType = {
|
|
35
79
|
imageData: Array<ImageData>;
|
|
@@ -54,86 +98,27 @@ export declare type UserAgentType = {
|
|
|
54
98
|
vendor: string;
|
|
55
99
|
vendorSub: string;
|
|
56
100
|
};
|
|
57
|
-
declare type
|
|
58
|
-
predLeft: number;
|
|
59
|
-
predRight: number;
|
|
60
|
-
probLeft: number;
|
|
61
|
-
probRight: number;
|
|
62
|
-
};
|
|
63
|
-
declare type FaceLivenessOcclusionType = {
|
|
64
|
-
foreheadGlasses: boolean;
|
|
65
|
-
glasses: boolean;
|
|
66
|
-
hat: boolean;
|
|
67
|
-
medicineMask: boolean;
|
|
68
|
-
occlusion: boolean;
|
|
69
|
-
openedMouth: boolean;
|
|
70
|
-
sunglasses: boolean;
|
|
71
|
-
};
|
|
72
|
-
declare type FaceLivenessQualityType = {
|
|
73
|
-
blur: number;
|
|
74
|
-
brightness: number;
|
|
75
|
-
noise: number;
|
|
76
|
-
};
|
|
77
|
-
export declare type FaceLivenessResponseType = {
|
|
101
|
+
export declare type FaceLivenessResultType = {
|
|
78
102
|
code: number;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
metadata: {
|
|
84
|
-
ageNear: string;
|
|
85
|
-
ageNormal: string;
|
|
86
|
-
distance: number;
|
|
87
|
-
evaluationTime: number;
|
|
88
|
-
eyesNear: FaceLivenessEyesType;
|
|
89
|
-
eyesNormal: FaceLivenessEyesType;
|
|
90
|
-
faceQuality: {
|
|
91
|
-
details: Array<{
|
|
92
|
-
attribute: string;
|
|
93
|
-
score: number;
|
|
94
|
-
}>;
|
|
95
|
-
score: number;
|
|
96
|
-
};
|
|
97
|
-
faceTrackBreak: number;
|
|
98
|
-
occlusionNear: FaceLivenessOcclusionType;
|
|
99
|
-
occlusionNormal: FaceLivenessOcclusionType;
|
|
100
|
-
predArtMaskNear: number;
|
|
101
|
-
predArtMaskNormal: number;
|
|
102
|
-
predElectronicDeviceNear: number;
|
|
103
|
-
predElectronicDeviceNormal: number;
|
|
104
|
-
predGeometryClassifier: number;
|
|
105
|
-
predLivenessViewNear: number;
|
|
106
|
-
predLivenessViewNormal: number;
|
|
107
|
-
predOpticalFlow: number;
|
|
108
|
-
predShadesNear: number;
|
|
109
|
-
predShadesNormal: number;
|
|
110
|
-
predTotal: number;
|
|
111
|
-
probArtMaskNear: number;
|
|
112
|
-
probArtMaskNormal: number;
|
|
113
|
-
probElectronicDeviceNear: number;
|
|
114
|
-
probElectronicDeviceNormal: number;
|
|
115
|
-
probGeometryClassifier: number;
|
|
116
|
-
probOpticalFlow: number;
|
|
117
|
-
probShadesNear: number;
|
|
118
|
-
probShadesNormal: number;
|
|
119
|
-
qualityNear: FaceLivenessQualityType;
|
|
120
|
-
qualityNormal: FaceLivenessQualityType;
|
|
121
|
-
smileNear: string;
|
|
122
|
-
smileNormal: string;
|
|
123
|
-
symNear: number;
|
|
124
|
-
symNormal: number;
|
|
103
|
+
elapsed: string;
|
|
104
|
+
metadata: {
|
|
105
|
+
ctx: {
|
|
106
|
+
userIp: string;
|
|
125
107
|
};
|
|
108
|
+
serverTime: string;
|
|
126
109
|
};
|
|
127
|
-
|
|
128
|
-
|
|
110
|
+
status: number;
|
|
111
|
+
};
|
|
112
|
+
export declare type FaceLivenessResponseType = FaceLivenessResultType & {
|
|
129
113
|
images: Array<string>;
|
|
114
|
+
transactionId: string;
|
|
115
|
+
sessionId: string;
|
|
130
116
|
};
|
|
131
117
|
export declare type FaceDetectionResponseType = {
|
|
132
118
|
capture: Array<string>;
|
|
133
119
|
};
|
|
134
120
|
export declare type DocumentReaderResponseType = Response;
|
|
135
121
|
export declare type CameraSnapshotResponseType = CaptureType;
|
|
136
|
-
export declare type FaceLivenessResultType = Omit<FaceLivenessResponseType, 'images'>;
|
|
137
122
|
export declare type FaceDebugOutput = {
|
|
138
123
|
cft: boolean;
|
|
139
124
|
face: {
|
|
@@ -241,6 +226,30 @@ export declare type DocumentReaderProcessParam = {
|
|
|
241
226
|
timeoutFromFirstDocType?: number;
|
|
242
227
|
resultTypeOutput?: Array<string>;
|
|
243
228
|
customParams?: Record<string, any>;
|
|
229
|
+
imageOutputMaxHeight?: number;
|
|
230
|
+
imageOutputMaxWidth?: number;
|
|
231
|
+
doublePageSpread?: boolean;
|
|
232
|
+
generateDoublePageSpreadImage?: boolean;
|
|
233
|
+
fieldTypesFilter?: Array<number>;
|
|
234
|
+
dateFormat?: string;
|
|
235
|
+
measureSystem?: number;
|
|
236
|
+
imageDpiOutMax?: number;
|
|
237
|
+
alreadyCropped?: boolean;
|
|
238
|
+
fastDocDetect?: boolean;
|
|
239
|
+
updateOCRValidityByGlare?: boolean;
|
|
240
|
+
returnCroppedBarcode?: boolean;
|
|
241
|
+
respectImageQuality?: boolean;
|
|
242
|
+
forceDocFormat?: number;
|
|
243
|
+
noGraphics?: boolean;
|
|
244
|
+
documentAreaMin?: number;
|
|
245
|
+
depersonalizeLog?: boolean;
|
|
246
|
+
multiDocOnImage?: boolean;
|
|
247
|
+
shiftExpiryDate?: number;
|
|
248
|
+
minimalHolderAge?: number;
|
|
249
|
+
mrzFormatsFilter?: Array<string>;
|
|
250
|
+
forceReadMrzBeforeLocate?: boolean;
|
|
251
|
+
parseBarcodes?: boolean;
|
|
252
|
+
splitNames?: boolean;
|
|
244
253
|
imageQa?: {
|
|
245
254
|
expectedPass?: Array<string>;
|
|
246
255
|
dpiThreshold?: number;
|
|
@@ -269,7 +278,6 @@ export interface StreamDataType {
|
|
|
269
278
|
status: StreamStatus;
|
|
270
279
|
stream: MediaStream | null;
|
|
271
280
|
camera: CameraTypes;
|
|
272
|
-
twoFacingModesAvailable: boolean;
|
|
273
281
|
}
|
|
274
282
|
export declare type StreamParams = {
|
|
275
283
|
cameraMode: FacingModeType;
|
|
@@ -282,7 +290,7 @@ export declare type CameraTypes = {
|
|
|
282
290
|
backCameras: Array<CameraModel>;
|
|
283
291
|
};
|
|
284
292
|
export declare type CurrentPage = {
|
|
285
|
-
data: Response;
|
|
293
|
+
data: Response | null;
|
|
286
294
|
startNextPage: () => Promise<void>;
|
|
287
295
|
finishRecognition: () => void;
|
|
288
296
|
};
|
|
@@ -295,10 +303,11 @@ declare global {
|
|
|
295
303
|
}
|
|
296
304
|
}
|
|
297
305
|
interface IBaseComponent {
|
|
298
|
-
locale?:
|
|
306
|
+
locale?: Locales;
|
|
299
307
|
copyright?: boolean;
|
|
300
308
|
'camera-id'?: string;
|
|
301
309
|
'change-camera'?: boolean;
|
|
310
|
+
'start-screen'?: boolean;
|
|
302
311
|
}
|
|
303
312
|
interface IDocumentBaseComponent extends IBaseComponent {
|
|
304
313
|
'start-screen'?: boolean;
|
|
@@ -318,9 +327,17 @@ export interface IFaceDetection extends IBaseComponent {
|
|
|
318
327
|
debug?: boolean;
|
|
319
328
|
}
|
|
320
329
|
export declare type ICameraSnapshot = IDocumentBaseComponent;
|
|
321
|
-
export
|
|
330
|
+
export declare type FacePositionLivenessDetection = {
|
|
331
|
+
width: number;
|
|
332
|
+
height: number;
|
|
333
|
+
x: number;
|
|
334
|
+
y: number;
|
|
335
|
+
};
|
|
336
|
+
export { default as DocumentReaderService } from './services/DocumentReaderService';
|
|
337
|
+
export { default as DocumentReaderProcessor } from './services/DocumentReaderProcessor';
|
|
322
338
|
export { default as DocumentReaderCaptureWebComponent } from './web-components/CameraSnapshot';
|
|
323
339
|
export { default as DocumentReaderWebComponent } from './web-components/DocumentReader';
|
|
324
340
|
export { default as FaceDetectionWebComponent } from './web-components/FaceDetection';
|
|
325
341
|
export { default as FaceLivenessWebComponent } from './web-components/FaceLiveness';
|
|
326
342
|
export { default as FullScreenContainer } from './web-components/FullScreenContainer';
|
|
343
|
+
export { defineComponents } from './index-document';
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocumentDictionaries } from '../types';
|
|
2
2
|
export default class DocumentReaderCaptureWebComponent extends HTMLElement {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
private _root;
|
|
4
|
+
private _mounted;
|
|
5
|
+
private _translations;
|
|
5
6
|
constructor();
|
|
6
7
|
static get observedAttributes(): Array<string>;
|
|
7
8
|
attributeChangedCallback(name: string): void;
|
|
8
9
|
connectedCallback(): void;
|
|
10
|
+
set translations(dictionary: DocumentDictionaries | null);
|
|
11
|
+
get translations(): DocumentDictionaries | null;
|
|
9
12
|
render(): void;
|
|
10
13
|
disconnectedCallback(): void;
|
|
11
14
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocumentDictionaries } from '../types';
|
|
2
2
|
export default class DocumentReaderWebComponent extends HTMLElement {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
private _root;
|
|
4
|
+
private _mounted;
|
|
5
|
+
private _translations;
|
|
5
6
|
constructor();
|
|
6
7
|
static get observedAttributes(): Array<string>;
|
|
7
8
|
attributeChangedCallback(name: string): void;
|
|
8
9
|
connectedCallback(): void;
|
|
10
|
+
set translations(dictionary: DocumentDictionaries | null);
|
|
11
|
+
get translations(): DocumentDictionaries | null;
|
|
9
12
|
render(): void;
|
|
10
13
|
disconnectedCallback(): void;
|
|
11
14
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Root } from 'react-dom/client';
|
|
2
1
|
export default class FaceDetectionWebComponent extends HTMLElement {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
private _root;
|
|
3
|
+
private _mounted;
|
|
5
4
|
constructor();
|
|
6
5
|
static get observedAttributes(): Array<string>;
|
|
7
6
|
attributeChangedCallback(name: string): void;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { Root } from 'react-dom/client';
|
|
2
1
|
export default class FaceLivenessWebComponent extends HTMLElement {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
private _root;
|
|
3
|
+
private _mounted;
|
|
4
|
+
private _headers;
|
|
5
|
+
private _sessionIdValue;
|
|
6
6
|
constructor();
|
|
7
7
|
static get observedAttributes(): Array<string>;
|
|
8
8
|
attributeChangedCallback(name: string): void;
|
|
9
9
|
connectedCallback(): void;
|
|
10
10
|
set headers(headersData: Record<string, string>);
|
|
11
11
|
get headers(): Record<string, string>;
|
|
12
|
+
set sessionId(id: string);
|
|
13
|
+
get sessionId(): string;
|
|
12
14
|
render(): void;
|
|
13
15
|
disconnectedCallback(): void;
|
|
14
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/vp-frontend-document-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Regula framework agnostic web components to work with webcamera",
|
|
5
5
|
"types": "lib/types.d.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"homepage": "https://storybook-document.regulaforensics.com/",
|
|
16
16
|
"scripts": {
|
|
17
|
-
"start": "webpack serve --config webpack.dev.js",
|
|
18
17
|
"build-face": "npm run clean-lib && npm run generate-face-types && webpack --config webpack.face-umd.js",
|
|
19
18
|
"build-document": "npm run clean-lib && npm run generate-document-types && webpack --config webpack.document-umd.js && webpack --config webpack.document-esm.js",
|
|
20
19
|
"storybook": "start-storybook -p 6006 -c .storybook-development -h localhost",
|
|
@@ -24,6 +23,8 @@
|
|
|
24
23
|
"build-storybook-document-rc": "build-storybook -c .storybook-rc/document",
|
|
25
24
|
"build-storybook-face-release": "build-storybook -c .storybook-release/face",
|
|
26
25
|
"build-storybook-document-release": "build-storybook -c .storybook-release/document",
|
|
26
|
+
"build-storybook-document-beta": "build-storybook -c .storybook-beta/document",
|
|
27
|
+
"build-storybook-face-beta": "build-storybook -c .storybook-beta/face",
|
|
27
28
|
"generate-dictionaries": "node scripts/xml-dictionary-parser/index.js Translator.xml src/i18n/dictionaries",
|
|
28
29
|
"clean-lib": "rm -rf ./lib",
|
|
29
30
|
"generate-face-types": "tsc --project ./configs/face.tsconfig.json",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
39
|
"@regulaforensics/facesdk-webclient": "^3.1.2",
|
|
39
|
-
"@webcomponents/webcomponentsjs": "
|
|
40
|
+
"@webcomponents/webcomponentsjs": "~2.6.0",
|
|
40
41
|
"localize-react": "^1.7.1",
|
|
41
42
|
"react": "^18.2.0",
|
|
42
43
|
"react-device-detect": "^2.2.2",
|
|
@@ -56,6 +57,8 @@
|
|
|
56
57
|
"@regulaforensics/vp-frontend-face-components": "*",
|
|
57
58
|
"@regulaforensics/vp-frontend-face-components-nightly": "*",
|
|
58
59
|
"@regulaforensics/vp-frontend-face-components-rc": "*",
|
|
60
|
+
"@regulaforensics/vp-frontend-document-components-beta": "*",
|
|
61
|
+
"@regulaforensics/vp-frontend-face-components-beta": "*",
|
|
59
62
|
"@storybook/addon-actions": "^6.5.13",
|
|
60
63
|
"@storybook/addon-essentials": "^6.5.13",
|
|
61
64
|
"@storybook/addon-links": "^6.5.13",
|
|
@@ -77,7 +80,6 @@
|
|
|
77
80
|
"eslint-plugin-react": "^7.31.8",
|
|
78
81
|
"fast-xml-parser": "^4.0.10",
|
|
79
82
|
"he": "^1.2.0",
|
|
80
|
-
"html-webpack-plugin": "^5.5.0",
|
|
81
83
|
"husky": "^8.0.0",
|
|
82
84
|
"lint-staged": "^13.0.3",
|
|
83
85
|
"prettier": "^2.7.1",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare type InstructionScreenProps = {
|
|
3
|
-
onStart: () => void;
|
|
4
|
-
icon: string;
|
|
5
|
-
title: string;
|
|
6
|
-
subtitle: string;
|
|
7
|
-
};
|
|
8
|
-
declare function InstructionScreen({ onStart, icon, title, subtitle }: InstructionScreenProps): JSX.Element;
|
|
9
|
-
export default InstructionScreen;
|