@idscan/idvc2 2.6.0 → 2.6.2

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.
Files changed (147) hide show
  1. package/README.md +10 -0
  2. package/dist/idvc.js +1 -1
  3. package/dist/index.html +26 -21
  4. package/dist/js/environment/documentTypes.ts +2 -2
  5. package/dist/js/environment/langs.js +1 -1
  6. package/dist/types/assets/images/barcode.d.ts +2 -0
  7. package/dist/types/assets/images/face.d.ts +2 -0
  8. package/dist/types/assets/images/front.d.ts +2 -0
  9. package/dist/types/assets/images/mrz.d.ts +2 -0
  10. package/dist/types/assets/images/pdf.d.ts +2 -0
  11. package/dist/types/bl.d.ts +15 -0
  12. package/dist/types/constatnts/camera.d.ts +11 -0
  13. package/dist/types/constatnts/imageProcessing.d.ts +3 -0
  14. package/dist/types/constatnts/pdf.d.ts +1 -0
  15. package/dist/types/context.d.ts +127 -0
  16. package/dist/types/controllers/LoggerController.d.ts +13 -0
  17. package/dist/types/controllers/ModuleController.d.ts +11 -0
  18. package/dist/types/defaultConfig.d.ts +60 -0
  19. package/dist/types/environment/designations.d.ts +5 -0
  20. package/dist/types/environment/documentTypes.d.ts +26 -0
  21. package/dist/types/environment/langs.d.ts +89 -0
  22. package/dist/types/environment/loopResult.d.ts +8 -0
  23. package/dist/types/environment/modalPosition.d.ts +19 -0
  24. package/dist/types/environment/realFaceModes.d.ts +22 -0
  25. package/dist/types/environment/stepsDescription.d.ts +62 -0
  26. package/dist/types/environment/triangulation.d.ts +18 -0
  27. package/dist/types/eventListeners/eventListeners.d.ts +15 -0
  28. package/dist/types/eventListeners/selectDocumentType/selectHandler.d.ts +5 -0
  29. package/dist/types/helpers/apiSupport.d.ts +1 -0
  30. package/dist/types/helpers/canvas.d.ts +41 -0
  31. package/dist/types/helpers/color.d.ts +14 -0
  32. package/dist/types/helpers/dataManipulation.d.ts +27 -0
  33. package/dist/types/helpers/detectLanguage.d.ts +3 -0
  34. package/dist/types/helpers/geometry.d.ts +35 -0
  35. package/dist/types/helpers/html.d.ts +26 -0
  36. package/dist/types/helpers/image.d.ts +36 -0
  37. package/dist/types/helpers/imageprocessing.d.ts +11 -0
  38. package/dist/types/helpers/licenceKeyError.d.ts +6 -0
  39. package/dist/types/helpers/manualUpload.d.ts +7 -0
  40. package/dist/types/helpers/math.d.ts +35 -0
  41. package/dist/types/helpers/mobileChecker.d.ts +13 -0
  42. package/dist/types/helpers/numbers.d.ts +2 -0
  43. package/dist/types/helpers/step-background.d.ts +2 -0
  44. package/dist/types/helpers/strings.d.ts +9 -0
  45. package/dist/types/helpers/time.d.ts +11 -0
  46. package/dist/types/helpers/ts/common.d.ts +17 -0
  47. package/dist/types/helpers/updateSelecetTypes.d.ts +3 -0
  48. package/dist/types/helpers/validators.d.ts +44 -0
  49. package/dist/types/idvc.d.ts +18 -0
  50. package/dist/types/initialize.d.ts +12 -0
  51. package/dist/types/loader/asyncLoader.d.ts +1 -0
  52. package/dist/types/loader/loadAnglesModel.d.ts +3 -0
  53. package/dist/types/loader/loadFrontModels.d.ts +3 -0
  54. package/dist/types/loader/loaderBlur.d.ts +2 -0
  55. package/dist/types/loader/loaderClassLocal.d.ts +3 -0
  56. package/dist/types/loader/loaderFace.d.ts +3 -0
  57. package/dist/types/loader/loaderMRZ.d.ts +5 -0
  58. package/dist/types/loader/loaderMeshFace.d.ts +4 -0
  59. package/dist/types/loader/loaderPDF.d.ts +3 -0
  60. package/dist/types/loader/loaderUploadMode.d.ts +1 -0
  61. package/dist/types/loader/loaderZXing.d.ts +2 -0
  62. package/dist/types/loop.d.ts +15 -0
  63. package/dist/types/loopControl.d.ts +10 -0
  64. package/dist/types/modules/BarcodeModule.d.ts +28 -0
  65. package/dist/types/modules/Config.d.ts +140 -0
  66. package/dist/types/modules/FrontProcessing.d.ts +16 -0
  67. package/dist/types/modules/Logger.d.ts +20 -0
  68. package/dist/types/modules/MetaData.d.ts +10 -0
  69. package/dist/types/modules/MrzModule.d.ts +75 -0
  70. package/dist/types/modules/PdfModule.d.ts +80 -0
  71. package/dist/types/modules/Step.d.ts +70 -0
  72. package/dist/types/modules/blurModule.d.ts +6 -0
  73. package/dist/types/modules/browwserCompatibilities.d.ts +7 -0
  74. package/dist/types/modules/camera/camera.d.ts +14 -0
  75. package/dist/types/modules/camera/cameraManager.d.ts +9 -0
  76. package/dist/types/modules/face/Face.d.ts +63 -0
  77. package/dist/types/modules/face/MeshFace.d.ts +48 -0
  78. package/dist/types/modules/face/SimpleFace.d.ts +24 -0
  79. package/dist/types/modules/feature-detect/simd.d.ts +2 -0
  80. package/dist/types/modules/frameQuality.d.ts +10 -0
  81. package/dist/types/modules/heic.d.ts +11 -0
  82. package/dist/types/modules/image.d.ts +13 -0
  83. package/dist/types/modules/initErrorHandler.d.ts +10 -0
  84. package/dist/types/modules/licenseKeyChecker.d.ts +1 -0
  85. package/dist/types/modules/manualUpload.d.ts +7 -0
  86. package/dist/types/modules/manualUploadProcessing.d.ts +27 -0
  87. package/dist/types/modules/mediaDevices.d.ts +2 -0
  88. package/dist/types/modules/moduleInitializer.d.ts +8 -0
  89. package/dist/types/modules/step-functions/back.d.ts +2 -0
  90. package/dist/types/modules/step-functions/face.d.ts +2 -0
  91. package/dist/types/modules/step-functions/pdf.d.ts +20 -0
  92. package/dist/types/modules/step-result-processing/back.d.ts +2 -0
  93. package/dist/types/modules/step-result-processing/barcode.d.ts +2 -0
  94. package/dist/types/modules/step-result-processing/common.d.ts +1 -0
  95. package/dist/types/modules/step-result-processing/mrz.d.ts +2 -0
  96. package/dist/types/modules/step-result-processing/pdf.d.ts +2 -0
  97. package/dist/types/modules/step-result-processing/simpleFace.d.ts +2 -0
  98. package/dist/types/modules/step-result-processing/volumeFace.d.ts +7 -0
  99. package/dist/types/modules/stepFunctions.d.ts +5 -0
  100. package/dist/types/modules/stepResultProcessing.d.ts +10 -0
  101. package/dist/types/modules/supaBaseClient.d.ts +2 -0
  102. package/dist/types/modules/ui/Flashlight.d.ts +17 -0
  103. package/dist/types/modules/ui/MaskCapture.d.ts +52 -0
  104. package/dist/types/modules/ui/MessageBox.d.ts +20 -0
  105. package/dist/types/modules/ui/Modal.d.ts +20 -0
  106. package/dist/types/modules/ui/SelectDocumentType.d.ts +37 -0
  107. package/dist/types/modules/ui/canvas.d.ts +48 -0
  108. package/dist/types/modules/ui/forceCaptruringBtn.d.ts +12 -0
  109. package/dist/types/modules/ui/hints.d.ts +17 -0
  110. package/dist/types/modules/ui/limitations.d.ts +2 -0
  111. package/dist/types/modules/ui/manualSwitchBtn.d.ts +30 -0
  112. package/dist/types/modules/ui/selectDocumentType/documentSelectedEvent.d.ts +7 -0
  113. package/dist/types/modules/ui/spinner.d.ts +13 -0
  114. package/dist/types/modules/ui/swiper.d.ts +3 -0
  115. package/dist/types/modules/uploader.d.ts +58 -0
  116. package/dist/types/modules/validation/ValidateBool.d.ts +5 -0
  117. package/dist/types/modules/validation/ValidateDocumentTypes.d.ts +20 -0
  118. package/dist/types/modules/validation/ValidateElement.d.ts +5 -0
  119. package/dist/types/modules/validation/ValidateFunction.d.ts +5 -0
  120. package/dist/types/modules/validation/ValidateNumber.d.ts +5 -0
  121. package/dist/types/modules/validation/ValidateString.d.ts +5 -0
  122. package/dist/types/modules/validation/ValidateStringInArray.d.ts +12 -0
  123. package/dist/types/modules/validation/showValidationError.d.ts +2 -0
  124. package/dist/types/modules/validation/validatorFactory.d.ts +10 -0
  125. package/dist/types/modules/validator.d.ts +12 -0
  126. package/dist/types/neural models/Provider.d.ts +4 -0
  127. package/dist/types/neural models/anglesModel.d.ts +14 -0
  128. package/dist/types/neural models/blazeFaceModel.d.ts +27 -0
  129. package/dist/types/neural models/classLocal/exits.d.ts +4 -0
  130. package/dist/types/neural models/classLocalModel.d.ts +28 -0
  131. package/dist/types/neural models/meshFaceModel.d.ts +17 -0
  132. package/dist/types/neural models/mrzModel.d.ts +20 -0
  133. package/dist/types/neural models/neuralModel.d.ts +21 -0
  134. package/dist/types/neural models/preload.d.ts +7 -0
  135. package/dist/types/stepProcessing.d.ts +27 -0
  136. package/dist/types/types/enums/realFace.d.ts +4 -0
  137. package/dist/types/types/modules/camera.enum.d.ts +20 -0
  138. package/dist/types/ui.d.ts +90 -0
  139. package/dist/types/util.d.ts +35 -0
  140. package/dist/types/workers/blurWorker.d.ts +1 -0
  141. package/dist/types/workers/bubbleWorker.d.ts +1 -0
  142. package/dist/types/workers/loadNetworksWorker.d.ts +0 -0
  143. package/dist/types/workers/mrzWorker.d.ts +1 -0
  144. package/package.json +7 -3
  145. /package/dist/networks/{ClassLocal-1182-chunk.js → ClassLocal-835d-chunk.js} +0 -0
  146. /package/dist/networks/{Face-769a-chunk.js → Face-e2da-chunk.js} +0 -0
  147. /package/dist/networks/{MRZ-3fce-chunk.js → MRZ-6b1d-chunk.js} +0 -0
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1,12 @@
1
+ import { DocumentTypeName } from '../environment/documentTypes';
2
+ import { DefaultConfigName, IStepConfig } from '../defaultConfig';
3
+ export type IDocumentTypeConfig = {
4
+ type: DocumentTypeName;
5
+ steps: IStepConfig[];
6
+ }[];
7
+ type SimpleValidate<T> = (val: T, fallback: T, configName: DefaultConfigName) => any;
8
+ type OneOfArray<T> = (valueToSet: T, defaultValue: T, configName: DefaultConfigName, availableValues: T[]) => any;
9
+ export interface IValidator<T> {
10
+ validate: SimpleValidate<T> | OneOfArray<T>;
11
+ }
12
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare enum Provider {
2
+ WASM = "wasm",
3
+ WEBGL = "webgl"
4
+ }
@@ -0,0 +1,14 @@
1
+ import { Provider } from './Provider';
2
+ import NeuralModel from './neuralModel';
3
+ import { RGBColor32 } from '../helpers/image';
4
+ interface Prediction {
5
+ label: string;
6
+ score: number;
7
+ }
8
+ export default class AnglesModel extends NeuralModel {
9
+ constructor(url?: string, provider?: Provider, wasmPaths?: string);
10
+ predict(rgb: RGBColor32): Promise<import("onnxruntime-web").InferenceSession.OnnxValueMapType>;
11
+ predictFromImage(input: HTMLCanvasElement | HTMLImageElement, dstCanvas?: HTMLCanvasElement): Promise<Prediction[]>;
12
+ interpret(data: Float32Array): Prediction[];
13
+ }
14
+ export {};
@@ -0,0 +1,27 @@
1
+ import { Provider } from './Provider';
2
+ import NeuralModel from './neuralModel';
3
+ import { RGBColor32 } from '../helpers/image';
4
+ import { BlazeFaceResult } from '../types/neural models/blazeFace';
5
+ import { ICrop } from '../helpers/ts/common';
6
+ export declare const ELEMENT_NUM_OF_ANCHOR = 16;
7
+ export declare const ANCHOR_GRID_SIZE: readonly [readonly [16, 16], readonly [8, 8]];
8
+ export declare const ANCHOR_NUM: readonly [2, 6];
9
+ export default class BlazeFaceModel extends NeuralModel {
10
+ private anchorList;
11
+ private scoreList;
12
+ private regressorList;
13
+ private thresholdLogit;
14
+ private bBoxList;
15
+ private keyPoints;
16
+ private origSize;
17
+ constructor(url?: string, provider?: Provider, wasmPaths?: string);
18
+ createAnchor(): void;
19
+ processImage(crop: ICrop): BlazeFaceResult;
20
+ predict(rgb: RGBColor32): Promise<void>;
21
+ predictFromImage(input: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ImageData, dstCanvas?: HTMLCanvasElement): Promise<BlazeFaceResult>;
22
+ private getBoundingBoxes;
23
+ private calculateIoU;
24
+ private nms;
25
+ private fixInScreen;
26
+ private fillKeyPoints;
27
+ }
@@ -0,0 +1,4 @@
1
+ export type ClassLocalExitType = 'Back' | 'BackWithoutBarcode' | 'Front' | 'None';
2
+ export declare const exits: ClassLocalExitType[];
3
+ export default exits;
4
+ export declare const validBackExits: Set<string>;
@@ -0,0 +1,28 @@
1
+ import NeuralModel from './neuralModel';
2
+ import { Provider } from './Provider';
3
+ import { RGBColor32 } from '../helpers/image';
4
+ import { ClassLocalExitType } from './classLocal/exits';
5
+ import { Bbox } from '../types/geometry';
6
+ import { IOffset, ISize } from '../helpers/ts/common';
7
+ /**
8
+ * perimeterInPercents: document perimeter in percents
9
+ */
10
+ export interface InterpretClassLocalRes {
11
+ side: ClassLocalExitType;
12
+ bbox: Bbox;
13
+ perimeterInPercents: ISize;
14
+ }
15
+ interface Prediction {
16
+ label: ClassLocalExitType;
17
+ score: number;
18
+ }
19
+ export type PredictionList = Prediction[];
20
+ export default class ClassLocalModel extends NeuralModel {
21
+ private canvasSize;
22
+ constructor(url?: string, provider?: Provider, wasmPaths?: string);
23
+ setSizes({ height, width }: ISize): void;
24
+ predict(rgb: RGBColor32): Promise<import("onnxruntime-web").InferenceSession.OnnxValueMapType>;
25
+ predictFromImage(input: HTMLCanvasElement | HTMLImageElement | ImageData, dstCanvas?: HTMLCanvasElement, offsets?: IOffset, cropSizes?: ISize): Promise<any[] | InterpretClassLocalRes>;
26
+ interpret(classifierData: Float32Array, bboxData: Float32Array): InterpretClassLocalRes;
27
+ }
28
+ export {};
@@ -0,0 +1,17 @@
1
+ import NeuralModel from './neuralModel';
2
+ import { Provider } from './Provider';
3
+ import { RGBColor32 } from '../helpers/image';
4
+ import { IBoundingBbox, KeyPointList } from '../types/neural models/blazeFace';
5
+ import { FaceMeshPrediction } from '../types/neural models/meshFace';
6
+ import { ICrop, ISize } from '../helpers/ts/common';
7
+ export default class MeshFaceModel extends NeuralModel {
8
+ origSize: ISize;
9
+ crop: ICrop;
10
+ landmarkList: Float32Array;
11
+ keypointList: KeyPointList;
12
+ constructor(url?: string, provider?: Provider, wasmPaths?: string);
13
+ preProcess(bbox: IBoundingBbox): void;
14
+ predict(rgb: RGBColor32): Promise<FaceMeshPrediction>;
15
+ prepareMesh(src: HTMLCanvasElement | HTMLVideoElement, dst: HTMLCanvasElement): ImageData;
16
+ predictFromImage(input: HTMLCanvasElement | HTMLImageElement, dstCanvas?: HTMLCanvasElement): Promise<FaceMeshPrediction>;
17
+ }
@@ -0,0 +1,20 @@
1
+ import { InferenceSession } from 'onnxruntime-web';
2
+ import NeuralModel from './neuralModel';
3
+ import { Provider } from './Provider';
4
+ import { RGBColor32 } from '../helpers/image';
5
+ interface Prediction {
6
+ value: string;
7
+ confidence: number;
8
+ }
9
+ export type PredictionList = Prediction[];
10
+ export default class MrzModel extends NeuralModel {
11
+ promiseList: Promise<InferenceSession.OnnxValueMapType>[];
12
+ predictionList: PredictionList[];
13
+ constructor(url?: string, provider?: Provider, wasmPaths?: string);
14
+ predict(rgb: RGBColor32): Promise<InferenceSession.OnnxValueMapType>;
15
+ predictFromArray(input: Float32Array, batchSize: number): Promise<PredictionList[]>;
16
+ interpret(data: Float32Array): PredictionList;
17
+ get isLoading(): boolean;
18
+ predictFromImage(input: any, dstCanvas: any): void;
19
+ }
20
+ export {};
@@ -0,0 +1,21 @@
1
+ import { InferenceSession } from 'onnxruntime-web';
2
+ import { Provider } from './Provider';
3
+ import { RGBColor32 } from '../helpers/image';
4
+ export type NeuralModelInitializer = () => Promise<void>;
5
+ declare abstract class NeuralModel {
6
+ private readonly model;
7
+ private readonly provider;
8
+ private url;
9
+ protected loading: boolean;
10
+ protected session: InferenceSession;
11
+ constructor(model?: string, provider?: Provider, url?: string);
12
+ initialize(): Promise<void>;
13
+ createSrc(input: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ImageData, id?: string): HTMLCanvasElement | HTMLVideoElement;
14
+ prepareUri(url: string): void;
15
+ initWasmPath(): void;
16
+ initWasm(): Promise<void>;
17
+ init(): Promise<void>;
18
+ abstract predict(rgb: RGBColor32): any;
19
+ abstract predictFromImage(input: HTMLCanvasElement | HTMLImageElement, dstCanvas?: HTMLCanvasElement): unknown;
20
+ }
21
+ export default NeuralModel;
@@ -0,0 +1,7 @@
1
+ import NeuralModel from './neuralModel';
2
+ import { RGBColor32 } from '../helpers/image';
3
+ export default class Preload extends NeuralModel {
4
+ constructor(wasmPaths: any);
5
+ predict(rgb: RGBColor32): void;
6
+ predictFromImage(input: HTMLCanvasElement | HTMLImageElement, dstCanvas?: HTMLCanvasElement): unknown;
7
+ }
@@ -0,0 +1,27 @@
1
+ export declare const generateSteps: () => void;
2
+ export declare const updateSteps: () => void;
3
+ export declare const changeStep: (nextStepNumber: number) => void;
4
+ export declare const getNextStep: () => number;
5
+ export declare const changeStepAuto: () => void;
6
+ export declare const updateStepImgCallback: () => void;
7
+ export declare const submitIfFullSteps: (payload?: {}) => void;
8
+ export declare const resetStepResults: (stepIndex?: number) => void;
9
+ export declare const again: () => void;
10
+ export declare const setStepImage: () => Promise<void>;
11
+ /**
12
+ * emits change function,
13
+ * emit change step function and
14
+ * emit submit function if all steps filled with image
15
+ * @param {Boolean} isNeedToChangeStep - is need to change step
16
+ */
17
+ export declare const emitCurrentStepChangeImage: (isNeedToChangeStep?: boolean) => void;
18
+ declare const _default: {
19
+ changeStepAuto: () => void;
20
+ updateStepImgCallback: () => void;
21
+ generateSteps: () => void;
22
+ submitIfFullSteps: (payload?: {}) => void;
23
+ again: () => void;
24
+ resetStepResults: (stepIndex?: number) => void;
25
+ updateSteps: () => void;
26
+ };
27
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export declare enum RealFaceTurnSide {
2
+ LEFT = 0,
3
+ RIGHT = 1
4
+ }
@@ -0,0 +1,20 @@
1
+ export declare enum CameraType {
2
+ Back = "environment",
3
+ Front = "user"
4
+ }
5
+ export declare enum CameraNotSupportedReason {
6
+ /** navigator.mediaDevices.getUserMedia
7
+ * is not supported by current browser for current context.
8
+ * */
9
+ MediaDevicesNotSupported = "MediaDevicesNotSupported",
10
+ /** Camera with requested features is not available on current device. */
11
+ CameraNotFound = "CameraNotFound",
12
+ /** Camera access was not granted by the user. */
13
+ CameraNotAllowed = "CameraNotAllowed",
14
+ /** Unable to start playing because camera is already in use. */
15
+ CameraInUse = "CameraInUse",
16
+ /** Camera is currently not available due to a OS or hardware error. */
17
+ CameraNotAvailable = "CameraNotAvailable",
18
+ /** Camera with requested features is not available on current device when needs document verification */
19
+ CameraNotFoundInVerification = "CameraNotFoundInVerification"
20
+ }
@@ -0,0 +1,90 @@
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
+ videoErrorText: HTMLElement;
36
+ mainContainer: HTMLElement;
37
+ Mask: MaskCapture;
38
+ selectDocumentType: SelectDocumentType;
39
+ forceBtn: ForceBtn;
40
+ msBtn: IManualSwitchBtn;
41
+ messageBox: MessageBox;
42
+ flashlight: Flashlight;
43
+ canvas: CanvasUi;
44
+ video: HTMLVideoElement;
45
+ constructor();
46
+ initTypeSelect(): void;
47
+ resizeMainContainer(): void;
48
+ updateHoldText(data?: number, isCorrectDirection?: boolean): void;
49
+ updateStepImg(): void;
50
+ showVideoError(errorCode: string): void;
51
+ hideVideoError(): void;
52
+ updateVideoWrap(): void;
53
+ setVideoWrapEnabled(val?: boolean): void;
54
+ updateContinueBtn(): void;
55
+ updateBtnsWrap(): void;
56
+ updateSubmitBtn(): void;
57
+ updateResetAllBtn(): void;
58
+ updateRetakeButton(): void;
59
+ updateKeyError(): void;
60
+ initGeneralText(): void;
61
+ toggleUploaderWrap(): void;
62
+ setUploaderWrapEnabled(val?: boolean): void;
63
+ toggleVideoPos(): void;
64
+ resizeBorders(): void;
65
+ initDocumentTitle(): void;
66
+ setDefaultVideoCanvasSizes(): void;
67
+ setOffsets(baseWidth: number, baseHeight: number): void;
68
+ setCropSizes(baseWidth: number, baseHeight: number): void;
69
+ getResizedBaseSizes(coefficient: number): {
70
+ resizedBaseWidth: number;
71
+ resizedBasedHeight: number;
72
+ };
73
+ setResizedCrops(resizedBaseWidth: number, resizedBasedHeight: number): void;
74
+ setResizedOffsets(): void;
75
+ getCropSizes(coefficient: number): {
76
+ width: number;
77
+ height: number;
78
+ };
79
+ setCropFace(): void;
80
+ setFaceOffsets({ width }: ISize): void;
81
+ setResizedCanvasSizes({ width, height }: ISize): void;
82
+ getFakeContourWidth(width: number): number;
83
+ setFakeContourStyles(width: number): void;
84
+ setMirroring(): void;
85
+ }
86
+ declare const ui: {
87
+ ui: Ui | null;
88
+ };
89
+ export declare const initUi: () => void;
90
+ export default ui;
@@ -0,0 +1,35 @@
1
+ import { Base64Image } from './helpers/image';
2
+ import { IStepCallback } from './modules/Step';
3
+ import { DocumentTypeIndex } from './environment/documentTypes';
4
+ import { Context } from './context';
5
+ export interface IDataForSubmit {
6
+ metaData?: string;
7
+ payload?: Record<string, any>;
8
+ steps: IStepCallback[];
9
+ documentType: DocumentTypeIndex | 0;
10
+ }
11
+ interface IError {
12
+ code?: string;
13
+ message?: string;
14
+ name?: string;
15
+ }
16
+ export declare const checkIsTouchScreen: () => boolean;
17
+ export declare const filterWithForbiddenKeysValues: (obj: any, forbiddenKeys: any, forbiddenValues: any) => {};
18
+ declare const _default: {
19
+ checkIsTouchScreen: () => boolean;
20
+ prepareCameraErr(err: IError): IError;
21
+ formDataForSubmit(steps: IStepCallback[], c: Context, payload?: {}): IDataForSubmit;
22
+ /**
23
+ *
24
+ * @param img
25
+ * @returns {ImageData}
26
+ */
27
+ imageToImageData(img: HTMLImageElement): ImageData;
28
+ /**
29
+ *
30
+ * @param base64
31
+ * @returns {Promise<ImageData>}
32
+ */
33
+ base64ToImageData(base64: Base64Image): Promise<ImageData>;
34
+ };
35
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
File without changes
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idscan/idvc2",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "component for the capturing documents",
5
5
  "main": "dist/idvc.js",
