idmission-web-sdk 2.1.47 → 2.1.49

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.
@@ -215,7 +215,7 @@
215
215
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
216
216
  };
217
217
 
218
- var webSdkVersion = '2.1.47';
218
+ var webSdkVersion = '2.1.49';
219
219
 
220
220
  function getPlatform() {
221
221
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -16543,6 +16543,7 @@
16543
16543
  var _b, _c, _d, _e;
16544
16544
  var onDismissed = _a.onDismissed,
16545
16545
  onUserCancel = _a.onUserCancel,
16546
+ onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
16546
16547
  instructions = _a.instructions,
16547
16548
  _f = _a.rotateImage,
16548
16549
  rotateImage = _f === void 0 ? false : _f,
@@ -16553,7 +16554,8 @@
16553
16554
  _j = _a.colors,
16554
16555
  colors = _j === void 0 ? {} : _j,
16555
16556
  _k = _a.verbiage,
16556
- rawVerbiage = _k === void 0 ? {} : _k;
16557
+ rawVerbiage = _k === void 0 ? {} : _k,
16558
+ customOverlayContent = _a.customOverlayContent;
16557
16559
  var _l = React.useContext(IdCaptureModelsContext),
16558
16560
  modelsReady = _l.ready,
16559
16561
  modelDownloadProgress = _l.modelDownloadProgress;
@@ -16610,12 +16612,12 @@
16610
16612
  className: classNames.container
16611
16613
  }, /*#__PURE__*/React.createElement(OverlayInner$1, {
16612
16614
  className: classNames.inner
16613
- }, /*#__PURE__*/React.createElement(OverlayHeader$1, null, /*#__PURE__*/React.createElement(StyledGuidanceMessage$2, {
16614
- className: classNames.heading
16615
- }, verbiage.headingText)), onUserCancel && ( /*#__PURE__*/React.createElement(ExitCaptureButton, {
16615
+ }, onUserCancel && ( /*#__PURE__*/React.createElement(ExitCaptureButton, {
16616
16616
  onClick: onUserCancel,
16617
16617
  className: classNames.cancelBtn
16618
- })), /*#__PURE__*/React.createElement(StyledOverlayImageContainer$2, {
16618
+ })), customOverlayContent ? customOverlayContent() : ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(OverlayHeader$1, null, /*#__PURE__*/React.createElement(StyledGuidanceMessage$2, {
16619
+ className: classNames.heading
16620
+ }, verbiage.headingText)), /*#__PURE__*/React.createElement(StyledOverlayImageContainer$2, {
16619
16621
  className: classNames.imageContainer,
16620
16622
  style: {
16621
16623
  pointerEvents: 'none'
@@ -16628,7 +16630,7 @@
16628
16630
  style: imageStyle
16629
16631
  })) : ( /*#__PURE__*/React.createElement(IdCaptureLoadingGraphic, {
16630
16632
  className: classNames.image
16631
- }))), instructions, /*#__PURE__*/React.createElement(ContinuityCameraCheckboxContainer$1, {
16633
+ }))))), instructions, /*#__PURE__*/React.createElement(ContinuityCameraCheckboxContainer$1, {
16632
16634
  className: classNames.continuityCameraCheckboxContainer
16633
16635
  }, iphoneContinuityCameraAvailable && ( /*#__PURE__*/React.createElement(ContinuityCameraCheckboxInner, {
16634
16636
  className: classNames.continuityCameraCheckboxInner
@@ -16672,6 +16674,7 @@
16672
16674
  onClick: function onClick() {
16673
16675
  setDismissed(true);
16674
16676
  onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
16677
+ onCustomOverlyDismissed === null || onCustomOverlyDismissed === void 0 ? void 0 : onCustomOverlyDismissed();
16675
16678
  }
16676
16679
  }, verbiage.continueText))))));
16677
16680
  };
