idmission-web-sdk 2.3.73 → 2.3.75

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.
package/dist/sdk2.esm.js CHANGED
@@ -205,7 +205,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
205
205
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
206
206
  };
207
207
 
208
- var webSdkVersion = '2.3.73';
208
+ var webSdkVersion = '2.3.75';
209
209
 
210
210
  function getPlatform() {
211
211
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -10891,10 +10891,10 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
10891
10891
  imageUrl: state.imageUrl
10892
10892
  })), state.captureState !== 'complete' && ( /*#__PURE__*/React__default.createElement("div", {
10893
10893
  id: "idmission-above-guides-content"
10894
- })), /*#__PURE__*/React__default.createElement(ExitCaptureButton, {
10894
+ })), (!customOverlayContent || !!customOverlayContent && overlayDismissed) && ( /*#__PURE__*/React__default.createElement(ExitCaptureButton, {
10895
10895
  onClick: onExit,
10896
10896
  className: (_f = classNames.capture) === null || _f === void 0 ? void 0 : _f.exitCaptureBtn
10897
- }), !overlayDismissed && ( /*#__PURE__*/React__default.createElement(IdCaptureLoadingOverlay, {
10897
+ })), !overlayDismissed && ( /*#__PURE__*/React__default.createElement(IdCaptureLoadingOverlay, {
10898
10898
  key: "loading".concat(attempt),
10899
10899
  mode: loadingOverlayMode,
10900
10900
  customOverlayContent: customOverlayContent,
@@ -13975,9 +13975,7 @@ function VideoSignaturePad(_a) {
13975
13975
  clearSignatureBtnText: 'Clear',
13976
13976
  acceptSignatureBtnText: 'Accept'
13977
13977
  });
13978
- return /*#__PURE__*/React__default.createElement(SignaturePadContainer, {
13979
- className: classNames.signaturePadContainer
13980
- }, /*#__PURE__*/React__default.createElement(SignatureCanvasContainer, {
13978
+ return /*#__PURE__*/React__default.createElement(SignatureCanvasContainer, {
13981
13979
  className: cn(classNames.signatureCanvasContainer, disabled && classNames.signatureCanvasContainerDisabled),
13982
13980
  "$disabled": disabled,
13983
13981
  "$headTrackingUnsatisfied": !headTrackingSatisfied
@@ -14027,21 +14025,20 @@ function VideoSignaturePad(_a) {
14027
14025
  disabled: !canSubmit,
14028
14026
  onClick: onAcceptBtnClicked,
14029
14027
  finished: true
14030
- }, verbiage.acceptSignatureBtnText))));
14028
+ }, verbiage.acceptSignatureBtnText)));
14031
14029
  }
