idmission-web-sdk 2.1.92 → 2.1.94
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/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +9 -0
- package/dist/sdk2.cjs.development.js +49 -24
- 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 +49 -24
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +49 -24
- 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
|
@@ -15,25 +15,30 @@ import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCapture
|
|
|
15
15
|
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
16
16
|
import { IdCaptureThresholds } from '../id_capture/IdCaptureModelsProvider';
|
|
17
17
|
import { IdCaptureGuideImages } from '../guide_images';
|
|
18
|
+
import { VideoIdWizardAssets, VideoIdWizardClassNames, VideoIdWizardColors, VideoIdWizardProps, VideoIdWizardVerbiage } from '../video_id/IdVideoCaptureWizard';
|
|
18
19
|
export type CustomerEnrollmentAssets = {
|
|
19
20
|
idCapture?: IdCaptureWizardAssets;
|
|
20
21
|
faceLiveness?: FaceLivenessAssets;
|
|
22
|
+
videoIdCapture?: VideoIdWizardAssets;
|
|
21
23
|
};
|
|
22
24
|
export type CustomerEnrollmentClassNames = {
|
|
23
25
|
idCapture?: IdCaptureWizardClassNames;
|
|
24
26
|
faceLiveness?: FaceLivenessClassNames;
|
|
25
27
|
additionalDocumentCapture?: AdditionalDocumentCaptureWizardClassNames;
|
|
26
28
|
signatureCapture?: SignatureCaptureClassNames;
|
|
29
|
+
videoIdCapture?: VideoIdWizardClassNames;
|
|
27
30
|
videoSignatureCapture?: VideoSignatureClassNames;
|
|
28
31
|
};
|
|
29
32
|
export type CustomerEnrollmentColors = {
|
|
30
33
|
idCapture?: IdCaptureWizardColors;
|
|
31
34
|
faceLiveness?: FaceLivenessColors;
|
|
35
|
+
videoIdCapture?: VideoIdWizardColors;
|
|
32
36
|
videoSignatureCapture?: VideoSignatureColors;
|
|
33
37
|
};
|
|
34
38
|
export type CustomerEnrollmentVerbiage = {
|
|
35
39
|
idCapture?: IdCaptureWizardVerbiage;
|
|
36
40
|
faceLiveness?: FaceLivenessVerbiage;
|
|
41
|
+
videoIdCapture?: VideoIdWizardVerbiage;
|
|
37
42
|
additionalDocumentCapture?: AdditionalDocumentCaptureWizardVerbiage;
|
|
38
43
|
signatureCapture?: SignatureCaptureVerbiage;
|
|
39
44
|
videoSignatureCapture?: VideoSignatureVerbiage;
|
|
@@ -161,6 +166,10 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
|
|
|
161
166
|
captureSignatureVideo?: boolean | (() => Promise<boolean>);
|
|
162
167
|
/** Array of additional documents to be captured. Each element includes a name and description. */
|
|
163
168
|
captureAdditionalDocuments?: AdditionalDocument[];
|
|
169
|
+
/** Boolean or async function indicating whether the user should be prompted to capture a video of themselves holding their ID. Defaults to `false`. */
|
|
170
|
+
captureVideoId?: boolean | (() => Promise<boolean>);
|
|
171
|
+
/** Object containing overrides for VideoIdCapture. */
|
|
172
|
+
captureVideoIdProps?: VideoIdWizardProps;
|
|
164
173
|
/** Name of an included theme or object containing theme properties. **/
|
|
165
174
|
theme?: ThemeInput;
|
|
166
175
|
/** Object containing any asset overrides. */
|
|
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
234
234
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
var webSdkVersion = '2.1.
|
|
237
|
+
var webSdkVersion = '2.1.94';
|
|
238
238
|
|
|
239
239
|
function getPlatform() {
|
|
240
240
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -5745,7 +5745,8 @@ function applyNonMaxSuppression(detectedObjects) {
|
|
|
5745
5745
|
}
|
|
5746
5746
|
function createPairs(arr, maxPairs) {
|
|
5747
5747
|
var pairs = [];
|
|
5748
|
-
var
|
|
5748
|
+
var len = arr.length - 1;
|
|
5749
|
+
var end = Math.min(maxPairs , len);
|
|
5749
5750
|
for (var i = 0; i < end; i++) {
|
|
5750
5751
|
pairs.push([arr[i], arr[i + 1]]);
|
|
5751
5752
|
}
|
|
@@ -6452,9 +6453,12 @@ var _reducer = function reducer(state, action) {
|
|
|
6452
6453
|
var frameCaptureRate = 0;
|
|
6453
6454
|
var goodFramesThreshold = state.goodFramesThreshold;
|
|
6454
6455
|
if (state.lastFrameCapturedAt) {
|
|
6455
|
-
|
|
6456
|
-
if (
|
|
6457
|
-
|
|
6456
|
+
var frameTime = frameCapturedAt.getTime() - state.lastFrameCapturedAt.getTime();
|
|
6457
|
+
if (frameTime > 0) {
|
|
6458
|
+
frameCaptureRate = 1000.0 / frameTime;
|
|
6459
|
+
if (frameCaptureRate > 0) {
|
|
6460
|
+
goodFramesThreshold = Math.ceil(3 * frameCaptureRate);
|
|
6461
|
+
}
|
|
6458
6462
|
}
|
|
6459
6463
|
}
|
|
6460
6464
|
var idCardDetectedButNotAllowed = !state.captureRequirement.includes('idCard') && detectedDocumentType.includes('idCard');
|
|
@@ -15929,22 +15933,25 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15929
15933
|
captureSignatureVideo = _u === void 0 ? false : _u,
|
|
15930
15934
|
_v = _a.captureAdditionalDocuments,
|
|
15931
15935
|
captureAdditionalDocuments = _v === void 0 ? [] : _v,
|
|
15932
|
-
_w = _a.
|
|
15933
|
-
|
|
15934
|
-
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15936
|
+
_w = _a.captureVideoId,
|
|
15937
|
+
captureVideoId = _w === void 0 ? false : _w,
|
|
15938
|
+
captureVideoIdProps = _a.captureVideoIdProps,
|
|
15939
|
+
_x = _a.theme,
|
|
15940
|
+
theme = _x === void 0 ? 'default' : _x,
|
|
15941
|
+
_y = _a.assets,
|
|
15942
|
+
assets = _y === void 0 ? {} : _y,
|
|
15943
|
+
_z = _a.classNames,
|
|
15944
|
+
classNames = _z === void 0 ? {} : _z,
|
|
15945
|
+
_0 = _a.colors,
|
|
15946
|
+
colors = _0 === void 0 ? {} : _0,
|
|
15947
|
+
_1 = _a.verbiage,
|
|
15948
|
+
verbiage = _1 === void 0 ? {} : _1,
|
|
15949
|
+
_2 = _a.geolocationEnabled,
|
|
15950
|
+
geolocationEnabled = _2 === void 0 ? true : _2,
|
|
15951
|
+
_3 = _a.geolocationRequired,
|
|
15952
|
+
geolocationRequired = _3 === void 0 ? false : _3,
|
|
15953
|
+
_4 = _a.debugMode,
|
|
15954
|
+
debugMode = _4 === void 0 ? false : _4;
|
|
15948
15955
|
useLanguage(lang);
|
|
15949
15956
|
useDebugLogging(debugMode);
|
|
15950
15957
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -15989,6 +15996,22 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15989
15996
|
debugMode: debugMode
|
|
15990
15997
|
};
|
|
15991
15998
|
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
15999
|
+
var videoIdCaptureProps = React.useMemo(function () {
|
|
16000
|
+
return _assign({
|
|
16001
|
+
onExitCapture: onExitCapture,
|
|
16002
|
+
onExitAfterFailure: onExitAfterFailure,
|
|
16003
|
+
onUserCancel: onUserCancel,
|
|
16004
|
+
onIdCaptureModelError: onIdCaptureModelError,
|
|
16005
|
+
idCaptureProps: idCaptureProps,
|
|
16006
|
+
faceLivenessProps: faceLivenessProps,
|
|
16007
|
+
skipSuccessScreen: skipSuccessScreen,
|
|
16008
|
+
assets: assets.videoIdCapture,
|
|
16009
|
+
classNames: classNames.videoIdCapture,
|
|
16010
|
+
colors: colors.videoIdCapture,
|
|
16011
|
+
verbiage: verbiage.videoIdCapture,
|
|
16012
|
+
debugMode: debugMode
|
|
16013
|
+
}, captureVideoIdProps !== null && captureVideoIdProps !== void 0 ? captureVideoIdProps : {});
|
|
16014
|
+
}, [assets.videoIdCapture, captureVideoIdProps, classNames.videoIdCapture, colors.videoIdCapture, debugMode, faceLivenessProps, idCaptureProps, onExitAfterFailure, onExitCapture, onIdCaptureModelError, onUserCancel, skipSuccessScreen, verbiage.videoIdCapture]);
|
|
15992
16015
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
15993
16016
|
return {
|
|
15994
16017
|
documents: captureAdditionalDocuments,
|
|
@@ -16021,6 +16044,9 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16021
16044
|
onDenied === null || onDenied === void 0 ? void 0 : onDenied(resp, req);
|
|
16022
16045
|
}
|
|
16023
16046
|
}, [onEnrolled, onComplete, onDenied]);
|
|
16047
|
+
var checks = React.useMemo(function () {
|
|
16048
|
+
return captureVideoId ? ['VideoIdCapture'] : ['IdCapture', 'FaceLiveness'];
|
|
16049
|
+
}, [captureVideoId]);
|
|
16024
16050
|
return /*#__PURE__*/React__namespace.default.createElement(AuthProvider, {
|
|
16025
16051
|
sessionId: sessionId,
|
|
16026
16052
|
authUrl: authUrl
|
|
@@ -16062,11 +16088,10 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16062
16088
|
geolocationEnabled: geolocationEnabled,
|
|
16063
16089
|
geolocationRequired: geolocationRequired
|
|
16064
16090
|
}, /*#__PURE__*/React__namespace.default.createElement(CompositeWizard, {
|
|
16065
|
-
checks:
|
|
16066
|
-
return ['IdCapture', 'FaceLiveness'];
|
|
16067
|
-
}, []),
|
|
16091
|
+
checks: checks,
|
|
16068
16092
|
idCaptureProps: idCaptureProps,
|
|
16069
16093
|
faceLivenessProps: faceLivenessProps,
|
|
16094
|
+
videoIdCaptureProps: videoIdCaptureProps,
|
|
16070
16095
|
additionalDocumentCaptureProps: additionalDocumentCaptureProps,
|
|
16071
16096
|
signatureCaptureProps: signatureCaptureProps,
|
|
16072
16097
|
videoSignatureCaptureProps: videoSignatureCaptureProps,
|