idmission-web-sdk 1.0.280 → 1.0.281
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/VideoIdValidation.d.ts +6 -0
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +5 -1
- package/dist/index.d.ts +2 -2
- package/dist/sdk2.cjs.development.js +70 -60
- 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 +70 -60
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +70 -60
- 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
|
@@ -10,6 +10,8 @@ import { AdditionalDocumentCaptureWizardClassNames, AdditionalDocumentCaptureWiz
|
|
|
10
10
|
import { SignatureCaptureClassNames, SignatureCaptureVerbiage } from '../signature_capture/SignatureCapture';
|
|
11
11
|
import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage } from '../video_signature_capture/VideoSignatureWizard';
|
|
12
12
|
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
13
|
+
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
14
|
+
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
13
15
|
export type VideoIdValidationAssets = VideoIdWizardAssets;
|
|
14
16
|
export type VideoIdValidationClassNames = VideoIdWizardClassNames & {
|
|
15
17
|
additionalDocumentCapture?: AdditionalDocumentCaptureWizardClassNames;
|
|
@@ -105,12 +107,16 @@ export interface VideoIdValidationProps extends PropsWithChildren {
|
|
|
105
107
|
skipIdCapture?: boolean;
|
|
106
108
|
/** Boolean or async function to indicate whether to instruct the user to show the back of their ID card during video capture. If an async function is supplied returning a boolean, it will be evaluated at the time of ID front video capture completion. Defaults to `false`. */
|
|
107
109
|
skipShowIdCardBack?: boolean | (() => Promise<boolean>);
|
|
110
|
+
/** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
111
|
+
idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
108
112
|
/** String to indicate what type of guides to use during capture. Using `fit` is highly recommended in order to capture the best quality image. Valid values: `fit`, `overlay`. Defaults to `fit`. */
|
|
109
113
|
idCaptureGuideType?: IdCaptureGuideType;
|
|
110
114
|
/** Boolean to indicate whether guide images should be rotated on mobile. Defaults to `false`. */
|
|
111
115
|
idCapturePortraitGuidesOnMobile?: boolean;
|
|
112
116
|
/** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
|
|
113
117
|
idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
|
|
118
|
+
/** String indicating which face liveness loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
119
|
+
faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
114
120
|
/** Name of an included theme or object containing theme properties. **/
|
|
115
121
|
theme?: ThemeInput;
|
|
116
122
|
/** Object containing any asset overrides. */
|
|
@@ -6,6 +6,8 @@ import { IdVideoCaptureSuccessClassNames, IdVideoCaptureSuccessColors, IdVideoCa
|
|
|
6
6
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
7
7
|
import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
8
8
|
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
9
|
+
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
10
|
+
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
9
11
|
export type VideoIdWizardAssets = {
|
|
10
12
|
idCapture?: IdCaptureWizardAssets;
|
|
11
13
|
faceLiveness?: FaceLivenessAssets;
|
|
@@ -49,13 +51,15 @@ export type VideoIdWizardProps = {
|
|
|
49
51
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
50
52
|
skipIdCapture?: boolean;
|
|
51
53
|
skipShowIdCardBack?: boolean | (() => Promise<boolean>);
|
|
54
|
+
idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
52
55
|
idCaptureGuideType?: IdCaptureGuideType;
|
|
53
56
|
idCapturePortraitGuidesOnMobile?: boolean;
|
|
54
57
|
idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
|
|
58
|
+
faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
55
59
|
assets?: VideoIdWizardAssets;
|
|
56
60
|
classNames?: VideoIdWizardClassNames;
|
|
57
61
|
colors?: VideoIdWizardColors;
|
|
58
62
|
verbiage?: VideoIdWizardVerbiage;
|
|
59
63
|
debugMode?: boolean;
|
|
60
64
|
};
|
|
61
|
-
export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardBackDetectionThreshold, idCardFrontFocusThreshold, idCardBackFocusThreshold, goodIdCardFrontFramesThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
|
|
65
|
+
export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardBackDetectionThreshold, idCardFrontFocusThreshold, idCardBackFocusThreshold, goodIdCardFrontFramesThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureLoadingOverlayMode, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CustomerIdentification, CustomerIdentificationProps } from './component
|
|
|
7
7
|
import { SignatureKYC, SignatureKYCProps } from './components/customer_flows/SignatureKYC';
|
|
8
8
|
import { VideoIdValidation, VideoIdValidationProps } from './components/customer_flows/VideoIdValidation';
|
|
9
9
|
import { preloadModels } from './lib/models/preloadModels';
|
|
10
|
-
import { CustomerBiometricsEnrollment } from './components/customer_flows/CustomerBiometricsEnrollment';
|
|
10
|
+
import { CustomerBiometricsEnrollment, CustomerBiometricsEnrollmentProps } from './components/customer_flows/CustomerBiometricsEnrollment';
|
|
11
11
|
import { Theme, themes } from './themes';
|
|
12
12
|
import { SubmissionRequest, SubmissionResponse } from './contexts/SubmissionContext';
|
|
13
13
|
import { DocumentCapture, DocumentCaptureProps } from './components/customer_flows/DocumentCapture';
|
|
@@ -17,7 +17,7 @@ export declare const renderIdValidation: (optionsOrTargetElement: TargetElement
|
|
|
17
17
|
export declare const renderFaceValidation: (optionsOrTargetElement: TargetElement | FaceValidationProps, options?: FaceValidationProps) => Element | DocumentFragment;
|
|
18
18
|
export declare const renderIdAndFaceValidation: (optionsOrTargetElement: TargetElement | IdAndFaceValidationProps, options?: IdAndFaceValidationProps) => Element | DocumentFragment;
|
|
19
19
|
export declare const renderCustomerIdAndBiometricsEnrollment: (optionsOrTargetElement: TargetElement | CustomerEnrollmentProps, options?: CustomerEnrollmentProps) => Element | DocumentFragment;
|
|
20
|
-
export declare const renderCustomerBiometricsEnrollment: (optionsOrTargetElement: TargetElement |
|
|
20
|
+
export declare const renderCustomerBiometricsEnrollment: (optionsOrTargetElement: TargetElement | CustomerBiometricsEnrollmentProps, options?: CustomerBiometricsEnrollmentProps) => Element | DocumentFragment;
|
|
21
21
|
export declare const renderCustomerVerification: (optionsOrTargetElement: TargetElement | CustomerVerificationProps, options?: CustomerVerificationProps) => Element | DocumentFragment;
|
|
22
22
|
export declare const renderCustomerIdentification: (optionsOrTargetElement: TargetElement | CustomerIdentificationProps, options?: CustomerIdentificationProps) => Element | DocumentFragment;
|
|
23
23
|
export declare const renderSignatureKYC: (optionsOrTargetElement: TargetElement | SignatureKYCProps, options?: SignatureKYCProps) => Element | DocumentFragment;
|
|
@@ -50,7 +50,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
50
50
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
51
51
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
52
52
|
|
|
53
|
-
var webSdkVersion = '1.0.
|
|
53
|
+
var webSdkVersion = '1.0.281';
|
|
54
54
|
|
|
55
55
|
function getPlatform() {
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -15844,31 +15844,35 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15844
15844
|
skipShowIdCardBack = _k === void 0 ? false : _k,
|
|
15845
15845
|
_l = _a.skipSuccessScreen,
|
|
15846
15846
|
skipSuccessScreen = _l === void 0 ? false : _l,
|
|
15847
|
-
_m = _a.
|
|
15848
|
-
|
|
15849
|
-
_o = _a.
|
|
15850
|
-
|
|
15851
|
-
_p = _a.
|
|
15852
|
-
|
|
15853
|
-
_q = _a.
|
|
15854
|
-
|
|
15855
|
-
_r = _a.
|
|
15856
|
-
|
|
15857
|
-
_s = _a.
|
|
15858
|
-
|
|
15859
|
-
_t = _a.
|
|
15860
|
-
|
|
15861
|
-
_u = _a.
|
|
15862
|
-
|
|
15863
|
-
|
|
15864
|
-
|
|
15865
|
-
|
|
15866
|
-
|
|
15867
|
-
|
|
15868
|
-
|
|
15869
|
-
|
|
15870
|
-
|
|
15871
|
-
|
|
15847
|
+
_m = _a.idCaptureLoadingOverlayMode,
|
|
15848
|
+
idCaptureLoadingOverlayMode = _m === void 0 ? 'legacy' : _m,
|
|
15849
|
+
_o = _a.idCaptureGuideType,
|
|
15850
|
+
idCaptureGuideType = _o === void 0 ? 'fit' : _o,
|
|
15851
|
+
_p = _a.idCapturePortraitGuidesOnMobile,
|
|
15852
|
+
idCapturePortraitGuidesOnMobile = _p === void 0 ? false : _p,
|
|
15853
|
+
_q = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15854
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _q === void 0 ? true : _q,
|
|
15855
|
+
_r = _a.faceLivenessLoadingOverlayMode,
|
|
15856
|
+
faceLivenessLoadingOverlayMode = _r === void 0 ? 'legacy' : _r,
|
|
15857
|
+
_s = _a.assets,
|
|
15858
|
+
assets = _s === void 0 ? {} : _s,
|
|
15859
|
+
_t = _a.classNames,
|
|
15860
|
+
classNames = _t === void 0 ? {} : _t,
|
|
15861
|
+
_u = _a.colors,
|
|
15862
|
+
colors = _u === void 0 ? {} : _u,
|
|
15863
|
+
_v = _a.verbiage,
|
|
15864
|
+
verbiage = _v === void 0 ? {} : _v,
|
|
15865
|
+
_w = _a.debugMode,
|
|
15866
|
+
debugMode = _w === void 0 ? false : _w;
|
|
15867
|
+
var _x = React.useContext(SubmissionContext),
|
|
15868
|
+
submissionStatus = _x.submissionStatus,
|
|
15869
|
+
idCaptureVideoUrl = _x.idCaptureVideoUrl,
|
|
15870
|
+
setIdCaptureVideoUrl = _x.setIdCaptureVideoUrl,
|
|
15871
|
+
setIdCaptureVideoIdFrontImage = _x.setIdCaptureVideoIdFrontImage,
|
|
15872
|
+
setIdCaptureVideoIdBackImage = _x.setIdCaptureVideoIdBackImage;
|
|
15873
|
+
var _y = React.useState('CAPTURING_ID'),
|
|
15874
|
+
captureState = _y[0],
|
|
15875
|
+
setCaptureState = _y[1];
|
|
15872
15876
|
React.useEffect(function () {
|
|
15873
15877
|
if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
|
|
15874
15878
|
}, [captureState, skipIdCapture]);
|
|
@@ -15898,9 +15902,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15898
15902
|
var onVideoCaptureFaceNotDetected = React.useCallback(function () {
|
|
15899
15903
|
setCaptureState('CHECKING_LIVENESS');
|
|
15900
15904
|
}, []);
|
|
15901
|
-
var
|
|
15902
|
-
attempt =
|
|
15903
|
-
setAttempt =
|
|
15905
|
+
var _z = React.useState(0),
|
|
15906
|
+
attempt = _z[0],
|
|
15907
|
+
setAttempt = _z[1];
|
|
15904
15908
|
var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
|
|
15905
15909
|
var onFaceCaptureExitAfterFailure = React.useCallback(function (resp, req) {
|
|
15906
15910
|
userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
|
|
@@ -15945,7 +15949,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15945
15949
|
case 'CAPTURING_ID':
|
|
15946
15950
|
return /*#__PURE__*/React__default['default'].createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default['default'].createElement(GuideOrientationProvider, null, /*#__PURE__*/React__default['default'].createElement(IdCaptureWizard, tslib.__assign({
|
|
15947
15951
|
key: "id-capture-".concat(attempt),
|
|
15948
|
-
loadingOverlayMode:
|
|
15952
|
+
loadingOverlayMode: idCaptureLoadingOverlayMode
|
|
15949
15953
|
}, idCaptureProps, {
|
|
15950
15954
|
assets: assets.idCapture,
|
|
15951
15955
|
classNames: classNames.idCapture,
|
|
@@ -15964,7 +15968,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15964
15968
|
case 'CHECKING_LIVENESS':
|
|
15965
15969
|
return /*#__PURE__*/React__default['default'].createElement(FaceLivenessWizard, tslib.__assign({
|
|
15966
15970
|
key: "face-liveness-".concat(attempt),
|
|
15967
|
-
loadingOverlayMode:
|
|
15971
|
+
loadingOverlayMode: faceLivenessLoadingOverlayMode
|
|
15968
15972
|
}, faceLivenessProps, {
|
|
15969
15973
|
onComplete: onFaceCaptureSuccess,
|
|
15970
15974
|
onExitCapture: onExitCapture,
|
|
@@ -18213,34 +18217,38 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
18213
18217
|
skipIdCapture = _l === void 0 ? false : _l,
|
|
18214
18218
|
_m = _a.skipShowIdCardBack,
|
|
18215
18219
|
skipShowIdCardBack = _m === void 0 ? false : _m,
|
|
18216
|
-
_o = _a.
|
|
18217
|
-
|
|
18218
|
-
_p = _a.
|
|
18219
|
-
|
|
18220
|
-
_q = _a.
|
|
18221
|
-
|
|
18222
|
-
_r = _a.
|
|
18223
|
-
|
|
18224
|
-
_s = _a.
|
|
18225
|
-
|
|
18226
|
-
_t = _a.
|
|
18227
|
-
|
|
18228
|
-
_u = _a.
|
|
18229
|
-
|
|
18230
|
-
_v = _a.
|
|
18231
|
-
|
|
18232
|
-
_w = _a.
|
|
18233
|
-
|
|
18234
|
-
_x = _a.
|
|
18235
|
-
|
|
18236
|
-
_y = _a.
|
|
18237
|
-
|
|
18238
|
-
_z = _a.
|
|
18239
|
-
|
|
18240
|
-
_0 = _a.
|
|
18241
|
-
|
|
18242
|
-
_1 = _a.
|
|
18243
|
-
|
|
18220
|
+
_o = _a.idCaptureLoadingOverlayMode,
|
|
18221
|
+
idCaptureLoadingOverlayMode = _o === void 0 ? 'legacy' : _o,
|
|
18222
|
+
_p = _a.idCaptureGuideType,
|
|
18223
|
+
idCaptureGuideType = _p === void 0 ? 'fit' : _p,
|
|
18224
|
+
_q = _a.idCapturePortraitGuidesOnMobile,
|
|
18225
|
+
idCapturePortraitGuidesOnMobile = _q === void 0 ? false : _q,
|
|
18226
|
+
_r = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
18227
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _r === void 0 ? true : _r,
|
|
18228
|
+
_s = _a.faceLivenessLoadingOverlayMode,
|
|
18229
|
+
faceLivenessLoadingOverlayMode = _s === void 0 ? 'legacy' : _s,
|
|
18230
|
+
_t = _a.theme,
|
|
18231
|
+
theme = _t === void 0 ? 'default' : _t,
|
|
18232
|
+
_u = _a.assets,
|
|
18233
|
+
assets = _u === void 0 ? {} : _u,
|
|
18234
|
+
_v = _a.classNames,
|
|
18235
|
+
classNames = _v === void 0 ? {} : _v,
|
|
18236
|
+
_w = _a.colors,
|
|
18237
|
+
colors = _w === void 0 ? {} : _w,
|
|
18238
|
+
_x = _a.verbiage,
|
|
18239
|
+
verbiage = _x === void 0 ? {} : _x,
|
|
18240
|
+
_y = _a.captureSignature,
|
|
18241
|
+
captureSignature = _y === void 0 ? false : _y,
|
|
18242
|
+
_z = _a.captureSignatureVideo,
|
|
18243
|
+
captureSignatureVideo = _z === void 0 ? false : _z,
|
|
18244
|
+
_0 = _a.captureAdditionalDocuments,
|
|
18245
|
+
captureAdditionalDocuments = _0 === void 0 ? [] : _0,
|
|
18246
|
+
_1 = _a.geolocationEnabled,
|
|
18247
|
+
geolocationEnabled = _1 === void 0 ? true : _1,
|
|
18248
|
+
_2 = _a.geolocationRequired,
|
|
18249
|
+
geolocationRequired = _2 === void 0 ? false : _2,
|
|
18250
|
+
_3 = _a.debugMode,
|
|
18251
|
+
debugMode = _3 === void 0 ? false : _3;
|
|
18244
18252
|
useLanguage(lang);
|
|
18245
18253
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
18246
18254
|
return {
|
|
@@ -18260,16 +18268,18 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
18260
18268
|
skipSuccessScreen: skipSuccessScreen,
|
|
18261
18269
|
skipIdCapture: skipIdCapture,
|
|
18262
18270
|
skipShowIdCardBack: skipShowIdCardBack,
|
|
18271
|
+
idCaptureLoadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
18263
18272
|
idCaptureGuideType: idCaptureGuideType,
|
|
18264
18273
|
idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
18265
18274
|
idCaptureRotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
18275
|
+
faceLivenessLoadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
18266
18276
|
assets: assets,
|
|
18267
18277
|
classNames: classNames,
|
|
18268
18278
|
colors: colors,
|
|
18269
18279
|
verbiage: verbiage,
|
|
18270
18280
|
debugMode: debugMode
|
|
18271
18281
|
};
|
|
18272
|
-
}, [assets, classNames, colors, debugMode, faceLivenessProps, goodIdCardBackFramesThreshold, goodIdCardFrontFramesThreshold, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureProps, idCaptureRotateLoadingOverlayImageWhenPortrait, idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, onExitAfterFailure, onExitCapture, onUserCancel, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, verbiage]);
|
|
18282
|
+
}, [assets, classNames, colors, debugMode, faceLivenessLoadingOverlayMode, faceLivenessProps, goodIdCardBackFramesThreshold, goodIdCardFrontFramesThreshold, idCaptureGuideType, idCaptureLoadingOverlayMode, idCapturePortraitGuidesOnMobile, idCaptureProps, idCaptureRotateLoadingOverlayImageWhenPortrait, idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, onExitAfterFailure, onExitCapture, onUserCancel, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, verbiage]);
|
|
18273
18283
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
18274
18284
|
return {
|
|
18275
18285
|
documents: captureAdditionalDocuments,
|