idmission-web-sdk 1.0.86 → 1.0.88
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/DocumentCaptureGuideOverlay.d.ts +1 -1
- package/dist/sdk2.cjs.development.js +27 -25
- 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 -25
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +27 -25
- 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/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +12 -0
- package/dist/themes/index.d.ts +4 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -857,4 +857,4 @@ export type DocumentCaptureGuideOverlayProps = {
|
|
|
857
857
|
landscapeGuidesImageUrl?: string;
|
|
858
858
|
onClick?: () => void;
|
|
859
859
|
};
|
|
860
|
-
export declare const DocumentCaptureGuideOverlay: ({ classNames, width, height, padding, borderWidth, borderColor, isMirrored, instruction, portraitGuidesImageUrl, landscapeGuidesImageUrl, onClick, }: DocumentCaptureGuideOverlayProps) => ReactElement;
|
|
860
|
+
export declare const DocumentCaptureGuideOverlay: ({ classNames, width, height, padding: userSuppliedPadding, borderWidth, borderColor, isMirrored, instruction, portraitGuidesImageUrl, landscapeGuidesImageUrl, onClick, }: DocumentCaptureGuideOverlayProps) => ReactElement;
|
|
@@ -46,7 +46,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
46
46
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
47
47
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
48
48
|
|
|
49
|
-
var webSdkVersion = '1.0.
|
|
49
|
+
var webSdkVersion = '1.0.88';
|
|
50
50
|
|
|
51
51
|
function getPlatform() {
|
|
52
52
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -783,7 +783,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
783
783
|
}, []);
|
|
784
784
|
React.useEffect(function () {
|
|
785
785
|
if (precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie) {
|
|
786
|
-
setSelfieImage(precapturedDocuments.selfie.imageData);
|
|
786
|
+
setSelfieImage(dataUrlToBase64Sync(precapturedDocuments.selfie.imageData));
|
|
787
787
|
}
|
|
788
788
|
}, [precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie]);
|
|
789
789
|
var buildSubmissionPayload = React.useCallback(function () {
|
|
@@ -1368,33 +1368,32 @@ var GuideImage = styled__default['default'].img(templateObject_7 || (templateObj
|
|
|
1368
1368
|
return props.$height ? "height: ".concat(props.$height, "px; max-height: ").concat(props.$height, "px;") : "max-width: none;";
|
|
1369
1369
|
});
|
|
1370
1370
|
var DocumentCaptureGuideOverlay = function DocumentCaptureGuideOverlay(_a) {
|
|
1371
|
-
var _b, _c, _d;
|
|
1372
|
-
var
|
|
1373
|
-
classNames =
|
|
1374
|
-
|
|
1375
|
-
width =
|
|
1376
|
-
|
|
1377
|
-
height =
|
|
1378
|
-
|
|
1379
|
-
padding = _h === void 0 ? isMobile() ? 0 : 50 : _h,
|
|
1371
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1372
|
+
var _l = _a.classNames,
|
|
1373
|
+
classNames = _l === void 0 ? {} : _l,
|
|
1374
|
+
_m = _a.width,
|
|
1375
|
+
width = _m === void 0 ? 0 : _m,
|
|
1376
|
+
_o = _a.height,
|
|
1377
|
+
height = _o === void 0 ? 0 : _o,
|
|
1378
|
+
userSuppliedPadding = _a.padding,
|
|
1380
1379
|
borderWidth = _a.borderWidth,
|
|
1381
1380
|
borderColor = _a.borderColor,
|
|
1382
|
-
|
|
1383
|
-
isMirrored =
|
|
1384
|
-
|
|
1385
|
-
instruction =
|
|
1381
|
+
_p = _a.isMirrored,
|
|
1382
|
+
isMirrored = _p === void 0 ? false : _p,
|
|
1383
|
+
_q = _a.instruction,
|
|
1384
|
+
instruction = _q === void 0 ? '' : _q,
|
|
1386
1385
|
portraitGuidesImageUrl = _a.portraitGuidesImageUrl,
|
|
1387
1386
|
landscapeGuidesImageUrl = _a.landscapeGuidesImageUrl,
|
|
1388
1387
|
onClick = _a.onClick;
|
|
1389
|
-
var
|
|
1390
|
-
orientation =
|
|
1391
|
-
wrapperRef =
|
|
1392
|
-
wrapperWidth =
|
|
1393
|
-
wrapperHeight =
|
|
1394
|
-
imageAspectRatio =
|
|
1395
|
-
wrapperAspectRatio =
|
|
1396
|
-
onImageLoaded =
|
|
1397
|
-
setDimensions =
|
|
1388
|
+
var _r = React.useContext(GuideOrientationContext),
|
|
1389
|
+
orientation = _r.orientation,
|
|
1390
|
+
wrapperRef = _r.wrapperRef,
|
|
1391
|
+
wrapperWidth = _r.wrapperWidth,
|
|
1392
|
+
wrapperHeight = _r.wrapperHeight,
|
|
1393
|
+
imageAspectRatio = _r.imageAspectRatio,
|
|
1394
|
+
wrapperAspectRatio = _r.wrapperAspectRatio,
|
|
1395
|
+
onImageLoaded = _r.onImageLoaded,
|
|
1396
|
+
setDimensions = _r.setDimensions;
|
|
1398
1397
|
var theme = styled.useTheme();
|
|
1399
1398
|
if (borderWidth === undefined) borderWidth = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 4;
|
|
1400
1399
|
if (width == 0) width = wrapperWidth;
|
|
@@ -1405,6 +1404,7 @@ var DocumentCaptureGuideOverlay = function DocumentCaptureGuideOverlay(_a) {
|
|
|
1405
1404
|
height: height
|
|
1406
1405
|
});
|
|
1407
1406
|
}, [height, setDimensions, width]);
|
|
1407
|
+
var padding = (userSuppliedPadding !== null && userSuppliedPadding !== void 0 ? userSuppliedPadding : isMobile()) ? (_g = (_f = (_e = theme.idCapture) === null || _e === void 0 ? void 0 : _e.guideBox) === null || _f === void 0 ? void 0 : _f.desktopPadding) !== null && _g !== void 0 ? _g : 0 : (_k = (_j = (_h = theme.idCapture) === null || _h === void 0 ? void 0 : _h.guideBox) === null || _j === void 0 ? void 0 : _j.mobilePadding) !== null && _k !== void 0 ? _k : 50;
|
|
1408
1408
|
var paddingAndBorderPx = padding * 2 + borderWidth * 2;
|
|
1409
1409
|
var imgSrc = orientation === 'portrait' ? portraitGuidesImageUrl : landscapeGuidesImageUrl;
|
|
1410
1410
|
var imageWidth = undefined,
|
|
@@ -14223,7 +14223,9 @@ var defaultTheme = {
|
|
|
14223
14223
|
guideBox: {
|
|
14224
14224
|
unsatisfiedColor: 'white',
|
|
14225
14225
|
satisfiedColor: 'var(--idm-color-positive-500)',
|
|
14226
|
-
borderWidth: 4
|
|
14226
|
+
borderWidth: 4,
|
|
14227
|
+
desktopPadding: 0,
|
|
14228
|
+
mobilePadding: 50
|
|
14227
14229
|
}
|
|
14228
14230
|
},
|
|
14229
14231
|
selfieCapture: {
|