idmission-web-sdk 2.1.33 → 2.1.35
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/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +4 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +4 -0
- package/dist/components/customer_flows/IdValidation.d.ts +4 -0
- package/dist/components/id_capture/IdCaptureStateProvider.d.ts +4 -0
- package/dist/components/id_capture/IdCaptureWizard.d.ts +3 -1
- package/dist/sdk2.cjs.development.js +158 -123
- 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 +158 -123
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +158 -123
- 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
|
@@ -118,6 +118,10 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
|
|
|
118
118
|
selfieCaptureModelLoadTimeoutMs?: number;
|
|
119
119
|
/** Boolean to indicate whether to allow the user to capture the back of the ID card before capturing the front. Defaults to `false`. */
|
|
120
120
|
allowIdCardBackToFrontCapture?: boolean;
|
|
121
|
+
/** Boolean to indicate whether to show the user a dialog to disable the wrong document type guidance after a configurable amount of time. Defaults to `false`. */
|
|
122
|
+
enableOverrideWrongDocumentTypeDialog?: boolean;
|
|
123
|
+
/** Number of milliseconds to wait before showing the user a dialog to disable the wrong document type guidance. Defaults to `8000`. */
|
|
124
|
+
allowOverrideWrongDocumentTypeAfterMs?: number;
|
|
121
125
|
/** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
|
|
122
126
|
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
123
127
|
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
@@ -115,6 +115,10 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
|
|
|
115
115
|
selfieCaptureModelLoadTimeoutMs?: number;
|
|
116
116
|
/** Boolean to indicate whether to allow the user to capture the back of the ID card before capturing the front. Defaults to `false`. */
|
|
117
117
|
allowIdCardBackToFrontCapture?: boolean;
|
|
118
|
+
/** Boolean to indicate whether to show the user a dialog to disable the wrong document type guidance after a configurable amount of time. Defaults to `false`. */
|
|
119
|
+
enableOverrideWrongDocumentTypeDialog?: boolean;
|
|
120
|
+
/** Number of milliseconds to wait before showing the user a dialog to disable the wrong document type guidance. Defaults to `8000`. */
|
|
121
|
+
allowOverrideWrongDocumentTypeAfterMs?: number;
|
|
118
122
|
/** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
|
|
119
123
|
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
120
124
|
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
@@ -100,6 +100,10 @@ export interface IdValidationProps extends PropsWithChildren {
|
|
|
100
100
|
forceFallbackMode?: boolean;
|
|
101
101
|
/** Boolean to indicate whether to allow the user to capture the back of the ID card before capturing the front. Defaults to `false`. */
|
|
102
102
|
allowIdCardBackToFrontCapture?: boolean;
|
|
103
|
+
/** Boolean to indicate whether to show the user a dialog to disable the wrong document type guidance after a configurable amount of time. Defaults to `false`. */
|
|
104
|
+
enableOverrideWrongDocumentTypeDialog?: boolean;
|
|
105
|
+
/** Number of milliseconds to wait before showing the user a dialog to disable the wrong document type guidance. Defaults to `8000`. */
|
|
106
|
+
allowOverrideWrongDocumentTypeAfterMs?: number;
|
|
103
107
|
/** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack`, `passport`.*/
|
|
104
108
|
precapturedDocuments?: CapturedDocuments;
|
|
105
109
|
/** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
|
|
@@ -27,6 +27,8 @@ export type IdCaptureState = {
|
|
|
27
27
|
documentTooClose: boolean;
|
|
28
28
|
flipRequired: boolean;
|
|
29
29
|
backDetectedFirst: boolean;
|
|
30
|
+
enableOverrideWrongDocumentTypeDialog: boolean;
|
|
31
|
+
allowOverrideWrongDocumentTypeAfterMs: number;
|
|
30
32
|
allowOverrideFlipRequirement: boolean;
|
|
31
33
|
overrideFlipRequirement: boolean;
|
|
32
34
|
wrongDocumentTypePredictions: number;
|
|
@@ -61,6 +63,8 @@ export type IdCaptureAction = {
|
|
|
61
63
|
captureRequirement: IdCaptureRequirementOption;
|
|
62
64
|
precapturedDocuments?: CapturedDocuments;
|
|
63
65
|
allowIdCardBackToFrontCapture?: boolean;
|
|
66
|
+
enableOverrideWrongDocumentTypeDialog: boolean;
|
|
67
|
+
allowOverrideWrongDocumentTypeAfterMs: number;
|
|
64
68
|
};
|
|
65
69
|
} | {
|
|
66
70
|
type: 'setRequiredDocumentType';
|
|
@@ -65,10 +65,12 @@ export type IdCaptureWizardProps = {
|
|
|
65
65
|
silentFallback?: boolean;
|
|
66
66
|
forceFallbackMode?: boolean;
|
|
67
67
|
allowIdCardBackToFrontCapture?: boolean;
|
|
68
|
+
enableOverrideWrongDocumentTypeDialog?: boolean;
|
|
69
|
+
allowOverrideWrongDocumentTypeAfterMs?: number;
|
|
68
70
|
assets?: IdCaptureWizardAssets;
|
|
69
71
|
classNames?: IdCaptureWizardClassNames;
|
|
70
72
|
colors?: IdCaptureWizardColors;
|
|
71
73
|
verbiage?: IdCaptureWizardVerbiage;
|
|
72
74
|
debugMode?: boolean;
|
|
73
75
|
};
|
|
74
|
-
export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence, thresholds, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, silentFallback, forceFallbackMode, allowIdCardBackToFrontCapture, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
|
|
76
|
+
export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence, thresholds, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, silentFallback, forceFallbackMode, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
|
|
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
234
234
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
var webSdkVersion = '2.1.
|
|
237
|
+
var webSdkVersion = '2.1.35';
|
|
238
238
|
|
|
239
239
|
function getPlatform() {
|
|
240
240
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -6140,6 +6140,8 @@ var initialState$4 = {
|
|
|
6140
6140
|
documentTooClose: false,
|
|
6141
6141
|
flipRequired: false,
|
|
6142
6142
|
backDetectedFirst: false,
|
|
6143
|
+
enableOverrideWrongDocumentTypeDialog: false,
|
|
6144
|
+
allowOverrideWrongDocumentTypeAfterMs: 8000,
|
|
6143
6145
|
allowOverrideFlipRequirement: false,
|
|
6144
6146
|
overrideFlipRequirement: false,
|
|
6145
6147
|
wrongDocumentTypePredictions: 0,
|
|
@@ -6178,10 +6180,14 @@ var _reducer = function reducer(state, action) {
|
|
|
6178
6180
|
var _c = action.payload,
|
|
6179
6181
|
captureRequirement = _c.captureRequirement,
|
|
6180
6182
|
precapturedDocuments = _c.precapturedDocuments,
|
|
6181
|
-
allowIdCardBackToFrontCapture = _c.allowIdCardBackToFrontCapture
|
|
6183
|
+
allowIdCardBackToFrontCapture = _c.allowIdCardBackToFrontCapture,
|
|
6184
|
+
enableOverrideWrongDocumentTypeDialog = _c.enableOverrideWrongDocumentTypeDialog,
|
|
6185
|
+
allowOverrideWrongDocumentTypeAfterMs = _c.allowOverrideWrongDocumentTypeAfterMs;
|
|
6182
6186
|
var newState = _assign(_assign({}, state), {
|
|
6183
6187
|
captureRequirement: captureRequirement,
|
|
6184
|
-
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture !== null && allowIdCardBackToFrontCapture !== void 0 ? allowIdCardBackToFrontCapture : false
|
|
6188
|
+
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture !== null && allowIdCardBackToFrontCapture !== void 0 ? allowIdCardBackToFrontCapture : false,
|
|
6189
|
+
enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
|
|
6190
|
+
allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs
|
|
6185
6191
|
});
|
|
6186
6192
|
if (captureRequirement === 'idCardBack') newState.requestedDocumentType = 'idCardBack';
|
|
6187
6193
|
if (captureRequirement === 'passport') newState.requestedDocumentType = 'passport';
|
|
@@ -6290,8 +6296,8 @@ var _reducer = function reducer(state, action) {
|
|
|
6290
6296
|
}
|
|
6291
6297
|
}
|
|
6292
6298
|
var hasBeenRunningForLongEnough = !!state.captureStartedAt && new Date().getTime() - state.captureStartedAt.getTime() > 1000;
|
|
6293
|
-
var overrideFlipRequirementThreshold = Math.ceil(
|
|
6294
|
-
var allowOverrideFlipRequirement = hasBeenRunningForLongEnough && !state.overrideFlipRequirement && overrideFlipRequirementThreshold > 0 && (state.allowOverrideFlipRequirement || wrongDocumentTypePredictions >= overrideFlipRequirementThreshold);
|
|
6299
|
+
var overrideFlipRequirementThreshold = Math.ceil(state.allowOverrideWrongDocumentTypeAfterMs / 1000 * frameCaptureRate);
|
|
6300
|
+
var allowOverrideFlipRequirement = state.enableOverrideWrongDocumentTypeDialog && hasBeenRunningForLongEnough && !state.overrideFlipRequirement && overrideFlipRequirementThreshold > 0 && (state.allowOverrideFlipRequirement || wrongDocumentTypePredictions >= overrideFlipRequirementThreshold);
|
|
6295
6301
|
return _assign(_assign({}, state), {
|
|
6296
6302
|
videoWidth: frameWidth,
|
|
6297
6303
|
videoHeight: frameHeight,
|
|
@@ -7039,18 +7045,23 @@ var IdCapture = function IdCapture(_a) {
|
|
|
7039
7045
|
display: 'block',
|
|
7040
7046
|
margin: 'auto 12px auto 0'
|
|
7041
7047
|
}
|
|
7042
|
-
}, "It appears that you are attempting to capture the wrong side of your ID card, but perhaps we are wrong about that. Would you like to proceed with capture anyway?"), /*#__PURE__*/React__namespace.default.createElement(
|
|
7043
|
-
variant: "positive",
|
|
7048
|
+
}, "It appears that you are attempting to capture the wrong side of your ID card, but perhaps we are wrong about that. Would you like to proceed with capture anyway?"), /*#__PURE__*/React__namespace.default.createElement("div", {
|
|
7044
7049
|
style: {
|
|
7045
7050
|
marginLeft: 'auto',
|
|
7046
|
-
|
|
7051
|
+
display: 'flex'
|
|
7052
|
+
}
|
|
7053
|
+
}, /*#__PURE__*/React__namespace.default.createElement(LoaderButton, {
|
|
7054
|
+
variant: "positive",
|
|
7055
|
+
style: {
|
|
7056
|
+
whiteSpace: 'nowrap',
|
|
7057
|
+
margin: 'auto'
|
|
7047
7058
|
},
|
|
7048
7059
|
onClick: function onClick() {
|
|
7049
7060
|
return dispatch({
|
|
7050
7061
|
type: 'overrideFlipRequirement'
|
|
7051
7062
|
});
|
|
7052
7063
|
}
|
|
7053
|
-
}, "Capture Anyway")))))), debugMode && ( /*#__PURE__*/React__namespace.default.createElement(DebugBoundingBoxOverlay, {
|
|
7064
|
+
}, "Capture Anyway"))))))), debugMode && ( /*#__PURE__*/React__namespace.default.createElement(DebugBoundingBoxOverlay, {
|
|
7054
7065
|
"$flipX": !((_j = cameraRef.current) === null || _j === void 0 ? void 0 : _j.isRearFacing),
|
|
7055
7066
|
scaling: debugScalingDetails
|
|
7056
7067
|
}, state.detectedObjects.map(function (obj, i) {
|
|
@@ -9645,50 +9656,56 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9645
9656
|
forceFallbackMode = _3 === void 0 ? false : _3,
|
|
9646
9657
|
_4 = _a.allowIdCardBackToFrontCapture,
|
|
9647
9658
|
allowIdCardBackToFrontCapture = _4 === void 0 ? false : _4,
|
|
9648
|
-
_5 = _a.
|
|
9649
|
-
|
|
9650
|
-
_6 = _a.
|
|
9651
|
-
|
|
9652
|
-
_7 = _a.
|
|
9653
|
-
|
|
9654
|
-
_8 = _a.
|
|
9655
|
-
|
|
9656
|
-
_9 = _a.
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
var
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9659
|
+
_5 = _a.enableOverrideWrongDocumentTypeDialog,
|
|
9660
|
+
enableOverrideWrongDocumentTypeDialog = _5 === void 0 ? false : _5,
|
|
9661
|
+
_6 = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
9662
|
+
allowOverrideWrongDocumentTypeAfterMs = _6 === void 0 ? 8000 : _6,
|
|
9663
|
+
_7 = _a.assets,
|
|
9664
|
+
assets = _7 === void 0 ? {} : _7,
|
|
9665
|
+
_8 = _a.classNames,
|
|
9666
|
+
classNames = _8 === void 0 ? {} : _8,
|
|
9667
|
+
_9 = _a.colors,
|
|
9668
|
+
colors = _9 === void 0 ? {} : _9,
|
|
9669
|
+
_10 = _a.verbiage,
|
|
9670
|
+
verbiage = _10 === void 0 ? {} : _10,
|
|
9671
|
+
_11 = _a.debugMode,
|
|
9672
|
+
debugMode = _11 === void 0 ? false : _11;
|
|
9673
|
+
var _12 = useIdCaptureState(),
|
|
9674
|
+
state = _12[0],
|
|
9675
|
+
dispatch = _12[1];
|
|
9676
|
+
var _13 = React.useContext(CameraStateContext),
|
|
9677
|
+
cameraAccessDenied = _13.cameraAccessDenied,
|
|
9678
|
+
requestCameraAccess = _13.requestCameraAccess,
|
|
9679
|
+
releaseCameraAccess = _13.releaseCameraAccess;
|
|
9680
|
+
var _14 = React.useState(false),
|
|
9681
|
+
overlayDismissed = _14[0],
|
|
9682
|
+
setOverlayDismissed = _14[1];
|
|
9683
|
+
var _15 = React.useContext(SubmissionContext),
|
|
9684
|
+
submissionStatus = _15.submissionStatus,
|
|
9685
|
+
setIdFrontImage = _15.setIdFrontImage,
|
|
9686
|
+
setIdBackImage = _15.setIdBackImage,
|
|
9687
|
+
setPassportImage = _15.setPassportImage,
|
|
9688
|
+
logIdFrontCaptureAttempt = _15.logIdFrontCaptureAttempt,
|
|
9689
|
+
logIdBackCaptureAttempt = _15.logIdBackCaptureAttempt;
|
|
9690
|
+
var _16 = React.useContext(IdCaptureModelsContext),
|
|
9691
|
+
start = _16.start,
|
|
9692
|
+
stop = _16.stop,
|
|
9693
|
+
onPredictionMade = _16.onPredictionMade,
|
|
9694
|
+
setRequiredDocumentType = _16.setRequiredDocumentType,
|
|
9695
|
+
modelError = _16.modelError,
|
|
9696
|
+
resetBestFrame = _16.resetBestFrame;
|
|
9682
9697
|
React.useEffect(function () {
|
|
9683
9698
|
dispatch({
|
|
9684
9699
|
type: 'configureWizard',
|
|
9685
9700
|
payload: {
|
|
9686
9701
|
captureRequirement: captureRequirement,
|
|
9687
9702
|
precapturedDocuments: precapturedDocuments,
|
|
9688
|
-
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture
|
|
9703
|
+
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
|
|
9704
|
+
enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
|
|
9705
|
+
allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs
|
|
9689
9706
|
}
|
|
9690
9707
|
});
|
|
9691
|
-
}, [allowIdCardBackToFrontCapture, captureRequirement, dispatch, precapturedDocuments]);
|
|
9708
|
+
}, [allowIdCardBackToFrontCapture, allowOverrideWrongDocumentTypeAfterMs, captureRequirement, dispatch, enableOverrideWrongDocumentTypeDialog, precapturedDocuments]);
|
|
9692
9709
|
var documentCount = Object.keys(state.capturedDocuments).length;
|
|
9693
9710
|
React.useEffect(function () {
|
|
9694
9711
|
documentCount && resetBestFrame();
|
|
@@ -9768,9 +9785,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9768
9785
|
type: 'resetWizard'
|
|
9769
9786
|
});
|
|
9770
9787
|
}, [dispatch]);
|
|
9771
|
-
var
|
|
9772
|
-
attempt =
|
|
9773
|
-
setAttempt =
|
|
9788
|
+
var _17 = React.useState(0),
|
|
9789
|
+
attempt = _17[0],
|
|
9790
|
+
setAttempt = _17[1];
|
|
9774
9791
|
var onExit = React.useCallback(function () {
|
|
9775
9792
|
releaseCameraAccess();
|
|
9776
9793
|
setOverlayDismissed(false);
|
|
@@ -9823,12 +9840,12 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9823
9840
|
})
|
|
9824
9841
|
};
|
|
9825
9842
|
var theme = styled.useTheme();
|
|
9826
|
-
var
|
|
9827
|
-
guideRectX =
|
|
9828
|
-
guideRectY =
|
|
9829
|
-
guideRectWidth =
|
|
9830
|
-
guideRectHeight =
|
|
9831
|
-
imageUrl =
|
|
9843
|
+
var _18 = useIdCaptureState()[0],
|
|
9844
|
+
guideRectX = _18.guideRectX,
|
|
9845
|
+
guideRectY = _18.guideRectY,
|
|
9846
|
+
guideRectWidth = _18.guideRectWidth,
|
|
9847
|
+
guideRectHeight = _18.guideRectHeight,
|
|
9848
|
+
imageUrl = _18.imageUrl;
|
|
9832
9849
|
var idCaptureAssets = assets[state.requestedDocumentType];
|
|
9833
9850
|
var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
|
|
9834
9851
|
React.useEffect(function () {
|
|
@@ -14163,6 +14180,10 @@ var IdValidation = function IdValidation(_a) {
|
|
|
14163
14180
|
forceFallbackMode = _m === void 0 ? false : _m,
|
|
14164
14181
|
_o = _a.allowIdCardBackToFrontCapture,
|
|
14165
14182
|
allowIdCardBackToFrontCapture = _o === void 0 ? false : _o,
|
|
14183
|
+
_p = _a.enableOverrideWrongDocumentTypeDialog,
|
|
14184
|
+
enableOverrideWrongDocumentTypeDialog = _p === void 0 ? false : _p,
|
|
14185
|
+
_q = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
14186
|
+
allowOverrideWrongDocumentTypeAfterMs = _q === void 0 ? 8000 : _q,
|
|
14166
14187
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
14167
14188
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
14168
14189
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -14176,28 +14197,28 @@ var IdValidation = function IdValidation(_a) {
|
|
|
14176
14197
|
onUserCancel = _a.onUserCancel,
|
|
14177
14198
|
onModelError = _a.onModelError,
|
|
14178
14199
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
14179
|
-
|
|
14180
|
-
theme =
|
|
14181
|
-
|
|
14182
|
-
assets =
|
|
14183
|
-
|
|
14184
|
-
classNames =
|
|
14185
|
-
|
|
14186
|
-
colors =
|
|
14187
|
-
|
|
14188
|
-
verbiage =
|
|
14189
|
-
|
|
14190
|
-
captureSignature =
|
|
14191
|
-
|
|
14192
|
-
captureSignatureVideo =
|
|
14193
|
-
|
|
14194
|
-
captureAdditionalDocuments =
|
|
14195
|
-
|
|
14196
|
-
geolocationEnabled =
|
|
14197
|
-
|
|
14198
|
-
geolocationRequired =
|
|
14199
|
-
|
|
14200
|
-
debugMode =
|
|
14200
|
+
_r = _a.theme,
|
|
14201
|
+
theme = _r === void 0 ? 'default' : _r,
|
|
14202
|
+
_s = _a.assets,
|
|
14203
|
+
assets = _s === void 0 ? {} : _s,
|
|
14204
|
+
_t = _a.classNames,
|
|
14205
|
+
classNames = _t === void 0 ? {} : _t,
|
|
14206
|
+
_u = _a.colors,
|
|
14207
|
+
colors = _u === void 0 ? {} : _u,
|
|
14208
|
+
_v = _a.verbiage,
|
|
14209
|
+
verbiage = _v === void 0 ? {} : _v,
|
|
14210
|
+
_w = _a.captureSignature,
|
|
14211
|
+
captureSignature = _w === void 0 ? false : _w,
|
|
14212
|
+
_x = _a.captureSignatureVideo,
|
|
14213
|
+
captureSignatureVideo = _x === void 0 ? false : _x,
|
|
14214
|
+
_y = _a.captureAdditionalDocuments,
|
|
14215
|
+
captureAdditionalDocuments = _y === void 0 ? [] : _y,
|
|
14216
|
+
_z = _a.geolocationEnabled,
|
|
14217
|
+
geolocationEnabled = _z === void 0 ? true : _z,
|
|
14218
|
+
_0 = _a.geolocationRequired,
|
|
14219
|
+
geolocationRequired = _0 === void 0 ? false : _0,
|
|
14220
|
+
_1 = _a.debugMode,
|
|
14221
|
+
debugMode = _1 === void 0 ? false : _1;
|
|
14201
14222
|
useLanguage(lang);
|
|
14202
14223
|
useDebugLogging(debugMode);
|
|
14203
14224
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -14218,13 +14239,15 @@ var IdValidation = function IdValidation(_a) {
|
|
|
14218
14239
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
14219
14240
|
rotateLoadingOverlayImageWhenPortrait: rotateLoadingOverlayImageWhenPortrait,
|
|
14220
14241
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
14242
|
+
enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
|
|
14243
|
+
allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
|
|
14221
14244
|
assets: assets,
|
|
14222
14245
|
classNames: classNames,
|
|
14223
14246
|
colors: colors,
|
|
14224
14247
|
verbiage: verbiage,
|
|
14225
14248
|
debugMode: debugMode
|
|
14226
14249
|
};
|
|
14227
|
-
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, assets, classNames, colors, verbiage, debugMode]);
|
|
14250
|
+
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
14228
14251
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
14229
14252
|
return {
|
|
14230
14253
|
documents: captureAdditionalDocuments,
|
|
@@ -14470,6 +14493,10 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
14470
14493
|
selfieCaptureModelLoadTimeoutMs = _o === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _o,
|
|
14471
14494
|
_p = _a.allowIdCardBackToFrontCapture,
|
|
14472
14495
|
allowIdCardBackToFrontCapture = _p === void 0 ? false : _p,
|
|
14496
|
+
_q = _a.enableOverrideWrongDocumentTypeDialog,
|
|
14497
|
+
enableOverrideWrongDocumentTypeDialog = _q === void 0 ? false : _q,
|
|
14498
|
+
_r = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
14499
|
+
allowOverrideWrongDocumentTypeAfterMs = _r === void 0 ? 8000 : _r,
|
|
14473
14500
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
14474
14501
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
14475
14502
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -14486,28 +14513,28 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
14486
14513
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
14487
14514
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
14488
14515
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
14489
|
-
|
|
14490
|
-
captureSignature =
|
|
14491
|
-
|
|
14492
|
-
captureSignatureVideo =
|
|
14493
|
-
|
|
14494
|
-
captureAdditionalDocuments =
|
|
14495
|
-
|
|
14496
|
-
theme =
|
|
14497
|
-
|
|
14498
|
-
assets =
|
|
14499
|
-
|
|
14500
|
-
classNames =
|
|
14501
|
-
|
|
14502
|
-
colors =
|
|
14503
|
-
|
|
14504
|
-
verbiage =
|
|
14505
|
-
|
|
14506
|
-
geolocationEnabled =
|
|
14507
|
-
|
|
14508
|
-
geolocationRequired =
|
|
14509
|
-
|
|
14510
|
-
debugMode =
|
|
14516
|
+
_s = _a.captureSignature,
|
|
14517
|
+
captureSignature = _s === void 0 ? false : _s,
|
|
14518
|
+
_t = _a.captureSignatureVideo,
|
|
14519
|
+
captureSignatureVideo = _t === void 0 ? false : _t,
|
|
14520
|
+
_u = _a.captureAdditionalDocuments,
|
|
14521
|
+
captureAdditionalDocuments = _u === void 0 ? [] : _u,
|
|
14522
|
+
_v = _a.theme,
|
|
14523
|
+
theme = _v === void 0 ? 'default' : _v,
|
|
14524
|
+
_w = _a.assets,
|
|
14525
|
+
assets = _w === void 0 ? {} : _w,
|
|
14526
|
+
_x = _a.classNames,
|
|
14527
|
+
classNames = _x === void 0 ? {} : _x,
|
|
14528
|
+
_y = _a.colors,
|
|
14529
|
+
colors = _y === void 0 ? {} : _y,
|
|
14530
|
+
_z = _a.verbiage,
|
|
14531
|
+
verbiage = _z === void 0 ? {} : _z,
|
|
14532
|
+
_0 = _a.geolocationEnabled,
|
|
14533
|
+
geolocationEnabled = _0 === void 0 ? true : _0,
|
|
14534
|
+
_1 = _a.geolocationRequired,
|
|
14535
|
+
geolocationRequired = _1 === void 0 ? false : _1,
|
|
14536
|
+
_2 = _a.debugMode,
|
|
14537
|
+
debugMode = _2 === void 0 ? false : _2;
|
|
14511
14538
|
useLanguage(lang);
|
|
14512
14539
|
useDebugLogging(debugMode);
|
|
14513
14540
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -14529,10 +14556,12 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
14529
14556
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
14530
14557
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
|
|
14531
14558
|
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
|
|
14559
|
+
enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
|
|
14560
|
+
allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
|
|
14532
14561
|
skipSuccessScreen: skipSuccessScreen,
|
|
14533
14562
|
debugMode: debugMode
|
|
14534
14563
|
};
|
|
14535
|
-
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, skipSuccessScreen, debugMode]);
|
|
14564
|
+
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, skipSuccessScreen, debugMode]);
|
|
14536
14565
|
var faceLivenessProps = React.useMemo(function () {
|
|
14537
14566
|
return {
|
|
14538
14567
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
@@ -14695,6 +14724,10 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
14695
14724
|
selfieCaptureModelLoadTimeoutMs = _o === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _o,
|
|
14696
14725
|
_p = _a.allowIdCardBackToFrontCapture,
|
|
14697
14726
|
allowIdCardBackToFrontCapture = _p === void 0 ? false : _p,
|
|
14727
|
+
_q = _a.enableOverrideWrongDocumentTypeDialog,
|
|
14728
|
+
enableOverrideWrongDocumentTypeDialog = _q === void 0 ? false : _q,
|
|
14729
|
+
_r = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
14730
|
+
allowOverrideWrongDocumentTypeAfterMs = _r === void 0 ? 8000 : _r,
|
|
14698
14731
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
14699
14732
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
14700
14733
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -14710,28 +14743,28 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
14710
14743
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
14711
14744
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
14712
14745
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
14713
|
-
|
|
14714
|
-
captureSignature =
|
|
14715
|
-
|
|
14716
|
-
captureSignatureVideo =
|
|
14717
|
-
|
|
14718
|
-
captureAdditionalDocuments =
|
|
14719
|
-
|
|
14720
|
-
theme =
|
|
14721
|
-
|
|
14722
|
-
assets =
|
|
14723
|
-
|
|
14724
|
-
classNames =
|
|
14725
|
-
|
|
14726
|
-
colors =
|
|
14727
|
-
|
|
14728
|
-
verbiage =
|
|
14729
|
-
|
|
14730
|
-
geolocationEnabled =
|
|
14731
|
-
|
|
14732
|
-
geolocationRequired =
|
|
14733
|
-
|
|
14734
|
-
debugMode =
|
|
14746
|
+
_s = _a.captureSignature,
|
|
14747
|
+
captureSignature = _s === void 0 ? false : _s,
|
|
14748
|
+
_t = _a.captureSignatureVideo,
|
|
14749
|
+
captureSignatureVideo = _t === void 0 ? false : _t,
|
|
14750
|
+
_u = _a.captureAdditionalDocuments,
|
|
14751
|
+
captureAdditionalDocuments = _u === void 0 ? [] : _u,
|
|
14752
|
+
_v = _a.theme,
|
|
14753
|
+
theme = _v === void 0 ? 'default' : _v,
|
|
14754
|
+
_w = _a.assets,
|
|
14755
|
+
assets = _w === void 0 ? {} : _w,
|
|
14756
|
+
_x = _a.classNames,
|
|
14757
|
+
classNames = _x === void 0 ? {} : _x,
|
|
14758
|
+
_y = _a.colors,
|
|
14759
|
+
colors = _y === void 0 ? {} : _y,
|
|
14760
|
+
_z = _a.verbiage,
|
|
14761
|
+
verbiage = _z === void 0 ? {} : _z,
|
|
14762
|
+
_0 = _a.geolocationEnabled,
|
|
14763
|
+
geolocationEnabled = _0 === void 0 ? true : _0,
|
|
14764
|
+
_1 = _a.geolocationRequired,
|
|
14765
|
+
geolocationRequired = _1 === void 0 ? false : _1,
|
|
14766
|
+
_2 = _a.debugMode,
|
|
14767
|
+
debugMode = _2 === void 0 ? false : _2;
|
|
14735
14768
|
useLanguage(lang);
|
|
14736
14769
|
useDebugLogging(debugMode);
|
|
14737
14770
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -14749,13 +14782,15 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
14749
14782
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
14750
14783
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
|
|
14751
14784
|
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
|
|
14785
|
+
enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
|
|
14786
|
+
allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
|
|
14752
14787
|
onExitCapture: onExitCapture,
|
|
14753
14788
|
onUserCancel: onUserCancel,
|
|
14754
14789
|
onModelError: onIdCaptureModelError,
|
|
14755
14790
|
skipSuccessScreen: skipSuccessScreen,
|
|
14756
14791
|
debugMode: debugMode
|
|
14757
14792
|
};
|
|
14758
|
-
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
14793
|
+
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
14759
14794
|
var faceLivenessProps = React.useMemo(function () {
|
|
14760
14795
|
return {
|
|
14761
14796
|
onExitCapture: onExitCapture,
|