idmission-web-sdk 2.2.92 → 2.2.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/CompositeWizard.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +2 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts +2 -1
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +2 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +97 -74
- 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 +97 -74
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +97 -74
- 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
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
var webSdkVersion = '2.2.
|
|
214
|
+
var webSdkVersion = '2.2.94';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -18447,7 +18447,7 @@
|
|
|
18447
18447
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", {
|
|
18448
18448
|
ref: fileInput,
|
|
18449
18449
|
type: "file",
|
|
18450
|
-
accept: "image
|
|
18450
|
+
accept: "image/*,.pdf",
|
|
18451
18451
|
style: {
|
|
18452
18452
|
display: 'none'
|
|
18453
18453
|
},
|
|
@@ -22538,35 +22538,39 @@
|
|
|
22538
22538
|
var VideoSignatureContext = /*#__PURE__*/React.createContext(videoSignatureInitialState);
|
|
22539
22539
|
function VideoSignatureContextProvider(_a) {
|
|
22540
22540
|
var _this = this;
|
|
22541
|
-
var children = _a.children
|
|
22541
|
+
var children = _a.children,
|
|
22542
|
+
_b = _a.captureAudio,
|
|
22543
|
+
captureAudio = _b === void 0 ? false : _b;
|
|
22542
22544
|
var signaturePad = React.useRef(null);
|
|
22543
|
-
var _b = React.useState(null),
|
|
22544
|
-
signatureData = _b[0],
|
|
22545
|
-
setSignatureData = _b[1];
|
|
22546
22545
|
var _c = React.useState(null),
|
|
22547
|
-
|
|
22548
|
-
|
|
22546
|
+
signatureData = _c[0],
|
|
22547
|
+
setSignatureData = _c[1];
|
|
22549
22548
|
var _d = React.useState(null),
|
|
22550
|
-
|
|
22551
|
-
|
|
22549
|
+
signatureDataUrl = _d[0],
|
|
22550
|
+
setSignatureDataUrl = _d[1];
|
|
22552
22551
|
var _e = React.useState(null),
|
|
22553
|
-
|
|
22554
|
-
|
|
22552
|
+
signatureVideoData = _e[0],
|
|
22553
|
+
setSignatureVideoData = _e[1];
|
|
22554
|
+
var _f = React.useState(null),
|
|
22555
|
+
signatureVideoUrl = _f[0],
|
|
22556
|
+
setSignatureVideoUrl = _f[1];
|
|
22555
22557
|
var signatureRecorder = React.useRef(null);
|
|
22556
22558
|
var recordedChunks = React.useRef([]);
|
|
22557
|
-
var
|
|
22558
|
-
camera =
|
|
22559
|
-
videoRef =
|
|
22560
|
-
|
|
22561
|
-
|
|
22562
|
-
|
|
22563
|
-
|
|
22564
|
-
|
|
22559
|
+
var _g = useCameraStore(),
|
|
22560
|
+
camera = _g.camera,
|
|
22561
|
+
videoRef = _g.videoRef,
|
|
22562
|
+
audioStream = _g.audioStream;
|
|
22563
|
+
var _h = useVideoRecorder(camera, audioStream, captureAudio),
|
|
22564
|
+
isRecordingVideo = _h.isRecordingVideo,
|
|
22565
|
+
startRecordingVideo = _h.startRecordingVideo,
|
|
22566
|
+
stopRecordingVideo = _h.stopRecordingVideo,
|
|
22567
|
+
startRecordingAudio = _h.startRecordingAudio,
|
|
22568
|
+
stopRecordingAudio = _h.stopRecordingAudio;
|
|
22565
22569
|
var outputCanvas = React.useRef(null);
|
|
22566
22570
|
var recordingLock = React.useRef(false);
|
|
22567
|
-
var
|
|
22568
|
-
isRecording =
|
|
22569
|
-
setIsRecording =
|
|
22571
|
+
var _j = React.useState(false),
|
|
22572
|
+
isRecording = _j[0],
|
|
22573
|
+
setIsRecording = _j[1];
|
|
22570
22574
|
var startRecording = React.useCallback(function () {
|
|
22571
22575
|
setIsRecording(true);
|
|
22572
22576
|
}, []);
|
|
@@ -22579,7 +22583,7 @@
|
|
|
22579
22583
|
recordingLock.current = true;
|
|
22580
22584
|
(function () {
|
|
22581
22585
|
return __awaiter(_this, void 0, void 0, function () {
|
|
22582
|
-
var stream;
|
|
22586
|
+
var stream, tracks, audioTrack;
|
|
22583
22587
|
return __generator(this, function (_a) {
|
|
22584
22588
|
switch (_a.label) {
|
|
22585
22589
|
case 0:
|
|
@@ -22597,8 +22601,12 @@
|
|
|
22597
22601
|
_a.label = 2;
|
|
22598
22602
|
case 2:
|
|
22599
22603
|
startRecordingVideo();
|
|
22604
|
+
if (captureAudio) startRecordingAudio();
|
|
22600
22605
|
stream = outputCanvas.current.captureStream(24 /* fps */);
|
|
22601
|
-
|
|
22606
|
+
tracks = [stream.getVideoTracks()[0]];
|
|
22607
|
+
audioTrack = audioStream.getAudioTracks()[0];
|
|
22608
|
+
if (audioTrack) tracks.push(audioTrack);
|
|
22609
|
+
signatureRecorder.current = new MediaRecorder(new MediaStream(tracks), {
|
|
22602
22610
|
videoBitsPerSecond: 270000
|
|
22603
22611
|
});
|
|
22604
22612
|
signatureRecorder.current.start();
|
|
@@ -22621,7 +22629,7 @@
|
|
|
22621
22629
|
});
|
|
22622
22630
|
});
|
|
22623
22631
|
})();
|
|
22624
|
-
}, [isRecording,
|
|
22632
|
+
}, [audioStream, captureAudio, isRecording, startRecordingAudio, startRecordingVideo]);
|
|
22625
22633
|
var animationFrame = React.useRef(0);
|
|
22626
22634
|
React.useEffect(function () {
|
|
22627
22635
|
if (!signaturePad.current || !videoRef.current || !outputCanvas.current || !camera || !isRecording || !isRecordingVideo) return;
|
|
@@ -22669,12 +22677,13 @@
|
|
|
22669
22677
|
setSignatureDataUrl(imageUrl);
|
|
22670
22678
|
setSignatureData(signatureDataToIdmissionFormat(signaturePad.current, imageUrl));
|
|
22671
22679
|
stopRecordingVideo();
|
|
22680
|
+
stopRecordingAudio();
|
|
22672
22681
|
(_a = signatureRecorder.current) === null || _a === void 0 ? void 0 : _a.stop();
|
|
22673
22682
|
return [2 /*return*/];
|
|
22674
22683
|
}
|
|
22675
22684
|
});
|
|
22676
22685
|
});
|
|
22677
|
-
}, [stopRecordingVideo]);
|
|
22686
|
+
}, [stopRecordingAudio, stopRecordingVideo]);
|
|
22678
22687
|
var value = React.useMemo(function () {
|
|
22679
22688
|
return {
|
|
22680
22689
|
startRecording: startRecording,
|
|
@@ -22926,44 +22935,50 @@
|
|
|
22926
22935
|
customOverlayContent = _a.customOverlayContent,
|
|
22927
22936
|
_d = _a.skipSuccessScreen,
|
|
22928
22937
|
skipSuccessScreen = _d === void 0 ? false : _d,
|
|
22929
|
-
_e = _a.
|
|
22930
|
-
|
|
22938
|
+
_e = _a.captureAudio,
|
|
22939
|
+
captureAudio = _e === void 0 ? false : _e,
|
|
22940
|
+
_f = _a.allowSignatureAfterLivenessCheckFailure,
|
|
22941
|
+
allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
|
|
22931
22942
|
faceLivenessProps = _a.faceLivenessProps,
|
|
22932
|
-
|
|
22933
|
-
assets =
|
|
22934
|
-
|
|
22935
|
-
classNames =
|
|
22936
|
-
|
|
22937
|
-
colors =
|
|
22938
|
-
|
|
22939
|
-
verbiage =
|
|
22940
|
-
|
|
22941
|
-
debugMode =
|
|
22942
|
-
var
|
|
22943
|
-
selfieImage =
|
|
22944
|
-
setSelfieImage =
|
|
22945
|
-
setSignatureData =
|
|
22946
|
-
setSignatureVideoUrl =
|
|
22947
|
-
logSelfieCaptureAttempt =
|
|
22948
|
-
var
|
|
22943
|
+
_g = _a.assets,
|
|
22944
|
+
assets = _g === void 0 ? {} : _g,
|
|
22945
|
+
_h = _a.classNames,
|
|
22946
|
+
classNames = _h === void 0 ? {} : _h,
|
|
22947
|
+
_j = _a.colors,
|
|
22948
|
+
colors = _j === void 0 ? {} : _j,
|
|
22949
|
+
_k = _a.verbiage,
|
|
22950
|
+
verbiage = _k === void 0 ? {} : _k,
|
|
22951
|
+
_l = _a.debugMode,
|
|
22952
|
+
debugMode = _l === void 0 ? false : _l;
|
|
22953
|
+
var _m = React.useContext(SubmissionContext),
|
|
22954
|
+
selfieImage = _m.selfieImage,
|
|
22955
|
+
setSelfieImage = _m.setSelfieImage,
|
|
22956
|
+
setSignatureData = _m.setSignatureData,
|
|
22957
|
+
setSignatureVideoUrl = _m.setSignatureVideoUrl,
|
|
22958
|
+
logSelfieCaptureAttempt = _m.logSelfieCaptureAttempt;
|
|
22959
|
+
var _o = useCameraStore(useShallow(function (state) {
|
|
22949
22960
|
return {
|
|
22950
22961
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
22951
22962
|
requestCameraAccess: state.requestCameraAccess,
|
|
22952
|
-
releaseCameraAccess: state.releaseCameraAccess
|
|
22963
|
+
releaseCameraAccess: state.releaseCameraAccess,
|
|
22964
|
+
requestMicrophoneAccess: state.requestMicrophoneAccess,
|
|
22965
|
+
releaseMicrophoneAccess: state.releaseMicrophoneAccess
|
|
22953
22966
|
};
|
|
22954
22967
|
})),
|
|
22955
|
-
cameraAccessDenied =
|
|
22956
|
-
requestCameraAccess =
|
|
22957
|
-
releaseCameraAccess =
|
|
22958
|
-
|
|
22959
|
-
|
|
22960
|
-
|
|
22968
|
+
cameraAccessDenied = _o.cameraAccessDenied,
|
|
22969
|
+
requestCameraAccess = _o.requestCameraAccess,
|
|
22970
|
+
releaseCameraAccess = _o.releaseCameraAccess,
|
|
22971
|
+
requestMicrophoneAccess = _o.requestMicrophoneAccess,
|
|
22972
|
+
releaseMicrophoneAccess = _o.releaseMicrophoneAccess;
|
|
22973
|
+
var _p = React.useState('CHECKING_LIVENESS'),
|
|
22974
|
+
captureState = _p[0],
|
|
22975
|
+
setCaptureState = _p[1];
|
|
22961
22976
|
var operationStartedAt = React.useRef();
|
|
22962
22977
|
var captureStartedAt = React.useRef();
|
|
22963
22978
|
var captureEndedAt = React.useRef();
|
|
22964
|
-
var
|
|
22965
|
-
start =
|
|
22966
|
-
stop =
|
|
22979
|
+
var _q = React.useContext(SelfieGuidanceModelsContext),
|
|
22980
|
+
start = _q.start,
|
|
22981
|
+
stop = _q.stop;
|
|
22967
22982
|
React.useEffect(function () {
|
|
22968
22983
|
operationStartedAt.current = new Date();
|
|
22969
22984
|
}, []);
|
|
@@ -22999,9 +23014,9 @@
|
|
|
22999
23014
|
setSelfieImage(selfieFromRequest);
|
|
23000
23015
|
}
|
|
23001
23016
|
}, [logCaptureMetadata, onFaceLivenessSuccessProp, selfieImage, setSelfieImage]);
|
|
23002
|
-
var
|
|
23003
|
-
signatureImageUrl =
|
|
23004
|
-
setSignatureImageUrl =
|
|
23017
|
+
var _r = React.useState(null),
|
|
23018
|
+
signatureImageUrl = _r[0],
|
|
23019
|
+
setSignatureImageUrl = _r[1];
|
|
23005
23020
|
var onSignatureCaptureCompleted = React.useCallback(function (videoData, signatureData, signatureImageData) {
|
|
23006
23021
|
setSignatureData(signatureData);
|
|
23007
23022
|
setSignatureVideoUrl(URL.createObjectURL(videoData));
|
|
@@ -23012,18 +23027,20 @@
|
|
|
23012
23027
|
var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
|
|
23013
23028
|
setCaptureState('CHECKING_LIVENESS');
|
|
23014
23029
|
}, []);
|
|
23015
|
-
var
|
|
23016
|
-
attempt =
|
|
23017
|
-
setAttempt =
|
|
23030
|
+
var _s = React.useState(0),
|
|
23031
|
+
attempt = _s[0],
|
|
23032
|
+
setAttempt = _s[1];
|
|
23018
23033
|
var onExit = React.useCallback(function () {
|
|
23019
23034
|
releaseCameraAccess();
|
|
23035
|
+
releaseMicrophoneAccess();
|
|
23020
23036
|
setAttempt(function (n) {
|
|
23021
23037
|
return n + 1;
|
|
23022
23038
|
});
|
|
23023
23039
|
setCaptureState('CHECKING_LIVENESS');
|
|
23024
23040
|
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
23025
|
-
requestCameraAccess();
|
|
23026
|
-
|
|
23041
|
+
void requestCameraAccess();
|
|
23042
|
+
if (captureAudio) void requestMicrophoneAccess();
|
|
23043
|
+
}, [captureAudio, onExitCapture, releaseCameraAccess, releaseMicrophoneAccess, requestCameraAccess, requestMicrophoneAccess]);
|
|
23027
23044
|
var onRetry = React.useCallback(function () {
|
|
23028
23045
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
23029
23046
|
onExit();
|
|
@@ -23057,7 +23074,9 @@
|
|
|
23057
23074
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
23058
23075
|
faceLivenessOnLoadingOverlayDismissed === null || faceLivenessOnLoadingOverlayDismissed === void 0 ? void 0 : faceLivenessOnLoadingOverlayDismissed();
|
|
23059
23076
|
}, [faceLivenessOnLoadingOverlayDismissed, onLoadingOverlayDismissed]);
|
|
23060
|
-
return /*#__PURE__*/React.createElement(VideoSignatureContextProvider,
|
|
23077
|
+
return /*#__PURE__*/React.createElement(VideoSignatureContextProvider, {
|
|
23078
|
+
captureAudio: captureAudio
|
|
23079
|
+
}, /*#__PURE__*/React.createElement(PageContainer, {
|
|
23061
23080
|
className: "flex ".concat((_b = classNames === null || classNames === void 0 ? void 0 : classNames.container) !== null && _b !== void 0 ? _b : '')
|
|
23062
23081
|
}, /*#__PURE__*/React.createElement(CameraVideoTag, {
|
|
23063
23082
|
className: classNames.cameraFeed
|
|
@@ -24384,6 +24403,7 @@
|
|
|
24384
24403
|
return /*#__PURE__*/React.createElement(CameraStoreProvider, {
|
|
24385
24404
|
preferIphoneContinuityCamera: false,
|
|
24386
24405
|
preferFrontFacingCamera: true,
|
|
24406
|
+
requireMicrophoneAccess: videoSignatureCaptureProps.captureAudio,
|
|
24387
24407
|
maxVideoWidth: 1280,
|
|
24388
24408
|
maxFps: 30,
|
|
24389
24409
|
onCameraAccessDenied: onCameraAccessDenied,
|
|
@@ -26640,21 +26660,23 @@
|
|
|
26640
26660
|
customOverlayContent = _a.customOverlayContent,
|
|
26641
26661
|
_d = _a.skipSuccessScreen,
|
|
26642
26662
|
skipSuccessScreen = _d === void 0 ? false : _d,
|
|
26663
|
+
_e = _a.captureAudio,
|
|
26664
|
+
captureAudio = _e === void 0 ? false : _e,
|
|
26643
26665
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
26644
|
-
|
|
26645
|
-
modelLoadTimeoutMs =
|
|
26646
|
-
|
|
26647
|
-
allowSignatureAfterLivenessCheckFailure =
|
|
26666
|
+
_f = _a.modelLoadTimeoutMs,
|
|
26667
|
+
modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
|
|
26668
|
+
_g = _a.allowSignatureAfterLivenessCheckFailure,
|
|
26669
|
+
allowSignatureAfterLivenessCheckFailure = _g === void 0 ? false : _g,
|
|
26648
26670
|
faceLivenessProps = _a.faceLivenessProps,
|
|
26649
|
-
|
|
26650
|
-
theme =
|
|
26671
|
+
_h = _a.theme,
|
|
26672
|
+
theme = _h === void 0 ? 'default' : _h,
|
|
26651
26673
|
classNames = _a.classNames,
|
|
26652
26674
|
colors = _a.colors,
|
|
26653
26675
|
verbiage = _a.verbiage,
|
|
26654
26676
|
geolocationEnabled = _a.geolocationEnabled,
|
|
26655
26677
|
geolocationRequired = _a.geolocationRequired,
|
|
26656
|
-
|
|
26657
|
-
debugMode =
|
|
26678
|
+
_j = _a.debugMode,
|
|
26679
|
+
debugMode = _j === void 0 ? false : _j;
|
|
26658
26680
|
useLanguage(lang);
|
|
26659
26681
|
useDebugLogging(debugMode);
|
|
26660
26682
|
return /*#__PURE__*/React.createElement(AuthProvider, {
|
|
@@ -26691,6 +26713,7 @@
|
|
|
26691
26713
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
26692
26714
|
loadingOverlayMode: loadingOverlayMode,
|
|
26693
26715
|
skipSuccessScreen: skipSuccessScreen,
|
|
26716
|
+
captureAudio: captureAudio,
|
|
26694
26717
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
26695
26718
|
faceLivenessProps: faceLivenessProps,
|
|
26696
26719
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
@@ -26701,7 +26724,7 @@
|
|
|
26701
26724
|
onModelError: onModelError,
|
|
26702
26725
|
onUserCancel: onUserCancel
|
|
26703
26726
|
};
|
|
26704
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
26727
|
+
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
26705
26728
|
}))));
|
|
26706
26729
|
};
|
|
26707
26730
|
|