@idscan/idvc2 2.9.0 → 2.10.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 +10 -4
- package/dist/css/idvc.css +1 -1
- package/dist/idvc.js +1 -1
- package/dist/idvc.js.gzip +0 -0
- package/dist/index.html +41 -45
- package/dist/js/defaultConfig.ts +5 -5
- package/dist/js/environment/langs.js +1 -1
- package/dist/js/environment/networkNames.json +1 -2
- package/dist/js/environment/stepsDescription.ts +5 -4
- package/dist/langs.js.gzip +0 -0
- package/dist/networks/Face-chunk.js +1 -1
- package/dist/networks/MRZ-chunk.js +1 -1
- package/dist/networks/blurWorker.js.gzip +0 -0
- package/dist/networks/generalTypeDetectionYolo29052024.onnx.gzip +0 -0
- package/dist/networks/mrzWorker.js.gzip +0 -0
- package/dist/types/bl.d.ts +2 -2
- package/dist/types/constatnts/animations.d.ts +1 -0
- package/dist/types/context.d.ts +1 -129
- package/dist/types/controllers/ModuleController.d.ts +26 -7
- package/dist/types/defaultConfig.d.ts +1 -1
- package/dist/types/environment/langs.d.ts +69 -8
- package/dist/types/environment/stepsDescription.d.ts +1 -0
- package/dist/types/eventListeners/eventListeners.d.ts +1 -1
- package/dist/types/eventListeners/selectDocumentType/selectHandler.d.ts +1 -3
- package/dist/types/helpers/cameraConstraints.d.ts +6 -0
- package/dist/types/helpers/canvas.d.ts +3 -3
- package/dist/types/helpers/detectLanguage.d.ts +1 -0
- package/dist/types/helpers/image.d.ts +6 -7
- package/dist/types/helpers/layoutBreakpoints.d.ts +10 -0
- package/dist/types/helpers/step-background.d.ts +2 -2
- package/dist/types/idvc.d.ts +1 -1
- package/dist/types/loop.d.ts +2 -2
- package/dist/types/{modules/manualUpload.d.ts → manualUpload.d.ts} +3 -3
- package/dist/types/modules/App/UI-Types.d.ts +9 -0
- package/dist/types/modules/App/UI.d.ts +52 -0
- package/dist/types/modules/App/WebLibManualUploader.d.ts +13 -0
- package/dist/types/modules/Config.d.ts +2 -2
- package/dist/types/modules/MrzModule.d.ts +3 -3
- package/dist/types/modules/PdfModule.d.ts +3 -3
- package/dist/types/modules/Slider.d.ts +10 -0
- package/dist/types/modules/Spinner/Spinner.d.ts +22 -0
- package/dist/types/modules/Step.d.ts +7 -3
- package/dist/types/modules/camera/camera.d.ts +2 -2
- package/dist/types/modules/camera/cameraManager.d.ts +6 -2
- package/dist/types/modules/manualUploadProcessing.d.ts +8 -8
- package/dist/types/modules/ui/CardStep/Card.d.ts +33 -0
- package/dist/types/modules/ui/CardStep/CardStep.d.ts +10 -0
- package/dist/types/modules/ui/Component.d.ts +32 -0
- package/dist/types/modules/ui/ControlButton/ControlButton.d.ts +22 -0
- package/dist/types/modules/ui/DesktopNotification/DesktopNotification.d.ts +17 -0
- package/dist/types/modules/ui/DocumentsList/DocumentsList.d.ts +21 -0
- package/dist/types/modules/ui/IDVCVersionPlank/IDVCVersionPlank.d.ts +10 -0
- package/dist/types/modules/ui/InitialLoader/initialLoader.d.ts +12 -0
- package/dist/types/modules/ui/MainScreen/MainScreen.d.ts +75 -0
- package/dist/types/modules/ui/MessageBox/MessageBox.d.ts +30 -0
- package/dist/types/modules/ui/Modal.d.ts +5 -7
- package/dist/types/modules/ui/ModeSwitch/ModeSwitch.d.ts +20 -0
- package/dist/types/modules/ui/Notification/Notification.d.ts +24 -0
- package/dist/types/modules/ui/SelectDocumentType.d.ts +8 -11
- package/dist/types/modules/ui/Spinner/SpinnerUI.d.ts +11 -0
- package/dist/types/modules/ui/StepsList/StepsList.d.ts +48 -0
- package/dist/types/modules/ui/Uploader/UploaderUI.d.ts +39 -0
- package/dist/types/modules/ui/VideoWrapper/CanvasWrapper.d.ts +46 -0
- package/dist/types/modules/ui/{Flashlight.d.ts → VideoWrapper/Flashlight.d.ts} +8 -8
- package/dist/types/modules/ui/VideoWrapper/MaskCapture.d.ts +47 -0
- package/dist/types/modules/ui/VideoWrapper/StepPreview/StepPreview.d.ts +16 -0
- package/dist/types/modules/ui/VideoWrapper/UIHints.d.ts +27 -0
- package/dist/types/modules/ui/VideoWrapper/VideoWrapper.d.ts +44 -0
- package/dist/types/modules/ui/selectDocumentType/documentSelectedEvent.d.ts +2 -2
- package/dist/types/neural models/generalTypeDetectionYoloModel.d.ts +1 -1
- package/dist/types/stepProcessing.d.ts +3 -3
- package/dist/types/types/context.d.ts +121 -0
- package/dist/types/util.d.ts +1 -1
- package/package.json +5 -1
- package/dist/networks/ClassLocal-chunk.js +0 -1
- package/dist/networks/classLocal03032023.onnx.gzip +0 -0
- package/dist/types/loader/loaderClassLocal.d.ts +0 -3
- package/dist/types/modules/heic.d.ts +0 -11
- package/dist/types/modules/ui/MaskCapture.d.ts +0 -76
- package/dist/types/modules/ui/MessageBox.d.ts +0 -21
- package/dist/types/modules/ui/canvas.d.ts +0 -49
- package/dist/types/modules/ui/forceCaptruringBtn.d.ts +0 -12
- package/dist/types/modules/ui/hints.d.ts +0 -17
- package/dist/types/modules/ui/limitations.d.ts +0 -2
- package/dist/types/modules/ui/manualSwitchBtn.d.ts +0 -30
- package/dist/types/modules/ui/spinner.d.ts +0 -13
- package/dist/types/modules/uploader.d.ts +0 -58
- package/dist/types/neural models/classLocal/exits.d.ts +0 -4
- package/dist/types/neural models/classLocalModel.d.ts +0 -29
- package/dist/types/ui.d.ts +0 -93
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RealFaceTurnSide } from '../../types/enums/realFace';
|
|
2
|
-
declare class UiHints {
|
|
3
|
-
static holdText: HTMLSpanElement;
|
|
4
|
-
static arrowUpHintContainer: HTMLDivElement;
|
|
5
|
-
static arrowLeftHintContainer: HTMLDivElement;
|
|
6
|
-
static arrowRightHintContainer: HTMLDivElement;
|
|
7
|
-
static arrowLeftFaceTheCameraContainer: HTMLDivElement;
|
|
8
|
-
static arrowRightFaceTheCameraContainer: HTMLDivElement;
|
|
9
|
-
static currentArrowContainer: HTMLDivElement | null;
|
|
10
|
-
static init(): void;
|
|
11
|
-
static showFaceTheCameraArrows(): void;
|
|
12
|
-
static hideFaceTheCameraArrows(): void;
|
|
13
|
-
static showArrow(arrowNumber: RealFaceTurnSide, data: any, isCorrectDirection: any): void;
|
|
14
|
-
static hideArrows(): void;
|
|
15
|
-
static updateHoldText(data?: number, isCorrectDirection?: boolean): string;
|
|
16
|
-
}
|
|
17
|
-
export default UiHints;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { IStepModeKeys } from '../../defaultConfig';
|
|
2
|
-
type EventCallback = (e?: Event) => void;
|
|
3
|
-
export interface IManualSwitchBtn {
|
|
4
|
-
el: HTMLButtonElement | null;
|
|
5
|
-
loadingEl: HTMLDivElement | null;
|
|
6
|
-
containerEl: HTMLDivElement | null;
|
|
7
|
-
state: IStepModeKeys | null;
|
|
8
|
-
callback: EventCallback | null;
|
|
9
|
-
setLoading(status: boolean): void;
|
|
10
|
-
setEnabled(status: boolean): void;
|
|
11
|
-
setAvailable(status: boolean): void;
|
|
12
|
-
setState(state: IStepModeKeys): void;
|
|
13
|
-
addClickCallback(cbl: EventCallback): void;
|
|
14
|
-
setText(): void;
|
|
15
|
-
}
|
|
16
|
-
declare class ManualSwitchBtn implements IManualSwitchBtn {
|
|
17
|
-
el: any;
|
|
18
|
-
loadingEl: any;
|
|
19
|
-
containerEl: any;
|
|
20
|
-
state: any;
|
|
21
|
-
callback: any;
|
|
22
|
-
constructor(cameraSupported: boolean);
|
|
23
|
-
setLoading(status: boolean): void;
|
|
24
|
-
setEnabled(status: boolean): void;
|
|
25
|
-
setAvailable(status: boolean): void;
|
|
26
|
-
setText(): void;
|
|
27
|
-
setState(state: IStepModeKeys): void;
|
|
28
|
-
addClickCallback(cbl: EventCallback): void;
|
|
29
|
-
}
|
|
30
|
-
export default ManualSwitchBtn;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const addSpinnerState: (bottomText?: string, topText?: string, isInitializing?: boolean) => void;
|
|
2
|
-
export declare const removeSpinnerState: () => void;
|
|
3
|
-
export declare const clearState: () => void;
|
|
4
|
-
export declare const showSpinner: () => void;
|
|
5
|
-
export declare const hideSpinner: () => void;
|
|
6
|
-
declare const _default: {
|
|
7
|
-
addSpinnerState: (bottomText?: string, topText?: string, isInitializing?: boolean) => void;
|
|
8
|
-
removeSpinnerState: () => void;
|
|
9
|
-
clearState: () => void;
|
|
10
|
-
showSpinner: () => void;
|
|
11
|
-
hideSpinner: () => void;
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { StepType } from '../environment/stepsDescription';
|
|
2
|
-
import { Base64Image } from '../helpers/image';
|
|
3
|
-
type SubmitHandler = (base64Obj: Base64Object) => Promise<void>;
|
|
4
|
-
interface Base64Object {
|
|
5
|
-
data: ImageData | Base64Image | null;
|
|
6
|
-
err: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface ISmallStep {
|
|
9
|
-
type: StepType;
|
|
10
|
-
img: Base64Image | null;
|
|
11
|
-
name?: string;
|
|
12
|
-
errorCode?: string | null | undefined;
|
|
13
|
-
}
|
|
14
|
-
declare class Uploader {
|
|
15
|
-
private onsubmit;
|
|
16
|
-
private onHandle;
|
|
17
|
-
protected textFront: HTMLElement;
|
|
18
|
-
protected textBack: HTMLElement;
|
|
19
|
-
protected textFace: HTMLElement;
|
|
20
|
-
protected textPdf: HTMLElement;
|
|
21
|
-
protected textMrz: HTMLElement;
|
|
22
|
-
protected textFrontBack: HTMLElement;
|
|
23
|
-
protected textPass: HTMLElement;
|
|
24
|
-
protected textFacePosition: HTMLElement;
|
|
25
|
-
private states;
|
|
26
|
-
private readonly types;
|
|
27
|
-
private dropArea;
|
|
28
|
-
private dropAreaBackground;
|
|
29
|
-
private fileInput;
|
|
30
|
-
private stepName;
|
|
31
|
-
private errorTextEl;
|
|
32
|
-
private pressToUpdate;
|
|
33
|
-
private readonly translation;
|
|
34
|
-
private moduleController;
|
|
35
|
-
private addedFileTypes;
|
|
36
|
-
constructor(uploaderId: string, type: ISmallStep, onsubmit: SubmitHandler, onHandle: () => void, moduleController: any, addedFileTypes: string[]);
|
|
37
|
-
checkType(typeForCheck: string): string | false;
|
|
38
|
-
handleFiles(data: {
|
|
39
|
-
target: {
|
|
40
|
-
files: FileList;
|
|
41
|
-
};
|
|
42
|
-
} | Event): void;
|
|
43
|
-
setText(): void;
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* @param {string} errorCode
|
|
47
|
-
*/
|
|
48
|
-
showError(errorCode: string): void;
|
|
49
|
-
clearStates(): void;
|
|
50
|
-
resetInput(): void;
|
|
51
|
-
highlight(): void;
|
|
52
|
-
unhighlight(): void;
|
|
53
|
-
handleDrop(e: DragEvent): void;
|
|
54
|
-
changeType(step: ISmallStep): void;
|
|
55
|
-
transition(): void;
|
|
56
|
-
setDisabled(val: boolean): void;
|
|
57
|
-
}
|
|
58
|
-
export default Uploader;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="onnxruntime-web" />
|
|
2
|
-
import NeuralModel from './neuralModel';
|
|
3
|
-
import { Provider } from './Provider';
|
|
4
|
-
import { RGBColor32 } from '../helpers/image';
|
|
5
|
-
import { ClassLocalExitType } from './classLocal/exits';
|
|
6
|
-
import { Bbox } from '../types/geometry';
|
|
7
|
-
import { IOffset, ISize } from '../helpers/ts/common';
|
|
8
|
-
/**
|
|
9
|
-
* perimeterInPercents: document perimeter in percents
|
|
10
|
-
*/
|
|
11
|
-
export interface InterpretClassLocalRes {
|
|
12
|
-
side: ClassLocalExitType;
|
|
13
|
-
bbox: Bbox;
|
|
14
|
-
perimeterInPercents: ISize;
|
|
15
|
-
}
|
|
16
|
-
interface Prediction {
|
|
17
|
-
label: ClassLocalExitType;
|
|
18
|
-
score: number;
|
|
19
|
-
}
|
|
20
|
-
export type PredictionList = Prediction[];
|
|
21
|
-
export declare class ClassLocalModel extends NeuralModel {
|
|
22
|
-
private canvasSize;
|
|
23
|
-
constructor(url?: string, provider?: Provider, wasmPaths?: string);
|
|
24
|
-
setSizes({ height, width }: ISize): void;
|
|
25
|
-
predictFromImage(input: HTMLCanvasElement | HTMLImageElement | ImageData, dstCanvas?: HTMLCanvasElement, offsets?: IOffset, cropSizes?: ISize): Promise<any[] | InterpretClassLocalRes>;
|
|
26
|
-
interpret(classifierData: Float32Array, bboxData: Float32Array): InterpretClassLocalRes;
|
|
27
|
-
protected predict(rgb: RGBColor32): Promise<import("onnxruntime-web").InferenceSession.OnnxValueMapType>;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
package/dist/types/ui.d.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import ForceBtn from './modules/ui/forceCaptruringBtn';
|
|
2
|
-
import { ISize } from './helpers/image';
|
|
3
|
-
import SelectDocumentType from './modules/ui/SelectDocumentType';
|
|
4
|
-
import MessageBox from './modules/ui/MessageBox';
|
|
5
|
-
import MaskCapture from './modules/ui/MaskCapture';
|
|
6
|
-
import Flashlight from './modules/ui/Flashlight';
|
|
7
|
-
import { IManualSwitchBtn } from './modules/ui/manualSwitchBtn';
|
|
8
|
-
import CanvasUi from './modules/ui/canvas';
|
|
9
|
-
export declare const getCoefficient: () => number;
|
|
10
|
-
declare class Ui {
|
|
11
|
-
dialogTypeBackground: HTMLDivElement;
|
|
12
|
-
stepImg: HTMLDivElement;
|
|
13
|
-
videoError: HTMLDivElement;
|
|
14
|
-
btnsWrap: HTMLDivElement;
|
|
15
|
-
uploaderWrap: HTMLDivElement;
|
|
16
|
-
videoPos: HTMLDivElement;
|
|
17
|
-
fakeContour: HTMLDivElement;
|
|
18
|
-
stepsWrapper: HTMLDivElement;
|
|
19
|
-
guidlinesBtn: HTMLDivElement;
|
|
20
|
-
videoWrap: HTMLDivElement;
|
|
21
|
-
resetAllStepsBtn: HTMLDivElement;
|
|
22
|
-
version: HTMLDivElement;
|
|
23
|
-
selectDocumentTypeText: HTMLDivElement;
|
|
24
|
-
retakeBtn: HTMLButtonElement;
|
|
25
|
-
continueBtn: HTMLButtonElement;
|
|
26
|
-
submitBtn: HTMLButtonElement;
|
|
27
|
-
changeBtn: HTMLButtonElement;
|
|
28
|
-
correctBtn: HTMLButtonElement;
|
|
29
|
-
cancelBtn: HTMLButtonElement;
|
|
30
|
-
doneBtn: HTMLButtonElement;
|
|
31
|
-
closeBtn: HTMLButtonElement;
|
|
32
|
-
pressToUpdateText: HTMLElement;
|
|
33
|
-
pressToUpdateTextSuccess: HTMLElement;
|
|
34
|
-
documentType: HTMLParagraphElement;
|
|
35
|
-
desktopNotification: HTMLDivElement;
|
|
36
|
-
videoErrorText: HTMLElement;
|
|
37
|
-
mainContainer: HTMLElement;
|
|
38
|
-
Mask: MaskCapture;
|
|
39
|
-
selectDocumentType: SelectDocumentType;
|
|
40
|
-
forceBtn: ForceBtn;
|
|
41
|
-
msBtn: IManualSwitchBtn;
|
|
42
|
-
messageBox: MessageBox;
|
|
43
|
-
flashlight: Flashlight;
|
|
44
|
-
canvas: CanvasUi;
|
|
45
|
-
video: HTMLVideoElement;
|
|
46
|
-
constructor();
|
|
47
|
-
initTypeSelect(): void;
|
|
48
|
-
resizeMainContainer(): void;
|
|
49
|
-
updateMaskCapture(): void;
|
|
50
|
-
updateHoldText(data?: number, isCorrectDirection?: boolean): void;
|
|
51
|
-
updateStepImg(): void;
|
|
52
|
-
showVideoError(errorCode: string): void;
|
|
53
|
-
hideVideoError(): void;
|
|
54
|
-
updateVideoWrap(): void;
|
|
55
|
-
setVideoWrapEnabled(val?: boolean): void;
|
|
56
|
-
updateContinueBtn(): void;
|
|
57
|
-
updateBtnsWrap(): void;
|
|
58
|
-
updateSubmitBtn(): void;
|
|
59
|
-
updateResetAllBtn(): void;
|
|
60
|
-
updateRetakeButton(): void;
|
|
61
|
-
updateKeyError(): void;
|
|
62
|
-
initGeneralText(): void;
|
|
63
|
-
toggleUploaderWrap(): void;
|
|
64
|
-
setUploaderWrapEnabled(val?: boolean): void;
|
|
65
|
-
toggleVideoPos(): void;
|
|
66
|
-
resizeBorders(): void;
|
|
67
|
-
initDocumentTitle(): void;
|
|
68
|
-
setDefaultVideoCanvasSizes(): void;
|
|
69
|
-
setOffsets(baseWidth: number, baseHeight: number): void;
|
|
70
|
-
setCropSizes(baseWidth: number, baseHeight: number): void;
|
|
71
|
-
getResizedBaseSizes(coefficient: number): {
|
|
72
|
-
resizedBaseWidth: number;
|
|
73
|
-
resizedBasedHeight: number;
|
|
74
|
-
};
|
|
75
|
-
setResizedCrops(resizedBaseWidth: number, resizedBasedHeight: number): void;
|
|
76
|
-
setResizedOffsets(): void;
|
|
77
|
-
getCropSizes(coefficient: number): {
|
|
78
|
-
width: number;
|
|
79
|
-
height: number;
|
|
80
|
-
};
|
|
81
|
-
setCropFace(): void;
|
|
82
|
-
setFaceOffsets({ width }: ISize): void;
|
|
83
|
-
setResizedCanvasSizes({ width, height }: ISize): void;
|
|
84
|
-
getFakeContourWidth(width: number): number;
|
|
85
|
-
setFakeContourStyles(width: number): void;
|
|
86
|
-
setMirroring(): void;
|
|
87
|
-
setDesktopNotificationVisibility(): void;
|
|
88
|
-
}
|
|
89
|
-
declare const ui: {
|
|
90
|
-
ui: Ui | null;
|
|
91
|
-
};
|
|
92
|
-
export declare const initUi: () => void;
|
|
93
|
-
export default ui;
|