@regulaforensics/vp-frontend-document-components 7.4.1858-nightly → 7.4.1923-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 +171 -95
- package/dist/index.d.ts +17 -18
- package/dist/main.iife.js +39 -39
- package/dist/main.js +12822 -13132
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -337,12 +337,13 @@ The fields of the `event.detail` object:
|
|
|
337
337
|
| Type of action | Description of the action | Components and events, where present |
|
|
338
338
|
|:------------------------------|:------------------------------------------------------------------|:------------------------------------:|
|
|
339
339
|
| `ELEMENT_VISIBLE` | Component is appended in the DOM. | `document-reader`, `camera-snapshot` |
|
|
340
|
-
| `PRESS_CAMERA_BUTTON` | The "
|
|
341
|
-
| `PRESS_FILE_BUTTON` | The "
|
|
340
|
+
| `PRESS_CAMERA_BUTTON` | The "Camera" button is pressed. | `document-reader`, `camera-snapshot` |
|
|
341
|
+
| `PRESS_FILE_BUTTON` | The "Files" button is pressed. | `document-reader`, `camera-snapshot` |
|
|
342
342
|
| `PRESS_RETRY_BUTTON` | The "Retry" button is pressed. | `document-reader`, `camera-snapshot` |
|
|
343
343
|
| `PRESS_SKIP_BUTTON` | The "Skip" button is pressed. | `document-reader` |
|
|
344
344
|
| `PRESS_CAPTURE_BUTTON` | The "Capture" button is pressed. | `document-reader`, `camera-snapshot` |
|
|
345
345
|
| `PRESS_CHANGE_CAMERA_BUTTON` | The "Change camera" button is pressed. | `document-reader`, `camera-snapshot` |
|
|
346
|
+
| `PRESS_REMOTE_DEVICE_BUTTON` | The "Mobile device" button is pressed. | `document-reader` |
|
|
346
347
|
| `PRESS_MIRRORING_BUTTON` | The "Mirroring" button is pressed. | `document-reader`, `camera-snapshot` |
|
|
347
348
|
| `NEW_PAGE_AVAILABLE` | The document contains another page. | `document-reader` |
|
|
348
349
|
| `NEW_PAGE_STARTED` | Recognition of a new page has started. | `document-reader` |
|
|
@@ -354,7 +355,6 @@ The fields of the `event.detail` object:
|
|
|
354
355
|
| `FILE_PROCESS_STARTED` | File processing has started. | `document-reader`, `camera-snapshot` |
|
|
355
356
|
| `PROCESS_FINISHED` | The component has finished its work. | `document-reader`, `camera-snapshot` |
|
|
356
357
|
| `SERVICE_INITIALIZED` | The component has started its work. | `document-reader` |
|
|
357
|
-
| `PRESS_REMOTE_DEVICE_BUTTON` | The "From other phone" button is pressed. | `document-reader` |
|
|
358
358
|
| `REMOTE_TRANSACTION_UPLOADED` | Remote transaction with current tag was uploaded | `document-reader` |
|
|
359
359
|
| `REMOTE_PROCESS_FINISHED` | Remote transaction with current tag was processed | `document-reader` |
|
|
360
360
|
|
|
@@ -425,6 +425,7 @@ Available fields of `event.detail.data` object:
|
|
|
425
425
|
| `NO_CAMERA` | There is no camera available |
|
|
426
426
|
| `INCORRECT_CAMERA_ID` | Camera with this ID was not found |
|
|
427
427
|
| `CONNECTION_ERROR` | Connection errors |
|
|
428
|
+
| `BAD_CONFIGURATION` | Incompatible component settings are installed |
|
|
428
429
|
|
|
429
430
|
#### Remote action data
|
|
430
431
|
|
|
@@ -490,7 +491,7 @@ For example:
|
|
|
490
491
|
</td>
|
|
491
492
|
</tr>
|
|
492
493
|
<tr>
|
|
493
|
-
<td>"
|
|
494
|
+
<td>"Camera" button is pressed.</td>
|
|
494
495
|
<td>
|
|
495
496
|
|
|
496
497
|
`document-reader`, `camera-snapshot`
|
|
@@ -509,7 +510,7 @@ For example:
|
|
|
509
510
|
<td></td>
|
|
510
511
|
</tr>
|
|
511
512
|
<tr>
|
|
512
|
-
<td>"
|
|
513
|
+
<td>"Files" button is pressed.</td>
|
|
513
514
|
<td>
|
|
514
515
|
|
|
515
516
|
`document-reader`, `camera-snapshot`
|
|
@@ -605,6 +606,26 @@ This event available only in `document-reader`.
|
|
|
605
606
|
}
|
|
606
607
|
```
|
|
607
608
|
|
|
609
|
+
</td>
|
|
610
|
+
<td>
|
|
611
|
+
</td>
|
|
612
|
+
</tr>
|
|
613
|
+
<tr>
|
|
614
|
+
<td>"Mobile device" button is pressed.</td>
|
|
615
|
+
<td>
|
|
616
|
+
|
|
617
|
+
`document-reader`
|
|
618
|
+
|
|
619
|
+
</td>
|
|
620
|
+
<td>
|
|
621
|
+
|
|
622
|
+
```javascript
|
|
623
|
+
{
|
|
624
|
+
action: 'PRESS_REMOTE_DEVICE_BUTTON',
|
|
625
|
+
data: null,
|
|
626
|
+
}
|
|
627
|
+
```
|
|
628
|
+
|
|
608
629
|
</td>
|
|
609
630
|
<td>
|
|
610
631
|
</td>
|
|
@@ -880,6 +901,59 @@ This event available only in `document-reader`.
|
|
|
880
901
|
|
|
881
902
|
This event available only in `document-reader`.
|
|
882
903
|
|
|
904
|
+
</td>
|
|
905
|
+
</tr>
|
|
906
|
+
<tr>
|
|
907
|
+
<td>The transaction has been successfully uploaded from the delegated device.</td>
|
|
908
|
+
<td>
|
|
909
|
+
|
|
910
|
+
`document-reader`
|
|
911
|
+
|
|
912
|
+
</td>
|
|
913
|
+
<td>
|
|
914
|
+
|
|
915
|
+
```javascript
|
|
916
|
+
{
|
|
917
|
+
action: 'REMOTE_TRANSACTION_UPLOADED',
|
|
918
|
+
data: {
|
|
919
|
+
id: 'df4e210a-8411-411b-998e-a7c7f6b4a770',
|
|
920
|
+
state: 1,
|
|
921
|
+
updatedAt: '2024-09-19T11:05:21.473286Z'
|
|
922
|
+
},
|
|
923
|
+
}
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
</td>
|
|
927
|
+
<td>
|
|
928
|
+
|
|
929
|
+
This event available only in `document-reader`.
|
|
930
|
+
|
|
931
|
+
</td>
|
|
932
|
+
</tr>
|
|
933
|
+
<tr>
|
|
934
|
+
<td>Remote processing has been completed successfully.</td>
|
|
935
|
+
<td>
|
|
936
|
+
|
|
937
|
+
`document-reader`
|
|
938
|
+
|
|
939
|
+
</td>
|
|
940
|
+
<td>
|
|
941
|
+
|
|
942
|
+
```javascript
|
|
943
|
+
{
|
|
944
|
+
action: 'REMOTE_PROCESS_FINISHED',
|
|
945
|
+
data: {
|
|
946
|
+
response: { ... },
|
|
947
|
+
status: 1
|
|
948
|
+
},
|
|
949
|
+
}
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
</td>
|
|
953
|
+
<td>
|
|
954
|
+
|
|
955
|
+
This event available only in `document-reader`.
|
|
956
|
+
|
|
883
957
|
</td>
|
|
884
958
|
</tr>
|
|
885
959
|
</tbody>
|
|
@@ -934,46 +1008,51 @@ This method gives more flexibility in setup, in addition, all new parameters in
|
|
|
934
1008
|
|
|
935
1009
|
See all component's settings and attributes in the following table.
|
|
936
1010
|
|
|
937
|
-
| Setting name | Attribute name | Description | Data type |
|
|
938
|
-
|
|
939
|
-
| **locale** | **locale** | The language of the component interface. If empty, the language is selected from the browser settings, if it is not found, the system language is taken. | string |
|
|
940
|
-
| **internalScenario** | **internal-scenario** | The component document verification scenario. | string |
|
|
941
|
-
| **multipageProcessing** | **multipage-processing** | Whether to allow processing of two pages in cases when the component detects an ID1-sized document. Multipage processing is not triggered for documents of other formats. If `true`, the component asks for the second page and processes it. If `false`, only one page/side of the document is processed regardless the document format. | boolean |
|
|
942
|
-
| **startScreen** | **start-screen** | Whether to show the start screen with two options for the document image uploading: From camera and From gallery. If `true`, the start screen is shown. If `false`, no start screen is shown and instead the camera of the device is turned on automatically to capture the image of the document. | boolean |
|
|
943
|
-
| **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 |
|
|
944
|
-
| **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 |
|
|
945
|
-
| **devLicense** | **license** | To use the component on test environments, set the base64 license value to the `license` attribute. | string |
|
|
946
|
-
| **regulaLogo** | **copyright** | Show Regula copyright footer. | boolean |
|
|
947
|
-
| **changeCameraButton** | **change-camera** | Show the camera switch button. | boolean |
|
|
948
|
-
| **closeButton** | **close-button** | Show the close button. | boolean |
|
|
949
|
-
| **captureButton** | **capture-button** | Show the capture button. | boolean |
|
|
950
|
-
| **skipButton** | | Show the skip button for the second page. | boolean |
|
|
951
|
-
| **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 |
|
|
952
|
-
| **resolution** | | Sets the resolution of the video stream from the camera. | object |
|
|
953
|
-
| **cameraMode** | | Selects the front or rear camera of the device. | object |
|
|
954
|
-
| **flipFrontIcon** | | Sets the front side of the document flip icon. You can set link (`https://example.link.com/icon.png`), image in base64 string (`data:image/svg+xml;base64,PHN2ZyBjbGF...`) or imported image if you use module bundler. | string |
|
|
955
|
-
| **flipBackIcon** | | Sets the back side of the document flip icon. You can set link (`https://example.link.com/icon.png`), image in base64 string (`data:image/svg+xml;base64,PHN2ZyBjbGF...`) or imported image if you use module bundler. | string |
|
|
956
|
-
| **cameraFrameBorderWidth** | | Sets the thickness of the document capture frame. | number |
|
|
957
|
-
| **backgroundMaskAlpha** | | Sets the transparency of the background outside the frame. | number |
|
|
958
|
-
| **cameraFrameLandscapeAspectRatio** | | Sets the aspect ratio of the capture frame for landscape mode. | number |
|
|
959
|
-
| **cameraFramePortraitAspectRatio** | | Sets the aspect ratio of the capture frame for portrait mode. | number |
|
|
960
|
-
| **statusIcon** | | Show status icon. | boolean |
|
|
961
|
-
| **statusPositionMultiplier** | | Sets the vertical position of the status message. | number |
|
|
962
|
-
| **cameraFrameOffsetWidth** | | Sets the offset of the capture frame. | number |
|
|
963
|
-
| **cameraFrameVerticalPositionMultiplier** | | Sets the offset of the capture frame from the top edge. | number |
|
|
964
|
-
| **cameraFrameShapeType** | | Sets the capture frame shape type. | string |
|
|
965
|
-
| **cameraFrameLineCap** | | Sets the style of the end of the capture frame line when `cameraFrameShapeType='corners'` | string |
|
|
966
|
-
| **cameraFrameLineLength** | | Sets the length of the capture frame line when `cameraFrameShapeType='corners'` | number |
|
|
967
|
-
| **cameraFrameCornerRadius** | | Sets the radius of rounding of the capture frame. | number |
|
|
968
|
-
| **cameraFrameDefaultColor** | | Sets the color of the capture frame. | string |
|
|
969
|
-
| **cameraFrameActiveColor** | | Sets the capture frame color when a document is detected. | string |
|
|
970
|
-
| **statusTextColor** | | Sets the color of the text message status. | string |
|
|
971
|
-
| **statusBackgroundColor** | | Sets the background color of the message status. | string |
|
|
972
|
-
| **cameraFrame** | | Show the capture frame. | boolean |
|
|
973
|
-
| **captureButtonDelay** | | Show the capture button after delay. | number |
|
|
974
|
-
| **nonce** | | Sets the unique nonce value to maintain the CSP policy. | string |
|
|
975
|
-
| **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 |
|
|
976
|
-
| **videoCaptureMotionControl** | | Enables device shaking control. | boolean |
|
|
1011
|
+
| Setting name | Attribute name | Description | Data type | Default value | Values | Available in |
|
|
1012
|
+
|:------------------------------------------|:-------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------:|:----------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------:|
|
|
1013
|
+
| **locale** | **locale** | The language of the component interface. If empty, the language is selected from the browser settings, if it is not found, the system language is taken. | string | `en` | `ru`, `en`, `de`, `pl`, `it`, `hu`, `zh`, `sk`, `uk`, `fr`, `es`, `pt`, `ar`, `nl`, `id`, `vi`, `ko`, `ms`, `ro`, `el`, `tr`, `ja`, `cs`, `th`, `hi`, `bn`, `he`, `fi`, `sv`, `da`, `hr`, `no` | `document-reader`, `camera-snapshot` |
|
|
1014
|
+
| **internalScenario** | **internal-scenario** | The component document verification scenario. | string | `MrzAndLocate` | `MrzAndLocate`, `MrzOrLocate`, `Mrz`, `Locate`, `Barcode`, `MrzOrBarcode`, `BarcodeAndLocate` | `document-reader` |
|
|
1015
|
+
| **multipageProcessing** | **multipage-processing** | Whether to allow processing of two pages in cases when the component detects an ID1-sized document. Multipage processing is not triggered for documents of other formats. If `true`, the component asks for the second page and processes it. If `false`, only one page/side of the document is processed regardless the document format. | boolean | `false` | `true`, `false` | `document-reader` |
|
|
1016
|
+
| **startScreen** | **start-screen** | Whether to show the start screen with two options for the document image uploading: From camera and From gallery. If `true`, the start screen is shown. If `false`, no start screen is shown and instead the camera of the device is turned on automatically to capture the image of the document. | boolean | `false` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1017
|
+
| **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` |
|
|
1018
|
+
| **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` |
|
|
1019
|
+
| **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` |
|
|
1020
|
+
| **regulaLogo** | **copyright** | Show Regula copyright footer. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1021
|
+
| **changeCameraButton** | **change-camera** | Show the camera switch button. | boolean | `false` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1022
|
+
| **closeButton** | **close-button** | Show the close button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1023
|
+
| **captureButton** | **capture-button** | Show the capture button. | boolean | `true` | `true`, `false` | `document-reader` |
|
|
1024
|
+
| **skipButton** | | Show the skip button for the second page. | boolean | `true` | `true`, `false` | `document-reader` |
|
|
1025
|
+
| **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` |
|
|
1026
|
+
| **resolution** | | Sets the resolution of the video stream from the camera. | object | `{ width: 1920, height: 1080 }` | `{ width: number, height: number }` | `document-reader`, `camera-snapshot` |
|
|
1027
|
+
| **cameraMode** | | Selects the front or rear camera of the device. | object | `environment` | `environment`, `user` | `document-reader`, `camera-snapshot` |
|
|
1028
|
+
| **flipFrontIcon** | | Sets the front side of the document flip icon. You can set link (`https://example.link.com/icon.png`), image in base64 string (`data:image/svg+xml;base64,PHN2ZyBjbGF...`) or imported image if you use module bundler. | string | `undefined` | `link to image`, `base64 string`, `imported image` | `document-reader` |
|
|
1029
|
+
| **flipBackIcon** | | Sets the back side of the document flip icon. You can set link (`https://example.link.com/icon.png`), image in base64 string (`data:image/svg+xml;base64,PHN2ZyBjbGF...`) or imported image if you use module bundler. | string | `undefined` | `link to image`, `base64 string`, `imported image` | `document-reader` |
|
|
1030
|
+
| **cameraFrameBorderWidth** | | Sets the thickness of the document capture frame. | number | 5 | `any number` | `document-reader` |
|
|
1031
|
+
| **backgroundMaskAlpha** | | Sets the transparency of the background outside the frame. | number | 0.5 | `from 0 to 1` | `document-reader` |
|
|
1032
|
+
| **cameraFrameLandscapeAspectRatio** | | Sets the aspect ratio of the capture frame for landscape mode. | number | depends on the scenario | `any number` | `document-reader` |
|
|
1033
|
+
| **cameraFramePortraitAspectRatio** | | Sets the aspect ratio of the capture frame for portrait mode. | number | depends on the scenario | `any number` | `document-reader` |
|
|
1034
|
+
| **statusIcon** | | Show status icon. | boolean | `true` | `true`, `false` | `document-reader` |
|
|
1035
|
+
| **statusPositionMultiplier** | | Sets the vertical position of the status message. | number | `undefined` | `from 0 to 2` | `document-reader` |
|
|
1036
|
+
| **cameraFrameOffsetWidth** | | Sets the offset of the capture frame. | number | `undefined` | `any number` | `document-reader` |
|
|
1037
|
+
| **cameraFrameVerticalPositionMultiplier** | | Sets the offset of the capture frame from the top edge. | number | `undefined` | `from 0 to 2` | `document-reader` |
|
|
1038
|
+
| **cameraFrameShapeType** | | Sets the capture frame shape type. | string | `line` | `line`, `corners` | `document-reader` |
|
|
1039
|
+
| **cameraFrameLineCap** | | Sets the style of the end of the capture frame line when `cameraFrameShapeType='corners'` | string | `butt` | `butt`, `round`, `square` | `document-reader` |
|
|
1040
|
+
| **cameraFrameLineLength** | | Sets the length of the capture frame line when `cameraFrameShapeType='corners'` | number | 5 | `any number` | `document-reader` |
|
|
1041
|
+
| **cameraFrameCornerRadius** | | Sets the radius of rounding of the capture frame. | number | 15 | `any number` | `document-reader` |
|
|
1042
|
+
| **cameraFrameDefaultColor** | | Sets the color of the capture frame. | string | `rgba(255, 255, 255, 0.9)` | `any color string` | `document-reader` |
|
|
1043
|
+
| **cameraFrameActiveColor** | | Sets the capture frame color when a document is detected. | string | `rgba(30, 130, 76, 0.9)` | `any color string` | `document-reader` |
|
|
1044
|
+
| **statusTextColor** | | Sets the color of the text message status. | string | `white` | `any color string` | `document-reader`, `camera-snapshot` |
|
|
1045
|
+
| **statusBackgroundColor** | | Sets the background color of the message status. | string | `rgba(27, 16, 31, 0.5)` | `any color string` | `document-reader`, `camera-snapshot` |
|
|
1046
|
+
| **cameraFrame** | | Show the capture frame. | boolean | `true` | `true`, `false` | `document-reader` |
|
|
1047
|
+
| **captureButtonDelay** | | Show the capture button after delay. | number | `undefined` | `any number` | `document-reader` |
|
|
1048
|
+
| **nonce** | | Sets the unique nonce value to maintain the CSP policy. | string | `undefined` | `unique nonce value` | `document-reader`, `camera-snapshot` |
|
|
1049
|
+
| **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 }` | `document-reader` |
|
|
1050
|
+
| **videoCaptureMotionControl** | | Enables device shaking control. | boolean | `false` | `true`, `false` | `document-reader` |
|
|
1051
|
+
| **fromCameraButton** | | Show the camera button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1052
|
+
| **uploadFileButton** | | Show the files button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1053
|
+
| **mirrorButton** | | Show the mirroring button. | boolean | `false` | `true`, `false` | `document-reader`, `camera-snapshot` |
|
|
1054
|
+
| **mirrorType** | | Sets the initial value of video mirroring. | string | `mirror` - for front camera, `noMirror` - for back camera, | `mirror`, `noMirror` | `document-reader`, `camera-snapshot` |
|
|
1055
|
+
| **mobileDelegate** | | Changes the success screen in case of delegating scanning via a mobile device. | boolean | `false` | `true`, `false` | `document-reader` |
|
|
977
1056
|
|
|
978
1057
|
### Backend reprocessing
|
|
979
1058
|
|
|
@@ -1052,7 +1131,7 @@ Using CSS variables, you can change the font and the main colors of the componen
|
|
|
1052
1131
|
|:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------:|
|
|
1053
1132
|
| **--font-family** | The font family of all text elements. If you change the font family, make sure to adjust the font size so the message on the start screen would fit the frame. | `Noto Sans, sans-serif` |
|
|
1054
1133
|
| **--font-size** | The font size for the text elements. | `16px` |
|
|
1055
|
-
| **--main-color** | Color for the graphic elements of the component. By default, the brand Regula violet is set. | `#
|
|
1134
|
+
| **--main-color** | Color for the graphic elements of the component. By default, the brand Regula violet is set. | `#7E57C5` |
|
|
1056
1135
|
| **--hover-color** | Buttons hover color. | `#c994ff` |
|
|
1057
1136
|
| **--active-color** | Buttons active color. | `#bd7dff` |
|
|
1058
1137
|
|
|
@@ -1111,55 +1190,52 @@ body.append(element);
|
|
|
1111
1190
|
|
|
1112
1191
|
See the following table with localized labels, used in the components.
|
|
1113
1192
|
|
|
1114
|
-
| Label
|
|
1115
|
-
|
|
1116
|
-
| **
|
|
1117
|
-
| **fileCorrupt**
|
|
1118
|
-
| **
|
|
1119
|
-
| **
|
|
1120
|
-
| **
|
|
1121
|
-
| **
|
|
1122
|
-
| **
|
|
1123
|
-
| **
|
|
1124
|
-
| **
|
|
1125
|
-
| **
|
|
1126
|
-
| **
|
|
1127
|
-
| **
|
|
1128
|
-
| **
|
|
1129
|
-
| **
|
|
1130
|
-
| **
|
|
1131
|
-
| **
|
|
1132
|
-
| **
|
|
1133
|
-
| **
|
|
1134
|
-
| **
|
|
1135
|
-
| **
|
|
1136
|
-
| **
|
|
1137
|
-
| **
|
|
1138
|
-
| **
|
|
1139
|
-
| **
|
|
1140
|
-
| **
|
|
1141
|
-
| **
|
|
1142
|
-
| **
|
|
1143
|
-
| **
|
|
1144
|
-
| **
|
|
1145
|
-
| **
|
|
1146
|
-
| **
|
|
1147
|
-
| **
|
|
1148
|
-
| **
|
|
1149
|
-
| **
|
|
1150
|
-
| **
|
|
1151
|
-
| **
|
|
1152
|
-
| **
|
|
1153
|
-
| **
|
|
1154
|
-
| **
|
|
1155
|
-
| **
|
|
1156
|
-
| **
|
|
1157
|
-
| **
|
|
1158
|
-
| **
|
|
1159
|
-
| **
|
|
1160
|
-
| **uploadPhoto** | Upload a photo | `camera-snapshot` |
|
|
1161
|
-
| **useCameraOrGallery** | Use your device camera or select a photo from the gallery | `camera-snapshot` |
|
|
1162
|
-
| **statusAwaitingReprocessing** | Awaiting reprocessing | `camera-snapshot` |
|
|
1193
|
+
| Label | Default message in `en` locale | Used in |
|
|
1194
|
+
|:---------------------------------|:-------------------------------------------------------------------------------------------------------|:------------------------------------:|
|
|
1195
|
+
| **done** | Done! | `document-reader`, `camera-snapshot` |
|
|
1196
|
+
| **fileCorrupt** | This file is corrupt or not supported | `document-reader`, `camera-snapshot` |
|
|
1197
|
+
| **somethingWentWrong** | Something went wrong | `document-reader`, `camera-snapshot` |
|
|
1198
|
+
| **tryAgain** | Try again | `document-reader`, `camera-snapshot` |
|
|
1199
|
+
| **cameraUnavailable** | Camera unavailable! | `document-reader`, `camera-snapshot` |
|
|
1200
|
+
| **preparingCamera** | Preparing the camera... | `document-reader`, `camera-snapshot` |
|
|
1201
|
+
| **noCameraAvailable** | No camera available | `document-reader`, `camera-snapshot` |
|
|
1202
|
+
| **incorrectCameraId** | No camera with the specified ID found. | `document-reader`, `camera-snapshot` |
|
|
1203
|
+
| **gallery** | Gallery | `document-reader`, `camera-snapshot` |
|
|
1204
|
+
| **files** | Files | `document-reader`, `camera-snapshot` |
|
|
1205
|
+
| **camera** | Camera | `document-reader`, `camera-snapshot` |
|
|
1206
|
+
| **largeFile** | This file is too large to be uploaded | `document-reader` |
|
|
1207
|
+
| **versionNotSupported** | Your browser version is not supported | `document-reader` |
|
|
1208
|
+
| **httpNotSupported** | HTTPS is not used | `document-reader` |
|
|
1209
|
+
| **insecurePageContext** | Insecure page context | `document-reader` |
|
|
1210
|
+
| **timeout** | Timeout | `document-reader` |
|
|
1211
|
+
| **preparingService** | Preparing the service... | `document-reader` |
|
|
1212
|
+
| **placeDocumentIntoFrame** | Fit the document into the frame | `document-reader` |
|
|
1213
|
+
| **noFocus** | No camera focus | `document-reader` |
|
|
1214
|
+
| **moveCloser** | Move closer | `document-reader` |
|
|
1215
|
+
| **glaresOnDocument** | Avoid glare on the document | `document-reader` |
|
|
1216
|
+
| **holdDocumentStraight** | Hold the document straight | `document-reader` |
|
|
1217
|
+
| **documentProcessing** | Document processing... | `document-reader` |
|
|
1218
|
+
| **flipDocument** | Flip the document | `document-reader` |
|
|
1219
|
+
| **keepDeviceStill** | Hold the device still | `document-reader` |
|
|
1220
|
+
| **positionDocumentCenter** | Position the document in the center | `camera-snapshot` |
|
|
1221
|
+
| **uploadPhoto** | Upload a photo | `camera-snapshot` |
|
|
1222
|
+
| **scanQRCode** | Scan QR code | `document-reader` |
|
|
1223
|
+
| **openPhoneCamera** | Open the camera on your mobile device, scan the QR code, and follow the link | `document-reader` |
|
|
1224
|
+
| **pleaseWait** | Please wait... | `document-reader` |
|
|
1225
|
+
| **mobileDevice** | Mobile device | `document-reader` |
|
|
1226
|
+
| **verifyYourIdentity** | Verify your identity document | `document-reader` |
|
|
1227
|
+
| **fromCameraFilesMobileDesktop** | Capture a document using the computer’s camera, or upload it from files, or scan it on a mobile device | `document-reader` |
|
|
1228
|
+
| **fromCameraGalleryMobile** | Capture a document using the computer’s camera, or upload it from gallery | `document-reader` |
|
|
1229
|
+
| **badLicense** | The license cannot be found or has expired | `document-reader` |
|
|
1230
|
+
| **fromCameraFilesDesktop** | Capture a document using the computer’s camera, or upload it from files | `document-reader` |
|
|
1231
|
+
| **fromCameraMobileDesktop** | Capture a document using the computer’s camera, or scan it on a mobile device | `document-reader` |
|
|
1232
|
+
| **fromFilesMobileDesktop** | Upload a document from files, or scan it on a mobile device | `document-reader` |
|
|
1233
|
+
| **fromCameraDesktop** | Use the computer's camera to capture a document | `document-reader` |
|
|
1234
|
+
| **fromFilesDesktop** | Pick a document from the files and upload it | `document-reader` |
|
|
1235
|
+
| **fromMobileDesktop** | Use your mobile camera to capture a document | `document-reader` |
|
|
1236
|
+
| **fromGalleryMobile** | Pick a document from the gallery and upload it | `document-reader` |
|
|
1237
|
+
| **returnToComputer** | Return to the computer | `document-reader` |
|
|
1238
|
+
| **documentCaptured** | Your document has been captured | `document-reader` |
|
|
1163
1239
|
|
|
1164
1240
|
## Document Reader Processor
|
|
1165
1241
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ContainerList } from '@regulaforensics/document-reader-webclient';
|
|
2
2
|
import { DocumentFormat } from '@regulaforensics/document-reader-webclient';
|
|
3
|
+
import { GetTransactionsByTagResponse } from '@regulaforensics/document-reader-webclient';
|
|
3
4
|
import { MeasureSystem } from '@regulaforensics/document-reader-webclient';
|
|
4
5
|
import { MRZFormat } from '@regulaforensics/document-reader-webclient';
|
|
5
6
|
import { Response as Response_2 } from '@regulaforensics/document-reader-webclient';
|
|
@@ -47,6 +48,10 @@ export declare interface CameraSnapshotSettings {
|
|
|
47
48
|
nonce?: string;
|
|
48
49
|
statusTextColor?: string;
|
|
49
50
|
statusBackgroundColor?: string;
|
|
51
|
+
fromCameraButton?: boolean;
|
|
52
|
+
uploadFileButton?: boolean;
|
|
53
|
+
mirrorButton?: boolean;
|
|
54
|
+
mirrorType?: MirrorType;
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
export declare type CaptureFrameType = {
|
|
@@ -292,6 +297,7 @@ export declare interface DocumentReaderSettings extends CameraSnapshotSettings {
|
|
|
292
297
|
captureButtonDelay?: number;
|
|
293
298
|
videoRecord?: boolean | VideoRecordSettings;
|
|
294
299
|
videoCaptureMotionControl?: boolean;
|
|
300
|
+
mobileDelegate?: boolean;
|
|
295
301
|
}
|
|
296
302
|
|
|
297
303
|
export declare class DocumentReaderWebComponent extends HTMLElement {
|
|
@@ -375,7 +381,10 @@ export declare enum ErrorTypes {
|
|
|
375
381
|
CAMERA_PERMISSION_DENIED = "CAMERA_PERMISSION_DENIED",
|
|
376
382
|
NO_CAMERA = "NO_CAMERA",
|
|
377
383
|
INCORRECT_CAMERA_ID = "INCORRECT_CAMERA_ID",
|
|
378
|
-
CONNECTION_ERROR = "CONNECTION_ERROR"
|
|
384
|
+
CONNECTION_ERROR = "CONNECTION_ERROR",
|
|
385
|
+
HTTP_NOT_SUPPORTED = "HTTP_NOT_SUPPORTED",
|
|
386
|
+
INSECURE_PAGE_CONTEXT = "INSECURE_PAGE_CONTEXT",
|
|
387
|
+
BAD_CONFIGURATION = "BAD_CONFIGURATION"
|
|
379
388
|
}
|
|
380
389
|
|
|
381
390
|
export declare enum EventActions {
|
|
@@ -388,10 +397,6 @@ export declare enum EventActions {
|
|
|
388
397
|
PRESS_CHANGE_CAMERA_BUTTON = "PRESS_CHANGE_CAMERA_BUTTON",
|
|
389
398
|
PRESS_REMOTE_DEVICE_BUTTON = "PRESS_REMOTE_DEVICE_BUTTON",
|
|
390
399
|
PRESS_MIRRORING_BUTTON = "PRESS_MIRRORING_BUTTON",
|
|
391
|
-
PRESS_CONNECT_BUTTON = "PRESS_CONNECT_BUTTON",
|
|
392
|
-
PRESS_DISCONNECT_BUTTON = "PRESS_DISCONNECT_BUTTON",
|
|
393
|
-
PRESS_AUTOSCAN_BUTTON = "PRESS_AUTOSCAN_BUTTON",
|
|
394
|
-
PRESS_PROCESS_BUTTON = "PRESS_PROCESS_BUTTON",
|
|
395
400
|
NEW_PAGE_AVAILABLE = "NEW_PAGE_AVAILABLE",
|
|
396
401
|
NEW_PAGE_STARTED = "NEW_PAGE_STARTED",
|
|
397
402
|
CLOSE = "CLOSE",
|
|
@@ -400,7 +405,6 @@ export declare enum EventActions {
|
|
|
400
405
|
VIDEO_STARTED = "VIDEO_STARTED",
|
|
401
406
|
VIDEO_STOPPED = "VIDEO_STOPPED",
|
|
402
407
|
FILE_PROCESS_STARTED = "FILE_PROCESS_STARTED",
|
|
403
|
-
PROCESS_STARTED = "PROCESS_STARTED",
|
|
404
408
|
PROCESS_FINISHED = "PROCESS_FINISHED",
|
|
405
409
|
SERVICE_INITIALIZED = "SERVICE_INITIALIZED",
|
|
406
410
|
REMOTE_TRANSACTION_UPLOADED = "REMOTE_TRANSACTION_UPLOADED",
|
|
@@ -477,7 +481,7 @@ export declare type License = {
|
|
|
477
481
|
scenario: Array<TScenarioParams>;
|
|
478
482
|
};
|
|
479
483
|
|
|
480
|
-
export declare type Locales = 'ru' | 'en' | 'de' | 'pl' | 'it' | 'hu' | 'zh' | 'sk' | 'uk' | 'fr' | 'es' | 'pt' | 'ar' | 'nl' | 'id' | 'vi' | 'ko' | 'ms' | 'ro' | 'el' | 'tr' | 'ja' | 'cs' | 'th' | 'hi' | 'bn' | 'he' | 'fi' | 'sv' | 'da' | 'hr' | 'no' | string;
|
|
484
|
+
export declare type Locales = 'ru' | 'en' | 'de' | 'pl' | 'it' | 'hu' | 'zh' | 'sk' | 'uk' | 'fr' | 'es' | 'pt' | 'ar' | 'nl' | 'id' | 'vi' | 'ko' | 'ms' | 'ro' | 'el' | 'tr' | 'ja' | 'cs' | 'th' | 'hi' | 'bn' | 'he' | 'fi' | 'sv' | 'da' | 'hr' | 'no' | 'uz' | string;
|
|
481
485
|
|
|
482
486
|
export declare const Logger: Logger_2;
|
|
483
487
|
|
|
@@ -492,6 +496,11 @@ declare class Logger_2 {
|
|
|
492
496
|
saveLogs(): void;
|
|
493
497
|
}
|
|
494
498
|
|
|
499
|
+
export declare enum MirrorType {
|
|
500
|
+
mirror = "mirror",
|
|
501
|
+
noMirror = "noMirror"
|
|
502
|
+
}
|
|
503
|
+
|
|
495
504
|
export declare interface NewTransaction {
|
|
496
505
|
ContainerList: ContainerList;
|
|
497
506
|
TransactionInfo: {
|
|
@@ -551,7 +560,7 @@ declare type TProcessingListener = ({ isProcessing }: {
|
|
|
551
560
|
|
|
552
561
|
export declare interface TransactionEvent {
|
|
553
562
|
action: EventActions.REMOTE_TRANSACTION_UPLOADED;
|
|
554
|
-
data:
|
|
563
|
+
data: GetTransactionsByTagResponse;
|
|
555
564
|
}
|
|
556
565
|
|
|
557
566
|
export declare interface TransactionInfo {
|
|
@@ -559,22 +568,12 @@ export declare interface TransactionInfo {
|
|
|
559
568
|
transactionId: string;
|
|
560
569
|
}
|
|
561
570
|
|
|
562
|
-
export declare type TransactionsListResponse = {
|
|
563
|
-
items: TransactionStatusInfo[];
|
|
564
|
-
};
|
|
565
|
-
|
|
566
571
|
export declare enum TransactionStateStatus {
|
|
567
572
|
STARTED = 0,
|
|
568
573
|
UPLOADED = 1,
|
|
569
574
|
PROCESSED = 2
|
|
570
575
|
}
|
|
571
576
|
|
|
572
|
-
export declare type TransactionStatusInfo = {
|
|
573
|
-
id: number;
|
|
574
|
-
state: TransactionStateStatus;
|
|
575
|
-
updatedAt: string;
|
|
576
|
-
};
|
|
577
|
-
|
|
578
577
|
export declare type TScenarioParams = {
|
|
579
578
|
name: string;
|
|
580
579
|
desc: string;
|