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
|
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
234
234
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
var webSdkVersion = '2.1.
|
|
237
|
+
var webSdkVersion = '2.1.77';
|
|
238
238
|
|
|
239
239
|
function getPlatform() {
|
|
240
240
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -8435,38 +8435,23 @@ function IdCardBorderSvg(_a) {
|
|
|
8435
8435
|
_b = _a.borderOpacity,
|
|
8436
8436
|
borderOpacity = _b === void 0 ? 1 : _b,
|
|
8437
8437
|
_c = _a.progress,
|
|
8438
|
-
progress = _c === void 0 ?
|
|
8438
|
+
progress = _c === void 0 ? 0 : _c,
|
|
8439
8439
|
_d = _a.progressPaused,
|
|
8440
8440
|
progressPaused = _d === void 0 ? false : _d,
|
|
8441
8441
|
_e = _a.isProgressBar,
|
|
8442
8442
|
isProgressBar = _e === void 0 ? false : _e,
|
|
8443
8443
|
props = __rest(_a, ["borderRadius", "borderColor", "borderWidth", "borderOpacity", "progress", "progressPaused", "isProgressBar"]);
|
|
8444
|
-
var rectRef = React.useRef(null);
|
|
8445
8444
|
var _f = React.useState(0),
|
|
8446
8445
|
totalLength = _f[0],
|
|
8447
8446
|
setTotalLength = _f[1];
|
|
8448
8447
|
var resolvedProgress = progress * totalLength;
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
var _a, _b;
|
|
8455
|
-
try {
|
|
8456
|
-
measuredLength = (_b = (_a = rectRef.current) === null || _a === void 0 ? void 0 : _a.getTotalLength()) !== null && _b !== void 0 ? _b : 0;
|
|
8457
|
-
if (measuredLength === 0) return;
|
|
8458
|
-
setTotalLength(measuredLength);
|
|
8459
|
-
if (interval) clearInterval(interval);
|
|
8460
|
-
} catch (e) {
|
|
8461
|
-
warn('failed to measure SVG length', e);
|
|
8462
|
-
}
|
|
8448
|
+
var rectRef = function rectRef(r) {
|
|
8449
|
+
try {
|
|
8450
|
+
if (isProgressBar && r) setTotalLength(r.getTotalLength());
|
|
8451
|
+
} catch (e) {
|
|
8452
|
+
debug('failed to measure SVG length', e);
|
|
8463
8453
|
}
|
|
8464
|
-
|
|
8465
|
-
if (measuredLength === 0) interval = setInterval(measureTotalLength, 250);
|
|
8466
|
-
return function () {
|
|
8467
|
-
if (interval) clearInterval(interval);
|
|
8468
|
-
};
|
|
8469
|
-
}, [totalLength]);
|
|
8454
|
+
};
|
|
8470
8455
|
return /*#__PURE__*/React__namespace.default.createElement(SvgOverlay, _assign({
|
|
8471
8456
|
height: "100%",
|
|
8472
8457
|
fill: "none",
|
|
@@ -8499,7 +8484,7 @@ function IdCardBorderSvg(_a) {
|
|
|
8499
8484
|
}
|
|
8500
8485
|
var IdCardBorderContainer = styled__default.default.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"])));
|
|
8501
8486
|
var SvgOverlay = styled__default.default.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"])));
|
|
8502
|
-
var IdCardBorderRect = styled__default.default.rect(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n &.progress {\n
|
|
8487
|
+
var IdCardBorderRect = styled__default.default.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) {
|
|
8503
8488
|
var _a;
|
|
8504
8489
|
return (_a = props.$speed) !== null && _a !== void 0 ? _a : '3s';
|
|
8505
8490
|
}, function (props) {
|
|
@@ -13726,14 +13711,13 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13726
13711
|
idCardGuideStatus = _1 === void 0 ? 'ready' : _1,
|
|
13727
13712
|
idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
|
|
13728
13713
|
idCardGuideBorderColor = _a.idCardGuideBorderColor,
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
rawVerbiage = _5 === void 0 ? {} : _5;
|
|
13714
|
+
idCardCaptureProgress = _a.idCardCaptureProgress,
|
|
13715
|
+
_2 = _a.idCardCaptureGuideImages,
|
|
13716
|
+
userSuppliedImages = _2 === void 0 ? defaultIdCaptureGuideImages : _2,
|
|
13717
|
+
_3 = _a.classNames,
|
|
13718
|
+
classNames = _3 === void 0 ? {} : _3,
|
|
13719
|
+
_4 = _a.verbiage,
|
|
13720
|
+
rawVerbiage = _4 === void 0 ? {} : _4;
|
|
13737
13721
|
var cameraRef = React.useContext(CameraStateContext).cameraRef;
|
|
13738
13722
|
var verbiage = useTranslations(rawVerbiage, {
|
|
13739
13723
|
idFrontInstructionText: 'Display the front of your ID card...',
|
|
@@ -13747,17 +13731,17 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13747
13731
|
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';
|
|
13748
13732
|
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;
|
|
13749
13733
|
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';
|
|
13750
|
-
var
|
|
13751
|
-
idCardGuideRef =
|
|
13752
|
-
|
|
13753
|
-
idCardGuideWidth =
|
|
13754
|
-
|
|
13755
|
-
idCardGuideHeight =
|
|
13734
|
+
var _5 = useResizeObserver__default.default(),
|
|
13735
|
+
idCardGuideRef = _5.ref,
|
|
13736
|
+
_6 = _5.width,
|
|
13737
|
+
idCardGuideWidth = _6 === void 0 ? 0 : _6,
|
|
13738
|
+
_7 = _5.height,
|
|
13739
|
+
idCardGuideHeight = _7 === void 0 ? 0 : _7;
|
|
13756
13740
|
var idCaptureGuideImages = useGuideImages(userSuppliedImages);
|
|
13757
13741
|
var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
|
|
13758
|
-
var
|
|
13759
|
-
aspectRatio =
|
|
13760
|
-
setAspectRatio =
|
|
13742
|
+
var _8 = React.useState(undefined),
|
|
13743
|
+
aspectRatio = _8[0],
|
|
13744
|
+
setAspectRatio = _8[1];
|
|
13761
13745
|
var onImageLoaded = React.useCallback(function (e) {
|
|
13762
13746
|
var _a, _b, _c, _d;
|
|
13763
13747
|
var img = e.currentTarget;
|
|
@@ -13799,7 +13783,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13799
13783
|
borderColor: idCardGuideBorderColor,
|
|
13800
13784
|
aspectRatio: aspectRatio,
|
|
13801
13785
|
"$isVisible": requestedAction !== 'FLIP_ID',
|
|
13802
|
-
progress: requestedAction === 'VERIFY_LIVENESS' ?
|
|
13786
|
+
progress: requestedAction === 'VERIFY_LIVENESS' ? undefined : idCardCaptureProgress
|
|
13803
13787
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
|
|
13804
13788
|
alt: "",
|
|
13805
13789
|
className: classNames.idCardGuideImage,
|
|
@@ -14326,7 +14310,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
14326
14310
|
requestedAction: requestedAction,
|
|
14327
14311
|
satisfied: satisfied,
|
|
14328
14312
|
idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
|
|
14329
|
-
idCardCaptureProgress: countdownStartedAt ? 1 : 0,
|
|
14313
|
+
idCardCaptureProgress: !!countdownStartedAt ? 1 : 0,
|
|
14330
14314
|
idCardCaptureGuideImages: idCardCaptureGuideImages,
|
|
14331
14315
|
faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
|
|
14332
14316
|
idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
|