@regulaforensics/vp-frontend-document-components 7.4.1858-nightly → 7.4.1926-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 CHANGED
@@ -268,6 +268,7 @@ After adding `DocumentReaderService` to the global variable, you can change the
268
268
  | **scenario** | Recognition scenario. | string | 'MrzAndLocate' | 'MrzAndLocate', 'MrzOrLocate', 'Mrz', 'Locate' |
269
269
  | **multipageProcessing** | Whether to enable multi-page document processing mode. | boolean | `true` | `true`, `false` |
270
270
  | **timeout** | Recognition timeout in milliseconds. After this time process will be finished. | number | 2000 | numbers > 0 |
271
+ | **timeoutFromFirstDetect** | Start the countdown from the moment the document is detected. | number | 5000 | numbers > 0 |
271
272
  | **resultTypeOutput** | Types of results to return in response. [] - all available types. | number[] | [] | `1` - DocumentImageResult, `3` - TextDataResult, `5` - DocBarCodeInfo, `6` - GraphicsResult, `8` - DocumentTypesCandidatesResult, `9` - ChosenDocumentTypeResult, `20` - AuthenticityResult, `15` - LexicalAnalysisResult, `17` - TextDataResult, `18` - TextDataResult, `19` - GraphicsResult, `30` - ImageQualityResult, `33` - StatusResult, `36` - TextResult, `37` - ImagesResult, `85` - DocumentPositionResult, `102` - TextDataResult, `103` - GraphicsResult, `50` - LicenseResult, `49` - EncryptedRCLResult |
272
273
  | **returnPackageForReprocess** | When enabled, returns the package for reprocessing on the backend. | boolean | `false` | `true`, `false` |
273
274
  | **imageQa** | When enabled, image quality checks status affects document optical and overall status. | | | |
@@ -337,12 +338,13 @@ The fields of the `event.detail` object:
337
338
  | Type of action | Description of the action | Components and events, where present |
338
339
  |:------------------------------|:------------------------------------------------------------------|:------------------------------------:|
339
340
  | `ELEMENT_VISIBLE` | Component is appended in the DOM. | `document-reader`, `camera-snapshot` |
340
- | `PRESS_CAMERA_BUTTON` | The "From camera" button is pressed. | `document-reader`, `camera-snapshot` |
341
- | `PRESS_FILE_BUTTON` | The "From gallery" button is pressed. | `document-reader`, `camera-snapshot` |
341
+ | `PRESS_CAMERA_BUTTON` | The "Camera" button is pressed. | `document-reader`, `camera-snapshot` |
342
+ | `PRESS_FILE_BUTTON` | The "Files" button is pressed. | `document-reader`, `camera-snapshot` |
342
343
  | `PRESS_RETRY_BUTTON` | The "Retry" button is pressed. | `document-reader`, `camera-snapshot` |
343
344
  | `PRESS_SKIP_BUTTON` | The "Skip" button is pressed. | `document-reader` |
344
345
  | `PRESS_CAPTURE_BUTTON` | The "Capture" button is pressed. | `document-reader`, `camera-snapshot` |
345
346
  | `PRESS_CHANGE_CAMERA_BUTTON` | The "Change camera" button is pressed. | `document-reader`, `camera-snapshot` |
347
+ | `PRESS_REMOTE_DEVICE_BUTTON` | The "Mobile device" button is pressed. | `document-reader` |
346
348
  | `PRESS_MIRRORING_BUTTON` | The "Mirroring" button is pressed. | `document-reader`, `camera-snapshot` |
347
349
  | `NEW_PAGE_AVAILABLE` | The document contains another page. | `document-reader` |
348
350
  | `NEW_PAGE_STARTED` | Recognition of a new page has started. | `document-reader` |
@@ -354,7 +356,6 @@ The fields of the `event.detail` object:
354
356
  | `FILE_PROCESS_STARTED` | File processing has started. | `document-reader`, `camera-snapshot` |
355
357
  | `PROCESS_FINISHED` | The component has finished its work. | `document-reader`, `camera-snapshot` |
