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
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.153';
|
|
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,12 @@ 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
|
-
|
|
13452
|
+
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? function () {
|
|
13453
|
+
return setTimeout(clearRecordedData, 100);
|
|
13454
|
+
} : undefined
|
|
13455
|
+
}), 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
13456
|
onClick: onExit,
|
|
13426
13457
|
className: classNames.exitCaptureBtn
|
|
13427
13458
|
}));
|
|
@@ -13500,37 +13531,30 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13500
13531
|
captureAudio = _e === void 0 ? false : _e,
|
|
13501
13532
|
_f = _a.allowSignatureAfterLivenessCheckFailure,
|
|
13502
13533
|
allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
|
|
13534
|
+
_g = _a.restartVideoOnSignaturePadCleared,
|
|
13535
|
+
restartVideoOnSignaturePadCleared = _g === void 0 ? true : _g,
|
|
13503
13536
|
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;
|
|
13537
|
+
_h = _a.assets,
|
|
13538
|
+
assets = _h === void 0 ? {} : _h,
|
|
13539
|
+
_j = _a.classNames,
|
|
13540
|
+
classNames = _j === void 0 ? {} : _j,
|
|
13541
|
+
_k = _a.colors,
|
|
13542
|
+
colors = _k === void 0 ? {} : _k,
|
|
13543
|
+
_l = _a.verbiage,
|
|
13544
|
+
verbiage = _l === void 0 ? {} : _l,
|
|
13545
|
+
_m = _a.debugMode,
|
|
13546
|
+
debugMode = _m === void 0 ? false : _m;
|
|
13547
|
+
var _o = useContext(SubmissionContext),
|
|
13548
|
+
selfieImage = _o.selfieImage,
|
|
13549
|
+
setSelfieImage = _o.setSelfieImage,
|
|
13550
|
+
setSignatureData = _o.setSignatureData,
|
|
13551
|
+
setSignatureVideoUrl = _o.setSignatureVideoUrl,
|
|
13552
|
+
logSelfieCaptureAttempt = _o.logSelfieCaptureAttempt;
|
|
13553
|
+
var cameraAccessDenied = useCameraStore(useShallow(function (state) {
|
|
13554
|
+
return {
|
|
13555
|
+
cameraAccessDenied: state.cameraAccessDenied
|
|
13556
|
+
};
|
|
13557
|
+
})).cameraAccessDenied;
|
|
13534
13558
|
var _p = useState('CHECKING_LIVENESS'),
|
|
13535
13559
|
captureState = _p[0],
|
|
13536
13560
|
setCaptureState = _p[1];
|
|
@@ -13591,21 +13615,13 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13591
13615
|
var _s = useState(0),
|
|
13592
13616
|
attempt = _s[0],
|
|
13593
13617
|
setAttempt = _s[1];
|
|
13594
|
-
var
|
|
13595
|
-
|
|
13596
|
-
releaseMicrophoneAccess();
|
|
13618
|
+
var onRetry = useCallback(function () {
|
|
13619
|
+
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
13597
13620
|
setAttempt(function (n) {
|
|
13598
13621
|
return n + 1;
|
|
13599
13622
|
});
|
|
13600
13623
|
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]);
|
|
13624
|
+
}, [onRetryClicked]);
|
|
13609
13625
|
var showSuccessScreen = useShowSuccessScreen(skipSuccessScreen, captureState === 'SUCCESS', onComplete);
|
|
13610
13626
|
useEffect(function () {
|
|
13611
13627
|
if (cameraAccessDenied) {
|
|
@@ -13615,14 +13631,12 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13615
13631
|
setCaptureState('CHECKING_LIVENESS');
|
|
13616
13632
|
}
|
|
13617
13633
|
}, [cameraAccessDenied]);
|
|
13618
|
-
var guidesComponent = useCallback(function (
|
|
13619
|
-
|
|
13620
|
-
return /*#__PURE__*/React__default.createElement(VideoSignatureGuides, {
|
|
13634
|
+
var guidesComponent = useCallback(function (props) {
|
|
13635
|
+
return /*#__PURE__*/React__default.createElement(VideoSignatureWizardGuides, _assign({}, props, {
|
|
13621
13636
|
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames,
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
}, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames]);
|
|
13637
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared
|
|
13638
|
+
}));
|
|
13639
|
+
}, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames, restartVideoOnSignaturePadCleared]);
|
|
13626
13640
|
var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
|
|
13627
13641
|
var onExitAfterFailure = useCallback(function (resp, req) {
|
|
13628
13642
|
onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
|
|
@@ -13648,7 +13662,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13648
13662
|
key: "face-liveness-".concat(attempt)
|
|
13649
13663
|
}, faceLivenessProps, {
|
|
13650
13664
|
onSuccess: onFaceCaptureSuccess,
|
|
13651
|
-
onExitCapture:
|
|
13665
|
+
onExitCapture: onExitCapture,
|
|
13652
13666
|
onUserCancel: onUserCancel,
|
|
13653
13667
|
onExitAfterFailure: onExitAfterFailure,
|
|
13654
13668
|
onLoadingOverlayDismissed: onLoadingOverlayDismissedCallback,
|
|
@@ -13660,14 +13674,14 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13660
13674
|
colors: colors.faceLiveness,
|
|
13661
13675
|
verbiage: verbiage.faceLiveness,
|
|
13662
13676
|
debugMode: debugMode,
|
|
13663
|
-
releaseCameraAccessOnExit: false,
|
|
13664
13677
|
renderCameraFeed: false
|
|
13665
13678
|
}));
|
|
13666
13679
|
case 'CAPTURING_SIGNATURE':
|
|
13667
13680
|
return /*#__PURE__*/React__default.createElement(VideoSignatureCapture, {
|
|
13668
13681
|
onVideoCaptured: onSignatureCaptureCompleted,
|
|
13669
13682
|
onFaceNotDetected: onSignatureCaptureFacesNotDetected,
|
|
13670
|
-
onExit:
|
|
13683
|
+
onExit: onExitCapture,
|
|
13684
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
13671
13685
|
guidesComponent: guidesComponent,
|
|
13672
13686
|
classNames: classNames,
|
|
13673
13687
|
colors: colors,
|
|
@@ -13689,6 +13703,51 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13689
13703
|
}
|
|
13690
13704
|
}()));
|
|
13691
13705
|
};
|
|
13706
|
+
function VideoSignatureWizardGuides(_a) {
|
|
13707
|
+
var status = _a.status,
|
|
13708
|
+
classNames = _a.classNames,
|
|
13709
|
+
_b = _a.restartVideoOnSignaturePadCleared,
|
|
13710
|
+
restartVideoOnSignaturePadCleared = _b === void 0 ? true : _b;
|
|
13711
|
+
var clearRecordedData = useVideoSignatureContext().clearRecordedData;
|
|
13712
|
+
return /*#__PURE__*/React__default.createElement(VideoSignatureGuides, {
|
|
13713
|
+
classNames: classNames,
|
|
13714
|
+
faceGuideStatus: status,
|
|
13715
|
+
requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS',
|
|
13716
|
+
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? function () {
|
|
13717
|
+
return setTimeout(clearRecordedData, 100);
|
|
13718
|
+
} : undefined
|
|
13719
|
+
});
|
|
13720
|
+
}
|
|
13721
|
+
var VideoSignatureWizardWithProviders = function VideoSignatureWizardWithProviders(props) {
|
|
13722
|
+
var _a = useState(0),
|
|
13723
|
+
attempts = _a[0],
|
|
13724
|
+
setAttempts = _a[1];
|
|
13725
|
+
var onRetryClickedProp = props.onRetryClicked;
|
|
13726
|
+
var onRetryClicked = useCallback(function () {
|
|
13727
|
+
setAttempts(function (n) {
|
|
13728
|
+
return n + 1;
|
|
13729
|
+
});
|
|
13730
|
+
onRetryClickedProp === null || onRetryClickedProp === void 0 ? void 0 : onRetryClickedProp();
|
|
13731
|
+
}, [onRetryClickedProp]);
|
|
13732
|
+
return /*#__PURE__*/React__default.createElement(CameraStoreProvider, {
|
|
13733
|
+
key: "camera-store-".concat(attempts),
|
|
13734
|
+
preferIphoneContinuityCamera: false,
|
|
13735
|
+
preferFrontFacingCamera: true,
|
|
13736
|
+
requireMicrophoneAccess: props.captureAudio,
|
|
13737
|
+
maxVideoWidth: 1280,
|
|
13738
|
+
maxFps: 30,
|
|
13739
|
+
onCameraAccessDenied: props.onCameraAccessDenied,
|
|
13740
|
+
onMicrophoneAccessDenied: props.onMicrophoneAccessDenied
|
|
13741
|
+
}, /*#__PURE__*/React__default.createElement(SelfieGuidanceModelsProvider, {
|
|
13742
|
+
autoStart: false,
|
|
13743
|
+
throttleMs: 250,
|
|
13744
|
+
onModelError: props.onModelError,
|
|
13745
|
+
modelLoadTimeoutMs: props.modelLoadTimeoutMs,
|
|
13746
|
+
requireVerticalFaceCentering: false
|
|
13747
|
+
}, /*#__PURE__*/React__default.createElement(VideoSignatureWizard, _assign({}, props, {
|
|
13748
|
+
onRetryClicked: onRetryClicked
|
|
13749
|
+
}))));
|
|
13750
|
+
};
|
|
13692
13751
|
|
|
13693
13752
|
var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
13694
13753
|
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 +15021,11 @@ function CompositeWizard(_a) {
|
|
|
14962
15021
|
onAccept: onSignatureCaptureSuccess
|
|
14963
15022
|
}));
|
|
14964
15023
|
case 'VideoSignatureCapture':
|
|
14965
|
-
return /*#__PURE__*/React__default.createElement(
|
|
14966
|
-
|
|
14967
|
-
preferFrontFacingCamera: true,
|
|
14968
|
-
requireMicrophoneAccess: videoSignatureCaptureProps.captureAudio,
|
|
14969
|
-
maxVideoWidth: 1280,
|
|
14970
|
-
maxFps: 30,
|
|
15024
|
+
return /*#__PURE__*/React__default.createElement(VideoSignatureWizardWithProviders, _assign({}, videoSignatureCaptureProps, {
|
|
15025
|
+
onComplete: onVideoSignatureComplete,
|
|
14971
15026
|
onCameraAccessDenied: onCameraAccessDenied,
|
|
14972
15027
|
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
|
-
}))));
|
|
15028
|
+
}));
|
|
14982
15029
|
case 'AdditionalDocumentCapture':
|
|
14983
15030
|
return /*#__PURE__*/React__default.createElement(AdditionalDocumentCaptureWizard, _assign({}, additionalDocumentCaptureProps, {
|
|
14984
15031
|
documents: documents,
|
|
@@ -17295,16 +17342,18 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17295
17342
|
modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
|
|
17296
17343
|
_g = _a.allowSignatureAfterLivenessCheckFailure,
|
|
17297
17344
|
allowSignatureAfterLivenessCheckFailure = _g === void 0 ? false : _g,
|
|
17345
|
+
_h = _a.restartVideoOnSignaturePadCleared,
|
|
17346
|
+
restartVideoOnSignaturePadCleared = _h === void 0 ? true : _h,
|
|
17298
17347
|
faceLivenessProps = _a.faceLivenessProps,
|
|
17299
|
-
|
|
17300
|
-
theme =
|
|
17348
|
+
_j = _a.theme,
|
|
17349
|
+
theme = _j === void 0 ? 'default' : _j,
|
|
17301
17350
|
classNames = _a.classNames,
|
|
17302
17351
|
colors = _a.colors,
|
|
17303
17352
|
verbiage = _a.verbiage,
|
|
17304
17353
|
geolocationEnabled = _a.geolocationEnabled,
|
|
17305
17354
|
geolocationRequired = _a.geolocationRequired,
|
|
17306
|
-
|
|
17307
|
-
debugMode =
|
|
17355
|
+
_k = _a.debugMode,
|
|
17356
|
+
debugMode = _k === void 0 ? false : _k;
|
|
17308
17357
|
useLanguage(lang);
|
|
17309
17358
|
useDebugLogging(debugMode);
|
|
17310
17359
|
return /*#__PURE__*/React__default.createElement(AuthProvider, {
|
|
@@ -17348,6 +17397,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17348
17397
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
17349
17398
|
faceLivenessProps: faceLivenessProps,
|
|
17350
17399
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
17400
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
17351
17401
|
classNames: classNames,
|
|
17352
17402
|
colors: colors,
|
|
17353
17403
|
debugMode: debugMode,
|
|
@@ -17355,7 +17405,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17355
17405
|
onModelError: onModelError,
|
|
17356
17406
|
onUserCancel: onUserCancel
|
|
17357
17407
|
};
|
|
17358
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
17408
|
+
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
17359
17409
|
}))));
|
|
17360
17410
|
};
|
|
17361
17411
|
|