@idscan/idvc2 2.8.2 → 2.8.3

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.
@@ -57,6 +57,7 @@ interface IGeneral {
57
57
  resetAllStepsBtn: string;
58
58
  desktopNotification: {
59
59
  barcode: string;
60
+ mrz: string;
60
61
  other: string;
61
62
  };
62
63
  btnUploader: string;
@@ -13,6 +13,6 @@ export default class VideoCapturing {
13
13
  resetAllSteps(): void;
14
14
  reloadComponent(newConfig: Partial<IConfig>): void;
15
15
  updateDocumentTypes(documentTypes: IDocumentTypeConfig): void;
16
- showSpinner(val: any): void;
16
+ showSpinner(val: boolean): void;
17
17
  private init;
18
18
  }
@@ -4,6 +4,7 @@ export interface IMrzCoords {
4
4
  locations: IMRZLocation;
5
5
  color: 'green' | 'yellow';
6
6
  }
7
+ export declare const loopTimeout: (ms: number) => Promise<unknown>;
7
8
  export declare const unmountIDVC: () => void;
8
9
  export declare const loop: () => Promise<false>;
9
10
  declare const _default: {
@@ -1,23 +1,23 @@
1
1
  import type { ISize } from '../helpers/image';
2
- import type { PDFPreProcessResult, PDFResult } from '../types/pdf';
3
- interface Coord {
2
+ import type { PDFLocation } from '../types/pdf';
3
+ type Coordinate = {
4
4
  x: number;
5
5
  y: number;
6
- }
6
+ };
7
7
  export declare class PdfModule {
8
8
  module: any;
9
- reader: any;
10
9
  handle: any;
11
10
  bw: number;
12
11
  bh: number;
13
12
  src: any;
14
13
  out: any;
15
14
  isAllocate: boolean;
15
+ worker: Worker;
16
+ isProcessing: boolean;
17
+ isInitialized: boolean;
16
18
  successCount: number;
17
19
  pdfCapturedCount: number;
18
- edgMem: any;
19
20
  src2: any;
20
- outLen: any;
21
21
  locations: any;
22
22
  pdfCount: number;
23
23
  geometry: {
@@ -26,16 +26,8 @@ export declare class PdfModule {
26
26
  minPDFframes: number;
27
27
  cropSizes: ISize;
28
28
  canvasSizes: ISize;
29
- private preProcessCore;
30
- private readonly preProcessReader;
31
- constructor(pdf: {
32
- core: any;
33
- processor: any;
34
- }, pdfWithPreProcess?: {
35
- core: any;
36
- processor: any;
37
- });
38
- _errorId: number;
29
+ privateErrorId: number;
30
+ constructor(worker: Worker, key: string, isNeedToLoadPDFWIthPreprocess: boolean);
39
31
  get errorId(): number;
40
32
  set errorId(id: number);
41
33
  get errorVal(): any;
@@ -52,25 +44,12 @@ export declare class PdfModule {
52
44
  errorType: string;
53
45
  errorVal: any;
54
46
  };
55
- getLocations(): void;
56
- setResizedData(data: any): void;
57
- initReader(key: any): void;
58
- destroyReader(): void;
59
- setPdfData(data: any): void;
60
- readPdf(): PDFResult;
61
- releasePdf(): void;
62
47
  create(): void;
63
- free(): void;
64
48
  setSizes(bw: any, bh: any): void;
65
- getSizes(): {
66
- bw: number;
67
- bh: number;
68
- };
69
49
  allocate(): void;
70
- drawCords(locations: Record<string, number>): Coord[];
71
- processPDF(data: ImageData): Record<string, any>;
72
- processPDFWithPreProcess(data: ImageData): PDFPreProcessResult;
73
- private readPDF;
74
- private readPDFWithPreProcess;
50
+ drawCords(locations: PDFLocation): Coordinate[];
51
+ processPDF(data: ImageData): Promise<Record<string, any>>;
52
+ processPDFWithPreProcess(iData: ImageData): Promise<unknown>;
53
+ readPDF(iData: any): Promise<unknown>;
75
54
  }
76
55
  export default PdfModule;
@@ -15,7 +15,7 @@ export interface IMRZLocation {
15
15
  * @return {Promise<boolean>}
16
16
  */
17
17
  export declare const mrzProcess: (smallImage: ImageData) => Promise<boolean>;
18
- export declare const pdfProcess: (smallImage: ImageData) => boolean;
18
+ export declare const pdfProcess: (smallImage: ImageData) => Promise<boolean>;
19
19
  /**
20
20
  *
21
21
  * @param {Base64Image} data - base64 image
@@ -1,10 +1,10 @@
1
- export declare const addSpinnerState: (bottomText?: string, topText?: string) => void;
1
+ export declare const addSpinnerState: (bottomText?: string, topText?: string, isInitializing?: boolean) => void;
2
2
  export declare const removeSpinnerState: () => void;
3
3
  export declare const clearState: () => void;
4
4
  export declare const showSpinner: () => void;
5
5
  export declare const hideSpinner: () => void;
6
6
  declare const _default: {
7
- addSpinnerState: (bottomText?: string, topText?: string) => void;
7
+ addSpinnerState: (bottomText?: string, topText?: string, isInitializing?: boolean) => void;
8
8
  removeSpinnerState: () => void;
9
9
  clearState: () => void;
10
10
  showSpinner: () => void;
@@ -4,7 +4,7 @@ export declare const changeStep: (nextStepNumber: number) => void;
4
4
  export declare const getNextStep: () => number;
5
5
  export declare const changeStepAuto: () => void;
6
6
  export declare const updateStepImgCallback: () => void;
7
- export declare const submitIfFullSteps: (payload?: {}) => void;
7
+ export declare const submitIfFullSteps: (payload?: {}) => Promise<void>;
8
8
  export declare const resetStepResults: (stepIndex?: number) => void;
9
9
  export declare const again: () => void;
10
10
  export declare const setStepImage: () => Promise<void>;
@@ -14,12 +14,12 @@ export declare const setStepImage: () => Promise<void>;
14
14
  * emit submit function if all steps filled with image
15
15
  * @param {Boolean} isNeedToChangeStep - is need to change step
16
16
  */
17
- export declare const emitCurrentStepChangeImage: (isNeedToChangeStep?: boolean) => void;
17
+ export declare const emitCurrentStepChangeImage: (isNeedToChangeStep?: boolean) => Promise<void>;
18
18
  declare const _default: {
19
19
  changeStepAuto: () => void;
20
20
  updateStepImgCallback: () => void;
21
21
  generateSteps: () => void;
22
- submitIfFullSteps: (payload?: {}) => void;
22
+ submitIfFullSteps: (payload?: {}) => Promise<void>;
23
23
  again: () => void;
24
24
  resetStepResults: (stepIndex?: number) => void;
25
25
  updateSteps: () => void;
@@ -0,0 +1,8 @@
1
+ export type PDFWorkerMessage = {
2
+ fn: 'init' | 'process' | 'prepare' | 'setSizes' | 'allocate' | 'pdfWithPreProcess';
3
+ iData?: ImageData;
4
+ key?: string;
5
+ isNeedToLoadPDFWIthPreprocess?: boolean;
6
+ bw: number;
7
+ bh: number;
8
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idscan/idvc2",
3
- "version": "2.8.2",
3
+ "version": "2.8.3",
4
4
  "description": "component for the capturing documents",
5
5
  "main": "dist/idvc.js",
6
6
  "types": "dist/types/idvc.d.ts",