@idscan/idvc2 2.4.17 → 2.5.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 +13 -1
- package/dist/css/idvc.css +1 -1
- package/dist/idvc.js +1684 -2
- package/dist/index.html +3 -4
- package/dist/js/defaultConfig.ts +0 -8
- package/dist/js/environment/langs.js +1 -1
- package/dist/js/environment/networkNames.json +5 -16
- package/dist/js/environment/stepsDescription.ts +2 -23
- package/dist/networks/156-9239-chunk.js +1 -0
- package/dist/networks/190-77ed-chunk.js +1 -0
- package/dist/networks/77-9e2f-chunk.js +1 -0
- package/dist/networks/Face-e375-chunk.js +1 -0
- package/dist/networks/MRZ-d498-chunk.js +1 -0
- package/dist/networks/PDF-78d2-chunk.js +1 -0
- package/dist/networks/ZXing-5410-chunk.js +1 -0
- package/dist/networks/angle03032023.onnx +0 -0
- package/dist/networks/classLocal03032023.onnx +0 -0
- package/dist/networks/faceDetection03032023.onnx +0 -0
- package/dist/networks/faceLandmark03032023.onnx +0 -0
- package/dist/networks/mrz03032023.onnx +0 -0
- package/dist/networks/ort-wasm-simd-threaded.wasm +0 -0
- package/dist/networks/ort-wasm-simd.wasm +0 -0
- package/dist/networks/ort-wasm-threaded.wasm +0 -0
- package/dist/networks/ort-wasm.wasm +0 -0
- package/package.json +24 -47
- package/dist/idvc.js.LICENSE.txt +0 -219
- package/dist/js/geometry.d.ts +0 -8
- package/dist/js/image.d.ts +0 -5
- package/dist/js/index.d.ts +0 -9
- package/dist/js/loop.d.ts +0 -21
- package/dist/js/mrz.d.ts +0 -105
- package/dist/networks/130-3968-chunk.js +0 -1
- package/dist/networks/215-cb9e-chunk.js +0 -1
- package/dist/networks/400-3816-chunk.js +0 -1
- package/dist/networks/716-d3a2-chunk.js +0 -1
- package/dist/networks/Face-4ffb-chunk.js +0 -1
- package/dist/networks/MRZ-d77b-chunk.js +0 -1
- package/dist/networks/PDF-89f3-chunk.js +0 -1
- package/dist/networks/ZXing-e76f-chunk.js +0 -1
- package/dist/networks/angles20210831.bin +0 -0
- package/dist/networks/angles20210831.json +0 -1
- package/dist/networks/asyncLoader-4593-chunk.js +0 -1
- package/dist/networks/cdnLoader-bdbc-chunk.js +0 -1
- package/dist/networks/classLocal20220112.bin +0 -0
- package/dist/networks/classLocal20220112.json +0 -1
- package/dist/networks/detectormodel20220817.bin +0 -0
- package/dist/networks/detectormodel20220817.json +0 -1
- package/dist/networks/facemesh20210831.bin +0 -0
- package/dist/networks/facemesh20210831.json +0 -1
- package/dist/networks/landmarkmodel20220817.bin +0 -0
- package/dist/networks/landmarkmodel20220817.json +0 -1
- package/dist/networks/mrz20220531.bin +0 -0
- package/dist/networks/mrz20220531.json +0 -1953
- package/dist/types/assets/images/barcode.d.ts +0 -2
- package/dist/types/assets/images/face.d.ts +0 -2
- package/dist/types/assets/images/front.d.ts +0 -2
- package/dist/types/assets/images/mrz.d.ts +0 -2
- package/dist/types/assets/images/pdf.d.ts +0 -2
- package/dist/types/bl.d.ts +0 -15
- package/dist/types/constatnts/camera.d.ts +0 -7
- package/dist/types/constatnts/imageProcessing.d.ts +0 -3
- package/dist/types/context.d.ts +0 -119
- package/dist/types/controllers/LoggerController.d.ts +0 -13
- package/dist/types/controllers/ModuleController.d.ts +0 -57
- package/dist/types/core/LicenseVerificationWasmCore.d.ts +0 -2
- package/dist/types/core/Logger.d.ts +0 -10
- package/dist/types/core/blurCore.d.ts +0 -2
- package/dist/types/core/libheif2.d.ts +0 -2
- package/dist/types/core/libmrzdecode.d.ts +0 -2
- package/dist/types/core/libpdf417.d.ts +0 -2
- package/dist/types/core/wasmpico.d.ts +0 -2
- package/dist/types/core/zxing_reader.d.ts +0 -2
- package/dist/types/custom_tfjs/custom_ops_for_converter.d.ts +0 -28
- package/dist/types/custom_tfjs/custom_tfjs.d.ts +0 -3
- package/dist/types/custom_tfjs/custom_tfjs_core.d.ts +0 -1
- package/dist/types/defaultConfig.d.ts +0 -56
- package/dist/types/environment/designations.d.ts +0 -5
- package/dist/types/environment/documentTypes.d.ts +0 -26
- package/dist/types/environment/langs.d.ts +0 -88
- package/dist/types/environment/loopResult.d.ts +0 -8
- package/dist/types/environment/realFaceModes.d.ts +0 -22
- package/dist/types/environment/stepsDescription.d.ts +0 -71
- package/dist/types/environment/triangulation.d.ts +0 -18
- package/dist/types/helpers/canvas.d.ts +0 -22
- package/dist/types/helpers/color.d.ts +0 -8
- package/dist/types/helpers/dataManipulation.d.ts +0 -27
- package/dist/types/helpers/detectLanguage.d.ts +0 -3
- package/dist/types/helpers/eventListeners.d.ts +0 -14
- package/dist/types/helpers/geometry.d.ts +0 -27
- package/dist/types/helpers/html.d.ts +0 -26
- package/dist/types/helpers/image.d.ts +0 -32
- package/dist/types/helpers/imageprocessing.d.ts +0 -11
- package/dist/types/helpers/licenceKeyError.d.ts +0 -6
- package/dist/types/helpers/logger.d.ts +0 -8
- package/dist/types/helpers/manualUpload.d.ts +0 -7
- package/dist/types/helpers/math.d.ts +0 -37
- package/dist/types/helpers/mobileChecker.d.ts +0 -15
- package/dist/types/helpers/numbers.d.ts +0 -2
- package/dist/types/helpers/step-background.d.ts +0 -2
- package/dist/types/helpers/strings.d.ts +0 -9
- package/dist/types/helpers/time.d.ts +0 -11
- package/dist/types/helpers/ts/common.d.ts +0 -3
- package/dist/types/helpers/updateSelecetTypes.d.ts +0 -2
- package/dist/types/helpers/validators.d.ts +0 -44
- package/dist/types/helpers/windowTensorFlow.d.ts +0 -7
- package/dist/types/idvc.d.ts +0 -19
- package/dist/types/initialize.d.ts +0 -11
- package/dist/types/loader/asyncLoader.d.ts +0 -2
- package/dist/types/loader/cdn/cdnFace.d.ts +0 -2
- package/dist/types/loader/cdn/cdnMRZ.d.ts +0 -4
- package/dist/types/loader/cdn/cdnPDF.d.ts +0 -4
- package/dist/types/loader/cdnLoader.d.ts +0 -2
- package/dist/types/loader/loadTf.d.ts +0 -2
- package/dist/types/loader/loaderFace.d.ts +0 -2
- package/dist/types/loader/loaderMRZ.d.ts +0 -4
- package/dist/types/loader/loaderMeshFace.d.ts +0 -3
- package/dist/types/loader/loaderPDF.d.ts +0 -3
- package/dist/types/loader/loaderSelect.d.ts +0 -2
- package/dist/types/loader/loaderUploadMode.d.ts +0 -1
- package/dist/types/loader/loaderZXing.d.ts +0 -2
- package/dist/types/loader/meshfaceConfig.d.ts +0 -3
- package/dist/types/loader/syncLoader.d.ts +0 -63
- package/dist/types/loop.d.ts +0 -13
- package/dist/types/loopControl.d.ts +0 -10
- package/dist/types/modules/BarcodeModule.d.ts +0 -28
- package/dist/types/modules/Config.d.ts +0 -131
- package/dist/types/modules/Face.d.ts +0 -61
- package/dist/types/modules/FrontProcessing.d.ts +0 -7
- package/dist/types/modules/MeshFace.d.ts +0 -52
- package/dist/types/modules/MetaData.d.ts +0 -10
- package/dist/types/modules/MrzModule.d.ts +0 -114
- package/dist/types/modules/PdfModule.d.ts +0 -79
- package/dist/types/modules/SimpleFace.d.ts +0 -18
- package/dist/types/modules/Step.d.ts +0 -65
- package/dist/types/modules/blur.d.ts +0 -4
- package/dist/types/modules/browwserCompatibilities.d.ts +0 -6
- package/dist/types/modules/camera.d.ts +0 -14
- package/dist/types/modules/cameraManager.d.ts +0 -9
- package/dist/types/modules/fileType.d.ts +0 -1
- package/dist/types/modules/frameQuality.d.ts +0 -10
- package/dist/types/modules/heic.d.ts +0 -11
- package/dist/types/modules/image.d.ts +0 -13
- package/dist/types/modules/initErrorHandler.d.ts +0 -10
- package/dist/types/modules/licenseKeyChecker.d.ts +0 -1
- package/dist/types/modules/manualUpload.d.ts +0 -7
- package/dist/types/modules/manualUploadProcessing.d.ts +0 -30
- package/dist/types/modules/mediaDevices.d.ts +0 -2
- package/dist/types/modules/moduleInitializer.d.ts +0 -8
- package/dist/types/modules/step-functions/face.d.ts +0 -2
- package/dist/types/modules/step-result-processing/barcode.d.ts +0 -2
- package/dist/types/modules/step-result-processing/common.d.ts +0 -1
- package/dist/types/modules/step-result-processing/mrz.d.ts +0 -2
- package/dist/types/modules/step-result-processing/pdf.d.ts +0 -2
- package/dist/types/modules/step-result-processing/simpleFace.d.ts +0 -2
- package/dist/types/modules/step-result-processing/volumeFace.d.ts +0 -3
- package/dist/types/modules/stepFunctions.d.ts +0 -5
- package/dist/types/modules/stepResultProcessing.d.ts +0 -9
- package/dist/types/modules/ui/Flashlight.d.ts +0 -17
- package/dist/types/modules/ui/MaskCapture.d.ts +0 -52
- package/dist/types/modules/ui/MessageBox.d.ts +0 -19
- package/dist/types/modules/ui/Modal.d.ts +0 -20
- package/dist/types/modules/ui/SelectDocumentType.d.ts +0 -45
- 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/ui/swiper.d.ts +0 -3
- package/dist/types/modules/uploader.d.ts +0 -59
- package/dist/types/modules/validation/ValidateBool.d.ts +0 -5
- package/dist/types/modules/validation/ValidateDocumentTypes.d.ts +0 -20
- package/dist/types/modules/validation/ValidateElement.d.ts +0 -5
- package/dist/types/modules/validation/ValidateFunction.d.ts +0 -5
- package/dist/types/modules/validation/ValidateNumber.d.ts +0 -5
- package/dist/types/modules/validation/ValidateString.d.ts +0 -5
- package/dist/types/modules/validation/ValidateStringInArray.d.ts +0 -12
- package/dist/types/modules/validation/showValidationError.d.ts +0 -2
- package/dist/types/modules/validation/validatorFactory.d.ts +0 -10
- package/dist/types/modules/validator.d.ts +0 -10
- package/dist/types/neural models/07072019/exits.d.ts +0 -2
- package/dist/types/neural models/08072019/exits.d.ts +0 -2
- package/dist/types/neural models/09072019/exits.d.ts +0 -2
- package/dist/types/neural models/10072019/exits.d.ts +0 -2
- package/dist/types/neural models/10072019/labels.d.ts +0 -541
- package/dist/types/neural models/angles/exits.d.ts +0 -2
- package/dist/types/neural models/classLocal/exits.d.ts +0 -2
- package/dist/types/neural models/classLocalModel.d.ts +0 -9
- package/dist/types/neural models/keras/exits.d.ts +0 -2
- package/dist/types/neural models/model.d.ts +0 -18
- package/dist/types/neural models/mrz/exits.d.ts +0 -2
- package/dist/types/neural models/mrzModel.d.ts +0 -10
- package/dist/types/neural models/neuralModel.d.ts +0 -20
- package/dist/types/neural models/stick/exits.d.ts +0 -2
- package/dist/types/stepProcessing.d.ts +0 -27
- package/dist/types/types/enums/realFace.d.ts +0 -5
- package/dist/types/types/modules/camera.enum.d.ts +0 -18
- package/dist/types/ui.d.ts +0 -117
- package/dist/types/util.d.ts +0 -34
- package/dist/types/workers/blurWorker.d.ts +0 -1
- package/dist/types/workers/bubbleWorker.d.ts +0 -1
- package/dist/types/workers/loadNetworksWorker.d.ts +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Base64Image } from '../helpers/image';
|
|
2
|
-
interface ICoord {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
}
|
|
6
|
-
export interface IMRZLocation {
|
|
7
|
-
leftTop: ICoord;
|
|
8
|
-
rightTop: ICoord;
|
|
9
|
-
rightBottom: ICoord;
|
|
10
|
-
leftBottom: ICoord;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* process manually uploaded image for MRZ
|
|
14
|
-
* @param {ImageData} smallImage - resized image data
|
|
15
|
-
* @return {Promise<boolean>}
|
|
16
|
-
*/
|
|
17
|
-
export declare const mrzProcess: (smallImage: ImageData) => Promise<boolean>;
|
|
18
|
-
export declare const pdfProcess: (smallImage: ImageData) => boolean;
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @param {Base64Image} data - base64 image
|
|
22
|
-
*/
|
|
23
|
-
export declare const barCodeProcess: (data: Base64Image) => Promise<boolean>;
|
|
24
|
-
export declare const frontProcess: (smallImage: ImageData) => Promise<boolean>;
|
|
25
|
-
declare const _default: {
|
|
26
|
-
mrzProcess: (smallImage: ImageData) => Promise<boolean>;
|
|
27
|
-
pdfProcess: (smallImage: ImageData) => boolean;
|
|
28
|
-
barCodeProcess: (data: string) => Promise<boolean>;
|
|
29
|
-
};
|
|
30
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const setDetectFace: (val: any) => void;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
type ModuleNames = 'mrz' | 'pdf' | 'face' | 'front' | 'barcode';
|
|
2
|
-
type FunctionNames = ModuleNames | 'photo';
|
|
3
|
-
declare const stepFunctionWrapper: (functionName: FunctionNames, ...args: any[]) => any;
|
|
4
|
-
export declare const isStepFunctionExist: (functionName: FunctionNames) => boolean;
|
|
5
|
-
export default stepFunctionWrapper;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
hasFn: (fnName: string) => boolean;
|
|
3
|
-
pdf: (resultObject: any) => void;
|
|
4
|
-
mrz: (resultObject: any) => void;
|
|
5
|
-
SimpleFace: (resultObject: any) => void;
|
|
6
|
-
VolumeFace: (resultObject: import("../types/modules/realFace").RealFaceResultObject) => void;
|
|
7
|
-
barcode: (resultObject: any) => void;
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare class Flashlight {
|
|
2
|
-
private icon;
|
|
3
|
-
private onIcon;
|
|
4
|
-
private offIcon;
|
|
5
|
-
private isEnableFlashLight;
|
|
6
|
-
constructor();
|
|
7
|
-
/**
|
|
8
|
-
* switches visible of lightning icon
|
|
9
|
-
* @param {boolean} val
|
|
10
|
-
*/
|
|
11
|
-
show(val: boolean): void;
|
|
12
|
-
turnOff(): void;
|
|
13
|
-
turnOn(): void;
|
|
14
|
-
get isTurnedOn(): boolean;
|
|
15
|
-
addClickEventListener(fn?: () => void): void;
|
|
16
|
-
}
|
|
17
|
-
export default Flashlight;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
declare class MaskCapture {
|
|
2
|
-
#private;
|
|
3
|
-
private svg;
|
|
4
|
-
private strokeMask;
|
|
5
|
-
private successMask;
|
|
6
|
-
private type;
|
|
7
|
-
private cssVarContainer;
|
|
8
|
-
private borders;
|
|
9
|
-
private cssVars;
|
|
10
|
-
_mainContainerSizes: {
|
|
11
|
-
width: string;
|
|
12
|
-
height: string;
|
|
13
|
-
};
|
|
14
|
-
constructor(cssVarContainer: any);
|
|
15
|
-
/**
|
|
16
|
-
* get computed width and height of element
|
|
17
|
-
* @param {HTMLElement} el
|
|
18
|
-
* @return {{width: string, height: string}}
|
|
19
|
-
*/
|
|
20
|
-
getSizes: (el: any) => {
|
|
21
|
-
width: string;
|
|
22
|
-
height: string;
|
|
23
|
-
};
|
|
24
|
-
get svgSizes(): {
|
|
25
|
-
width: string;
|
|
26
|
-
height: string;
|
|
27
|
-
};
|
|
28
|
-
get strokeSizes(): {
|
|
29
|
-
width: number;
|
|
30
|
-
height: number;
|
|
31
|
-
};
|
|
32
|
-
get strokeLength(): number;
|
|
33
|
-
set sizes({ width, height }: {
|
|
34
|
-
width: any;
|
|
35
|
-
height: any;
|
|
36
|
-
});
|
|
37
|
-
set fillPercentage(percentage: any);
|
|
38
|
-
/**
|
|
39
|
-
* sets the type of capturing mask and it position on screen
|
|
40
|
-
* @param {VideoFacingModeEnum} type - 'environment', 'user'
|
|
41
|
-
*/
|
|
42
|
-
set maskType(type: any);
|
|
43
|
-
/**
|
|
44
|
-
* resizes frame based on width and height of main container
|
|
45
|
-
* @param {{width: number, height: number}} param - width and height of main container
|
|
46
|
-
*/
|
|
47
|
-
set mainContainerSizes({ width, height }: {
|
|
48
|
-
width: any;
|
|
49
|
-
height: any;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
export default MaskCapture;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type MessageBoxType = 'error' | 'primary' | null;
|
|
2
|
-
type CallbackHandler = (event: Event) => void;
|
|
3
|
-
declare class MessageBox {
|
|
4
|
-
#private;
|
|
5
|
-
constructor();
|
|
6
|
-
private setClass;
|
|
7
|
-
get type(): MessageBoxType;
|
|
8
|
-
/**
|
|
9
|
-
* sets the message in message-box
|
|
10
|
-
* @param {string} text - text to set in message-box
|
|
11
|
-
* @param {'error', 'primary'} type - type of message. Default: primary
|
|
12
|
-
*/
|
|
13
|
-
message(text?: string, type?: string): void;
|
|
14
|
-
updateByTypesCount(typesCount?: number): void;
|
|
15
|
-
addChangeDocumentTypeListener(handler: CallbackHandler): void;
|
|
16
|
-
removeAllChangeDocumentTypeListener(): void;
|
|
17
|
-
setCaretVisible(val: boolean): void;
|
|
18
|
-
}
|
|
19
|
-
export default MessageBox;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface DestructedOptions {
|
|
2
|
-
isMobile: boolean;
|
|
3
|
-
background: HTMLDivElement;
|
|
4
|
-
containerId: string;
|
|
5
|
-
mainId?: string;
|
|
6
|
-
doneBtnId: string;
|
|
7
|
-
cancelBtnId: string;
|
|
8
|
-
}
|
|
9
|
-
declare class Modal {
|
|
10
|
-
private background;
|
|
11
|
-
container: HTMLDivElement;
|
|
12
|
-
doneBtn: HTMLButtonElement;
|
|
13
|
-
cancelBtn: HTMLButtonElement;
|
|
14
|
-
constructor(opts: DestructedOptions);
|
|
15
|
-
addDoneHandler(handler: (e?: Event) => void): void;
|
|
16
|
-
addCancelHandler(handler: (e?: Event) => void): void;
|
|
17
|
-
hide(): void;
|
|
18
|
-
show(): void;
|
|
19
|
-
}
|
|
20
|
-
export default Modal;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import Modal from './Modal';
|
|
2
|
-
import { DocumentRecord, DocumentTypeIndex, DocumentTypeName, HumanName } from '../../environment/documentTypes';
|
|
3
|
-
interface DocumenTypeElement {
|
|
4
|
-
name: DocumentTypeName;
|
|
5
|
-
element: HTMLLabelElement;
|
|
6
|
-
id: DocumentTypeIndex;
|
|
7
|
-
nName?: string;
|
|
8
|
-
}
|
|
9
|
-
interface ISpinner {
|
|
10
|
-
addSpinnerState: () => void;
|
|
11
|
-
showSpinner: () => void;
|
|
12
|
-
removeSpinnerState: () => void;
|
|
13
|
-
clearState: () => void;
|
|
14
|
-
hideSpinner: () => void;
|
|
15
|
-
}
|
|
16
|
-
declare class SelectDocumentType extends Modal {
|
|
17
|
-
private list;
|
|
18
|
-
private type;
|
|
19
|
-
elementsList: DocumenTypeElement[];
|
|
20
|
-
private cancelButtonContainer;
|
|
21
|
-
private doneButtonContainer;
|
|
22
|
-
private spinner;
|
|
23
|
-
constructor(isMobile: boolean, background: HTMLDivElement, spinner: ISpinner);
|
|
24
|
-
show(): void;
|
|
25
|
-
hide(): void;
|
|
26
|
-
showCancelButton(): void;
|
|
27
|
-
hideCancelButton(): void;
|
|
28
|
-
addDoneHandler(handler: (e?: Event) => void): void;
|
|
29
|
-
addCancelHandler(handler: (e?: Event) => void): void;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @param {HTMLLabelElement} el
|
|
33
|
-
*/
|
|
34
|
-
setActiveLabel(el: HTMLLabelElement): void;
|
|
35
|
-
createElement: (docType: DocumentTypeName, humanName: HumanName) => HTMLLabelElement;
|
|
36
|
-
hasElement(docType: DocumentTypeName): boolean;
|
|
37
|
-
addElement(docType: DocumentTypeName, element: HTMLLabelElement, id: DocumentTypeIndex): void;
|
|
38
|
-
clearList(): void;
|
|
39
|
-
addType({ name: docType, humanName, id }: DocumentRecord): void;
|
|
40
|
-
render(): void;
|
|
41
|
-
setCheckedLi(): void;
|
|
42
|
-
set selectedType(val: DocumentTypeIndex | 0);
|
|
43
|
-
get selectedType(): DocumentTypeIndex | 0;
|
|
44
|
-
}
|
|
45
|
-
export default SelectDocumentType;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type EventCallback = (e?: Event) => void;
|
|
2
|
-
declare class ForceCapturingButton {
|
|
3
|
-
private isShowing;
|
|
4
|
-
private el;
|
|
5
|
-
private callback;
|
|
6
|
-
constructor();
|
|
7
|
-
get state(): boolean;
|
|
8
|
-
set state(val: boolean);
|
|
9
|
-
addClickCallback(cbl: EventCallback): void;
|
|
10
|
-
setAvailable(status: boolean): void;
|
|
11
|
-
}
|
|
12
|
-
export default ForceCapturingButton;
|
|
@@ -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) => 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) => void;
|
|
8
|
-
removeSpinnerState: () => void;
|
|
9
|
-
clearState: () => void;
|
|
10
|
-
showSpinner: () => void;
|
|
11
|
-
hideSpinner: () => void;
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { StepType } from '../environment/stepsDescription';
|
|
2
|
-
import { Base64Image } from '../helpers/image';
|
|
3
|
-
import { DocumentTypeIndex } from '../environment/documentTypes';
|
|
4
|
-
type SubmitHandler = (base64Obj: Base64Object) => Promise<void>;
|
|
5
|
-
interface Base64Object {
|
|
6
|
-
data: ImageData | Base64Image | null;
|
|
7
|
-
err: boolean;
|
|
8
|
-
}
|
|
9
|
-
interface ISmallStep {
|
|
10
|
-
type: StepType;
|
|
11
|
-
img: Base64Image | null;
|
|
12
|
-
name?: string;
|
|
13
|
-
errorCode?: string | null | undefined;
|
|
14
|
-
}
|
|
15
|
-
declare class Uploader {
|
|
16
|
-
private onsubmit;
|
|
17
|
-
private onHandle;
|
|
18
|
-
private states;
|
|
19
|
-
private readonly types;
|
|
20
|
-
private dropArea;
|
|
21
|
-
private dropAreaBackground;
|
|
22
|
-
private fileInput;
|
|
23
|
-
private stepName;
|
|
24
|
-
private errorTextEl;
|
|
25
|
-
private pressToUpdate;
|
|
26
|
-
private readonly translation;
|
|
27
|
-
protected textFront: HTMLElement;
|
|
28
|
-
protected textBack: HTMLElement;
|
|
29
|
-
protected textFace: HTMLElement;
|
|
30
|
-
protected textPdf: HTMLElement;
|
|
31
|
-
protected textMrz: HTMLElement;
|
|
32
|
-
protected textFrontBack: HTMLElement;
|
|
33
|
-
protected textPass: HTMLElement;
|
|
34
|
-
protected textFacePosition: HTMLElement;
|
|
35
|
-
private moduleController;
|
|
36
|
-
private addedFileTypes;
|
|
37
|
-
constructor(uploaderId: string, type: ISmallStep, onsubmit: SubmitHandler, onHandle: () => void, moduleController: any, addedFileTypes: string[]);
|
|
38
|
-
checkType(typeForCheck: string): string | false;
|
|
39
|
-
handleFiles(data: {
|
|
40
|
-
target: {
|
|
41
|
-
files: FileList;
|
|
42
|
-
};
|
|
43
|
-
} | Event): void;
|
|
44
|
-
setText(): void;
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @param {string} errorCode
|
|
48
|
-
*/
|
|
49
|
-
showError(errorCode: string): void;
|
|
50
|
-
clearStates(): void;
|
|
51
|
-
resetInput(): void;
|
|
52
|
-
highlight(): void;
|
|
53
|
-
unhighlight(): void;
|
|
54
|
-
handleDrop(e: DragEvent): void;
|
|
55
|
-
changeType(step: ISmallStep, docType?: DocumentTypeIndex): void;
|
|
56
|
-
transition(): void;
|
|
57
|
-
setDisabled(val: boolean): void;
|
|
58
|
-
}
|
|
59
|
-
export default Uploader;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IDocumentType } from '../../defaultConfig';
|
|
2
|
-
import { DocumentTypeName } from '../../environment/documentTypes';
|
|
3
|
-
import { StepType } from '../../environment/stepsDescription';
|
|
4
|
-
import { IDocumentTypeConfig, IValidator } from '../validator';
|
|
5
|
-
declare class ValidateDocumentTypes implements IValidator<IDocumentType[]> {
|
|
6
|
-
types: any[];
|
|
7
|
-
steps: any[];
|
|
8
|
-
commonStepTypes: Set<StepType>;
|
|
9
|
-
documentTypes: IDocumentTypeConfig;
|
|
10
|
-
validate(val: IDocumentType[], fallback: IDocumentType[], configName: 'documentTypes'): {
|
|
11
|
-
types: any[];
|
|
12
|
-
steps: any[];
|
|
13
|
-
commonStepTypes: Set<StepType>;
|
|
14
|
-
documentTypes: IDocumentTypeConfig;
|
|
15
|
-
};
|
|
16
|
-
validateTypes(types: string[]): DocumentTypeName[];
|
|
17
|
-
transformDocType({ type, steps }: IDocumentType): void;
|
|
18
|
-
setCommonStepTypes(): void;
|
|
19
|
-
}
|
|
20
|
-
export default ValidateDocumentTypes;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IValidator } from '../validator';
|
|
2
|
-
declare class ValidateDistinctStringInArray implements IValidator<string> {
|
|
3
|
-
/**
|
|
4
|
-
* validates string in given array and set its value
|
|
5
|
-
* @param {String} valueToSet - value that should be set
|
|
6
|
-
* @param {String} defaultValue - fallback if value is not in given array
|
|
7
|
-
* @param {String} configName - name of config
|
|
8
|
-
* @param {String[]} availableValues - array of available values
|
|
9
|
-
*/
|
|
10
|
-
validate(valueToSet: string, defaultValue: string, configName: string, availableValues: string[]): string;
|
|
11
|
-
}
|
|
12
|
-
export default ValidateDistinctStringInArray;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ValidationFn } from '../../defaultConfig';
|
|
2
|
-
import ValidateElement from './ValidateElement';
|
|
3
|
-
import ValidateBool from './ValidateBool';
|
|
4
|
-
import ValidateDistinctStringInArray from './ValidateStringInArray';
|
|
5
|
-
import ValidateDocumentTypes from './ValidateDocumentTypes';
|
|
6
|
-
import ValidateFunction from './ValidateFunction';
|
|
7
|
-
import ValidateNumber from './ValidateNumber';
|
|
8
|
-
import ValidateString from './ValidateString';
|
|
9
|
-
declare const validatorFactory: (name: ValidationFn) => false | ValidateElement | ValidateBool | ValidateDistinctStringInArray | ValidateDocumentTypes | ValidateFunction | ValidateNumber | ValidateString;
|
|
10
|
-
export default validatorFactory;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DocumentTypeName } from '../environment/documentTypes';
|
|
2
|
-
import { DefaultConfigName, IStepConfig } from '../defaultConfig';
|
|
3
|
-
import { PartialRecord } from '../helpers/ts/common';
|
|
4
|
-
export type IDocumentTypeConfig = PartialRecord<DocumentTypeName, IStepConfig[]>;
|
|
5
|
-
type SimpleValidate<T> = (val: T, fallback: T, configName: DefaultConfigName) => any;
|
|
6
|
-
type OneOfArray<T> = (valueToSet: T, defaultValue: T, configName: DefaultConfigName, availableValues: T[]) => any;
|
|
7
|
-
export interface IValidator<T> {
|
|
8
|
-
validate: SimpleValidate<T> | OneOfArray<T>;
|
|
9
|
-
}
|
|
10
|
-
export {};
|