@regulaforensics/vp-frontend-face-components 1.4.0 → 2.0.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 +47 -22
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +19 -20
- package/lib/common/Icon.d.ts +58 -1
- package/lib/common/Message.d.ts +3 -2
- package/lib/common/NoGlareIconLivenessDetection.d.ts +5 -0
- package/lib/common/NoSmilingIconLivenessDetection.d.ts +5 -0
- package/lib/common/PortraitOrientationOnlyIcon.d.ts +6 -0
- package/lib/common/RegulaLogoLivenessDetection.d.ts +5 -0
- package/lib/components/ButtonFaceLiveness.d.ts +7 -0
- package/lib/components/CameraCapture.d.ts +9 -0
- package/lib/components/CameraSnapshot.d.ts +2 -0
- package/lib/components/CameraSnapshotFileCapture.d.ts +10 -0
- package/lib/components/DocumentCapture.d.ts +11 -0
- package/lib/components/DocumentContainer.d.ts +11 -0
- package/lib/components/DocumentReader.d.ts +2 -0
- package/lib/components/DocumentReaderFileCapture.d.ts +12 -0
- package/lib/components/DocumentReaderLayout.d.ts +22 -0
- package/lib/components/DocumentReaderStartScreen.d.ts +10 -0
- package/lib/components/ErrorBoundary.d.ts +6 -5
- package/lib/components/FaceCapture.d.ts +17 -9
- package/lib/components/FaceFullScreenOverlay.d.ts +2 -3
- package/lib/components/FaceHintAnimaition.d.ts +16 -0
- package/lib/components/FaceLayout.d.ts +14 -10
- package/lib/components/InfoScreen.d.ts +2 -1
- package/lib/components/InfoScreenFaceLiveness.d.ts +12 -0
- package/lib/components/InstructionVideoScreen.d.ts +9 -0
- package/lib/components/ProcessScreenFaceLiveness.d.ts +6 -0
- package/lib/components/RetryScreenFaceLiveness.d.ts +7 -0
- package/lib/components/SectorAnimationSvg.d.ts +11 -0
- package/lib/components/WebCamera.d.ts +6 -7
- package/lib/constants.d.ts +489 -169
- package/lib/contexts/DocumentAttributesContext.d.ts +25 -0
- package/lib/contexts/DocumentSDKContext.d.ts +8 -0
- package/lib/contexts/FaceAttributesContext.d.ts +11 -10
- package/lib/hoc/withDocumentAttributesContext.d.ts +4 -0
- package/lib/hoc/withDocumentSDKContext.d.ts +3 -0
- package/lib/hoc/withLocalize.d.ts +5 -4
- package/lib/hooks/useDocumentReaderSeries.d.ts +20 -0
- package/lib/hooks/useDocumentReaderSingle.d.ts +15 -0
- package/lib/hooks/useFaceLiveness.d.ts +34 -26
- package/lib/hooks/useImageInputParam.d.ts +7 -0
- package/lib/hooks/useStateCallback.d.ts +1 -0
- package/lib/hooks/useStream.d.ts +3 -9
- package/lib/i18n/dictionaries/_dictionaries.d.ts +2212 -1988
- package/lib/index-document.d.ts +4 -0
- package/lib/media-resources/resourcesBase64.d.ts +7 -0
- package/lib/models/CameraModel.d.ts +2 -2
- package/lib/models/CustomError.d.ts +7 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/authenticity.d.ts +32 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/fiber.d.ts +7 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/ident.d.ts +8 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/image-ident.d.ts +7 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/index.d.ts +5 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/ocr-security-text.d.ts +7 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/security-feature.d.ts +8 -0
- package/lib/models/DocReaderWebclient/ext/images.d.ts +16 -0
- package/lib/models/DocReaderWebclient/ext/index.d.ts +6 -0
- package/lib/models/DocReaderWebclient/ext/process-request-image.d.ts +5 -0
- package/lib/models/DocReaderWebclient/ext/process-request.d.ts +38 -0
- package/lib/models/DocReaderWebclient/ext/process-response.d.ts +36 -0
- package/lib/models/DocReaderWebclient/ext/text-field.d.ts +40 -0
- package/lib/models/DocReaderWebclient/ext/text.d.ts +14 -0
- package/lib/models/DocReaderWebclient/models/area-array.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/area-container.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/authenticity-check-list.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/authenticity-check-result-item.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/authenticity-check-result.d.ts +43 -0
- package/lib/models/DocReaderWebclient/models/authenticity-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/authenticity-result-type.d.ts +33 -0
- package/lib/models/DocReaderWebclient/models/authenticity-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/bc-pdf417-info.d.ts +54 -0
- package/lib/models/DocReaderWebclient/models/bc-roidetect.d.ts +42 -0
- package/lib/models/DocReaderWebclient/models/check-diagnose.d.ts +98 -0
- package/lib/models/DocReaderWebclient/models/check-result.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/chosen-document-type-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/chosen-document-type-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/chosen-document-type.d.ts +74 -0
- package/lib/models/DocReaderWebclient/models/container-list.d.ts +45 -0
- package/lib/models/DocReaderWebclient/models/critical.d.ts +26 -0
- package/lib/models/DocReaderWebclient/models/cross-source-value-comparison.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/data-module.d.ts +48 -0
- package/lib/models/DocReaderWebclient/models/details-optical.d.ts +67 -0
- package/lib/models/DocReaderWebclient/models/details-rfid.d.ts +61 -0
- package/lib/models/DocReaderWebclient/models/device-info.d.ts +54 -0
- package/lib/models/DocReaderWebclient/models/doc-bar-code-info-all-of.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/doc-bar-code-info.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/doc-visual-extended-field.d.ts +70 -0
- package/lib/models/DocReaderWebclient/models/doc-visual-extended-info.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/document-format.d.ts +70 -0
- package/lib/models/DocReaderWebclient/models/document-image-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/document-image-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/document-image.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/document-position-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/document-position-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/document-position.d.ts +80 -0
- package/lib/models/DocReaderWebclient/models/document-type-recognition-result.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/document-type.d.ts +246 -0
- package/lib/models/DocReaderWebclient/models/document-types-candidates-list.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/document-types-candidates-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/document-types-candidates-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/document-types-candidates.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/encrypted-rclresult-all-of.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/encrypted-rclresult.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/fdsidlist.d.ts +80 -0
- package/lib/models/DocReaderWebclient/models/fiber-result-all-of.d.ts +74 -0
- package/lib/models/DocReaderWebclient/models/fiber-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/graphic-field-type.d.ts +118 -0
- package/lib/models/DocReaderWebclient/models/graphic-field.d.ts +63 -0
- package/lib/models/DocReaderWebclient/models/graphic-fields-list.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/graphics-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/graphics-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/ident-result-all-of.d.ts +65 -0
- package/lib/models/DocReaderWebclient/models/ident-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/image-data.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/image-qa.d.ts +54 -0
- package/lib/models/DocReaderWebclient/models/image-quality-check-list.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/image-quality-check-type.d.ts +50 -0
- package/lib/models/DocReaderWebclient/models/image-quality-check.d.ts +64 -0
- package/lib/models/DocReaderWebclient/models/image-quality-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/image-quality-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/images-available-source.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/images-field-value.d.ts +70 -0
- package/lib/models/DocReaderWebclient/models/images-field.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/images-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/images-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/images.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/index.d.ts +123 -0
- package/lib/models/DocReaderWebclient/models/lcid.d.ts +582 -0
- package/lib/models/DocReaderWebclient/models/lexical-analysis-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/lexical-analysis-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/license-result-all-of.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/license-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/light.d.ts +34 -0
- package/lib/models/DocReaderWebclient/models/list-verified-fields.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/log-level.d.ts +23 -0
- package/lib/models/DocReaderWebclient/models/measure-system.d.ts +26 -0
- package/lib/models/DocReaderWebclient/models/mrzformat.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result-all-of.d.ts +81 -0
- package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/one-candidate.d.ts +74 -0
- package/lib/models/DocReaderWebclient/models/original-symbol.d.ts +37 -0
- package/lib/models/DocReaderWebclient/models/parray-field.d.ts +81 -0
- package/lib/models/DocReaderWebclient/models/per-document-config.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/photo-ident-result-all-of.d.ts +76 -0
- package/lib/models/DocReaderWebclient/models/photo-ident-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/point-array.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/point.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/points-container.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/process-params.d.ts +254 -0
- package/lib/models/DocReaderWebclient/models/process-request-image.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/process-request.d.ts +60 -0
- package/lib/models/DocReaderWebclient/models/process-response.d.ts +66 -0
- package/lib/models/DocReaderWebclient/models/process-system-info.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/processing-status.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/raw-image-container-list.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/rectangle-coordinates.d.ts +42 -0
- package/lib/models/DocReaderWebclient/models/result-item.d.ts +48 -0
- package/lib/models/DocReaderWebclient/models/result.d.ts +98 -0
- package/lib/models/DocReaderWebclient/models/rfid-location.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/rfid-origin.d.ts +42 -0
- package/lib/models/DocReaderWebclient/models/scenario.d.ts +36 -0
- package/lib/models/DocReaderWebclient/models/security-feature-result-all-of.d.ts +59 -0
- package/lib/models/DocReaderWebclient/models/security-feature-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/security-feature-type.d.ts +49 -0
- package/lib/models/DocReaderWebclient/models/source-validity.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/source.d.ts +23 -0
- package/lib/models/DocReaderWebclient/models/status-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/status-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/status.d.ts +63 -0
- package/lib/models/DocReaderWebclient/models/string-recognition-result.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/symbol-candidate.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/symbol-recognition-result.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/text-available-source.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/text-data-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/text-data-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/text-field-type.d.ts +2386 -0
- package/lib/models/DocReaderWebclient/models/text-field-value.d.ts +70 -0
- package/lib/models/DocReaderWebclient/models/text-field.d.ts +84 -0
- package/lib/models/DocReaderWebclient/models/text-post-processing.d.ts +22 -0
- package/lib/models/DocReaderWebclient/models/text-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/text-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/text.d.ts +51 -0
- package/lib/models/DocReaderWebclient/models/transaction-info.d.ts +42 -0
- package/lib/models/DocReaderWebclient/models/verification-result.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/verified-field-map.d.ts +63 -0
- package/lib/models/DocReaderWebclient/models/visibility.d.ts +23 -0
- package/lib/services/DebugService.d.ts +4 -0
- package/lib/services/DocumentReaderProcessor.d.ts +50 -0
- package/lib/services/DocumentReaderService.d.ts +48 -30
- package/lib/services/FaceLivenessService.d.ts +35 -19
- package/lib/services/FaceService.d.ts +34 -6
- package/lib/services/StreamRecorderService.d.ts +24 -0
- package/lib/types.d.ts +261 -119
- package/lib/utils.d.ts +17 -52
- package/lib/web-components/CameraSnapshot.d.ts +14 -0
- package/lib/web-components/DocumentReader.d.ts +14 -0
- package/lib/web-components/FaceDetection.d.ts +3 -3
- package/lib/web-components/FaceLiveness.d.ts +7 -4
- package/lib/web-components/FullScreenContainer.d.ts +1 -1
- package/package.json +59 -62
- package/lib/common/InstructionIconFaceDetection.d.ts +0 -5
- package/lib/common/InstructionIconFaceLiveness.d.ts +0 -5
- package/lib/common/NoGlareIcon.d.ts +0 -5
- package/lib/common/NoSmilingIcon.d.ts +0 -5
- package/lib/components/InstructionScreen.d.ts +0 -9
- package/lib/components/RetryScreen.d.ts +0 -7
- package/lib/hooks/useDebounce.d.ts +0 -2
- package/lib/hooks/useInterval.d.ts +0 -3
- package/lib/services/WasmFeatureDetectService.d.ts +0 -4
- package/lib/web-components.d.ts +0 -47
package/README.md
CHANGED
|
@@ -90,6 +90,16 @@ Add the name of the component to the html, as in the example above.
|
|
|
90
90
|
|
|
91
91
|
### face-liveness
|
|
92
92
|
|
|
93
|
+
The server generates a unique identifier for each session before starting a verification process. Using ```sessionId``` setter you can set custom value. Make sure that the ```sessionId``` is unique for each session
|
|
94
|
+
|
|
95
|
+
Example:
|
|
96
|
+
|
|
97
|
+
```javascript
|
|
98
|
+
const component = document.getElementsByTagName('face-liveness')[0];
|
|
99
|
+
|
|
100
|
+
component.sessionId = "ID"
|
|
101
|
+
```
|
|
102
|
+
|
|
93
103
|
After passing two stages of verification, the component sends the received data for processing to the API. Using ```headers``` setter you can set HTTP POST method headers.
|
|
94
104
|
|
|
95
105
|
Example:
|
|
@@ -395,39 +405,54 @@ function listener(event) {
|
|
|
395
405
|
component.addEventListener('face-capture', listener);
|
|
396
406
|
```
|
|
397
407
|
|
|
408
|
+
Please find ```face-liveness``` response structure in [OpenAPI documentation](https://dev.regulaforensics.com/FaceSDK-web-openapi/#tag/liveness-2.0/operation/get_liveness_transaction).
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
The ```face-capture``` response has the following structure
|
|
412
|
+
|
|
413
|
+
```javascript
|
|
414
|
+
{
|
|
415
|
+
capture: string[] // array with the final image in base64
|
|
416
|
+
}
|
|
417
|
+
````
|
|
418
|
+
|
|
398
419
|
## Component attributes
|
|
399
420
|
|
|
400
421
|
### face-capture
|
|
401
422
|
|
|
402
|
-
| Attribute
|
|
403
|
-
|
|
404
|
-
| **locale**
|
|
405
|
-
| **copyright**
|
|
406
|
-
| **camera-id**
|
|
423
|
+
| Attribute | Info | Data type | Default value | Values |
|
|
424
|
+
|:-----------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------:|:---------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|
425
|
+
| **locale** | The language of the component. | 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``` |
|
|
426
|
+
| **copyright** | Show Regula copyright footer. | boolean | ```false``` | ```true```, ```false``` |
|
|
427
|
+
| **camera-id** | Ability to select a camera. | string | ```undefined``` | ```camera id string value``` |
|
|
428
|
+
| **change-camera** | Show the camera switch button. | boolean | ```true``` | ```true```, ```false``` |
|
|
429
|
+
| **start-screen** | Whether to show the start screen with video instruction. 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 face. | boolean | ```true``` | ```true```, ```false``` |
|
|
407
430
|
|
|
408
431
|
### face-liveness
|
|
409
432
|
|
|
410
|
-
| Attribute
|
|
411
|
-
|
|
412
|
-
| **locale**
|
|
413
|
-
| **url**
|
|
414
|
-
| **copyright**
|
|
415
|
-
| **camera-id**
|
|
433
|
+
| Attribute | Info | Data type | Default value | Values |
|
|
434
|
+
|:-----------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------:|:------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|
435
|
+
| **locale** | The language of the component. | 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``` |
|
|
436
|
+
| **url** | Backend url. | string | ```https://faceapi.regulaforensics.com/``` | any url |
|
|
437
|
+
| **copyright** | Show Regula copyright footer. | boolean | ```false``` | ```true```, ```false``` |
|
|
438
|
+
| **camera-id** | Ability to select a camera. | string | ```undefined``` | ```camera id string value``` |
|
|
439
|
+
| **change-camera** | Show the camera switch button. | boolean | ```true``` | ```true```, ```false``` |
|
|
440
|
+
| **start-screen** | Whether to show the start screen with video instruction. 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 face. | boolean | ```true``` | ```true```, ```false``` |
|
|
416
441
|
|
|
417
442
|
## Component customization
|
|
418
443
|
|
|
419
444
|
Using CSS variables, you can change the font and the main colors of the components.
|
|
420
445
|
|
|
421
|
-
| Variable
|
|
422
|
-
|
|
423
|
-
| **--font-family**
|
|
424
|
-
| **--font-size**
|
|
425
|
-
| **--main-color**
|
|
426
|
-
| **--
|
|
427
|
-
| **--
|
|
428
|
-
| **--
|
|
429
|
-
| **--
|
|
430
|
-
| **--
|
|
446
|
+
| Variable | Info | Default value |
|
|
447
|
+
|:-----------------------------|:----------------------------------------------------------------------------------------|:---------------------------:|
|
|
448
|
+
| **--font-family** | Сomponent font. | ```Noto Sans, sans-serif``` |
|
|
449
|
+
| **--font-size** | Сomponent base font size. | ```16px``` |
|
|
450
|
+
| **--main-color** | Button and frame color. | ```#7E57C5``` |
|
|
451
|
+
| **--hover-color** | Button hover color. | ```#7c45b4``` |
|
|
452
|
+
| **--active-color** | Button active color. | ```#7E57C5``` |
|
|
453
|
+
| **--plate-color** | Information plate color. | ```#E8E8E8``` |
|
|
454
|
+
| **--target-sector-color** | Target sector color (available only in face-liveness component). | ```#BEABE2``` |
|
|
455
|
+
| **--direction-sector-color** | Direction sector color (available only in face-liveness component). | ```#EAEAEA``` |
|
|
431
456
|
|
|
432
457
|
Example:
|
|
433
458
|
|
|
@@ -449,4 +474,4 @@ HTML:
|
|
|
449
474
|
|
|
450
475
|
## Examples
|
|
451
476
|
|
|
452
|
-
You can see examples of using the components [
|
|
477
|
+
You can see the examples of using the components on the [Samples page](https://github.com/regulaforensics/face-web-components-samples).
|