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.
@@ -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.3.73';
214
+ var webSdkVersion = '2.3.75';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -20205,10 +20205,10 @@
20205
20205
  imageUrl: state.imageUrl
20206
20206
  })), state.captureState !== 'complete' && ( /*#__PURE__*/React.createElement("div", {
20207
20207
  id: "idmission-above-guides-content"
20208
- })), /*#__PURE__*/React.createElement(ExitCaptureButton, {
20208
+ })), (!customOverlayContent || !!customOverlayContent && overlayDismissed) && ( /*#__PURE__*/React.createElement(ExitCaptureButton, {
20209
20209
  onClick: onExit,
20210
20210
  className: (_f = classNames.capture) === null || _f === void 0 ? void 0 : _f.exitCaptureBtn
20211
- }), !overlayDismissed && ( /*#__PURE__*/React.createElement(IdCaptureLoadingOverlay, {
20211
+ })), !overlayDismissed && ( /*#__PURE__*/React.createElement(IdCaptureLoadingOverlay, {
20212
20212
  key: "loading".concat(attempt),
20213
20213
  mode: loadingOverlayMode,
20214
20214
  customOverlayContent: customOverlayContent,
@@ -24057,9 +24057,7 @@
24057
24057
  clearSignatureBtnText: 'Clear',
24058
24058
  acceptSignatureBtnText: 'Accept'
24059
24059
  });
24060
- return /*#__PURE__*/React.createElement(SignaturePadContainer, {
24061
- className: classNames.signaturePadContainer
24062
- }, /*#__PURE__*/React.createElement(SignatureCanvasContainer, {
24060
+ return /*#__PURE__*/React.createElement(SignatureCanvasContainer, {
24063
24061
  className: clsx(classNames.signatureCanvasContainer, disabled && classNames.signatureCanvasContainerDisabled),
24064
24062
  "$disabled": disabled,
24065
24063
  "$headTrackingUnsatisfied": !headTrackingSatisfied
@@ -24109,21 +24107,20 @@
24109
24107
  disabled: !canSubmit,
24110
24108
  onClick: onAcceptBtnClicked,
24111
24109
  finished: true
24112
- }, verbiage.acceptSignatureBtnText))));
24110
+ }, verbiage.acceptSignatureBtnText)));
24113
24111
  }
24114
- 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"])));
24115
- 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) {
24112
+ 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) {
24116
24113
  return props.$disabled ? 'opacity: 0.5; pointer-events: none;' : '';
24117
24114
  }, function (props) {
24118
24115
  return props.$headTrackingUnsatisfied ? 'pointer-events: none;' : '';
24119
24116
  });
24120
- var AcceptBtn = styled(LoaderButton)(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"])));
24121
- 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"])));
24122
- 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) {
24117
+ var AcceptBtn = styled(LoaderButton)(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"])));
24118
+ 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"])));
24119
+ 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) {
24123
24120
  var _a, _b, _c;
24124
24121
  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';
24125
24122
  });
24126
- var templateObject_1$b, templateObject_2$a, templateObject_3$9, templateObject_4$5, templateObject_5$3;
24123
+ var templateObject_1$b, templateObject_2$a, templateObject_3$9, templateObject_4$5;
24127
24124
 
