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.
@@ -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.86';
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 _e = _a.classNames,
1373
- classNames = _e === void 0 ? {} : _e,
1374
- _f = _a.width,
1375
- width = _f === void 0 ? 0 : _f,
1376
- _g = _a.height,
1377
- height = _g === void 0 ? 0 : _g,
1378
- _h = _a.padding,
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
- _j = _a.isMirrored,
1383
- isMirrored = _j === void 0 ? false : _j,
1384
- _k = _a.instruction,
1385
- instruction = _k === void 0 ? '' : _k,
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 _l = React.useContext(GuideOrientationContext),
1390
- orientation = _l.orientation,
1391
- wrapperRef = _l.wrapperRef,
1392
- wrapperWidth = _l.wrapperWidth,
1393
- wrapperHeight = _l.wrapperHeight,
1394
- imageAspectRatio = _l.imageAspectRatio,
1395
- wrapperAspectRatio = _l.wrapperAspectRatio,
1396
- onImageLoaded = _l.onImageLoaded,
1397
- setDimensions = _l.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: {