idmission-web-sdk 2.2.12 → 2.2.14

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.14';
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,13 @@ 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 onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
11584
+ var onExitAfterFailure = useCallback(function (resp, req) {
11585
+ onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
11586
+ if (allowSignatureAfterLivenessCheckFailure) {
11587
+ setCaptureState('CAPTURING_SIGNATURE');
11588
+ }
11589
+ }, [allowSignatureAfterLivenessCheckFailure, onExitAfterFailureProp]);
11581
11590
  return /*#__PURE__*/React__default.createElement(VideoSignatureContextProvider, null, /*#__PURE__*/React__default.createElement(PageContainer, {
11582
11591
  className: "flex ".concat((_b = classNames === null || classNames === void 0 ? void 0 : classNames.container) !== null && _b !== void 0 ? _b : '')
11583
11592
  }, /*#__PURE__*/React__default.createElement(CameraVideoTag, {
@@ -11591,6 +11600,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
11591
11600
  onSuccess: onFaceCaptureSuccess,
11592
11601
  onExitCapture: onExit,
11593
11602
  onUserCancel: onUserCancel,
11603
+ onExitAfterFailure: onExitAfterFailure,
11594
11604
  onLoadingOverlayDismissed: onLoadingOverlayDismissed,
11595
11605
  customOverlayContent: customOverlayContent,
11596
11606
  loadingOverlayMode: loadingOverlayMode,
@@ -15080,16 +15090,18 @@ var SignatureKYC = function SignatureKYC(_a) {
15080
15090
  idCardForFaceMatch = _a.idCardForFaceMatch,
15081
15091
  _e = _a.modelLoadTimeoutMs,
15082
15092
  modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
15093
+ _f = _a.allowSignatureAfterLivenessCheckFailure,
15094
+ allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
15083
15095
  faceLivenessProps = _a.faceLivenessProps,
15084
- _f = _a.theme,
15085
- theme = _f === void 0 ? 'default' : _f,
15096
+ _g = _a.theme,
15097
+ theme = _g === void 0 ? 'default' : _g,
15086
15098
  classNames = _a.classNames,
15087
15099
  colors = _a.colors,
15088
15100
  verbiage = _a.verbiage,
15089
15101
  geolocationEnabled = _a.geolocationEnabled,
15090
15102
  geolocationRequired = _a.geolocationRequired,
15091
- _g = _a.debugMode,
15092
- debugMode = _g === void 0 ? false : _g;
15103
+ _h = _a.debugMode,
15104
+ debugMode = _h === void 0 ? false : _h;
15093
15105
  useLanguage(lang);
15094
15106
  useDebugLogging(debugMode);
15095
15107
  return /*#__PURE__*/React__default.createElement(AuthProvider, {
@@ -15126,6 +15138,7 @@ var SignatureKYC = function SignatureKYC(_a) {
15126
15138
  skipSuccessScreen: skipSuccessScreen,
15127
15139
  modelLoadTimeoutMs: modelLoadTimeoutMs,
15128
15140
  faceLivenessProps: faceLivenessProps,
15141
+ allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
15129
15142
  classNames: classNames,
15130
15143
  colors: colors,
15131
15144
  debugMode: debugMode,
@@ -15133,7 +15146,7 @@ var SignatureKYC = function SignatureKYC(_a) {
15133
15146
  onModelError: onModelError,
15134
15147
  onUserCancel: onUserCancel
15135
15148
  };
15136
- }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, modelLoadTimeoutMs, faceLivenessProps, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
15149
+ }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
15137
15150
  }))));
15138
15151
  };
15139
15152