@@ -16695,7 +16698,7 @@
16695
16698
  var ContinuityCameraCheckbox$1 = styled.input(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
16696
16699
  var StyledButtonsRow$a = styled(ButtonsRow$1)(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: 15px 25px;\n height: 100px;\n color: ", ";\n ", "\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100dvw;\n box-sizing: border-box;\n"], ["\n display: flex;\n flex-direction: row;\n padding: 15px 25px;\n height: 100px;\n color: ", ";\n ", "\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100dvw;\n box-sizing: border-box;\n"])), function (props) {
16697
16700
  var _a, _b, _c, _d;
16698
- return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarTextColor) !== null && _d !== void 0 ? _d : 'white';
16701
+ return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarTextColor) !== null && _d !== void 0 ? _d : 'white';
16699
16702
  }, function (props) {
16700
16703
  var _a, _b, _c, _d, _e, _f;
16701
16704
  return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
@@ -18767,6 +18770,8 @@
18767
18770
  onUserCancel = _a.onUserCancel,
18768
18771
  _0 = _a.loadingOverlayMode,
18769
18772
  loadingOverlayMode = _0 === void 0 ? 'default' : _0,
18773
+ customOverlayContent = _a.customOverlayContent,
18774
+ onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
18770
18775
  precapturedDocuments = _a.precapturedDocuments,
18771
18776
  _1 = _a.captureRequirement,
18772
18777
  captureRequirement = _1 === void 0 ? 'idCardOrPassport' : _1,
@@ -19096,6 +19101,8 @@
19096
19101
  }), !overlayDismissed && ( /*#__PURE__*/React.createElement(IdCaptureLoadingOverlay, {
19097
19102
  key: "loading".concat(attempt),
19098
19103
  mode: loadingOverlayMode,
19104
+ customOverlayContent: customOverlayContent,
19105
+ onCustomOverlyDismissed: onCustomOverlyDismissed,
19099
19106
  instructions: instructions,
19100
19107
  assets: assets.loadingOverlay,
19101
19108
  classNames: classNames.loadingOverlay,
@@ -20843,6 +20850,7 @@
20843
20850
  var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
20844
20851
  var onDismissed = _a.onDismissed,
20845
20852
  onUserCancel = _a.onUserCancel,
20853
+ onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
20846
20854
  _b = _a.assets,
20847
20855
  assets = _b === void 0 ? {} : _b,
20848
20856
  _c = _a.classNames,
@@ -20850,7 +20858,8 @@
20850
20858
  _d = _a.colors,
20851
20859
  colors = _d === void 0 ? {} : _d,
20852
20860
  _e = _a.verbiage,
20853
- rawVerbiage = _e === void 0 ? {} : _e;
20861
+ rawVerbiage = _e === void 0 ? {} : _e,
20862
+ customOverlayContent = _a.customOverlayContent;
20854
20863
  var _f = React.useContext(CameraStateContext),
20855
20864
  cameraReady = _f.cameraReady,
20856
20865
  cameraAccessDenied = _f.cameraAccessDenied,
@@ -20907,7 +20916,7 @@
20907
20916
  }, onUserCancel && ( /*#__PURE__*/React.createElement(ExitCaptureButton, {
20908
20917
  onClick: onUserCancel,
20909
20918
  className: classNames.cancelBtn
20910
- })), /*#__PURE__*/React.createElement(OverlayHeader, {
20919
+ })), customOverlayContent ? customOverlayContent() : ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(OverlayHeader, {
20911
20920
  className: classNames.headingContainer
20912
20921
  }, /*#__PURE__*/React.createElement(StyledGuidanceMessage, {
20913
20922
  className: classNames.heading
@@ -20919,7 +20928,7 @@
20919
20928
  src: assets.instructionImageUrl
20920
20929
  })) : ( /*#__PURE__*/React.createElement(SelfieCaptureLoadingGraphic, {
20921
20930
  className: classNames.image
20922
- }))), /*#__PURE__*/React.createElement(StyledButtonsRow$5, {
20931
+ }))))), /*#__PURE__*/React.createElement(StyledButtonsRow$5, {
20923
20932
  className: classNames.buttonsRow
20924
20933
  }, /*#__PURE__*/React.createElement(ProgressContainer, {
20925
20934
  className: classNames.progressContainer
@@ -20948,6 +20957,7 @@
20948
20957
  onClick: function onClick() {
20949
20958
  setDismissed(true);
20950
20959
  onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
20960
+ onCustomOverlyDismissed === null || onCustomOverlyDismissed === void 0 ? void 0 : onCustomOverlyDismissed();
20951
20961
  }
20952
20962
  }, verbiage.continueText))))));
20953
20963
  };
@@ -21025,6 +21035,8 @@
21025
21035
  onUserCancel = _a.onUserCancel,
21026
21036
  _e = _a.loadingOverlayMode,
21027
21037
  loadingOverlayMode = _e === void 0 ? 'default' : _e,
21038
+ customOverlayContent = _a.customOverlayContent,
21039
+ onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
21028
21040
  _f = _a.timeoutDurationMs,
21029
21041
  timeoutDurationMs = _f === void 0 ? 15000 : _f,
21030
21042
  _g = _a.maxRetries,
