idmission-web-sdk 1.0.123 → 1.0.124
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 +2 -1
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +3 -1
- package/dist/components/customer_flows/IdValidation.d.ts +3 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +3 -2
- package/dist/components/id_capture/IdCaptureWizard.d.ts +3 -2
- package/dist/sdk2.cjs.development.js +22 -7
- 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 +22 -7
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +22 -7
- 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/stories/CustomerFlows/IdValidation.stories.d.ts +7 -2
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
1
|
+
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { CardData, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
3
3
|
import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
|
|
4
4
|
import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
|
|
@@ -95,6 +95,7 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
|
|
|
95
95
|
faceLivenessTimeoutDurationMs?: number;
|
|
96
96
|
/** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
|
|
97
97
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
98
|
+
idCaptureInstructions?: ReactNode;
|
|
98
99
|
/** Callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned. */
|
|
99
100
|
onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
|
|
100
101
|
/** Callback function that fires when the user has completed the flow instead of making a call to IDmission's servers, allowing customers to specify their own submission logic. Arguments: the request payload that would have been dispatched to IDmission's API, which contains the images/documents/video submitted by the user. Note that when this parameter is supplied, `onComplete` will never fire, and the customer will need to implement their own error handling/retry logic. Use at your own risk! */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
1
|
+
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { CardData, LivenessCheckRequest, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
3
3
|
import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
|
|
4
4
|
import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
|
|
@@ -92,6 +92,8 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
|
|
|
92
92
|
faceLivenessTimeoutDurationMs?: number;
|
|
93
93
|
/** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
|
|
94
94
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
95
|
+
/** React element or string to render on the instructions screen. */
|
|
96
|
+
idCaptureInstructions?: ReactNode;
|
|
95
97
|
/** Callback function that fires immediately prior to liveness check, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The liveness check request is passed in as a parameter and a promise resolving to the updated request should be returned. */
|
|
96
98
|
onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
|
|
97
99
|
/** Callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
1
|
+
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { CardData, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
3
3
|
import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
|
|
4
4
|
import { AdditionalDocumentCaptureWizardClassNames, AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
|
|
@@ -74,6 +74,8 @@ export interface IdValidationProps extends PropsWithChildren {
|
|
|
74
74
|
passportFocusScoreThreshold?: number;
|
|
75
75
|
/** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
|
|
76
76
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
77
|
+
/** React element or string to render on the instructions screen. */
|
|
78
|
+
instructions?: ReactNode;
|
|
77
79
|
/** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack , `passport`.*/
|
|
78
80
|
precapturedDocuments?: CapturedDocuments;
|
|
79
81
|
/** Callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { CameraAccessDeniedOverlayAssets, CameraAccessDeniedOverlayClassNames, CameraAccessDeniedOverlayColors, CameraAccessDeniedOverlayVerbiage } from '../camera/CameraAccessDeniedOverlay';
|
|
3
3
|
import { LoaderButtonColors } from '../common/LoaderButton';
|
|
4
4
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
@@ -34,9 +34,10 @@ export type IdCaptureLoadingOverlayVerbiage = {
|
|
|
34
34
|
export type IdCaptureLoadingOverlayProps = {
|
|
35
35
|
onDismissed?: () => void;
|
|
36
36
|
onUserCancel?: () => void;
|
|
37
|
+
instructions?: ReactNode;
|
|
37
38
|
assets?: IdCaptureLoadingOverlayAssets;
|
|
38
39
|
classNames?: IdCaptureLoadingOverlayClassNames;
|
|
39
40
|
colors?: IdCaptureLoadingOverlayColors;
|
|
40
41
|
verbiage?: IdCaptureLoadingOverlayVerbiage;
|
|
41
42
|
};
|
|
42
|
-
export declare const IdCaptureLoadingOverlay: ({ onDismissed, onUserCancel, assets, classNames, colors, verbiage: rawVerbiage, }: IdCaptureLoadingOverlayProps) => ReactElement;
|
|
43
|
+
export declare const IdCaptureLoadingOverlay: ({ onDismissed, onUserCancel, instructions, assets, classNames, colors, verbiage: rawVerbiage, }: IdCaptureLoadingOverlayProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { IdCaptureAssets, IdCaptureClassNames, IdCaptureColors, IdCaptureVerbiage } from './IdCapture';
|
|
3
3
|
import { IdCaptureLoadingOverlayAssets, IdCaptureLoadingOverlayClassNames, IdCaptureLoadingOverlayColors, IdCaptureLoadingOverlayVerbiage } from './IdCaptureLoadingOverlay';
|
|
4
4
|
import { FlipIdPromptAssets, FlipIdPromptClassNames, FlipIdPromptVerbiage } from './FlipIdPrompt';
|
|
@@ -59,6 +59,7 @@ export type IdCaptureWizardProps = {
|
|
|
59
59
|
idCardFocusScoreThreshold?: number;
|
|
60
60
|
passportFocusScoreThreshold?: number;
|
|
61
61
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
62
|
+
instructions?: ReactNode;
|
|
62
63
|
releaseCameraAccessOnExit?: boolean;
|
|
63
64
|
assets?: IdCaptureWizardAssets;
|
|
64
65
|
classNames?: IdCaptureWizardClassNames;
|
|
@@ -66,4 +67,4 @@ export type IdCaptureWizardProps = {
|
|
|
66
67
|
verbiage?: IdCaptureWizardVerbiage;
|
|
67
68
|
debugMode?: boolean;
|
|
68
69
|
};
|
|
69
|
-
export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, precapturedDocuments, captureRequirement, autoCaptureEnabled, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, barcodeScanningEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, releaseCameraAccessOnExit, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
|
|
70
|
+
export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, precapturedDocuments, captureRequirement, autoCaptureEnabled, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, barcodeScanningEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, instructions, releaseCameraAccessOnExit, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
|
|
@@ -47,7 +47,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
47
47
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
48
48
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
49
49
|
|
|
50
|
-
var webSdkVersion = '1.0.
|
|
50
|
+
var webSdkVersion = '1.0.124';
|
|
51
51
|
|
|
52
52
|
function getPlatform() {
|
|
53
53
|
if (typeof window === 'undefined') return;
|
|
@@ -10241,6 +10241,7 @@ var ContinuityCameraCheckbox = styled__default['default'].input(templateObject_2
|
|
|
10241
10241
|
var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
10242
10242
|
var onDismissed = _a.onDismissed,
|
|
10243
10243
|
onUserCancel = _a.onUserCancel,
|
|
10244
|
+
instructions = _a.instructions,
|
|
10244
10245
|
_b = _a.assets,
|
|
10245
10246
|
assets = _b === void 0 ? {} : _b,
|
|
10246
10247
|
_c = _a.classNames,
|
|
@@ -10304,7 +10305,7 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
10304
10305
|
alt: verbiage.headingText,
|
|
10305
10306
|
src: assets.instructionImageUrl,
|
|
10306
10307
|
className: classNames.image
|
|
10307
|
-
})), /*#__PURE__*/React__default['default'].createElement(ContinuityCameraCheckboxContainer, {
|
|
10308
|
+
})), instructions, /*#__PURE__*/React__default['default'].createElement(ContinuityCameraCheckboxContainer, {
|
|
10308
10309
|
className: classNames.continuityCameraCheckboxContainer
|
|
10309
10310
|
}, iphoneContinuityCameraAvailable && ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ContinuityCameraCheckbox, {
|
|
10310
10311
|
className: classNames.continuityCameraCheckbox,
|
|
@@ -10571,11 +10572,17 @@ var CapturedImage = function CapturedImage(_a) {
|
|
|
10571
10572
|
url = _b[0],
|
|
10572
10573
|
setUrl = _b[1];
|
|
10573
10574
|
React.useEffect(function () {
|
|
10574
|
-
if (!image.boundingBox)
|
|
10575
|
+
if (!image.boundingBox) {
|
|
10576
|
+
console.error('no bounding box received!');
|
|
10577
|
+
return;
|
|
10578
|
+
}
|
|
10575
10579
|
var im = new Image();
|
|
10576
10580
|
im.onload = function () {
|
|
10581
|
+
console.log('image has been loaded');
|
|
10577
10582
|
cropToBoundingBox(im, image.boundingBox, canvasRef.current);
|
|
10578
|
-
|
|
10583
|
+
var croppedDataUrl = canvasRef.current.toDataURL();
|
|
10584
|
+
console.log('croppedDataUrl', croppedDataUrl);
|
|
10585
|
+
setUrl(croppedDataUrl);
|
|
10579
10586
|
};
|
|
10580
10587
|
im.onerror = function (e) {
|
|
10581
10588
|
console.error('failed to load image', e);
|
|
@@ -10918,6 +10925,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10918
10925
|
passportFocusScoreThreshold = _x === void 0 ? 0.3 : _x,
|
|
10919
10926
|
_y = _a.skipSuccessScreen,
|
|
10920
10927
|
skipSuccessScreen = _y === void 0 ? false : _y,
|
|
10928
|
+
instructions = _a.instructions,
|
|
10921
10929
|
_z = _a.releaseCameraAccessOnExit,
|
|
10922
10930
|
releaseCameraAccessOnExit = _z === void 0 ? true : _z,
|
|
10923
10931
|
_0 = _a.assets,
|
|
@@ -11155,6 +11163,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
11155
11163
|
}
|
|
11156
11164
|
}(), !overlayDismissed && ( /*#__PURE__*/React__default['default'].createElement(IdCaptureLoadingOverlay, {
|
|
11157
11165
|
key: attempt,
|
|
11166
|
+
instructions: instructions,
|
|
11158
11167
|
assets: assets.loadingOverlay,
|
|
11159
11168
|
classNames: classNames.loadingOverlay,
|
|
11160
11169
|
colors: colors.loadingOverlay,
|
|
@@ -14443,6 +14452,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
14443
14452
|
passportFocusScoreThreshold = _h === void 0 ? 0.3 : _h,
|
|
14444
14453
|
_j = _a.skipSuccessScreen,
|
|
14445
14454
|
skipSuccessScreen = _j === void 0 ? false : _j,
|
|
14455
|
+
instructions = _a.instructions,
|
|
14446
14456
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
14447
14457
|
onSubmit = _a.onSubmit,
|
|
14448
14458
|
onComplete = _a.onComplete,
|
|
@@ -14487,13 +14497,14 @@ var IdValidation = function IdValidation(_a) {
|
|
|
14487
14497
|
passportFocusScoreThreshold: passportFocusScoreThreshold,
|
|
14488
14498
|
barcodeScanningEnabled: false,
|
|
14489
14499
|
skipSuccessScreen: skipSuccessScreen,
|
|
14500
|
+
instructions: instructions,
|
|
14490
14501
|
assets: assets,
|
|
14491
14502
|
classNames: classNames,
|
|
14492
14503
|
colors: colors,
|
|
14493
14504
|
verbiage: verbiage,
|
|
14494
14505
|
debugMode: debugMode
|
|
14495
14506
|
};
|
|
14496
|
-
}, [onExitCapture, onUserCancel, precapturedDocuments, idCaptureRequirement, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, assets, classNames, colors, verbiage, debugMode]);
|
|
14507
|
+
}, [onExitCapture, onUserCancel, precapturedDocuments, idCaptureRequirement, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, instructions, assets, classNames, colors, verbiage, debugMode]);
|
|
14497
14508
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
14498
14509
|
return {
|
|
14499
14510
|
documents: captureAdditionalDocuments,
|
|
@@ -14687,6 +14698,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
14687
14698
|
faceLivenessTimeoutDurationMs = _k === void 0 ? 15000 : _k,
|
|
14688
14699
|
_l = _a.skipSuccessScreen,
|
|
14689
14700
|
skipSuccessScreen = _l === void 0 ? false : _l,
|
|
14701
|
+
idCaptureInstructions = _a.idCaptureInstructions,
|
|
14690
14702
|
onBeforeLivenessCheck = _a.onBeforeLivenessCheck,
|
|
14691
14703
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
14692
14704
|
onSubmit = _a.onSubmit,
|
|
@@ -14735,10 +14747,11 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
14735
14747
|
mrzDetectionScoreThreshold: mrzDetectionScoreThreshold,
|
|
14736
14748
|
idCardFocusScoreThreshold: idCardFocusScoreThreshold,
|
|
14737
14749
|
passportFocusScoreThreshold: passportFocusScoreThreshold,
|
|
14750
|
+
instructions: idCaptureInstructions,
|
|
14738
14751
|
skipSuccessScreen: skipSuccessScreen,
|
|
14739
14752
|
debugMode: debugMode
|
|
14740
14753
|
};
|
|
14741
|
-
}, [assets.idCapture, classNames.idCapture, colors.idCapture, debugMode, idAutoCaptureEnabled, idCaptureRequirement, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, onExitCapture, onUserCancel, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, precapturedDocuments, skipSuccessScreen, verbiage.idCapture]);
|
|
14754
|
+
}, [assets.idCapture, classNames.idCapture, colors.idCapture, debugMode, idAutoCaptureEnabled, idCaptureInstructions, idCaptureRequirement, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, onExitCapture, onUserCancel, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, precapturedDocuments, skipSuccessScreen, verbiage.idCapture]);
|
|
14742
14755
|
var faceLivenessProps = React.useMemo(function () {
|
|
14743
14756
|
return {
|
|
14744
14757
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
@@ -14875,6 +14888,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
14875
14888
|
faceLivenessTimeoutDurationMs = _k === void 0 ? 15000 : _k,
|
|
14876
14889
|
_l = _a.skipSuccessScreen,
|
|
14877
14890
|
skipSuccessScreen = _l === void 0 ? false : _l,
|
|
14891
|
+
idCaptureInstructions = _a.idCaptureInstructions,
|
|
14878
14892
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
14879
14893
|
onSubmit = _a.onSubmit,
|
|
14880
14894
|
onComplete = _a.onComplete,
|
|
@@ -14919,12 +14933,13 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
14919
14933
|
mrzDetectionScoreThreshold: mrzDetectionScoreThreshold,
|
|
14920
14934
|
idCardFocusScoreThreshold: idCardFocusScoreThreshold,
|
|
14921
14935
|
passportFocusScoreThreshold: passportFocusScoreThreshold,
|
|
14936
|
+
instructions: idCaptureInstructions,
|
|
14922
14937
|
onExitCapture: onExitCapture,
|
|
14923
14938
|
onUserCancel: onUserCancel,
|
|
14924
14939
|
skipSuccessScreen: skipSuccessScreen,
|
|
14925
14940
|
debugMode: debugMode
|
|
14926
14941
|
};
|
|
14927
|
-
}, [assets.idCapture, classNames.idCapture, colors.idCapture, debugMode, idAutoCaptureEnabled, idCaptureRequirement, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, onExitCapture, onUserCancel, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, verbiage.idCapture]);
|
|
14942
|
+
}, [assets.idCapture, classNames.idCapture, colors.idCapture, debugMode, idAutoCaptureEnabled, idCaptureInstructions, idCaptureRequirement, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, onExitCapture, onUserCancel, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, verbiage.idCapture]);
|
|
14928
14943
|
var faceLivenessProps = React.useMemo(function () {
|
|
14929
14944
|
return {
|
|
14930
14945
|
onExitCapture: onExitCapture,
|