24128
24125
  function VideoSignatureGuides(_a) {
24129
24126
  var onAcceptBtnClicked = _a.onAcceptBtnClicked,
@@ -24140,12 +24137,29 @@
24140
24137
  headTrackingSatisfied = _e === void 0 ? true : _e,
24141
24138
  _f = _a.classNames,
24142
24139
  classNames = _f === void 0 ? {} : _f,
24143
- verbiage = _a.verbiage;
24140
+ verbiage = _a.verbiage,
24141
+ guideToDisplay = _a.guideToDisplay;
24142
+ var _g = React.useState(guideToDisplay ? 'face' : 'both'),
24143
+ mode = _g[0],
24144
+ setMode = _g[1];
24145
+ React.useEffect(function () {
24146
+ var delayedTransition = setTimeout(function () {
24147
+ if (guideToDisplay) setMode(guideToDisplay);
24148
+ }, 2000);
24149
+ return function () {
24150
+ return clearTimeout(delayedTransition);
24151
+ };
24152
+ }, [guideToDisplay]);
24144
24153
  return /*#__PURE__*/React.createElement(Container$3, {
24145
24154
  className: classNames.container
24146
24155
  }, /*#__PURE__*/React.createElement(Inner$1, {
24147
24156
  className: classNames.inner
24148
24157
  }, /*#__PURE__*/React.createElement(FaceGuideContainer$1, {
24158
+ style: {
24159
+ opacity: mode === 'both' || mode === 'face' ? 1 : 0,
24160
+ transitionDelay: '2s',
24161
+ transition: 'opacity 500ms ease-in-out'
24162
+ },
24149
24163
  className: classNames.faceGuideContainer
24150
24164
  }, /*#__PURE__*/React.createElement(StyledSelfieCaptureAnimatedMask, {
24151
24165
  className: classNames.faceGuide,
@@ -24153,7 +24167,14 @@
24153
24167
  borderWidth: faceGuideBorderWidth,
24154
24168
  borderColor: faceGuideBorderColor,
24155
24169
  verticalAlign: "bottom"
24156
- })), /*#__PURE__*/React.createElement(VideoSignaturePad, {
24170
+ })), /*#__PURE__*/React.createElement(SignaturePadContainer, {
24171
+ style: {
24172
+ opacity: mode === 'both' || mode === 'signature' ? 1 : 0,
24173
+ transitionDelay: '2s',
24174
+ transition: 'opacity 500ms ease-in-out'
24175
+ },
24176
+ className: classNames.signaturePadContainer
24177
+ }, /*#__PURE__*/React.createElement(VideoSignaturePad, {
24157
24178
  onAcceptBtnClicked: onAcceptBtnClicked,
24158
24179
  onClearBtnClicked: onClearBtnClicked,
24159
24180
  disabled: requestedAction !== 'CAPTURE_SIGNATURE',
@@ -24161,7 +24182,7 @@
24161
24182
  minSignaturePadPoints: minSignaturePadPoints,
24162
24183
  classNames: classNames,
24163
24184
  verbiage: verbiage
24164
- })));
24185
+ }))));
24165
24186
  }