@@ -21222,6 +21234,8 @@
21222
21234
  }()), /*#__PURE__*/React.createElement(SelfieCaptureLoadingOverlay, {
21223
21235
  key: attempt,
21224
21236
  mode: loadingOverlayMode,
21237
+ customOverlayContent: customOverlayContent,
21238
+ onCustomOverlyDismissed: onCustomOverlyDismissed,
21225
21239
  assets: assets.loadingOverlay,
21226
21240
  classNames: classNames.loadingOverlay,
21227
21241
  colors: colors.loadingOverlay,
@@ -22937,8 +22951,10 @@
22937
22951
  onRetryClicked = _a.onRetryClicked,
22938
22952
  onExitCapture = _a.onExitCapture,
22939
22953
  onUserCancel = _a.onUserCancel,
22954
+ onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
22940
22955
  _c = _a.loadingOverlayMode,
22941
22956
  loadingOverlayMode = _c === void 0 ? 'default' : _c,
22957
+ customOverlayContent = _a.customOverlayContent,
22942
22958
  _d = _a.skipSuccessScreen,
22943
22959
  skipSuccessScreen = _d === void 0 ? false : _d,
22944
22960
  _e = _a.assets,
@@ -23110,7 +23126,9 @@
23110
23126
  colors: colors.loadingOverlay,
23111
23127
  verbiage: verbiage.loadingOverlay,
23112
23128
  onDismissed: onLoadingOverlayDismissed,
23113
- onUserCancel: onUserCancel
23129
+ onUserCancel: onUserCancel,
23130
+ customOverlayContent: customOverlayContent,
23131
+ onCustomOverlyDismissed: onCustomOverlyDismissed
23114
23132
  }));
23115
23133
  };
23116
23134
 
@@ -23137,7 +23155,6 @@
23137
23155
  _5 = _a.verbiage,
23138
23156
  rawVerbiage = _5 === void 0 ? {} : _5;
23139
23157
  var cameraRef = React.useContext(CameraStateContext).cameraRef;
