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.
@@ -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.14';
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,13 @@
21317
21319
  requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS'
21318
21320
  });
21319
21321
  }, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames]);
21322
+ var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
21323
+ var onExitAfterFailure = React.useCallback(function (resp, req) {
21324
+ onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
21325
+ if (allowSignatureAfterLivenessCheckFailure) {
21326
+ setCaptureState('CAPTURING_SIGNATURE');
21327
+ }
21328
+ }, [allowSignatureAfterLivenessCheckFailure, onExitAfterFailureProp]);
21320
21329
  return /*#__PURE__*/React.createElement(VideoSignatureContextProvider, null, /*#__PURE__*/React.createElement(PageContainer, {
21321
21330
  className: "flex ".concat((_b = classNames === null || classNames === void 0 ? void 0 : classNames.container) !== null && _b !== void 0 ? _b : '')
21322
21331
  }, /*#__PURE__*/React.createElement(CameraVideoTag, {
@@ -21330,6 +21339,7 @@
21330
21339
  onSuccess: onFaceCaptureSuccess,
21331
21340
  onExitCapture: onExit,
21332
21341
  onUserCancel: onUserCancel,
21342
+ onExitAfterFailure: onExitAfterFailure,
21333
21343
  onLoadingOverlayDismissed: onLoadingOverlayDismissed,
21334
21344
  customOverlayContent: customOverlayContent,
21335
21345
  loadingOverlayMode: loadingOverlayMode,
@@ -24819,16 +24829,18 @@
24819
24829
  idCardForFaceMatch = _a.idCardForFaceMatch,
24820
24830
  _e = _a.modelLoadTimeoutMs,
24821
24831
  modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
24832
+ _f = _a.allowSignatureAfterLivenessCheckFailure,
24833
+ allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
24822
24834
  faceLivenessProps = _a.faceLivenessProps,
24823
- _f = _a.theme,
24824
- theme = _f === void 0 ? 'default' : _f,
24835
+ _g = _a.theme,
24836
+ theme = _g === void 0 ? 'default' : _g,
24825
24837
  classNames = _a.classNames,
24826
24838
  colors = _a.colors,
24827
24839
  verbiage = _a.verbiage,
24828
24840
  geolocationEnabled = _a.geolocationEnabled,
24829
24841
  geolocationRequired = _a.geolocationRequired,
24830
- _g = _a.debugMode,
24831
- debugMode = _g === void 0 ? false : _g;
24842
+ _h = _a.debugMode,
24843
+ debugMode = _h === void 0 ? false : _h;
24832
24844
  useLanguage(lang);
24833
24845
  useDebugLogging(debugMode);
24834
24846
  return /*#__PURE__*/React.createElement(AuthProvider, {
@@ -24865,6 +24877,7 @@
24865
24877
  skipSuccessScreen: skipSuccessScreen,
24866
24878
  modelLoadTimeoutMs: modelLoadTimeoutMs,
24867
24879
  faceLivenessProps: faceLivenessProps,
24880
+ allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
24868
24881
  classNames: classNames,
24869
24882
  colors: colors,
24870
24883
  debugMode: debugMode,
@@ -24872,7 +24885,7 @@
24872
24885
  onModelError: onModelError,
24873
24886
  onUserCancel: onUserCancel
24874
24887
  };
24875
- }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, modelLoadTimeoutMs, faceLivenessProps, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
24888
+ }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
24876
24889
  }))));
24877
24890
  };
24878
24891