@regulaforensics/vp-frontend-face-components 1.3.0 → 1.4.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 +292 -29
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +42 -0
- package/lib/common/BackCameraIcon.d.ts +6 -0
- package/lib/common/Button.d.ts +7 -0
- package/lib/common/CameraChangeIcon.d.ts +6 -0
- package/lib/common/CameraIcon.d.ts +6 -0
- package/lib/common/CheckIcon.d.ts +6 -0
- package/lib/common/CrossIcon.d.ts +6 -0
- package/lib/common/DocReaderCameraDisabled.d.ts +5 -0
- package/lib/common/DocReaderCameraPreparing.d.ts +5 -0
- package/lib/common/DocReaderFlip.d.ts +5 -0
- package/lib/common/DocReaderProcessing.d.ts +5 -0
- package/lib/common/DocReaderProcessingError.d.ts +5 -0
- package/lib/common/DocReaderProcessingFinished.d.ts +6 -0
- package/lib/common/DocReaderSearch.d.ts +5 -0
- package/lib/common/ErrorIcon.d.ts +6 -0
- package/lib/common/FromCameraIcon.d.ts +5 -0
- package/lib/common/FromGalleryIcon.d.ts +5 -0
- package/lib/common/FrontCameraIcon.d.ts +6 -0
- package/lib/common/FullscreenExitIcon.d.ts +6 -0
- package/lib/common/FullscreenIcon.d.ts +6 -0
- package/lib/common/Icon.d.ts +7 -0
- package/lib/common/InstructionIconFaceDetection.d.ts +5 -0
- package/lib/common/InstructionIconFaceLiveness.d.ts +5 -0
- package/lib/common/Message.d.ts +7 -0
- package/lib/common/NoGlareIcon.d.ts +5 -0
- package/lib/common/NoSmilingIcon.d.ts +5 -0
- package/lib/common/RegulaLogo.d.ts +6 -0
- package/lib/common/SnapshotIcon.d.ts +6 -0
- package/lib/common/Spinner.d.ts +3 -0
- package/lib/common/SquareIcon.d.ts +6 -0
- package/lib/common/StopIcon.d.ts +6 -0
- package/lib/common/VerifiedIcon.d.ts +6 -0
- package/lib/components/ErrorBoundary.d.ts +17 -0
- package/lib/components/FaceCapture.d.ts +17 -0
- package/lib/components/FaceDetection.d.ts +2 -0
- package/lib/components/FaceFullScreenOverlay.d.ts +11 -0
- package/lib/components/FaceLayout.d.ts +19 -0
- package/lib/components/FaceLiveness.d.ts +2 -0
- package/lib/components/InfoScreen.d.ts +10 -0
- package/lib/components/InstructionScreen.d.ts +9 -0
- package/lib/components/ProcessScreen.d.ts +6 -0
- package/lib/components/RetryScreen.d.ts +7 -0
- package/lib/components/WebCamera.d.ts +20 -0
- package/lib/constants.d.ts +366 -0
- package/lib/contexts/FaceAttributesContext.d.ts +24 -0
- package/lib/hoc/withFaceAttributesContext.d.ts +4 -0
- package/lib/hoc/withLocalize.d.ts +7 -0
- package/lib/hooks/useDebounce.d.ts +2 -0
- package/lib/hooks/useFaceLiveness.d.ts +33 -0
- package/lib/hooks/useInterval.d.ts +3 -0
- package/lib/hooks/useOrientationChange.d.ts +10 -0
- package/lib/hooks/useStream.d.ts +16 -0
- package/lib/hooks/useUserAgent.d.ts +3 -0
- package/lib/hooks/useWindowBlur.d.ts +2 -0
- package/lib/i18n/dictionaries/_dictionaries.d.ts +2051 -0
- package/lib/index-face.d.ts +1 -0
- package/lib/models/CameraModel.d.ts +9 -0
- package/lib/models/ImageModel.d.ts +7 -0
- package/lib/services/DebugService.d.ts +13 -0
- package/lib/services/DocumentReaderService.d.ts +39 -0
- package/lib/services/EventEmitter.d.ts +9 -0
- package/lib/services/FaceLivenessService.d.ts +46 -0
- package/lib/services/FaceService.d.ts +11 -0
- package/lib/services/WasmFeatureDetectService.d.ts +4 -0
- package/lib/types.d.ts +219 -0
- package/lib/utils.d.ts +65 -0
- package/lib/web-components/FaceDetection.d.ts +11 -0
- package/lib/web-components/FaceLiveness.d.ts +14 -0
- package/lib/web-components/FullScreenContainer.d.ts +4 -0
- package/lib/web-components.d.ts +47 -0
- package/package.json +30 -35
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
@license @nocompile
|
|
9
|
+
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
10
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
11
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
12
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
13
|
+
Code distributed by Google as part of the polymer project is also
|
|
14
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** @license React v0.20.2
|
|
18
|
+
* scheduler.production.min.js
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the MIT license found in the
|
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** @license React v17.0.2
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/** @license React v17.0.2
|
|
36
|
+
* react.production.min.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare type MessageProps = {
|
|
3
|
+
children: React.ReactChildren | string;
|
|
4
|
+
};
|
|
5
|
+
declare function Message({ children }: MessageProps): JSX.Element;
|
|
6
|
+
declare const _default: React.MemoExoticComponent<typeof Message>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { WebComponentsError } from '../constants';
|
|
3
|
+
import { CustomErrorObjectType, SupportedBrowserVersionsByOsType } from '../types';
|
|
4
|
+
declare type PropsType = {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
onError: (error: WebComponentsError) => void;
|
|
7
|
+
supportedBrowserVersions?: SupportedBrowserVersionsByOsType;
|
|
8
|
+
};
|
|
9
|
+
declare class ErrorBoundary extends React.Component<PropsType> {
|
|
10
|
+
onError: (error: WebComponentsError) => void;
|
|
11
|
+
supportedBrowserVersions?: SupportedBrowserVersionsByOsType;
|
|
12
|
+
constructor(props: PropsType);
|
|
13
|
+
componentDidCatch(error: Error | CustomErrorObjectType): void;
|
|
14
|
+
componentDidMount(): void;
|
|
15
|
+
render(): React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export default ErrorBoundary;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { faceCaptureComplitionStatus as appStatus, streamStatus } from '../constants';
|
|
3
|
+
declare type FaceCaptureProps = {
|
|
4
|
+
onStatusChange: (complitionStatus: appStatus) => void;
|
|
5
|
+
onImagesCapture: (images: Array<string>) => void;
|
|
6
|
+
onVideoStatusChange: (streamStatus: streamStatus) => void;
|
|
7
|
+
onReset: () => void;
|
|
8
|
+
videoStatus: streamStatus;
|
|
9
|
+
uuid?: string;
|
|
10
|
+
tryCount?: number;
|
|
11
|
+
onRequestChange?: (request: Uint8Array | null) => void;
|
|
12
|
+
faceSnapshot?: boolean;
|
|
13
|
+
debug?: boolean;
|
|
14
|
+
showChangeCameraButton?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare function FaceCapture({ onStatusChange, onImagesCapture, onVideoStatusChange, onReset, videoStatus, tryCount, uuid, onRequestChange, faceSnapshot, debug, showChangeCameraButton, }: FaceCaptureProps): JSX.Element;
|
|
17
|
+
export default FaceCapture;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DirectionType, faceCaptureComplitionStatus } from '../constants';
|
|
3
|
+
declare type FaceFullScreenOverlayProps = {
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
children: JSX.Element;
|
|
6
|
+
completionStatus: faceCaptureComplitionStatus;
|
|
7
|
+
copyright?: boolean;
|
|
8
|
+
direction: DirectionType;
|
|
9
|
+
};
|
|
10
|
+
declare function FaceFullScreenOverlay({ onClose, children, completionStatus, copyright, direction, }: FaceFullScreenOverlayProps): JSX.Element;
|
|
11
|
+
export default FaceFullScreenOverlay;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { eFL_Message, eFL_MessageStyle, streamStatus } from '../constants';
|
|
3
|
+
import { FrameObject } from '../types';
|
|
4
|
+
declare type FaceLayoutProps = {
|
|
5
|
+
children: Array<JSX.Element | null>;
|
|
6
|
+
onFrameResize: (frameObj: FrameObject) => void;
|
|
7
|
+
scale: number;
|
|
8
|
+
videoStatus: streamStatus;
|
|
9
|
+
message: eFL_Message;
|
|
10
|
+
messageStyle: eFL_MessageStyle;
|
|
11
|
+
prepared: boolean;
|
|
12
|
+
onChangeCamera: () => void;
|
|
13
|
+
isChangeCameraAvailable: boolean;
|
|
14
|
+
breakpoint?: string;
|
|
15
|
+
showChangeCameraButton?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare function FaceLayout({ children, scale, videoStatus, onFrameResize, message, messageStyle, prepared, onChangeCamera, isChangeCameraAvailable, showChangeCameraButton, }: FaceLayoutProps): JSX.Element;
|
|
18
|
+
declare const _default: React.MemoExoticComponent<typeof FaceLayout>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type InfoScreenProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
type: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
onReset?: () => void;
|
|
7
|
+
size?: number;
|
|
8
|
+
};
|
|
9
|
+
declare function InfoScreen({ title, type, subtitle, onReset, size }: InfoScreenProps): JSX.Element;
|
|
10
|
+
export default InfoScreen;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type InstructionScreenProps = {
|
|
3
|
+
onStart: () => void;
|
|
4
|
+
icon: string;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle: string;
|
|
7
|
+
};
|
|
8
|
+
declare function InstructionScreen({ onStart, icon, title, subtitle }: InstructionScreenProps): JSX.Element;
|
|
9
|
+
export default InstructionScreen;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cameraFacingMode, webCameraComponentMode, WebComponentsError } from '../constants';
|
|
3
|
+
import { CaptureFrameType, VideoParamsType, VideoStatusParamsType } from '../types';
|
|
4
|
+
declare type WebCameraVideoProps = {
|
|
5
|
+
captureMode: webCameraComponentMode;
|
|
6
|
+
onVideoStatusChange: (status: VideoStatusParamsType) => void;
|
|
7
|
+
onCapture: (document: CaptureFrameType) => void;
|
|
8
|
+
onVideoSizeChange?: (params: VideoParamsType) => void;
|
|
9
|
+
mode?: cameraFacingMode;
|
|
10
|
+
resolution?: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
mirroring?: boolean;
|
|
15
|
+
onFailStatus?: (reason: WebComponentsError) => void;
|
|
16
|
+
cameraId?: string;
|
|
17
|
+
};
|
|
18
|
+
declare function WebCamera({ captureMode, onVideoStatusChange, onCapture, onVideoSizeChange, mode, resolution, mirroring, onFailStatus, cameraId, }: WebCameraVideoProps): JSX.Element;
|
|
19
|
+
declare const _default: React.MemoExoticComponent<typeof WebCamera>;
|
|
20
|
+
export default _default;
|