idmission-web-sdk 2.2.151 → 2.2.153
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/CompositeWizard.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +2 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts +2 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts +2 -0
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts +2 -1
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +7 -2
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/camera/useVideoRecorder.d.ts +1 -0
- package/dist/lib/camera/useVideoRecorder.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +166 -116
- 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 +166 -116
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +166 -116
- 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
|
@@ -233,7 +233,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
233
233
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
234
234
|
};
|
|
235
235
|
|
|
236
|
-
var webSdkVersion = '2.2.
|
|
236
|
+
var webSdkVersion = '2.2.153';
|
|
237
237
|
|
|
238
238
|
function getPlatform() {
|
|
239
239
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -3890,12 +3890,9 @@ function CameraStoreProvider(_a) {
|
|
|
3890
3890
|
}, [preferFrontFacingCamera, preferIphoneContinuityCamera]);
|
|
3891
3891
|
React.useEffect(function () {
|
|
3892
3892
|
var _a;
|
|
3893
|
-
if (
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
var _a;
|
|
3897
|
-
return (_a = store.current) === null || _a === void 0 ? void 0 : _a.getState().releaseMicrophoneAccess();
|
|
3898
|
-
};
|
|
3893
|
+
if (requireMicrophoneAccess) {
|
|
3894
|
+
(_a = store.current) === null || _a === void 0 ? void 0 : _a.getState().requestMicrophoneAccess();
|
|
3895
|
+
}
|
|
3899
3896
|
}, [requireMicrophoneAccess]);
|
|
3900
3897
|
React.useEffect(function () {
|
|
3901
3898
|
return function () {
|
|
@@ -13078,18 +13075,25 @@ var useVideoRecorder = function useVideoRecorder(camera, audioStream, mergeAVStr
|
|
|
13078
13075
|
processAudio();
|
|
13079
13076
|
}
|
|
13080
13077
|
}, [audioRecordingIntentionallyStopped, audioRecordingStopped, processAudio]);
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13078
|
+
var clearRecordedData = React.useCallback(function () {
|
|
13079
|
+
videoChunks.current = [];
|
|
13080
|
+
audioChunks.current = [];
|
|
13081
|
+
}, []);
|
|
13082
|
+
return React.useMemo(function () {
|
|
13083
|
+
return {
|
|
13084
|
+
isRecordingVideo: isRecordingVideo,
|
|
13085
|
+
isRecordingAudio: isRecordingAudio,
|
|
13086
|
+
startRecordingVideo: startRecordingVideo,
|
|
13087
|
+
startRecordingAudio: startRecordingAudio,
|
|
13088
|
+
stopRecordingVideo: stopRecordingVideo,
|
|
13089
|
+
stopRecordingAudio: stopRecordingAudio,
|
|
13090
|
+
clearRecordedData: clearRecordedData,
|
|
13091
|
+
videoRecordingUnintentionallyStopped: videoRecordingStopped && !videoRecordingIntentionallyStopped,
|
|
13092
|
+
audioRecordingUnintentionallyStopped: audioRecordingStopped && !audioRecordingIntentionallyStopped,
|
|
13093
|
+
videoUrl: videoUrl,
|
|
13094
|
+
audioUrl: audioUrl
|
|
13095
|
+
};
|
|
13096
|
+
}, [audioRecordingIntentionallyStopped, audioRecordingStopped, audioUrl, clearRecordedData, isRecordingAudio, isRecordingVideo, startRecordingAudio, startRecordingVideo, stopRecordingAudio, stopRecordingVideo, videoRecordingIntentionallyStopped, videoRecordingStopped, videoUrl]);
|
|
13093
13097
|
};
|
|
13094
13098
|
|
|
13095
13099
|
var videoSignatureInitialState = {
|
|
@@ -13099,6 +13103,10 @@ var videoSignatureInitialState = {
|
|
|
13099
13103
|
stopRecording: function stopRecording() {
|
|
13100
13104
|
return null;
|
|
13101
13105
|
},
|
|
13106
|
+
clearRecordedData: function clearRecordedData() {
|
|
13107
|
+
return null;
|
|
13108
|
+
},
|
|
13109
|
+
isRecording: false,
|
|
13102
13110
|
signatureData: null,
|
|
13103
13111
|
signatureDataUrl: null,
|
|
13104
13112
|
signatureVideoData: null,
|
|
@@ -13142,17 +13150,28 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13142
13150
|
startRecordingVideo = _k.startRecordingVideo,
|
|
13143
13151
|
stopRecordingVideo = _k.stopRecordingVideo,
|
|
13144
13152
|
startRecordingAudio = _k.startRecordingAudio,
|
|
13145
|
-
stopRecordingAudio = _k.stopRecordingAudio
|
|
13153
|
+
stopRecordingAudio = _k.stopRecordingAudio,
|
|
13154
|
+
clearRecordedVideoData = _k.clearRecordedData;
|
|
13146
13155
|
var outputCanvas = React.useRef(null);
|
|
13147
13156
|
var recordingLock = React.useRef(false);
|
|
13157
|
+
var onRecordingStopped = React.useRef(function () {});
|
|
13148
13158
|
var _l = React.useState(false),
|
|
13149
13159
|
isRecording = _l[0],
|
|
13150
13160
|
setIsRecording = _l[1];
|
|
13151
13161
|
var startRecording = React.useCallback(function () {
|
|
13152
|
-
setIsRecording(true);
|
|
13162
|
+
return setIsRecording(true);
|
|
13153
13163
|
}, []);
|
|
13154
13164
|
var stopRecording = React.useCallback(function () {
|
|
13165
|
+
return setIsRecording(false);
|
|
13166
|
+
}, []);
|
|
13167
|
+
var clearRecordedData = React.useCallback(function () {
|
|
13168
|
+
var _a;
|
|
13169
|
+
recordingLock.current = false;
|
|
13170
|
+
onRecordingStopped.current = function () {
|
|
13171
|
+
return setIsRecording(true);
|
|
13172
|
+
};
|
|
13155
13173
|
setIsRecording(false);
|
|
13174
|
+
(_a = signatureRecorder.current) === null || _a === void 0 ? void 0 : _a.stop();
|
|
13156
13175
|
}, []);
|
|
13157
13176
|
React.useEffect(function () {
|
|
13158
13177
|
if (!isRecording) return;
|
|
@@ -13178,6 +13197,8 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13178
13197
|
_b.sent();
|
|
13179
13198
|
_b.label = 2;
|
|
13180
13199
|
case 2:
|
|
13200
|
+
recordedChunks.current = [];
|
|
13201
|
+
clearRecordedVideoData();
|
|
13181
13202
|
startRecordingVideo();
|
|
13182
13203
|
if (captureAudio) startRecordingAudio();
|
|
13183
13204
|
stream = outputCanvas.current.captureStream(24 /* fps */);
|
|
@@ -13202,13 +13223,14 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13202
13223
|
});
|
|
13203
13224
|
setSignatureVideoData(blob);
|
|
13204
13225
|
setSignatureVideoUrl(URL.createObjectURL(blob));
|
|
13226
|
+
onRecordingStopped.current();
|
|
13205
13227
|
};
|
|
13206
13228
|
return [2 /*return*/];
|
|
13207
13229
|
}
|
|
13208
13230
|
});
|
|
13209
13231
|
});
|
|
13210
13232
|
})();
|
|
13211
|
-
}, [audioStream, captureAudio, isRecording, startRecordingAudio, startRecordingVideo]);
|
|
13233
|
+
}, [audioStream, captureAudio, clearRecordedVideoData, isRecording, startRecordingAudio, startRecordingVideo]);
|
|
13212
13234
|
var animationFrame = React.useRef(0);
|
|
13213
13235
|
React.useEffect(function () {
|
|
13214
13236
|
if (!signaturePad.current || !videoRef.current || !outputCanvas.current || !camera || !isRecording || !isRecordingVideo) return;
|
|
@@ -13265,8 +13287,10 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13265
13287
|
}, [stopRecordingAudio, stopRecordingVideo]);
|
|
13266
13288
|
var value = React.useMemo(function () {
|
|
13267
13289
|
return {
|
|
13290
|
+
isRecording: isRecording,
|
|
13268
13291
|
startRecording: startRecording,
|
|
13269
13292
|
stopRecording: stopRecording,
|
|
13293
|
+
clearRecordedData: clearRecordedData,
|
|
13270
13294
|
signaturePad: signaturePad,
|
|
13271
13295
|
signatureData: signatureData,
|
|
13272
13296
|
signatureDataUrl: signatureDataUrl,
|
|
@@ -13274,7 +13298,7 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13274
13298
|
signatureVideoUrl: signatureVideoUrl,
|
|
13275
13299
|
onAcceptClicked: onAcceptClicked
|
|
13276
13300
|
};
|
|
13277
|
-
}, [onAcceptClicked, signatureData, signatureDataUrl, signatureVideoData, signatureVideoUrl, startRecording, stopRecording]);
|
|
13301
|
+
}, [clearRecordedData, isRecording, onAcceptClicked, signatureData, signatureDataUrl, signatureVideoData, signatureVideoUrl, startRecording, stopRecording]);
|
|
13278
13302
|
return /*#__PURE__*/React__namespace.default.createElement(VideoSignatureContext.Provider, {
|
|
13279
13303
|
value: value
|
|
13280
13304
|
}, children, /*#__PURE__*/React__namespace.default.createElement(InvisibleCanvas, {
|
|
@@ -13296,6 +13320,7 @@ function VideoSignatureGuides(_a) {
|
|
|
13296
13320
|
faceGuideStatus = _c === void 0 ? 'success' : _c,
|
|
13297
13321
|
faceGuideBorderWidth = _a.faceGuideBorderWidth,
|
|
13298
13322
|
faceGuideBorderColor = _a.faceGuideBorderColor,
|
|
13323
|
+
onClearSignaturePadClicked = _a.onClearSignaturePadClicked,
|
|
13299
13324
|
_d = _a.classNames,
|
|
13300
13325
|
classNames = _d === void 0 ? {} : _d,
|
|
13301
13326
|
_e = _a.verbiage,
|
|
@@ -13357,6 +13382,7 @@ function VideoSignatureGuides(_a) {
|
|
|
13357
13382
|
var _a, _b;
|
|
13358
13383
|
(_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.clear();
|
|
13359
13384
|
setIsSignaturePadEmpty(!!((_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.isEmpty()));
|
|
13385
|
+
onClearSignaturePadClicked === null || onClearSignaturePadClicked === void 0 ? void 0 : onClearSignaturePadClicked();
|
|
13360
13386
|
},
|
|
13361
13387
|
disabled: requestedAction === 'VERIFY_LIVENESS',
|
|
13362
13388
|
finished: true
|
|
@@ -13387,30 +13413,32 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13387
13413
|
var onVideoCaptured = _a.onVideoCaptured,
|
|
13388
13414
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
13389
13415
|
onExit = _a.onExit,
|
|
13416
|
+
_c = _a.restartVideoOnSignaturePadCleared,
|
|
13417
|
+
restartVideoOnSignaturePadCleared = _c === void 0 ? true : _c,
|
|
13390
13418
|
guidesComponent = _a.guidesComponent,
|
|
13391
|
-
|
|
13392
|
-
classNames =
|
|
13393
|
-
|
|
13394
|
-
colors =
|
|
13395
|
-
|
|
13396
|
-
rawVerbiage =
|
|
13397
|
-
|
|
13398
|
-
debugMode =
|
|
13419
|
+
_d = _a.classNames,
|
|
13420
|
+
classNames = _d === void 0 ? {} : _d,
|
|
13421
|
+
_e = _a.colors,
|
|
13422
|
+
colors = _e === void 0 ? {} : _e,
|
|
13423
|
+
_f = _a.verbiage,
|
|
13424
|
+
rawVerbiage = _f === void 0 ? {} : _f,
|
|
13425
|
+
_g = _a.debugMode,
|
|
13426
|
+
debugMode = _g === void 0 ? false : _g;
|
|
13399
13427
|
var camera = useCameraStore(function (state) {
|
|
13400
13428
|
return state.camera;
|
|
13401
13429
|
});
|
|
13402
13430
|
var onPredictionMade = React.useContext(SelfieGuidanceModelsContext).onPredictionMade;
|
|
13403
|
-
var
|
|
13404
|
-
signatureData =
|
|
13405
|
-
signatureDataUrl =
|
|
13406
|
-
signatureVideoData =
|
|
13407
|
-
startRecording =
|
|
13408
|
-
stopRecording =
|
|
13431
|
+
var _h = useVideoSignatureContext(),
|
|
13432
|
+
signatureData = _h.signatureData,
|
|
13433
|
+
signatureDataUrl = _h.signatureDataUrl,
|
|
13434
|
+
signatureVideoData = _h.signatureVideoData,
|
|
13435
|
+
startRecording = _h.startRecording,
|
|
13436
|
+
stopRecording = _h.stopRecording,
|
|
13437
|
+
clearRecordedData = _h.clearRecordedData,
|
|
13438
|
+
isRecording = _h.isRecording;
|
|
13409
13439
|
React.useEffect(function () {
|
|
13410
13440
|
startRecording();
|
|
13411
|
-
return
|
|
13412
|
-
stopRecording();
|
|
13413
|
-
};
|
|
13441
|
+
return stopRecording;
|
|
13414
13442
|
}, [startRecording, stopRecording]);
|
|
13415
13443
|
colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
|
|
13416
13444
|
colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
|
|
@@ -13422,9 +13450,9 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13422
13450
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(signatureVideoData, signatureData, signatureDataUrl);
|
|
13423
13451
|
}
|
|
13424
13452
|
}, [onVideoCaptured, signatureData, signatureDataUrl, signatureVideoData]);
|
|
13425
|
-
var
|
|
13426
|
-
numFramesWithoutFaces =
|
|
13427
|
-
setNumFramesWithoutFaces =
|
|
13453
|
+
var _j = React.useState(0),
|
|
13454
|
+
numFramesWithoutFaces = _j[0],
|
|
13455
|
+
setNumFramesWithoutFaces = _j[1];
|
|
13428
13456
|
React.useEffect(function () {
|
|
13429
13457
|
onPredictionMade(function (_a) {
|
|
13430
13458
|
var face = _a.face;
|
|
@@ -13449,9 +13477,12 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13449
13477
|
"$background": colors.guidanceMessageBackgroundColor,
|
|
13450
13478
|
"$textColor": colors.guidanceMessageTextColor
|
|
13451
13479
|
}, verbiage.guidanceMessageText))), /*#__PURE__*/React__namespace.default.createElement(GuidesComponent, {
|
|
13480
|
+
status: "success",
|
|
13452
13481
|
classNames: classNames.videoSignatureGuidesClassNames,
|
|
13453
|
-
|
|
13454
|
-
|
|
13482
|
+
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? function () {
|
|
13483
|
+
return setTimeout(clearRecordedData, 100);
|
|
13484
|
+
} : undefined
|
|
13485
|
+
}), debugMode && ( /*#__PURE__*/React__namespace.default.createElement(DebugStatsPane, null, "Video: ", camera === null || camera === void 0 ? void 0 : camera.width, "x", camera === null || camera === void 0 ? void 0 : camera.height, /*#__PURE__*/React__namespace.default.createElement("br", null), "Recording: ", isRecording ? 'true' : 'false')), /*#__PURE__*/React__namespace.default.createElement(ExitCaptureButton, {
|
|
13455
13486
|
onClick: onExit,
|
|
13456
13487
|
className: classNames.exitCaptureBtn
|
|
13457
13488
|
}));
|
|
@@ -13530,37 +13561,30 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13530
13561
|
captureAudio = _e === void 0 ? false : _e,
|
|
13531
13562
|
_f = _a.allowSignatureAfterLivenessCheckFailure,
|
|
13532
13563
|
allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
|
|
13564
|
+
_g = _a.restartVideoOnSignaturePadCleared,
|
|
13565
|
+
restartVideoOnSignaturePadCleared = _g === void 0 ? true : _g,
|
|
13533
13566
|
faceLivenessProps = _a.faceLivenessProps,
|
|
13534
|
-
|
|
13535
|
-
assets =
|
|
13536
|
-
|
|
13537
|
-
classNames =
|
|
13538
|
-
|
|
13539
|
-
colors =
|
|
13540
|
-
|
|
13541
|
-
verbiage =
|
|
13542
|
-
|
|
13543
|
-
debugMode =
|
|
13544
|
-
var
|
|
13545
|
-
selfieImage =
|
|
13546
|
-
setSelfieImage =
|
|
13547
|
-
setSignatureData =
|
|
13548
|
-
setSignatureVideoUrl =
|
|
13549
|
-
logSelfieCaptureAttempt =
|
|
13550
|
-
var
|
|
13551
|
-
|
|
13552
|
-
|
|
13553
|
-
|
|
13554
|
-
|
|
13555
|
-
requestMicrophoneAccess: state.requestMicrophoneAccess,
|
|
13556
|
-
releaseMicrophoneAccess: state.releaseMicrophoneAccess
|
|
13557
|
-
};
|
|
13558
|
-
})),
|
|
13559
|
-
cameraAccessDenied = _o.cameraAccessDenied,
|
|
13560
|
-
requestCameraAccess = _o.requestCameraAccess,
|
|
13561
|
-
releaseCameraAccess = _o.releaseCameraAccess,
|
|
13562
|
-
requestMicrophoneAccess = _o.requestMicrophoneAccess,
|
|
13563
|
-
releaseMicrophoneAccess = _o.releaseMicrophoneAccess;
|
|
13567
|
+
_h = _a.assets,
|
|
13568
|
+
assets = _h === void 0 ? {} : _h,
|
|
13569
|
+
_j = _a.classNames,
|
|
13570
|
+
classNames = _j === void 0 ? {} : _j,
|
|
13571
|
+
_k = _a.colors,
|
|
13572
|
+
colors = _k === void 0 ? {} : _k,
|
|
13573
|
+
_l = _a.verbiage,
|
|
13574
|
+
verbiage = _l === void 0 ? {} : _l,
|
|
13575
|
+
_m = _a.debugMode,
|
|
13576
|
+
debugMode = _m === void 0 ? false : _m;
|
|
13577
|
+
var _o = React.useContext(SubmissionContext),
|
|
13578
|
+
selfieImage = _o.selfieImage,
|
|
13579
|
+
setSelfieImage = _o.setSelfieImage,
|
|
13580
|
+
setSignatureData = _o.setSignatureData,
|
|
13581
|
+
setSignatureVideoUrl = _o.setSignatureVideoUrl,
|
|
13582
|
+
logSelfieCaptureAttempt = _o.logSelfieCaptureAttempt;
|
|
13583
|
+
var cameraAccessDenied = useCameraStore(shallow.useShallow(function (state) {
|
|
13584
|
+
return {
|
|
13585
|
+
cameraAccessDenied: state.cameraAccessDenied
|
|
13586
|
+
};
|
|
13587
|
+
})).cameraAccessDenied;
|
|
13564
13588
|
var _p = React.useState('CHECKING_LIVENESS'),
|
|
13565
13589
|
captureState = _p[0],
|
|
13566
13590
|
setCaptureState = _p[1];
|
|
@@ -13621,21 +13645,13 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13621
13645
|
var _s = React.useState(0),
|
|
13622
13646
|
attempt = _s[0],
|
|
13623
13647
|
setAttempt = _s[1];
|
|
13624
|
-
var
|
|
13625
|
-
|
|
13626
|
-
releaseMicrophoneAccess();
|
|
13648
|
+
var onRetry = React.useCallback(function () {
|
|
13649
|
+
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
13627
13650
|
setAttempt(function (n) {
|
|
13628
13651
|
return n + 1;
|
|
13629
13652
|
});
|
|
13630
13653
|
setCaptureState('CHECKING_LIVENESS');
|
|
13631
|
-
|
|
13632
|
-
void requestCameraAccess();
|
|
13633
|
-
if (captureAudio) void requestMicrophoneAccess();
|
|
13634
|
-
}, [captureAudio, onExitCapture, releaseCameraAccess, releaseMicrophoneAccess, requestCameraAccess, requestMicrophoneAccess]);
|
|
13635
|
-
var onRetry = React.useCallback(function () {
|
|
13636
|
-
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
13637
|
-
onExit();
|
|
13638
|
-
}, [onExit, onRetryClicked]);
|
|
13654
|
+
}, [onRetryClicked]);
|
|
13639
13655
|
var showSuccessScreen = useShowSuccessScreen(skipSuccessScreen, captureState === 'SUCCESS', onComplete);
|
|
13640
13656
|
React.useEffect(function () {
|
|
13641
13657
|
if (cameraAccessDenied) {
|
|
@@ -13645,14 +13661,12 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13645
13661
|
setCaptureState('CHECKING_LIVENESS');
|
|
13646
13662
|
}
|
|
13647
13663
|
}, [cameraAccessDenied]);
|
|
13648
|
-
var guidesComponent = React.useCallback(function (
|
|
13649
|
-
|
|
13650
|
-
return /*#__PURE__*/React__namespace.default.createElement(VideoSignatureGuides, {
|
|
13664
|
+
var guidesComponent = React.useCallback(function (props) {
|
|
13665
|
+
return /*#__PURE__*/React__namespace.default.createElement(VideoSignatureWizardGuides, _assign({}, props, {
|
|
13651
13666
|
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames,
|
|
13652
|
-
|
|
13653
|
-
|
|
13654
|
-
|
|
13655
|
-
}, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames]);
|
|
13667
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared
|
|
13668
|
+
}));
|
|
13669
|
+
}, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames, restartVideoOnSignaturePadCleared]);
|
|
13656
13670
|
var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
|
|
13657
13671
|
var onExitAfterFailure = React.useCallback(function (resp, req) {
|
|
13658
13672
|
onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
|
|
@@ -13678,7 +13692,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13678
13692
|
key: "face-liveness-".concat(attempt)
|
|
13679
13693
|
}, faceLivenessProps, {
|
|
13680
13694
|
onSuccess: onFaceCaptureSuccess,
|
|
13681
|
-
onExitCapture:
|
|
13695
|
+
onExitCapture: onExitCapture,
|
|
13682
13696
|
onUserCancel: onUserCancel,
|
|
13683
13697
|
onExitAfterFailure: onExitAfterFailure,
|
|
13684
13698
|
onLoadingOverlayDismissed: onLoadingOverlayDismissedCallback,
|
|
@@ -13690,14 +13704,14 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13690
13704
|
colors: colors.faceLiveness,
|
|
13691
13705
|
verbiage: verbiage.faceLiveness,
|
|
13692
13706
|
debugMode: debugMode,
|
|
13693
|
-
releaseCameraAccessOnExit: false,
|
|
13694
13707
|
renderCameraFeed: false
|
|
13695
13708
|
}));
|
|
13696
13709
|
case 'CAPTURING_SIGNATURE':
|
|
13697
13710
|
return /*#__PURE__*/React__namespace.default.createElement(VideoSignatureCapture, {
|
|
13698
13711
|
onVideoCaptured: onSignatureCaptureCompleted,
|
|
13699
13712
|
onFaceNotDetected: onSignatureCaptureFacesNotDetected,
|
|
13700
|
-
onExit:
|
|
13713
|
+
onExit: onExitCapture,
|
|
13714
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
13701
13715
|
guidesComponent: guidesComponent,
|
|
13702
13716
|
classNames: classNames,
|
|
13703
13717
|
colors: colors,
|
|
@@ -13719,6 +13733,51 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13719
13733
|
}
|
|
13720
13734
|
}()));
|
|
13721
13735
|
};
|
|
13736
|
+
function VideoSignatureWizardGuides(_a) {
|
|
13737
|
+
var status = _a.status,
|
|
13738
|
+
classNames = _a.classNames,
|
|
13739
|
+
_b = _a.restartVideoOnSignaturePadCleared,
|
|
13740
|
+
restartVideoOnSignaturePadCleared = _b === void 0 ? true : _b;
|
|
13741
|
+
var clearRecordedData = useVideoSignatureContext().clearRecordedData;
|
|
13742
|
+
return /*#__PURE__*/React__namespace.default.createElement(VideoSignatureGuides, {
|
|
13743
|
+
classNames: classNames,
|
|
13744
|
+
faceGuideStatus: status,
|
|
13745
|
+
requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS',
|
|
13746
|
+
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? function () {
|
|
13747
|
+
return setTimeout(clearRecordedData, 100);
|
|
13748
|
+
} : undefined
|
|
13749
|
+
});
|
|
13750
|
+
}
|
|
13751
|
+
var VideoSignatureWizardWithProviders = function VideoSignatureWizardWithProviders(props) {
|
|
13752
|
+
var _a = React.useState(0),
|
|
13753
|
+
attempts = _a[0],
|
|
13754
|
+
setAttempts = _a[1];
|
|
13755
|
+
var onRetryClickedProp = props.onRetryClicked;
|
|
13756
|
+
var onRetryClicked = React.useCallback(function () {
|
|
13757
|
+
setAttempts(function (n) {
|
|
13758
|
+
return n + 1;
|
|
13759
|
+
});
|
|
13760
|
+
onRetryClickedProp === null || onRetryClickedProp === void 0 ? void 0 : onRetryClickedProp();
|
|
13761
|
+
}, [onRetryClickedProp]);
|
|
13762
|
+
return /*#__PURE__*/React__namespace.default.createElement(CameraStoreProvider, {
|
|
13763
|
+
key: "camera-store-".concat(attempts),
|
|
13764
|
+
preferIphoneContinuityCamera: false,
|
|
13765
|
+
preferFrontFacingCamera: true,
|
|
13766
|
+
requireMicrophoneAccess: props.captureAudio,
|
|
13767
|
+
maxVideoWidth: 1280,
|
|
13768
|
+
maxFps: 30,
|
|
13769
|
+
onCameraAccessDenied: props.onCameraAccessDenied,
|
|
13770
|
+
onMicrophoneAccessDenied: props.onMicrophoneAccessDenied
|
|
13771
|
+
}, /*#__PURE__*/React__namespace.default.createElement(SelfieGuidanceModelsProvider, {
|
|
13772
|
+
autoStart: false,
|
|
13773
|
+
throttleMs: 250,
|
|
13774
|
+
onModelError: props.onModelError,
|
|
13775
|
+
modelLoadTimeoutMs: props.modelLoadTimeoutMs,
|
|
13776
|
+
requireVerticalFaceCentering: false
|
|
13777
|
+
}, /*#__PURE__*/React__namespace.default.createElement(VideoSignatureWizard, _assign({}, props, {
|
|
13778
|
+
onRetryClicked: onRetryClicked
|
|
13779
|
+
}))));
|
|
13780
|
+
};
|
|
13722
13781
|
|
|
13723
13782
|
var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
13724
13783
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
@@ -14992,23 +15051,11 @@ function CompositeWizard(_a) {
|
|
|
14992
15051
|
onAccept: onSignatureCaptureSuccess
|
|
14993
15052
|
}));
|
|
14994
15053
|
case 'VideoSignatureCapture':
|
|
14995
|
-
return /*#__PURE__*/React__namespace.default.createElement(
|
|
14996
|
-
|
|
14997
|
-
preferFrontFacingCamera: true,
|
|
14998
|
-
requireMicrophoneAccess: videoSignatureCaptureProps.captureAudio,
|
|
14999
|
-
maxVideoWidth: 1280,
|
|
15000
|
-
maxFps: 30,
|
|
15054
|
+
return /*#__PURE__*/React__namespace.default.createElement(VideoSignatureWizardWithProviders, _assign({}, videoSignatureCaptureProps, {
|
|
15055
|
+
onComplete: onVideoSignatureComplete,
|
|
15001
15056
|
onCameraAccessDenied: onCameraAccessDenied,
|
|
15002
15057
|
onMicrophoneAccessDenied: onMicrophoneAccessDenied
|
|
15003
|
-
}
|
|
15004
|
-
autoStart: false,
|
|
15005
|
-
throttleMs: 250,
|
|
15006
|
-
onModelError: videoSignatureCaptureProps.onModelError,
|
|
15007
|
-
modelLoadTimeoutMs: videoSignatureCaptureProps.modelLoadTimeoutMs,
|
|
15008
|
-
requireVerticalFaceCentering: false
|
|
15009
|
-
}, /*#__PURE__*/React__namespace.default.createElement(VideoSignatureWizard, _assign({}, videoSignatureCaptureProps, {
|
|
15010
|
-
onComplete: onVideoSignatureComplete
|
|
15011
|
-
}))));
|
|
15058
|
+
}));
|
|
15012
15059
|
case 'AdditionalDocumentCapture':
|
|
15013
15060
|
return /*#__PURE__*/React__namespace.default.createElement(AdditionalDocumentCaptureWizard, _assign({}, additionalDocumentCaptureProps, {
|
|
15014
15061
|
documents: documents,
|
|
@@ -17325,16 +17372,18 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17325
17372
|
modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
|
|
17326
17373
|
_g = _a.allowSignatureAfterLivenessCheckFailure,
|
|
17327
17374
|
allowSignatureAfterLivenessCheckFailure = _g === void 0 ? false : _g,
|
|
17375
|
+
_h = _a.restartVideoOnSignaturePadCleared,
|
|
17376
|
+
restartVideoOnSignaturePadCleared = _h === void 0 ? true : _h,
|
|
17328
17377
|
faceLivenessProps = _a.faceLivenessProps,
|
|
17329
|
-
|
|
17330
|
-
theme =
|
|
17378
|
+
_j = _a.theme,
|
|
17379
|
+
theme = _j === void 0 ? 'default' : _j,
|
|
17331
17380
|
classNames = _a.classNames,
|
|
17332
17381
|
colors = _a.colors,
|
|
17333
17382
|
verbiage = _a.verbiage,
|
|
17334
17383
|
geolocationEnabled = _a.geolocationEnabled,
|
|
17335
17384
|
geolocationRequired = _a.geolocationRequired,
|
|
17336
|
-
|
|
17337
|
-
debugMode =
|
|
17385
|
+
_k = _a.debugMode,
|
|
17386
|
+
debugMode = _k === void 0 ? false : _k;
|
|
17338
17387
|
useLanguage(lang);
|
|
17339
17388
|
useDebugLogging(debugMode);
|
|
17340
17389
|
return /*#__PURE__*/React__namespace.default.createElement(AuthProvider, {
|
|
@@ -17378,6 +17427,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17378
17427
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
17379
17428
|
faceLivenessProps: faceLivenessProps,
|
|
17380
17429
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
17430
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
17381
17431
|
classNames: classNames,
|
|
17382
17432
|
colors: colors,
|
|
17383
17433
|
debugMode: debugMode,
|
|
@@ -17385,7 +17435,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17385
17435
|
onModelError: onModelError,
|
|
17386
17436
|
onUserCancel: onUserCancel
|
|
17387
17437
|
};
|
|
17388
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
17438
|
+
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
17389
17439
|
}))));
|
|
17390
17440
|
};
|
|
17391
17441
|
|