@regulaforensics/vp-frontend-document-components 2.2.0 → 2.3.0

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
@@ -213,25 +213,25 @@ The generated event object (```event.detail```) contains three fields that descr
213
213
 
214
214
  Type of actions:
215
215
 
216
- | Type of action | Description of the action | In which component is present |
217
- |:-----------------------------|:----------------------------------------:|:--------------------------------------------:|
218
- | ```ELEMENT_VISIBLE``` | Component is appended in the DOM. | ```document-reader```, ```camera-snapshot``` |
219
- | ```PRESS_CAMERA_BUTTON``` | The "From camera" button is pressed. | ```document-reader```, ```camera-snapshot``` |
220
- | ```PRESS_FILE_BUTTON``` | The "From gallery" button is pressed. | ```document-reader```, ```camera-snapshot``` |
221
- | ```PRESS_RETRY_BUTTON``` | The "Retry" button is pressed. | ```document-reader```, ```camera-snapshot``` |
222
- | ```PRESS_SKIP_BUTTON``` | The "Skip" button is pressed. | ```document-reader``` |
223
- | ```CLOSE``` | The "Close" button is pressed. | ```document-reader```, ```camera-snapshot``` |
224
- | ```CAMERA_PROCESS_STARTED``` | Recognition from the camera has started. | ```document-reader```, ```camera-snapshot``` |
225
- | ```FILE_PROCESS_STARTED``` | File processing has started. | ```document-reader```, ```camera-snapshot``` |
226
- | ```PROCESS_FINISHED``` | The component has finished its work. | ```document-reader```, ```camera-snapshot``` |
227
- | ```SERVICE_INITIALIZED``` | The component has started its work. | ```document-reader``` |
216
+ | Type of action | Description of the action | In which component is present |
217
+ |:-----------------------------|:-----------------------------------------------------------------:|:--------------------------------------------:|
218
+ | ```ELEMENT_VISIBLE``` | Component is appended in the DOM. | ```document-reader```, ```camera-snapshot``` |
219
+ | ```PRESS_CAMERA_BUTTON``` | The "From camera" button is pressed. | ```document-reader```, ```camera-snapshot``` |
220
+ | ```PRESS_FILE_BUTTON``` | The "From gallery" button is pressed. | ```document-reader```, ```camera-snapshot``` |
221
+ | ```PRESS_RETRY_BUTTON``` | The "Retry" button is pressed. | ```document-reader```, ```camera-snapshot``` |
222
+ | ```PRESS_SKIP_BUTTON``` | The "Skip" button is pressed. | ```document-reader``` |
223
+ | ```CLOSE``` | The "Close" button is pressed. | ```document-reader```, ```camera-snapshot``` |
224
+ | ```CAMERA_PROCESS_STARTED``` | Recognition from the camera has started. | ```document-reader```, ```camera-snapshot``` |
225
+ | ```FILE_PROCESS_STARTED``` | File processing has started. | ```document-reader```, ```camera-snapshot``` |
226
+ | ```PROCESS_FINISHED``` | The component has finished its work. | ```document-reader```, ```camera-snapshot``` |
227
+ | ```SERVICE_INITIALIZED``` | The component has started its work. | ```document-reader``` |
228
228
 
229
229
  In cases of successful operation of the components, the ```data``` field will contain the following fields:
230
230
 
231
231
  ```javascript
232
232
  {
233
233
  response: { ... }, // component result
234
- status: 1 // 1 for successful work and 0 for unsuccessful
234
+ status: 1
235
235
  }
236
236
  ```
237
237
 
@@ -244,6 +244,14 @@ In cases of unsuccessful work, the ```data``` field will contain the following f
244
244
  }
245
245
  ```
246
246
 
247
+ Description of statuses:
248
+
249
+ | Status | Description of the status |
250
+ |:-------|:----------------------------------:|
251
+ | 0 | Process failed. |
252
+ | 1 | Process is completed successfully. |
253
+ | 2 | Process is completed by timeout. |
254
+
247
255
  Table of error causes:
248
256
 
249
257
  | Reason | Description of the reason |
@@ -426,6 +434,54 @@ For camera-snapshot:
426
434
  }
427
435
  ```
428
436
 
437
+ </td>
438
+ <td></td>
439
+ </tr>
440
+ <tr>
441
+ <td>Recognition from the camera has started.</td>
442
+ <td>
443
+
444
+ For document-reader:
445
+ ```document-reader```
446
+
447
+ For camera-snapshot:
448
+ ```camera-snapshot```
449
+
450
+ </td>
451
+ <td>
452
+
453
+ ```javascript
454
+ {
455
+ action: "CAMERA_PROCESS_STARTED",
456
+ data: null,
457
+ manual: true
458
+ }
459
+ ```
460
+
461
+ </td>
462
+ <td></td>
463
+ </tr>
464
+ <tr>
465
+ <td>File processing has started.</td>
466
+ <td>
467
+
468
+ For document-reader:
469
+ ```document-reader```
470
+
471
+ For camera-snapshot:
472
+ ```camera-snapshot```
473
+
474
+ </td>
475
+ <td>
476
+
477
+ ```javascript
478
+ {
479
+ action: "FILE_PROCESS_STARTED",
480
+ data: null,
481
+ manual: true
482
+ }
483
+ ```
484
+
429
485
  </td>
430
486
  <td></td>
431
487
  </tr>
@@ -457,6 +513,33 @@ For camera-snapshot:
457
513
  <td></td>
458
514
  </tr>
459
515
  <tr>
516
+ <td>The work of the component is completed by timeout.</td>
517
+ <td>
518
+
519
+ ```document-reader```
520
+
521
+ </td>
522
+ <td>
523
+
524
+ ```javascript
525
+ {
526
+ action: "PROCESS_FINISHED",
527
+ data: {
528
+ response: { ... },
529
+ status: 2
530
+ },
531
+ manual: false
532
+ }
533
+ ```
534
+
535
+ </td>
536
+ <td>
537
+
538
+ This event available only in ```document-reader```.
539
+
540
+ </td>
541
+ </tr>
542
+ <tr>
460
543
  <td>The work of the component failed.</td>
461
544
  <td>
462
545