356
358
  | `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
359
  | `REMOTE_TRANSACTION_UPLOADED` | Remote transaction with current tag was uploaded | `document-reader` |
359
360
  | `REMOTE_PROCESS_FINISHED` | Remote transaction with current tag was processed | `document-reader` |
360
361
 
@@ -425,6 +426,7 @@ Available fields of `event.detail.data` object:
425
426
  | `NO_CAMERA` | There is no camera available |
426
427
  | `INCORRECT_CAMERA_ID` | Camera with this ID was not found |
427
428
  | `CONNECTION_ERROR` | Connection errors |
429
+ | `BAD_CONFIGURATION` | Incompatible component settings are installed |
428
430
 
429
431
  #### Remote action data
430
432
 
@@ -490,7 +492,7 @@ For example:
490
492
  </td>
491
493
  </tr>
492
494
  <tr>
493
- <td>"From camera" button is pressed.</td>
495
+ <td>"Camera" button is pressed.</td>
494
496
  <td>
495
497
 
496
498
  `document-reader`, `camera-snapshot`
@@ -509,7 +511,7 @@ For example:
509
511
  <td></td>
510
512
  </tr>
511
513
  <tr>
512
- <td>"From gallery" button is pressed.</td>
514
+ <td>"Files" button is pressed.</td>
513
515
  <td>
514
516
 
515
517
  `document-reader`, `camera-snapshot`
@@ -605,6 +607,26 @@ This event available only in `document-reader`.
605
607
  }
606
608
  ```
607
609
 
610
+ </td>
611
+ <td>
612
+ </td>
613
+ </tr>
614
+ <tr>
615
+ <td>"Mobile device" button is pressed.</td>
616
+ <td>
617
+
618
+ `document-reader`
619
+
620
+ </td>
621
+ <td>
622
+
623
+ ```javascript
624
+ {
625
+ action: 'PRESS_REMOTE_DEVICE_BUTTON',
626
+ data: null,
627
+ }
628
+ ```
629
+
608
630
  </td>
609
631
  <td>
610
632
  </td>
@@ -880,6 +902,59 @@ This event available only in `document-reader`.
880
902
 
881
903
  This event available only in `document-reader`.
882
904
 
905
+ </td>
906
+ </tr>
907
+ <tr>
908
+ <td>The transaction has been successfully uploaded from the delegated device.</td>
909
+ <td>
910
+
911
+ `document-reader`
912
+
913
+ </td>
914
+ <td>
915
+
916
+ ```javascript
917
+ {
918
+ action: 'REMOTE_TRANSACTION_UPLOADED',
919
+ data: {
920
+ id: 'df4e210a-8411-411b-998e-a7c7f6b4a770',
921
+ state: 1,
922
+ updatedAt: '2024-09-19T11:05:21.473286Z'
923
+ },
924
+ }
925
+ ```
926
+
927
+ </td>
928
+ <td>
929
+
930
+ This event available only in `document-reader`.
931
+
932
+ </td>
933
+ </tr>
934
+ <tr>
935
+ <td>Remote processing has been completed successfully.</td>
936
+ <td>
937
+
938
+ `document-reader`
939
+
940
+ </td>
941
+ <td>
942
+
943
+ ```javascript
944
+ {
945
+ action: 'REMOTE_PROCESS_FINISHED',
946
+ data: {
947
+ response: { ... },
948
+ status: 1
949
+ },
950
+ }
951
+ ```
952
+
953
+ </td>
954
+ <td>
955
+
956
+ This event available only in `document-reader`.
957
+
883
958
  </td>
884
959
  </tr>
885
960
  </tbody>
@@ -934,46 +1009,51 @@ This method gives more flexibility in setup, in addition, all new parameters in
934
1009
 
935
1010
  See all component's settings and attributes in the following table.
936
1011
 