24166
24187
  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) {
24167
24188
  var _a;
@@ -24170,7 +24191,8 @@
24170
24191
  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"])));
24171
24192
  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"])));
24172
24193
  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"])));
24173
- var templateObject_1$a, templateObject_2$9, templateObject_3$8, templateObject_4$4;
24194
+ 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"])));
24195
+ var templateObject_1$a, templateObject_2$9, templateObject_3$8, templateObject_4$4, templateObject_5$3;
24174
24196
 
24175
24197
  var DEFAULT_MIN_SIGNATURE_PAD_POINTS = 10;
24176
24198
  var DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE = 0.01;
@@ -24612,37 +24634,39 @@
24612
24634
  allowManualSelfieCaptureOnLoadingError = _m === void 0 ? false : _m,
24613
24635
  faceLivenessProps = _a.faceLivenessProps,
24614
24636
  guidesComponent = _a.guidesComponent,
24615
- _o = _a.assets,
24616
- assets = _o === void 0 ? {} : _o,
24617
- _p = _a.classNames,
24618
- classNames = _p === void 0 ? {} : _p,
24619
- _q = _a.colors,
24620
- colors = _q === void 0 ? {} : _q,
24621
- _r = _a.verbiage,
24622
- verbiage = _r === void 0 ? {} : _r,
24623
- _s = _a.debugMode,
24624
- debugMode = _s === void 0 ? false : _s;
24625
- var _t = useSubmissionContext(),
24626
- selfieImage = _t.selfieImage,
24627
- setSelfieImage = _t.setSelfieImage,
24628
- setSignatureData = _t.setSignatureData,
24629
- setSignatureVideoUrl = _t.setSignatureVideoUrl,
24630
- logSelfieCaptureAttempt = _t.logSelfieCaptureAttempt,
24631
- uploadDocument = _t.uploadDocument;
24637
+ _o = _a.showFaceGuideThenSignaturePad,
24638
+ showFaceGuideThenSignaturePad = _o === void 0 ? false : _o,
24639
+ _p = _a.assets,
24640
+ assets = _p === void 0 ? {} : _p,
24641
+ _q = _a.classNames,
24642
+ classNames = _q === void 0 ? {} : _q,
24643
+ _r = _a.colors,
24644
+ colors = _r === void 0 ? {} : _r,
24645
+ _s = _a.verbiage,
24646
+ verbiage = _s === void 0 ? {} : _s,
24647
+ _t = _a.debugMode,
24648
+ debugMode = _t === void 0 ? false : _t;
24649
+ var _u = useSubmissionContext(),
24650
+ selfieImage = _u.selfieImage,
24651
+ setSelfieImage = _u.setSelfieImage,
24652
+ setSignatureData = _u.setSignatureData,
24653
+ setSignatureVideoUrl = _u.setSignatureVideoUrl,
24654
+ logSelfieCaptureAttempt = _u.logSelfieCaptureAttempt,
24655
+ uploadDocument = _u.uploadDocument;
24632
24656
  var cameraAccessDenied = useCameraStore(useShallow(function (state) {
24633
24657
  return {
24634
24658
  cameraAccessDenied: state.cameraAccessDenied
24635
24659
  };
24636
24660
  })).cameraAccessDenied;
24637
- var _u = React.useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
24638
- captureState = _u[0],
24639
- setCaptureState = _u[1];
24661
+ var _v = React.useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
24662
+ captureState = _v[0],
24663
+ setCaptureState = _v[1];
24640
24664
  var operationStartedAt = React.useRef();
24641
24665
  var captureStartedAt = React.useRef();
24642
24666
  var captureEndedAt = React.useRef();
24643
- var _v = useSelfieGuidanceModelsContext(),
24644
- start = _v.start,
24645
- stop = _v.stop;
24667
+ var _w = useSelfieGuidanceModelsContext(),
24668
+ start = _w.start,
24669
+ stop = _w.stop;
24646
24670
  React.useEffect(function () {
24647
24671
  operationStartedAt.current = new Date();
24648
24672
  }, []);
@@ -24692,17 +24716,17 @@
24692
24716
  setCaptureState('SUCCESS');
24693
24717
  onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
24694
24718
  }, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
24695
- var _w = React.useState(true),
24696
- showLoadingOverlay = _w[0],
24697
- setShowLoadingOverlay = _w[1];
24719
+ var _x = React.useState(true),
24720
+ showLoadingOverlay = _x[0],
24721
+ setShowLoadingOverlay = _x[1];
24698
24722
  var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
24699
24723
  setShowLoadingOverlay(false);
24700
24724
  setCaptureState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS');
24701
24725
  useVideoSignatureStore.getState().clearRecordedData();
24702
24726
  }, [skipLivenessValidation]);
24703
- var _x = React.useState(0),
24704
- attempt = _x[0],
24705
- setAttempt = _x[1];
24727
+ var _y = React.useState(0),
24728
+ attempt = _y[0],
24729
+ setAttempt = _y[1];
24706
24730
  var onRetry = React.useCallback(function () {
24707
24731
  onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
24708
24732
  setAttempt(function (n) {
@@ -24733,7 +24757,8 @@
24733
24757
  verbiage: verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides,
24734
24758
  restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
24735
24759
  captureAudio: captureAudio,
24736
- component: guidesComponent
24760
+ component: guidesComponent,
24761
+ showFaceGuideThenSignaturePad: showFaceGuideThenSignaturePad
24737
24762
  }));
24738
24763
  }, [captureAudio, classNames === null || classNames === void 0 ? void 0 : classNames.guides, guidesComponent, restartVideoOnSignaturePadCleared, verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides]);
