@regulaforensics/vp-frontend-document-components 7.3.1805-nightly → 7.4.1809-rc
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 +61 -64
- package/dist/index.d.ts +0 -2
- package/dist/main.iife.js +32 -38
- package/dist/main.js +6323 -6483
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -41,8 +41,8 @@ The Document Reader Web Components let you add document verification to your web
|
|
|
41
41
|
* Capture a document from the device's camera
|
|
42
42
|
* Process an uploaded image
|
|
43
43
|
* Crop the image by document boundaries
|
|
44
|
-
* Detect the presence of a machine-readable zone (MRZ)
|
|
45
|
-
*
|
|
44
|
+
* Detect the presence of a machine-readable zone (MRZ)
|
|
45
|
+
* Recognize and return the values of MRZ text fields
|
|
46
46
|
|
|
47
47
|
The Document Reader Web Components package contains:
|
|
48
48
|
|
|
@@ -395,23 +395,21 @@ Available fields of `event.detail.data` object:
|
|
|
395
395
|
|
|
396
396
|
#### Action Failure Reasons
|
|
397
397
|
|
|
398
|
-
| Reason | Description of the reason
|
|
399
|
-
|
|
400
|
-
| `WASM_ERROR` | Error in WASM
|
|
401
|
-
| `WASM_LICENSE` | Missing or incorrect license
|
|
402
|
-
| `FILE_SIZE` | The file size is too large
|
|
403
|
-
| `INCORRECT_FILE` | Problems with reading the file
|
|
404
|
-
| `INCORRECT_SCENARIO` | Scenario is not supported
|
|
405
|
-
| `MISSING_SCENARIO` | Scenario is missing
|
|
406
|
-
| `UNKNOWN_ERROR` | Unknown error
|
|
407
|
-
| `NOT_SUPPORTED` | The browser is not supported
|
|
408
|
-
| `
|
|
409
|
-
| `
|
|
410
|
-
| `
|
|
411
|
-
| `
|
|
412
|
-
| `
|
|
413
|
-
| `INCORRECT_CAMERA_ID` | Camera with this ID was not found |
|
|
414
|
-
| `CONNECTION_ERROR` | Connection errors |
|
|
398
|
+
| Reason | Description of the reason |
|
|
399
|
+
|:---------------------------|:-----------------------------------|
|
|
400
|
+
| `WASM_ERROR` | Error in WASM |
|
|
401
|
+
| `WASM_LICENSE` | Missing or incorrect license |
|
|
402
|
+
| `FILE_SIZE` | The file size is too large |
|
|
403
|
+
| `INCORRECT_FILE` | Problems with reading the file |
|
|
404
|
+
| `INCORRECT_SCENARIO` | Scenario is not supported |
|
|
405
|
+
| `MISSING_SCENARIO` | Scenario is missing |
|
|
406
|
+
| `UNKNOWN_ERROR` | Unknown error |
|
|
407
|
+
| `NOT_SUPPORTED` | The browser is not supported |
|
|
408
|
+
| `CAMERA_UNKNOWN_ERROR` | Unknown camera error |
|
|
409
|
+
| `CAMERA_PERMISSION_DENIED` | Access to the camera is prohibited |
|
|
410
|
+
| `NO_CAMERA` | There is no camera available |
|
|
411
|
+
| `INCORRECT_CAMERA_ID` | Camera with this ID was not found |
|
|
412
|
+
| `CONNECTION_ERROR` | Connection errors |
|
|
415
413
|
|
|
416
414
|
#### Event Generation Logic
|
|
417
415
|
|
|
@@ -1035,50 +1033,48 @@ body.append(element);
|
|
|
1035
1033
|
|
|
1036
1034
|
See the following table with localized labels, used in the components.
|
|
1037
1035
|
|
|
1038
|
-
| Label | Default message in `en` locale
|
|
1039
|
-
|
|
1040
|
-
| **success** | Success!
|
|
1041
|
-
| **fileCorrupt** | This file is corrupt or not supported
|
|
1042
|
-
| **selectAnotherFile** | Please select another file
|
|
1043
|
-
| **error** | Error!
|
|
1044
|
-
| **somethingWentWrong** | Something went wrong
|
|
1045
|
-
| **tryAgain** | Try again
|
|
1046
|
-
| **fromCamera** | From camera
|
|
1047
|
-
| **fromGallery** | From gallery
|
|
1048
|
-
| **cameraUnavailable** | Camera unavailable!
|
|
1049
|
-
| **preparingCamera** | Preparing the camera...
|
|
1050
|
-
| **noCameraAvailable** | No camera available
|
|
1051
|
-
| **incorrectCameraId** | No camera with the specified ID found.
|
|
1052
|
-
| **allowAccessToCamera** | Allow access to the camera and reload this page to continue.
|
|
1053
|
-
| **cameraConnection** | Make sure the camera is connected correctly.
|
|
1054
|
-
| **checkCameraId** | Check if the specified camera ID is correct.
|
|
1055
|
-
| **scanIDInBrowser** | Scan an ID in your browser
|
|
1056
|
-
| **useYourDeviceCamera** | Use your device camera to scan a document or select a photo of the document from the gallery
|
|
1057
|
-
| **processingFinished** | Processing finished.
|
|
1058
|
-
| **largeFile** | This file is too large to be uploaded
|
|
1059
|
-
| **selectSmallerFile** | Please select a smaller file
|
|
1060
|
-
| **versionNotSupported** | Your browser version is not supported
|
|
1061
|
-
| **
|
|
1062
|
-
| **
|
|
1063
|
-
| **
|
|
1064
|
-
| **
|
|
1065
|
-
| **
|
|
1066
|
-
| **
|
|
1067
|
-
| **
|
|
1068
|
-
| **
|
|
1069
|
-
| **
|
|
1070
|
-
| **
|
|
1071
|
-
| **
|
|
1072
|
-
| **
|
|
1073
|
-
| **
|
|
1074
|
-
| **
|
|
1075
|
-
| **
|
|
1076
|
-
| **
|
|
1077
|
-
| **
|
|
1078
|
-
| **
|
|
1079
|
-
| **
|
|
1080
|
-
| **uploadPhoto** | Upload a photo | `camera-snapshot` |
|
|
1081
|
-
| **useCameraOrGallery** | Use your device camera or select a photo from the gallery | `camera-snapshot` |
|
|
1036
|
+
| Label | Default message in `en` locale | Used in |
|
|
1037
|
+
|:------------------------------|:---------------------------------------------------------------------------------------------|:------------------------------------:|
|
|
1038
|
+
| **success** | Success! | `document-reader`, `camera-snapshot` |
|
|
1039
|
+
| **fileCorrupt** | This file is corrupt or not supported | `document-reader`, `camera-snapshot` |
|
|
1040
|
+
| **selectAnotherFile** | Please select another file | `document-reader`, `camera-snapshot` |
|
|
1041
|
+
| **error** | Error! | `document-reader`, `camera-snapshot` |
|
|
1042
|
+
| **somethingWentWrong** | Something went wrong | `document-reader`, `camera-snapshot` |
|
|
1043
|
+
| **tryAgain** | Try again | `document-reader`, `camera-snapshot` |
|
|
1044
|
+
| **fromCamera** | From camera | `document-reader`, `camera-snapshot` |
|
|
1045
|
+
| **fromGallery** | From gallery | `document-reader`, `camera-snapshot` |
|
|
1046
|
+
| **cameraUnavailable** | Camera unavailable! | `document-reader`, `camera-snapshot` |
|
|
1047
|
+
| **preparingCamera** | Preparing the camera... | `document-reader`, `camera-snapshot` |
|
|
1048
|
+
| **noCameraAvailable** | No camera available | `document-reader`, `camera-snapshot` |
|
|
1049
|
+
| **incorrectCameraId** | No camera with the specified ID found. | `document-reader`, `camera-snapshot` |
|
|
1050
|
+
| **allowAccessToCamera** | Allow access to the camera and reload this page to continue. | `document-reader`, `camera-snapshot` |
|
|
1051
|
+
| **cameraConnection** | Make sure the camera is connected correctly. | `document-reader`, `camera-snapshot` |
|
|
1052
|
+
| **checkCameraId** | Check if the specified camera ID is correct. | `document-reader`, `camera-snapshot` |
|
|
1053
|
+
| **scanIDInBrowser** | Scan an ID in your browser | `document-reader` |
|
|
1054
|
+
| **useYourDeviceCamera** | Use your device camera to scan a document or select a photo of the document from the gallery | `document-reader` |
|
|
1055
|
+
| **processingFinished** | Processing finished. | `document-reader` |
|
|
1056
|
+
| **largeFile** | This file is too large to be uploaded | `document-reader` |
|
|
1057
|
+
| **selectSmallerFile** | Please select a smaller file | `document-reader` |
|
|
1058
|
+
| **versionNotSupported** | Your browser version is not supported | `document-reader` |
|
|
1059
|
+
| **updateBrowser** | Update your browser version | `document-reader` |
|
|
1060
|
+
| **licenseError** | A license error has occurred | `document-reader` |
|
|
1061
|
+
| **licenseExpired** | The license cannot be found or has expired | `document-reader` |
|
|
1062
|
+
| **timeout** | Timeout | `document-reader` |
|
|
1063
|
+
| **processing** | Processing... | `document-reader` |
|
|
1064
|
+
| **preparingService** | Preparing the service... | `document-reader` |
|
|
1065
|
+
| **placeDocumentIntoFrame** | Fit the document into the frame | `document-reader` |
|
|
1066
|
+
| **noFocus** | No camera focus | `document-reader` |
|
|
1067
|
+
| **moveCloser** | Move closer | `document-reader` |
|
|
1068
|
+
| **glaresOnDocument** | Avoid glare on the document | `document-reader` |
|
|
1069
|
+
| **holdDocumentStraight** | Hold the document straight | `document-reader` |
|
|
1070
|
+
| **documentProcessing** | Document processing... | `document-reader` |
|
|
1071
|
+
| **flipDocument** | Flip the document | `document-reader` |
|
|
1072
|
+
| **verified** | Verified! | `document-reader` |
|
|
1073
|
+
| **keepDeviceStill** | Hold the device still | `document-reader` |
|
|
1074
|
+
| **positionDocumentCenter** | Position the document in the center | `camera-snapshot` |
|
|
1075
|
+
| **photoCapturedSuccessfully** | The photo is captured successfully. | `camera-snapshot` |
|
|
1076
|
+
| **uploadPhoto** | Upload a photo | `camera-snapshot` |
|
|
1077
|
+
| **useCameraOrGallery** | Use your device camera or select a photo from the gallery | `camera-snapshot` |
|
|
1082
1078
|
|
|
1083
1079
|
## Document Reader Processor
|
|
1084
1080
|
|
|
@@ -1413,7 +1409,8 @@ By default, these files are downloaded from Regula servers, but you can set your
|
|
|
1413
1409
|
|
|
1414
1410
|
**1.** To download these files from our server to local machine, you can get the link in the `window.RegulaDocumentSDK.workerPath` field.
|
|
1415
1411
|
|
|
1416
|
-
**2.**
|
|
1412
|
+
**2.** Then, in the `ProcMgr.worker.js` file, use the search to find `https://wasm.regulaforensics.com` and replace the full link with your custom URL.
|
|
1413
|
+
Upload all three files (`ProcMgr.worker.js`, `ProcMgr.wasm`, `ProcMgr.data`) to the location you specified. Also, change the address in `windows.RegulaDocumentSDK`.
|
|
1417
1414
|
|
|
1418
1415
|
For Predefined UI Components:
|
|
1419
1416
|
|
package/dist/index.d.ts
CHANGED
|
@@ -320,8 +320,6 @@ export declare interface DocumentTranslations {
|
|
|
320
320
|
largeFile?: string;
|
|
321
321
|
selectSmallerFile?: string;
|
|
322
322
|
versionNotSupported?: string;
|
|
323
|
-
httpNotSupported?: string;
|
|
324
|
-
insecurePageContext?: string;
|
|
325
323
|
updateBrowser?: string;
|
|
326
324
|
licenseError?: string;
|
|
327
325
|
licenseExpired?: string;
|