bry-biometric-collector 2.4.0 → 2.4.1-RC02

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.
Files changed (22) hide show
  1. package/README.md +52 -8
  2. package/dist/DocumentCollector_5f82eb10_2.4.1-RC02.js +1121 -0
  3. package/dist/FaceCollector_dce93c4d_2.4.1-RC02.js +1992 -0
  4. package/dist/{TakePictureBtn_3c447bd3_2.4.0.js → TakePictureBtn_22c86e39_2.4.1-RC02.js} +93 -93
  5. package/dist/{___vite-browser-external_commonjs-proxy_12b6e368_2.4.0.js → ___vite-browser-external_commonjs-proxy_1b93077b_2.4.1-RC02.js} +1 -1
  6. package/dist/bry-biometric-collector-main.js +3 -2
  7. package/dist/{en-us_46a6e2d2_2.4.0.js → en-us_99b30d39_2.4.1-RC02.js} +2 -1
  8. package/dist/{es-cl_af82486d_2.4.0.js → es-cl_cfa50670_2.4.1-RC02.js} +7 -6
  9. package/dist/{fingersApi_8e2acbb1_2.4.0.js → fingersApi_5ac257a6_2.4.1-RC02.js} +5 -4
  10. package/dist/index.d.ts +0 -6
  11. package/dist/index.js +3 -2
  12. package/dist/{index_9664d71c_2.4.0.js → index_57e8f323_2.4.1-RC02.js} +7 -6
  13. package/dist/{index_898ffd1f_2.4.0.js → index_e8c1550c_2.4.1-RC02.js} +5 -4
  14. package/dist/{main_ade50a8c_2.4.0.js → main_37501062_2.4.1-RC02.js} +1292 -1272
  15. package/dist/{pt-br_b6088a59_2.4.0.js → pt-br_d5ca6103_2.4.1-RC02.js} +8 -7
  16. package/dist/style.css +1 -1
  17. package/package.json +2 -4
  18. package/dist/DocumentCollector_33be8c4f_2.4.0.js +0 -1249
  19. package/dist/FaceCollector_c6ab76c4_2.4.0.js +0 -1985
  20. /package/dist/{face_api_0e3ce8c8_2.4.0.js → face_api_0e3ce8c8_2.4.1-RC02.js} +0 -0
  21. /package/dist/{index-no-detector_4b302e78_2.4.0.js → index-no-detector_4b302e78_2.4.1-RC02.js} +0 -0
  22. /package/dist/{index-no-detector_b6972e40_2.4.0.js → index-no-detector_b6972e40_2.4.1-RC02.js} +0 -0
package/README.md CHANGED
@@ -8,6 +8,48 @@ Fingerprint Collector
8
8
  Face collector
9
9
  ![face-collector](https://github.com/RamAddict/NBIS-JS/assets/32513434/e0c6cbdb-15fc-481b-957f-e1c0301ec315)
10
10
 
11
+
12
+ # **Quick Start**
13
+
14
+ Simply include the last version of Web Component Collector directly from a CDN in your HTML, as shown in the example below:
15
+
16
+ ```
17
+ <!DOCTYPE html>
18
+ <html>
19
+ <head>
20
+ <title>Bry Web Component Collector</title>
21
+ <!-- NPM module -->
22
+ <script type="module" src="https://unpkg.com/bry-biometric-collector@latest/dist/bry-biometric-collector-main.js"
23
+ defer> </script>
24
+ <script>
25
+ window.addEventListener("export-fingers", async (a) => {
26
+ /** @type {BodyPart[]} fingers */
27
+ const fingers = a.detail;
28
+ console.log('captured event export-fingers', fingers )
29
+ });
30
+ window.addEventListener("face-unconformities-validated", (e) => {
31
+ console.log(`captured event 'face-unconformities-validated'`, e)
32
+ });
33
+
34
+ </script>
35
+ </head>
36
+ <body>
37
+ <biometric-collector
38
+ import_extension_script="true"
39
+ extension_name="BryWebExtension"
40
+ extension_url_script="https://www.bry.com.br/downloads/extension/v2/api/v1/extension-api.js"
41
+ extension_url_chrome="https://chrome.google.com/webstore/detail/assinatura-digital-no-nav/mbpaklahifpfndjiefdfjhmkefppocfm"
42
+ extension_url_firefox="https://addons.mozilla.org/pt-BR/firefox/addon/assinatura-digital-navegador/"
43
+ collector_select="BOTH"
44
+ video_dimensions="800x450"
45
+ min_nfiq_acceptable="3"
46
+ show_theme_picker="false"
47
+ >
48
+ </biometric-collector>
49
+ </body>
50
+ </html>
51
+ ```
52
+
11
53
  # **Building**
12
54
 
13
55
  nvm use install / use
@@ -191,7 +233,7 @@ Currently supported tag parameters:
191
233
 
192
234
  Example: `show_justification_field=false`
193
235
 
194
- - **min_eye_to_eye_dist**: The minimum distance between the eyes that should be accepted on face collector.
236
+ - **min_eye_to_eye_dist**: The minimal interocular distance of face that should be accepted on face collector.
195
237
 
196
238
  Default: `0`
197
239
 
@@ -343,6 +385,8 @@ The Web-component exports a series of functions that the host environment may ca
343
385
  data: string;
344
386
  status?: string;
345
387
  justification?: string;
388
+ capturedEyeToEyeDist?: number,
389
+ minEyeToEyeDist?: number,
346
390
  }[];
347
391
  icaoWarnings: string[];
348
392
  }
@@ -546,16 +590,10 @@ The web component listens to and emits a few events. The events emitted are:
546
590
  - **face-unconformities-validated**: When the photo is captured and after evaluating it, an event of this kind is emitted with their picture like so:
547
591
 
548
592
  ```ts
549
- {detail: {bodyParts[{bodyPart:'FACE', data: string, livenessBlob: string *, livenessResult: string}]}
593
+ {detail: {bodyParts[{bodyPart:'FACE', data: string, livenessBlob: string *, livenessResult: string}, icaoWarnings: string[], status?: string]}
550
594
  * only if liveness_enable=true
551
595
  ```
552
596
 
553
- - **low-quality-face**: When the photo is captured and the distance between the eyes is below the minimum required (min_eye_to_eye_dist), this event is emitted.
554
-
555
- ```ts
556
- {detail: {bodyParts[{bodyPart: 'FACE', minEyeToEyeDist: number, capturedEyeToEyeDist: number}], errorCode: string, translatedError: string}}
557
- ```
558
-
559
597
  - **export-face**: When the user saves their face (by clicking finish), an event of this kind is emitted with their picture like so:
560
598
 
561
599
  ```ts
@@ -580,6 +618,12 @@ The web component listens to and emits a few events. The events emitted are:
580
618
 
581
619
  - **document-scrapped**: When the user scraps their document photo (by clicking capture again after having saved their picture) this event gets emitted without any data.
582
620
 
621
+ - **document-unconformities-validated**: When the photo is captured, an event of this kind is emitted with their picture like so:
622
+
623
+ ```ts
624
+ {detail: {bodyParts[{bodyPart: 'DOCUMENT', data: string}, status?: string]}
625
+ ```
626
+
583
627
  - **export-document**: When the user saves their document photo (by clicking finish), an event of this kind is fired with their picture like so:
584
628
 
585
629
  ```ts