23140
- // const imageRef = useRef<HTMLImageElement | null>(null)
23141
23158
  assets.frontImageUrl || (assets.frontImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
23142
23159
  assets.backImageUrl || (assets.backImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
23143
23160
  var verbiage = useTranslations(rawVerbiage, {
@@ -23161,15 +23178,6 @@
23161
23178
  var _9 = React.useState(undefined),
23162
23179
  aspectRatio = _9[0],
23163
23180
  setAspectRatio = _9[1];
23164
- // const imageRef = (img: HTMLImageElement) => {
23165
- // if (!img) return
23166
- // if (typeof aspectRatio === 'number' && aspectRatio > 0) return
23167
- // setAspectRatio(
23168
- // (img.naturalHeight ?? 0) > 0
23169
- // ? img.naturalWidth / img.naturalHeight
23170
- // : undefined,
23171
- // )
23172
- // }
23173
23181
  function onImageLoaded(e) {
23174
23182
  var _a;
23175
23183
  var img = e.currentTarget;
@@ -23922,6 +23930,8 @@
23922
23930
  skipSuccessScreen = _t === void 0 ? false : _t,
23923
23931
  _u = _a.idCaptureLoadingOverlayMode,
23924
23932
  idCaptureLoadingOverlayMode = _u === void 0 ? 'default' : _u,
23933
+ customOverlayContent = _a.customOverlayContent,
23934
+ onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
23925
23935
  _v = _a.idCaptureGuideType,
23926
23936
  idCaptureGuideType = _v === void 0 ? 'fit' : _v,
23927
23937
  _w = _a.idCapturePortraitGuidesOnMobile,
@@ -24074,6 +24084,8 @@
24074
24084
  return /*#__PURE__*/React.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React.createElement(GuideOrientationProvider, null, /*#__PURE__*/React.createElement(IdCaptureWizard, _assign({
24075
24085
  key: "id-capture-".concat(attempt),
24076
24086
  loadingOverlayMode: idCaptureLoadingOverlayMode,
24087
+ customOverlayContent: customOverlayContent,
24088
+ onCustomOverlyDismissed: onCustomOverlyDismissed,
24077
24089
  silentFallback: silentFallback
24078
24090
  }, idCaptureProps, {
24079
24091
  assets: assets.idCapture,
@@ -24094,6 +24106,8 @@
24094
24106
  return /*#__PURE__*/React.createElement(FaceLivenessWizard, _assign({
24095
24107
  key: "face-liveness-".concat(attempt),
24096
24108
  loadingOverlayMode: faceLivenessLoadingOverlayMode,
24109
+ customOverlayContent: customOverlayContent,
24110
+ onCustomOverlyDismissed: onCustomOverlyDismissed,
24097
24111
  silentFallback: silentFallback
24098
24112
  }, faceLivenessProps, {
24099
24113
  onComplete: onFaceCaptureSuccess,
@@ -24619,6 +24633,8 @@
24619
24633
  precapturedDocuments = _a.precapturedDocuments,
24620
24634
  _c = _a.loadingOverlayMode,
24621
24635
  loadingOverlayMode = _c === void 0 ? 'default' : _c,
24636
+ customOverlayContent = _a.customOverlayContent,
24637
+ onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
24622
24638
  _d = _a.idCaptureRequirement,
24623
24639
  idCaptureRequirement = _d === void 0 ? 'idCardOrPassport' : _d,
24624
24640
  _e = _a.separateIdCardCaptureSequence,
@@ -24692,6 +24708,8 @@
24692
24708
  thresholds: idCaptureThresholds,
24693
24709
  skipSuccessScreen: skipSuccessScreen,
24694
24710
  loadingOverlayMode: loadingOverlayMode,
24711
+ customOverlayContent: customOverlayContent,
24712
+ onCustomOverlyDismissed: onCustomOverlyDismissed,
24695
24713
  forceFallbackMode: forceFallbackMode,
24696
24714
  allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
24697
24715
  instructions: instructions,
@@ -24707,7 +24725,7 @@
24707
24725
  verbiage: verbiage,
24708
24726
  debugMode: debugMode
24709
24727
  };
24710
- }, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
24728
+ }, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
24711
24729
  var additionalDocumentCaptureProps = React.useMemo(function () {
24712
24730
  return {
24713
24731
  documents: captureAdditionalDocuments,
@@ -26493,8 +26511,10 @@
26493
26511
  onUserCancel = _a.onUserCancel,
26494
26512
  onModelError = _a.onModelError,
26495
26513
  onCameraAccessDenied = _a.onCameraAccessDenied,
26514
+ onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
26496
26515
  _c = _a.loadingOverlayMode,
26497
26516
  loadingOverlayMode = _c === void 0 ? 'default' : _c,
26517
+ customOverlayContent = _a.customOverlayContent,
26498
26518
  _d = _a.skipSuccessScreen,
26499
26519
  skipSuccessScreen = _d === void 0 ? false : _d,
26500
26520
  idCardForFaceMatch = _a.idCardForFaceMatch,
@@ -26539,6 +26559,8 @@
26539
26559
  onCameraAccessDenied: onCameraAccessDenied,
26540
26560
  videoSignatureCaptureProps: React.useMemo(function () {
26541
26561
  return {
26562
+ customOverlayContent: customOverlayContent,
26563
+ onCustomOverlyDismissed: onCustomOverlyDismissed,
26542
26564
  loadingOverlayMode: loadingOverlayMode,
26543
26565
  skipSuccessScreen: skipSuccessScreen,
26544
26566
  modelLoadTimeoutMs: modelLoadTimeoutMs,
@@ -26549,7 +26571,7 @@
26549
26571
  onModelError: onModelError,
26550
26572
  onUserCancel: onUserCancel
26551
26573
  };
26552
- }, [classNames, colors, debugMode, loadingOverlayMode, modelLoadTimeoutMs, onModelError, onUserCancel, skipSuccessScreen, verbiage])
26574
+ }, [customOverlayContent, onCustomOverlyDismissed, classNames, colors, debugMode, loadingOverlayMode, modelLoadTimeoutMs, onModelError, onUserCancel, skipSuccessScreen, verbiage])
26553
26575
  }))));
26554
26576
  };
26555
26577
 
@@ -26613,6 +26635,8 @@
26613
26635
  skipShowIdCardBack = _j === void 0 ? false : _j,
26614
26636
  _k = _a.idCaptureLoadingOverlayMode,
26615
26637
  idCaptureLoadingOverlayMode = _k === void 0 ? 'default' : _k,
26638
+ customOverlayContent = _a.customOverlayContent,
26639
+ onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
26616
26640
  _l = _a.idCaptureGuideType,
26617
26641
  idCaptureGuideType = _l === void 0 ? 'fit' : _l,
26618
26642
  _m = _a.idCapturePortraitGuidesOnMobile,
@@ -26670,6 +26694,8 @@
26670
26694
  skipIdCapture: skipIdCapture,
26671
26695
  skipShowIdCardBack: skipShowIdCardBack,
26672
26696
  idCaptureLoadingOverlayMode: idCaptureLoadingOverlayMode,
26697
+ customOverlayContent: customOverlayContent,
26698
+ onCustomOverlyDismissed: onCustomOverlyDismissed,
26673
26699
  idCaptureGuideType: idCaptureGuideType,
26674
26700
  idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
26675
26701
  idCaptureRotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
@@ -26684,7 +26710,7 @@
26684
26710
  verbiage: verbiage,
26685
26711
  debugMode: debugMode
26686
26712
  };
26687
- }, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
26713
+ }, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
26688
26714
  var additionalDocumentCaptureProps = React.useMemo(function () {
26689
26715
  return {
26690
26716
  documents: captureAdditionalDocuments,