idmission-web-sdk 1.0.180 → 1.0.181

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.
@@ -12,6 +12,7 @@ export type IdCaptureFitGuideProps = {
12
12
  borderWidth?: number;
13
13
  padding?: number;
14
14
  imageUrl?: string;
15
+ imageVisible?: boolean;
15
16
  frontImageUrl?: string;
16
17
  backImageUrl?: string;
17
18
  isMirrored?: boolean;
@@ -19,4 +20,4 @@ export type IdCaptureFitGuideProps = {
19
20
  requestingFlip?: boolean;
20
21
  classNames?: IdCaptureFitGuideClassNames;
21
22
  };
22
- export declare const IdCaptureFitGuide: ({ aspectRatio, maskColor, borderRadius, borderColor, borderWidth, padding, imageUrl, frontImageUrl, backImageUrl, isMirrored, instruction, requestingFlip, classNames, }: IdCaptureFitGuideProps) => React.JSX.Element;
23
+ export declare const IdCaptureFitGuide: ({ aspectRatio, maskColor, borderRadius, borderColor, borderWidth, padding, imageUrl, imageVisible, frontImageUrl, backImageUrl, isMirrored, instruction, requestingFlip, classNames, }: IdCaptureFitGuideProps) => React.JSX.Element;
@@ -832,6 +832,7 @@ export declare const GuideImage: import("styled-components").IStyledComponent<"w
832
832
  $width?: number | undefined;
833
833
  $height?: number | undefined;
834
834
  $padding: number;
835
+ $visible?: boolean | undefined;
835
836
  }>>;
836
837
  export type IdCaptureGuideOverlayClassNames = {
837
838
  container?: string;
@@ -853,6 +854,7 @@ export type IdCaptureGuideOverlayProps = {
853
854
  height?: number;
854
855
  padding?: number;
855
856
  imagePadding?: number;
857
+ imageVisible?: boolean;
856
858
  borderWidth?: number;
857
859
  borderColor?: string;
858
860
  maskColor?: string;
@@ -862,4 +864,4 @@ export type IdCaptureGuideOverlayProps = {
862
864
  landscapeGuidesImageUrl?: string;
863
865
  onClick?: () => void;
864
866
  };
865
- export declare const IdCaptureGuideOverlay: ({ classNames, width, height, padding: userSuppliedPadding, imagePadding: userSuppliedImagePadding, borderWidth, borderColor, maskColor, isMirrored, instruction, portraitGuidesImageUrl, landscapeGuidesImageUrl, onClick, }: IdCaptureGuideOverlayProps) => ReactElement;
867
+ export declare const IdCaptureGuideOverlay: ({ classNames, width, height, padding: userSuppliedPadding, imagePadding: userSuppliedImagePadding, imageVisible, borderWidth, borderColor, maskColor, isMirrored, instruction, portraitGuidesImageUrl, landscapeGuidesImageUrl, onClick, }: IdCaptureGuideOverlayProps) => ReactElement;
@@ -48,7 +48,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
48
48
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
49
49
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
50
50
 
51
- var webSdkVersion = '1.0.180';
51
+ var webSdkVersion = '1.0.181';
52
52
 
53
53
  function getPlatform() {
54
54
  if (typeof window === 'undefined') return;
@@ -10618,12 +10618,14 @@ var GuideCenterBorder = styled__default['default'].div(templateObject_6$2 || (te
10618
10618
  return "".concat((_a = props.$borderWidth) !== null && _a !== void 0 ? _a : 4, "px solid ").concat((_b = props.$borderColor) !== null && _b !== void 0 ? _b : 'white');
10619
10619
  });
10620
10620
  var GuideText = styled__default['default'].span(templateObject_7$1 || (templateObject_7$1 = tslib.__makeTemplateObject(["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"], ["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"])));
10621
- var GuideImage = styled__default['default'].img(templateObject_8 || (templateObject_8 = tslib.__makeTemplateObject(["\n position: relative;\n z-index: 1;\n display: block;\n padding: ", "px;\n box-sizing: border-box;\n ", "\n ", "\n"], ["\n position: relative;\n z-index: 1;\n display: block;\n padding: ", "px;\n box-sizing: border-box;\n ", "\n ", "\n"])), function (props) {
10621
+ var GuideImage = styled__default['default'].img(templateObject_8 || (templateObject_8 = tslib.__makeTemplateObject(["\n position: relative;\n z-index: 1;\n display: block;\n padding: ", "px;\n box-sizing: border-box;\n ", "\n ", "\n opacity: ", ";\n transition: opacity 0.5s;\n"], ["\n position: relative;\n z-index: 1;\n display: block;\n padding: ", "px;\n box-sizing: border-box;\n ", "\n ", "\n opacity: ", ";\n transition: opacity 0.5s;\n"])), function (props) {
10622
10622
  return props.$padding;
10623
10623
  }, function (props) {
10624
10624
  return props.$width ? "width: ".concat(props.$width, "px;\n max-width: ").concat(props.$width, "px;") : "max-width: none;";
10625
10625
  }, function (props) {
10626
10626
  return props.$height ? "height: ".concat(props.$height, "px;\n max-height: ").concat(props.$height, "px;") : "max-height: none;";
10627
+ }, function (props) {
10628
+ return props.$visible ? 1 : 0;
10627
10629
  });
10628
10630
  var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
10629
10631
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
@@ -10635,27 +10637,29 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
10635
10637
  height = _r === void 0 ? 0 : _r,
10636
10638
  userSuppliedPadding = _a.padding,
10637
10639
  userSuppliedImagePadding = _a.imagePadding,
10640
+ _s = _a.imageVisible,
10641
+ imageVisible = _s === void 0 ? true : _s,
10638
10642
  borderWidth = _a.borderWidth,
10639
10643
  borderColor = _a.borderColor,
10640
10644
  maskColor = _a.maskColor,
10641
- _s = _a.isMirrored,
10642
- isMirrored = _s === void 0 ? false : _s,
10643
- _t = _a.instruction,
10644
- instruction = _t === void 0 ? '' : _t,
10645
+ _t = _a.isMirrored,
10646
+ isMirrored = _t === void 0 ? false : _t,
10647
+ _u = _a.instruction,
10648
+ instruction = _u === void 0 ? '' : _u,
10645
10649
  portraitGuidesImageUrl = _a.portraitGuidesImageUrl,
10646
10650
  landscapeGuidesImageUrl = _a.landscapeGuidesImageUrl,
10647
10651
  onClick = _a.onClick;
10648
- var _u = React.useContext(GuideOrientationContext),
10649
- orientation = _u.orientation,
10650
- wrapperRef = _u.wrapperRef,
10651
- wrapperWidth = _u.wrapperWidth,
10652
- wrapperHeight = _u.wrapperHeight,
10653
- imageAspectRatio = _u.imageAspectRatio,
10654
- wrapperAspectRatio = _u.wrapperAspectRatio,
10655
- guideOrientationOnImageLoaded = _u.onImageLoaded,
10656
- setDimensions = _u.setDimensions;
10657
- var _v = useIdCaptureState(),
10658
- dispatch = _v[1];
10652
+ var _v = React.useContext(GuideOrientationContext),
10653
+ orientation = _v.orientation,
10654
+ wrapperRef = _v.wrapperRef,
10655
+ wrapperWidth = _v.wrapperWidth,
10656
+ wrapperHeight = _v.wrapperHeight,
10657
+ imageAspectRatio = _v.imageAspectRatio,
10658
+ wrapperAspectRatio = _v.wrapperAspectRatio,
10659
+ guideOrientationOnImageLoaded = _v.onImageLoaded,
10660
+ setDimensions = _v.setDimensions;
10661
+ var _w = useIdCaptureState(),
10662
+ dispatch = _w[1];
10659
10663
  function onImageLoaded(e) {
10660
10664
  guideOrientationOnImageLoaded(e);
10661
10665
  var img = e.target;
@@ -10721,7 +10725,8 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
10721
10725
  className: classNames.image,
10722
10726
  "$width": imageWidth,
10723
10727
  "$height": imageHeight,
10724
- "$padding": imagePadding
10728
+ "$padding": imagePadding,
10729
+ "$visible": imageVisible
10725
10730
  }))), /*#__PURE__*/React__default['default'].createElement(GuideRegion, {
10726
10731
  "$maskColor": maskColor,
10727
10732
  "$minWidth": padding,
@@ -10899,6 +10904,7 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
10899
10904
  borderWidth = _a.borderWidth,
10900
10905
  padding = _a.padding,
10901
10906
  imageUrl = _a.imageUrl,
10907
+ imageVisible = _a.imageVisible,
10902
10908
  frontImageUrl = _a.frontImageUrl,
10903
10909
  backImageUrl = _a.backImageUrl,
10904
10910
  isMirrored = _a.isMirrored,
@@ -11018,7 +11024,8 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
11018
11024
  borderWidth: 0,
11019
11025
  isMirrored: isMirrored,
11020
11026
  instruction: instruction,
11021
- classNames: classNames
11027
+ classNames: classNames,
11028
+ imageVisible: imageVisible
11022
11029
  })));
