@regulaforensics/vp-frontend-document-components 7.4.1806-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 CHANGED
@@ -19,7 +19,6 @@
19
19
  * [Backend reprocessing](#backend-reprocessing)
20
20
  * [Appearance Customization](#appearance-customization)
21
21
  * [Font and Colors](#font-and-colors)
22
- * [Inserting component in Flex and Grid layouts](#inserting-component-in-flex-and-grid-layouts)
23
22
  * [Localized Messages](#localized-messages)
24
23
  * [Document Reader Processor](#document-reader-processor)
25
24
  * [npm Processor Integration](#npm-processor-integration)
@@ -42,8 +41,8 @@ The Document Reader Web Components let you add document verification to your web
42
41
  * Capture a document from the device's camera
43
42
  * Process an uploaded image
44
43
  * Crop the image by document boundaries
45
- * Detect the presence of a machine-readable zone (MRZ), recognize it, and parse into text text fields
46
- * Read barcodes, and parse them into text fields
44
+ * Detect the presence of a machine-readable zone (MRZ)
45
+ * Recognize and return the values of MRZ text fields
47
46
 
48
47
  The Document Reader Web Components package contains:
49
48
 
@@ -396,23 +395,21 @@ Available fields of `event.detail.data` object:
396
395
 
397
396
  #### Action Failure Reasons
398
397
 
399
- | Reason | Description of the reason |
400
- |:---------------------------|:-------------------------------------------------------|
401
- | `WASM_ERROR` | Error in WASM |
402
- | `WASM_LICENSE` | Missing or incorrect license |
403
- | `FILE_SIZE` | The file size is too large |
404
- | `INCORRECT_FILE` | Problems with reading the file |
405
- | `INCORRECT_SCENARIO` | Scenario is not supported |
406
- | `MISSING_SCENARIO` | Scenario is missing |
407
- | `UNKNOWN_ERROR` | Unknown error |
408
- | `NOT_SUPPORTED` | The browser is not supported |
409
- | `HTTP_NOT_SUPPORTED` | The web component does not work over the http protocol |
410
- | `INSECURE_PAGE_CONTEXT` | The web component does not work in insecure context |
411
- | `CAMERA_UNKNOWN_ERROR` | Unknown camera error |
412
- | `CAMERA_PERMISSION_DENIED` | Access to the camera is prohibited |
413
- | `NO_CAMERA` | There is no camera available |
414
- | `INCORRECT_CAMERA_ID` | Camera with this ID was not found |
415
- | `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 |
416
413
 
417
414
  #### Event Generation Logic
418
415
 
@@ -1010,19 +1007,6 @@ HTML:
1010
1007
  ```html
1011
1008
  <document-reader class="my-custom-style"></document-reader>
1012
1009
  ```
1013
- #### Inserting component in Flex and Grid layouts
1014
-
1015
- document-reader and camera-snapshot components have **width** and **height** set to **100%** by default and therefore try to fit their container element.
1016
- This should not affect correct CSS Grid positioning, but for Flexbox make sure to style document-reader dimensions and set **flex-basis**, i.e.:
1017
-
1018
- ```css
1019
- document-reader.flex-item {
1020
- width: auto;
1021
- height: auto;
1022
- flex-basis: 500px; // distinct width of your choice
1023
- }
1024
- ```
1025
-
1026
1010
 
1027
1011
  #### Localized Messages
1028
1012
 
@@ -1049,50 +1033,48 @@ body.append(element);
1049
1033
 
1050
1034
  See the following table with localized labels, used in the components.
1051
1035
 
1052
- | Label | Default message in `en` locale | Used in |
1053
- |:------------------------------|:-----------------------------------------------------------------------------------------------|:------------------------------------:|
1054
- | **success** | Success! | `document-reader`, `camera-snapshot` |
1055
- | **fileCorrupt** | This file is corrupt or not supported | `document-reader`, `camera-snapshot` |
1056
- | **selectAnotherFile** | Please select another file | `document-reader`, `camera-snapshot` |
1057
- | **error** | Error! | `document-reader`, `camera-snapshot` |
1058
- | **somethingWentWrong** | Something went wrong | `document-reader`, `camera-snapshot` |
1059
- | **tryAgain** | Try again | `document-reader`, `camera-snapshot` |
1060
- | **fromCamera** | From camera | `document-reader`, `camera-snapshot` |
1061
- | **fromGallery** | From gallery | `document-reader`, `camera-snapshot` |
1062
- | **cameraUnavailable** | Camera unavailable! | `document-reader`, `camera-snapshot` |
1063
- | **preparingCamera** | Preparing the camera... | `document-reader`, `camera-snapshot` |
1064
- | **noCameraAvailable** | No camera available | `document-reader`, `camera-snapshot` |
1065
- | **incorrectCameraId** | No camera with the specified ID found. | `document-reader`, `camera-snapshot` |
1066
- | **allowAccessToCamera** | Allow access to the camera and reload this page to continue. | `document-reader`, `camera-snapshot` |
1067
- | **cameraConnection** | Make sure the camera is connected correctly. | `document-reader`, `camera-snapshot` |
1068
- | **checkCameraId** | Check if the specified camera ID is correct. | `document-reader`, `camera-snapshot` |
1069
- | **scanIDInBrowser** | Scan an ID in your browser | `document-reader` |
1070
- | **useYourDeviceCamera** | Use your device camera to scan a document or select a photo of the document from the gallery | `document-reader` |
1071
- | **processingFinished** | Processing finished. | `document-reader` |
1072
- | **largeFile** | This file is too large to be uploaded | `document-reader` |
1073
- | **selectSmallerFile** | Please select a smaller file | `document-reader` |
1074
- | **versionNotSupported** | Your browser version is not supported | `document-reader` |
1075
- | **httpNotSupported** | HTTPS is not used. | `document-reader` |
1076
- | **insecurePageContext** | Insecure page context. | `document-reader` |
1077
- | **updateBrowser** | Update your browser version | `document-reader` |
1078
- | **licenseError** | A license error has occurred | `document-reader` |
1079
- | **licenseExpired** | The license cannot be found or has expired | `document-reader` |
1080
- | **timeout** | Timeout | `document-reader` |
1081
- | **processing** | Processing... | `document-reader` |
1082
- | **preparingService** | Preparing the service... | `document-reader` |
1083
- | **placeDocumentIntoFrame** | Fit the document into the frame | `document-reader` |
1084
- | **noFocus** | No camera focus | `document-reader` |
1085
- | **moveCloser** | Move closer | `document-reader` |
1086
- | **glaresOnDocument** | Avoid glare on the document | `document-reader` |
1087
- | **holdDocumentStraight** | Hold the document straight | `document-reader` |
1088
- | **documentProcessing** | Document processing... | `document-reader` |
1089
- | **flipDocument** | Flip the document | `document-reader` |
1090
- | **verified** | Verified! | `document-reader` |
1091
- | **keepDeviceStill** | Hold the device still | `document-reader` |
1092
- | **positionDocumentCenter** | Position the document in the center | `camera-snapshot` |
1093
- | **photoCapturedSuccessfully** | The photo is captured successfully. | `camera-snapshot` |
1094
- | **uploadPhoto** | Upload a photo | `camera-snapshot` |
1095
- | **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` |
1096
1078
 
1097
1079
  ## Document Reader Processor
1098
1080
 
@@ -1427,7 +1409,8 @@ By default, these files are downloaded from Regula servers, but you can set your
1427
1409
 
1428
1410
  **1.** To download these files from our server to local machine, you can get the link in the `window.RegulaDocumentSDK.workerPath` field.
1429
1411
 
1430
- **2.** Upload all three files (`ProcMgr.worker.js`, `ProcMgr.wasm`, `ProcMgr.data`) to the location you specified. Also, change the address in `windows.RegulaDocumentSDK`.
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`.
1431
1414
 
1432
1415
  For Predefined UI Components:
1433
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;