@regulaforensics/vp-frontend-document-components 7.4.1936-nightly → 7.4.1950-nightly
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 +18 -5
- package/dist/index.d.ts +15 -0
- package/dist/main.iife.js +27 -53
- package/dist/main.js +12254 -15695
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -299,7 +299,7 @@ After adding `DocumentReaderService` to the global variable, you can change the
|
|
|
299
299
|
| **forceReadMrzBeforeLocate** | When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. | boolean | `false` | `true`, `false` |
|
|
300
300
|
| **parseBarcodes** | This option can be disabled to stop parsing after barcode is read. | boolean | `true` | `true`, `false` |
|
|
301
301
|
| **splitNames** | When enabled, the Surname and GivenNames fields will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. | boolean | `false` | `true`, `false` |
|
|
302
|
-
| **backendProcessing** | When enabled, it prepares the processing result to be sent to the backend for re-processing. Use ```service.finalizePackage();``` after receiving the processing results to send them to the backend. | Object | {} |
|
|
302
|
+
| **backendProcessing** | When enabled, it prepares the processing result to be sent to the backend for re-processing. Use ```service.finalizePackage();``` after receiving the processing results to send them to the backend. | Object | {} | { serviceURL: 'URL', httpHeaders: { key1: 'header1', key2: 'header2', ... }, requestTimeoutMs: number > 0 } |
|
|
303
303
|
| **generateNumericCodes** | This parameter is used to generate numeric representation for issuing state and nationality codes. | boolean | | `true`, `false` |
|
|
304
304
|
|
|
305
305
|
**Attention!** If the `multipage-processing` or `internal-scenario` attributes are set, the corresponding `multipageProcessing` and `scenario` parameters' values are ignored.
|
|
@@ -1018,10 +1018,11 @@ See all component's settings and attributes in the following table.
|
|
|
1018
1018
|
| **multipleFileInput** | **multiple** | Whether to allow uploading more than one file via the file system. Can be set to `true` only if `startScreen` is `true`. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1019
1019
|
| **cameraId** | **camera-id** | Ability to select a camera. You can get the device ID using [navigator.mediaDevices.enumerateDevices()](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices). | string | `undefined` | `camera id string value` | `document-reader`, `camera-snapshot` |
|
|
1020
1020
|
| **devLicense** | **license** | To use the component on test environments, set the base64 license value to the `license` attribute. | string | `undefined` | `base64 license value` | `document-reader` |
|
|
1021
|
-
| **regulaLogo** | **copyright** | Show Regula copyright footer.
|
|
1021
|
+
| **regulaLogo** | **copyright** | Show Regula copyright footer. (deprecated, use copyright instead) | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1022
1022
|
| **changeCameraButton** | **change-camera** | Show the camera switch button. | boolean | `false` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1023
1023
|
| **closeButton** | **close-button** | Show the close button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1024
1024
|
| **captureButton** | **capture-button** | Show the capture button. | boolean | `true` | `true`, `false` | `document-reader` |
|
|
1025
|
+
| **copyright** | | Show Regula copyright footer. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1025
1026
|
| **skipButton** | | Show the skip button for the second page. | boolean | `true` | `true`, `false` | `document-reader` |
|
|
1026
1027
|
| **captureMode** | | Sets the capture mode. Mode `auto` - recognition starts immediately after the camera starts working. Mode `captureFrame` - recognition of the frame received after pressing the capture button. Mode `captureVideo` - recognition begins after pressing the button, pressing the button again will send the received frame for processing. | string | `auto` | `auto`, `captureVideo`, `captureFrame` | `document-reader` |
|
|
1027
1028
|
| **resolution** | | Sets the resolution of the video stream from the camera. | object | `{ width: 1920, height: 1080 }` | `{ width: number, height: number }` | `document-reader`, `camera-snapshot` |
|
|
@@ -1047,7 +1048,7 @@ See all component's settings and attributes in the following table.
|
|
|
1047
1048
|
| **cameraFrame** | | Show the capture frame. | boolean | `true` | `true`, `false` | `document-reader` |
|
|
1048
1049
|
| **captureButtonDelay** | | Show the capture button after delay. | number | `undefined` | `any number` | `document-reader` |
|
|
1049
1050
|
| **nonce** | | Sets the unique nonce value to maintain the CSP policy. | string | `undefined` | `unique nonce value` | `document-reader`, `camera-snapshot` |
|
|
1050
|
-
| **videoRecord** | | Sets the ability to record a video of the document scanning process. If set to true it records the entire process. You can also set the recording delay and recording duration. The video will be available in the component response. | boolean or object | `undefined` |
|
|
1051
|
+
| **videoRecord** | | Sets the ability to record a video of the document scanning process. If set to true it records the entire process. You can also set the recording delay and recording duration. The video will be available in the component response. | boolean or object | `undefined` | `true`, `false`, `{ delay: number, duration: number, bitrate: number }` | `document-reader` |
|
|
1051
1052
|
| **videoCaptureMotionControl** | | Enables device shaking control. | boolean | `false` | `true`, `false` | `document-reader` |
|
|
1052
1053
|
| **fromCameraButton** | | Show the camera button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1053
1054
|
| **uploadFileButton** | | Show the files button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
@@ -1136,7 +1137,17 @@ you have an option to delegate scanning to another available device (i.e. phone)
|
|
|
1136
1137
|
|
|
1137
1138
|
### Appearance Customization
|
|
1138
1139
|
|
|
1139
|
-
####
|
|
1140
|
+
#### CSS part
|
|
1141
|
+
|
|
1142
|
+
Using ::part CSS pseudo-elements, you can set your own styles for component elements. Select the element you need in the developer console and use its part name to customize it.
|
|
1143
|
+
|
|
1144
|
+
```css
|
|
1145
|
+
document-reader::part(container) {
|
|
1146
|
+
background: red;
|
|
1147
|
+
}
|
|
1148
|
+
```
|
|
1149
|
+
|
|
1150
|
+
#### CSS variables
|
|
1140
1151
|
|
|
1141
1152
|
Using CSS variables, you can change the font and the main colors of the components. See the table for the details.
|
|
1142
1153
|
|
|
@@ -1232,7 +1243,7 @@ See the following table with localized labels, used in the components.
|
|
|
1232
1243
|
| **keepDeviceStill** | Hold the device still | `document-reader` |
|
|
1233
1244
|
| **positionDocumentCenter** | Position the document in the center | `camera-snapshot` |
|
|
1234
1245
|
| **uploadPhoto** | Upload a photo | `camera-snapshot` |
|
|
1235
|
-
| **
|
|
1246
|
+
| **switchToMobile** | Switch to mobile | `document-reader` |
|
|
1236
1247
|
| **openPhoneCamera** | Open the camera on your mobile device, scan the QR code, and follow the link | `document-reader` |
|
|
1237
1248
|
| **pleaseWait** | Please wait... | `document-reader` |
|
|
1238
1249
|
| **mobileDevice** | Mobile device | `document-reader` |
|
|
@@ -1602,6 +1613,8 @@ In the given examples, change the `workerPath` parameter value to your custom so
|
|
|
1602
1613
|
|
|
1603
1614
|
**Attention!** The files must be located in the same directory and have the same names as were previously specified.
|
|
1604
1615
|
|
|
1616
|
+
To decrease files size, you can apply compression. On your server, you need to determine which <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding" target="_blank">compression method</a> is used for the files.
|
|
1617
|
+
|
|
1605
1618
|
## Potential Problems
|
|
1606
1619
|
|
|
1607
1620
|
UI components and SDK use the `getUserMedia` method to display the video stream from the camera. This feature is available only in secure contexts (HTTPS).
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare interface CameraSnapshotSettings {
|
|
|
40
40
|
locale?: Locales | string;
|
|
41
41
|
multipleFileInput?: boolean;
|
|
42
42
|
regulaLogo?: boolean;
|
|
43
|
+
copyright?: boolean;
|
|
43
44
|
cameraId?: string;
|
|
44
45
|
changeCameraButton?: boolean;
|
|
45
46
|
closeButton?: boolean;
|
|
@@ -218,6 +219,7 @@ export declare interface DocumentReaderProcessParam {
|
|
|
218
219
|
backendProcessing?: {
|
|
219
220
|
serviceURL?: string;
|
|
220
221
|
httpHeaders?: Record<string, string>;
|
|
222
|
+
requestTimeoutMs?: number;
|
|
221
223
|
};
|
|
222
224
|
}
|
|
223
225
|
|
|
@@ -606,6 +608,7 @@ export declare interface VideoData {
|
|
|
606
608
|
export declare interface VideoRecordSettings {
|
|
607
609
|
delay?: number;
|
|
608
610
|
duration?: number;
|
|
611
|
+
bitrate?: number;
|
|
609
612
|
}
|
|
610
613
|
|
|
611
614
|
export declare interface WidthAndHeight {
|
|
@@ -625,3 +628,15 @@ declare global {
|
|
|
625
628
|
RegulaDocumentSDK: DocumentReaderService;
|
|
626
629
|
}
|
|
627
630
|
}
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
declare namespace v3 {
|
|
634
|
+
var DNS: string;
|
|
635
|
+
var URL: string;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
declare namespace v5 {
|
|
640
|
+
var DNS: string;
|
|
641
|
+
var URL: string;
|
|
642
|
+
}
|