11023
11030
  };
11024
11031
  var CanvasWrapper$1 = styled__default['default'].div(templateObject_1$k || (templateObject_1$k = tslib.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"])), function (props) {
@@ -11068,7 +11075,8 @@ function IdCaptureGuides(_a) {
11068
11075
  portraitGuidesImageUrl: assets.portraitGuidesImageUrl,
11069
11076
  landscapeGuidesImageUrl: assets.landscapeGuidesImageUrl,
11070
11077
  isMirrored: !((_b = cameraRef.current) === null || _b === void 0 ? void 0 : _b.isRearFacing),
11071
- borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor
11078
+ borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor,
11079
+ imageVisible: requestingFlip || !state.documentDetectionThresholdMet || !state.documentInBounds || state.documentTooClose
11072
11080
  })), guideType === 'fit' && ( /*#__PURE__*/React__default['default'].createElement(IdCaptureFitGuide, {
11073
11081
  classNames: classNames,
11074
11082
  requestingFlip: requestingFlip,
@@ -11077,7 +11085,8 @@ function IdCaptureGuides(_a) {
11077
11085
  frontImageUrl: frontImageUrl,
11078
11086
  backImageUrl: backImageUrl,
11079
11087
  isMirrored: !((_c = cameraRef.current) === null || _c === void 0 ? void 0 : _c.isRearFacing),
11080
- borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor
11088
+ borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor,
11089
+ imageVisible: requestingFlip || !state.documentDetectionThresholdMet || !state.documentInBounds || state.documentTooClose
11081
11090
  })));
11082
11091
  }
11083
11092