idmission-web-sdk 2.2.115 → 2.2.117

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.115';
214
+ var webSdkVersion = '2.2.117';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -19179,15 +19179,17 @@
19179
19179
  React.useEffect(function () {
19180
19180
  if (documentCount) resetBestFrame();
19181
19181
  }, [documentCount, resetBestFrame]);
19182
+ var isFallbackMode = forceFallbackMode || modelError;
19182
19183
  var logCaptureMetadata = React.useCallback(function (metadata) {
19183
19184
  var _a;
19184
19185
  metadata.operationTime = new Date().getTime() - ((_a = state.operationStartedAt) !== null && _a !== void 0 ? _a : new Date()).getTime();
19186
+ metadata.captureMode = isFallbackMode ? 'Manual' : state.captureState === 'uploading' ? 'Upload' : 'Auto';
19185
19187
  if (state.requestedDocumentType === 'idCardBack') {
19186
19188
  logIdBackCaptureAttempt(metadata);
19187
19189
  } else {
19188
19190
  logIdFrontCaptureAttempt(metadata);
19189
19191
  }
19190
- }, [logIdBackCaptureAttempt, logIdFrontCaptureAttempt, state.operationStartedAt, state.requestedDocumentType]);
19192
+ }, [isFallbackMode, logIdBackCaptureAttempt, logIdFrontCaptureAttempt, state.captureState, state.operationStartedAt, state.requestedDocumentType]);
19191
19193
  React.useEffect(function startModelsWhenCapturing() {
19192
19194
  if (!overlayDismissed || state.captureState !== 'capturing') return;
19193
19195
  dispatchIdCaptureAction({
@@ -19367,7 +19369,7 @@
19367
19369
  setProgressStarted(true);
19368
19370
  }
19369
19371
  }, [state.goodFramesCount]);
19370
- if (forceFallbackMode || modelError) {
19372
+ if (isFallbackMode) {
19371
19373
  return /*#__PURE__*/React.createElement(IdCaptureFallback, {
19372
19374
  idCaptureRequirement: captureRequirement,
19373
19375
  onFinished: onSubmitClick,