@regulaforensics/document-reader 8.2.204-beta → 8.3.246-beta
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/README.md +2 -3
- package/RNDocumentReader.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +3 -1
- package/examples/capacitor/README.md +10 -0
- package/examples/capacitor/index.html +2 -7
- package/examples/capacitor/index.tsx +39 -0
- package/examples/capacitor/package.json +3 -3
- package/examples/capacitor/scripts/setup.sh +4 -0
- package/examples/capacitor/src/extra/bt_device.tsx +8 -7
- package/examples/capacitor/src/extra/custom_rfid.tsx +8 -8
- package/examples/capacitor/src/main.css +4 -1
- package/examples/capacitor/src/main.html +1 -4
- package/examples/capacitor/src/main.tsx +58 -94
- package/examples/ionic/README.md +10 -0
- package/examples/ionic/config.xml +2 -0
- package/examples/ionic/index.tsx +54 -0
- package/examples/ionic/package.json +3 -3
- package/examples/ionic/src/extra/{bt_device.ts → bt_device.tsx} +8 -7
- package/examples/ionic/src/extra/{custom_rfid.ts → custom_rfid.tsx} +8 -8
- package/examples/ionic/src/main.css +4 -1
- package/examples/ionic/src/main.html +1 -4
- package/examples/ionic/src/main.tsx +171 -0
- package/examples/ionic/tsconfig.json +3 -2
- package/examples/react_native/README.md +10 -0
- package/examples/react_native/index.tsx +28 -5
- package/examples/react_native/package-lock.json +476 -421
- package/examples/react_native/package.json +10 -10
- package/examples/react_native/src/extra/bt_device.tsx +8 -8
- package/examples/react_native/src/extra/custom_rfid.tsx +8 -9
- package/examples/react_native/src/main.css +4 -1
- package/examples/react_native/src/main.html +1 -4
- package/examples/react_native/src/main.tsx +59 -84
- package/ios/RGLWConfig.m +2 -0
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/www/capacitor/index.js +16 -16
- package/www/capacitor/params/process_params/ProcessParams.js +7 -0
- package/www/cordova.js +23 -16
- package/www/react-native/index.js +16 -16
- package/www/react-native/params/process_params/ProcessParams.js +7 -0
- package/www/types/index.d.ts +8 -8
- package/www/types/params/process_params/ProcessParams.d.ts +4 -0
- package/examples/cordova/.vscode/launch.json +0 -28
- package/examples/cordova/.vscode/typings/cordova/cordova.d.ts +0 -80
- package/examples/cordova/README.md +0 -12
- package/examples/cordova/config.xml +0 -30
- package/examples/cordova/package-lock.json +0 -1314
- package/examples/cordova/package.json +0 -32
- package/examples/cordova/scripts/android.sh +0 -8
- package/examples/cordova/scripts/ios.sh +0 -8
- package/examples/cordova/scripts/setup.sh +0 -8
- package/examples/cordova/www/images/document.png +0 -0
- package/examples/cordova/www/images/logo.png +0 -0
- package/examples/cordova/www/images/portrait.png +0 -0
- package/examples/cordova/www/index.html +0 -6
- package/examples/cordova/www/index.js +0 -40
- package/examples/cordova/www/src/extra/bt_device.js +0 -31
- package/examples/cordova/www/src/extra/custom_rfid.js +0 -60
- package/examples/cordova/www/src/main.css +0 -131
- package/examples/cordova/www/src/main.html +0 -41
- package/examples/cordova/www/src/main.js +0 -202
- package/examples/ionic/index.ts +0 -16
- package/examples/ionic/src/main.ts +0 -213
|
@@ -229,6 +229,12 @@ export class ProcessParams {
|
|
|
229
229
|
this._set({ "generateAlpha2Codes": val });
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
get disableAuthResolutionFilter() { return this._disableAuthResolutionFilter; }
|
|
233
|
+
set disableAuthResolutionFilter(val) {
|
|
234
|
+
this._disableAuthResolutionFilter = val;
|
|
235
|
+
this._set({ "disableAuthResolutionFilter": val });
|
|
236
|
+
}
|
|
237
|
+
|
|
232
238
|
get barcodeParserType() { return this._barcodeParserType; }
|
|
233
239
|
set barcodeParserType(val) {
|
|
234
240
|
this._barcodeParserType = val;
|
|
@@ -492,6 +498,7 @@ export class ProcessParams {
|
|
|
492
498
|
result._generateDTCVC = jsonObject["generateDTCVC"];
|
|
493
499
|
result._strictDLCategoryExpiry = jsonObject["strictDLCategoryExpiry"];
|
|
494
500
|
result._generateAlpha2Codes = jsonObject["generateAlpha2Codes"];
|
|
501
|
+
result._disableAuthResolutionFilter = jsonObject["disableAuthResolutionFilter"];
|
|
495
502
|
result._barcodeParserType = jsonObject["barcodeParserType"];
|
|
496
503
|
result._perspectiveAngle = jsonObject["perspectiveAngle"];
|
|
497
504
|
result._minDPI = jsonObject["minDPI"];
|
package/www/types/index.d.ts
CHANGED
|
@@ -251,7 +251,7 @@ export class DocumentReader {
|
|
|
251
251
|
connectBluetoothDevice(deviceName: string): Promise<boolean>;
|
|
252
252
|
|
|
253
253
|
/** Used to deinitialize Document Reader and free up RAM as a consequence of this. */
|
|
254
|
-
deinitializeReader():
|
|
254
|
+
deinitializeReader(): void;
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
257
|
* Allows you to download a database from the Regula server.
|
|
@@ -296,10 +296,10 @@ export class DocumentReader {
|
|
|
296
296
|
removeDatabase(): Promise<void>;
|
|
297
297
|
|
|
298
298
|
/** Used to start the processing of the next page of the document once the current one is processed. */
|
|
299
|
-
startNewPage():
|
|
299
|
+
startNewPage(): void;
|
|
300
300
|
|
|
301
301
|
/** Used to start a scanning process. */
|
|
302
|
-
startNewSession():
|
|
302
|
+
startNewSession(): void;
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* Used for multiple frames processing which are captured from the camera(old UI).
|
|
@@ -335,22 +335,22 @@ export class DocumentReader {
|
|
|
335
335
|
rfid(config: RFIDConfig): void;
|
|
336
336
|
|
|
337
337
|
/** Stops the document scanner if it's active. */
|
|
338
|
-
stopScanner():
|
|
338
|
+
stopScanner(): void;
|
|
339
339
|
|
|
340
340
|
/** Stops the RFID reader if it's active. */
|
|
341
|
-
stopRFIDReader():
|
|
341
|
+
stopRFIDReader(): void;
|
|
342
342
|
|
|
343
343
|
/** Used to pass certificates to Document Reader that will be used during the
|
|
344
344
|
* RFID chip processing.
|
|
345
345
|
*
|
|
346
346
|
* @param certificates - PKD certificates.
|
|
347
347
|
*/
|
|
348
|
-
addPKDCertificates(certificates: [PKDCertificate]):
|
|
348
|
+
addPKDCertificates(certificates: [PKDCertificate]): void;
|
|
349
349
|
|
|
350
350
|
/** It's used to remove certificates from your app that are used during the
|
|
351
351
|
* RFID chip processing.
|
|
352
352
|
*/
|
|
353
|
-
clearPKDCertificates():
|
|
353
|
+
clearPKDCertificates(): void;
|
|
354
354
|
|
|
355
355
|
/** Sets the given `TCCParams` to the RFID session.
|
|
356
356
|
* The parameters are required to be set before starting RFID session.
|
|
@@ -368,7 +368,7 @@ export class DocumentReader {
|
|
|
368
368
|
finalizePackage(): Promise<[action: DocReaderAction, info: TransactionInfo | null, error: DocReaderException | null]>;
|
|
369
369
|
|
|
370
370
|
/** It's used to end transaction during backend processing. */
|
|
371
|
-
endBackendTransaction():
|
|
371
|
+
endBackendTransaction(): void;
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
/**
|
|
@@ -193,6 +193,10 @@ export declare class ProcessParams {
|
|
|
193
193
|
*/
|
|
194
194
|
strictDLCategoryExpiry?: boolean;
|
|
195
195
|
generateAlpha2Codes?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* This parameter if enabled will ignore the minimum barcode resolution needed to start processing.
|
|
198
|
+
*/
|
|
199
|
+
disableAuthResolutionFilter?: boolean;
|
|
196
200
|
/**
|
|
197
201
|
* There are documents that contain barcodes which data can be parsed only
|
|
198
202
|
* if document type verification is performed. The following property allows
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"name": "Debug Android on emulator",
|
|
9
|
-
"type": "cordova",
|
|
10
|
-
"request": "launch",
|
|
11
|
-
"platform": "android",
|
|
12
|
-
"target": "emulator",
|
|
13
|
-
"port": 9222,
|
|
14
|
-
"sourceMaps": true,
|
|
15
|
-
"cwd": "${workspaceFolder}"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "Debug Android on device",
|
|
19
|
-
"type": "cordova",
|
|
20
|
-
"request": "launch",
|
|
21
|
-
"platform": "android",
|
|
22
|
-
"target": "device",
|
|
23
|
-
"port": 9222,
|
|
24
|
-
"sourceMaps": true,
|
|
25
|
-
"cwd": "${workspaceFolder}"
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// Type definitions for Apache Cordova
|
|
2
|
-
// Project: http://cordova.apache.org
|
|
3
|
-
// Definitions by: Microsoft Open Technologies Inc. <http://msopentech.com>
|
|
4
|
-
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
5
|
-
//
|
|
6
|
-
// Copyright (c) Microsoft Open Technologies, Inc.
|
|
7
|
-
// Licensed under the MIT license.
|
|
8
|
-
|
|
9
|
-
interface Cordova {
|
|
10
|
-
/** Invokes native functionality by specifying corresponding service name, action and optional parameters.
|
|
11
|
-
* @param success A success callback function.
|
|
12
|
-
* @param fail An error callback function.
|
|
13
|
-
* @param service The service name to call on the native side (corresponds to a native class).
|
|
14
|
-
* @param action The action name to call on the native side (generally corresponds to the native class method).
|
|
15
|
-
* @param args An array of arguments to pass into the native environment.
|
|
16
|
-
*/
|
|
17
|
-
exec(success: () => any, fail: () => any, service: string, action: string, args?: string[]): void;
|
|
18
|
-
/** Gets the operating system name. */
|
|
19
|
-
platformId: string;
|
|
20
|
-
/** Gets Cordova framework version */
|
|
21
|
-
version: string;
|
|
22
|
-
/** Defines custom logic as a Cordova module. Other modules can later access it using module name provided. */
|
|
23
|
-
define(moduleName: string, factory: (require: any, exports: any, module: any) => any): void;
|
|
24
|
-
/** Access a Cordova module by name. */
|
|
25
|
-
require(moduleName: string): any;
|
|
26
|
-
/** Namespace for Cordova plugin functionality */
|
|
27
|
-
plugins:CordovaPlugins;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface CordovaPlugins {}
|
|
31
|
-
|
|
32
|
-
interface Document {
|
|
33
|
-
addEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
34
|
-
addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
35
|
-
addEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
36
|
-
addEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
37
|
-
addEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
38
|
-
addEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
39
|
-
addEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
40
|
-
addEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
41
|
-
addEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
42
|
-
addEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
43
|
-
|
|
44
|
-
removeEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
45
|
-
removeEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
46
|
-
removeEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
47
|
-
removeEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
48
|
-
removeEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
49
|
-
removeEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
50
|
-
removeEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
51
|
-
removeEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
52
|
-
removeEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
53
|
-
removeEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
54
|
-
|
|
55
|
-
addEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
56
|
-
removeEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
interface Window {
|
|
60
|
-
cordova:Cordova;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// cordova/argscheck module
|
|
64
|
-
interface ArgsCheck {
|
|
65
|
-
checkArgs(argsSpec: string, functionName: string, args: any[], callee?: any): void;
|
|
66
|
-
getValue(value?: any, defaultValue?: any): any;
|
|
67
|
-
enableChecks: boolean;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// cordova/urlutil module
|
|
71
|
-
interface UrlUtil {
|
|
72
|
-
makeAbsolute(url: string): string
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/** Apache Cordova instance */
|
|
76
|
-
declare var cordova: Cordova;
|
|
77
|
-
|
|
78
|
-
declare module 'cordova' {
|
|
79
|
-
export = cordova;
|
|
80
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Regula Document Reader Cordova demo application
|
|
2
|
-
|
|
3
|
-
## How to build demo application
|
|
4
|
-
1. Download or the clone current repository using the command `git clone https://github.com/regulaforensics/npm-document-reader.git`.
|
|
5
|
-
|
|
6
|
-
2. Execute `npm run setup` within this directory.
|
|
7
|
-
|
|
8
|
-
3. Run the app:
|
|
9
|
-
* IOS: `npm run ios`.
|
|
10
|
-
* Android: `npm run android`.
|
|
11
|
-
|
|
12
|
-
**Note**: this is just one way of running the app. You can also pass `-o` or `--open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<widget android-packageName="com.regula.dr.fullauthrfid" ios-CFBundleIdentifier="regula.DocumentReader" version="1.0.0"
|
|
2
|
-
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
-
<name>DocumentReader</name>
|
|
4
|
-
<platform name="android">
|
|
5
|
-
<preference name="orientation" value="portrait" />
|
|
6
|
-
<preference name="android-minSdkVersion" value="24" />
|
|
7
|
-
<preference name="android-targetSdkVersion" value="35" />
|
|
8
|
-
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
9
|
-
<config-file parent="/*" target="AndroidManifest.xml">
|
|
10
|
-
<uses-permission android:name="android.permission.NFC" />
|
|
11
|
-
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
12
|
-
</config-file>
|
|
13
|
-
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
|
|
14
|
-
<application android:usesCleartextTraffic="true" />
|
|
15
|
-
</edit-config>
|
|
16
|
-
</platform>
|
|
17
|
-
<platform name="ios">
|
|
18
|
-
<preference name="orientation" value="portrait" />
|
|
19
|
-
<preference name="DisallowOverscroll" value="true" />
|
|
20
|
-
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
|
|
21
|
-
<string>To use camera</string>
|
|
22
|
-
</config-file>
|
|
23
|
-
<config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
|
|
24
|
-
<string>To pick images</string>
|
|
25
|
-
</config-file>
|
|
26
|
-
<config-file target="*-Info.plist" parent="NSBluetoothAlwaysUsageDescription">
|
|
27
|
-
<string>To use btdevice</string>
|
|
28
|
-
</config-file>
|
|
29
|
-
</platform>
|
|
30
|
-
</widget>
|