6
6
  "types": "dist/types/idvc.d.ts",
@@ -15,13 +15,16 @@
15
15
  "scripts": {
16
16
  "prepush": "npm run lint && npm run test",
17
17
  "start": "webpack serve --mode development",
18
- "build": "(webpack --mode production --progress --color) & tsc",
18
+ "start:logging": "webpack serve --mode development --env logging",
19
+ "build": "webpack --mode production --progress --color && tsc",
19
20
  "build:develop": "webpack --mode development --progress --color && npm run pack",
21
+ "build:logging": "webpack --mode production --env logging && tsc",
20
22
  "pack": "npm pack",
21
23
  "minor": "npm version minor",
22
24
  "patch": "npm version patch",
23
25
  "test": "jest --coverage",
24
- "lint": "eslint ./src"
26
+ "lint": "eslint ./src",
27
+ "tsc": "tsc"
25
28
  },
26
29
  "devDependencies": {
27
30
  "@swc/core": "1.3.59",
@@ -57,6 +60,7 @@
57
60
  "webpack-merge": "5.8.0"
58
61
  },
59
62
  "dependencies": {
63
+ "@supabase/supabase-js": "^2.32.0",
60
64
  "assert": "2.0.0",
61
65
  "buffer": "6.0.3",
62
66
  "core-js": "3.30.2",