idmission-web-sdk 2.2.151 → 2.2.152
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 +162 -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 +162 -116
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +162 -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
package/dist/sdk2.esm.js
CHANGED
|
@@ -203,7 +203,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
203
203
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
204
204
|
};
|
|
205
205
|
|
|
206
|
-
var webSdkVersion = '2.2.
|
|
206
|
+
var webSdkVersion = '2.2.152';
|
|
207
207
|
|
|
208
208
|
function getPlatform() {
|
|
209
209
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -3860,12 +3860,9 @@ function CameraStoreProvider(_a) {
|
|
|
3860
3860
|
}, [preferFrontFacingCamera, preferIphoneContinuityCamera]);
|
|
3861
3861
|
useEffect(function () {
|
|
3862
3862
|
var _a;
|
|
3863
|
-
if (
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
var _a;
|
|
3867
|
-
return (_a = store.current) === null || _a === void 0 ? void 0 : _a.getState().releaseMicrophoneAccess();
|
|
3868
|
-
};
|
|
3863
|
+
if (requireMicrophoneAccess) {
|
|
3864
|
+
(_a = store.current) === null || _a === void 0 ? void 0 : _a.getState().requestMicrophoneAccess();
|
|
3865
|
+
}
|
|
3869
3866
|
}, [requireMicrophoneAccess]);
|
|
3870
3867
|
useEffect(function () {
|
|
3871
3868
|
return function () {
|
|
@@ -13048,18 +13045,25 @@ var useVideoRecorder = function useVideoRecorder(camera, audioStream, mergeAVStr
|
|
|
13048
13045
|
processAudio();
|
|
13049
13046
|
}
|
|
13050
13047
|
}, [audioRecordingIntentionallyStopped, audioRecordingStopped, processAudio]);
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13048
|
+
var clearRecordedData = useCallback(function () {
|
|
13049
|
+
videoChunks.current = [];
|
|
13050
|
+
audioChunks.current = [];
|
|
13051
|
+
}, []);
|
|
13052
|
+
return useMemo(function () {
|
|
13053
|
+
return {
|
|
13054
|
+
isRecordingVideo: isRecordingVideo,
|
|
13055
|
+
isRecordingAudio: isRecordingAudio,
|
|
13056
|
+
startRecordingVideo: startRecordingVideo,
|
|
13057
|
+
startRecordingAudio: startRecordingAudio,
|
|
13058
|
+
stopRecordingVideo: stopRecordingVideo,
|
|
13059
|
+
stopRecordingAudio: stopRecordingAudio,
|
|
13060
|
+
clearRecordedData: clearRecordedData,
|
|
13061
|
+
videoRecordingUnintentionallyStopped: videoRecordingStopped && !videoRecordingIntentionallyStopped,
|
|
13062
|
+
audioRecordingUnintentionallyStopped: audioRecordingStopped && !audioRecordingIntentionallyStopped,
|
|
13063
|
+
videoUrl: videoUrl,
|
|
13064
|
+
audioUrl: audioUrl
|
|
13065
|
+
};
|
|
13066
|
+
}, [audioRecordingIntentionallyStopped, audioRecordingStopped, audioUrl, clearRecordedData, isRecordingAudio, isRecordingVideo, startRecordingAudio, startRecordingVideo, stopRecordingAudio, stopRecordingVideo, videoRecordingIntentionallyStopped, videoRecordingStopped, videoUrl]);
|
|
13063
13067
|
};
|
|
13064
13068
|
|
|
13065
13069
|
var videoSignatureInitialState = {
|
|
@@ -13069,6 +13073,10 @@ var videoSignatureInitialState = {
|
|
|
13069
13073
|
stopRecording: function stopRecording() {
|
|
13070
13074
|
return null;
|
|
13071
13075
|
},
|
|
13076
|
+
clearRecordedData: function clearRecordedData() {
|
|
13077
|
+
return null;
|
|
13078
|
+
},
|
|
13079
|
+
isRecording: false,
|
|
13072
13080
|
signatureData: null,
|
|
13073
13081
|
signatureDataUrl: null,
|
|
13074
13082
|
signatureVideoData: null,
|
|
@@ -13112,17 +13120,28 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13112
13120
|
startRecordingVideo = _k.startRecordingVideo,
|
|
13113
13121
|
stopRecordingVideo = _k.stopRecordingVideo,
|
|
13114
13122
|
startRecordingAudio = _k.startRecordingAudio,
|
|
13115
|
-
stopRecordingAudio = _k.stopRecordingAudio
|
|
13123
|
+
stopRecordingAudio = _k.stopRecordingAudio,
|
|
13124
|
+
clearRecordedVideoData = _k.clearRecordedData;
|
|
13116
13125
|
var outputCanvas = useRef(null);
|
|
13117
13126
|
var recordingLock = useRef(false);
|
|
13127
|
+
var onRecordingStopped = useRef(function () {});
|
|
13118
13128
|
var _l = useState(false),
|
|
13119
13129
|
isRecording = _l[0],
|
|
13120
13130
|
setIsRecording = _l[1];
|
|
13121
13131
|
var startRecording = useCallback(function () {
|
|
13122
|
-
setIsRecording(true);
|
|
13132
|
+
return setIsRecording(true);
|
|
13123
13133
|
}, []);
|
|
13124
13134
|
var stopRecording = useCallback(function () {
|
|
13135
|
+
return setIsRecording(false);
|
|
13136
|
+
}, []);
|
|
13137
|
+
var clearRecordedData = useCallback(function () {
|
|
13138
|
+
var _a;
|
|
13139
|
+
recordingLock.current = false;
|
|
13140
|
+
onRecordingStopped.current = function () {
|
|
13141
|
+
return setIsRecording(true);
|
|
13142
|
+
};
|
|
13125
13143
|
setIsRecording(false);
|
|
13144
|
+
(_a = signatureRecorder.current) === null || _a === void 0 ? void 0 : _a.stop();
|
|
13126
13145
|
}, []);
|
|
13127
13146
|
useEffect(function () {
|
|
13128
13147
|
if (!isRecording) return;
|
|
@@ -13148,6 +13167,8 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13148
13167
|
_b.sent();
|
|
13149
13168
|
_b.label = 2;
|
|
13150
13169
|
case 2:
|
|
13170
|
+
recordedChunks.current = [];
|
|
13171
|
+
clearRecordedVideoData();
|
|
13151
13172
|
startRecordingVideo();
|
|
13152
13173
|
if (captureAudio) startRecordingAudio();
|
|
13153
13174
|
stream = outputCanvas.current.captureStream(24 /* fps */);
|
|
@@ -13172,13 +13193,14 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13172
13193
|
});
|
|
13173
13194
|
setSignatureVideoData(blob);
|
|
13174
13195
|
setSignatureVideoUrl(URL.createObjectURL(blob));
|
|
13196
|
+
onRecordingStopped.current();
|
|
13175
13197
|
};
|
|
13176
13198
|
return [2 /*return*/];
|
|
13177
13199
|
}
|
|
13178
13200
|
});
|
|
13179
13201
|
});
|
|
13180
13202
|
})();
|
|
13181
|
-
}, [audioStream, captureAudio, isRecording, startRecordingAudio, startRecordingVideo]);
|
|
13203
|
+
}, [audioStream, captureAudio, clearRecordedVideoData, isRecording, startRecordingAudio, startRecordingVideo]);
|
|
13182
13204
|
var animationFrame = useRef(0);
|
|
13183
13205
|
useEffect(function () {
|
|
13184
13206
|
if (!signaturePad.current || !videoRef.current || !outputCanvas.current || !camera || !isRecording || !isRecordingVideo) return;
|
|
@@ -13235,8 +13257,10 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13235
13257
|
}, [stopRecordingAudio, stopRecordingVideo]);
|
|
13236
13258
|
var value = useMemo(function () {
|
|
13237
13259
|
return {
|
|
13260
|
+
isRecording: isRecording,
|
|
13238
13261
|
startRecording: startRecording,
|
|
13239
13262
|
stopRecording: stopRecording,
|
|
13263
|
+
clearRecordedData: clearRecordedData,
|
|
13240
13264
|
signaturePad: signaturePad,
|
|
13241
13265
|
signatureData: signatureData,
|
|
13242
13266
|
signatureDataUrl: signatureDataUrl,
|
|
@@ -13244,7 +13268,7 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13244
13268
|
signatureVideoUrl: signatureVideoUrl,
|
|
13245
13269
|
onAcceptClicked: onAcceptClicked
|
|
13246
13270
|
};
|
|
13247
|
-
}, [onAcceptClicked, signatureData, signatureDataUrl, signatureVideoData, signatureVideoUrl, startRecording, stopRecording]);
|
|
13271
|
+
}, [clearRecordedData, isRecording, onAcceptClicked, signatureData, signatureDataUrl, signatureVideoData, signatureVideoUrl, startRecording, stopRecording]);
|
|
13248
13272
|
return /*#__PURE__*/React__default.createElement(VideoSignatureContext.Provider, {
|
|
13249
13273
|
value: value
|
|
13250
13274
|
}, children, /*#__PURE__*/React__default.createElement(InvisibleCanvas, {
|
|
@@ -13266,6 +13290,7 @@ function VideoSignatureGuides(_a) {
|
|
|
13266
13290
|
faceGuideStatus = _c === void 0 ? 'success' : _c,
|
|
13267
13291
|
faceGuideBorderWidth = _a.faceGuideBorderWidth,
|
|
13268
13292
|
faceGuideBorderColor = _a.faceGuideBorderColor,
|
|
13293
|
+
onClearSignaturePadClicked = _a.onClearSignaturePadClicked,
|
|
13269
13294
|
_d = _a.classNames,
|
|
13270
13295
|
classNames = _d === void 0 ? {} : _d,
|
|
13271
13296
|
_e = _a.verbiage,
|
|
@@ -13327,6 +13352,7 @@ function VideoSignatureGuides(_a) {
|
|
|
13327
13352
|
var _a, _b;
|
|
13328
13353
|
(_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.clear();
|
|
13329
13354
|
setIsSignaturePadEmpty(!!((_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.isEmpty()));
|
|
13355
|
+
onClearSignaturePadClicked === null || onClearSignaturePadClicked === void 0 ? void 0 : onClearSignaturePadClicked();
|
|
13330
13356
|
},
|
|
13331
13357
|
disabled: requestedAction === 'VERIFY_LIVENESS',
|
|
13332
13358
|
finished: true
|
|
@@ -13357,30 +13383,32 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13357
13383
|
var onVideoCaptured = _a.onVideoCaptured,
|
|
13358
13384
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
13359
13385
|
onExit = _a.onExit,
|
|
13386
|
+
_c = _a.restartVideoOnSignaturePadCleared,
|
|
13387
|
+
restartVideoOnSignaturePadCleared = _c === void 0 ? true : _c,
|
|
13360
13388
|
guidesComponent = _a.guidesComponent,
|
|
13361
|
-
|
|
13362
|
-
classNames =
|
|
13363
|
-
|
|
13364
|
-
colors =
|
|
13365
|
-
|
|
13366
|
-
rawVerbiage =
|
|
13367
|
-
|
|
13368
|
-
debugMode =
|
|
13389
|
+
_d = _a.classNames,
|
|
13390
|
+
classNames = _d === void 0 ? {} : _d,
|
|
13391
|
+
_e = _a.colors,
|
|
13392
|
+
colors = _e === void 0 ? {} : _e,
|
|
13393
|
+
_f = _a.verbiage,
|
|
13394
|
+
rawVerbiage = _f === void 0 ? {} : _f,
|
|
13395
|
+
_g = _a.debugMode,
|
|
13396
|
+
debugMode = _g === void 0 ? false : _g;
|
|
13369
13397
|
var camera = useCameraStore(function (state) {
|
|
13370
13398
|
return state.camera;
|
|
13371
13399
|
});
|
|
13372
13400
|
var onPredictionMade = useContext(SelfieGuidanceModelsContext).onPredictionMade;
|
|
13373
|
-
var
|
|
13374
|
-
signatureData =
|
|
13375
|
-
signatureDataUrl =
|
|
13376
|
-
signatureVideoData =
|
|
13377
|
-
startRecording =
|
|
13378
|
-
stopRecording =
|
|
13401
|
+
var _h = useVideoSignatureContext(),
|
|
13402
|
+
signatureData = _h.signatureData,
|
|
13403
|
+
signatureDataUrl = _h.signatureDataUrl,
|
|
13404
|
+
signatureVideoData = _h.signatureVideoData,
|
|
13405
|
+
startRecording = _h.startRecording,
|
|
13406
|
+
stopRecording = _h.stopRecording,
|
|
13407
|
+
clearRecordedData = _h.clearRecordedData,
|
|
13408
|
+
isRecording = _h.isRecording;
|
|
13379
13409
|
useEffect(function () {
|
|
13380
13410
|
startRecording();
|
|
13381
|
-
return
|
|
13382
|
-
stopRecording();
|
|
13383
|
-
};
|
|
13411
|
+
return stopRecording;
|
|
13384
13412
|
}, [startRecording, stopRecording]);
|
|
13385
13413
|
colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
|
|
13386
13414
|
colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
|
|
@@ -13392,9 +13420,9 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13392
13420
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(signatureVideoData, signatureData, signatureDataUrl);
|
|
13393
13421
|
}
|
|
13394
13422
|
}, [onVideoCaptured, signatureData, signatureDataUrl, signatureVideoData]);
|
|
13395
|
-
var
|
|
13396
|
-
numFramesWithoutFaces =
|
|
13397
|
-
setNumFramesWithoutFaces =
|
|
13423
|
+
var _j = useState(0),
|
|
13424
|
+
numFramesWithoutFaces = _j[0],
|
|
13425
|
+
setNumFramesWithoutFaces = _j[1];
|
|
13398
13426
|
useEffect(function () {
|
|
13399
13427
|
onPredictionMade(function (_a) {
|
|
13400
13428
|
var face = _a.face;
|
|
@@ -13419,9 +13447,10 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13419
13447
|
"$background": colors.guidanceMessageBackgroundColor,
|
|
13420
13448
|
"$textColor": colors.guidanceMessageTextColor
|
|
13421
13449
|
}, verbiage.guidanceMessageText))), /*#__PURE__*/React__default.createElement(GuidesComponent, {
|
|
13450
|
+
status: "success",
|
|
13422
13451
|
classNames: classNames.videoSignatureGuidesClassNames,
|
|
13423
|
-
|
|
13424
|
-
}), debugMode && ( /*#__PURE__*/React__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__default.createElement(ExitCaptureButton, {
|
|
13452
|
+
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? clearRecordedData : undefined
|
|
13453
|
+
}), debugMode && ( /*#__PURE__*/React__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__default.createElement("br", null), "Recording: ", isRecording ? 'true' : 'false')), /*#__PURE__*/React__default.createElement(ExitCaptureButton, {
|
|
13425
13454
|
onClick: onExit,
|
|
13426
13455
|
className: classNames.exitCaptureBtn
|
|
13427
13456
|
}));
|
|
@@ -13500,37 +13529,30 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13500
13529
|
captureAudio = _e === void 0 ? false : _e,
|
|
13501
13530
|
_f = _a.allowSignatureAfterLivenessCheckFailure,
|
|
13502
13531
|
allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
|
|
13532
|
+
_g = _a.restartVideoOnSignaturePadCleared,
|
|
13533
|
+
restartVideoOnSignaturePadCleared = _g === void 0 ? true : _g,
|
|
13503
13534
|
faceLivenessProps = _a.faceLivenessProps,
|
|
13504
|
-
|
|
13505
|
-
assets =
|
|
13506
|
-
|
|
13507
|
-
classNames =
|
|
13508
|
-
|
|
13509
|
-
colors =
|
|
13510
|
-
|
|
13511
|
-
verbiage =
|
|
13512
|
-
|
|
13513
|
-
debugMode =
|
|
13514
|
-
var
|
|
13515
|
-
selfieImage =
|
|
13516
|
-
setSelfieImage =
|
|
13517
|
-
setSignatureData =
|
|
13518
|
-
setSignatureVideoUrl =
|
|
13519
|
-
logSelfieCaptureAttempt =
|
|
13520
|
-
var
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13524
|
-
|
|
13525
|
-
requestMicrophoneAccess: state.requestMicrophoneAccess,
|
|
13526
|
-
releaseMicrophoneAccess: state.releaseMicrophoneAccess
|
|
13527
|
-
};
|
|
13528
|
-
})),
|
|
13529
|
-
cameraAccessDenied = _o.cameraAccessDenied,
|
|
13530
|
-
requestCameraAccess = _o.requestCameraAccess,
|
|
13531
|
-
releaseCameraAccess = _o.releaseCameraAccess,
|
|
13532
|
-
requestMicrophoneAccess = _o.requestMicrophoneAccess,
|
|
13533
|
-
releaseMicrophoneAccess = _o.releaseMicrophoneAccess;
|
|
13535
|
+
_h = _a.assets,
|
|
13536
|
+
assets = _h === void 0 ? {} : _h,
|
|
13537
|
+
_j = _a.classNames,
|
|
13538
|
+
classNames = _j === void 0 ? {} : _j,
|
|
13539
|
+
_k = _a.colors,
|
|
13540
|
+
colors = _k === void 0 ? {} : _k,
|
|
13541
|
+
_l = _a.verbiage,
|
|
13542
|
+
verbiage = _l === void 0 ? {} : _l,
|
|
13543
|
+
_m = _a.debugMode,
|
|
13544
|
+
debugMode = _m === void 0 ? false : _m;
|
|
13545
|
+
var _o = useContext(SubmissionContext),
|
|
13546
|
+
selfieImage = _o.selfieImage,
|
|
13547
|
+
setSelfieImage = _o.setSelfieImage,
|
|
13548
|
+
setSignatureData = _o.setSignatureData,
|
|
13549
|
+
setSignatureVideoUrl = _o.setSignatureVideoUrl,
|
|
13550
|
+
logSelfieCaptureAttempt = _o.logSelfieCaptureAttempt;
|
|
13551
|
+
var cameraAccessDenied = useCameraStore(useShallow(function (state) {
|
|
13552
|
+
return {
|
|
13553
|
+
cameraAccessDenied: state.cameraAccessDenied
|
|
13554
|
+
};
|
|
13555
|
+
})).cameraAccessDenied;
|
|
13534
13556
|
var _p = useState('CHECKING_LIVENESS'),
|
|
13535
13557
|
captureState = _p[0],
|
|
13536
13558
|
setCaptureState = _p[1];
|
|
@@ -13591,21 +13613,13 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13591
13613
|
var _s = useState(0),
|
|
13592
13614
|
attempt = _s[0],
|
|
13593
13615
|
setAttempt = _s[1];
|
|
13594
|
-
var
|
|
13595
|
-
|
|
13596
|
-
releaseMicrophoneAccess();
|
|
13616
|
+
var onRetry = useCallback(function () {
|
|
13617
|
+
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
13597
13618
|
setAttempt(function (n) {
|
|
13598
13619
|
return n + 1;
|
|
13599
13620
|
});
|
|
13600
13621
|
setCaptureState('CHECKING_LIVENESS');
|
|
13601
|
-
|
|
13602
|
-
void requestCameraAccess();
|
|
13603
|
-
if (captureAudio) void requestMicrophoneAccess();
|
|
13604
|
-
}, [captureAudio, onExitCapture, releaseCameraAccess, releaseMicrophoneAccess, requestCameraAccess, requestMicrophoneAccess]);
|
|
13605
|
-
var onRetry = useCallback(function () {
|
|
13606
|
-
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
13607
|
-
onExit();
|
|
13608
|
-
}, [onExit, onRetryClicked]);
|
|
13622
|
+
}, [onRetryClicked]);
|
|
13609
13623
|
var showSuccessScreen = useShowSuccessScreen(skipSuccessScreen, captureState === 'SUCCESS', onComplete);
|
|
13610
13624
|
useEffect(function () {
|
|
13611
13625
|
if (cameraAccessDenied) {
|
|
@@ -13615,14 +13629,12 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13615
13629
|
setCaptureState('CHECKING_LIVENESS');
|
|
13616
13630
|
}
|
|
13617
13631
|
}, [cameraAccessDenied]);
|
|
13618
|
-
var guidesComponent = useCallback(function (
|
|
13619
|
-
|
|
13620
|
-
return /*#__PURE__*/React__default.createElement(VideoSignatureGuides, {
|
|
13632
|
+
var guidesComponent = useCallback(function (props) {
|
|
13633
|
+
return /*#__PURE__*/React__default.createElement(VideoSignatureWizardGuides, _assign({}, props, {
|
|
13621
13634
|
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames,
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
}, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames]);
|
|
13635
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared
|
|
13636
|
+
}));
|
|
13637
|
+
}, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames, restartVideoOnSignaturePadCleared]);
|
|
13626
13638
|
var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
|
|
13627
13639
|
var onExitAfterFailure = useCallback(function (resp, req) {
|
|
13628
13640
|
onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
|
|
@@ -13648,7 +13660,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13648
13660
|
key: "face-liveness-".concat(attempt)
|
|
13649
13661
|
}, faceLivenessProps, {
|
|
13650
13662
|
onSuccess: onFaceCaptureSuccess,
|
|
13651
|
-
onExitCapture:
|
|
13663
|
+
onExitCapture: onExitCapture,
|
|
13652
13664
|
onUserCancel: onUserCancel,
|
|
13653
13665
|
onExitAfterFailure: onExitAfterFailure,
|
|
13654
13666
|
onLoadingOverlayDismissed: onLoadingOverlayDismissedCallback,
|
|
@@ -13660,14 +13672,14 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13660
13672
|
colors: colors.faceLiveness,
|
|
13661
13673
|
verbiage: verbiage.faceLiveness,
|
|
13662
13674
|
debugMode: debugMode,
|
|
13663
|
-
releaseCameraAccessOnExit: false,
|
|
13664
13675
|
renderCameraFeed: false
|
|
13665
13676
|
}));
|
|
13666
13677
|
case 'CAPTURING_SIGNATURE':
|
|
13667
13678
|
return /*#__PURE__*/React__default.createElement(VideoSignatureCapture, {
|
|
13668
13679
|
onVideoCaptured: onSignatureCaptureCompleted,
|
|
13669
13680
|
onFaceNotDetected: onSignatureCaptureFacesNotDetected,
|
|
13670
|
-
onExit:
|
|
13681
|
+
onExit: onExitCapture,
|
|
13682
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
13671
13683
|
guidesComponent: guidesComponent,
|
|
13672
13684
|
classNames: classNames,
|
|
13673
13685
|
colors: colors,
|
|
@@ -13689,6 +13701,49 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13689
13701
|
}
|
|
13690
13702
|
}()));
|
|
13691
13703
|
};
|
|
13704
|
+
function VideoSignatureWizardGuides(_a) {
|
|
13705
|
+
var status = _a.status,
|
|
13706
|
+
classNames = _a.classNames,
|
|
13707
|
+
_b = _a.restartVideoOnSignaturePadCleared,
|
|
13708
|
+
restartVideoOnSignaturePadCleared = _b === void 0 ? true : _b;
|
|
13709
|
+
var clearRecordedData = useVideoSignatureContext().clearRecordedData;
|
|
13710
|
+
return /*#__PURE__*/React__default.createElement(VideoSignatureGuides, {
|
|
13711
|
+
classNames: classNames,
|
|
13712
|
+
faceGuideStatus: status,
|
|
13713
|
+
requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS',
|
|
13714
|
+
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? clearRecordedData : undefined
|
|
13715
|
+
});
|
|
13716
|
+
}
|
|
13717
|
+
var VideoSignatureWizardWithProviders = function VideoSignatureWizardWithProviders(props) {
|
|
13718
|
+
var _a = useState(0),
|
|
13719
|
+
attempts = _a[0],
|
|
13720
|
+
setAttempts = _a[1];
|
|
13721
|
+
var onRetryClickedProp = props.onRetryClicked;
|
|
13722
|
+
var onRetryClicked = useCallback(function () {
|
|
13723
|
+
setAttempts(function (n) {
|
|
13724
|
+
return n + 1;
|
|
13725
|
+
});
|
|
13726
|
+
onRetryClickedProp === null || onRetryClickedProp === void 0 ? void 0 : onRetryClickedProp();
|
|
13727
|
+
}, [onRetryClickedProp]);
|
|
13728
|
+
return /*#__PURE__*/React__default.createElement(CameraStoreProvider, {
|
|
13729
|
+
key: "camera-store-".concat(attempts),
|
|
13730
|
+
preferIphoneContinuityCamera: false,
|
|
13731
|
+
preferFrontFacingCamera: true,
|
|
13732
|
+
requireMicrophoneAccess: props.captureAudio,
|
|
13733
|
+
maxVideoWidth: 1280,
|
|
13734
|
+
maxFps: 30,
|
|
13735
|
+
onCameraAccessDenied: props.onCameraAccessDenied,
|
|
13736
|
+
onMicrophoneAccessDenied: props.onMicrophoneAccessDenied
|
|
13737
|
+
}, /*#__PURE__*/React__default.createElement(SelfieGuidanceModelsProvider, {
|
|
13738
|
+
autoStart: false,
|
|
13739
|
+
throttleMs: 250,
|
|
13740
|
+
onModelError: props.onModelError,
|
|
13741
|
+
modelLoadTimeoutMs: props.modelLoadTimeoutMs,
|
|
13742
|
+
requireVerticalFaceCentering: false
|
|
13743
|
+
}, /*#__PURE__*/React__default.createElement(VideoSignatureWizard, _assign({}, props, {
|
|
13744
|
+
onRetryClicked: onRetryClicked
|
|
13745
|
+
}))));
|
|
13746
|
+
};
|
|
13692
13747
|
|
|
13693
13748
|
var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
13694
13749
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
@@ -14962,23 +15017,11 @@ function CompositeWizard(_a) {
|
|
|
14962
15017
|
onAccept: onSignatureCaptureSuccess
|
|
14963
15018
|
}));
|
|
14964
15019
|
case 'VideoSignatureCapture':
|
|
14965
|
-
return /*#__PURE__*/React__default.createElement(
|
|
14966
|
-
|
|
14967
|
-
preferFrontFacingCamera: true,
|
|
14968
|
-
requireMicrophoneAccess: videoSignatureCaptureProps.captureAudio,
|
|
14969
|
-
maxVideoWidth: 1280,
|
|
14970
|
-
maxFps: 30,
|
|
15020
|
+
return /*#__PURE__*/React__default.createElement(VideoSignatureWizardWithProviders, _assign({}, videoSignatureCaptureProps, {
|
|
15021
|
+
onComplete: onVideoSignatureComplete,
|
|
14971
15022
|
onCameraAccessDenied: onCameraAccessDenied,
|
|
14972
15023
|
onMicrophoneAccessDenied: onMicrophoneAccessDenied
|
|
14973
|
-
}
|
|
14974
|
-
autoStart: false,
|
|
14975
|
-
throttleMs: 250,
|
|
14976
|
-
onModelError: videoSignatureCaptureProps.onModelError,
|
|
14977
|
-
modelLoadTimeoutMs: videoSignatureCaptureProps.modelLoadTimeoutMs,
|
|
14978
|
-
requireVerticalFaceCentering: false
|
|
14979
|
-
}, /*#__PURE__*/React__default.createElement(VideoSignatureWizard, _assign({}, videoSignatureCaptureProps, {
|
|
14980
|
-
onComplete: onVideoSignatureComplete
|
|
14981
|
-
}))));
|
|
15024
|
+
}));
|
|
14982
15025
|
case 'AdditionalDocumentCapture':
|
|
14983
15026
|
return /*#__PURE__*/React__default.createElement(AdditionalDocumentCaptureWizard, _assign({}, additionalDocumentCaptureProps, {
|
|
14984
15027
|
documents: documents,
|
|
@@ -17295,16 +17338,18 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17295
17338
|
modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
|
|
17296
17339
|
_g = _a.allowSignatureAfterLivenessCheckFailure,
|
|
17297
17340
|
allowSignatureAfterLivenessCheckFailure = _g === void 0 ? false : _g,
|
|
17341
|
+
_h = _a.restartVideoOnSignaturePadCleared,
|
|
17342
|
+
restartVideoOnSignaturePadCleared = _h === void 0 ? true : _h,
|
|
17298
17343
|
faceLivenessProps = _a.faceLivenessProps,
|
|
17299
|
-
|
|
17300
|
-
theme =
|
|
17344
|
+
_j = _a.theme,
|
|
17345
|
+
theme = _j === void 0 ? 'default' : _j,
|
|
17301
17346
|
classNames = _a.classNames,
|
|
17302
17347
|
colors = _a.colors,
|
|
17303
17348
|
verbiage = _a.verbiage,
|
|
17304
17349
|
geolocationEnabled = _a.geolocationEnabled,
|
|
17305
17350
|
geolocationRequired = _a.geolocationRequired,
|
|
17306
|
-
|
|
17307
|
-
debugMode =
|
|
17351
|
+
_k = _a.debugMode,
|
|
17352
|
+
debugMode = _k === void 0 ? false : _k;
|
|
17308
17353
|
useLanguage(lang);
|
|
17309
17354
|
useDebugLogging(debugMode);
|
|
17310
17355
|
return /*#__PURE__*/React__default.createElement(AuthProvider, {
|
|
@@ -17348,6 +17393,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17348
17393
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
17349
17394
|
faceLivenessProps: faceLivenessProps,
|
|
17350
17395
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
17396
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
17351
17397
|
classNames: classNames,
|
|
17352
17398
|
colors: colors,
|
|
17353
17399
|
debugMode: debugMode,
|
|
@@ -17355,7 +17401,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17355
17401
|
onModelError: onModelError,
|
|
17356
17402
|
onUserCancel: onUserCancel
|
|
17357
17403
|
};
|
|
17358
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
17404
|
+
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
17359
17405
|
}))));
|
|
17360
17406
|
};
|
|
17361
17407
|
|