idmission-web-sdk 2.1.76 → 2.1.77
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/sdk2.cjs.development.js +27 -43
- 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 +27 -43
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +27 -43
- 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
package/dist/sdk2.esm.js
CHANGED
|
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
204
204
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var webSdkVersion = '2.1.
|
|
207
|
+
var webSdkVersion = '2.1.77';
|
|
208
208
|
|
|
209
209
|
function getPlatform() {
|
|
210
210
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -8405,38 +8405,23 @@ function IdCardBorderSvg(_a) {
|
|
|
8405
8405
|
_b = _a.borderOpacity,
|
|
8406
8406
|
borderOpacity = _b === void 0 ? 1 : _b,
|
|
8407
8407
|
_c = _a.progress,
|
|
8408
|
-
progress = _c === void 0 ?
|
|
8408
|
+
progress = _c === void 0 ? 0 : _c,
|
|
8409
8409
|
_d = _a.progressPaused,
|
|
8410
8410
|
progressPaused = _d === void 0 ? false : _d,
|
|
8411
8411
|
_e = _a.isProgressBar,
|
|
8412
8412
|
isProgressBar = _e === void 0 ? false : _e,
|
|
8413
8413
|
props = __rest(_a, ["borderRadius", "borderColor", "borderWidth", "borderOpacity", "progress", "progressPaused", "isProgressBar"]);
|
|
8414
|
-
var rectRef = useRef(null);
|
|
8415
8414
|
var _f = useState(0),
|
|
8416
8415
|
totalLength = _f[0],
|
|
8417
8416
|
setTotalLength = _f[1];
|
|
8418
8417
|
var resolvedProgress = progress * totalLength;
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
var _a, _b;
|
|
8425
|
-
try {
|
|
8426
|
-
measuredLength = (_b = (_a = rectRef.current) === null || _a === void 0 ? void 0 : _a.getTotalLength()) !== null && _b !== void 0 ? _b : 0;
|
|
8427
|
-
if (measuredLength === 0) return;
|
|
8428
|
-
setTotalLength(measuredLength);
|
|
8429
|
-
if (interval) clearInterval(interval);
|
|
8430
|
-
} catch (e) {
|
|
8431
|
-
warn('failed to measure SVG length', e);
|
|
8432
|
-
}
|
|
8418
|
+
var rectRef = function rectRef(r) {
|
|
8419
|
+
try {
|
|
8420
|
+
if (isProgressBar && r) setTotalLength(r.getTotalLength());
|
|
8421
|
+
} catch (e) {
|
|
8422
|
+
debug('failed to measure SVG length', e);
|
|
8433
8423
|
}
|
|
8434
|
-
|
|
8435
|
-
if (measuredLength === 0) interval = setInterval(measureTotalLength, 250);
|
|
8436
|
-
return function () {
|
|
8437
|
-
if (interval) clearInterval(interval);
|
|
8438
|
-
};
|
|
8439
|
-
}, [totalLength]);
|
|
8424
|
+
};
|
|
8440
8425
|
return /*#__PURE__*/React__default.createElement(SvgOverlay, _assign({
|
|
8441
8426
|
height: "100%",
|
|
8442
8427
|
fill: "none",
|
|
@@ -8469,7 +8454,7 @@ function IdCardBorderSvg(_a) {
|
|
|
8469
8454
|
}
|
|
8470
8455
|
var IdCardBorderContainer = styled.div(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n & > .pulse {\n position: absolute;\n animation: glow-grow 2s ease-out infinite;\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 @keyframes glow-grow {\n 0% {\n opacity: 0;\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n"], ["\n & > .pulse {\n position: absolute;\n animation: glow-grow 2s ease-out infinite;\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 @keyframes glow-grow {\n 0% {\n opacity: 0;\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n"])));
|
|
8471
8456
|
var SvgOverlay = styled.svg(templateObject_4$d || (templateObject_4$d = __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"])));
|
|
8472
|
-
var IdCardBorderRect = styled.rect(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n &.progress {\n
|
|
8457
|
+
var IdCardBorderRect = styled.rect(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n &.progress {\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"], ["\n &.progress {\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"])), function (props) {
|
|
8473
8458
|
var _a;
|
|
8474
8459
|
return (_a = props.$speed) !== null && _a !== void 0 ? _a : '3s';
|
|
8475
8460
|
}, function (props) {
|
|
@@ -13696,14 +13681,13 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13696
13681
|
idCardGuideStatus = _1 === void 0 ? 'ready' : _1,
|
|
13697
13682
|
idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
|
|
13698
13683
|
idCardGuideBorderColor = _a.idCardGuideBorderColor,
|
|
13699
|
-
|
|
13700
|
-
|
|
13701
|
-
|
|
13702
|
-
|
|
13703
|
-
|
|
13704
|
-
|
|
13705
|
-
|
|
13706
|
-
rawVerbiage = _5 === void 0 ? {} : _5;
|
|
13684
|
+
idCardCaptureProgress = _a.idCardCaptureProgress,
|
|
13685
|
+
_2 = _a.idCardCaptureGuideImages,
|
|
13686
|
+
userSuppliedImages = _2 === void 0 ? defaultIdCaptureGuideImages : _2,
|
|
13687
|
+
_3 = _a.classNames,
|
|
13688
|
+
classNames = _3 === void 0 ? {} : _3,
|
|
13689
|
+
_4 = _a.verbiage,
|
|
13690
|
+
rawVerbiage = _4 === void 0 ? {} : _4;
|
|
13707
13691
|
var cameraRef = useContext(CameraStateContext).cameraRef;
|
|
13708
13692
|
var verbiage = useTranslations(rawVerbiage, {
|
|
13709
13693
|
idFrontInstructionText: 'Display the front of your ID card...',
|
|
@@ -13717,17 +13701,17 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13717
13701
|
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';
|
|
13718
13702
|
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;
|
|
13719
13703
|
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';
|
|
13720
|
-
var
|
|
13721
|
-
idCardGuideRef =
|
|
13722
|
-
|
|
13723
|
-
idCardGuideWidth =
|
|
13724
|
-
|
|
13725
|
-
idCardGuideHeight =
|
|
13704
|
+
var _5 = useResizeObserver(),
|
|
13705
|
+
idCardGuideRef = _5.ref,
|
|
13706
|
+
_6 = _5.width,
|
|
13707
|
+
idCardGuideWidth = _6 === void 0 ? 0 : _6,
|
|
13708
|
+
_7 = _5.height,
|
|
13709
|
+
idCardGuideHeight = _7 === void 0 ? 0 : _7;
|
|
13726
13710
|
var idCaptureGuideImages = useGuideImages(userSuppliedImages);
|
|
13727
13711
|
var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
|
|
13728
|
-
var
|
|
13729
|
-
aspectRatio =
|
|
13730
|
-
setAspectRatio =
|
|
13712
|
+
var _8 = useState(undefined),
|
|
13713
|
+
aspectRatio = _8[0],
|
|
13714
|
+
setAspectRatio = _8[1];
|
|
13731
13715
|
var onImageLoaded = useCallback(function (e) {
|
|
13732
13716
|
var _a, _b, _c, _d;
|
|
13733
13717
|
var img = e.currentTarget;
|
|
@@ -13769,7 +13753,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13769
13753
|
borderColor: idCardGuideBorderColor,
|
|
13770
13754
|
aspectRatio: aspectRatio,
|
|
13771
13755
|
"$isVisible": requestedAction !== 'FLIP_ID',
|
|
13772
|
-
progress: requestedAction === 'VERIFY_LIVENESS' ?
|
|
13756
|
+
progress: requestedAction === 'VERIFY_LIVENESS' ? undefined : idCardCaptureProgress
|
|
13773
13757
|
}, /*#__PURE__*/React__default.createElement(IdCardGuideImage, {
|
|
13774
13758
|
alt: "",
|
|
13775
13759
|
className: classNames.idCardGuideImage,
|
|
@@ -14296,7 +14280,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
14296
14280
|
requestedAction: requestedAction,
|
|
14297
14281
|
satisfied: satisfied,
|
|
14298
14282
|
idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
|
|
14299
|
-
idCardCaptureProgress: countdownStartedAt ? 1 : 0,
|
|
14283
|
+
idCardCaptureProgress: !!countdownStartedAt ? 1 : 0,
|
|
14300
14284
|
idCardCaptureGuideImages: idCardCaptureGuideImages,
|
|
14301
14285
|
faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
|
|
14302
14286
|
idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
|