idmission-web-sdk 2.3.34 → 2.3.35
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/FlipIdPrompt.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureGuidesCommon.d.ts +3 -1
- package/dist/components/id_capture/IdCaptureGuidesCommon.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureFlipIdPrompt.d.ts +1 -0
- package/dist/components/video_id/IdVideoCaptureFlipIdPrompt.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +70 -67
- 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 +70 -67
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +70 -67
- 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
|
@@ -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.
|
|
214
|
+
var webSdkVersion = '2.3.35';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -482,7 +482,7 @@
|
|
|
482
482
|
var OverlayImageContainer = styled.div(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
|
|
483
483
|
var OverlayImageRow = styled.div(templateObject_4$l || (templateObject_4$l = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
|
|
484
484
|
var GrayOverlayContainer = styled(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
|
|
485
|
-
var ButtonsColumn = styled.div(templateObject_6$
|
|
485
|
+
var ButtonsColumn = styled.div(templateObject_6$a || (templateObject_6$a = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"])));
|
|
486
486
|
var WideButton = styled(LoaderButton)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n width: 100%;\n border-radius: 30px;\n"], ["\n width: 100%;\n border-radius: 30px;\n"])));
|
|
487
487
|
var WideBorderButton = styled(WideButton)(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"])), function (props) {
|
|
488
488
|
var _a, _b;
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
var LoadingOverlayProgressContainer = styled.div(templateObject_20 || (templateObject_20 = __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"])));
|
|
522
522
|
var LoadingOverlayCustomLoadingGraphic = styled.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
523
523
|
var LoadingOverlayContinueButtonContainer = styled.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
524
|
-
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$
|
|
524
|
+
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$a, templateObject_7$6, templateObject_8$4, templateObject_9$3, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
|
|
525
525
|
|
|
526
526
|
function _extends() {
|
|
527
527
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -16720,7 +16720,7 @@
|
|
|
16720
16720
|
var _a, _b, _c, _d, _e, _f;
|
|
16721
16721
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
16722
16722
|
});
|
|
16723
|
-
var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$
|
|
16723
|
+
var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n background: ", ";\n opacity: ", ";\n"], ["\n background: ", ";\n opacity: ", ";\n"])), function (props) {
|
|
16724
16724
|
var _a, _b, _c, _d;
|
|
16725
16725
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarBackgroundColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
16726
16726
|
}, function (props) {
|
|
@@ -16750,7 +16750,7 @@
|
|
|
16750
16750
|
var _a, _b, _c, _d;
|
|
16751
16751
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnDisabledBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
16752
16752
|
});
|
|
16753
|
-
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$
|
|
16753
|
+
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$5, templateObject_8$3;
|
|
16754
16754
|
|
|
16755
16755
|
var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
16756
16756
|
var ContinuityCameraCheckbox = styled.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
@@ -17001,8 +17001,8 @@
|
|
|
17001
17001
|
var ImageRow = styled(OverlayImageRow)(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"], ["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"])));
|
|
17002
17002
|
var ImageCol$1 = styled.div(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"], ["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"])));
|
|
17003
17003
|
var StyledImage = styled(CapturedDocumentImg)(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
|
|
17004
|
-
var DebugPre = styled.pre(templateObject_6$
|
|
17005
|
-
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$
|
|
17004
|
+
var DebugPre = styled.pre(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"], ["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"])));
|
|
17005
|
+
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$8;
|
|
17006
17006
|
|
|
17007
17007
|
function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
|
|
17008
17008
|
var _this = this;
|
|
@@ -17101,15 +17101,12 @@
|
|
|
17101
17101
|
var progressBarIndicatorColor = (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.progressBarIndicatorColor) !== null && _o !== void 0 ? _o : '#287ec6';
|
|
17102
17102
|
var progressBarWidth = (_r = (_q = (_p = theme.idCapture) === null || _p === void 0 ? void 0 : _p.guideBox) === null || _q === void 0 ? void 0 : _q.progressBarWidth) !== null && _r !== void 0 ? _r : borderWidth;
|
|
17103
17103
|
return /*#__PURE__*/React.createElement(IdCardBorderContainer, _assign({}, props, {
|
|
17104
|
-
style: {
|
|
17104
|
+
style: _assign(_assign({}, props.style), {
|
|
17105
17105
|
aspectRatio: aspectRatio
|
|
17106
|
-
}
|
|
17107
|
-
}), /*#__PURE__*/React.createElement(
|
|
17106
|
+
})
|
|
17107
|
+
}), /*#__PURE__*/React.createElement(IdCardBorderInner, {
|
|
17108
17108
|
ref: ref,
|
|
17109
17109
|
style: {
|
|
17110
|
-
maxHeight: '100%',
|
|
17111
|
-
maxWidth: '100%',
|
|
17112
|
-
display: 'flex',
|
|
17113
17110
|
aspectRatio: aspectRatio
|
|
17114
17111
|
}
|
|
17115
17112
|
}, children), status === 'ready' && !wavesDisabled && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IdCardBorderSvg, {
|
|
@@ -17209,16 +17206,17 @@
|
|
|
17209
17206
|
className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
|
|
17210
17207
|
}));
|
|
17211
17208
|
}
|
|
17212
|
-
var IdCardBorderContainer = styled.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
|
|
17213
|
-
var
|
|
17214
|
-
var
|
|
17209
|
+
var IdCardBorderContainer = styled.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
|
|
17210
|
+
var IdCardBorderInner = styled.div(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
17211
|
+
var SvgOverlay = styled.svg(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
|
|
17212
|
+
var IdCardBorderRect = styled.rect(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"], ["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"])), progressBorderAnimation, function (props) {
|
|
17215
17213
|
var _a;
|
|
17216
17214
|
return (_a = props.$speed) !== null && _a !== void 0 ? _a : '3s';
|
|
17217
17215
|
}, function (props) {
|
|
17218
17216
|
var _a;
|
|
17219
17217
|
return (_a = props.$fillMode) !== null && _a !== void 0 ? _a : 'forwards';
|
|
17220
17218
|
});
|
|
17221
|
-
var templateObject_1$A, templateObject_2$t, templateObject_3$k, templateObject_4$e, templateObject_5$a;
|
|
17219
|
+
var templateObject_1$A, templateObject_2$t, templateObject_3$k, templateObject_4$e, templateObject_5$a, templateObject_6$7;
|
|
17222
17220
|
|
|
17223
17221
|
var defaultIdCaptureGuideImages = {
|
|
17224
17222
|
portrait: {
|
|
@@ -17401,6 +17399,53 @@
|
|
|
17401
17399
|
});
|
|
17402
17400
|
var templateObject_1$z;
|
|
17403
17401
|
|
|
17402
|
+
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
17403
|
+
orientation: 'landscape',
|
|
17404
|
+
wrapperWidth: 1,
|
|
17405
|
+
wrapperHeight: 1,
|
|
17406
|
+
wrapperAspectRatio: 0,
|
|
17407
|
+
imageAspectRatio: 0,
|
|
17408
|
+
wrapperRef: null,
|
|
17409
|
+
setImageAspectRatio: function setImageAspectRatio() {
|
|
17410
|
+
return null;
|
|
17411
|
+
}
|
|
17412
|
+
});
|
|
17413
|
+
function GuideOrientationContextProvider(_a) {
|
|
17414
|
+
var children = _a.children;
|
|
17415
|
+
var _b = React.useState(1),
|
|
17416
|
+
imageAspectRatio = _b[0],
|
|
17417
|
+
setImageAspectRatio = _b[1];
|
|
17418
|
+
var _c = useResizeObserver(),
|
|
17419
|
+
wrapperRef = _c.ref,
|
|
17420
|
+
_d = _c.width,
|
|
17421
|
+
wrapperWidth = _d === void 0 ? 1 : _d,
|
|
17422
|
+
_e = _c.height,
|
|
17423
|
+
wrapperHeight = _e === void 0 ? 1 : _e;
|
|
17424
|
+
var wrapperAspectRatio = React.useMemo(function () {
|
|
17425
|
+
return wrapperWidth / wrapperHeight;
|
|
17426
|
+
}, [wrapperHeight, wrapperWidth]);
|
|
17427
|
+
var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
|
|
17428
|
+
var value = React.useMemo(function () {
|
|
17429
|
+
return {
|
|
17430
|
+
orientation: orientation,
|
|
17431
|
+
wrapperWidth: wrapperWidth,
|
|
17432
|
+
wrapperHeight: wrapperHeight,
|
|
17433
|
+
wrapperAspectRatio: wrapperAspectRatio,
|
|
17434
|
+
imageAspectRatio: imageAspectRatio,
|
|
17435
|
+
setImageAspectRatio: setImageAspectRatio,
|
|
17436
|
+
wrapperRef: wrapperRef
|
|
17437
|
+
};
|
|
17438
|
+
}, [imageAspectRatio, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
|
|
17439
|
+
return /*#__PURE__*/React.createElement(GuideOrientationContext.Provider, {
|
|
17440
|
+
value: value
|
|
17441
|
+
}, children);
|
|
17442
|
+
}
|
|
17443
|
+
function useGuideOrientationContext() {
|
|
17444
|
+
var ctx = React.useContext(GuideOrientationContext);
|
|
17445
|
+
if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
|
|
17446
|
+
return ctx;
|
|
17447
|
+
}
|
|
17448
|
+
|
|
17404
17449
|
var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
17405
17450
|
var _b = _a.images,
|
|
17406
17451
|
images = _b === void 0 ? defaultIdCaptureGuideImages : _b,
|
|
@@ -17418,6 +17463,7 @@
|
|
|
17418
17463
|
portraitGuidesOnMobile = _g === void 0 ? true : _g,
|
|
17419
17464
|
_h = _a.classNames,
|
|
17420
17465
|
classNames = _h === void 0 ? {} : _h;
|
|
17466
|
+
var imageAspectRatio = useGuideOrientationContext().imageAspectRatio;
|
|
17421
17467
|
var orientation = getOrientation(portraitGuidesOnMobile);
|
|
17422
17468
|
var _j = React.useState(1),
|
|
17423
17469
|
transitionTime = _j[0],
|
|
@@ -17454,6 +17500,7 @@
|
|
|
17454
17500
|
borderRadius: borderRadius,
|
|
17455
17501
|
"$transforms": frontTransforms.join(' '),
|
|
17456
17502
|
"$transitionTime": transitionTime,
|
|
17503
|
+
aspectRatio: imageAspectRatio,
|
|
17457
17504
|
"$isVisible": true
|
|
17458
17505
|
}, /*#__PURE__*/React.createElement(IdCardGuideImage, {
|
|
17459
17506
|
alt: "",
|
|
@@ -17469,6 +17516,7 @@
|
|
|
17469
17516
|
borderRadius: borderRadius,
|
|
17470
17517
|
"$transforms": backTransforms.join(' '),
|
|
17471
17518
|
"$transitionTime": transitionTime,
|
|
17519
|
+
aspectRatio: imageAspectRatio,
|
|
17472
17520
|
"$isVisible": true
|
|
17473
17521
|
}, /*#__PURE__*/React.createElement(IdCardGuideImage, {
|
|
17474
17522
|
alt: "",
|
|
@@ -17479,53 +17527,6 @@
|
|
|
17479
17527
|
})));
|
|
17480
17528
|
};
|
|
17481
17529
|
|
|
17482
|
-
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
17483
|
-
orientation: 'landscape',
|
|
17484
|
-
wrapperWidth: 1,
|
|
17485
|
-
wrapperHeight: 1,
|
|
17486
|
-
wrapperAspectRatio: 0,
|
|
17487
|
-
imageAspectRatio: 0,
|
|
17488
|
-
wrapperRef: null,
|
|
17489
|
-
setImageAspectRatio: function setImageAspectRatio() {
|
|
17490
|
-
return null;
|
|
17491
|
-
}
|
|
17492
|
-
});
|
|
17493
|
-
function GuideOrientationContextProvider(_a) {
|
|
17494
|
-
var children = _a.children;
|
|
17495
|
-
var _b = React.useState(1),
|
|
17496
|
-
imageAspectRatio = _b[0],
|
|
17497
|
-
setImageAspectRatio = _b[1];
|
|
17498
|
-
var _c = useResizeObserver(),
|
|
17499
|
-
wrapperRef = _c.ref,
|
|
17500
|
-
_d = _c.width,
|
|
17501
|
-
wrapperWidth = _d === void 0 ? 1 : _d,
|
|
17502
|
-
_e = _c.height,
|
|
17503
|
-
wrapperHeight = _e === void 0 ? 1 : _e;
|
|
17504
|
-
var wrapperAspectRatio = React.useMemo(function () {
|
|
17505
|
-
return wrapperWidth / wrapperHeight;
|
|
17506
|
-
}, [wrapperHeight, wrapperWidth]);
|
|
17507
|
-
var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
|
|
17508
|
-
var value = React.useMemo(function () {
|
|
17509
|
-
return {
|
|
17510
|
-
orientation: orientation,
|
|
17511
|
-
wrapperWidth: wrapperWidth,
|
|
17512
|
-
wrapperHeight: wrapperHeight,
|
|
17513
|
-
wrapperAspectRatio: wrapperAspectRatio,
|
|
17514
|
-
imageAspectRatio: imageAspectRatio,
|
|
17515
|
-
setImageAspectRatio: setImageAspectRatio,
|
|
17516
|
-
wrapperRef: wrapperRef
|
|
17517
|
-
};
|
|
17518
|
-
}, [imageAspectRatio, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
|
|
17519
|
-
return /*#__PURE__*/React.createElement(GuideOrientationContext.Provider, {
|
|
17520
|
-
value: value
|
|
17521
|
-
}, children);
|
|
17522
|
-
}
|
|
17523
|
-
function useGuideOrientationContext() {
|
|
17524
|
-
var ctx = React.useContext(GuideOrientationContext);
|
|
17525
|
-
if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
|
|
17526
|
-
return ctx;
|
|
17527
|
-
}
|
|
17528
|
-
|
|
17529
17530
|
var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
17530
17531
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
17531
17532
|
var _s = _a.classNames,
|
|
@@ -17577,8 +17578,10 @@
|
|
|
17577
17578
|
var currentImage = images[orientation][requestedAction === 'FLIP_ID' ? 'SHOW_ID_FRONT' : requestedAction];
|
|
17578
17579
|
var imagePadding = userSuppliedImagePadding !== null && userSuppliedImagePadding !== void 0 ? userSuppliedImagePadding : isMobile() ? (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.mobileImagePadding) !== null && _o !== void 0 ? _o : 0 : (_r = (_q = (_p = theme.idCapture) === null || _p === void 0 ? void 0 : _p.guideBox) === null || _q === void 0 ? void 0 : _q.imagePadding) !== null && _r !== void 0 ? _r : 50;
|
|
17579
17580
|
var centerRegionMinWidth = imageAspectRatio >= wrapperAspectRatio ? wrapperWidth - paddingAndBorderPx : undefined;
|
|
17580
|
-
function
|
|
17581
|
+
React.useEffect(function () {
|
|
17581
17582
|
setImageAspectRatio(currentImage.width / currentImage.height);
|
|
17583
|
+
}, [currentImage.height, currentImage.width, setImageAspectRatio]);
|
|
17584
|
+
function onImageLoaded() {
|
|
17582
17585
|
dispatchIdCaptureAction({
|
|
17583
17586
|
type: 'guideImageLoaded',
|
|
17584
17587
|
payload: {
|
|
@@ -17644,8 +17647,8 @@
|
|
|
17644
17647
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
17645
17648
|
isMirrored: isMirrored,
|
|
17646
17649
|
classNames: classNames.flipIdPrompt,
|
|
17647
|
-
width:
|
|
17648
|
-
height:
|
|
17650
|
+
width: innerWidth,
|
|
17651
|
+
height: innerHeight
|
|
17649
17652
|
}))))), /*#__PURE__*/React.createElement(Spacer, {
|
|
17650
17653
|
"$maskColor": maskColor,
|
|
17651
17654
|
"$minWidth": padding,
|