@regulaforensics/vp-frontend-face-components 2.0.1 → 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.
Files changed (238) hide show
  1. package/README.md +362 -167
  2. package/dist/main.js +1 -1
  3. package/dist/main.js.LICENSE.txt +20 -0
  4. package/lib/index.d.ts +229 -0
  5. package/package.json +5 -83
  6. package/lib/common/BackCameraIcon.d.ts +0 -6
  7. package/lib/common/Button.d.ts +0 -7
  8. package/lib/common/CameraChangeIcon.d.ts +0 -6
  9. package/lib/common/CameraIcon.d.ts +0 -6
  10. package/lib/common/CheckIcon.d.ts +0 -6
  11. package/lib/common/CrossIcon.d.ts +0 -6
  12. package/lib/common/DocReaderCameraDisabled.d.ts +0 -5
  13. package/lib/common/DocReaderCameraPreparing.d.ts +0 -5
  14. package/lib/common/DocReaderFlip.d.ts +0 -5
  15. package/lib/common/DocReaderProcessing.d.ts +0 -5
  16. package/lib/common/DocReaderProcessingError.d.ts +0 -5
  17. package/lib/common/DocReaderProcessingFinished.d.ts +0 -6
  18. package/lib/common/DocReaderSearch.d.ts +0 -5
  19. package/lib/common/ErrorIcon.d.ts +0 -6
  20. package/lib/common/FromCameraIcon.d.ts +0 -5
  21. package/lib/common/FromGalleryIcon.d.ts +0 -5
  22. package/lib/common/FrontCameraIcon.d.ts +0 -6
  23. package/lib/common/FullscreenExitIcon.d.ts +0 -6
  24. package/lib/common/FullscreenIcon.d.ts +0 -6
  25. package/lib/common/Icon.d.ts +0 -64
  26. package/lib/common/Message.d.ts +0 -8
  27. package/lib/common/NoGlareIconLivenessDetection.d.ts +0 -5
  28. package/lib/common/NoSmilingIconLivenessDetection.d.ts +0 -5
  29. package/lib/common/PortraitOrientationOnlyIcon.d.ts +0 -6
  30. package/lib/common/RegulaLogo.d.ts +0 -6
  31. package/lib/common/RegulaLogoLivenessDetection.d.ts +0 -5
  32. package/lib/common/SnapshotIcon.d.ts +0 -6
  33. package/lib/common/Spinner.d.ts +0 -3
  34. package/lib/common/SquareIcon.d.ts +0 -6
  35. package/lib/common/StopIcon.d.ts +0 -6
  36. package/lib/common/VerifiedIcon.d.ts +0 -6
  37. package/lib/components/ButtonFaceLiveness.d.ts +0 -7
  38. package/lib/components/CameraCapture.d.ts +0 -9
  39. package/lib/components/CameraSnapshot.d.ts +0 -2
  40. package/lib/components/CameraSnapshotFileCapture.d.ts +0 -10
  41. package/lib/components/DocumentCapture.d.ts +0 -11
  42. package/lib/components/DocumentContainer.d.ts +0 -11
  43. package/lib/components/DocumentReader.d.ts +0 -2
  44. package/lib/components/DocumentReaderFileCapture.d.ts +0 -12
  45. package/lib/components/DocumentReaderLayout.d.ts +0 -22
  46. package/lib/components/DocumentReaderStartScreen.d.ts +0 -10
  47. package/lib/components/ErrorBoundary.d.ts +0 -18
  48. package/lib/components/FaceCapture.d.ts +0 -25
  49. package/lib/components/FaceDetection.d.ts +0 -2
  50. package/lib/components/FaceFullScreenOverlay.d.ts +0 -10
  51. package/lib/components/FaceHintAnimaition.d.ts +0 -16
  52. package/lib/components/FaceLayout.d.ts +0 -23
  53. package/lib/components/FaceLiveness.d.ts +0 -2
  54. package/lib/components/InfoScreen.d.ts +0 -11
  55. package/lib/components/InfoScreenFaceLiveness.d.ts +0 -12
  56. package/lib/components/InstructionVideoScreen.d.ts +0 -9
  57. package/lib/components/ProcessScreen.d.ts +0 -6
  58. package/lib/components/ProcessScreenFaceLiveness.d.ts +0 -6
  59. package/lib/components/RetryScreenFaceLiveness.d.ts +0 -7
  60. package/lib/components/SectorAnimationSvg.d.ts +0 -11
  61. package/lib/components/WebCamera.d.ts +0 -19
  62. package/lib/constants.d.ts +0 -668
  63. package/lib/contexts/DocumentAttributesContext.d.ts +0 -25
  64. package/lib/contexts/DocumentSDKContext.d.ts +0 -8
  65. package/lib/contexts/FaceAttributesContext.d.ts +0 -26
  66. package/lib/hoc/withDocumentAttributesContext.d.ts +0 -4
  67. package/lib/hoc/withDocumentSDKContext.d.ts +0 -3
  68. package/lib/hoc/withFaceAttributesContext.d.ts +0 -4
  69. package/lib/hoc/withLocalize.d.ts +0 -8
  70. package/lib/hooks/useDocumentReaderSeries.d.ts +0 -19
  71. package/lib/hooks/useDocumentReaderSingle.d.ts +0 -14
  72. package/lib/hooks/useFaceLiveness.d.ts +0 -41
  73. package/lib/hooks/useImageInputParam.d.ts +0 -7
  74. package/lib/hooks/useOrientationChange.d.ts +0 -10
  75. package/lib/hooks/useStateCallback.d.ts +0 -1
  76. package/lib/hooks/useStream.d.ts +0 -10
  77. package/lib/hooks/useUserAgent.d.ts +0 -3
  78. package/lib/hooks/useWindowBlur.d.ts +0 -2
  79. package/lib/i18n/dictionaries/_dictionaries.d.ts +0 -2275
  80. package/lib/index-document.d.ts +0 -4
  81. package/lib/index-face.d.ts +0 -1
  82. package/lib/media-resources/resourcesBase64.d.ts +0 -7
  83. package/lib/models/CameraModel.d.ts +0 -9
  84. package/lib/models/CustomError.d.ts +0 -7
  85. package/lib/models/DocReaderWebclient/ext/authenticity/authenticity.d.ts +0 -32
  86. package/lib/models/DocReaderWebclient/ext/authenticity/fiber.d.ts +0 -7
  87. package/lib/models/DocReaderWebclient/ext/authenticity/ident.d.ts +0 -8
  88. package/lib/models/DocReaderWebclient/ext/authenticity/image-ident.d.ts +0 -7
  89. package/lib/models/DocReaderWebclient/ext/authenticity/index.d.ts +0 -5
  90. package/lib/models/DocReaderWebclient/ext/authenticity/ocr-security-text.d.ts +0 -7
  91. package/lib/models/DocReaderWebclient/ext/authenticity/security-feature.d.ts +0 -8
  92. package/lib/models/DocReaderWebclient/ext/images.d.ts +0 -16
  93. package/lib/models/DocReaderWebclient/ext/index.d.ts +0 -6
  94. package/lib/models/DocReaderWebclient/ext/process-request-image.d.ts +0 -5
  95. package/lib/models/DocReaderWebclient/ext/process-request.d.ts +0 -38
  96. package/lib/models/DocReaderWebclient/ext/process-response.d.ts +0 -36
  97. package/lib/models/DocReaderWebclient/ext/text-field.d.ts +0 -40
  98. package/lib/models/DocReaderWebclient/ext/text.d.ts +0 -14
  99. package/lib/models/DocReaderWebclient/models/area-array.d.ts +0 -32
  100. package/lib/models/DocReaderWebclient/models/area-container.d.ts +0 -38
  101. package/lib/models/DocReaderWebclient/models/authenticity-check-list.d.ts +0 -31
  102. package/lib/models/DocReaderWebclient/models/authenticity-check-result-item.d.ts +0 -38
  103. package/lib/models/DocReaderWebclient/models/authenticity-check-result.d.ts +0 -43
  104. package/lib/models/DocReaderWebclient/models/authenticity-result-all-of.d.ts +0 -25
  105. package/lib/models/DocReaderWebclient/models/authenticity-result-type.d.ts +0 -33
  106. package/lib/models/DocReaderWebclient/models/authenticity-result.d.ts +0 -18
  107. package/lib/models/DocReaderWebclient/models/bc-pdf417-info.d.ts +0 -54
  108. package/lib/models/DocReaderWebclient/models/bc-roidetect.d.ts +0 -42
  109. package/lib/models/DocReaderWebclient/models/check-diagnose.d.ts +0 -98
  110. package/lib/models/DocReaderWebclient/models/check-result.d.ts +0 -30
  111. package/lib/models/DocReaderWebclient/models/chosen-document-type-result-all-of.d.ts +0 -25
  112. package/lib/models/DocReaderWebclient/models/chosen-document-type-result.d.ts +0 -19
  113. package/lib/models/DocReaderWebclient/models/chosen-document-type.d.ts +0 -74
  114. package/lib/models/DocReaderWebclient/models/container-list.d.ts +0 -45
  115. package/lib/models/DocReaderWebclient/models/critical.d.ts +0 -26
  116. package/lib/models/DocReaderWebclient/models/cross-source-value-comparison.d.ts +0 -38
  117. package/lib/models/DocReaderWebclient/models/data-module.d.ts +0 -48
  118. package/lib/models/DocReaderWebclient/models/details-optical.d.ts +0 -67
  119. package/lib/models/DocReaderWebclient/models/details-rfid.d.ts +0 -61
  120. package/lib/models/DocReaderWebclient/models/device-info.d.ts +0 -54
  121. package/lib/models/DocReaderWebclient/models/doc-bar-code-info-all-of.d.ts +0 -31
  122. package/lib/models/DocReaderWebclient/models/doc-bar-code-info.d.ts +0 -19
  123. package/lib/models/DocReaderWebclient/models/doc-visual-extended-field.d.ts +0 -70
  124. package/lib/models/DocReaderWebclient/models/doc-visual-extended-info.d.ts +0 -25
  125. package/lib/models/DocReaderWebclient/models/document-format.d.ts +0 -70
  126. package/lib/models/DocReaderWebclient/models/document-image-result-all-of.d.ts +0 -25
  127. package/lib/models/DocReaderWebclient/models/document-image-result.d.ts +0 -18
  128. package/lib/models/DocReaderWebclient/models/document-image.d.ts +0 -24
  129. package/lib/models/DocReaderWebclient/models/document-position-result-all-of.d.ts +0 -25
  130. package/lib/models/DocReaderWebclient/models/document-position-result.d.ts +0 -19
  131. package/lib/models/DocReaderWebclient/models/document-position.d.ts +0 -80
  132. package/lib/models/DocReaderWebclient/models/document-type-recognition-result.d.ts +0 -30
  133. package/lib/models/DocReaderWebclient/models/document-type.d.ts +0 -246
  134. package/lib/models/DocReaderWebclient/models/document-types-candidates-list.d.ts +0 -32
  135. package/lib/models/DocReaderWebclient/models/document-types-candidates-result-all-of.d.ts +0 -25
  136. package/lib/models/DocReaderWebclient/models/document-types-candidates-result.d.ts +0 -18
  137. package/lib/models/DocReaderWebclient/models/document-types-candidates.d.ts +0 -32
  138. package/lib/models/DocReaderWebclient/models/encrypted-rclresult-all-of.d.ts +0 -24
  139. package/lib/models/DocReaderWebclient/models/encrypted-rclresult.d.ts +0 -18
  140. package/lib/models/DocReaderWebclient/models/fdsidlist.d.ts +0 -80
  141. package/lib/models/DocReaderWebclient/models/fiber-result-all-of.d.ts +0 -74
  142. package/lib/models/DocReaderWebclient/models/fiber-result.d.ts +0 -18
  143. package/lib/models/DocReaderWebclient/models/graphic-field-type.d.ts +0 -118
  144. package/lib/models/DocReaderWebclient/models/graphic-field.d.ts +0 -63
  145. package/lib/models/DocReaderWebclient/models/graphic-fields-list.d.ts +0 -25
  146. package/lib/models/DocReaderWebclient/models/graphics-result-all-of.d.ts +0 -25
  147. package/lib/models/DocReaderWebclient/models/graphics-result.d.ts +0 -19
  148. package/lib/models/DocReaderWebclient/models/ident-result-all-of.d.ts +0 -65
  149. package/lib/models/DocReaderWebclient/models/ident-result.d.ts +0 -18
  150. package/lib/models/DocReaderWebclient/models/image-data.d.ts +0 -24
  151. package/lib/models/DocReaderWebclient/models/image-qa.d.ts +0 -54
  152. package/lib/models/DocReaderWebclient/models/image-quality-check-list.d.ts +0 -32
  153. package/lib/models/DocReaderWebclient/models/image-quality-check-type.d.ts +0 -50
  154. package/lib/models/DocReaderWebclient/models/image-quality-check.d.ts +0 -64
  155. package/lib/models/DocReaderWebclient/models/image-quality-result-all-of.d.ts +0 -25
  156. package/lib/models/DocReaderWebclient/models/image-quality-result.d.ts +0 -18
  157. package/lib/models/DocReaderWebclient/models/images-available-source.d.ts +0 -31
  158. package/lib/models/DocReaderWebclient/models/images-field-value.d.ts +0 -70
  159. package/lib/models/DocReaderWebclient/models/images-field.d.ts +0 -38
  160. package/lib/models/DocReaderWebclient/models/images-result-all-of.d.ts +0 -25
  161. package/lib/models/DocReaderWebclient/models/images-result.d.ts +0 -18
  162. package/lib/models/DocReaderWebclient/models/images.d.ts +0 -32
  163. package/lib/models/DocReaderWebclient/models/index.d.ts +0 -123
  164. package/lib/models/DocReaderWebclient/models/lcid.d.ts +0 -582
  165. package/lib/models/DocReaderWebclient/models/lexical-analysis-result-all-of.d.ts +0 -25
  166. package/lib/models/DocReaderWebclient/models/lexical-analysis-result.d.ts +0 -19
  167. package/lib/models/DocReaderWebclient/models/license-result-all-of.d.ts +0 -24
  168. package/lib/models/DocReaderWebclient/models/license-result.d.ts +0 -18
  169. package/lib/models/DocReaderWebclient/models/light.d.ts +0 -34
  170. package/lib/models/DocReaderWebclient/models/list-verified-fields.d.ts +0 -25
  171. package/lib/models/DocReaderWebclient/models/log-level.d.ts +0 -23
  172. package/lib/models/DocReaderWebclient/models/measure-system.d.ts +0 -26
  173. package/lib/models/DocReaderWebclient/models/mrzformat.d.ts +0 -24
  174. package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result-all-of.d.ts +0 -81
  175. package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result.d.ts +0 -18
  176. package/lib/models/DocReaderWebclient/models/one-candidate.d.ts +0 -74
  177. package/lib/models/DocReaderWebclient/models/original-symbol.d.ts +0 -37
  178. package/lib/models/DocReaderWebclient/models/parray-field.d.ts +0 -81
  179. package/lib/models/DocReaderWebclient/models/per-document-config.d.ts +0 -30
  180. package/lib/models/DocReaderWebclient/models/photo-ident-result-all-of.d.ts +0 -76
  181. package/lib/models/DocReaderWebclient/models/photo-ident-result.d.ts +0 -18
  182. package/lib/models/DocReaderWebclient/models/point-array.d.ts +0 -25
  183. package/lib/models/DocReaderWebclient/models/point.d.ts +0 -30
  184. package/lib/models/DocReaderWebclient/models/points-container.d.ts +0 -31
  185. package/lib/models/DocReaderWebclient/models/process-params.d.ts +0 -254
  186. package/lib/models/DocReaderWebclient/models/process-request-image.d.ts +0 -38
  187. package/lib/models/DocReaderWebclient/models/process-request.d.ts +0 -60
  188. package/lib/models/DocReaderWebclient/models/process-response.d.ts +0 -66
  189. package/lib/models/DocReaderWebclient/models/process-system-info.d.ts +0 -30
  190. package/lib/models/DocReaderWebclient/models/processing-status.d.ts +0 -30
  191. package/lib/models/DocReaderWebclient/models/raw-image-container-list.d.ts +0 -31
  192. package/lib/models/DocReaderWebclient/models/rectangle-coordinates.d.ts +0 -42
  193. package/lib/models/DocReaderWebclient/models/result-item.d.ts +0 -48
  194. package/lib/models/DocReaderWebclient/models/result.d.ts +0 -98
  195. package/lib/models/DocReaderWebclient/models/rfid-location.d.ts +0 -30
  196. package/lib/models/DocReaderWebclient/models/rfid-origin.d.ts +0 -42
  197. package/lib/models/DocReaderWebclient/models/scenario.d.ts +0 -36
  198. package/lib/models/DocReaderWebclient/models/security-feature-result-all-of.d.ts +0 -59
  199. package/lib/models/DocReaderWebclient/models/security-feature-result.d.ts +0 -18
  200. package/lib/models/DocReaderWebclient/models/security-feature-type.d.ts +0 -49
  201. package/lib/models/DocReaderWebclient/models/source-validity.d.ts +0 -32
  202. package/lib/models/DocReaderWebclient/models/source.d.ts +0 -23
  203. package/lib/models/DocReaderWebclient/models/status-result-all-of.d.ts +0 -25
  204. package/lib/models/DocReaderWebclient/models/status-result.d.ts +0 -18
  205. package/lib/models/DocReaderWebclient/models/status.d.ts +0 -63
  206. package/lib/models/DocReaderWebclient/models/string-recognition-result.d.ts +0 -25
  207. package/lib/models/DocReaderWebclient/models/symbol-candidate.d.ts +0 -30
  208. package/lib/models/DocReaderWebclient/models/symbol-recognition-result.d.ts +0 -32
  209. package/lib/models/DocReaderWebclient/models/text-available-source.d.ts +0 -38
  210. package/lib/models/DocReaderWebclient/models/text-data-result-all-of.d.ts +0 -25
  211. package/lib/models/DocReaderWebclient/models/text-data-result.d.ts +0 -19
  212. package/lib/models/DocReaderWebclient/models/text-field-type.d.ts +0 -2386
  213. package/lib/models/DocReaderWebclient/models/text-field-value.d.ts +0 -70
  214. package/lib/models/DocReaderWebclient/models/text-field.d.ts +0 -84
  215. package/lib/models/DocReaderWebclient/models/text-post-processing.d.ts +0 -22
  216. package/lib/models/DocReaderWebclient/models/text-result-all-of.d.ts +0 -25
  217. package/lib/models/DocReaderWebclient/models/text-result.d.ts +0 -18
  218. package/lib/models/DocReaderWebclient/models/text.d.ts +0 -51
  219. package/lib/models/DocReaderWebclient/models/transaction-info.d.ts +0 -42
  220. package/lib/models/DocReaderWebclient/models/verification-result.d.ts +0 -38
  221. package/lib/models/DocReaderWebclient/models/verified-field-map.d.ts +0 -63
  222. package/lib/models/DocReaderWebclient/models/visibility.d.ts +0 -23
  223. package/lib/models/ImageModel.d.ts +0 -7
  224. package/lib/services/DebugService.d.ts +0 -17
  225. package/lib/services/DeviceOrientationService.d.ts +0 -18
  226. package/lib/services/DocumentReaderProcessor.d.ts +0 -43
  227. package/lib/services/DocumentReaderService.d.ts +0 -37
  228. package/lib/services/EventEmitter.d.ts +0 -9
  229. package/lib/services/FaceLivenessService.d.ts +0 -70
  230. package/lib/services/FaceService.d.ts +0 -39
  231. package/lib/services/StreamRecorderService.d.ts +0 -24
  232. package/lib/types.d.ts +0 -361
  233. package/lib/utils.d.ts +0 -30
  234. package/lib/web-components/CameraSnapshot.d.ts +0 -14
  235. package/lib/web-components/DocumentReader.d.ts +0 -14
  236. package/lib/web-components/FaceDetection.d.ts +0 -11
  237. package/lib/web-components/FaceLiveness.d.ts +0 -17
  238. package/lib/web-components/FullScreenContainer.d.ts +0 -4
