@idscan/idvc2 3.6.0 → 3.8.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 +7 -0
- package/dist/idvc.js +1 -1
- package/dist/idvc.js.gzip +0 -0
- package/dist/index.html +8 -0
- package/dist/js/defaultConfig.ts +1 -1
- package/dist/js/environment/previewAnimation.ts +9 -0
- package/dist/networks/Face-chunk.js +1 -1
- package/dist/types/constatnts/animations.d.ts +4 -1
- package/dist/types/defaultConfig.d.ts +1 -1
- package/dist/types/environment/previewAnimation.d.ts +3 -0
- package/dist/types/helpers/step-background.d.ts +4 -1
- package/dist/types/modules/Step.d.ts +6 -6
- package/dist/types/modules/ui/ControlButton/index.d.ts +2 -0
- package/dist/types/modules/ui/MainScreen/MainScreen.d.ts +1 -1
- package/dist/types/modules/ui/Uploader/UploaderUI.d.ts +2 -0
- package/dist/types/modules/ui/VideoWrapper/CanvasWrapper.d.ts +2 -2
- package/dist/types/modules/ui/VideoWrapper/CaptureButton.d.ts +15 -0
- package/dist/types/modules/ui/VideoWrapper/{VideoRecorderService.d.ts → MultiImagesRecorderService.d.ts} +2 -2
- package/dist/types/modules/ui/VideoWrapper/StepPreview/StepPreview.d.ts +8 -5
- package/dist/types/modules/ui/VideoWrapper/VideoWrapper.d.ts +3 -5
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ export type StepConfig = {
|
|
|
23
23
|
autocaptureDelay?: number;
|
|
24
24
|
enableDesktopNotification?: boolean;
|
|
25
25
|
enableFourCornerCapture?: boolean;
|
|
26
|
-
|
|
26
|
+
shouldRecordMultiImages?: boolean;
|
|
27
27
|
delayUntilCaptureButtonVisible?: number;
|
|
28
28
|
};
|
|
29
29
|
export type DocumentType = {
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { StepTypeImageName } from '../environment/stepsDescription';
|
|
2
|
-
|
|
2
|
+
import { DocumentTypeName } from '../environment/documentTypes';
|
|
3
|
+
export declare const getFrontImageOfDocument: (documentTypeName: DocumentTypeName | '') => string;
|
|
4
|
+
export declare const getScanLineTranslateYRange: (stepType: StepTypeImageName, documentTypeName: DocumentTypeName | '') => readonly [string, string];
|
|
5
|
+
export declare const getStepBackground: (stepType: StepTypeImageName, documentTypeName: DocumentTypeName | '') => string | undefined;
|
|
@@ -20,7 +20,7 @@ export interface IStepObj {
|
|
|
20
20
|
time?: number;
|
|
21
21
|
configs?: StepConfig[];
|
|
22
22
|
stepTypeImageName: StepTypeImageName;
|
|
23
|
-
|
|
23
|
+
shouldRecordMultiImages?: boolean;
|
|
24
24
|
delayUntilCaptureButtonVisible?: number;
|
|
25
25
|
}
|
|
26
26
|
export interface IStepCallback {
|
|
@@ -28,8 +28,8 @@ export interface IStepCallback {
|
|
|
28
28
|
img: Base64Image | null;
|
|
29
29
|
/** blob step image */
|
|
30
30
|
blob: Blob | null;
|
|
31
|
-
/** blob step
|
|
32
|
-
|
|
31
|
+
/** blob step MultiImages */
|
|
32
|
+
multiImagesBlob?: Blob | null;
|
|
33
33
|
/** step type */
|
|
34
34
|
type: StepType;
|
|
35
35
|
/** is it autocaptured from camera */
|
|
@@ -51,7 +51,7 @@ export interface IStepCallback {
|
|
|
51
51
|
}
|
|
52
52
|
export default class Step implements IStepCallback, IStepObj {
|
|
53
53
|
blob: Blob | null;
|
|
54
|
-
|
|
54
|
+
multiImagesBlob: Blob | null;
|
|
55
55
|
errorCode: ErrorCodes | null | undefined;
|
|
56
56
|
mrzText?: string;
|
|
57
57
|
mrzImg?: Base64Image | null;
|
|
@@ -68,9 +68,9 @@ export default class Step implements IStepCallback, IStepObj {
|
|
|
68
68
|
img: Base64Image | null;
|
|
69
69
|
cameraInfo: Record<string, any>;
|
|
70
70
|
stepTypeImageName: StepTypeImageName;
|
|
71
|
-
|
|
71
|
+
shouldRecordMultiImages: boolean;
|
|
72
72
|
delayUntilCaptureButtonVisible?: number;
|
|
73
|
-
constructor(nameOrObj: string | IStepObj
|
|
73
|
+
constructor(nameOrObj: string | IStepObj);
|
|
74
74
|
get isShowManualSwitchButton(): boolean;
|
|
75
75
|
get capturingMode(): StepMode;
|
|
76
76
|
static createStep(stepObj: IStepObj, currentDocumentType: DocumentTypeName | ''): Step;
|
|
@@ -4,7 +4,7 @@ import { CardStep } from '../CardStep/CardStep';
|
|
|
4
4
|
import { VideoWrapper } from '../VideoWrapper/VideoWrapper';
|
|
5
5
|
import { UploaderUI } from '../Uploader/UploaderUI';
|
|
6
6
|
import { StepType } from '../../../environment/stepsDescription';
|
|
7
|
-
import { ControlButton, ControlButtonClickedCustomEvent } from '../ControlButton
|
|
7
|
+
import { ControlButton, ControlButtonClickedCustomEvent } from '../ControlButton';
|
|
8
8
|
import { CallbackHandler, MessageBox } from '../MessageBox/MessageBox';
|
|
9
9
|
import { DesktopNotification, DesktopNotificationVisibility } from '../DesktopNotification/DesktopNotification';
|
|
10
10
|
import { LoaderUI } from '../Loader/LoaderUI';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentLit } from '../ComponentLit';
|
|
2
|
+
import { DocumentTypeName } from '../../../environment/documentTypes';
|
|
2
3
|
import type { StepTypeImageName } from '../../../environment/stepsDescription';
|
|
3
4
|
import type { ErrorCodes } from '../../../environment/langs';
|
|
4
5
|
import Step from '../../Step';
|
|
@@ -9,6 +10,7 @@ export type UploaderState = {
|
|
|
9
10
|
image: string;
|
|
10
11
|
errorCode?: ErrorCodes;
|
|
11
12
|
isBadImage?: boolean;
|
|
13
|
+
documentTypeName: DocumentTypeName | '';
|
|
12
14
|
};
|
|
13
15
|
export type UploaderUIEvents = {
|
|
14
16
|
onFileInput: (event: Event) => void;
|
|
@@ -25,12 +25,12 @@ export declare class CanvasWrapper {
|
|
|
25
25
|
private readonly faceOffset;
|
|
26
26
|
private readonly canvasNames;
|
|
27
27
|
private readonly canvasCtxNames;
|
|
28
|
-
private
|
|
28
|
+
private multiImagesRecorder;
|
|
29
29
|
constructor(componentWrapper: HTMLElement, video: HTMLVideoElement);
|
|
30
30
|
saveCanvas(): void;
|
|
31
31
|
restoreCanvas(): void;
|
|
32
32
|
toggleBorderCanvas(currentStepType: StepType, isStarted: boolean): void;
|
|
33
|
-
|
|
33
|
+
toggleRecordMultiImages(currentStepObj: Step, isStarted: boolean): void;
|
|
34
34
|
clearBorderCtx(): void;
|
|
35
35
|
setVideoCanvasSizes({ width, height }: Size): void;
|
|
36
36
|
getBaseSizes(coefficient?: number): {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ControlButtonEvents } from '../ControlButton';
|
|
2
|
+
export interface ICaptureButton {
|
|
3
|
+
setStart(): void;
|
|
4
|
+
setStop(): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class CaptureButton implements ICaptureButton {
|
|
7
|
+
private controlButton;
|
|
8
|
+
private readonly checkIsCameraErrorVisible;
|
|
9
|
+
constructor(element: HTMLElement, onClick: ControlButtonEvents, checkIsCameraErrorVisible: () => boolean);
|
|
10
|
+
private timeout;
|
|
11
|
+
private showCaptureButtonTimeout;
|
|
12
|
+
private setVisible;
|
|
13
|
+
setStart: () => void;
|
|
14
|
+
setStop: () => void;
|
|
15
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare class
|
|
1
|
+
export declare class MultiImagesRecorderService {
|
|
2
2
|
private mediaRecorder;
|
|
3
3
|
private recordedBlobs;
|
|
4
|
-
private
|
|
4
|
+
private multiImagesType;
|
|
5
5
|
startRecording(canvas: HTMLCanvasElement): void;
|
|
6
6
|
stopRecording(): void;
|
|
7
7
|
private handleDataAvailable;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { ComponentLit } from '../../ComponentLit';
|
|
2
2
|
import type { StepType } from '../../../../environment/stepsDescription';
|
|
3
|
+
import { DocumentTypeName } from '../../../../environment/documentTypes';
|
|
3
4
|
type StepPreviewState = {
|
|
4
5
|
stepType: StepType;
|
|
6
|
+
documentTypeName: DocumentTypeName | '';
|
|
5
7
|
};
|
|
6
8
|
export declare class StepPreview extends ComponentLit<StepPreviewState> {
|
|
7
|
-
private
|
|
9
|
+
#private;
|
|
8
10
|
constructor(mountElement: any, state: StepPreviewState);
|
|
9
|
-
showPreview(
|
|
11
|
+
showPreview(isEnabled: boolean): Promise<void>;
|
|
12
|
+
stopAnimation: () => void;
|
|
10
13
|
backToInitialState(): void;
|
|
11
14
|
remount(): void;
|
|
12
|
-
protected updateView(): void
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
+
protected updateView(): Promise<void>;
|
|
16
|
+
private updateStepBackground;
|
|
17
|
+
private setBackgroundMarkup;
|
|
15
18
|
}
|
|
16
19
|
export {};
|
|
@@ -4,8 +4,8 @@ import { CanvasWrapper } from './CanvasWrapper';
|
|
|
4
4
|
import { UiHints } from './UIHints';
|
|
5
5
|
import Step from '../../Step';
|
|
6
6
|
import { StepPreview } from './StepPreview/StepPreview';
|
|
7
|
-
import { ControlButton } from '../ControlButton/ControlButton';
|
|
8
7
|
import { StatusPlank } from '../StatusPlank/StatusPlank';
|
|
8
|
+
import { ICaptureButton } from './CaptureButton';
|
|
9
9
|
export type UpdateVideoWrapParams = {
|
|
10
10
|
currentStepImg: string;
|
|
11
11
|
currentStepObj: Step;
|
|
@@ -18,7 +18,7 @@ export declare class VideoWrapper {
|
|
|
18
18
|
canvasWrapper: CanvasWrapper;
|
|
19
19
|
hints: UiHints;
|
|
20
20
|
stepPreview: StepPreview;
|
|
21
|
-
captureButton:
|
|
21
|
+
captureButton: ICaptureButton;
|
|
22
22
|
statusPlank: StatusPlank;
|
|
23
23
|
video: HTMLVideoElement;
|
|
24
24
|
videoWrap: HTMLDivElement;
|
|
@@ -31,7 +31,6 @@ export declare class VideoWrapper {
|
|
|
31
31
|
private cameraErrorHeader;
|
|
32
32
|
private cameraErrorText;
|
|
33
33
|
private UIComponents;
|
|
34
|
-
private isShowDemandButton;
|
|
35
34
|
constructor(componentWrapper: HTMLElement);
|
|
36
35
|
updateVideoWrap({ currentStepImg, currentStepObj, }: UpdateVideoWrapParams): void;
|
|
37
36
|
setMirroring(isMirroring: boolean): void;
|
|
@@ -40,12 +39,11 @@ export declare class VideoWrapper {
|
|
|
40
39
|
setFakeContourStyles(width: number): void;
|
|
41
40
|
hideVideoError(): void;
|
|
42
41
|
showVideoError(errorCode: string): void;
|
|
43
|
-
setCaptureButtonHidden(newValue: boolean): void;
|
|
44
42
|
private init;
|
|
45
43
|
setCameraErrorText(header: string, text: string): void;
|
|
46
44
|
showCameraError(): void;
|
|
47
45
|
hideCameraError(): void;
|
|
48
|
-
checkIsCameraErrorVisible()
|
|
46
|
+
checkIsCameraErrorVisible: () => boolean;
|
|
49
47
|
changeType(step: Step): void;
|
|
50
48
|
remountUIComponents(): void;
|
|
51
49
|
private getFakeContourWidth;
|