idmission-web-sdk 1.0.247 → 1.0.249

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.
@@ -102,6 +102,8 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
102
102
  idCaptureGuideType?: IdCaptureGuideType;
103
103
  /** Boolean to indicate whether guide images should be rotated on mobile. Defaults to `false`. */
104
104
  idCapturePortraitGuidesOnMobile?: boolean;
105
+ /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
106
+ idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
105
107
  /** Callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned. */
106
108
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
107
109
  /** Callback function that fires when the user has completed the flow instead of making a call to IDmission's servers, allowing customers to specify their own submission logic. Arguments: the request payload that would have been dispatched to IDmission's API, which contains the images/documents/video submitted by the user. Note that when this parameter is supplied, `onComplete` will never fire, and the customer will need to implement their own error handling/retry logic. Use at your own risk! */
@@ -99,6 +99,8 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
99
99
  idCaptureGuideType?: IdCaptureGuideType;
100
100
  /** Boolean to indicate whether guide images should be rotated on mobile. Defaults to `false`. */
101
101
  idCapturePortraitGuidesOnMobile?: boolean;
102
+ /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
103
+ idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
102
104
  /** Callback function that fires immediately prior to liveness check, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The liveness check request is passed in as a parameter and a promise resolving to the updated request should be returned. */
103
105
  onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
104
106
  /** Callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned. */
