idmission-web-sdk 2.2.12 → 2.2.13

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/sdk2.esm.js CHANGED
@@ -200,7 +200,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
200
200
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
201
201
  };
202
202
 
203
- var webSdkVersion = '2.2.12';
203
+ var webSdkVersion = '2.2.13';
204
204
 
205
205
  function getPlatform() {
206
206
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -11467,36 +11467,38 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
11467
11467
  customOverlayContent = _a.customOverlayContent,
11468
11468
  _d = _a.skipSuccessScreen,
11469
11469
  skipSuccessScreen = _d === void 0 ? false : _d,
11470
+ _e = _a.allowSignatureAfterLivenessCheckFailure,
11471
+ allowSignatureAfterLivenessCheckFailure = _e === void 0 ? false : _e,
11470
11472
  faceLivenessProps = _a.faceLivenessProps,
11471
- _e = _a.assets,
11472
- assets = _e === void 0 ? {} : _e,
11473
- _f = _a.classNames,
11474
- classNames = _f === void 0 ? {} : _f,
11475
- _g = _a.colors,
11476
- colors = _g === void 0 ? {} : _g,
11477
- _h = _a.verbiage,
11478
- verbiage = _h === void 0 ? {} : _h,
11479
- _j = _a.debugMode,
11480
- debugMode = _j === void 0 ? false : _j;
11481
- var _k = useContext(SubmissionContext),
11482
- selfieImage = _k.selfieImage,
11483
- setSelfieImage = _k.setSelfieImage,
11484
- setSignatureData = _k.setSignatureData,
11485
- setSignatureVideoUrl = _k.setSignatureVideoUrl,
11486
- logSelfieCaptureAttempt = _k.logSelfieCaptureAttempt;
11487
- var _l = useContext(CameraStateContext),
11488
- cameraAccessDenied = _l.cameraAccessDenied,
11489
- requestCameraAccess = _l.requestCameraAccess,
11490
- releaseCameraAccess = _l.releaseCameraAccess;
11491
- var _m = useState('CHECKING_LIVENESS'),
11492
- captureState = _m[0],
11493
- setCaptureState = _m[1];
11473
+ _f = _a.assets,
11474
+ assets = _f === void 0 ? {} : _f,
11475
+ _g = _a.classNames,
11476
+ classNames = _g === void 0 ? {} : _g,
11477
+ _h = _a.colors,
11478
+ colors = _h === void 0 ? {} : _h,
11479
+ _j = _a.verbiage,
11480
+ verbiage = _j === void 0 ? {} : _j,
11481
+ _k = _a.debugMode,
11482
+ debugMode = _k === void 0 ? false : _k;
11483
+ var _l = useContext(SubmissionContext),
11484
+ selfieImage = _l.selfieImage,
11485
+ setSelfieImage = _l.setSelfieImage,
11486
+ setSignatureData = _l.setSignatureData,
11487
+ setSignatureVideoUrl = _l.setSignatureVideoUrl,
11488
+ logSelfieCaptureAttempt = _l.logSelfieCaptureAttempt;
11489
+ var _m = useContext(CameraStateContext),
11490
+ cameraAccessDenied = _m.cameraAccessDenied,
11491
+ requestCameraAccess = _m.requestCameraAccess,
11492
+ releaseCameraAccess = _m.releaseCameraAccess;
11493
+ var _o = useState('CHECKING_LIVENESS'),
11494
+ captureState = _o[0],
11495
+ setCaptureState = _o[1];
11494
11496
  var operationStartedAt = useRef();
11495
11497
  var captureStartedAt = useRef();
11496
11498
  var captureEndedAt = useRef();
11497
- var _o = useContext(SelfieGuidanceModelsContext),
11498
- start = _o.start,
11499
- stop = _o.stop;
11499
+ var _p = useContext(SelfieGuidanceModelsContext),
11500
+ start = _p.start,
11501
+ stop = _p.stop;
11500
11502
  useEffect(function () {
11501
11503
  operationStartedAt.current = new Date();
11502
11504
  }, []);
@@ -11532,9 +11534,9 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
11532
11534
  setSelfieImage(selfieFromRequest);
11533
11535
  }
11534
11536
  }, [logCaptureMetadata, onFaceLivenessSuccessProp, selfieImage, setSelfieImage]);
