idmission-web-sdk 2.1.78 → 2.1.80

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.
@@ -80,7 +80,7 @@ export interface IdValidationProps extends PropsWithChildren {
80
80
  /** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
81
81
  loadingOverlayMode?: IdCaptureLoadingOverlayMode;
82
82
  /** React component to render if the warmup overlay needs to be completely replaced. Note that 100px padding should be applied to the bottom as the loading progress will be displayed over this content. **/
83
- customOverlayContent?: () => ReactNode;
83
+ customOverlayContent?: ReactNode;
84
84
  /** String to indicate which types of documents should be captured. Valid values: `idCard`, `passport`, `idCardOrPassport`, `idCardAndPassport`. Default is `idCardOrPassport`. */
85
85
  idCaptureRequirement?: IdCaptureRequirementOption;
86
86
  /** Boolean to indicate whether the success screen should be shown in after the ID card front is captured, rather than the flip animation. Defaults to `false`. */
@@ -45,7 +45,7 @@ export interface SignatureKYCProps extends PropsWithChildren {
45
45
  /** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
46
46
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
47
47
  /** React component to render if the warmup overlay needs to be completely replaced. Note that 100px padding should be applied to the bottom as the loading progress will be displayed over this content. **/
48
- customOverlayContent?: () => ReactNode;
48
+ customOverlayContent?: ReactNode;
49
49
  /** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
50
50
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
51
51
  /** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
@@ -131,7 +131,7 @@ export interface VideoIdValidationProps extends PropsWithChildren {
131
131
  /** Boolean or async function to indicate whether to instruct the user to show the back of their ID card during video capture. If an async function is supplied returning a boolean, it will be evaluated at the time of ID front video capture completion. Defaults to `false`. */
132
132
  skipShowIdCardBack?: boolean | (() => Promise<boolean>);
133
133
  /** React component to render if the warmup overlay needs to be completely replaced. Note that 100px padding should be applied to the bottom as the loading progress will be displayed over this content. **/
134
- customOverlayContent?: () => ReactNode;
134
+ customOverlayContent?: ReactNode;
135
135
  /** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
136
136
  idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
137
137
  /** String to indicate what type of guides to use during capture. Using `fit` is highly recommended in order to capture the best quality image. Valid values: `fit`, `overlay`. Defaults to `fit`. */
@@ -35,7 +35,7 @@ export type FaceLivenessWizardProps = {
35
35
  onModelError?: (error: Error) => void;
36
36
  onCustomOverlayDismissed?: () => void;
37
37
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
38
- customOverlayContent?: () => ReactNode;
38
+ customOverlayContent?: ReactNode;
39
39
  timeoutDurationMs?: number;
40
40
  modelLoadTimeoutMs?: number;
41
41
  maxRetries?: number;
@@ -54,7 +54,7 @@ export type IdCaptureLoadingOverlayProps = {
54
54
  classNames?: IdCaptureLoadingOverlayClassNames;
55
55
  colors?: IdCaptureLoadingOverlayColors;
56
56
  verbiage?: IdCaptureLoadingOverlayVerbiage;
57
- customOverlayContent?: () => ReactNode;
57
+ customOverlayContent?: ReactNode;
58
58
  };
59
59
  export type IdCaptureLoadingOverlayMode = 'default' | 'legacy';
60
60
  export declare const IdCaptureLoadingOverlay: ({ mode, ...props }: IdCaptureLoadingOverlayProps & {
@@ -49,7 +49,7 @@ export type IdCaptureWizardProps = {
49
49
  onModelError?: (error: Error) => void;
50
50
  onCustomOverlayDismissed?: () => void;
51
51
  loadingOverlayMode?: IdCaptureLoadingOverlayMode;
52
- customOverlayContent?: () => ReactNode;
52
+ customOverlayContent?: ReactNode;
53
53
  modelLoadTimeoutMs?: number;
54
54
  precapturedDocuments?: CapturedDocuments;
55
55
  captureRequirement?: IdCaptureRequirementOption;
@@ -55,7 +55,7 @@ export type SelfieCaptureLoadingOverlayProps = {
55
55
  classNames?: SelfieCaptureLoadingOverlayClassNames;
56
56
  colors?: SelfieCaptureLoadingOverlayColors;
57
57
  verbiage?: SelfieCaptureLoadingOverlayVerbiage;
58
- customOverlayContent?: () => ReactNode;
58
+ customOverlayContent?: ReactNode;
59
59
  };
60
60
  export type SelfieCaptureLoadingOverlayMode = 'default' | 'legacy';
61
61
  export declare const SelfieCaptureLoadingOverlay: ({ mode, ...props }: SelfieCaptureLoadingOverlayProps & {
@@ -53,7 +53,7 @@ export type VideoIdWizardProps = {
53
53
  skipIdCapture?: boolean;
54
54
  skipShowIdCardBack?: boolean | (() => Promise<boolean>);
55
55
  idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
56
- customOverlayContent?: () => ReactNode;
56
+ customOverlayContent?: ReactNode;
57
57
  idCaptureGuideType?: IdCaptureGuideType;
58
58
  idCaptureGuideImages?: IdCaptureGuideImages;
59
59
  idCapturePortraitGuidesOnMobile?: boolean;
@@ -32,7 +32,7 @@ export type VideoSignatureWizardProps = {
32
32
  onModelError?: (error: Error) => void;
33
33
  onCustomOverlayDismissed?: () => void;
34
34
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
35
- customOverlayContent?: () => ReactNode;
35
+ customOverlayContent?: ReactNode;
36
36
  modelLoadTimeoutMs?: number;
37
37
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
38
38
  assets?: VideoSignatureAssets;
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
234
234
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
235
235
  };
236
236
 
237
- var webSdkVersion = '2.1.78';
237
+ var webSdkVersion = '2.1.80';
238
238
 
239
239
  function getPlatform() {
240
240
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -7918,7 +7918,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
7918
7918
  }, onUserCancel && ( /*#__PURE__*/React__namespace.default.createElement(ExitCaptureButton, {
7919
7919
  onClick: onUserCancel,
7920
7920
  className: classNames.cancelBtn
7921
- })), customOverlayContent ? customOverlayContent() : ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(OverlayHeader$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledGuidanceMessage$2, {
7921
+ })), customOverlayContent || ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(OverlayHeader$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledGuidanceMessage$2, {
7922
7922
  className: classNames.heading
7923
7923
  }, verbiage.headingText)), /*#__PURE__*/React__namespace.default.createElement(StyledOverlayImageContainer$2, {
7924
7924
  className: classNames.imageContainer,
@@ -12285,7 +12285,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
12285
12285
  }, onUserCancel && ( /*#__PURE__*/React__namespace.default.createElement(ExitCaptureButton, {
12286
12286
  onClick: onUserCancel,
12287
12287
  className: classNames.cancelBtn
12288
- })), customOverlayContent ? customOverlayContent() : ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(OverlayHeader, {
12288
+ })), customOverlayContent || ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(OverlayHeader, {
12289
12289
  className: classNames.headingContainer
12290
12290
  }, /*#__PURE__*/React__namespace.default.createElement(StyledGuidanceMessage, {
12291
12291
  className: classNames.heading
@@ -13701,26 +13701,26 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
13701
13701
  };
13702
13702
 
13703
13703
  var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
13704
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
13705
- var _y = _a.requestedAction,
13706
- requestedAction = _y === void 0 ? 'SHOW_ID_FRONT' : _y,
13707
- _z = _a.satisfied,
13708
- satisfied = _z === void 0 ? false : _z,
13709
- _0 = _a.faceGuideStatus,
13710
- faceGuideStatus = _0 === void 0 ? 'success' : _0,
13704
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
13705
+ var _0 = _a.requestedAction,
13706
+ requestedAction = _0 === void 0 ? 'SHOW_ID_FRONT' : _0,
13707
+ _1 = _a.satisfied,
13708
+ satisfied = _1 === void 0 ? false : _1,
13709
+ _2 = _a.faceGuideStatus,
13710
+ faceGuideStatus = _2 === void 0 ? 'success' : _2,
13711
13711
  faceGuideBorderWidth = _a.faceGuideBorderWidth,
13712
13712
  faceGuideBorderColor = _a.faceGuideBorderColor,
13713
- _1 = _a.idCardGuideStatus,
13714
- idCardGuideStatus = _1 === void 0 ? 'ready' : _1,
13713
+ _3 = _a.idCardGuideStatus,
13714
+ idCardGuideStatus = _3 === void 0 ? 'ready' : _3,
13715
13715
  idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
13716
13716
  idCardGuideBorderColor = _a.idCardGuideBorderColor,
13717
13717
  idCardCaptureProgress = _a.idCardCaptureProgress,
13718
- _2 = _a.idCardCaptureGuideImages,
13719
- userSuppliedImages = _2 === void 0 ? defaultIdCaptureGuideImages : _2,
13720
- _3 = _a.classNames,
13721
- classNames = _3 === void 0 ? {} : _3,
13722
- _4 = _a.verbiage,
13723
- rawVerbiage = _4 === void 0 ? {} : _4;
13718
+ _4 = _a.idCardCaptureGuideImages,
13719
+ userSuppliedImages = _4 === void 0 ? defaultIdCaptureGuideImages : _4,
13720
+ _5 = _a.classNames,
13721
+ classNames = _5 === void 0 ? {} : _5,
13722
+ _6 = _a.verbiage,
13723
+ rawVerbiage = _6 === void 0 ? {} : _6;
13724
13724
  var cameraRef = React.useContext(CameraStateContext).cameraRef;
13725
13725
  var verbiage = useTranslations(rawVerbiage, {
13726
13726
  idFrontInstructionText: 'Display the front of your ID card...',
@@ -13734,17 +13734,17 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
13734
13734
  if (faceGuideBorderColor === undefined) faceGuideBorderColor = (_j = satisfied ? (_f = (_e = theme.idVideoCapture) === null || _e === void 0 ? void 0 : _e.faceGuides) === null || _f === void 0 ? void 0 : _f.satisfiedColor : (_h = (_g = theme.idVideoCapture) === null || _g === void 0 ? void 0 : _g.faceGuides) === null || _h === void 0 ? void 0 : _h.unsatisfiedColor) !== null && _j !== void 0 ? _j : '#D6DCE7';
13735
13735
  if (idCardGuideBorderWidth === undefined) idCardGuideBorderWidth = (_m = (_l = (_k = theme.idVideoCapture) === null || _k === void 0 ? void 0 : _k.idCardGuides) === null || _l === void 0 ? void 0 : _l.borderWidth) !== null && _m !== void 0 ? _m : 20;
13736
13736
  if (idCardGuideBorderColor === undefined) idCardGuideBorderColor = (_s = satisfied ? (_p = (_o = theme.idVideoCapture) === null || _o === void 0 ? void 0 : _o.idCardGuides) === null || _p === void 0 ? void 0 : _p.satisfiedColor : (_r = (_q = theme.idVideoCapture) === null || _q === void 0 ? void 0 : _q.idCardGuides) === null || _r === void 0 ? void 0 : _r.unsatisfiedColor) !== null && _s !== void 0 ? _s : '#D6DCE7';
13737
- var _5 = useResizeObserver__default.default(),
13738
- idCardGuideRef = _5.ref,
13739
- _6 = _5.width,
13740
- idCardGuideWidth = _6 === void 0 ? 0 : _6,
13741
- _7 = _5.height,
13742
- idCardGuideHeight = _7 === void 0 ? 0 : _7;
13737
+ var _7 = useResizeObserver__default.default(),
13738
+ idCardGuideRef = _7.ref,
13739
+ _8 = _7.width,
13740
+ idCardGuideWidth = _8 === void 0 ? 0 : _8,
13741
+ _9 = _7.height,
13742
+ idCardGuideHeight = _9 === void 0 ? 0 : _9;
13743
13743
  var idCaptureGuideImages = useGuideImages(userSuppliedImages);
13744
13744
  var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
13745
- var _8 = React.useState(undefined),
13746
- aspectRatio = _8[0],
13747
- setAspectRatio = _8[1];
13745
+ var _10 = React.useState(undefined),
13746
+ aspectRatio = _10[0],
13747
+ setAspectRatio = _10[1];
13748
13748
  var onImageLoaded = React.useCallback(function (e) {
13749
13749
  var _a, _b, _c, _d;
13750
13750
  var img = e.currentTarget;
@@ -13761,6 +13761,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
13761
13761
  aspectRatio: aspectRatio
13762
13762
  };
13763
13763
  }, [idCardGuideWidth, idCardGuideHeight, aspectRatio]);
13764
+ var disableIdGuides = ((_u = (_t = theme.idVideoCapture) === null || _t === void 0 ? void 0 : _t.idCardGuides) === null || _u === void 0 ? void 0 : _u.disableDuringLivenessCheck) && requestedAction === 'VERIFY_LIVENESS';
13764
13765
  return /*#__PURE__*/React__namespace.default.createElement(Container, {
13765
13766
  className: classNames.container
13766
13767
  }, /*#__PURE__*/React__namespace.default.createElement(Inner, null, /*#__PURE__*/React__namespace.default.createElement(FaceGuideContainer, {
@@ -13771,7 +13772,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
13771
13772
  borderWidth: faceGuideBorderWidth,
13772
13773
  borderColor: faceGuideBorderColor,
13773
13774
  verticalAlign: "bottom"
13774
- })), /*#__PURE__*/React__namespace.default.createElement(IdCardGuideContainer, {
13775
+ })), !disableIdGuides && ( /*#__PURE__*/React__namespace.default.createElement(IdCardGuideContainer, {
13775
13776
  className: classNames.idCardGuideContainer,
13776
13777
  ref: idCardGuideRef
13777
13778
  }, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideInner, {
@@ -13790,7 +13791,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
13790
13791
  }, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
13791
13792
  alt: "",
13792
13793
  className: classNames.idCardGuideImage,
13793
- "$isMirrored": !((_t = cameraRef.current) === null || _t === void 0 ? void 0 : _t.isRearFacing),
13794
+ "$isMirrored": !((_v = cameraRef.current) === null || _v === void 0 ? void 0 : _v.isRearFacing),
13794
13795
  style: idCardImageStyle,
13795
13796
  src: requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
13796
13797
  onLoad: onImageLoaded
@@ -13804,15 +13805,15 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
13804
13805
  className: classNames.idCardGuideInstructionsContainer
13805
13806
  }, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideInstructions, {
13806
13807
  className: classNames.idCardGuideInstructions,
13807
- "$textColor": (_v = (_u = theme.idVideoCapture) === null || _u === void 0 ? void 0 : _u.idCardGuides) === null || _v === void 0 ? void 0 : _v.instructionsTextColor,
13808
- "$background": (_x = (_w = theme.idVideoCapture) === null || _w === void 0 ? void 0 : _w.idCardGuides) === null || _x === void 0 ? void 0 : _x.instructionsBackgroundColor
13809
- }, instructionText)))));
13808
+ "$textColor": (_x = (_w = theme.idVideoCapture) === null || _w === void 0 ? void 0 : _w.idCardGuides) === null || _x === void 0 ? void 0 : _x.instructionsTextColor,
13809
+ "$background": (_z = (_y = theme.idVideoCapture) === null || _y === void 0 ? void 0 : _y.idCardGuides) === null || _z === void 0 ? void 0 : _z.instructionsBackgroundColor
13810
+ }, instructionText))))));
13810
13811
  };
