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.
@@ -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.12';
214
+ var webSdkVersion = '2.2.13';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -21206,36 +21206,38 @@
21206
21206
  customOverlayContent = _a.customOverlayContent,
21207
21207
  _d = _a.skipSuccessScreen,
21208
21208
  skipSuccessScreen = _d === void 0 ? false : _d,
21209
+ _e = _a.allowSignatureAfterLivenessCheckFailure,
21210
+ allowSignatureAfterLivenessCheckFailure = _e === void 0 ? false : _e,
21209
21211
  faceLivenessProps = _a.faceLivenessProps,
21210
- _e = _a.assets,
21211
- assets = _e === void 0 ? {} : _e,
21212
- _f = _a.classNames,
21213
- classNames = _f === void 0 ? {} : _f,
21214
- _g = _a.colors,
21215
- colors = _g === void 0 ? {} : _g,
21216
- _h = _a.verbiage,
21217
- verbiage = _h === void 0 ? {} : _h,
21218
- _j = _a.debugMode,
21219
- debugMode = _j === void 0 ? false : _j;
21220
- var _k = React.useContext(SubmissionContext),
21221
- selfieImage = _k.selfieImage,
21222
- setSelfieImage = _k.setSelfieImage,
21223
- setSignatureData = _k.setSignatureData,
21224
- setSignatureVideoUrl = _k.setSignatureVideoUrl,
21225
- logSelfieCaptureAttempt = _k.logSelfieCaptureAttempt;
21226
- var _l = React.useContext(CameraStateContext),
21227
- cameraAccessDenied = _l.cameraAccessDenied,
21228
- requestCameraAccess = _l.requestCameraAccess,
21229
- releaseCameraAccess = _l.releaseCameraAccess;
21230
- var _m = React.useState('CHECKING_LIVENESS'),
21231
- captureState = _m[0],
21232
- setCaptureState = _m[1];
21212
+ _f = _a.assets,
21213
+ assets = _f === void 0 ? {} : _f,
21214
+ _g = _a.classNames,
21215
+ classNames = _g === void 0 ? {} : _g,
21216
+ _h = _a.colors,
21217
+ colors = _h === void 0 ? {} : _h,
21218
+ _j = _a.verbiage,
21219
+ verbiage = _j === void 0 ? {} : _j,
21220
+ _k = _a.debugMode,
21221
+ debugMode = _k === void 0 ? false : _k;
21222
+ var _l = React.useContext(SubmissionContext),
21223
+ selfieImage = _l.selfieImage,
21224
+ setSelfieImage = _l.setSelfieImage,
21225
+ setSignatureData = _l.setSignatureData,
21226
+ setSignatureVideoUrl = _l.setSignatureVideoUrl,
21227
+ logSelfieCaptureAttempt = _l.logSelfieCaptureAttempt;
21228
+ var _m = React.useContext(CameraStateContext),
21229
+ cameraAccessDenied = _m.cameraAccessDenied,
21230
+ requestCameraAccess = _m.requestCameraAccess,
21231
+ releaseCameraAccess = _m.releaseCameraAccess;
21232
+ var _o = React.useState('CHECKING_LIVENESS'),
21233
+ captureState = _o[0],
21234
+ setCaptureState = _o[1];
21233
21235
  var operationStartedAt = React.useRef();
21234
21236
  var captureStartedAt = React.useRef();
21235
21237
  var captureEndedAt = React.useRef();
21236
- var _o = React.useContext(SelfieGuidanceModelsContext),
21237
- start = _o.start,
21238
- stop = _o.stop;
21238
+ var _p = React.useContext(SelfieGuidanceModelsContext),
21239
+ start = _p.start,
21240
+ stop = _p.stop;
21239
21241
  React.useEffect(function () {
21240
21242
  operationStartedAt.current = new Date();
21241
21243
  }, []);
@@ -21271,9 +21273,9 @@
21271
21273
  setSelfieImage(selfieFromRequest);
21272
21274
  }
21273
21275
  }, [logCaptureMetadata, onFaceLivenessSuccessProp, selfieImage, setSelfieImage]);
