idmission-web-sdk 1.1.1 → 1.1.3
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 +51 -26
- 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 +51 -26
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +51 -26
- 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.3';
|
|
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,22 @@ 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]);
|
|
15398
|
+
var onRetryCallback = React.useCallback(function () {
|
|
15399
|
+
logCaptureMetadata();
|
|
15400
|
+
setAttempt(function (n) {
|
|
15401
|
+
return n + 1;
|
|
15402
|
+
});
|
|
15403
|
+
setRetryCount(function (n) {
|
|
15404
|
+
return n + 1;
|
|
15405
|
+
});
|
|
15406
|
+
setCaptureState('LOADING');
|
|
15407
|
+
releaseCameraAccess();
|
|
15408
|
+
requestCameraAccess();
|
|
15409
|
+
}, [logCaptureMetadata, releaseCameraAccess, requestCameraAccess]);
|
|
15392
15410
|
var onDoneCallback = React.useCallback(function () {
|
|
15393
15411
|
logCaptureMetadata();
|
|
15394
15412
|
releaseCameraAccessOnExit && releaseCameraAccess();
|
|
@@ -15434,10 +15452,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
15434
15452
|
colors: colors.success,
|
|
15435
15453
|
verbiage: verbiage.success,
|
|
15436
15454
|
onDoneClick: onDoneCallback,
|
|
15437
|
-
onRetryClick:
|
|
15438
|
-
logCaptureMetadata();
|
|
15439
|
-
setCaptureState('CAPTURING');
|
|
15440
|
-
}
|
|
15455
|
+
onRetryClick: onRetryCallback
|
|
15441
15456
|
});
|
|
15442
15457
|
case 'FAILED':
|
|
15443
15458
|
return /*#__PURE__*/React__default['default'].createElement(FaceLivenessFailure, {
|
|
@@ -15447,13 +15462,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
15447
15462
|
colors: colors.failure,
|
|
15448
15463
|
verbiage: verbiage.failure,
|
|
15449
15464
|
canRetry: maxRetries > -1 && retryCount < maxRetries,
|
|
15450
|
-
onRetryClick:
|
|
15451
|
-
logCaptureMetadata();
|
|
15452
|
-
setRetryCount(function (c) {
|
|
15453
|
-
return c + 1;
|
|
15454
|
-
});
|
|
15455
|
-
setCaptureState('CAPTURING');
|
|
15456
|
-
},
|
|
15465
|
+
onRetryClick: onRetryCallback,
|
|
15457
15466
|
onExitClick: function onExitClick() {
|
|
15458
15467
|
releaseCameraAccessOnExit && releaseCameraAccess();
|
|
15459
15468
|
setTimeout(function () {
|
|
@@ -16204,10 +16213,13 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
16204
16213
|
setSignatureData = _l.setSignatureData,
|
|
16205
16214
|
setSignatureVideoUrl = _l.setSignatureVideoUrl,
|
|
16206
16215
|
logSelfieCaptureAttempt = _l.logSelfieCaptureAttempt;
|
|
16207
|
-
var
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16216
|
+
var _m = React.useContext(CameraStateContext),
|
|
16217
|
+
cameraAccessDenied = _m.cameraAccessDenied,
|
|
16218
|
+
requestCameraAccess = _m.requestCameraAccess,
|
|
16219
|
+
releaseCameraAccess = _m.releaseCameraAccess;
|
|
16220
|
+
var _o = React.useState('LOADING'),
|
|
16221
|
+
captureState = _o[0],
|
|
16222
|
+
setCaptureState = _o[1];
|
|
16211
16223
|
var operationStartedAt = React.useRef();
|
|
16212
16224
|
var captureStartedAt = React.useRef();
|
|
16213
16225
|
var captureEndedAt = React.useRef();
|
|
@@ -16260,16 +16272,18 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
16260
16272
|
var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
|
|
16261
16273
|
setCaptureState('CHECKING_LIVENESS');
|
|
16262
16274
|
}, []);
|
|
16263
|
-
var
|
|
16264
|
-
attempt =
|
|
16265
|
-
setAttempt =
|
|
16275
|
+
var _p = React.useState(0),
|
|
16276
|
+
attempt = _p[0],
|
|
16277
|
+
setAttempt = _p[1];
|
|
16266
16278
|
var onExit = React.useCallback(function () {
|
|
16279
|
+
releaseCameraAccess();
|
|
16267
16280
|
setAttempt(function (n) {
|
|
16268
16281
|
return n + 1;
|
|
16269
16282
|
});
|
|
16270
16283
|
setCaptureState('LOADING');
|
|
16271
16284
|
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
16272
|
-
|
|
16285
|
+
requestCameraAccess();
|
|
16286
|
+
}, [onExitCapture, releaseCameraAccess, requestCameraAccess]);
|
|
16273
16287
|
var onRetry = React.useCallback(function () {
|
|
16274
16288
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
16275
16289
|
onExit();
|
|
@@ -16623,6 +16637,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
16623
16637
|
onIdBackImageCaptured = _a.onIdBackImageCaptured,
|
|
16624
16638
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
16625
16639
|
onRecordingFailed = _a.onRecordingFailed,
|
|
16640
|
+
onExitCapture = _a.onExitCapture,
|
|
16626
16641
|
_u = _a.idCaptureModelsEnabled,
|
|
16627
16642
|
idCaptureModelsEnabled = _u === void 0 ? true : _u,
|
|
16628
16643
|
_v = _a.idCardFrontDelay,
|
|
@@ -17037,7 +17052,10 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
17037
17052
|
},
|
|
17038
17053
|
disabled: !!countdownStartedAt || frameLock.current,
|
|
17039
17054
|
className: classNames.captureBtn
|
|
17040
|
-
}, captureBtnText)))
|
|
17055
|
+
}, captureBtnText))), /*#__PURE__*/React__default['default'].createElement(ExitCaptureButton, {
|
|
17056
|
+
onClick: onExitCapture,
|
|
17057
|
+
className: classNames.exitCaptureBtn
|
|
17058
|
+
}));
|
|
17041
17059
|
};
|
|
17042
17060
|
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
17061
|
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 +17312,12 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17294
17312
|
});
|
|
17295
17313
|
setCaptureState('CHECKING_LIVENESS');
|
|
17296
17314
|
}, []);
|
|
17315
|
+
var handleExitCapture = React.useCallback(function () {
|
|
17316
|
+
setAttempt(function (n) {
|
|
17317
|
+
return n + 1;
|
|
17318
|
+
});
|
|
17319
|
+
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
17320
|
+
}, [onExitCapture]);
|
|
17297
17321
|
if (submissionStatus === SubmissionStatus.SUBMITTING) {
|
|
17298
17322
|
return /*#__PURE__*/React__default['default'].createElement(PageContainer, {
|
|
17299
17323
|
className: "flex"
|
|
@@ -17306,7 +17330,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17306
17330
|
onModelError: onIdCaptureModelError,
|
|
17307
17331
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs
|
|
17308
17332
|
}, /*#__PURE__*/React__default['default'].createElement(CameraProvider, {
|
|
17309
|
-
key: isCapturingId ? 'id
|
|
17333
|
+
key: "".concat(isCapturingId ? 'id' : 'selfie', "-camera-").concat(attempt),
|
|
17310
17334
|
preferContinuityCamera: isCapturingId,
|
|
17311
17335
|
preferFrontFacingCamera: !isCapturingId,
|
|
17312
17336
|
requireMicrophoneAccess: !isCapturingId && !!readTextPrompt,
|
|
@@ -17335,7 +17359,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17335
17359
|
colors: colors.idCapture,
|
|
17336
17360
|
verbiage: verbiage.idCapture,
|
|
17337
17361
|
onSuccess: onIdCaptureSuccess,
|
|
17338
|
-
onExitCapture:
|
|
17362
|
+
onExitCapture: handleExitCapture,
|
|
17339
17363
|
onUserCancel: onUserCancel,
|
|
17340
17364
|
skipSuccessScreen: true,
|
|
17341
17365
|
releaseCameraAccessOnExit: false,
|
|
@@ -17351,7 +17375,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17351
17375
|
silentFallback: silentFallback
|
|
17352
17376
|
}, faceLivenessProps, {
|
|
17353
17377
|
onComplete: onFaceCaptureSuccess,
|
|
17354
|
-
onExitCapture:
|
|
17378
|
+
onExitCapture: handleExitCapture,
|
|
17355
17379
|
onExitAfterFailure: onFaceCaptureExitAfterFailure,
|
|
17356
17380
|
onUserCancel: onUserCancel,
|
|
17357
17381
|
skipSuccessScreen: true,
|
|
@@ -17371,6 +17395,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
17371
17395
|
onIdBackImageCaptured: setIdCaptureVideoIdBackImage,
|
|
17372
17396
|
onFaceNotDetected: onVideoCaptureFaceNotDetected,
|
|
17373
17397
|
onRecordingFailed: onRecordingFailed,
|
|
17398
|
+
onExitCapture: handleExitCapture,
|
|
17374
17399
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
17375
17400
|
idCardFrontDetectionThreshold: idCardFrontDetectionThreshold,
|
|
17376
17401
|
idCardBackDetectionThreshold: idCardBackDetectionThreshold,
|