@@ -81,6 +81,8 @@ export interface IdValidationProps extends PropsWithChildren {
81
81
  guideType?: IdCaptureGuideType;
82
82
  /** Boolean to indicate whether guide images should be rotated on mobile. Defaults to `false`. */
83
83
  portraitGuidesOnMobile?: boolean;
84
+ /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
85
+ rotateLoadingOverlayImageWhenPortrait?: boolean;
84
86
  /** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack , `passport`.*/
85
87
  precapturedDocuments?: CapturedDocuments;
86
88
  /** Callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned. */
@@ -109,6 +109,8 @@ export interface VideoIdValidationProps extends PropsWithChildren {
109
109
  idCaptureGuideType?: IdCaptureGuideType;
110
110
  /** Boolean to indicate whether guide images should be rotated on mobile. Defaults to `false`. */
111
111
  idCapturePortraitGuidesOnMobile?: boolean;
112
+ /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
113
+ idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
112
114
  /** Name of an included theme or object containing theme properties. **/
113
115
  theme?: ThemeInput;
114
116
  /** Object containing any asset overrides. */
@@ -35,9 +35,10 @@ export type IdCaptureLoadingOverlayProps = {
35
35
  onDismissed?: () => void;
36
36
  onUserCancel?: () => void;
37
37
  instructions?: ReactNode;
38
+ rotateImage?: boolean;
38
39
  assets?: IdCaptureLoadingOverlayAssets;
39
40
  classNames?: IdCaptureLoadingOverlayClassNames;
40
41
  colors?: IdCaptureLoadingOverlayColors;
41
42
  verbiage?: IdCaptureLoadingOverlayVerbiage;
42
43
  };
43
- export declare const IdCaptureLoadingOverlay: ({ onDismissed, onUserCancel, instructions, assets, classNames, colors, verbiage: rawVerbiage, }: IdCaptureLoadingOverlayProps) => ReactElement;
44
+ export declare const IdCaptureLoadingOverlay: ({ onDismissed, onUserCancel, instructions, rotateImage, assets, classNames, colors, verbiage: rawVerbiage, }: IdCaptureLoadingOverlayProps) => ReactElement;
@@ -64,10 +64,11 @@ export type IdCaptureWizardProps = {
64
64
  releaseCameraAccessOnExit?: boolean;
65
65
  guideType?: IdCaptureGuideType;
66
66
  portraitGuidesOnMobile?: boolean;
67
+ rotateLoadingOverlayImageWhenPortrait?: boolean;
67
68
  assets?: IdCaptureWizardAssets;
68
69
  classNames?: IdCaptureWizardClassNames;
69
70
  colors?: IdCaptureWizardColors;
70
71
  verbiage?: IdCaptureWizardVerbiage;
71
72
  debugMode?: boolean;
72
73
  };
73
- export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, precapturedDocuments, captureRequirement, autoCaptureEnabled, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, barcodeScanningEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
74
+ export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, precapturedDocuments, captureRequirement, autoCaptureEnabled, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, barcodeScanningEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
@@ -49,10 +49,11 @@ export type VideoIdWizardProps = {
49
49
  skipShowIdCardBack?: boolean | (() => Promise<boolean>);
50
50
  idCaptureGuideType?: IdCaptureGuideType;
51
51
  idCapturePortraitGuidesOnMobile?: boolean;
52
+ idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
52
53
  assets?: VideoIdWizardAssets;
53
54
  classNames?: VideoIdWizardClassNames;
54
55
  colors?: VideoIdWizardColors;
55
56
  verbiage?: VideoIdWizardVerbiage;
56
57
  debugMode?: boolean;
57
58
  };
58
- export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardBackDetectionThreshold, idCardFrontFocusThreshold, idCardBackFocusThreshold, goodIdCardFrontFramesThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureGuideType, idCapturePortraitGuidesOnMobile, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
59
+ export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardBackDetectionThreshold, idCardFrontFocusThreshold, idCardBackFocusThreshold, goodIdCardFrontFramesThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
@@ -50,7 +50,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
50
50
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
51
51
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
52
52
 
53
- var webSdkVersion = '1.0.247';
53
+ var webSdkVersion = '1.0.249';
54
54
 
55
55
  function getPlatform() {
56
56
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -10351,26 +10351,29 @@ var templateObject_1$u;
10351
10351
  var ContinuityCameraCheckboxContainer = styled__default['default'].div(templateObject_1$t || (templateObject_1$t = tslib.__makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
10352
10352
  var ContinuityCameraCheckbox = styled__default['default'].input(templateObject_2$i || (templateObject_2$i = tslib.__makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
10353
10353
  var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
10354
+ var _b, _c, _d, _e;
10354
10355
  var onDismissed = _a.onDismissed,
10355
10356
  onUserCancel = _a.onUserCancel,
10356
10357
  instructions = _a.instructions,
10357
- _b = _a.assets,
10358
- assets = _b === void 0 ? {} : _b,
10359
- _c = _a.classNames,
10360
- classNames = _c === void 0 ? {} : _c,
10361
- _d = _a.colors,
10362
- colors = _d === void 0 ? {} : _d,
10363
- _e = _a.verbiage,
10364
- rawVerbiage = _e === void 0 ? {} : _e;
10358
+ _f = _a.rotateImage,
10359
+ rotateImage = _f === void 0 ? false : _f,
10360
+ _g = _a.assets,
10361
+ assets = _g === void 0 ? {} : _g,
10362
+ _h = _a.classNames,
10363
+ classNames = _h === void 0 ? {} : _h,
10364
+ _j = _a.colors,
10365
+ colors = _j === void 0 ? {} : _j,
10366
+ _k = _a.verbiage,
10367
+ rawVerbiage = _k === void 0 ? {} : _k;
10365
10368
  var modelsReady = React.useContext(IdCaptureModelsContext).ready;
10366
- var _f = React.useContext(CameraStateContext),
10367
- cameraReady = _f.cameraReady,
10368
- cameraAccessDenied = _f.cameraAccessDenied,
10369
- iphoneContinuityCameraAvailable = _f.iphoneContinuityCameraAvailable,
10370
- setIphoneContinuityCameraAllowed = _f.setIphoneContinuityCameraAllowed;
10371
- var _g = React.useState(false),
10372
- dismissed = _g[0],
10373
- setDismissed = _g[1];
10369
+ var _l = React.useContext(CameraStateContext),
10370
+ cameraReady = _l.cameraReady,
10371
+ cameraAccessDenied = _l.cameraAccessDenied,
10372
+ iphoneContinuityCameraAvailable = _l.iphoneContinuityCameraAvailable,
10373
+ setIphoneContinuityCameraAllowed = _l.setIphoneContinuityCameraAllowed;
10374
+ var _m = React.useState(false),
10375
+ dismissed = _m[0],
10376
+ setDismissed = _m[1];
10374
10377
  assets.instructionImageUrl || (assets.instructionImageUrl = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png"));
10375
10378
  var verbiage = useTranslations(rawVerbiage, {
10376
10379
  headingText: 'Use your device camera to capture your ID',
@@ -10390,6 +10393,7 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
10390
10393
  clearTimeout(t);
10391
10394
  };
10392
10395
  }, [cameraReady, modelsReady]);
10396
+ var imageRef = React.useRef(null);
10393
10397
  if (dismissed) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
10394
10398
  if (cameraAccessDenied) {
10395
10399
  return /*#__PURE__*/React__default['default'].createElement(CameraAccessDeniedOverlay, {
@@ -10399,6 +10403,15 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
10399
10403
  verbiage: rawVerbiage.cameraAccessDenied
10400
10404
  });
10401
10405
  }
10406
+ var imageStyle = {};
10407
+ if (rotateImage) {
10408
+ var naturalWidth = (_c = (_b = imageRef.current) === null || _b === void 0 ? void 0 : _b.naturalWidth) !== null && _c !== void 0 ? _c : 0;
10409
+ var naturalHeight = (_e = (_d = imageRef.current) === null || _d === void 0 ? void 0 : _d.naturalHeight) !== null && _e !== void 0 ? _e : 0;
10410
+ var scale = naturalWidth > naturalHeight ? naturalHeight / naturalWidth : 1;
10411
+ imageStyle = {
10412
+ transform: "rotate(-90deg) scale(".concat(scale, ")")
10413
+ };
10414
+ }
10402
10415
  return /*#__PURE__*/React__default['default'].createElement(OverlayContainer, {
10403
10416
  className: classNames.container
10404
10417
  }, /*#__PURE__*/React__default['default'].createElement(OverlayInner, {
@@ -10414,9 +10427,11 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
10414
10427
  pointerEvents: 'none'
10415
10428
  }
10416
10429
  }, /*#__PURE__*/React__default['default'].createElement("img", {
10430
+ ref: imageRef,
10417
10431
  alt: verbiage.headingText,
10418
10432
  src: assets.instructionImageUrl,
10419
- className: classNames.image
10433
+ className: classNames.image,
10434
+ style: imageStyle
10420
10435
  })), instructions, /*#__PURE__*/React__default['default'].createElement(ContinuityCameraCheckboxContainer, {
10421
10436
  className: classNames.continuityCameraCheckboxContainer
10422
10437
  }, iphoneContinuityCameraAvailable && ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ContinuityCameraCheckbox, {
@@ -11383,30 +11398,32 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11383
11398
  guideType = _5 === void 0 ? 'fit' : _5,
11384
11399
  _6 = _a.portraitGuidesOnMobile,
11385
11400
  portraitGuidesOnMobile = _6 === void 0 ? false : _6,
11386
- _7 = _a.assets,
11387
- assets = _7 === void 0 ? {} : _7,
11388
- _8 = _a.classNames,
11389
- classNames = _8 === void 0 ? {} : _8,
11390
- _9 = _a.colors,
11391
- colors = _9 === void 0 ? {} : _9,
11392
- _10 = _a.verbiage,
11393
- verbiage = _10 === void 0 ? {} : _10,
11394
- _11 = _a.debugMode,
11395
- debugMode = _11 === void 0 ? false : _11;
11396
- var _12 = useIdCaptureState(),
11397
- state = _12[0],
11398
- dispatch = _12[1];
11401
+ _7 = _a.rotateLoadingOverlayImageWhenPortrait,
11402
+ rotateLoadingOverlayImageWhenPortrait = _7 === void 0 ? true : _7,
11403
+ _8 = _a.assets,
11404
+ assets = _8 === void 0 ? {} : _8,
11405
+ _9 = _a.classNames,
11406
+ classNames = _9 === void 0 ? {} : _9,
11407
+ _10 = _a.colors,
11408
+ colors = _10 === void 0 ? {} : _10,
11409
+ _11 = _a.verbiage,
11410
+ verbiage = _11 === void 0 ? {} : _11,
11411
+ _12 = _a.debugMode,
11412
+ debugMode = _12 === void 0 ? false : _12;
11413
+ var _13 = useIdCaptureState(),
11414
+ state = _13[0],
11415
+ dispatch = _13[1];
11399
11416
  var releaseCameraAccess = React.useContext(CameraStateContext).releaseCameraAccess;
11400
- var _13 = React.useState(false),
11401
- overlayDismissed = _13[0],
11402
- setOverlayDismissed = _13[1];
11403
- var _14 = React.useContext(SubmissionContext),
11404
- submissionStatus = _14.submissionStatus,
11405
- setIdFrontImage = _14.setIdFrontImage,
11406
- setIdBackImage = _14.setIdBackImage,
11407
- setPassportImage = _14.setPassportImage,
11408
- logIdFrontCaptureAttempt = _14.logIdFrontCaptureAttempt,
11409
- logIdBackCaptureAttempt = _14.logIdBackCaptureAttempt;
11417
+ var _14 = React.useState(false),
11418
+ overlayDismissed = _14[0],
11419
+ setOverlayDismissed = _14[1];
11420
+ var _15 = React.useContext(SubmissionContext),
11421
+ submissionStatus = _15.submissionStatus,
11422
+ setIdFrontImage = _15.setIdFrontImage,
11423
+ setIdBackImage = _15.setIdBackImage,
11424
+ setPassportImage = _15.setPassportImage,
11425
+ logIdFrontCaptureAttempt = _15.logIdFrontCaptureAttempt,
11426
+ logIdBackCaptureAttempt = _15.logIdBackCaptureAttempt;
11410
11427
  var modelsError = React.useContext(IdCaptureModelsContext).error;
11411
11428
  var operationStartedAt = React.useRef();
11412
11429
  React.useEffect(function () {
@@ -11471,9 +11488,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11471
11488
  type: 'resetWizard'
11472
11489
  });
11473
11490
  }, [dispatch]);
11474
- var _15 = React.useState(0),
11475
- attempt = _15[0],
11476
- setAttempt = _15[1];
11491
+ var _16 = React.useState(0),
11492
+ attempt = _16[0],
11493
+ setAttempt = _16[1];
11477
11494
  var onExit = React.useCallback(function () {
11478
11495
  setOverlayDismissed(false);
11479
11496
  setAttempt(function (n) {
@@ -11516,12 +11533,12 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11516
11533
  })
11517
11534
  };
11518
11535
  var theme = styled.useTheme();
11519
- var _16 = useIdCaptureState()[0],
11520
- guideRectX = _16.guideRectX,
11521
- guideRectY = _16.guideRectY,
11522
- guideRectWidth = _16.guideRectWidth,
11523
- guideRectHeight = _16.guideRectHeight,
11524
- imageUrl = _16.imageUrl;
11536
+ var _17 = useIdCaptureState()[0],
11537
+ guideRectX = _17.guideRectX,
11538
+ guideRectY = _17.guideRectY,
11539
+ guideRectWidth = _17.guideRectWidth,
11540
+ guideRectHeight = _17.guideRectHeight,
11541
+ imageUrl = _17.imageUrl;
11525
11542
  var idCaptureAssets = assets[state.requestedDocumentType];
11526
11543
  var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
11527
11544
  React.useEffect(function () {
@@ -11651,7 +11668,8 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11651
11668
  onUserCancel: onUserCancel,
11652
11669
  onDismissed: function onDismissed() {
11653
11670
  setOverlayDismissed(true);
11654
- }
11671
+ },
11672
+ rotateImage: rotateLoadingOverlayImageWhenPortrait && portraitGuidesOnMobile && window.innerWidth < window.innerHeight
11655
11673
  })), state.captureState === 'complete' && showSuccessScreen && ( /*#__PURE__*/React__default['default'].createElement(IdCaptureSuccess, {
11656
11674
  capturedDocuments: state.capturedDocuments,
11657
11675
  barcodeResult: state.barcodeResult,
@@ -14421,25 +14439,27 @@ var VideoIdWizard = function VideoIdWizard(_a) {
14421
14439
  idCaptureGuideType = _l === void 0 ? 'fit' : _l,
14422
14440
  _m = _a.idCapturePortraitGuidesOnMobile,
14423
14441
  idCapturePortraitGuidesOnMobile = _m === void 0 ? false : _m,
14424
- _o = _a.assets,
14425
- assets = _o === void 0 ? {} : _o,
14426
- _p = _a.classNames,
14427
- classNames = _p === void 0 ? {} : _p,
14428
- _q = _a.colors,
14429
- colors = _q === void 0 ? {} : _q,
14430
- _r = _a.verbiage,
14431
- verbiage = _r === void 0 ? {} : _r,
14432
- _s = _a.debugMode,
14433
- debugMode = _s === void 0 ? false : _s;
14434
- var _t = React.useContext(SubmissionContext),
14435
- submissionStatus = _t.submissionStatus,
14436
- idCaptureVideoUrl = _t.idCaptureVideoUrl,
14437
- setIdCaptureVideoUrl = _t.setIdCaptureVideoUrl,
14438
- setIdCaptureVideoIdFrontImage = _t.setIdCaptureVideoIdFrontImage,
14439
- setIdCaptureVideoIdBackImage = _t.setIdCaptureVideoIdBackImage;
14440
- var _u = React.useState('CAPTURING_ID'),
14441
- captureState = _u[0],
14442
- setCaptureState = _u[1];
14442
+ _o = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
14443
+ idCaptureRotateLoadingOverlayImageWhenPortrait = _o === void 0 ? true : _o,
14444
+ _p = _a.assets,
14445
+ assets = _p === void 0 ? {} : _p,
14446
+ _q = _a.classNames,
14447
+ classNames = _q === void 0 ? {} : _q,
14448
+ _r = _a.colors,
14449
+ colors = _r === void 0 ? {} : _r,
14450
+ _s = _a.verbiage,
14451
+ verbiage = _s === void 0 ? {} : _s,
14452
+ _t = _a.debugMode,
14453
+ debugMode = _t === void 0 ? false : _t;
14454
+ var _u = React.useContext(SubmissionContext),
14455
+ submissionStatus = _u.submissionStatus,
14456
+ idCaptureVideoUrl = _u.idCaptureVideoUrl,
14457
+ setIdCaptureVideoUrl = _u.setIdCaptureVideoUrl,
14458
+ setIdCaptureVideoIdFrontImage = _u.setIdCaptureVideoIdFrontImage,
14459
+ setIdCaptureVideoIdBackImage = _u.setIdCaptureVideoIdBackImage;
14460
+ var _v = React.useState('CAPTURING_ID'),
14461
+ captureState = _v[0],
14462
+ setCaptureState = _v[1];
14443
14463
  React.useEffect(function () {
14444
14464
  if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
14445
14465
  }, [captureState, skipIdCapture]);
@@ -14469,9 +14489,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
14469
14489
  var onVideoCaptureFaceNotDetected = React.useCallback(function () {
14470
14490
  setCaptureState('CHECKING_LIVENESS');
14471
14491
  }, []);
14472
- var _v = React.useState(0),
14473
- attempt = _v[0],
14474
- setAttempt = _v[1];
14492
+ var _w = React.useState(0),
14493
+ attempt = _w[0],
14494
+ setAttempt = _w[1];
14475
14495
  var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
14476
14496
  var onFaceCaptureExitAfterFailure = React.useCallback(function (resp, req) {
14477
14497
  userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
@@ -14524,6 +14544,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
14524
14544
  releaseCameraAccessOnExit: false,
14525
14545
  guideType: idCaptureGuideType,
14526
14546
  portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
14547
+ rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
14527
14548
  debugMode: debugMode
14528
14549
  }))));
14529
14550
  case 'CHECKING_LIVENESS':
@@ -15005,6 +15026,8 @@ var IdValidation = function IdValidation(_a) {
15005
15026
  guideType = _k === void 0 ? 'fit' : _k,
15006
15027
  _l = _a.portraitGuidesOnMobile,
15007
15028
  portraitGuidesOnMobile = _l === void 0 ? false : _l,
15029
+ _m = _a.rotateLoadingOverlayImageWhenPortrait,
15030
+ rotateLoadingOverlayImageWhenPortrait = _m === void 0 ? true : _m,
15008
15031
  onBeforeSubmit = _a.onBeforeSubmit,
15009
15032
  onSubmit = _a.onSubmit,
15010
15033
  onComplete = _a.onComplete,
@@ -15012,28 +15035,28 @@ var IdValidation = function IdValidation(_a) {
15012
15035
  onDenied = _a.onDenied,
15013
15036
  onExitCapture = _a.onExitCapture,
15014
15037
  onUserCancel = _a.onUserCancel,
15015
- _m = _a.theme,
15016
- theme = _m === void 0 ? 'default' : _m,
15017
- _o = _a.assets,
15018
- assets = _o === void 0 ? {} : _o,
15019
- _p = _a.classNames,
15020
- classNames = _p === void 0 ? {} : _p,
15021
- _q = _a.colors,
15022
- colors = _q === void 0 ? {} : _q,
15023
- _r = _a.verbiage,
15024
- verbiage = _r === void 0 ? {} : _r,
15025
- _s = _a.captureSignature,
15026
- captureSignature = _s === void 0 ? false : _s,
15027
- _t = _a.captureSignatureVideo,
15028
- captureSignatureVideo = _t === void 0 ? false : _t,
15029
- _u = _a.captureAdditionalDocuments,
15030
- captureAdditionalDocuments = _u === void 0 ? [] : _u,
15031
- _v = _a.geolocationEnabled,
15032
- geolocationEnabled = _v === void 0 ? true : _v,
15033
- _w = _a.geolocationRequired,
15034
- geolocationRequired = _w === void 0 ? false : _w,
15035
- _x = _a.debugMode,
15036
- debugMode = _x === void 0 ? false : _x;
15038
+ _o = _a.theme,
15039
+ theme = _o === void 0 ? 'default' : _o,
15040
+ _p = _a.assets,
15041
+ assets = _p === void 0 ? {} : _p,
15042
+ _q = _a.classNames,
15043
+ classNames = _q === void 0 ? {} : _q,
15044
+ _r = _a.colors,
15045
+ colors = _r === void 0 ? {} : _r,
15046
+ _s = _a.verbiage,
15047
+ verbiage = _s === void 0 ? {} : _s,
15048
+ _t = _a.captureSignature,
15049
+ captureSignature = _t === void 0 ? false : _t,
15050
+ _u = _a.captureSignatureVideo,
15051
+ captureSignatureVideo = _u === void 0 ? false : _u,
15052
+ _v = _a.captureAdditionalDocuments,
15053
+ captureAdditionalDocuments = _v === void 0 ? [] : _v,
15054
+ _w = _a.geolocationEnabled,
15055
+ geolocationEnabled = _w === void 0 ? true : _w,
15056
+ _x = _a.geolocationRequired,
15057
+ geolocationRequired = _x === void 0 ? false : _x,
15058
+ _y = _a.debugMode,
15059
+ debugMode = _y === void 0 ? false : _y;
15037
15060
  useLanguage(lang);
15038
15061
  var idCaptureProps = React.useMemo(function () {
15039
15062
  return {
@@ -15052,13 +15075,14 @@ var IdValidation = function IdValidation(_a) {
15052
15075
  instructions: instructions,
15053
15076
  guideType: guideType,
15054
15077
  portraitGuidesOnMobile: portraitGuidesOnMobile,
15078
+ rotateLoadingOverlayImageWhenPortrait: rotateLoadingOverlayImageWhenPortrait,
15055
15079
  assets: assets,
15056
15080
  classNames: classNames,
15057
15081
  colors: colors,
15058
15082
  verbiage: verbiage,
15059
15083
  debugMode: debugMode
15060
15084
  };
15061
- }, [onExitCapture, onUserCancel, precapturedDocuments, idCaptureRequirement, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, instructions, guideType, portraitGuidesOnMobile, assets, classNames, colors, verbiage, debugMode]);
15085
+ }, [onExitCapture, onUserCancel, precapturedDocuments, idCaptureRequirement, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, assets, classNames, colors, verbiage, debugMode]);
15062
15086
  var additionalDocumentCaptureProps = React.useMemo(function () {
15063
15087
  return {
15064
15088
  documents: captureAdditionalDocuments,
@@ -15257,6 +15281,8 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
15257
15281
  idCaptureGuideType = _m === void 0 ? 'fit' : _m,
15258
15282
  _o = _a.idCapturePortraitGuidesOnMobile,
15259
15283
  idCapturePortraitGuidesOnMobile = _o === void 0 ? false : _o,
15284
+ _p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
15285
+ idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
15260
15286
  onBeforeLivenessCheck = _a.onBeforeLivenessCheck,
15261
15287
  onBeforeSubmit = _a.onBeforeSubmit,
15262
15288
  onSubmit = _a.onSubmit,
@@ -15266,28 +15292,28 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
15266
15292
  onExitCapture = _a.onExitCapture,
15267
15293
  onExitAfterFailure = _a.onExitAfterFailure,
15268
15294
  onUserCancel = _a.onUserCancel,
15269
- _p = _a.captureSignature,
15270
- captureSignature = _p === void 0 ? false : _p,
15271
- _q = _a.captureSignatureVideo,
15272
- captureSignatureVideo = _q === void 0 ? false : _q,
15273
- _r = _a.captureAdditionalDocuments,
15274
- captureAdditionalDocuments = _r === void 0 ? [] : _r,
15275
- _s = _a.theme,
15276
- theme = _s === void 0 ? 'default' : _s,
15277
- _t = _a.assets,
15278
- assets = _t === void 0 ? {} : _t,
15279
- _u = _a.classNames,
15280
- classNames = _u === void 0 ? {} : _u,
15281
- _v = _a.colors,
15282
- colors = _v === void 0 ? {} : _v,
15283
- _w = _a.verbiage,
15284
- verbiage = _w === void 0 ? {} : _w,
15285
- _x = _a.geolocationEnabled,
15286
- geolocationEnabled = _x === void 0 ? true : _x,
15287
- _y = _a.geolocationRequired,
15288
- geolocationRequired = _y === void 0 ? false : _y,
15289
- _z = _a.debugMode,
15290
- debugMode = _z === void 0 ? false : _z;
15295
+ _q = _a.captureSignature,
15296
+ captureSignature = _q === void 0 ? false : _q,
15297
+ _r = _a.captureSignatureVideo,
15298
+ captureSignatureVideo = _r === void 0 ? false : _r,
15299
+ _s = _a.captureAdditionalDocuments,
15300
+ captureAdditionalDocuments = _s === void 0 ? [] : _s,
15301
+ _t = _a.theme,
15302
+ theme = _t === void 0 ? 'default' : _t,
15303
+ _u = _a.assets,
15304
+ assets = _u === void 0 ? {} : _u,
15305
+ _v = _a.classNames,
15306
+ classNames = _v === void 0 ? {} : _v,
15307
+ _w = _a.colors,
15308
+ colors = _w === void 0 ? {} : _w,
15309
+ _x = _a.verbiage,
15310
+ verbiage = _x === void 0 ? {} : _x,
15311
+ _y = _a.geolocationEnabled,
15312
+ geolocationEnabled = _y === void 0 ? true : _y,
15313
+ _z = _a.geolocationRequired,
15314
+ geolocationRequired = _z === void 0 ? false : _z,
15315
+ _0 = _a.debugMode,
15316
+ debugMode = _0 === void 0 ? false : _0;
15291
15317
  useLanguage(lang);
15292
15318
  var idCaptureProps = React.useMemo(function () {
15293
15319
  return {
@@ -15308,10 +15334,11 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
15308
15334
  instructions: idCaptureInstructions,
15309
15335
  guideType: idCaptureGuideType,
15310
15336
  portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
15337
+ rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
15311
15338
  skipSuccessScreen: skipSuccessScreen,
15312
15339
  debugMode: debugMode
15313
15340
  };
15314
- }, [assets.idCapture, classNames.idCapture, colors.idCapture, debugMode, idAutoCaptureEnabled, idCaptureGuideType, idCaptureInstructions, idCapturePortraitGuidesOnMobile, idCaptureRequirement, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, onExitCapture, onUserCancel, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, precapturedDocuments, skipSuccessScreen, verbiage.idCapture]);
15341
+ }, [assets.idCapture, classNames.idCapture, colors.idCapture, debugMode, idAutoCaptureEnabled, idCaptureGuideType, idCaptureInstructions, idCapturePortraitGuidesOnMobile, idCaptureRequirement, idCaptureRotateLoadingOverlayImageWhenPortrait, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, onExitCapture, onUserCancel, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, precapturedDocuments, skipSuccessScreen, verbiage.idCapture]);
15315
15342
  var faceLivenessProps = React.useMemo(function () {
15316
15343
  return {
15317
15344
  timeoutDurationMs: faceLivenessTimeoutDurationMs,
@@ -15453,6 +15480,8 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
15453
15480
  idCaptureGuideType = _m === void 0 ? 'fit' : _m,
15454
15481
  _o = _a.idCapturePortraitGuidesOnMobile,
15455
15482
  idCapturePortraitGuidesOnMobile = _o === void 0 ? false : _o,
15483
+ _p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
15484
+ idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
15456
15485
  onBeforeSubmit = _a.onBeforeSubmit,
15457
15486
  onSubmit = _a.onSubmit,
15458
15487
  onComplete = _a.onComplete,
@@ -15461,28 +15490,28 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
15461
15490
  onExitCapture = _a.onExitCapture,
15462
15491
  onExitAfterFailure = _a.onExitAfterFailure,
15463
15492
  onUserCancel = _a.onUserCancel,
15464
- _p = _a.captureSignature,
15465
- captureSignature = _p === void 0 ? false : _p,
15466
- _q = _a.captureSignatureVideo,
15467
- captureSignatureVideo = _q === void 0 ? false : _q,
15468
- _r = _a.captureAdditionalDocuments,
15469
- captureAdditionalDocuments = _r === void 0 ? [] : _r,
15470
- _s = _a.theme,
15471
- theme = _s === void 0 ? 'default' : _s,
15472
- _t = _a.assets,
15473
- assets = _t === void 0 ? {} : _t,
15474
- _u = _a.classNames,
15475
- classNames = _u === void 0 ? {} : _u,
15476
- _v = _a.colors,
15477
- colors = _v === void 0 ? {} : _v,
15478
- _w = _a.verbiage,
15479
- verbiage = _w === void 0 ? {} : _w,
15480
- _x = _a.geolocationEnabled,
15481
- geolocationEnabled = _x === void 0 ? true : _x,
15482
- _y = _a.geolocationRequired,
15483
- geolocationRequired = _y === void 0 ? false : _y,
15484
- _z = _a.debugMode,
15485
- debugMode = _z === void 0 ? false : _z;
15493
+ _q = _a.captureSignature,
15494
+ captureSignature = _q === void 0 ? false : _q,
15495
+ _r = _a.captureSignatureVideo,
15496
+ captureSignatureVideo = _r === void 0 ? false : _r,
15497
+ _s = _a.captureAdditionalDocuments,
15498
+ captureAdditionalDocuments = _s === void 0 ? [] : _s,
15499
+ _t = _a.theme,
15500
+ theme = _t === void 0 ? 'default' : _t,
15501
+ _u = _a.assets,
15502
+ assets = _u === void 0 ? {} : _u,
15503
+ _v = _a.classNames,
15504
+ classNames = _v === void 0 ? {} : _v,
15505
+ _w = _a.colors,
15506
+ colors = _w === void 0 ? {} : _w,
15507
+ _x = _a.verbiage,
15508
+ verbiage = _x === void 0 ? {} : _x,
15509
+ _y = _a.geolocationEnabled,
15510
+ geolocationEnabled = _y === void 0 ? true : _y,
15511
+ _z = _a.geolocationRequired,
15512
+ geolocationRequired = _z === void 0 ? false : _z,
15513
+ _0 = _a.debugMode,
15514
+ debugMode = _0 === void 0 ? false : _0;
15486
15515
  useLanguage(lang);
15487
15516
  var idCaptureProps = React.useMemo(function () {
15488
15517
  return {
@@ -15500,12 +15529,13 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
15500
15529
  instructions: idCaptureInstructions,
15501
15530
  guideType: idCaptureGuideType,
15502
15531
  portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
15532
+ rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
15503
15533
  onExitCapture: onExitCapture,
15504
15534
  onUserCancel: onUserCancel,
15505
15535
  skipSuccessScreen: skipSuccessScreen,
15506
15536
  debugMode: debugMode
15507
15537
  };
15508
- }, [assets.idCapture, classNames.idCapture, colors.idCapture, debugMode, idAutoCaptureEnabled, idCaptureGuideType, idCaptureInstructions, idCapturePortraitGuidesOnMobile, idCaptureRequirement, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, onExitCapture, onUserCancel, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, verbiage.idCapture]);
15538
+ }, [assets.idCapture, classNames.idCapture, colors.idCapture, debugMode, idAutoCaptureEnabled, idCaptureGuideType, idCaptureInstructions, idCapturePortraitGuidesOnMobile, idCaptureRequirement, idCaptureRotateLoadingOverlayImageWhenPortrait, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, onExitCapture, onUserCancel, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, verbiage.idCapture]);
15509
15539
  var faceLivenessProps = React.useMemo(function () {
15510
15540
  return {
15511
15541
  onExitCapture: onExitCapture,
@@ -16707,28 +16737,30 @@ var VideoIdValidation = function VideoIdValidation(_a) {
16707
16737
  idCaptureGuideType = _o === void 0 ? 'fit' : _o,
16708
16738
  _p = _a.idCapturePortraitGuidesOnMobile,
16709
16739
  idCapturePortraitGuidesOnMobile = _p === void 0 ? false : _p,
16710
- _q = _a.theme,
16711
- theme = _q === void 0 ? 'default' : _q,
16712
- _r = _a.assets,
16713
- assets = _r === void 0 ? {} : _r,
16714
- _s = _a.classNames,
16715
- classNames = _s === void 0 ? {} : _s,
16716
- _t = _a.colors,
16717
- colors = _t === void 0 ? {} : _t,
16718
- _u = _a.verbiage,
16719
- verbiage = _u === void 0 ? {} : _u,
16720
- _v = _a.captureSignature,
16721
- captureSignature = _v === void 0 ? false : _v,
16722
- _w = _a.captureSignatureVideo,
16723
- captureSignatureVideo = _w === void 0 ? false : _w,
16724
- _x = _a.captureAdditionalDocuments,
16725
- captureAdditionalDocuments = _x === void 0 ? [] : _x,
16726
- _y = _a.geolocationEnabled,
16727
- geolocationEnabled = _y === void 0 ? true : _y,
16728
- _z = _a.geolocationRequired,
16729
- geolocationRequired = _z === void 0 ? false : _z,
16730
- _0 = _a.debugMode,
16731
- debugMode = _0 === void 0 ? false : _0;
16740
+ _q = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
16741
+ idCaptureRotateLoadingOverlayImageWhenPortrait = _q === void 0 ? true : _q,
16742
+ _r = _a.theme,
16743
+ theme = _r === void 0 ? 'default' : _r,
16744
+ _s = _a.assets,
16745
+ assets = _s === void 0 ? {} : _s,
16746
+ _t = _a.classNames,
16747
+ classNames = _t === void 0 ? {} : _t,
16748
+ _u = _a.colors,
16749
+ colors = _u === void 0 ? {} : _u,
16750
+ _v = _a.verbiage,
16751
+ verbiage = _v === void 0 ? {} : _v,
16752
+ _w = _a.captureSignature,
16753
+ captureSignature = _w === void 0 ? false : _w,
16754
+ _x = _a.captureSignatureVideo,
16755
+ captureSignatureVideo = _x === void 0 ? false : _x,
16756
+ _y = _a.captureAdditionalDocuments,
16757
+ captureAdditionalDocuments = _y === void 0 ? [] : _y,
16758
+ _z = _a.geolocationEnabled,
16759
+ geolocationEnabled = _z === void 0 ? true : _z,
16760
+ _0 = _a.geolocationRequired,
16761
+ geolocationRequired = _0 === void 0 ? false : _0,
16762
+ _1 = _a.debugMode,
16763
+ debugMode = _1 === void 0 ? false : _1;
16732
16764
  useLanguage(lang);
16733
16765
  var videoIdCaptureProps = React.useMemo(function () {
16734
16766
  return {
@@ -16750,13 +16782,14 @@ var VideoIdValidation = function VideoIdValidation(_a) {
16750
16782
  skipShowIdCardBack: skipShowIdCardBack,
16751
16783
  idCaptureGuideType: idCaptureGuideType,
16752
16784
  idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
16785
+ idCaptureRotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
16753
16786
  assets: assets,
16754
16787
  classNames: classNames,
16755
16788
  colors: colors,
16756
16789
  verbiage: verbiage,
16757
16790
  debugMode: debugMode
16758
16791
  };
16759
- }, [assets, classNames, colors, debugMode, faceLivenessProps, goodIdCardBackFramesThreshold, goodIdCardFrontFramesThreshold, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureProps, idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, onExitAfterFailure, onExitCapture, onUserCancel, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, verbiage]);
16792
+ }, [assets, classNames, colors, debugMode, faceLivenessProps, goodIdCardBackFramesThreshold, goodIdCardFrontFramesThreshold, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureProps, idCaptureRotateLoadingOverlayImageWhenPortrait, idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, onExitAfterFailure, onExitCapture, onUserCancel, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, verbiage]);
16760
16793
  var additionalDocumentCaptureProps = React.useMemo(function () {
16761
16794
  return {
16762
16795
  documents: captureAdditionalDocuments,