21274
- var _p = React.useState(null),
21275
- signatureImageUrl = _p[0],
21276
- setSignatureImageUrl = _p[1];
21276
+ var _q = React.useState(null),
21277
+ signatureImageUrl = _q[0],
21278
+ setSignatureImageUrl = _q[1];
21277
21279
  var onSignatureCaptureCompleted = React.useCallback(function (videoData, signatureData, signatureImageData) {
21278
21280
  setSignatureData(signatureData);
21279
21281
  setSignatureVideoUrl(URL.createObjectURL(videoData));
@@ -21284,9 +21286,9 @@
21284
21286
  var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
21285
21287
  setCaptureState('CHECKING_LIVENESS');
21286
21288
  }, []);
21287
- var _q = React.useState(0),
21288
- attempt = _q[0],
21289
- setAttempt = _q[1];
21289
+ var _r = React.useState(0),
21290
+ attempt = _r[0],
21291
+ setAttempt = _r[1];
21290
21292
  var onExit = React.useCallback(function () {
21291
21293
  releaseCameraAccess();
21292
21294
  setAttempt(function (n) {
@@ -21317,6 +21319,11 @@
21317
21319
  requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS'
21318
21320
  });
21319
21321
  }, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames]);
21322
+ var onExitAfterFailure = React.useCallback(function () {
21323
+ if (allowSignatureAfterLivenessCheckFailure) {
21324
+ setCaptureState('CAPTURING_SIGNATURE');
21325
+ }
21326
+ }, [allowSignatureAfterLivenessCheckFailure]);
21320
21327
  return /*#__PURE__*/React.createElement(VideoSignatureContextProvider, null, /*#__PURE__*/React.createElement(PageContainer, {
21321
21328
  className: "flex ".concat((_b = classNames === null || classNames === void 0 ? void 0 : classNames.container) !== null && _b !== void 0 ? _b : '')
21322
21329
  }, /*#__PURE__*/React.createElement(CameraVideoTag, {
@@ -21330,6 +21337,7 @@
21330
21337
  onSuccess: onFaceCaptureSuccess,
21331
21338
  onExitCapture: onExit,
21332
21339
  onUserCancel: onUserCancel,
21340
+ onExitAfterFailure: onExitAfterFailure,
21333
21341
  onLoadingOverlayDismissed: onLoadingOverlayDismissed,
21334
21342
  customOverlayContent: customOverlayContent,
21335
21343
  loadingOverlayMode: loadingOverlayMode,
@@ -24819,16 +24827,18 @@
24819
24827
  idCardForFaceMatch = _a.idCardForFaceMatch,
24820
24828
  _e = _a.modelLoadTimeoutMs,
24821
24829
  modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
24830
+ _f = _a.allowSignatureAfterLivenessCheckFailure,
24831
+ allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
24822
24832
  faceLivenessProps = _a.faceLivenessProps,
24823
- _f = _a.theme,
24824
- theme = _f === void 0 ? 'default' : _f,
24833
+ _g = _a.theme,
24834
+ theme = _g === void 0 ? 'default' : _g,
24825
24835
  classNames = _a.classNames,
24826
24836
  colors = _a.colors,
24827
24837
  verbiage = _a.verbiage,
24828
24838
  geolocationEnabled = _a.geolocationEnabled,
24829
24839
  geolocationRequired = _a.geolocationRequired,
24830
- _g = _a.debugMode,
24831
- debugMode = _g === void 0 ? false : _g;
24840
+ _h = _a.debugMode,
24841
+ debugMode = _h === void 0 ? false : _h;
24832
24842
  useLanguage(lang);
24833
24843
  useDebugLogging(debugMode);
24834
24844
  return /*#__PURE__*/React.createElement(AuthProvider, {
@@ -24865,6 +24875,7 @@
24865
24875
  skipSuccessScreen: skipSuccessScreen,
24866
24876
  modelLoadTimeoutMs: modelLoadTimeoutMs,
24867
24877
  faceLivenessProps: faceLivenessProps,
24878
+ allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
24868
24879
  classNames: classNames,
24869
24880
  colors: colors,
24870
24881
  debugMode: debugMode,
@@ -24872,7 +24883,7 @@
24872
24883
  onModelError: onModelError,
24873
24884
  onUserCancel: onUserCancel
24874
24885
  };
24875
- }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, modelLoadTimeoutMs, faceLivenessProps, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
24886
+ }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
24876
24887
  }))));
24877
24888
  };
24878
24889