@@ -40,6 +40,26 @@
40
40
  * LICENSE file in the root directory of this source tree.
41
41
  */
42
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
+
43
63
  /**
44
64
  @license @nocompile
45
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": "2.0.1",
3
+ "version": "3.0.0",
4
4
  "description": "Regula framework agnostic web components to work with webcamera",
5
- "types": "lib/types.d.ts",
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-face": "npm run clean-lib && npm run generate-face-types && webpack --config webpack.face-umd.js",
18
- "build-document": "npm run clean-lib && npm run generate-document-types && webpack --config webpack.document-umd.js && webpack --config webpack.document-esm.js",
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
- "@webcomponents/webcomponentsjs": "2.6.0",
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
  }
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function BackCameraIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default BackCameraIcon;
@@ -1,7 +0,0 @@
1
- import { ReactNode } from 'react';
2
- declare type ButtonProps = {
3
- children: ReactNode | string;
4
- onClick: () => void;
5
- };
6
- declare function Button({ children, onClick, ...rest }: ButtonProps): JSX.Element;
7
- export default Button;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function CameraChangeIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default CameraChangeIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function CameraIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default CameraIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function CheckIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default CheckIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function CrossIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default CrossIcon;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function DocReaderCameraDisabled({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default DocReaderCameraDisabled;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function DocReaderCameraPreparing({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default DocReaderCameraPreparing;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function DocReaderFlip({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default DocReaderFlip;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function DocReaderProcessing({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default DocReaderProcessing;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function DocReaderProcessingError({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default DocReaderProcessingError;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function DocReaderProcessingFinished({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default DocReaderProcessingFinished;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function DocReaderSearch({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default DocReaderSearch;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function ErrorIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default ErrorIcon;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function FromCameraIcon({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default FromCameraIcon;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function FromGalleryIcon({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default FromGalleryIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function FrontCameraIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default FrontCameraIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function FullscreenExitIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default FullscreenExitIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function FullscreenIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default FullscreenIcon;
@@ -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;
@@ -1,8 +0,0 @@
1
- /// <reference types="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: import("react").MemoExoticComponent<typeof Message>;
8
- export default _default;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function NoGlareIconLivenessDetection({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default NoGlareIconLivenessDetection;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function NoSmilingIconLivenessDetection({ size }: {
3
- size?: number;
4
- }): JSX.Element;
5
- export default NoSmilingIconLivenessDetection;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function PortraitOrientationOnlyIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default PortraitOrientationOnlyIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function RegulaLogo({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default RegulaLogo;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function RegulaLogoLivenessDetection({ color }: {
3
- color?: string;
4
- }): JSX.Element;
5
- export default RegulaLogoLivenessDetection;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function SnapshotIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default SnapshotIcon;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function Spinner(): JSX.Element;
3
- export default Spinner;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function SquareIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default SquareIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function StopIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default StopIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare function VerifiedIcon({ size, color }: {
3
- size?: number;
4
- color?: string;
5
- }): JSX.Element;
6
- export default VerifiedIcon;
@@ -1,7 +0,0 @@
1
- import { ReactNode } from 'react';
2
- declare type ButtonLivenessDetectionProps = {
3
- children: ReactNode | string;
4
- onClick: () => void;
5
- };
6
- declare function ButtonFaceLiveness({ children, onClick, ...rest }: ButtonLivenessDetectionProps): JSX.Element;
7
- export default ButtonFaceLiveness;