idmission-web-sdk 1.0.180 → 1.0.182
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/components/id_capture/IdCaptureFitGuide.d.ts +2 -1
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts +3 -1
- package/dist/sdk2.cjs.development.js +33 -22
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +33 -22
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +33 -22
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
51
|
+
var webSdkVersion = '1.0.182';
|
|
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
|
-
|
|
10642
|
-
isMirrored =
|
|
10643
|
-
|
|
10644
|
-
instruction =
|
|
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
|
|
10649
|
-
orientation =
|
|
10650
|
-
wrapperRef =
|
|
10651
|
-
wrapperWidth =
|
|
10652
|
-
wrapperHeight =
|
|
10653
|
-
imageAspectRatio =
|
|
10654
|
-
wrapperAspectRatio =
|
|
10655
|
-
guideOrientationOnImageLoaded =
|
|
10656
|
-
setDimensions =
|
|
10657
|
-
var
|
|
10658
|
-
dispatch =
|
|
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,
|
|
@@ -10858,6 +10863,7 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
10858
10863
|
"$padding": imagePadding,
|
|
10859
10864
|
"$transitionTime": transitionTime,
|
|
10860
10865
|
"$transforms": frontTransforms.join(' '),
|
|
10866
|
+
"$visible": true,
|
|
10861
10867
|
onLoad: onImageLoaded
|
|
10862
10868
|
}), /*#__PURE__*/React__default['default'].createElement(FlippingImageBack, {
|
|
10863
10869
|
src: orientation === 'portrait' ? assets.backPortraitGuidesImageUrl : assets.backLandscapeGuidesImageUrl,
|
|
@@ -10867,7 +10873,8 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
10867
10873
|
"$height": imageHeight,
|
|
10868
10874
|
"$padding": imagePadding,
|
|
10869
10875
|
"$transitionTime": transitionTime,
|
|
10870
|
-
"$transforms": backTransforms.join(' ')
|
|
10876
|
+
"$transforms": backTransforms.join(' '),
|
|
10877
|
+
"$visible": true
|
|
10871
10878
|
}))), /*#__PURE__*/React__default['default'].createElement(GuideRegion, {
|
|
10872
10879
|
"$minWidth": padding,
|
|
10873
10880
|
"$maskColor": maskColor,
|
|
@@ -10899,6 +10906,7 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
10899
10906
|
borderWidth = _a.borderWidth,
|
|
10900
10907
|
padding = _a.padding,
|
|
10901
10908
|
imageUrl = _a.imageUrl,
|
|
10909
|
+
imageVisible = _a.imageVisible,
|
|
10902
10910
|
frontImageUrl = _a.frontImageUrl,
|
|
10903
10911
|
backImageUrl = _a.backImageUrl,
|
|
10904
10912
|
isMirrored = _a.isMirrored,
|
|
@@ -11018,7 +11026,8 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
11018
11026
|
borderWidth: 0,
|
|
11019
11027
|
isMirrored: isMirrored,
|
|
11020
11028
|
instruction: instruction,
|
|
11021
|
-
classNames: classNames
|
|
11029
|
+
classNames: classNames,
|
|
11030
|
+
imageVisible: imageVisible
|
|
11022
11031
|
})));
|
|
11023
11032
|
};
|
|
11024
11033
|
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 +11077,8 @@ function IdCaptureGuides(_a) {
|
|
|
11068
11077
|
portraitGuidesImageUrl: assets.portraitGuidesImageUrl,
|
|
11069
11078
|
landscapeGuidesImageUrl: assets.landscapeGuidesImageUrl,
|
|
11070
11079
|
isMirrored: !((_b = cameraRef.current) === null || _b === void 0 ? void 0 : _b.isRearFacing),
|
|
11071
|
-
borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor
|
|
11080
|
+
borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor,
|
|
11081
|
+
imageVisible: requestingFlip || !state.documentDetectionThresholdMet || !state.documentInBounds || state.documentTooClose
|
|
11072
11082
|
})), guideType === 'fit' && ( /*#__PURE__*/React__default['default'].createElement(IdCaptureFitGuide, {
|
|
11073
11083
|
classNames: classNames,
|
|
11074
11084
|
requestingFlip: requestingFlip,
|
|
@@ -11077,7 +11087,8 @@ function IdCaptureGuides(_a) {
|
|
|
11077
11087
|
frontImageUrl: frontImageUrl,
|
|
11078
11088
|
backImageUrl: backImageUrl,
|
|
11079
11089
|
isMirrored: !((_c = cameraRef.current) === null || _c === void 0 ? void 0 : _c.isRearFacing),
|
|
11080
|
-
borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor
|
|
11090
|
+
borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor,
|
|
11091
|
+
imageVisible: requestingFlip || !state.documentDetectionThresholdMet || !state.documentInBounds || state.documentTooClose
|
|
11081
11092
|
})));
|
|
11082
11093
|
}
|
|
11083
11094
|
|