idmission-web-sdk 1.0.379 → 1.0.381

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.
@@ -49,7 +49,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
49
49
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
50
50
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
51
51
 
52
- var webSdkVersion = '1.0.379';
52
+ var webSdkVersion = '1.0.381';
53
53
 
54
54
  function getPlatform() {
55
55
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2791,7 +2791,7 @@ function DocumentDetectionModelProvider(_a) {
2791
2791
  _d = _a.documentDetectionModelDelegate,
2792
2792
  documentDetectionModelDelegate = _d === void 0 ? 'GPU' : _d,
2793
2793
  _e = _a.documentDetectionModelScoreThreshold,
2794
- documentDetectionModelScoreThreshold = _e === void 0 ? 0.1 : _e,
2794
+ documentDetectionModelScoreThreshold = _e === void 0 ? 0.01 : _e,
2795
2795
  _f = _a.documentDetectionModelLoadTimeoutMs,
2796
2796
  documentDetectionModelLoadTimeoutMs = _f === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _f;
2797
2797
  var _g = React.useContext(CameraStateContext),
@@ -5381,14 +5381,31 @@ var CapturedDocumentImg = function CapturedDocumentImg(_a) {
5381
5381
  setUrl(cropToDetectedObjectBox(imgRef.current, bbox).toDataURL('image/jpeg', 0.95));
5382
5382
  }, 100);
5383
5383
  }
5384
- console.log('rendering captured document', image);
5385
- return /*#__PURE__*/React__default['default'].createElement("img", {
5384
+ return /*#__PURE__*/React__default['default'].createElement("div", {
5385
+ style: {
5386
+ position: 'relative'
5387
+ }
5388
+ }, /*#__PURE__*/React__default['default'].createElement("img", {
5386
5389
  ref: imgRef,
5387
5390
  alt: alt,
5388
5391
  className: className,
5389
5392
  src: url,
5390
- onLoad: onLoaded
5391
- });
5393
+ onLoad: onLoaded,
5394
+ onClick: function onClick() {
5395
+ fetch(image.imageData).then(function (resp) {
5396
+ return resp.blob();
5397
+ }).then(function (blob) {
5398
+ var _a;
5399
+ var url = URL.createObjectURL(new Blob([blob]));
5400
+ var link = document.createElement('a');
5401
+ link.href = url;
5402
+ link.setAttribute('download', 'FileName.jpg');
5403
+ document.body.appendChild(link);
5404
+ link.click();
5405
+ (_a = link.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(link);
5406
+ });
5407
+ }
5408
+ }));
5392
5409
  };
5393
5410
 
5394
5411
  var OverlayInstruction = styled__default['default'].p(templateObject_1$v || (templateObject_1$v = tslib.__makeTemplateObject(["\n font-size: 18px;\n margin: 30px 0;\n"], ["\n font-size: 18px;\n margin: 30px 0;\n"])));