idmission-web-sdk 1.1.1 → 1.1.2
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/video_id/IdVideoCapture.d.ts +3 -1
- package/dist/sdk2.cjs.development.js +37 -15
- 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 +37 -15
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +37 -15
- 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
|
@@ -18,6 +18,7 @@ export type IdVideoCaptureClassNames = {
|
|
|
18
18
|
countdown?: string;
|
|
19
19
|
captureBtnContainer?: string;
|
|
20
20
|
captureBtn?: string;
|
|
21
|
+
exitCaptureBtn?: string;
|
|
21
22
|
};
|
|
22
23
|
export type IdVideoCaptureColors = {
|
|
23
24
|
guidesSatisfiedColor?: string;
|
|
@@ -37,6 +38,7 @@ export type IdVideoCaptureProps = {
|
|
|
37
38
|
onIdBackImageCaptured?: (imageUrl: string) => void;
|
|
38
39
|
onFaceNotDetected?: () => void;
|
|
39
40
|
onRecordingFailed?: () => void;
|
|
41
|
+
onExitCapture?: () => void;
|
|
40
42
|
idCaptureModelsEnabled?: boolean;
|
|
41
43
|
idCardFrontDelay?: number;
|
|
42
44
|
idCardFrontDetectionThreshold?: number;
|
|
@@ -59,4 +61,4 @@ export type IdVideoCaptureProps = {
|
|
|
59
61
|
verbiage?: IdVideoCaptureVerbiage;
|
|
60
62
|
debugMode?: boolean;
|
|
61
63
|
};
|
|
62
|
-
export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, onRecordingFailed, idCaptureModelsEnabled, idCardFrontDelay, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, idCardBackDetectionThreshold, idCardBackFocusThreshold, goodIdCardBackFramesThreshold, skipShowIdCardBack, captureCountdownSeconds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, mergeAVStreams, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
|
|
64
|
+
export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, onRecordingFailed, onExitCapture, idCaptureModelsEnabled, idCardFrontDelay, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, idCardBackDetectionThreshold, idCardBackFocusThreshold, goodIdCardBackFramesThreshold, skipShowIdCardBack, captureCountdownSeconds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, mergeAVStreams, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
|
|
@@ -51,7 +51,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
51
51
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
52
52
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
53
53
|
|
|
54
|
-
var webSdkVersion = '1.1.
|
|
54
|
+
var webSdkVersion = '1.1.2';
|
|
55
55
|
|
|
56
56
|
function getPlatform() {
|
|
57
57
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -13592,6 +13592,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
13592
13592
|
dispatch = _15[1];
|
|
13593
13593
|
var _16 = React.useContext(CameraStateContext),
|
|
13594
13594
|
cameraAccessDenied = _16.cameraAccessDenied,
|
|
13595
|
+
requestCameraAccess = _16.requestCameraAccess,
|
|
13595
13596
|
releaseCameraAccess = _16.releaseCameraAccess;
|
|
13596
13597
|
var _17 = React.useState(false),
|
|
13597
13598
|
overlayDismissed = _17[0],
|
|
@@ -13671,6 +13672,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
13671
13672
|
attempt = _19[0],
|
|
13672
13673
|
setAttempt = _19[1];
|
|
13673
13674
|
var onExit = React.useCallback(function () {
|
|
13675
|
+
releaseCameraAccess();
|
|
13674
13676
|
setOverlayDismissed(false);
|
|
13675
13677
|
setAttempt(function (n) {
|
|
13676
13678
|
return n + 1;
|
|
@@ -13679,7 +13681,8 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
13679
13681
|
type: 'resetWizard'
|
|
13680
13682
|
});
|
|
13681
13683
|
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
13682
|
-
|
|
13684
|
+
requestCameraAccess();
|
|
13685
|
+
}, [dispatch, onExitCapture, releaseCameraAccess]);
|
|
13683
13686
|
React.useEffect(function () {
|
|
13684
13687
|
if (submissionStatus !== SubmissionStatus.READY) {
|
|
13685
13688
|
releaseCameraAccessOnExit && releaseCameraAccess();
|
|
@@ -15322,6 +15325,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
15322
15325
|
logSelfieCaptureAttempt = _s.logSelfieCaptureAttempt;
|
|
15323
15326
|
var _t = React.useContext(CameraStateContext),
|
|
15324
15327
|
cameraAccessDenied = _t.cameraAccessDenied,
|
|
15328
|
+
requestCameraAccess = _t.requestCameraAccess,
|
|
15325
15329
|
releaseCameraAccess = _t.releaseCameraAccess;
|
|
15326
15330
|
var _u = React.useState(''),
|
|
15327
15331
|
faceCropImageUrl = _u[0],
|
|
@@ -15387,8 +15391,10 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
15387
15391
|
return n + 1;
|
|
15388
15392
|
});
|
|
15389
15393
|
setCaptureState('LOADING');
|
|
15394
|
+
releaseCameraAccess();
|
|
15390
15395
|
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
15391
|
-
|
|
15396
|
+
requestCameraAccess();
|
|
15397
|
+
}, [onExitCapture, releaseCameraAccess, requestCameraAccess]);
|
|
15392
15398
|
var onDoneCallback = React.useCallback(function () {
|
|
15393
15399
|
logCaptureMetadata();
|
|
15394
15400
|
releaseCameraAccessOnExit && releaseCameraAccess();
|
|
@@ -16204,10 +16210,13 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
16204
16210
|
setSignatureData = _l.setSignatureData,
|
|
16205
16211
|
setSignatureVideoUrl = _l.setSignatureVideoUrl,
|
|
16206
16212
|
logSelfieCaptureAttempt = _l.logSelfieCaptureAttempt;
|
|
16207
|
-
var
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16213
|
+
var _m = React.useContext(CameraStateContext),
|
|
16214
|
+
cameraAccessDenied = _m.cameraAccessDenied,
|
|
16215
|
+
requestCameraAccess = _m.requestCameraAccess,
|
|
16216
|
+
releaseCameraAccess = _m.releaseCameraAccess;
|
|
16217
|
+
var _o = React.useState('LOADING'),
|
|
16218
|
+
captureState = _o[0],
|
|
16219
|
+
setCaptureState = _o[1];
|
|
16211
16220
|
var operationStartedAt = React.useRef();
|
|
16212
16221
|
var captureStartedAt = React.useRef();
|
|
16213
16222
|
var captureEndedAt = React.useRef();
|
|
@@ -16260,16 +16269,18 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
16260
16269
|
var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
|
|
16261
16270
|
setCaptureState('CHECKING_LIVENESS');
|
|
16262
16271
|
}, []);
|
|
16263
|
-
var
|
|
16264
|
-
attempt =
|
|
16265
|
-
setAttempt =
|
|
16272
|
+
var _p = React.useState(0),
|
|
16273
|
+
attempt = _p[0],
|
|
16274
|
+
setAttempt = _p[1];
|
|
16266
16275
|
var onExit = React.useCallback(function () {
|
|
16276
|
+
releaseCameraAccess();
|
|
16267
16277
|
setAttempt(function (n) {
|
|
16268
16278
|
return n + 1;
|
|
16269
16279
|
});
|
|
16270
16280
|
setCaptureState('LOADING');
|
|
16271
16281
|
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
16272
|
-
|
|
16282
|
+
requestCameraAccess();
|
|
16283
|
+
}, [onExitCapture, releaseCameraAccess, requestCameraAccess]);
|
|
16273
16284
|
var onRetry = React.useCallback(function () {
|
|
16274
16285
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
16275
16286
|
onExit();
|
|
@@ -16623,6 +16634,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
16623
16634
|
onIdBackImageCaptured = _a.onIdBackImageCaptured,
|
|
16624
16635
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
16625
16636
|
onRecordingFailed = _a.onRecordingFailed,
|
|
16637
|
+
onExitCapture = _a.onExitCapture,
|
|
16626
16638
|
_u = _a.idCaptureModelsEnabled,
|
|
16627
16639
|
idCaptureModelsEnabled = _u === void 0 ? true : _u,
|
|
16628
16640
|
_v = _a.idCardFrontDelay,
|
|
@@ -17037,7 +17049,10 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
17037
17049
|
},
|
|
17038
17050
|
disabled: !!countdownStartedAt || frameLock.current,
|
|
17039
17051
|
className: classNames.captureBtn
|
|
17040
|
-
}, captureBtnText)))
|
|
17052
|
+
}, captureBtnText))), /*#__PURE__*/React__default['default'].createElement(ExitCaptureButton, {
|
|
17053
|
+
onClick: onExitCapture,
|
|
17054
|
+
className: classNames.exitCaptureBtn
|
|
17055
|
+
}));
|
|
17041
17056
|
};
|
|
17042
17057
|
var CountdownContainer = styled__default['default'].div(templateObject_1$5 || (templateObject_1$5 = tslib.__makeTemplateObject(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100dvw;\n height: 100dvh;\n z-index: 99999;\n display: flex;\n"], ["\n position: fixed;\n top: 0;\n left: 0;\n width: 100dvw;\n height: 100dvh;\n z-index: 99999;\n display: flex;\n"])));
|
|
17043
17058
|
var Countdown = styled__default['default'].div(templateObject_2$5 || (templateObject_2$5 = tslib.__makeTemplateObject(["\n color: white;\n font-size: 64px;\n font-weight: bold;\n margin: auto;\n"], ["\n color: white;\n font-size: 64px;\n font-weight: bold;\n margin: auto;\n"])));
|
|
@@ -17294,6 +17309,12 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17294
17309
|
});
|
|
17295
17310
|
setCaptureState('CHECKING_LIVENESS');
|
|
17296
17311
|
}, []);
|
|
17312
|
+
var handleExitCapture = React.useCallback(function () {
|
|
17313
|
+
setAttempt(function (n) {
|
|
17314
|
+
return n + 1;
|
|
17315
|
+
});
|
|
17316
|
+
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
17317
|
+
}, [onExitCapture]);
|
|
17297
17318
|
if (submissionStatus === SubmissionStatus.SUBMITTING) {
|
|
17298
17319
|
return /*#__PURE__*/React__default['default'].createElement(PageContainer, {
|
|
17299
17320
|
className: "flex"
|
|
@@ -17306,7 +17327,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17306
17327
|
onModelError: onIdCaptureModelError,
|
|
17307
17328
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs
|
|
17308
17329
|
}, /*#__PURE__*/React__default['default'].createElement(CameraProvider, {
|
|
17309
|
-
key: isCapturingId ? 'id
|
|
17330
|
+
key: "".concat(isCapturingId ? 'id' : 'selfie', "-camera-").concat(attempt),
|
|
17310
17331
|
preferContinuityCamera: isCapturingId,
|
|
17311
17332
|
preferFrontFacingCamera: !isCapturingId,
|
|
17312
17333
|
requireMicrophoneAccess: !isCapturingId && !!readTextPrompt,
|
|
@@ -17335,7 +17356,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17335
17356
|
colors: colors.idCapture,
|
|
17336
17357
|
verbiage: verbiage.idCapture,
|
|
17337
17358
|
onSuccess: onIdCaptureSuccess,
|
|
17338
|
-
onExitCapture:
|
|
17359
|
+
onExitCapture: handleExitCapture,
|
|
17339
17360
|
onUserCancel: onUserCancel,
|
|
17340
17361
|
skipSuccessScreen: true,
|
|
17341
17362
|
releaseCameraAccessOnExit: false,
|
|
@@ -17351,7 +17372,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17351
17372
|
silentFallback: silentFallback
|
|
17352
17373
|
}, faceLivenessProps, {
|
|
17353
17374
|
onComplete: onFaceCaptureSuccess,
|
|
17354
|
-
onExitCapture:
|
|
17375
|
+
onExitCapture: handleExitCapture,
|
|
17355
17376
|
onExitAfterFailure: onFaceCaptureExitAfterFailure,
|
|
17356
17377
|
onUserCancel: onUserCancel,
|
|
17357
17378
|
skipSuccessScreen: true,
|
|
@@ -17371,6 +17392,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17371
17392
|
onIdBackImageCaptured: setIdCaptureVideoIdBackImage,
|
|
17372
17393
|
onFaceNotDetected: onVideoCaptureFaceNotDetected,
|
|
17373
17394
|
onRecordingFailed: onRecordingFailed,
|
|
17395
|
+
onExitCapture: handleExitCapture,
|
|
17374
17396
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
17375
17397
|
idCardFrontDetectionThreshold: idCardFrontDetectionThreshold,
|
|
17376
17398
|
idCardBackDetectionThreshold: idCardBackDetectionThreshold,
|