@regulaforensics/ionic-native-document-reader 7.1.0 → 7.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/ionic-native-document-reader",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "Ionic Native wrapper for cordova documentreader",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -12,9 +12,9 @@
12
12
  "lint": "eslint"
13
13
  },
14
14
  "dependencies": {
15
- "@regulaforensics/cordova-plugin-document-reader-api": "7.1.0",
16
- "@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "7.1.0",
17
- "@regulaforensics/ionic-native-document-reader": "7.1.0",
15
+ "@regulaforensics/cordova-plugin-document-reader-api": "7.2.0",
16
+ "@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "7.2.0",
17
+ "@regulaforensics/ionic-native-document-reader": "7.2.0",
18
18
  "@awesome-cordova-plugins/camera": "6.6.0",
19
19
  "@awesome-cordova-plugins/file": "6.6.0",
20
20
  "@capacitor/android": "5.6.0",
@@ -1,5 +1,5 @@
1
1
  import { IonPage } from '@ionic/react'
2
- import { DocumentReader, DocumentReaderScenario, Enum, DocumentReaderCompletion, DocumentReaderResults, DocumentReaderNotification, ScannerConfig, RecognizeConfig, DocReaderConfig } from '@regulaforensics/ionic-native-document-reader'
2
+ import { DocumentReader, DocumentReaderScenario, Enum, DocumentReaderCompletion, DocumentReaderResults, DocumentReaderNotification, ScannerConfig, RecognizeConfig, DocReaderConfig, Functionality } from '@regulaforensics/ionic-native-document-reader'
3
3
  import React from "react"
4
4
  import { DirectoryEntry, File, FileEntry, IFile } from '@awesome-cordova-plugins/file'
5
5
  import { Camera, DestinationType, MediaType, PictureSourceType } from '@awesome-cordova-plugins/camera'
@@ -32,9 +32,9 @@ function onInitialized() {
32
32
  status.innerHTML = "Ready"
33
33
  status.style.backgroundColor = "green"
34
34
 
35
- DocumentReader.setFunctionality({
36
- showCaptureButton: true
37
- })
35
+ var functionality = new Functionality()
36
+ functionality.showCaptureButton = true
37
+ DocumentReader.setFunctionality(functionality)
38
38
  }
39
39
 
40
40
  cancelButtonRef.addEventListener("click", hideRfidUI)
@@ -96,7 +96,7 @@ function handleCompletion(completion: DocumentReaderCompletion) {
96
96
  hideRfidUI()
97
97
  displayResults(completion.results!)
98
98
  }
99
- } else if (actionSuccess(completion.action!))
99
+ } else if (actionSuccess(completion.action!) || actionError(completion.action!))
100
100
  handleResults(completion.results!)
101
101
  }
102
102
 
@@ -200,7 +200,7 @@ function postInitialize(scenarios: Array<any>, canRfid: boolean) {
200
200
  }
201
201
 
202
202
  function handleResults(results: DocumentReaderResults) {
203
- if (doRfid && !isReadingRfid && results != null) {
203
+ if (doRfid && !isReadingRfid && results != null && results.chipPage != 0) {
204
204
  // customRFID()
205
205
  usualRFID()
206
206
  } else {