937
- | Setting name | Attribute name | Description | Data type | Default value | Values | Available in |
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 | `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` |
940
- | **internalScenario** | **internal-scenario** | The component document verification scenario. | string | `MrzAndLocate` | `MrzAndLocate`, `MrzOrLocate`, `Mrz`, `Locate`, `Barcode`, `MrzOrBarcode`, `BarcodeAndLocate` | `document-reader` |
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 | `false` | `true`, `false` | `document-reader` |
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 | `false` | `true`, `false` | `document-reader`, `camera-snapshot` |
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 | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
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 | `undefined` | `camera id string value` | `document-reader`, `camera-snapshot` |
945
- | **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` |
946
- | **regulaLogo** | **copyright** | Show Regula copyright footer. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
947
- | **changeCameraButton** | **change-camera** | Show the camera switch button. | boolean | `false` | `true`, `false` | `document-reader`, `camera-snapshot` |
948
- | **closeButton** | **close-button** | Show the close button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
949
- | **captureButton** | **capture-button** | Show the capture button. | boolean | `true` | `true`, `false` | `document-reader` |
950
- | **skipButton** | | Show the skip button for the second page. | boolean | `true` | `true`, `false` | `document-reader` |
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 | `auto` | `auto`, `captureVideo`, `captureFrame` | `document-reader` |
952
- | **resolution** | | Sets the resolution of the video stream from the camera. | object | `{ width: 1920, height: 1080 }` | `{ width: number, height: number }` | `document-reader`, `camera-snapshot` |
953
- | **cameraMode** | | Selects the front or rear camera of the device. | object | `environment` | `environment`, `user` | `document-reader`, `camera-snapshot` |
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 | `undefined` | `link to image`, `base64 string`, `imported image` | `document-reader` |
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 | `undefined` | `link to image`, `base64 string`, `imported image` | `document-reader` |
956
- | **cameraFrameBorderWidth** | | Sets the thickness of the document capture frame. | number | 5 | `any number` | `document-reader` |
957
- | **backgroundMaskAlpha** | | Sets the transparency of the background outside the frame. | number | 0.5 | `from 0 to 1` | `document-reader` |
958
- | **cameraFrameLandscapeAspectRatio** | | Sets the aspect ratio of the capture frame for landscape mode. | number | depends on the scenario | `any number` | `document-reader` |
959
- | **cameraFramePortraitAspectRatio** | | Sets the aspect ratio of the capture frame for portrait mode. | number | depends on the scenario | `any number` | `document-reader` |
960
- | **statusIcon** | | Show status icon. | boolean | `true` | `true`, `false` | `document-reader` |
961
- | **statusPositionMultiplier** | | Sets the vertical position of the status message. | number | `undefined` | `from 0 to 2` | `document-reader` |
962
- | **cameraFrameOffsetWidth** | | Sets the offset of the capture frame. | number | `undefined` | `any number` | `document-reader` |
963
- | **cameraFrameVerticalPositionMultiplier** | | Sets the offset of the capture frame from the top edge. | number | `undefined` | `from 0 to 2` | `document-reader` |
964
- | **cameraFrameShapeType** | | Sets the capture frame shape type. | string | `line` | `line`, `corners` | `document-reader` |
965
- | **cameraFrameLineCap** | | Sets the style of the end of the capture frame line when `cameraFrameShapeType='corners'` | string | `butt` | `butt`, `round`, `square` | `document-reader` |
966
- | **cameraFrameLineLength** | | Sets the length of the capture frame line when `cameraFrameShapeType='corners'` | number | 5 | `any number` | `document-reader` |
967
- | **cameraFrameCornerRadius** | | Sets the radius of rounding of the capture frame. | number | 15 | `any number` | `document-reader` |
968
- | **cameraFrameDefaultColor** | | Sets the color of the capture frame. | string | `rgba(255, 255, 255, 0.9)` | `any color string` | `document-reader` |
969
- | **cameraFrameActiveColor** | | Sets the capture frame color when a document is detected. | string | `rgba(30, 130, 76, 0.9)` | `any color string` | `document-reader` |
970
- | **statusTextColor** | | Sets the color of the text message status. | string | `white` | `any color string` | `document-reader`, `camera-snapshot` |
971
- | **statusBackgroundColor** | | Sets the background color of the message status. | string | `rgba(27, 16, 31, 0.5)` | `any color string` | `document-reader`, `camera-snapshot` |
972
- | **cameraFrame** | | Show the capture frame. | boolean | `true` | `true`, `false` | `document-reader` |
973
- | **captureButtonDelay** | | Show the capture button after delay. | number | `undefined` | `any number` | `document-reader` |
974
- | **nonce** | | Sets the unique nonce value to maintain the CSP policy. | string | `undefined` | `unique nonce value` | `document-reader`, `camera-snapshot` |
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 | `undefined` | `true`, `false`, `{ delay: number, duration: number }` | `document-reader` |
976
- | **videoCaptureMotionControl** | | Enables device shaking control. | boolean | `false` | `true`, `false` | `document-reader` |
1012
+ | Setting name | Attribute name | Description | Data type | Default value | Values | Available in |
1013
+ |:------------------------------------------|:-------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------:|:----------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------:|
1014
+ | **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` |
1015
+ | **internalScenario** | **internal-scenario** | The component document verification scenario. | string | `MrzAndLocate` | `MrzAndLocate`, `MrzOrLocate`, `Mrz`, `Locate`, `Barcode`, `MrzOrBarcode`, `BarcodeAndLocate` | `document-reader` |
1016
+ | **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` |
1017
+ | **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` |
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
+ | **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
+ | **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. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
1022
+ | **changeCameraButton** | **change-camera** | Show the camera switch button. | boolean | `false` | `true`, `false` | `document-reader`, `camera-snapshot` |
1023
+ | **closeButton** | **close-button** | Show the close button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
1024
+ | **captureButton** | **capture-button** | Show the capture button. | boolean | `true` | `true`, `false` | `document-reader` |
1025
+ | **skipButton** | | Show the skip button for the second page. | boolean | `true` | `true`, `false` | `document-reader` |
1026
+ | **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
+ | **resolution** | | Sets the resolution of the video stream from the camera. | object | `{ width: 1920, height: 1080 }` | `{ width: number, height: number }` | `document-reader`, `camera-snapshot` |
1028
+ | **cameraMode** | | Selects the front or rear camera of the device. | object | `environment` | `environment`, `user` | `document-reader`, `camera-snapshot` |
1029
+ | **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` |
1030
+ | **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` |
1031
+ | **cameraFrameBorderWidth** | | Sets the thickness of the document capture frame. | number | 5 | `any number` | `document-reader` |
1032
+ | **backgroundMaskAlpha** | | Sets the transparency of the background outside the frame. | number | 0.5 | `from 0 to 1` | `document-reader` |
1033
+ | **cameraFrameLandscapeAspectRatio** | | Sets the aspect ratio of the capture frame for landscape mode. | number | depends on the scenario | `any number` | `document-reader` |
1034
+ | **cameraFramePortraitAspectRatio** | | Sets the aspect ratio of the capture frame for portrait mode. | number | depends on the scenario | `any number` | `document-reader` |
1035
+ | **statusIcon** | | Show status icon. | boolean | `true` | `true`, `false` | `document-reader` |
1036
+ | **statusPositionMultiplier** | | Sets the vertical position of the status message. | number | `undefined` | `from 0 to 2` | `document-reader` |
1037
+ | **cameraFrameOffsetWidth** | | Sets the offset of the capture frame. | number | `undefined` | `any number` | `document-reader` |
1038
+ | **cameraFrameVerticalPositionMultiplier** | | Sets the offset of the capture frame from the top edge. | number | `undefined` | `from 0 to 2` | `document-reader` |
1039
+ | **cameraFrameShapeType** | | Sets the capture frame shape type. | string | `line` | `line`, `corners` | `document-reader` |
1040
+ | **cameraFrameLineCap** | | Sets the style of the end of the capture frame line when `cameraFrameShapeType='corners'` | string | `butt` | `butt`, `round`, `square` | `document-reader` |
1041
+ | **cameraFrameLineLength** | | Sets the length of the capture frame line when `cameraFrameShapeType='corners'` | number | 5 | `any number` | `document-reader` |
1042
+ | **cameraFrameCornerRadius** | | Sets the radius of rounding of the capture frame. | number | 15 | `any number` | `document-reader` |
1043
+ | **cameraFrameDefaultColor** | | Sets the color of the capture frame. | string | `rgba(255, 255, 255, 0.9)` | `any color string` | `document-reader` |
1044
+ | **cameraFrameActiveColor** | | Sets the capture frame color when a document is detected. | string | `rgba(30, 130, 76, 0.9)` | `any color string` | `document-reader` |
1045
+ | **statusTextColor** | | Sets the color of the text message status. | string | `white` | `any color string` | `document-reader`, `camera-snapshot` |
1046
+ | **statusBackgroundColor** | | Sets the background color of the message status. | string | `rgba(27, 16, 31, 0.5)` | `any color string` | `document-reader`, `camera-snapshot` |
1047
+ | **cameraFrame** | | Show the capture frame. | boolean | `true` | `true`, `false` | `document-reader` |
1048
+ | **captureButtonDelay** | | Show the capture button after delay. | number | `undefined` | `any number` | `document-reader` |
1049
+ | **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` | `true`, `false`, `{ delay: number, duration: number }` | `document-reader` |
1051
+ | **videoCaptureMotionControl** | | Enables device shaking control. | boolean | `false` | `true`, `false` | `document-reader` |
1052
+ | **fromCameraButton** | | Show the camera button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
1053
+ | **uploadFileButton** | | Show the files button. | boolean | `true` | `true`, `false` | `document-reader`, `camera-snapshot` |
1054
+ | **mirrorButton** | | Show the mirroring button. | boolean | `false` | `true`, `false` | `document-reader`, `camera-snapshot` |
1055
+ | **mirrorType** | | Sets the initial value of video mirroring. | string | `mirror` - for front camera, `noMirror` - for back camera, | `mirror`, `noMirror` | `document-reader`, `camera-snapshot` |
1056
+ | **mobileDelegate** | | Changes the success screen in case of delegating scanning via a mobile device. | boolean | `false` | `true`, `false` | `document-reader` |
977
1057
 
978
1058
  ### Backend reprocessing
979
1059
 
@@ -983,6 +1063,7 @@ You can send the results to the backend for further processing:
983
1063
  ```javascript
