idmission-web-sdk 1.0.139 → 1.0.140
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/dist/components/common/debug.d.ts +1 -1
- package/dist/components/customer_flows/IdValidation.d.ts +1 -1
- package/dist/components/id_capture/FlipIdPrompt.d.ts +2 -1
- package/dist/components/id_capture/IdCapture.d.ts +1 -5
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts +4 -1
- package/dist/components/id_capture/IdCaptureGuides.d.ts +14 -0
- package/dist/components/id_capture/IdCaptureStateProvider.d.ts +80 -0
- package/dist/components/id_capture/IdCaptureWizard.d.ts +2 -1
- package/dist/sdk2.cjs.development.js +1715 -1661
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +1716 -1662
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +4234 -4180
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -313,7 +313,7 @@ export type DetectedObjectDebugBoxProps = {
|
|
|
313
313
|
flipX?: boolean;
|
|
314
314
|
color?: string;
|
|
315
315
|
};
|
|
316
|
-
export declare function IdCaptureDetectedObjectDebugBox({ obj, flipX, color,
|
|
316
|
+
export declare function IdCaptureDetectedObjectDebugBox({ obj, flipX, color, }: DetectedObjectDebugBoxProps): ReactElement;
|
|
317
317
|
export type SelfieCaptureFaceDebugBoxProps = {
|
|
318
318
|
face: Face;
|
|
319
319
|
scaling: DebugScalingDetails;
|
|
@@ -9,7 +9,7 @@ import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage
|
|
|
9
9
|
import { ThemeInput } from '../../themes';
|
|
10
10
|
import { IdCaptureRequirementOption } from '../id_capture/IdCaptureRequirementOption';
|
|
11
11
|
import { CapturedDocuments } from '../id_capture/CapturedDocuments';
|
|
12
|
-
import { IdCaptureGuideType } from '../id_capture/
|
|
12
|
+
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
13
13
|
export type IdValidationAssets = IdCaptureWizardAssets;
|
|
14
14
|
export type IdValidationClassNames = IdCaptureWizardClassNames & {
|
|
15
15
|
additionalDocumentCapture?: AdditionalDocumentCaptureWizardClassNames;
|
|
@@ -27,8 +27,9 @@ export type FlipIdPromptProps = {
|
|
|
27
27
|
imagePadding?: number;
|
|
28
28
|
borderWidth?: number;
|
|
29
29
|
borderColor?: string;
|
|
30
|
+
maskColor?: string;
|
|
30
31
|
assets?: FlipIdPromptAssets;
|
|
31
32
|
classNames?: FlipIdPromptClassNames;
|
|
32
33
|
verbiage?: FlipIdPromptVerbiage;
|
|
33
34
|
};
|
|
34
|
-
export declare const FlipIdPrompt: ({ padding: userSuppliedPadding, imagePadding: userSuppliedImagePadding, borderWidth, borderColor, assets, classNames, verbiage, }: FlipIdPromptProps) => ReactElement;
|
|
35
|
+
export declare const FlipIdPrompt: ({ padding: userSuppliedPadding, imagePadding: userSuppliedImagePadding, borderWidth, borderColor, maskColor, assets, classNames, verbiage, }: FlipIdPromptProps) => ReactElement;
|
|
@@ -6,7 +6,6 @@ import { IdCaptureImagePreviewClassNames } from '../common/SelfieProgressPreview
|
|
|
6
6
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
7
7
|
import { CapturedDocumentType } from './CapturedDocuments';
|
|
8
8
|
import { IdCaptureFitGuideClassNames } from './IdCaptureFitGuide';
|
|
9
|
-
export type IdCaptureGuideType = 'fit' | 'overlay';
|
|
10
9
|
export type IdCaptureAssets = {
|
|
11
10
|
portraitGuidesImageUrl?: string;
|
|
12
11
|
landscapeGuidesImageUrl?: string;
|
|
@@ -49,19 +48,16 @@ export type IdCaptureProps = {
|
|
|
49
48
|
barcodeScanningEnabled?: boolean;
|
|
50
49
|
maxBarcodeScanAttempts?: number;
|
|
51
50
|
focusScoreThreshold?: number;
|
|
52
|
-
guideType?: IdCaptureGuideType;
|
|
53
51
|
guidanceMessage?: string;
|
|
54
52
|
guidanceSatisfied?: boolean;
|
|
55
53
|
onPrediction?: (prediction: IdCapturePrediction) => void;
|
|
56
54
|
onBarcodeScanned?: (result: PDF417DetectionResult) => void;
|
|
57
55
|
onCapture?: (frame: string, width: number, height: number, metadata: CaptureAttemptMetadata) => void;
|
|
58
56
|
onExit?: () => void;
|
|
59
|
-
processingScreen?: React.ReactElement;
|
|
60
|
-
processingDelay?: number;
|
|
61
57
|
assets?: IdCaptureAssets;
|
|
62
58
|
classNames?: IdCaptureClassNames;
|
|
63
59
|
colors?: IdCaptureColors;
|
|
64
60
|
verbiage?: IdCaptureVerbiage;
|
|
65
61
|
debugMode?: boolean;
|
|
66
62
|
};
|
|
67
|
-
export declare const IdCapture: ({ requiredDocumentType, autoCaptureEnabled, autoCaptureScoreThreshold, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, mrzDetectionScoreThreshold, passportPageDetectionThreshold, pdf417DetectionThreshold, focusScoreThreshold, barcodeScanningEnabled, maxBarcodeScanAttempts,
|
|
63
|
+
export declare const IdCapture: ({ requiredDocumentType, autoCaptureEnabled, autoCaptureScoreThreshold, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, mrzDetectionScoreThreshold, passportPageDetectionThreshold, pdf417DetectionThreshold, focusScoreThreshold, barcodeScanningEnabled, maxBarcodeScanAttempts, guidanceMessage, guidanceSatisfied, onPrediction, onBarcodeScanned, onCapture, onExit, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdCaptureProps) => React.ReactElement;
|
|
@@ -12,8 +12,11 @@ export type IdCaptureFitGuideProps = {
|
|
|
12
12
|
borderWidth?: number;
|
|
13
13
|
padding?: number;
|
|
14
14
|
imageUrl?: string;
|
|
15
|
+
frontImageUrl?: string;
|
|
16
|
+
backImageUrl?: string;
|
|
15
17
|
isMirrored?: boolean;
|
|
16
18
|
instruction?: string;
|
|
19
|
+
requestingFlip?: boolean;
|
|
17
20
|
classNames?: IdCaptureFitGuideClassNames;
|
|
18
21
|
};
|
|
19
|
-
export declare const IdCaptureFitGuide: ({ aspectRatio, maskColor, borderRadius, borderColor, borderWidth, padding, imageUrl, isMirrored, instruction, classNames, }: IdCaptureFitGuideProps) => React.JSX.Element;
|
|
22
|
+
export declare const IdCaptureFitGuide: ({ aspectRatio, maskColor, borderRadius, borderColor, borderWidth, padding, imageUrl, frontImageUrl, backImageUrl, isMirrored, instruction, requestingFlip, classNames, }: IdCaptureFitGuideProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IdCaptureFitGuideClassNames } from './IdCaptureFitGuide';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IdCaptureAssets, IdCaptureColors, IdCaptureVerbiage } from './IdCapture';
|
|
4
|
+
export type IdCaptureGuideType = 'fit' | 'overlay';
|
|
5
|
+
export declare function IdCaptureGuides({ guideType, requestingFlip, frontImageUrl, backImageUrl, classNames, assets, colors, verbiage: rawVerbiage, }: {
|
|
6
|
+
guideType?: IdCaptureGuideType;
|
|
7
|
+
requestingFlip?: boolean;
|
|
8
|
+
frontImageUrl?: string;
|
|
9
|
+
backImageUrl?: string;
|
|
10
|
+
classNames?: IdCaptureFitGuideClassNames;
|
|
11
|
+
assets?: IdCaptureAssets;
|
|
12
|
+
colors?: IdCaptureColors;
|
|
13
|
+
verbiage?: IdCaptureVerbiage;
|
|
14
|
+
}): React.JSX.Element;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import React, { Dispatch, ReactNode } from 'react';
|
|
2
|
+
import { CapturedDocumentType } from './CapturedDocuments';
|
|
3
|
+
import { IdCapturePrediction } from './IdCaptureModelsProvider';
|
|
4
|
+
import { PDF417DetectionResult } from '../../lib/barcode/Native';
|
|
5
|
+
import { DetectedObject, DocumentType } from '../../lib/models/DocumentDetection';
|
|
2
6
|
export type IdCaptureState = {
|
|
3
7
|
initialDrawComplete: boolean;
|
|
4
8
|
redrawing: boolean;
|
|
@@ -9,8 +13,55 @@ export type IdCaptureState = {
|
|
|
9
13
|
guideRectOffsetTop: number;
|
|
10
14
|
guideImageWidth: number;
|
|
11
15
|
guideImageHeight: number;
|
|
16
|
+
pageWidth: number;
|
|
17
|
+
pageHeight: number;
|
|
18
|
+
videoWidth: number;
|
|
19
|
+
videoHeight: number;
|
|
20
|
+
detectedObjects: DetectedObject[];
|
|
21
|
+
bestDocument: DetectedObject | undefined;
|
|
22
|
+
bestMrz: DetectedObject | undefined;
|
|
23
|
+
bestPdf417: DetectedObject | undefined;
|
|
24
|
+
documentType: DocumentType;
|
|
25
|
+
requiredDocumentType?: CapturedDocumentType;
|
|
26
|
+
documentInBounds: boolean;
|
|
27
|
+
documentDetectionScore: number;
|
|
28
|
+
documentDetectionThresholdMet: boolean;
|
|
29
|
+
mrzDetectionScore: number;
|
|
30
|
+
mrzDetectionThresholdMet: boolean;
|
|
31
|
+
passportPageDetectionScore: number;
|
|
32
|
+
passportPageDetectionThresholdMet: boolean;
|
|
33
|
+
focusScore: number;
|
|
34
|
+
focusThresholdMet: boolean;
|
|
35
|
+
pdf417DetectionScore: number;
|
|
36
|
+
pdf417DetectionThresholdMet: boolean;
|
|
37
|
+
barcodeScanningEnabled: boolean;
|
|
38
|
+
barcodeResult: PDF417DetectionResult | null;
|
|
39
|
+
waitingForBarcodeScan: boolean;
|
|
40
|
+
shouldScanBarcode: boolean;
|
|
41
|
+
autoCaptureBarcodeRequired: boolean | 'mobile';
|
|
42
|
+
barcodeScanFailedAttempts: number;
|
|
43
|
+
maxBarcodeScanAttempts: number;
|
|
44
|
+
isGoodFrame: boolean;
|
|
45
|
+
goodFramesCount: number;
|
|
46
|
+
goodFramesThreshold: number;
|
|
47
|
+
goodFramesThresholdMet: boolean;
|
|
48
|
+
lastFrameCapturedAt: Date | null;
|
|
49
|
+
frameCaptureRate: number;
|
|
50
|
+
capturing: boolean;
|
|
51
|
+
captured: boolean;
|
|
52
|
+
captureFailed: boolean;
|
|
53
|
+
imageUrl: string | null;
|
|
12
54
|
};
|
|
13
55
|
export type IdCaptureAction = {
|
|
56
|
+
type: 'configure';
|
|
57
|
+
payload: {
|
|
58
|
+
requiredDocumentType?: CapturedDocumentType;
|
|
59
|
+
goodFramesThreshold: number;
|
|
60
|
+
autoCaptureBarcodeRequired: boolean | 'mobile';
|
|
61
|
+
barcodeScanningEnabled: boolean;
|
|
62
|
+
maxBarcodeScanAttempts: number;
|
|
63
|
+
};
|
|
64
|
+
} | {
|
|
14
65
|
type: 'redrawRequested';
|
|
15
66
|
} | {
|
|
16
67
|
type: 'redrawInProgress';
|
|
@@ -23,12 +74,41 @@ export type IdCaptureAction = {
|
|
|
23
74
|
guideRectHeight: number;
|
|
24
75
|
guideRectOffsetTop: number;
|
|
25
76
|
};
|
|
77
|
+
} | {
|
|
78
|
+
type: 'pageRendered';
|
|
79
|
+
payload: {
|
|
80
|
+
pageWidth: number;
|
|
81
|
+
pageHeight: number;
|
|
82
|
+
};
|
|
26
83
|
} | {
|
|
27
84
|
type: 'guideImageLoaded';
|
|
28
85
|
payload: {
|
|
29
86
|
width: number;
|
|
30
87
|
height: number;
|
|
31
88
|
};
|
|
89
|
+
} | {
|
|
90
|
+
type: 'capturing';
|
|
91
|
+
} | {
|
|
92
|
+
type: 'captured';
|
|
93
|
+
} | {
|
|
94
|
+
type: 'captureFailed';
|
|
95
|
+
} | {
|
|
96
|
+
type: 'frameCaptured';
|
|
97
|
+
payload: {
|
|
98
|
+
imageUrl: string;
|
|
99
|
+
};
|
|
100
|
+
} | {
|
|
101
|
+
type: 'objectsDetected';
|
|
102
|
+
payload: {
|
|
103
|
+
prediction: IdCapturePrediction;
|
|
104
|
+
};
|
|
105
|
+
} | {
|
|
106
|
+
type: 'barcodeScanned';
|
|
107
|
+
payload: {
|
|
108
|
+
result: PDF417DetectionResult;
|
|
109
|
+
};
|
|
110
|
+
} | {
|
|
111
|
+
type: 'barcodeScanFailed';
|
|
32
112
|
};
|
|
33
113
|
export type IdCaptureDispatch = Dispatch<IdCaptureAction>;
|
|
34
114
|
export declare const IdCaptureStateContext: React.Context<IdCaptureState>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { IdCaptureAssets, IdCaptureClassNames, IdCaptureColors,
|
|
2
|
+
import { IdCaptureAssets, IdCaptureClassNames, IdCaptureColors, IdCaptureVerbiage } from './IdCapture';
|
|
3
3
|
import { IdCaptureLoadingOverlayAssets, IdCaptureLoadingOverlayClassNames, IdCaptureLoadingOverlayColors, IdCaptureLoadingOverlayVerbiage } from './IdCaptureLoadingOverlay';
|
|
4
4
|
import { FlipIdPromptAssets, FlipIdPromptClassNames, FlipIdPromptVerbiage } from './FlipIdPrompt';
|
|
5
5
|
import { CapturedDocuments } from './CapturedDocuments';
|
|
6
6
|
import { IdCaptureSuccessClassNames, IdCaptureSuccessColors, IdCaptureSuccessVerbiage } from './IdCaptureSuccess';
|
|
7
7
|
import { IdCaptureFallbackClassNames, IdCaptureFallbackColors, IdCaptureFallbackVerbiage } from '../fallback_flows/IdCapture';
|
|
8
8
|
import { IdCaptureRequirementOption } from './IdCaptureRequirementOption';
|
|
9
|
+
import { IdCaptureGuideType } from './IdCaptureGuides';
|
|
9
10
|
export type IdCaptureWizardAssets = {
|
|
10
11
|
documentDetectionModelUrl?: string;
|
|
11
12
|
focusModelUrl?: string;
|