11535
- var _p = useState(null),
11536
- signatureImageUrl = _p[0],
11537
- setSignatureImageUrl = _p[1];
11537
+ var _q = useState(null),
11538
+ signatureImageUrl = _q[0],
11539
+ setSignatureImageUrl = _q[1];
11538
11540
  var onSignatureCaptureCompleted = useCallback(function (videoData, signatureData, signatureImageData) {
11539
11541
  setSignatureData(signatureData);
11540
11542
  setSignatureVideoUrl(URL.createObjectURL(videoData));
@@ -11545,9 +11547,9 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
11545
11547
  var onSignatureCaptureFacesNotDetected = useCallback(function () {
11546
11548
  setCaptureState('CHECKING_LIVENESS');
11547
11549
  }, []);
11548
- var _q = useState(0),
11549
- attempt = _q[0],
11550
- setAttempt = _q[1];
11550
+ var _r = useState(0),
11551
+ attempt = _r[0],
11552
+ setAttempt = _r[1];
11551
11553
  var onExit = useCallback(function () {
11552
11554
  releaseCameraAccess();
11553
11555
  setAttempt(function (n) {
@@ -11578,6 +11580,11 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
11578
11580
  requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS'
11579
11581
  });
11580
11582
  }, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames]);
11583
+ var onExitAfterFailure = useCallback(function () {
11584
+ if (allowSignatureAfterLivenessCheckFailure) {
11585
+ setCaptureState('CAPTURING_SIGNATURE');
11586
+ }
11587
+ }, [allowSignatureAfterLivenessCheckFailure]);
11581
11588
  return /*#__PURE__*/React__default.createElement(VideoSignatureContextProvider, null, /*#__PURE__*/React__default.createElement(PageContainer, {
11582
11589
  className: "flex ".concat((_b = classNames === null || classNames === void 0 ? void 0 : classNames.container) !== null && _b !== void 0 ? _b : '')
11583
11590
  }, /*#__PURE__*/React__default.createElement(CameraVideoTag, {
@@ -11591,6 +11598,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
11591
11598
  onSuccess: onFaceCaptureSuccess,
11592
11599
  onExitCapture: onExit,
11593
11600
  onUserCancel: onUserCancel,
11601
+ onExitAfterFailure: onExitAfterFailure,
11594
11602
  onLoadingOverlayDismissed: onLoadingOverlayDismissed,
11595
11603
  customOverlayContent: customOverlayContent,
11596
11604
  loadingOverlayMode: loadingOverlayMode,
@@ -15080,16 +15088,18 @@ var SignatureKYC = function SignatureKYC(_a) {
15080
15088
  idCardForFaceMatch = _a.idCardForFaceMatch,
15081
15089
  _e = _a.modelLoadTimeoutMs,
15082
15090
  modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
15091
+ _f = _a.allowSignatureAfterLivenessCheckFailure,
15092
+ allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
15083
15093
  faceLivenessProps = _a.faceLivenessProps,
15084
- _f = _a.theme,
15085
- theme = _f === void 0 ? 'default' : _f,
15094
+ _g = _a.theme,
15095
+ theme = _g === void 0 ? 'default' : _g,
15086
15096
  classNames = _a.classNames,
15087
15097
  colors = _a.colors,
15088
15098
  verbiage = _a.verbiage,
15089
15099
  geolocationEnabled = _a.geolocationEnabled,
15090
15100
  geolocationRequired = _a.geolocationRequired,
15091
- _g = _a.debugMode,
15092
- debugMode = _g === void 0 ? false : _g;
15101
+ _h = _a.debugMode,
15102
+ debugMode = _h === void 0 ? false : _h;
15093
15103
  useLanguage(lang);
15094
15104
  useDebugLogging(debugMode);
15095
15105
  return /*#__PURE__*/React__default.createElement(AuthProvider, {
@@ -15126,6 +15136,7 @@ var SignatureKYC = function SignatureKYC(_a) {
15126
15136
  skipSuccessScreen: skipSuccessScreen,
15127
15137
  modelLoadTimeoutMs: modelLoadTimeoutMs,
15128
15138
  faceLivenessProps: faceLivenessProps,
15139
+ allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
15129
15140
  classNames: classNames,
15130
15141
  colors: colors,
15131
15142
  debugMode: debugMode,
@@ -15133,7 +15144,7 @@ var SignatureKYC = function SignatureKYC(_a) {
15133
15144
  onModelError: onModelError,
15134
15145
  onUserCancel: onUserCancel
15135
15146
  };
15136
- }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, modelLoadTimeoutMs, faceLivenessProps, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
15147
+ }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
15137
15148
  }))));
15138
15149
  };
15139
15150