vishwam-react-ent-sdk 1.0.3 → 1.0.4

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.
@@ -900,6 +900,7 @@ function SvgCam(props) {
900
900
  var _templateObject$1, _templateObject2$1, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6;
901
901
  var readDocumentCall = function readDocumentCall(url, appId, referenceId, userId, decision, isBack, expiryIn, docType, documentType, img, img2, type) {
902
902
  try {
903
+ console.log('Initiating API calls');
903
904
  var formData = new FormData();
904
905
  formData.append('app_id', appId);
905
906
  formData.append('referenceId', referenceId);
@@ -980,9 +981,11 @@ function ReadDocument(_ref) {
980
981
  return Promise.resolve(function () {
981
982
  if (videoElement != null) {
982
983
  var _temp4 = function _temp4() {
984
+ console.log('Returing captured image: ' + _imageStr);
983
985
  stopCamera();
984
986
  return _imageStr;
985
987
  };
988
+ console.log('Initiating capture');
986
989
  window.removeEventListener('deviceorientation', handleOrientation, true);
987
990
  var videoHeight = videoElement.offsetWidth * aspectRatios[docType];
988
991
  var hiddenCanvas = document.getElementById('hidden-canvas');
@@ -1000,6 +1003,7 @@ function ReadDocument(_ref) {
1000
1003
  ctx.translate(ctx.canvas.width, 0);
1001
1004
  ctx.scale(-1, 1);
1002
1005
  }
1006
+ console.log('Capturing the document with aspect ratio');
1003
1007
  if (docType === 'pwd' || docType === 'others') {
1004
1008
  destWidth = destWidth * 0.5;
1005
1009
  destHeight = destWidth * aspectRatios[docType];
@@ -1096,6 +1100,7 @@ function ReadDocument(_ref) {
1096
1100
  var capture = useCallback(function () {
1097
1101
  try {
1098
1102
  var _temp2 = function _temp2(imgStr) {
1103
+ console.log('Image capture succeeded');
1099
1104
  var img = imgStr.split(',')[1];
1100
1105
  var mimeString = imgStr.split(',')[0].split(':')[1].split(';')[0];
1101
1106
  return Promise.resolve(resizeImage(imgStr, 224, 224)).then(function (img2Str) {