13811
13812
  var Container = styled__default.default.div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n display: flex;\n max-height: 100%;\n position: absolute;\n z-index: 1000;\n width: 100dvw;\n height: 100dvh;\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 width: 100dvw;\n height: 100dvh;\n font-family: ", ";\n box-sizing: border-box;\n overflow: hidden;\n padding: 40px;\n"])), function (props) {
13812
13813
  var _a;
13813
13814
  return (_a = props.theme) === null || _a === void 0 ? void 0 : _a.fontFamily;
13814
13815
  });
13815
- var Inner = styled__default.default.div(templateObject_2$7 || (templateObject_2$7 = __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"])));
13816
+ var Inner = styled__default.default.div(templateObject_2$7 || (templateObject_2$7 = __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 justify-content: center;\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 justify-content: center;\n"])));
13816
13817
  var FaceGuideContainer = styled__default.default.div(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n position: relative;\n height: 65%;\n"], ["\n position: relative;\n height: 65%;\n"])));
13817
13818
  var IdCardGuideContainer = styled__default.default.div(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n display: flex;\n flex-flow: column nowrap;\n margin: 0 auto;\n position: relative;\n max-width: 100%;\n height: 35%;\n"], ["\n display: flex;\n flex-flow: column nowrap;\n margin: 0 auto;\n position: relative;\n max-width: 100%;\n height: 35%;\n"])));
13818
13819
  var IdCardGuideInner = styled__default.default.div(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n position: relative;\n height: 100%;\n"], ["\n position: relative;\n height: 100%;\n"])));
@@ -15136,6 +15137,9 @@ var defaultTheme = {
15136
15137
  backgroundPosition: '0 0, 10px 10px'
15137
15138
  },
15138
15139
  idVideoCapture: {
15140
+ idCardGuides: {
15141
+ disableDuringLivenessCheck: false
15142
+ },
15139
15143
  readTextPrompt: {
15140
15144
  heading: {
15141
15145
  backgroundColor: 'rgba(255, 255, 255, 0.5)',