@regulaforensics/vp-frontend-face-components 2.0.0 → 3.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 +372 -165
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +30 -0
- package/lib/index.d.ts +229 -0
- package/package.json +5 -83
- package/lib/common/BackCameraIcon.d.ts +0 -6
- package/lib/common/Button.d.ts +0 -7
- package/lib/common/CameraChangeIcon.d.ts +0 -6
- package/lib/common/CameraIcon.d.ts +0 -6
- package/lib/common/CheckIcon.d.ts +0 -6
- package/lib/common/CrossIcon.d.ts +0 -6
- package/lib/common/DocReaderCameraDisabled.d.ts +0 -5
- package/lib/common/DocReaderCameraPreparing.d.ts +0 -5
- package/lib/common/DocReaderFlip.d.ts +0 -5
- package/lib/common/DocReaderProcessing.d.ts +0 -5
- package/lib/common/DocReaderProcessingError.d.ts +0 -5
- package/lib/common/DocReaderProcessingFinished.d.ts +0 -6
- package/lib/common/DocReaderSearch.d.ts +0 -5
- package/lib/common/ErrorIcon.d.ts +0 -6
- package/lib/common/FromCameraIcon.d.ts +0 -5
- package/lib/common/FromGalleryIcon.d.ts +0 -5
- package/lib/common/FrontCameraIcon.d.ts +0 -6
- package/lib/common/FullscreenExitIcon.d.ts +0 -6
- package/lib/common/FullscreenIcon.d.ts +0 -6
- package/lib/common/Icon.d.ts +0 -64
- package/lib/common/Message.d.ts +0 -8
- package/lib/common/NoGlareIconLivenessDetection.d.ts +0 -5
- package/lib/common/NoSmilingIconLivenessDetection.d.ts +0 -5
- package/lib/common/PortraitOrientationOnlyIcon.d.ts +0 -6
- package/lib/common/RegulaLogo.d.ts +0 -6
- package/lib/common/RegulaLogoLivenessDetection.d.ts +0 -5
- package/lib/common/SnapshotIcon.d.ts +0 -6
- package/lib/common/Spinner.d.ts +0 -3
- package/lib/common/SquareIcon.d.ts +0 -6
- package/lib/common/StopIcon.d.ts +0 -6
- package/lib/common/VerifiedIcon.d.ts +0 -6
- package/lib/components/ButtonFaceLiveness.d.ts +0 -7
- package/lib/components/CameraCapture.d.ts +0 -9
- package/lib/components/CameraSnapshot.d.ts +0 -2
- package/lib/components/CameraSnapshotFileCapture.d.ts +0 -10
- package/lib/components/DocumentCapture.d.ts +0 -11
- package/lib/components/DocumentContainer.d.ts +0 -11
- package/lib/components/DocumentReader.d.ts +0 -2
- package/lib/components/DocumentReaderFileCapture.d.ts +0 -12
- package/lib/components/DocumentReaderLayout.d.ts +0 -22
- package/lib/components/DocumentReaderStartScreen.d.ts +0 -10
- package/lib/components/ErrorBoundary.d.ts +0 -18
- package/lib/components/FaceCapture.d.ts +0 -25
- package/lib/components/FaceDetection.d.ts +0 -2
- package/lib/components/FaceFullScreenOverlay.d.ts +0 -10
- package/lib/components/FaceHintAnimaition.d.ts +0 -16
- package/lib/components/FaceLayout.d.ts +0 -23
- package/lib/components/FaceLiveness.d.ts +0 -2
- package/lib/components/InfoScreen.d.ts +0 -11
- package/lib/components/InfoScreenFaceLiveness.d.ts +0 -12
- package/lib/components/InstructionVideoScreen.d.ts +0 -9
- package/lib/components/ProcessScreen.d.ts +0 -6
- package/lib/components/ProcessScreenFaceLiveness.d.ts +0 -6
- package/lib/components/RetryScreenFaceLiveness.d.ts +0 -7
- package/lib/components/SectorAnimationSvg.d.ts +0 -11
- package/lib/components/WebCamera.d.ts +0 -19
- package/lib/constants.d.ts +0 -686
- package/lib/contexts/DocumentAttributesContext.d.ts +0 -25
- package/lib/contexts/DocumentSDKContext.d.ts +0 -8
- package/lib/contexts/FaceAttributesContext.d.ts +0 -25
- package/lib/hoc/withDocumentAttributesContext.d.ts +0 -4
- package/lib/hoc/withDocumentSDKContext.d.ts +0 -3
- package/lib/hoc/withFaceAttributesContext.d.ts +0 -4
- package/lib/hoc/withLocalize.d.ts +0 -8
- package/lib/hooks/useDocumentReaderSeries.d.ts +0 -20
- package/lib/hooks/useDocumentReaderSingle.d.ts +0 -15
- package/lib/hooks/useFaceLiveness.d.ts +0 -41
- package/lib/hooks/useImageInputParam.d.ts +0 -7
- package/lib/hooks/useOrientationChange.d.ts +0 -10
- package/lib/hooks/useStateCallback.d.ts +0 -1
- package/lib/hooks/useStream.d.ts +0 -10
- package/lib/hooks/useUserAgent.d.ts +0 -3
- package/lib/hooks/useWindowBlur.d.ts +0 -2
- package/lib/i18n/dictionaries/_dictionaries.d.ts +0 -2275
- package/lib/index-document.d.ts +0 -4
- package/lib/index-face.d.ts +0 -1
- package/lib/media-resources/resourcesBase64.d.ts +0 -7
- package/lib/models/CameraModel.d.ts +0 -9
- package/lib/models/CustomError.d.ts +0 -7
- package/lib/models/DocReaderWebclient/ext/authenticity/authenticity.d.ts +0 -32
- package/lib/models/DocReaderWebclient/ext/authenticity/fiber.d.ts +0 -7
- package/lib/models/DocReaderWebclient/ext/authenticity/ident.d.ts +0 -8
- package/lib/models/DocReaderWebclient/ext/authenticity/image-ident.d.ts +0 -7
- package/lib/models/DocReaderWebclient/ext/authenticity/index.d.ts +0 -5
- package/lib/models/DocReaderWebclient/ext/authenticity/ocr-security-text.d.ts +0 -7
- package/lib/models/DocReaderWebclient/ext/authenticity/security-feature.d.ts +0 -8
- package/lib/models/DocReaderWebclient/ext/images.d.ts +0 -16
- package/lib/models/DocReaderWebclient/ext/index.d.ts +0 -6
- package/lib/models/DocReaderWebclient/ext/process-request-image.d.ts +0 -5
- package/lib/models/DocReaderWebclient/ext/process-request.d.ts +0 -38
- package/lib/models/DocReaderWebclient/ext/process-response.d.ts +0 -36
- package/lib/models/DocReaderWebclient/ext/text-field.d.ts +0 -40
- package/lib/models/DocReaderWebclient/ext/text.d.ts +0 -14
- package/lib/models/DocReaderWebclient/models/area-array.d.ts +0 -32
- package/lib/models/DocReaderWebclient/models/area-container.d.ts +0 -38
- package/lib/models/DocReaderWebclient/models/authenticity-check-list.d.ts +0 -31
- package/lib/models/DocReaderWebclient/models/authenticity-check-result-item.d.ts +0 -38
- package/lib/models/DocReaderWebclient/models/authenticity-check-result.d.ts +0 -43
- package/lib/models/DocReaderWebclient/models/authenticity-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/authenticity-result-type.d.ts +0 -33
- package/lib/models/DocReaderWebclient/models/authenticity-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/bc-pdf417-info.d.ts +0 -54
- package/lib/models/DocReaderWebclient/models/bc-roidetect.d.ts +0 -42
- package/lib/models/DocReaderWebclient/models/check-diagnose.d.ts +0 -98
- package/lib/models/DocReaderWebclient/models/check-result.d.ts +0 -30
- package/lib/models/DocReaderWebclient/models/chosen-document-type-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/chosen-document-type-result.d.ts +0 -19
- package/lib/models/DocReaderWebclient/models/chosen-document-type.d.ts +0 -74
- package/lib/models/DocReaderWebclient/models/container-list.d.ts +0 -45
- package/lib/models/DocReaderWebclient/models/critical.d.ts +0 -26
- package/lib/models/DocReaderWebclient/models/cross-source-value-comparison.d.ts +0 -38
- package/lib/models/DocReaderWebclient/models/data-module.d.ts +0 -48
- package/lib/models/DocReaderWebclient/models/details-optical.d.ts +0 -67
- package/lib/models/DocReaderWebclient/models/details-rfid.d.ts +0 -61
- package/lib/models/DocReaderWebclient/models/device-info.d.ts +0 -54
- package/lib/models/DocReaderWebclient/models/doc-bar-code-info-all-of.d.ts +0 -31
- package/lib/models/DocReaderWebclient/models/doc-bar-code-info.d.ts +0 -19
- package/lib/models/DocReaderWebclient/models/doc-visual-extended-field.d.ts +0 -70
- package/lib/models/DocReaderWebclient/models/doc-visual-extended-info.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/document-format.d.ts +0 -70
- package/lib/models/DocReaderWebclient/models/document-image-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/document-image-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/document-image.d.ts +0 -24
- package/lib/models/DocReaderWebclient/models/document-position-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/document-position-result.d.ts +0 -19
- package/lib/models/DocReaderWebclient/models/document-position.d.ts +0 -80
- package/lib/models/DocReaderWebclient/models/document-type-recognition-result.d.ts +0 -30
- package/lib/models/DocReaderWebclient/models/document-type.d.ts +0 -246
- package/lib/models/DocReaderWebclient/models/document-types-candidates-list.d.ts +0 -32
- package/lib/models/DocReaderWebclient/models/document-types-candidates-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/document-types-candidates-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/document-types-candidates.d.ts +0 -32
- package/lib/models/DocReaderWebclient/models/encrypted-rclresult-all-of.d.ts +0 -24
- package/lib/models/DocReaderWebclient/models/encrypted-rclresult.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/fdsidlist.d.ts +0 -80
- package/lib/models/DocReaderWebclient/models/fiber-result-all-of.d.ts +0 -74
- package/lib/models/DocReaderWebclient/models/fiber-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/graphic-field-type.d.ts +0 -118
- package/lib/models/DocReaderWebclient/models/graphic-field.d.ts +0 -63
- package/lib/models/DocReaderWebclient/models/graphic-fields-list.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/graphics-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/graphics-result.d.ts +0 -19
- package/lib/models/DocReaderWebclient/models/ident-result-all-of.d.ts +0 -65
- package/lib/models/DocReaderWebclient/models/ident-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/image-data.d.ts +0 -24
- package/lib/models/DocReaderWebclient/models/image-qa.d.ts +0 -54
- package/lib/models/DocReaderWebclient/models/image-quality-check-list.d.ts +0 -32
- package/lib/models/DocReaderWebclient/models/image-quality-check-type.d.ts +0 -50
- package/lib/models/DocReaderWebclient/models/image-quality-check.d.ts +0 -64
- package/lib/models/DocReaderWebclient/models/image-quality-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/image-quality-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/images-available-source.d.ts +0 -31
- package/lib/models/DocReaderWebclient/models/images-field-value.d.ts +0 -70
- package/lib/models/DocReaderWebclient/models/images-field.d.ts +0 -38
- package/lib/models/DocReaderWebclient/models/images-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/images-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/images.d.ts +0 -32
- package/lib/models/DocReaderWebclient/models/index.d.ts +0 -123
- package/lib/models/DocReaderWebclient/models/lcid.d.ts +0 -582
- package/lib/models/DocReaderWebclient/models/lexical-analysis-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/lexical-analysis-result.d.ts +0 -19
- package/lib/models/DocReaderWebclient/models/license-result-all-of.d.ts +0 -24
- package/lib/models/DocReaderWebclient/models/license-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/light.d.ts +0 -34
- package/lib/models/DocReaderWebclient/models/list-verified-fields.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/log-level.d.ts +0 -23
- package/lib/models/DocReaderWebclient/models/measure-system.d.ts +0 -26
- package/lib/models/DocReaderWebclient/models/mrzformat.d.ts +0 -24
- package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result-all-of.d.ts +0 -81
- package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/one-candidate.d.ts +0 -74
- package/lib/models/DocReaderWebclient/models/original-symbol.d.ts +0 -37
- package/lib/models/DocReaderWebclient/models/parray-field.d.ts +0 -81
- package/lib/models/DocReaderWebclient/models/per-document-config.d.ts +0 -30
- package/lib/models/DocReaderWebclient/models/photo-ident-result-all-of.d.ts +0 -76
- package/lib/models/DocReaderWebclient/models/photo-ident-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/point-array.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/point.d.ts +0 -30
- package/lib/models/DocReaderWebclient/models/points-container.d.ts +0 -31
- package/lib/models/DocReaderWebclient/models/process-params.d.ts +0 -254
- package/lib/models/DocReaderWebclient/models/process-request-image.d.ts +0 -38
- package/lib/models/DocReaderWebclient/models/process-request.d.ts +0 -60
- package/lib/models/DocReaderWebclient/models/process-response.d.ts +0 -66
- package/lib/models/DocReaderWebclient/models/process-system-info.d.ts +0 -30
- package/lib/models/DocReaderWebclient/models/processing-status.d.ts +0 -30
- package/lib/models/DocReaderWebclient/models/raw-image-container-list.d.ts +0 -31
- package/lib/models/DocReaderWebclient/models/rectangle-coordinates.d.ts +0 -42
- package/lib/models/DocReaderWebclient/models/result-item.d.ts +0 -48
- package/lib/models/DocReaderWebclient/models/result.d.ts +0 -98
- package/lib/models/DocReaderWebclient/models/rfid-location.d.ts +0 -30
- package/lib/models/DocReaderWebclient/models/rfid-origin.d.ts +0 -42
- package/lib/models/DocReaderWebclient/models/scenario.d.ts +0 -36
- package/lib/models/DocReaderWebclient/models/security-feature-result-all-of.d.ts +0 -59
- package/lib/models/DocReaderWebclient/models/security-feature-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/security-feature-type.d.ts +0 -49
- package/lib/models/DocReaderWebclient/models/source-validity.d.ts +0 -32
- package/lib/models/DocReaderWebclient/models/source.d.ts +0 -23
- package/lib/models/DocReaderWebclient/models/status-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/status-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/status.d.ts +0 -63
- package/lib/models/DocReaderWebclient/models/string-recognition-result.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/symbol-candidate.d.ts +0 -30
- package/lib/models/DocReaderWebclient/models/symbol-recognition-result.d.ts +0 -32
- package/lib/models/DocReaderWebclient/models/text-available-source.d.ts +0 -38
- package/lib/models/DocReaderWebclient/models/text-data-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/text-data-result.d.ts +0 -19
- package/lib/models/DocReaderWebclient/models/text-field-type.d.ts +0 -2386
- package/lib/models/DocReaderWebclient/models/text-field-value.d.ts +0 -70
- package/lib/models/DocReaderWebclient/models/text-field.d.ts +0 -84
- package/lib/models/DocReaderWebclient/models/text-post-processing.d.ts +0 -22
- package/lib/models/DocReaderWebclient/models/text-result-all-of.d.ts +0 -25
- package/lib/models/DocReaderWebclient/models/text-result.d.ts +0 -18
- package/lib/models/DocReaderWebclient/models/text.d.ts +0 -51
- package/lib/models/DocReaderWebclient/models/transaction-info.d.ts +0 -42
- package/lib/models/DocReaderWebclient/models/verification-result.d.ts +0 -38
- package/lib/models/DocReaderWebclient/models/verified-field-map.d.ts +0 -63
- package/lib/models/DocReaderWebclient/models/visibility.d.ts +0 -23
- package/lib/models/ImageModel.d.ts +0 -7
- package/lib/services/DebugService.d.ts +0 -17
- package/lib/services/DocumentReaderProcessor.d.ts +0 -50
- package/lib/services/DocumentReaderService.d.ts +0 -57
- package/lib/services/EventEmitter.d.ts +0 -9
- package/lib/services/FaceLivenessService.d.ts +0 -62
- package/lib/services/FaceService.d.ts +0 -39
- package/lib/services/StreamRecorderService.d.ts +0 -24
- package/lib/types.d.ts +0 -361
- package/lib/utils.d.ts +0 -30
- package/lib/web-components/CameraSnapshot.d.ts +0 -14
- package/lib/web-components/DocumentReader.d.ts +0 -14
- package/lib/web-components/FaceDetection.d.ts +0 -11
- package/lib/web-components/FaceLiveness.d.ts +0 -17
- package/lib/web-components/FullScreenContainer.d.ts +0 -4
package/dist/main.js.LICENSE.txt
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @license React
|
|
15
|
+
* react-jsx-runtime.production.min.js
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
|
|
13
23
|
/**
|
|
14
24
|
* @license React
|
|
15
25
|
* react.production.min.js
|
|
@@ -30,6 +40,26 @@
|
|
|
30
40
|
* LICENSE file in the root directory of this source tree.
|
|
31
41
|
*/
|
|
32
42
|
|
|
43
|
+
/**
|
|
44
|
+
* @license React
|
|
45
|
+
* use-sync-external-store-shim.production.min.js
|
|
46
|
+
*
|
|
47
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the MIT license found in the
|
|
50
|
+
* LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @license React
|
|
55
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
56
|
+
*
|
|
57
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the MIT license found in the
|
|
60
|
+
* LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/
|
|
62
|
+
|
|
33
63
|
/**
|
|
34
64
|
@license @nocompile
|
|
35
65
|
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
type Locales =
|
|
2
|
+
| 'ru'
|
|
3
|
+
| 'en'
|
|
4
|
+
| 'de'
|
|
5
|
+
| 'pl'
|
|
6
|
+
| 'it'
|
|
7
|
+
| 'hu'
|
|
8
|
+
| 'zh'
|
|
9
|
+
| 'sk'
|
|
10
|
+
| 'uk'
|
|
11
|
+
| 'fr'
|
|
12
|
+
| 'es'
|
|
13
|
+
| 'pt'
|
|
14
|
+
| 'ar'
|
|
15
|
+
| 'nl'
|
|
16
|
+
| 'id'
|
|
17
|
+
| 'vi'
|
|
18
|
+
| 'ko'
|
|
19
|
+
| 'ms'
|
|
20
|
+
| 'ro'
|
|
21
|
+
| 'el'
|
|
22
|
+
| 'tr'
|
|
23
|
+
| 'ja'
|
|
24
|
+
| 'cs'
|
|
25
|
+
| 'th'
|
|
26
|
+
| 'hi'
|
|
27
|
+
| 'bn'
|
|
28
|
+
| 'he'
|
|
29
|
+
| 'fi'
|
|
30
|
+
| 'sv'
|
|
31
|
+
| 'da'
|
|
32
|
+
| 'hr'
|
|
33
|
+
| 'no'
|
|
34
|
+
| string;
|
|
35
|
+
interface FaceTranslations {
|
|
36
|
+
showOnlyOneFace?: string;
|
|
37
|
+
preparingCamera?: string;
|
|
38
|
+
allowAccessCamera?: string;
|
|
39
|
+
somethingWentWrong?: string;
|
|
40
|
+
incorrectCameraId?: string;
|
|
41
|
+
checkCameraId?: string;
|
|
42
|
+
preparingService?: string;
|
|
43
|
+
allowAccessToCamera?: string;
|
|
44
|
+
error?: string;
|
|
45
|
+
versionNotSupported?: string;
|
|
46
|
+
updateBrowser?: string;
|
|
47
|
+
licenseError?: string;
|
|
48
|
+
licenseExpired?: string;
|
|
49
|
+
onlyPortraitOrientation?: string;
|
|
50
|
+
turnDeviceIntoPortrait?: string;
|
|
51
|
+
tryAgain?: string;
|
|
52
|
+
noCameraAvailable?: string;
|
|
53
|
+
checkCameraConnection?: string;
|
|
54
|
+
noMaskSunglassesHeaddress?: string;
|
|
55
|
+
ambientLighting?: string;
|
|
56
|
+
lookStraight?: string;
|
|
57
|
+
fitYourFace?: string;
|
|
58
|
+
moveCloser?: string;
|
|
59
|
+
moveAway?: string;
|
|
60
|
+
holdSteady?: string;
|
|
61
|
+
turnHead?: string;
|
|
62
|
+
processing?: string;
|
|
63
|
+
retryButtonText?: string;
|
|
64
|
+
followGuidelinesText?: string;
|
|
65
|
+
letsTryAgainTitle?: string;
|
|
66
|
+
noCameraPermission?: string;
|
|
67
|
+
goButton?: string;
|
|
68
|
+
centerFaceTurnHead?: string;
|
|
69
|
+
centerFace?: string;
|
|
70
|
+
selfieTime?: string;
|
|
71
|
+
errorCode?: string;
|
|
72
|
+
illumination?: string;
|
|
73
|
+
cameraLevel?: string;
|
|
74
|
+
noAccessories?: string;
|
|
75
|
+
getReady?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type FaceDictionaries = Partial<Record<Locales, FaceTranslations>>;
|
|
79
|
+
|
|
80
|
+
type ErrorTypes =
|
|
81
|
+
| 'WASM_ERROR'
|
|
82
|
+
| 'UNKNOWN_ERROR'
|
|
83
|
+
| 'NOT_SUPPORTED'
|
|
84
|
+
| 'CAMERA_UNKNOWN_ERROR'
|
|
85
|
+
| 'CAMERA_PERMISSION_DENIED'
|
|
86
|
+
| 'NO_CAMERA'
|
|
87
|
+
| 'INCORRECT_CAMERA_ID'
|
|
88
|
+
| 'CONNECTION_ERROR'
|
|
89
|
+
| 'LANDSCAPE_MODE_RESTRICTED'
|
|
90
|
+
| 'NOT_PREPARED'
|
|
91
|
+
| 'NOT_INITIALIZED'
|
|
92
|
+
| 'IN_PROCESS'
|
|
93
|
+
| 'ALREADY_PREPARED'
|
|
94
|
+
| 'ALREADY_INITIALIZED'
|
|
95
|
+
| 'TIMEOUT_ERROR'
|
|
96
|
+
| 'CHANGE_CAMERA'
|
|
97
|
+
| 'DEVICE_ROTATE'
|
|
98
|
+
| 'APP_INACTIVE';
|
|
99
|
+
|
|
100
|
+
type FaceEventActions =
|
|
101
|
+
| 'ELEMENT_VISIBLE'
|
|
102
|
+
| 'PRESS_START_BUTTON'
|
|
103
|
+
| 'PRESS_RETRY_BUTTON'
|
|
104
|
+
| 'CLOSE'
|
|
105
|
+
| 'PROCESS_FINISHED'
|
|
106
|
+
| 'SERVICE_INITIALIZED'
|
|
107
|
+
| 'RETRY_COUNTER_EXCEEDED';
|
|
108
|
+
|
|
109
|
+
declare enum ResponseCode {
|
|
110
|
+
EMPTY = -1,
|
|
111
|
+
ERROR = 0,
|
|
112
|
+
OK = 1,
|
|
113
|
+
TIMEOUT = 2,
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
type CustomEventDataType<R> = {
|
|
117
|
+
status: ResponseCode;
|
|
118
|
+
reason?: ErrorTypes;
|
|
119
|
+
response?: R;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
interface DetailEvent<A, R> {
|
|
123
|
+
action: A;
|
|
124
|
+
data: CustomEventDataType<R> | null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
type FaceLivenessResponseType = {
|
|
128
|
+
images: Array<string>;
|
|
129
|
+
code: number;
|
|
130
|
+
metadata: Record<string, any>;
|
|
131
|
+
estimatedAge: number | null;
|
|
132
|
+
tag: string;
|
|
133
|
+
status: number;
|
|
134
|
+
transactionId: string;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
type FaceDetectionResponseType = {
|
|
138
|
+
capture: Array<string>;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
declare global {
|
|
142
|
+
interface HTMLElementEventMap {
|
|
143
|
+
'face-liveness': CustomEvent<FaceLivenessDetailType>;
|
|
144
|
+
'face-capture': CustomEvent<FaceCaptureDetailType>;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface IFaceDetection {
|
|
149
|
+
locale?: Locales | string;
|
|
150
|
+
copyright?: boolean;
|
|
151
|
+
'camera-id'?: string;
|
|
152
|
+
'change-camera'?: boolean;
|
|
153
|
+
'start-screen'?: boolean;
|
|
154
|
+
debug?: boolean;
|
|
155
|
+
'close-disabled'?: boolean;
|
|
156
|
+
'finish-screen'?: boolean;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface IFaceLiveness extends IFaceDetection {
|
|
160
|
+
url?: string;
|
|
161
|
+
'device-orientation'?: boolean;
|
|
162
|
+
'video-recording'?: boolean;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type ComputedCss = {
|
|
166
|
+
fontFamily?: string;
|
|
167
|
+
fontSize?: string;
|
|
168
|
+
onboardingScreenStartButtonBackground?: string;
|
|
169
|
+
onboardingScreenStartButtonBackgroundHover?: string;
|
|
170
|
+
onboardingScreenStartButtonTitle?: string;
|
|
171
|
+
onboardingScreenStartButtonTitleHover?: string;
|
|
172
|
+
onboardingScreenIllumination?: string;
|
|
173
|
+
onboardingScreenAccessories?: string;
|
|
174
|
+
onboardingScreenCameraLevel?: string;
|
|
175
|
+
cameraScreenSectorTarget?: string;
|
|
176
|
+
cameraScreenSectorActive?: string;
|
|
177
|
+
cameraScreenStrokeNormal?: string;
|
|
178
|
+
retryScreenRetryButtonBackground?: string;
|
|
179
|
+
retryScreenRetryButtonBackgroundHover?: string;
|
|
180
|
+
retryScreenRetryButtonTitle?: string;
|
|
181
|
+
retryScreenRetryButtonTitleHover?: string;
|
|
182
|
+
processingScreenProgress?: string;
|
|
183
|
+
cameraScreenFrontHintLabelBackground?: string;
|
|
184
|
+
cameraScreenFrontHintLabelText?: string;
|
|
185
|
+
successScreenImage?: string;
|
|
186
|
+
retryScreenEnvironmentImage?: string;
|
|
187
|
+
retryScreenPersonImage?: string;
|
|
188
|
+
};
|
|
189
|
+
interface FaceDetectionSettings {
|
|
190
|
+
url?: string;
|
|
191
|
+
debug?: boolean;
|
|
192
|
+
locale?: Locales | string;
|
|
193
|
+
copyright?: boolean;
|
|
194
|
+
cameraId?: string;
|
|
195
|
+
changeCamera?: boolean;
|
|
196
|
+
closeDisabled?: boolean;
|
|
197
|
+
finishScreen?: boolean;
|
|
198
|
+
startScreen?: boolean;
|
|
199
|
+
customization?: ComputedCss;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
interface FaceLivenessSettings extends FaceDetectionSettings {
|
|
203
|
+
url?: string;
|
|
204
|
+
deviceOrientation?: boolean;
|
|
205
|
+
videoRecording?: boolean;
|
|
206
|
+
tag?: string;
|
|
207
|
+
headers?: Record<string, string>;
|
|
208
|
+
retryCount?: number;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export type FaceLivenessDetailType = DetailEvent<FaceEventActions, FaceLivenessResponseType>;
|
|
212
|
+
export type FaceCaptureDetailType = DetailEvent<FaceEventActions, FaceDetectionResponseType>;
|
|
213
|
+
|
|
214
|
+
export class FullScreenContainer extends HTMLElement {}
|
|
215
|
+
|
|
216
|
+
export class FaceDetectionWebComponent extends HTMLElement {
|
|
217
|
+
get version(): string;
|
|
218
|
+
set translations(dictionary: FaceDictionaries | null);
|
|
219
|
+
get translations(): FaceDictionaries | null;
|
|
220
|
+
get settings(): FaceDetectionSettings;
|
|
221
|
+
set settings(params: FaceDetectionSettings);
|
|
222
|
+
}
|
|
223
|
+
export class FaceLivenessWebComponent extends HTMLElement {
|
|
224
|
+
get version(): string;
|
|
225
|
+
set translations(dictionary: FaceDictionaries | null);
|
|
226
|
+
get translations(): FaceDictionaries | null;
|
|
227
|
+
get settings(): FaceLivenessSettings;
|
|
228
|
+
set settings(params: FaceLivenessSettings);
|
|
229
|
+
}
|
package/package.json
CHANGED
|
@@ -1,100 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/vp-frontend-face-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Regula framework agnostic web components to work with webcamera",
|
|
5
|
-
"types": "lib/
|
|
5
|
+
"types": "lib/index.d.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
|
-
"module": "esm/main.js",
|
|
8
7
|
"files": [
|
|
9
8
|
"dist",
|
|
10
|
-
"esm",
|
|
11
9
|
"lib"
|
|
12
10
|
],
|
|
13
11
|
"author": "Regula Forensics, Inc.",
|
|
14
12
|
"license": "MIT",
|
|
15
13
|
"homepage": "https://storybook-face.regulaforensics.com/",
|
|
16
14
|
"scripts": {
|
|
17
|
-
"build
|
|
18
|
-
"
|
|
19
|
-
"storybook": "start-storybook -p 6006 -c .storybook-development -h localhost",
|
|
20
|
-
"build-storybook-development": "build-storybook -c .storybook-development",
|
|
21
|
-
"build-storybook-nightly": "build-storybook -c .storybook-nightly",
|
|
22
|
-
"build-storybook-face-rc": "build-storybook -c .storybook-rc/face",
|
|
23
|
-
"build-storybook-document-rc": "build-storybook -c .storybook-rc/document",
|
|
24
|
-
"build-storybook-face-release": "build-storybook -c .storybook-release/face",
|
|
25
|
-
"build-storybook-document-release": "build-storybook -c .storybook-release/document",
|
|
26
|
-
"build-storybook-document-beta": "build-storybook -c .storybook-beta/document",
|
|
27
|
-
"build-storybook-face-beta": "build-storybook -c .storybook-beta/face",
|
|
28
|
-
"generate-dictionaries": "node scripts/xml-dictionary-parser/index.js Translator.xml src/i18n/dictionaries",
|
|
29
|
-
"clean-lib": "rimraf ./lib",
|
|
30
|
-
"generate-face-types": "tsc --project ./configs/face.tsconfig.json",
|
|
31
|
-
"generate-document-types": "tsc --project ./configs/document.tsconfig.json",
|
|
32
|
-
"prepare": "husky install",
|
|
33
|
-
"check-types": "tsc --noEmit"
|
|
34
|
-
},
|
|
35
|
-
"lint-staged": {
|
|
36
|
-
"*.{js,ts,tsx}": "eslint --fix"
|
|
15
|
+
"build": "webpack --config webpack-umd.js",
|
|
16
|
+
"test": "jest --testPathPattern=src/tests"
|
|
37
17
|
},
|
|
38
18
|
"dependencies": {
|
|
39
19
|
"@regulaforensics/facesdk-webclient": "^3.1.2",
|
|
40
|
-
"
|
|
41
|
-
"localize-react": "^1.7.1",
|
|
42
|
-
"react": "^18.2.0",
|
|
43
|
-
"react-device-detect": "^2.2.2",
|
|
44
|
-
"react-dom": "^18.2.0",
|
|
45
|
-
"uuid": "^9.0.0"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@babel/core": "^7.19.1",
|
|
49
|
-
"@babel/plugin-transform-runtime": "^7.19.1",
|
|
50
|
-
"@babel/preset-env": "^7.19.1",
|
|
51
|
-
"@babel/preset-react": "^7.18.6",
|
|
52
|
-
"@babel/preset-typescript": "^7.18.6",
|
|
53
|
-
"@babel/runtime": "^7.19.0",
|
|
54
|
-
"@regulaforensics/vp-frontend-document-components": "*",
|
|
55
|
-
"@regulaforensics/vp-frontend-document-components-beta": "*",
|
|
56
|
-
"@regulaforensics/vp-frontend-document-components-nightly": "*",
|
|
57
|
-
"@regulaforensics/vp-frontend-document-components-rc": "*",
|
|
58
|
-
"@regulaforensics/vp-frontend-face-components": "*",
|
|
59
|
-
"@regulaforensics/vp-frontend-face-components-beta": "*",
|
|
60
|
-
"@regulaforensics/vp-frontend-face-components-nightly": "*",
|
|
61
|
-
"@regulaforensics/vp-frontend-face-components-rc": "*",
|
|
62
|
-
"@storybook/addon-actions": "^6.5.13",
|
|
63
|
-
"@storybook/addon-essentials": "^6.5.13",
|
|
64
|
-
"@storybook/addon-links": "^6.5.13",
|
|
65
|
-
"@storybook/builder-webpack5": "^6.5.13",
|
|
66
|
-
"@storybook/manager-webpack5": "^6.5.13",
|
|
67
|
-
"@storybook/react": "^6.5.13",
|
|
68
|
-
"@types/react": "^18.0.21",
|
|
69
|
-
"@types/react-dom": "^18.0.6",
|
|
70
|
-
"@types/uuid": "^8.3.4",
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "^5.38.0",
|
|
72
|
-
"@typescript-eslint/parser": "^5.38.0",
|
|
73
|
-
"babel-loader": "^8.2.5",
|
|
74
|
-
"base64-arraybuffer": "^1.0.2",
|
|
75
|
-
"css-loader": "^6.7.1",
|
|
76
|
-
"dotenv-webpack": "^8.0.1",
|
|
77
|
-
"eslint": "^8.24.0",
|
|
78
|
-
"eslint-config-prettier": "^8.5.0",
|
|
79
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
80
|
-
"eslint-plugin-react": "^7.31.8",
|
|
81
|
-
"fast-xml-parser": "^4.0.10",
|
|
82
|
-
"he": "^1.2.0",
|
|
83
|
-
"husky": "^8.0.0",
|
|
84
|
-
"lint-staged": "^13.0.3",
|
|
85
|
-
"prettier": "^2.7.1",
|
|
86
|
-
"react-json-view": "^1.21.3",
|
|
87
|
-
"rimraf": "^4.1.2",
|
|
88
|
-
"style-loader": "^2.0.0",
|
|
89
|
-
"terser-webpack-plugin": "^5.3.6",
|
|
90
|
-
"to-string-loader": "^1.2.0",
|
|
91
|
-
"ts-loader": "^9.4.1",
|
|
92
|
-
"typescript": "<4.8",
|
|
93
|
-
"url-loader": "^4.1.1",
|
|
94
|
-
"webpack": "^5.74.0",
|
|
95
|
-
"webpack-cli": "^4.10.0",
|
|
96
|
-
"webpack-dev-server": "^4.11.1",
|
|
97
|
-
"webpack-merge": "^5.8.0",
|
|
98
|
-
"worker-loader": "^3.0.8"
|
|
20
|
+
"zustand": "^4.3.7"
|
|
99
21
|
}
|
|
100
22
|
}
|
package/lib/common/Button.d.ts
DELETED
package/lib/common/Icon.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import FullscreenIcon from './FullscreenIcon';
|
|
3
|
-
import FullscreenExitIcon from './FullscreenExitIcon';
|
|
4
|
-
import CheckIcon from './CheckIcon';
|
|
5
|
-
import ErrorIcon from './ErrorIcon';
|
|
6
|
-
import CrossIcon from './CrossIcon';
|
|
7
|
-
import RegulaLogo from './RegulaLogo';
|
|
8
|
-
import BackCameraIcon from './BackCameraIcon';
|
|
9
|
-
import FrontCameraIcon from './FrontCameraIcon';
|
|
10
|
-
import CameraIcon from './CameraIcon';
|
|
11
|
-
import VerifiedIcon from './VerifiedIcon';
|
|
12
|
-
import FromCameraIcon from './FromCameraIcon';
|
|
13
|
-
import FromGalleryIcon from './FromGalleryIcon';
|
|
14
|
-
import DocReaderSearch from './DocReaderSearch';
|
|
15
|
-
import DocReaderProcessingFinished from './DocReaderProcessingFinished';
|
|
16
|
-
import DocReaderProcessingError from './DocReaderProcessingError';
|
|
17
|
-
import DocReaderProcessing from './DocReaderProcessing';
|
|
18
|
-
import DocReaderFlip from './DocReaderFlip';
|
|
19
|
-
import DocReaderCameraDisabled from './DocReaderCameraDisabled';
|
|
20
|
-
import DocReaderCameraPreparing from './DocReaderCameraPreparing';
|
|
21
|
-
import SnapshotIcon from './SnapshotIcon';
|
|
22
|
-
import SquareIcon from './SquareIcon';
|
|
23
|
-
import StopIcon from './StopIcon';
|
|
24
|
-
import NoSmilingIconLivenessDetection from './NoSmilingIconLivenessDetection';
|
|
25
|
-
import NoGlareIconLivenessDetection from './NoGlareIconLivenessDetection';
|
|
26
|
-
import CameraChangeIcon from './CameraChangeIcon';
|
|
27
|
-
import RegulaLogoLivenessDetection from './RegulaLogoLivenessDetection';
|
|
28
|
-
import PortraitOrientationOnlyIcon from './PortraitOrientationOnlyIcon';
|
|
29
|
-
declare const icons: {
|
|
30
|
-
fullscreen: typeof FullscreenIcon;
|
|
31
|
-
verified: typeof VerifiedIcon;
|
|
32
|
-
check: typeof CheckIcon;
|
|
33
|
-
error: typeof ErrorIcon;
|
|
34
|
-
cross: typeof CrossIcon;
|
|
35
|
-
snapshot: typeof SnapshotIcon;
|
|
36
|
-
square: typeof SquareIcon;
|
|
37
|
-
stop: typeof StopIcon;
|
|
38
|
-
'regula-logo': typeof RegulaLogo;
|
|
39
|
-
'regula-logo-liveness-detection': typeof RegulaLogoLivenessDetection;
|
|
40
|
-
'back-camera': typeof BackCameraIcon;
|
|
41
|
-
'front-camera': typeof FrontCameraIcon;
|
|
42
|
-
'camera-logo': typeof CameraIcon;
|
|
43
|
-
'fullscreen-exit': typeof FullscreenExitIcon;
|
|
44
|
-
'no-smiling-liveness-detection': typeof NoSmilingIconLivenessDetection;
|
|
45
|
-
'no-glare-liveness-detection': typeof NoGlareIconLivenessDetection;
|
|
46
|
-
'from-camera': typeof FromCameraIcon;
|
|
47
|
-
'from-gallery': typeof FromGalleryIcon;
|
|
48
|
-
'docreader-search': typeof DocReaderSearch;
|
|
49
|
-
'docreader-processing-finished': typeof DocReaderProcessingFinished;
|
|
50
|
-
'docreader-processing-error': typeof DocReaderProcessingError;
|
|
51
|
-
'docreader-processing': typeof DocReaderProcessing;
|
|
52
|
-
'docreader-flip': typeof DocReaderFlip;
|
|
53
|
-
'docreader-camera-disabled': typeof DocReaderCameraDisabled;
|
|
54
|
-
'docreader-camera-preparing': typeof DocReaderCameraPreparing;
|
|
55
|
-
'camera-change': typeof CameraChangeIcon;
|
|
56
|
-
'portrait-orientation-only': typeof PortraitOrientationOnlyIcon;
|
|
57
|
-
};
|
|
58
|
-
export declare type TIcons = keyof typeof icons;
|
|
59
|
-
declare function Icon({ type, size, color }: {
|
|
60
|
-
type: TIcons;
|
|
61
|
-
size?: number;
|
|
62
|
-
color?: string;
|
|
63
|
-
}): JSX.Element;
|
|
64
|
-
export default Icon;
|
package/lib/common/Message.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare type MessageProps = {
|
|
3
|
-
children: string;
|
|
4
|
-
isLivenessDetection?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare function Message({ children, isLivenessDetection }: MessageProps): JSX.Element;
|
|
7
|
-
declare const _default: React.MemoExoticComponent<typeof Message>;
|
|
8
|
-
export default _default;
|
package/lib/common/Spinner.d.ts
DELETED