idmission-web-sdk 1.0.310 → 1.0.311
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/video_id/IdVideoCaptureGuides.d.ts +166 -163
- package/dist/sdk2.cjs.development.js +33 -33
- 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 -33
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +33 -33
- 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/themes/index.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
return cooked;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
var webSdkVersion = '1.0.
|
|
144
|
+
var webSdkVersion = '1.0.311';
|
|
145
145
|
|
|
146
146
|
function getPlatform() {
|
|
147
147
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -19602,29 +19602,29 @@
|
|
|
19602
19602
|
var templateObject_1$8;
|
|
19603
19603
|
|
|
19604
19604
|
var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
19605
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
19606
|
-
var
|
|
19607
|
-
requestedAction =
|
|
19608
|
-
|
|
19609
|
-
satisfied =
|
|
19605
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
19606
|
+
var _y = _a.requestedAction,
|
|
19607
|
+
requestedAction = _y === void 0 ? 'SHOW_ID_FRONT' : _y,
|
|
19608
|
+
_z = _a.satisfied,
|
|
19609
|
+
satisfied = _z === void 0 ? false : _z,
|
|
19610
19610
|
faceGuideBorderWidth = _a.faceGuideBorderWidth,
|
|
19611
19611
|
faceGuideBorderColor = _a.faceGuideBorderColor,
|
|
19612
19612
|
idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
|
|
19613
19613
|
idCardGuideBorderColor = _a.idCardGuideBorderColor,
|
|
19614
|
-
|
|
19615
|
-
assets =
|
|
19616
|
-
|
|
19617
|
-
classNames =
|
|
19618
|
-
|
|
19619
|
-
rawVerbiage =
|
|
19614
|
+
_0 = _a.assets,
|
|
19615
|
+
assets = _0 === void 0 ? {} : _0,
|
|
19616
|
+
_1 = _a.classNames,
|
|
19617
|
+
classNames = _1 === void 0 ? {} : _1,
|
|
19618
|
+
_2 = _a.verbiage,
|
|
19619
|
+
rawVerbiage = _2 === void 0 ? {} : _2;
|
|
19620
19620
|
var cameraRef = React.useContext(CameraStateContext).cameraRef;
|
|
19621
19621
|
var imageRef = React.useRef(null);
|
|
19622
|
-
var
|
|
19623
|
-
imageWidth =
|
|
19624
|
-
setImageWidth =
|
|
19625
|
-
var
|
|
19626
|
-
imageHeight =
|
|
19627
|
-
setImageHeight =
|
|
19622
|
+
var _3 = React.useState(0),
|
|
19623
|
+
imageWidth = _3[0],
|
|
19624
|
+
setImageWidth = _3[1];
|
|
19625
|
+
var _4 = React.useState(0),
|
|
19626
|
+
imageHeight = _4[0],
|
|
19627
|
+
setImageHeight = _4[1];
|
|
19628
19628
|
assets.frontImageUrl || (assets.frontImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-2.svg"));
|
|
19629
19629
|
assets.backImageUrl || (assets.backImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-2.svg"));
|
|
19630
19630
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -19633,12 +19633,16 @@
|
|
|
19633
19633
|
flipIdInstructionText: 'Please flip your ID card...'
|
|
19634
19634
|
});
|
|
19635
19635
|
var instructionText = requestedAction === 'SHOW_ID_FRONT' ? verbiage.idFrontInstructionText : requestedAction === 'FLIP_ID' ? verbiage.flipIdInstructionText : verbiage.idBackInstructionText;
|
|
19636
|
-
var idGuideWidth = typeof window !== 'undefined' && window.innerWidth > window.innerHeight ? '30%' : '75%';
|
|
19637
19636
|
var theme = styled.useTheme();
|
|
19638
19637
|
if (faceGuideBorderWidth === undefined) faceGuideBorderWidth = (_d = (_c = (_b = theme.idVideoCapture) === null || _b === void 0 ? void 0 : _b.faceGuides) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 4;
|
|
19639
19638
|
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 : 'white';
|
|
19640
19639
|
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 : 4;
|
|
19641
19640
|
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 : 'white';
|
|
19641
|
+
var captureImageSize = function captureImageSize() {
|
|
19642
|
+
var _a, _b, _c, _d;
|
|
19643
|
+
if (!imageWidth) setImageWidth((_b = (_a = imageRef.current) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 0);
|
|
19644
|
+
if (!imageHeight) setImageHeight((_d = (_c = imageRef.current) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 0);
|
|
19645
|
+
};
|
|
19642
19646
|
return /*#__PURE__*/React__default['default'].createElement(Container, {
|
|
19643
19647
|
className: classNames.container
|
|
19644
19648
|
}, /*#__PURE__*/React__default['default'].createElement(FaceGuide, {
|
|
@@ -19646,12 +19650,13 @@
|
|
|
19646
19650
|
"$borderWidth": faceGuideBorderWidth,
|
|
19647
19651
|
"$borderColor": faceGuideBorderColor
|
|
19648
19652
|
}), /*#__PURE__*/React__default['default'].createElement(IdCardGuideContainer, {
|
|
19649
|
-
"$width": idGuideWidth,
|
|
19650
19653
|
className: classNames.idCardGuideContainer
|
|
19651
19654
|
}, /*#__PURE__*/React__default['default'].createElement(IdCardGuideInstructionsContainer, {
|
|
19652
19655
|
className: classNames.idCardGuideInstructionsContainer
|
|
19653
19656
|
}, /*#__PURE__*/React__default['default'].createElement(IdCardGuideInstructions, {
|
|
19654
|
-
className: classNames.idCardGuideInstructions
|
|
19657
|
+
className: classNames.idCardGuideInstructions,
|
|
19658
|
+
"$textColor": (_u = (_t = theme.idVideoCapture) === null || _t === void 0 ? void 0 : _t.idCardGuides) === null || _u === void 0 ? void 0 : _u.instructionsTextColor,
|
|
19659
|
+
"$background": (_w = (_v = theme.idVideoCapture) === null || _v === void 0 ? void 0 : _v.idCardGuides) === null || _w === void 0 ? void 0 : _w.instructionsBackgroundColor
|
|
19655
19660
|
}, instructionText)), /*#__PURE__*/React__default['default'].createElement(IdCardGuideImageContainer, {
|
|
19656
19661
|
"$borderWidth": idCardGuideBorderWidth,
|
|
19657
19662
|
"$borderColor": idCardGuideBorderColor,
|
|
@@ -19667,30 +19672,25 @@
|
|
|
19667
19672
|
src: requestedAction === 'SHOW_ID_BACK' ? assets.backImageUrl : assets.frontImageUrl,
|
|
19668
19673
|
alt: "",
|
|
19669
19674
|
className: classNames.idCardGuideImage,
|
|
19670
|
-
"$isMirrored": !((
|
|
19671
|
-
onLoad:
|
|
19672
|
-
|
|
19673
|
-
if (!imageWidth) setImageWidth((_b = (_a = imageRef.current) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 0);
|
|
19674
|
-
if (!imageHeight) setImageHeight((_d = (_c = imageRef.current) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 0);
|
|
19675
|
-
}
|
|
19675
|
+
"$isMirrored": !((_x = cameraRef.current) === null || _x === void 0 ? void 0 : _x.isRearFacing),
|
|
19676
|
+
onLoad: captureImageSize,
|
|
19677
|
+
onResize: captureImageSize
|
|
19676
19678
|
})))));
|
|
19677
19679
|
};
|
|
19678
19680
|
var Container = styled__default['default'].div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n position: fixed;\n z-index: 1000;\n width: 100dvw;\n height: 100dvh;\n display: flex;\n flex-direction: column;\n font-family: ", ";\n"], ["\n position: fixed;\n z-index: 1000;\n width: 100dvw;\n height: 100dvh;\n display: flex;\n flex-direction: column;\n font-family: ", ";\n"])), function (props) {
|
|
19679
19681
|
var _a;
|
|
19680
19682
|
return (_a = props.theme) === null || _a === void 0 ? void 0 : _a.fontFamily;
|
|
19681
19683
|
});
|
|
19682
|
-
var FaceGuide = styled__default['default'].div(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n border-width: ", "px;\n border-color: ", ";\n border-style: solid;\n border-radius: 50%;\n aspect-ratio: 1 / 1.618;\n height:
|
|
19684
|
+
var FaceGuide = styled__default['default'].div(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n border-width: ", "px;\n border-color: ", ";\n border-style: solid;\n border-radius: 50%;\n aspect-ratio: 1 / 1.618;\n height: 50%;\n min-height: 33dvh;\n margin: 4% auto auto;\n"], ["\n border-width: ", "px;\n border-color: ", ";\n border-style: solid;\n border-radius: 50%;\n aspect-ratio: 1 / 1.618;\n height: 50%;\n min-height: 33dvh;\n margin: 4% auto auto;\n"])), function (props) {
|
|
19683
19685
|
var _a;
|
|
19684
19686
|
return (_a = props.$borderWidth) !== null && _a !== void 0 ? _a : 0;
|
|
19685
19687
|
}, function (props) {
|
|
19686
19688
|
var _a;
|
|
19687
19689
|
return (_a = props.$borderColor) !== null && _a !== void 0 ? _a : 'white';
|
|
19688
19690
|
});
|
|
19689
|
-
var IdCardGuideContainer = styled__default['default'].div(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
var IdCardGuideInstructionsContainer = styled__default['default'].div(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n width: 100%;\n flex-grow: 1;\n text-align: center;\n color: white;\n display: flex;\n flex-direction: column;\n justify-content: end;\n"], ["\n width: 100%;\n flex-grow: 1;\n text-align: center;\n color: white;\n display: flex;\n flex-direction: column;\n justify-content: end;\n"])));
|
|
19693
|
-
var IdCardGuideInstructions = styled__default['default'].span(templateObject_5$1 || (templateObject_5$1 = __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"])));
|
|
19691
|
+
var IdCardGuideContainer = styled__default['default'].div(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n height: 50%;\n display: flex;\n flex-flow: column nowrap;\n margin: 2% auto;\n"], ["\n height: 50%;\n display: flex;\n flex-flow: column nowrap;\n margin: 2% auto;\n"])));
|
|
19692
|
+
var IdCardGuideInstructionsContainer = styled__default['default'].div(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n width: 100%;\n text-align: center;\n color: white;\n display: flex;\n flex-direction: column;\n justify-content: end;\n"], ["\n width: 100%;\n text-align: center;\n color: white;\n display: flex;\n flex-direction: column;\n justify-content: end;\n"])));
|
|
19693
|
+
var IdCardGuideInstructions = styled__default['default'](GuidanceMessage)(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n padding: 8px 12px;\n font-weight: bold;\n"], ["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n padding: 8px 12px;\n font-weight: bold;\n"])));
|
|
19694
19694
|
var IdCardGuideImageContainer = styled__default['default'].div(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n position: relative;\n border: ", "px solid\n ", ";\n"], ["\n position: relative;\n border: ", "px solid\n ", ";\n"])), function (props) {
|
|
19695
19695
|
return props.$borderWidth;
|
|
19696
19696
|
}, function (props) {
|