24739
24764
  var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
@@ -24842,7 +24867,9 @@
24842
24867
  _c = _a.captureAudio,
24843
24868
  captureAudio = _c === void 0 ? false : _c,
24844
24869
  component = _a.component,
24845
- props = __rest(_a, ["status", "restartVideoOnSignaturePadCleared", "captureAudio", "component"]);
24870
+ _d = _a.showFaceGuideThenSignaturePad,
24871
+ showFaceGuideThenSignaturePad = _d === void 0 ? false : _d,
24872
+ props = __rest(_a, ["status", "restartVideoOnSignaturePadCleared", "captureAudio", "component", "showFaceGuideThenSignaturePad"]);
24846
24873
  var Component = component !== null && component !== void 0 ? component : VideoSignatureGuides;
24847
24874
  var onAcceptBtnClicked = React.useCallback(function () {
24848
24875
  var signaturePad = useVideoSignatureStore.getState().signaturePad;
@@ -24874,7 +24901,8 @@
24874
24901
  faceGuideStatus: status,
24875
24902
  onAcceptBtnClicked: onAcceptBtnClicked,
24876
24903
  onClearBtnClicked: onClearBtnClicked,
24877
- requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS'
24904
+ requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS',
24905
+ guideToDisplay: !showFaceGuideThenSignaturePad ? undefined : status === 'success' ? 'signature' : 'face'
24878
24906
  }));
24879
24907
  }
24880
24908
  var VideoSignatureWizardWithProviders = function VideoSignatureWizardWithProviders(props) {
@@ -28655,15 +28683,17 @@
28655
28683
  _p = _a.allowManualSelfieCaptureOnLoadingError,
28656
28684
  allowManualSelfieCaptureOnLoadingError = _p === void 0 ? false : _p,
28657
28685
  guidesComponent = _a.guidesComponent,
28658
- _q = _a.theme,
28659
- theme = _q === void 0 ? 'default' : _q,
28686
+ _q = _a.showFaceGuideThenSignaturePad,
28687
+ showFaceGuideThenSignaturePad = _q === void 0 ? false : _q,
28688
+ _r = _a.theme,
28689
+ theme = _r === void 0 ? 'default' : _r,
28660
28690
  classNames = _a.classNames,
28661
28691
  colors = _a.colors,
28662
28692
  verbiage = _a.verbiage,
28663
28693
  geolocationEnabled = _a.geolocationEnabled,
28664
28694
  geolocationRequired = _a.geolocationRequired,
28665
- _r = _a.debugMode,
28666
- debugMode = _r === void 0 ? false : _r;
28695
+ _s = _a.debugMode,
28696
+ debugMode = _s === void 0 ? false : _s;
28667
28697
  useLanguage(lang);
28668
28698
  useDebugLogging(debugMode);
28669
28699
  return /*#__PURE__*/React.createElement(AuthProvider, {
@@ -28724,6 +28754,7 @@
28724
28754
  skipLivenessValidation: skipLivenessValidation,
28725
28755
  allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
28726
28756
  guidesComponent: guidesComponent,
28757
+ showFaceGuideThenSignaturePad: showFaceGuideThenSignaturePad,
28727
28758
  classNames: classNames,
28728
28759
  colors: colors,
28729
28760
  debugMode: debugMode,
@@ -28731,7 +28762,7 @@
28731
28762
  onModelError: onModelError,
28732
28763
  onUserCancel: onUserCancel
28733
28764
  };
28734
- }, [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])
28765
+ }, [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])
28735
28766
  })))));
28736
28767
  };
28737
28768