idmission-web-sdk 0.0.53 → 0.0.55
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/signature_capture/VideoSignatureCapture.d.ts +2 -2
- package/dist/components/signature_kyc/SignatureKYCWizard.d.ts +3 -1
- package/dist/sdk2.cjs.development.js +22 -23
- 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 -23
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +22 -23
- 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/package.json +1 -1
|
@@ -9,11 +9,11 @@ export type VideoSignatureCaptureVerbiage = SignatureCaptureVerbiage & {
|
|
|
9
9
|
guidanceMessageText?: string;
|
|
10
10
|
};
|
|
11
11
|
export type VideoSignatureCaptureProps = {
|
|
12
|
-
|
|
12
|
+
onVideoCaptured?: (videoData: Blob, signatureData: SignatureData, signatureImageData: string) => void;
|
|
13
13
|
onFaceNotDetected?: () => void;
|
|
14
14
|
onExit?: () => void;
|
|
15
15
|
colors?: VideoSignatureCaptureColors;
|
|
16
16
|
verbiage?: VideoSignatureCaptureVerbiage;
|
|
17
17
|
debugMode?: boolean;
|
|
18
18
|
};
|
|
19
|
-
export declare const VideoSignatureCapture: ({
|
|
19
|
+
export declare const VideoSignatureCapture: ({ onVideoCaptured, onFaceNotDetected, onExit, colors, verbiage, debugMode, }: VideoSignatureCaptureProps) => React.ReactElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { VideoSignatureCaptureColors, VideoSignatureCaptureVerbiage } from '../signature_capture/VideoSignatureCapture';
|
|
3
|
+
import { SignatureData } from '../signature_capture/data';
|
|
3
4
|
import { FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
|
|
4
5
|
export type SignatureKYCColors = {
|
|
5
6
|
faceLiveness?: FaceLivenessColors;
|
|
@@ -16,9 +17,10 @@ export type SignatureKYCVerbiage = {
|
|
|
16
17
|
};
|
|
17
18
|
export type SignatureKYCWizardProps = {
|
|
18
19
|
onComplete?: () => void;
|
|
20
|
+
onVideoCaptured?: (videoData: Blob, signatureData: SignatureData, signatureImageData: string) => void;
|
|
19
21
|
onRetryClicked?: () => void;
|
|
20
22
|
colors?: SignatureKYCColors;
|
|
21
23
|
verbiage?: SignatureKYCVerbiage;
|
|
22
24
|
debugMode?: boolean;
|
|
23
25
|
};
|
|
24
|
-
export declare const SignatureKYCWizard: ({ onComplete, onRetryClicked, colors, verbiage, debugMode, }: SignatureKYCWizardProps) => ReactElement;
|
|
26
|
+
export declare const SignatureKYCWizard: ({ onComplete, onVideoCaptured, onRetryClicked, colors, verbiage, debugMode, }: SignatureKYCWizardProps) => ReactElement;
|
|
@@ -9554,10 +9554,11 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9554
9554
|
return /*#__PURE__*/React__default['default'].createElement(PageContainer, {
|
|
9555
9555
|
className: "flex"
|
|
9556
9556
|
}, state.captureState !== CaptureState.COMPLETE && /*#__PURE__*/React__default['default'].createElement(CameraVideoTag, null), overlayDismissed && function () {
|
|
9557
|
+
var docCount = Object.keys(state.capturedDocuments).length;
|
|
9557
9558
|
switch (state.requestedDocumentType) {
|
|
9558
9559
|
case DocumentType.ID_CARD_FRONT:
|
|
9559
9560
|
return /*#__PURE__*/React__default['default'].createElement(IdCapture, {
|
|
9560
|
-
key:
|
|
9561
|
+
key: "capture".concat(docCount),
|
|
9561
9562
|
requiredDocumentType: state.requestedDocumentType,
|
|
9562
9563
|
autoCaptureEnabled: autoCaptureEnabled,
|
|
9563
9564
|
autoCaptureScoreThreshold: idCardAutoCaptureScoreThreshold,
|
|
@@ -9578,7 +9579,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9578
9579
|
});
|
|
9579
9580
|
case DocumentType.ID_CARD_BACK:
|
|
9580
9581
|
return /*#__PURE__*/React__default['default'].createElement(IdCapture, {
|
|
9581
|
-
key:
|
|
9582
|
+
key: "capture".concat(docCount),
|
|
9582
9583
|
requiredDocumentType: state.requestedDocumentType,
|
|
9583
9584
|
autoCaptureEnabled: autoCaptureEnabled,
|
|
9584
9585
|
autoCaptureScoreThreshold: idCardAutoCaptureScoreThreshold,
|
|
@@ -9598,7 +9599,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9598
9599
|
});
|
|
9599
9600
|
case DocumentType.PASSPORT:
|
|
9600
9601
|
return /*#__PURE__*/React__default['default'].createElement(IdCapture, {
|
|
9601
|
-
key:
|
|
9602
|
+
key: "capture".concat(docCount),
|
|
9602
9603
|
requiredDocumentType: state.requestedDocumentType,
|
|
9603
9604
|
autoCaptureEnabled: autoCaptureEnabled,
|
|
9604
9605
|
autoCaptureScoreThreshold: passportAutoCaptureScoreThreshold,
|
|
@@ -10261,7 +10262,7 @@ var templateObject_1$2, templateObject_2$1, templateObject_3$1;
|
|
|
10261
10262
|
var initialState$2 = {
|
|
10262
10263
|
frame: null,
|
|
10263
10264
|
face: null,
|
|
10264
|
-
requestState: '
|
|
10265
|
+
requestState: 'CAPTURING',
|
|
10265
10266
|
requestError: null,
|
|
10266
10267
|
imageUrl: null,
|
|
10267
10268
|
faceLive: false,
|
|
@@ -10275,10 +10276,10 @@ var reducer$2 = function reducer(state, action) {
|
|
|
10275
10276
|
switch (action.type) {
|
|
10276
10277
|
case 'livenessReady':
|
|
10277
10278
|
{
|
|
10278
|
-
var allowedStates = ['
|
|
10279
|
+
var allowedStates = ['CAPTURING', 'FAILED', 'ERROR'];
|
|
10279
10280
|
if (allowedStates.includes(state.requestState)) {
|
|
10280
10281
|
return tslib.__assign(tslib.__assign({}, state), {
|
|
10281
|
-
requestState: '
|
|
10282
|
+
requestState: 'CAPTURED',
|
|
10282
10283
|
frame: action.payload.frame,
|
|
10283
10284
|
face: action.payload.face
|
|
10284
10285
|
});
|
|
@@ -10371,7 +10372,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
10371
10372
|
}, [onCapture]);
|
|
10372
10373
|
var frame = state.frame,
|
|
10373
10374
|
face = state.face;
|
|
10374
|
-
var isReady = state.requestState === '
|
|
10375
|
+
var isReady = state.requestState === 'CAPTURED';
|
|
10375
10376
|
var isPassed = state.requestState === 'PASSED';
|
|
10376
10377
|
React.useEffect(function () {
|
|
10377
10378
|
if (!frame || !face || !isReady) return;
|
|
@@ -10711,7 +10712,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
10711
10712
|
switch (captureState) {
|
|
10712
10713
|
case 'CAPTURING':
|
|
10713
10714
|
return /*#__PURE__*/React__default['default'].createElement(FaceLivenessCapture, {
|
|
10714
|
-
key: "capture",
|
|
10715
|
+
key: "capture".concat(attempt),
|
|
10715
10716
|
onCapture: onCapture,
|
|
10716
10717
|
onSuccess: onSuccessCallback,
|
|
10717
10718
|
onTimeout: onTimeoutCallback,
|
|
@@ -11509,7 +11510,7 @@ var useVideoRecorder = function useVideoRecorder(camera) {
|
|
|
11509
11510
|
|
|
11510
11511
|
var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
11511
11512
|
var _b, _c;
|
|
11512
|
-
var
|
|
11513
|
+
var onVideoCaptured = _a.onVideoCaptured,
|
|
11513
11514
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
11514
11515
|
onExit = _a.onExit,
|
|
11515
11516
|
_d = _a.colors,
|
|
@@ -11580,9 +11581,9 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
11580
11581
|
}, [isRecording, startRecording, videoUrl]);
|
|
11581
11582
|
React.useEffect(function () {
|
|
11582
11583
|
if (signatureVideoData && signatureData && signatureDataUrl) {
|
|
11583
|
-
|
|
11584
|
+
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(signatureVideoData, signatureData, signatureDataUrl);
|
|
11584
11585
|
}
|
|
11585
|
-
}, [
|
|
11586
|
+
}, [onVideoCaptured, signatureData, signatureDataUrl, signatureVideoData]);
|
|
11586
11587
|
var animationFrame = React.useRef(0);
|
|
11587
11588
|
React.useEffect(function () {
|
|
11588
11589
|
var _a;
|
|
@@ -11761,6 +11762,7 @@ var templateObject_1;
|
|
|
11761
11762
|
|
|
11762
11763
|
var SignatureKYCWizard = function SignatureKYCWizard(_a) {
|
|
11763
11764
|
var onComplete = _a.onComplete,
|
|
11765
|
+
onVideoCaptured = _a.onVideoCaptured,
|
|
11764
11766
|
onRetryClicked = _a.onRetryClicked,
|
|
11765
11767
|
_b = _a.colors,
|
|
11766
11768
|
colors = _b === void 0 ? {} : _b,
|
|
@@ -11769,7 +11771,6 @@ var SignatureKYCWizard = function SignatureKYCWizard(_a) {
|
|
|
11769
11771
|
_d = _a.debugMode,
|
|
11770
11772
|
debugMode = _d === void 0 ? false : _d;
|
|
11771
11773
|
var _e = React.useContext(SubmissionContext),
|
|
11772
|
-
submit = _e.submit,
|
|
11773
11774
|
selfieImage = _e.selfieImage,
|
|
11774
11775
|
signatureVideo = _e.signatureVideo,
|
|
11775
11776
|
setSelfieImage = _e.setSelfieImage,
|
|
@@ -11822,12 +11823,12 @@ var SignatureKYCWizard = function SignatureKYCWizard(_a) {
|
|
|
11822
11823
|
});
|
|
11823
11824
|
});
|
|
11824
11825
|
}, [logCaptureMetadata, selfieImage, setSelfieImage]);
|
|
11825
|
-
var onSignatureCaptureCompleted = React.useCallback(function (
|
|
11826
|
+
var onSignatureCaptureCompleted = React.useCallback(function (videoData, signatureData, signatureImageData) {
|
|
11826
11827
|
setSignatureData(signatureData);
|
|
11827
11828
|
setSignatureVideo(URL.createObjectURL(videoData));
|
|
11828
11829
|
setCaptureState('SUCCESS');
|
|
11829
|
-
|
|
11830
|
-
}, [
|
|
11830
|
+
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
|
|
11831
|
+
}, [onVideoCaptured, setSignatureData, setSignatureVideo]);
|
|
11831
11832
|
var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
|
|
11832
11833
|
setCaptureState('CHECKING_LIVENESS');
|
|
11833
11834
|
}, []);
|
|
@@ -11855,7 +11856,7 @@ var SignatureKYCWizard = function SignatureKYCWizard(_a) {
|
|
|
11855
11856
|
});
|
|
11856
11857
|
case 'CAPTURING_SIGNATURE':
|
|
11857
11858
|
return /*#__PURE__*/React__default['default'].createElement(VideoSignatureCapture, {
|
|
11858
|
-
|
|
11859
|
+
onVideoCaptured: onSignatureCaptureCompleted,
|
|
11859
11860
|
onFaceNotDetected: onSignatureCaptureFacesNotDetected,
|
|
11860
11861
|
onExit: onExit,
|
|
11861
11862
|
colors: colors.videoSignatureCapture,
|
|
@@ -11865,7 +11866,7 @@ var SignatureKYCWizard = function SignatureKYCWizard(_a) {
|
|
|
11865
11866
|
case 'SUCCESS':
|
|
11866
11867
|
return /*#__PURE__*/React__default['default'].createElement(SignatureKYCSuccess, {
|
|
11867
11868
|
videoUrl: signatureVideo !== null && signatureVideo !== void 0 ? signatureVideo : '',
|
|
11868
|
-
onDoneClick:
|
|
11869
|
+
onDoneClick: onComplete,
|
|
11869
11870
|
onRetryClick: onRetryClicked,
|
|
11870
11871
|
headingText: (_a = verbiage.success) === null || _a === void 0 ? void 0 : _a.headingText,
|
|
11871
11872
|
retryBtnText: (_b = verbiage.success) === null || _b === void 0 ? void 0 : _b.retryBtnText,
|
|
@@ -12025,8 +12026,7 @@ var CompositeWizardComponent = function CompositeWizardComponent(_a) {
|
|
|
12025
12026
|
return /*#__PURE__*/React__default['default'].createElement(CameraProvider, {
|
|
12026
12027
|
key: "SignatureKycCamera",
|
|
12027
12028
|
preferContinuityCamera: false,
|
|
12028
|
-
preferFrontFacingCamera: true
|
|
12029
|
-
requestMicrophoneAccess: true
|
|
12029
|
+
preferFrontFacingCamera: true
|
|
12030
12030
|
}, /*#__PURE__*/React__default['default'].createElement(SignatureKYCWizard, tslib.__assign({}, signatureKYCProps, {
|
|
12031
12031
|
onComplete: onSignatureKycComplete
|
|
12032
12032
|
})));
|
|
@@ -12892,7 +12892,7 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
|
12892
12892
|
switch (captureState) {
|
|
12893
12893
|
case 'CAPTURING':
|
|
12894
12894
|
return /*#__PURE__*/React__default['default'].createElement(CustomerVerificationCapture, {
|
|
12895
|
-
key: attempt,
|
|
12895
|
+
key: "capture".concat(attempt),
|
|
12896
12896
|
onCustomerMatched: onCustomerMatchedCallback,
|
|
12897
12897
|
onCustomerNotMatched: onCustomerNotMatchedCallback,
|
|
12898
12898
|
onCaptureGuidanceTimeout: onCaptureGuidanceTimeoutCallback,
|
|
@@ -13329,7 +13329,7 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
|
13329
13329
|
switch (captureState) {
|
|
13330
13330
|
case 'CAPTURING':
|
|
13331
13331
|
return /*#__PURE__*/React__default['default'].createElement(CustomerIdentificationCapture, {
|
|
13332
|
-
key: attempt,
|
|
13332
|
+
key: "capture".concat(attempt),
|
|
13333
13333
|
onCustomerMatched: onCustomerMatchedCallback,
|
|
13334
13334
|
onCustomerNotMatched: onCustomerNotMatchedCallback,
|
|
13335
13335
|
onCaptureGuidanceTimeout: onCaptureGuidanceTimeoutCallback,
|
|
@@ -13602,8 +13602,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
13602
13602
|
}, /*#__PURE__*/React__default['default'].createElement(CameraProvider, {
|
|
13603
13603
|
key: attempt,
|
|
13604
13604
|
preferContinuityCamera: false,
|
|
13605
|
-
preferFrontFacingCamera: true
|
|
13606
|
-
requestMicrophoneAccess: true
|
|
13605
|
+
preferFrontFacingCamera: true
|
|
13607
13606
|
}, /*#__PURE__*/React__default['default'].createElement(SignatureKYCWizard, {
|
|
13608
13607
|
colors: colors,
|
|
13609
13608
|
debugMode: debugMode,
|