14032
- var SignaturePadContainer = styled.div(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n position: relative;\n max-width: 100%;\n height: 50%;\n aspect-ratio: 2;\n"], ["\n position: relative;\n max-width: 100%;\n height: 50%;\n aspect-ratio: 2;\n"])));
14033
- var SignatureCanvasContainer = styled.div(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: calc(100% - 67px);\n ", "\n ", "\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: calc(100% - 67px);\n ", "\n ", "\n"])), function (props) {
14030
+ var SignatureCanvasContainer = styled.div(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: calc(100% - 67px);\n ", "\n ", "\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: calc(100% - 67px);\n ", "\n ", "\n"])), function (props) {
14034
14031
  return props.$disabled ? 'opacity: 0.5; pointer-events: none;' : '';
14035
14032
  }, function (props) {
14036
14033
  return props.$headTrackingUnsatisfied ? 'pointer-events: none;' : '';
14037
14034
  });
14038
- var AcceptBtn = styled(LoaderButton)(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"])));
14039
- var SignaturePadContentContainer = styled.div(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
14040
- var SignaturePadContentInner = styled.div(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"])), function (props) {
14035
+ var AcceptBtn = styled(LoaderButton)(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"])));
14036
+ var SignaturePadContentContainer = styled.div(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
14037
+ var SignaturePadContentInner = styled.div(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"])), function (props) {
14041
14038
  var _a, _b, _c;
14042
14039
  return (_c = (_b = (_a = props.theme.signatureCapture) === null || _a === void 0 ? void 0 : _a.canvas) === null || _b === void 0 ? void 0 : _b.emptyTextColor) !== null && _c !== void 0 ? _c : 'black';
14043
14040
  });
14044
- var templateObject_1$b, templateObject_2$a, templateObject_3$9, templateObject_4$5, templateObject_5$3;
14041
+ var templateObject_1$b, templateObject_2$a, templateObject_3$9, templateObject_4$5;
14045
14042
 
14046
14043
  function VideoSignatureGuides(_a) {
14047
14044
  var onAcceptBtnClicked = _a.onAcceptBtnClicked,
@@ -14058,12 +14055,29 @@ function VideoSignatureGuides(_a) {
14058
14055
  headTrackingSatisfied = _e === void 0 ? true : _e,
14059
14056
  _f = _a.classNames,
14060
14057
  classNames = _f === void 0 ? {} : _f,
14061
- verbiage = _a.verbiage;
14058
+ verbiage = _a.verbiage,
14059
+ guideToDisplay = _a.guideToDisplay;
14060
+ var _g = useState(guideToDisplay ? 'face' : 'both'),
14061
+ mode = _g[0],
14062
+ setMode = _g[1];
14063
+ useEffect(function () {
14064
+ var delayedTransition = setTimeout(function () {
14065
+ if (guideToDisplay) setMode(guideToDisplay);
14066
+ }, 2000);
14067
+ return function () {
14068
+ return clearTimeout(delayedTransition);
14069
+ };
14070
+ }, [guideToDisplay]);
14062
14071
  return /*#__PURE__*/React__default.createElement(Container$3, {
14063
14072
  className: classNames.container
14064
14073
  }, /*#__PURE__*/React__default.createElement(Inner$1, {
14065
14074
  className: classNames.inner
14066
14075
  }, /*#__PURE__*/React__default.createElement(FaceGuideContainer$1, {
14076
+ style: {
14077
+ opacity: mode === 'both' || mode === 'face' ? 1 : 0,
14078
+ transitionDelay: '2s',
14079
+ transition: 'opacity 500ms ease-in-out'
14080
+ },
14067
14081
  className: classNames.faceGuideContainer
14068
14082
  }, /*#__PURE__*/React__default.createElement(StyledSelfieCaptureAnimatedMask, {
14069
14083
  className: classNames.faceGuide,
@@ -14071,7 +14085,14 @@ function VideoSignatureGuides(_a) {
14071
14085
  borderWidth: faceGuideBorderWidth,
14072
14086
  borderColor: faceGuideBorderColor,
14073
14087
  verticalAlign: "bottom"
14074
- })), /*#__PURE__*/React__default.createElement(VideoSignaturePad, {
14088
+ })), /*#__PURE__*/React__default.createElement(SignaturePadContainer, {
14089
+ style: {
14090
+ opacity: mode === 'both' || mode === 'signature' ? 1 : 0,
14091
+ transitionDelay: '2s',
14092
+ transition: 'opacity 500ms ease-in-out'
14093
+ },
14094
+ className: classNames.signaturePadContainer
14095
+ }, /*#__PURE__*/React__default.createElement(VideoSignaturePad, {
14075
14096
  onAcceptBtnClicked: onAcceptBtnClicked,
14076
14097
  onClearBtnClicked: onClearBtnClicked,
14077
14098
  disabled: requestedAction !== 'CAPTURE_SIGNATURE',
@@ -14079,7 +14100,7 @@ function VideoSignatureGuides(_a) {
14079
14100
  minSignaturePadPoints: minSignaturePadPoints,
14080
14101
  classNames: classNames,
14081
14102
  verbiage: verbiage
14082
- })));
14103
+ }))));
14083
14104
  }
14084
14105
  var Container$3 = styled.div(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n display: flex;\n max-height: 100%;\n position: absolute;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n font-family: ", ";\n box-sizing: border-box;\n overflow: hidden;\n padding: 40px;\n"], ["\n display: flex;\n max-height: 100%;\n position: absolute;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n font-family: ", ";\n box-sizing: border-box;\n overflow: hidden;\n padding: 40px;\n"])), function (props) {
14085
14106
  var _a;
@@ -14088,7 +14109,8 @@ var Container$3 = styled.div(templateObject_1$a || (templateObject_1$a = __makeT
14088
14109
  var Inner$1 = styled.div(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n max-height: 1280px;\n display: flex;\n margin: auto;\n align-items: center;\n flex-direction: column;\n"], ["\n width: 100%;\n height: 100%;\n max-height: 1280px;\n display: flex;\n margin: auto;\n align-items: center;\n flex-direction: column;\n"])));
14089
14110
  var FaceGuideContainer$1 = styled.div(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n position: relative;\n height: 50%;\n"], ["\n position: relative;\n height: 50%;\n"])));
14090
14111
  var StyledSelfieCaptureAnimatedMask = styled(SelfieCaptureAnimatedMaskWithStatus)(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n max-width: 100%;\n height: 100%;\n"], ["\n max-width: 100%;\n height: 100%;\n"])));
14091
- var templateObject_1$a, templateObject_2$9, templateObject_3$8, templateObject_4$4;
14112
+ var SignaturePadContainer = styled.div(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n position: relative;\n max-width: 100%;\n height: 50%;\n aspect-ratio: 2;\n"], ["\n position: relative;\n max-width: 100%;\n height: 50%;\n aspect-ratio: 2;\n"])));
14113
+ var templateObject_1$a, templateObject_2$9, templateObject_3$8, templateObject_4$4, templateObject_5$3;
14092
14114
 
14093
14115
  var DEFAULT_MIN_SIGNATURE_PAD_POINTS = 10;
14094
14116
  var DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE = 0.01;
@@ -14530,37 +14552,39 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
14530
14552
  allowManualSelfieCaptureOnLoadingError = _m === void 0 ? false : _m,
14531
14553
  faceLivenessProps = _a.faceLivenessProps,
14532
14554
  guidesComponent = _a.guidesComponent,
14533
- _o = _a.assets,
14534
- assets = _o === void 0 ? {} : _o,
14535
- _p = _a.classNames,
14536
- classNames = _p === void 0 ? {} : _p,
14537
- _q = _a.colors,
14538
- colors = _q === void 0 ? {} : _q,
14539
- _r = _a.verbiage,
14540
- verbiage = _r === void 0 ? {} : _r,
14541
- _s = _a.debugMode,
14542
- debugMode = _s === void 0 ? false : _s;
14543
- var _t = useSubmissionContext(),
14544
- selfieImage = _t.selfieImage,
14545
- setSelfieImage = _t.setSelfieImage,
14546
- setSignatureData = _t.setSignatureData,
14547
- setSignatureVideoUrl = _t.setSignatureVideoUrl,
14548
- logSelfieCaptureAttempt = _t.logSelfieCaptureAttempt,
14549
- uploadDocument = _t.uploadDocument;
14555
+ _o = _a.showFaceGuideThenSignaturePad,
14556
+ showFaceGuideThenSignaturePad = _o === void 0 ? false : _o,
14557
+ _p = _a.assets,
14558
+ assets = _p === void 0 ? {} : _p,
14559
+ _q = _a.classNames,
14560
+ classNames = _q === void 0 ? {} : _q,
14561
+ _r = _a.colors,
14562
+ colors = _r === void 0 ? {} : _r,
14563
+ _s = _a.verbiage,
14564
+ verbiage = _s === void 0 ? {} : _s,
14565
+ _t = _a.debugMode,
14566
+ debugMode = _t === void 0 ? false : _t;
14567
+ var _u = useSubmissionContext(),
14568
+ selfieImage = _u.selfieImage,
14569
+ setSelfieImage = _u.setSelfieImage,
14570
+ setSignatureData = _u.setSignatureData,
14571
+ setSignatureVideoUrl = _u.setSignatureVideoUrl,
14572
+ logSelfieCaptureAttempt = _u.logSelfieCaptureAttempt,
14573
+ uploadDocument = _u.uploadDocument;
14550
14574
  var cameraAccessDenied = useCameraStore(useShallow(function (state) {
14551
14575
  return {
14552
14576
  cameraAccessDenied: state.cameraAccessDenied
14553
14577
  };
14554
14578
  })).cameraAccessDenied;
14555
- var _u = useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
14556
- captureState = _u[0],
14557
- setCaptureState = _u[1];
14579
+ var _v = useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
14580
+ captureState = _v[0],
14581
+ setCaptureState = _v[1];
14558
14582
  var operationStartedAt = useRef();
14559
14583
  var captureStartedAt = useRef();
14560
14584
  var captureEndedAt = useRef();
14561
- var _v = useSelfieGuidanceModelsContext(),
14562
- start = _v.start,
14563
- stop = _v.stop;
14585
+ var _w = useSelfieGuidanceModelsContext(),
14586
+ start = _w.start,
14587
+ stop = _w.stop;
14564
14588
  useEffect(function () {
14565
14589
  operationStartedAt.current = new Date();
14566
14590
  }, []);
@@ -14610,17 +14634,17 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
14610
14634
  setCaptureState('SUCCESS');
14611
14635
  onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
14612
14636
  }, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
14613
- var _w = useState(true),
14614
- showLoadingOverlay = _w[0],
14615
- setShowLoadingOverlay = _w[1];
14637
+ var _x = useState(true),
14638
+ showLoadingOverlay = _x[0],
14639
+ setShowLoadingOverlay = _x[1];
14616
14640
  var onSignatureCaptureFacesNotDetected = useCallback(function () {
14617
14641
  setShowLoadingOverlay(false);
14618
14642
  setCaptureState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS');
14619
14643
  useVideoSignatureStore.getState().clearRecordedData();
14620
14644
  }, [skipLivenessValidation]);
14621
- var _x = useState(0),
14622
- attempt = _x[0],
14623
- setAttempt = _x[1];
14645
+ var _y = useState(0),
14646
+ attempt = _y[0],
14647
+ setAttempt = _y[1];
14624
14648
  var onRetry = useCallback(function () {
14625
14649
  onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
14626
14650
  setAttempt(function (n) {
@@ -14651,7 +14675,8 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
14651
14675
  verbiage: verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides,
14652
14676
  restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
14653
14677
  captureAudio: captureAudio,
14654
- component: guidesComponent
14678
+ component: guidesComponent,
14679
+ showFaceGuideThenSignaturePad: showFaceGuideThenSignaturePad
14655
14680
  }));
14656
14681
  }, [captureAudio, classNames === null || classNames === void 0 ? void 0 : classNames.guides, guidesComponent, restartVideoOnSignaturePadCleared, verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides]);
14657
14682
  var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
@@ -14760,7 +14785,9 @@ function VideoSignatureWizardGuides(_a) {
14760
14785
  _c = _a.captureAudio,
14761
14786
  captureAudio = _c === void 0 ? false : _c,
14762
14787
  component = _a.component,
14763
- props = __rest(_a, ["status", "restartVideoOnSignaturePadCleared", "captureAudio", "component"]);
14788
+ _d = _a.showFaceGuideThenSignaturePad,
14789
+ showFaceGuideThenSignaturePad = _d === void 0 ? false : _d,
14790
+ props = __rest(_a, ["status", "restartVideoOnSignaturePadCleared", "captureAudio", "component", "showFaceGuideThenSignaturePad"]);
14764
14791
  var Component = component !== null && component !== void 0 ? component : VideoSignatureGuides;
14765
14792
  var onAcceptBtnClicked = useCallback(function () {
14766
14793
  var signaturePad = useVideoSignatureStore.getState().signaturePad;
@@ -14792,7 +14819,8 @@ function VideoSignatureWizardGuides(_a) {
14792
14819
  faceGuideStatus: status,
14793
14820
  onAcceptBtnClicked: onAcceptBtnClicked,
14794
14821
  onClearBtnClicked: onClearBtnClicked,
14795
- requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS'
14822
+ requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS',
14823
+ guideToDisplay: !showFaceGuideThenSignaturePad ? undefined : status === 'success' ? 'signature' : 'face'
14796
14824
  }));
14797
14825
  }
14798
14826
  var VideoSignatureWizardWithProviders = function VideoSignatureWizardWithProviders(props) {
@@ -18573,15 +18601,17 @@ var SignatureKYC = function SignatureKYC(_a) {
18573
18601
  _p = _a.allowManualSelfieCaptureOnLoadingError,
18574
18602
  allowManualSelfieCaptureOnLoadingError = _p === void 0 ? false : _p,
18575
18603
  guidesComponent = _a.guidesComponent,
18576
- _q = _a.theme,
18577
- theme = _q === void 0 ? 'default' : _q,
18604
+ _q = _a.showFaceGuideThenSignaturePad,
18605
+ showFaceGuideThenSignaturePad = _q === void 0 ? false : _q,
18606
+ _r = _a.theme,
18607
+ theme = _r === void 0 ? 'default' : _r,
18578
18608
  classNames = _a.classNames,
18579
18609
  colors = _a.colors,
18580
18610
  verbiage = _a.verbiage,
18581
18611
  geolocationEnabled = _a.geolocationEnabled,
18582
18612
  geolocationRequired = _a.geolocationRequired,
18583
- _r = _a.debugMode,
18584
- debugMode = _r === void 0 ? false : _r;
18613
+ _s = _a.debugMode,
18614
+ debugMode = _s === void 0 ? false : _s;
18585
18615
  useLanguage(lang);
18586
18616
  useDebugLogging(debugMode);
18587
18617
  return /*#__PURE__*/React__default.createElement(AuthProvider, {
@@ -18642,6 +18672,7 @@ var SignatureKYC = function SignatureKYC(_a) {
18642
18672
  skipLivenessValidation: skipLivenessValidation,
18643
18673
  allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
18644
18674
  guidesComponent: guidesComponent,
18675
+ showFaceGuideThenSignaturePad: showFaceGuideThenSignaturePad,
18645
18676
  classNames: classNames,
18646
18677
  colors: colors,
18647
18678
  debugMode: debugMode,
@@ -18649,7 +18680,7 @@ var SignatureKYC = function SignatureKYC(_a) {
18649
18680
  onModelError: onModelError,
18650
18681
  onUserCancel: onUserCancel
18651
18682
  };
18652
- }, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
18683
+ }, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, showFaceGuideThenSignaturePad, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
18653
18684
  })))));
18654
18685
  };
18655
18686