984
1064
  window.RegulaDocumentSDK.recognizerProcessParam = {
985
1065
  processParam: {
1066
+ scenario: InternalScenarios.MrzAndLocate,
986
1067
  backendProcessing: {
987
1068
  serviceURL: 'YOUR_SERVICE_URL',
988
1069
  httpHeaders: { // you can set http headers if necessary
@@ -1012,11 +1093,19 @@ For cases when user's main device lacks camera or does not succeed to scan with
1012
1093
  you have an option to delegate scanning to another available device (i.e. phone).
1013
1094
 
1014
1095
  #### 1. "From other phone" action may be configured on the start screen:
1015
- - configure [backend reprocessing](#backend-reprocessing)
1016
- - add 'delegateURL' and 'tag':
1096
+ - add 'delegateProcessing' and 'tag':
1017
1097
  ```javascript
1018
1098
  processor.recognizerProcessParam = {
1019
- delegateURL: 'https://your-page.com?tag={tag}', // the page which will be used by other device
1099
+ processParam: {
1100
+ scenario: InternalScenarios.MrzAndLocate,
1101
+ },
1102
+ delegateProcessing: {
1103
+ delegateURL: 'https://your-page.com?tag={tag}', // the page which will be used by other device
1104
+ serviceURL: 'https://my-service.com', // your backend service
1105
+ httpHeaders: { // http headers if needed
1106
+ header: 'value'
1107
+ }
1108
+ },
1020
1109
  tag: 123 // your session id, will be added to delegateURL in place of {tag} substring
1021
1110
  }
1022
1111
  ```
@@ -1029,19 +1118,22 @@ you have an option to delegate scanning to another available device (i.e. phone)
1029
1118
 
1030
1119
  #### 2. Configure Delegate page component on delegateURL:
1031
1120
  - configure [backend reprocessing](#backend-reprocessing)
1121
+ - backendProcessing setting for the device and delegateProcessing setting for the main page must match
1122
+ - set transaction tag
1123
+ ```javascript
1124
+ processor.recognizerProcessParam = {
1125
+ tag: new URL(window.location.href).searchParams.get('tag') // assume session Id tag was added to URL params
1126
+ }
1127
+ ```
1032
1128
  - use the same tag as on the main page
1033
1129
  ```javascript
1034
- window.RegulaDocumentSDK.recognizerProcessParam = {
1035
- tag: 123 // your session id, i.e. it can be extracted from your delegate page URL
1036
- };
1037
-
1038
- element.settings = {
1039
- startScreen: false, // From camera recognition is expected
1040
- }
1130
+ element.settings = {
1131
+ startScreen: false, // From camera recognition is expected
1132
+ mobileDelegate: true
1133
+ }
1041
1134
  ```
1042
1135
  - use finalizePackage() to send the data for further reprocessing
1043
1136
 
1044
-
1045
1137
  ### Appearance Customization
1046
1138
 
1047
1139
  #### Font and Colors
@@ -1052,7 +1144,7 @@ Using CSS variables, you can change the font and the main colors of the componen
1052
1144
  |:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------:|
1053
1145
  | **--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
1146
  | **--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. | `#bd7dff` |
1147
+ | **--main-color** | Color for the graphic elements of the component. By default, the brand Regula violet is set. | `#7E57C5` |
1056
1148
  | **--hover-color** | Buttons hover color. | `#c994ff` |
1057
1149
  | **--active-color** | Buttons active color. | `#bd7dff` |
1058
1150
 
@@ -1111,55 +1203,52 @@ body.append(element);
1111
1203
 
1112
1204
  See the following table with localized labels, used in the components.
1113
1205
 
1114
- | Label | Default message in `en` locale | Used in |
1115
- |:-------------------------------|:---------------------------------------------------------------------------------------------|:------------------------------------:|
1116
- | **success** | Success! | `document-reader`, `camera-snapshot` |
1117
- | **fileCorrupt** | This file is corrupt or not supported | `document-reader`, `camera-snapshot` |
1118
- | **selectAnotherFile** | Please select another file | `document-reader`, `camera-snapshot` |
1119
- | **error** | Error! | `document-reader`, `camera-snapshot` |
1120
- | **somethingWentWrong** | Something went wrong | `document-reader`, `camera-snapshot` |
1121
- | **tryAgain** | Try again | `document-reader`, `camera-snapshot` |
1122
- | **fromCamera** | From camera | `document-reader`, `camera-snapshot` |
1123
- | **fromGallery** | From gallery | `document-reader`, `camera-snapshot` |
1124
- | **fromOtherPhone** | From other phone | `document-reader`, `camera-snapshot` |
1125
- | **cameraUnavailable** | Camera unavailable! | `document-reader`, `camera-snapshot` |
1126
- | **preparingCamera** | Preparing the camera... | `document-reader`, `camera-snapshot` |
1127
- | **noCameraAvailable** | No camera available | `document-reader`, `camera-snapshot` |
1128
- | **incorrectCameraId** | No camera with the specified ID found. | `document-reader`, `camera-snapshot` |
1129
- | **allowAccessToCamera** | Allow access to the camera and reload this page to continue. | `document-reader`, `camera-snapshot` |
1130
- | **cameraConnection** | Make sure the camera is connected correctly. | `document-reader`, `camera-snapshot` |
1131
- | **checkCameraId** | Check if the specified camera ID is correct. | `document-reader`, `camera-snapshot` |
1132
- | **scanIDInBrowser** | Scan an ID in your browser | `document-reader` |
1133
- | **useYourDeviceCamera** | Use your device camera to scan a document or select a photo of the document from the gallery | `document-reader` |
1134
- | **processingFinished** | Processing finished. | `document-reader` |
1135
- | **largeFile** | This file is too large to be uploaded | `document-reader` |
1136
- | **selectSmallerFile** | Please select a smaller file | `document-reader` |
1137
- | **versionNotSupported** | Your browser version is not supported | `document-reader` |
1138
- | **httpNotSupported** | HTTPS is not used. | `document-reader` |
1139
- | **insecurePageContext** | Insecure page context. | `document-reader` |
1140
- | **updateBrowser** | Update your browser version | `document-reader` |
1141
- | **licenseError** | A license error has occurred | `document-reader` |
1142
- | **licenseExpired** | The license cannot be found or has expired | `document-reader` |
1143
- | **timeout** | Timeout | `document-reader` |
1144
- | **processing** | Processing... | `document-reader` |
1145
- | **preparingService** | Preparing the service... | `document-reader` |
1146
- | **placeDocumentIntoFrame** | Fit the document into the frame | `document-reader` |
1147
- | **noFocus** | No camera focus | `document-reader` |
1148
- | **moveCloser** | Move closer | `document-reader` |
1149
- | **glaresOnDocument** | Avoid glare on the document | `document-reader` |
1150
- | **holdDocumentStraight** | Hold the document straight | `document-reader` |
1151
- | **documentProcessing** | Document processing... | `document-reader` |
1152
- | **flipDocument** | Flip the document | `document-reader` |
1153
- | **verified** | Verified! | `document-reader` |
1154
- | **keepDeviceStill** | Hold the device still | `document-reader` |
1155
- | **otherDeviceCardTitle** | Continue on your phone | `document-reader` |
1156
- | **otherDeviceCardSubtitle** | The camera quality on the phone is better | `document-reader` |
1157
- | **otherDeviceCardNote** | Scan QR on your phone | `document-reader` |
1158
- | **positionDocumentCenter** | Position the document in the center | `camera-snapshot` |
1159
- | **photoCapturedSuccessfully** | The photo is captured successfully. | `camera-snapshot` |
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` |
1206
+ | Label | Default message in `en` locale | Used in |
1207
+ |:---------------------------------|:-------------------------------------------------------------------------------------------------------|:------------------------------------:|
1208
+ | **done** | Done! | `document-reader`, `camera-snapshot` |
1209
+ | **fileCorrupt** | This file is corrupt or not supported | `document-reader`, `camera-snapshot` |
1210
+ | **somethingWentWrong** | Something went wrong | `document-reader`, `camera-snapshot` |
1211
+ | **tryAgain** | Try again | `document-reader`, `camera-snapshot` |
1212
+ | **cameraUnavailable** | Camera unavailable! | `document-reader`, `camera-snapshot` |
1213
+ | **preparingCamera** | Preparing the camera... | `document-reader`, `camera-snapshot` |
1214
+ | **noCameraAvailable** | No camera available | `document-reader`, `camera-snapshot` |
1215
+ | **incorrectCameraId** | No camera with the specified ID found. | `document-reader`, `camera-snapshot` |
1216
+ | **gallery** | Gallery | `document-reader`, `camera-snapshot` |
1217
+ | **files** | Files | `document-reader`, `camera-snapshot` |
1218
+ | **camera** | Camera | `document-reader`, `camera-snapshot` |
1219
+ | **largeFile** | This file is too large to be uploaded | `document-reader` |
1220
+ | **versionNotSupported** | Your browser version is not supported | `document-reader` |
1221
+ | **httpNotSupported** | HTTPS is not used | `document-reader` |
1222
+ | **insecurePageContext** | Insecure page context | `document-reader` |
1223
+ | **timeout** | Timeout | `document-reader` |
1224
+ | **preparingService** | Preparing the service... | `document-reader` |
1225
+ | **placeDocumentIntoFrame** | Fit the document into the frame | `document-reader` |
1226
+ | **noFocus** | No camera focus | `document-reader` |
1227
+ | **moveCloser** | Move closer | `document-reader` |
1228
+ | **glaresOnDocument** | Avoid glare on the document | `document-reader` |
1229
+ | **holdDocumentStraight** | Hold the document straight | `document-reader` |
1230
+ | **documentProcessing** | Document processing... | `document-reader` |
1231
+ | **flipDocument** | Flip the document | `document-reader` |
1232
+ | **keepDeviceStill** | Hold the device still | `document-reader` |
1233
+ | **positionDocumentCenter** | Position the document in the center | `camera-snapshot` |
1234
+ | **uploadPhoto** | Upload a photo | `camera-snapshot` |
1235
+ | **scanQRCode** | Scan QR code | `document-reader` |
1236
+ | **openPhoneCamera** | Open the camera on your mobile device, scan the QR code, and follow the link | `document-reader` |
1237
+ | **pleaseWait** | Please wait... | `document-reader` |
1238
+ | **mobileDevice** | Mobile device | `document-reader` |
1239
+ | **verifyYourIdentity** | Verify your identity document | `document-reader` |
1240
+ | **fromCameraFilesMobileDesktop** | Capture a document using the computer’s camera, or upload it from files, or scan it on a mobile device | `document-reader` |
1241
+ | **fromCameraGalleryMobile** | Capture a document using the computer’s camera, or upload it from gallery | `document-reader` |
1242
+ | **badLicense** | The license cannot be found or has expired | `document-reader` |
1243
+ | **fromCameraFilesDesktop** | Capture a document using the computer’s camera, or upload it from files | `document-reader` |
1244
+ | **fromCameraMobileDesktop** | Capture a document using the computer’s camera, or scan it on a mobile device | `document-reader` |
1245
+ | **fromFilesMobileDesktop** | Upload a document from files, or scan it on a mobile device | `document-reader` |
1246
+ | **fromCameraDesktop** | Use the computer's camera to capture a document | `document-reader` |
1247
+ | **fromFilesDesktop** | Pick a document from the files and upload it | `document-reader` |
1248
+ | **fromMobileDesktop** | Use your mobile camera to capture a document | `document-reader` |
1249
+ | **fromGalleryMobile** | Pick a document from the gallery and upload it | `document-reader` |
1250
+ | **returnToComputer** | Return to the computer | `document-reader` |
1251
+ | **documentCaptured** | Your document has been captured | `document-reader` |
1163
1252
 
1164
1253
  ## Document Reader Processor
1165
1254