@regulaforensics/vp-frontend-face-components 6.3.1413-nightly → 6.3.1415-rc
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 +23 -39
 - package/dist/main.iife.js +1080 -19
 - package/{dist → lib}/index.d.ts +238 -219
 - package/package.json +3 -3
 
    
        package/{dist → lib}/index.d.ts
    RENAMED
    
    | 
         @@ -1,223 +1,140 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
       2 
     | 
    
         
            -
                 
     | 
| 
       3 
     | 
    
         
            -
                 
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
       5 
     | 
    
         
            -
                 
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
       7 
     | 
    
         
            -
                 
     | 
| 
       8 
     | 
    
         
            -
                 
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
                 
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
       12 
     | 
    
         
            -
                 
     | 
| 
       13 
     | 
    
         
            -
                 
     | 
| 
       14 
     | 
    
         
            -
                 
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
       16 
     | 
    
         
            -
                 
     | 
| 
       17 
     | 
    
         
            -
                 
     | 
| 
       18 
     | 
    
         
            -
                 
     | 
| 
       19 
     | 
    
         
            -
                 
     | 
| 
       20 
     | 
    
         
            -
                 
     | 
| 
       21 
     | 
    
         
            -
                 
     | 
| 
       22 
     | 
    
         
            -
                 
     | 
| 
       23 
     | 
    
         
            -
                 
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                 
     | 
| 
       28 
     | 
    
         
            -
                 
     | 
| 
       29 
     | 
    
         
            -
                 
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                 
     | 
| 
       34 
     | 
    
         
            -
                 
     | 
| 
       35 
     | 
    
         
            -
                deviceOrientationPlate?: boolean;
         
     | 
| 
       36 
     | 
    
         
            -
                videoRecordingSaveVideo?: boolean;
         
     | 
| 
       37 
     | 
    
         
            -
            };
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
            export declare interface DetailEvent<A, R> {
         
     | 
| 
       40 
     | 
    
         
            -
                action: A;
         
     | 
| 
       41 
     | 
    
         
            -
                data: CustomEventDataType<R> | null;
         
     | 
| 
       42 
     | 
    
         
            -
            }
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
            export declare type ErrorTypes = 'WASM_ERROR' | 'UNKNOWN_ERROR' | 'NOT_SUPPORTED' | 'CAMERA_UNKNOWN_ERROR' | 'CAMERA_PERMISSION_DENIED' | 'NO_CAMERA' | 'INCORRECT_CAMERA_ID' | 'CONNECTION_ERROR' | 'LANDSCAPE_MODE_RESTRICTED' | 'TIMEOUT_ERROR' | 'CHANGE_CAMERA' | 'DEVICE_ROTATE' | 'APP_INACTIVE' | 'HTTP_NOT_SUPPORTED';
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
            export declare type FaceCaptureDetailType = DetailEvent<FaceEventActions, FaceDetectionResponseType>;
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
            export declare type FaceDetectionResponseType = {
         
     | 
| 
       49 
     | 
    
         
            -
                capture: Array<string>;
         
     | 
| 
       50 
     | 
    
         
            -
            };
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
            export declare interface FaceDetectionSettings {
         
     | 
| 
       53 
     | 
    
         
            -
                url?: string;
         
     | 
| 
       54 
     | 
    
         
            -
                debug?: DebugOptions;
         
     | 
| 
       55 
     | 
    
         
            -
                locale?: Locales | string;
         
     | 
| 
       56 
     | 
    
         
            -
                copyright?: boolean;
         
     | 
| 
       57 
     | 
    
         
            -
                cameraId?: string;
         
     | 
| 
       58 
     | 
    
         
            -
                changeCamera?: boolean;
         
     | 
| 
       59 
     | 
    
         
            -
                closeDisabled?: boolean;
         
     | 
| 
       60 
     | 
    
         
            -
                finishScreen?: boolean;
         
     | 
| 
       61 
     | 
    
         
            -
                startScreen?: boolean;
         
     | 
| 
       62 
     | 
    
         
            -
                customization?: ComputedCss;
         
     | 
| 
       63 
     | 
    
         
            -
                nonce?: string;
         
     | 
| 
       64 
     | 
    
         
            -
                rotationAngle?: number;
         
     | 
| 
       65 
     | 
    
         
            -
                holdStillDuration?: number;
         
     | 
| 
       66 
     | 
    
         
            -
                timeoutInterval?: number;
         
     | 
| 
       67 
     | 
    
         
            -
                workerPath?: string;
         
     | 
| 
       68 
     | 
    
         
            -
                detectOcclusion?: boolean;
         
     | 
| 
       69 
     | 
    
         
            -
            }
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
            export declare class FaceDetectionWebComponent extends HTMLElement {
         
     | 
| 
       72 
     | 
    
         
            -
                private _root;
         
     | 
| 
       73 
     | 
    
         
            -
                private _mounted;
         
     | 
| 
       74 
     | 
    
         
            -
                private _translations;
         
     | 
| 
       75 
     | 
    
         
            -
                constructor();
         
     | 
| 
       76 
     | 
    
         
            -
                static get observedAttributes(): Array<string>;
         
     | 
| 
       77 
     | 
    
         
            -
                private onEvent;
         
     | 
| 
       78 
     | 
    
         
            -
                get version(): string;
         
     | 
| 
       79 
     | 
    
         
            -
                set translations(dictionary: FaceDictionaries | null);
         
     | 
| 
       80 
     | 
    
         
            -
                get translations(): FaceDictionaries | null;
         
     | 
| 
       81 
     | 
    
         
            -
                set settings(params: FaceDetectionSettings);
         
     | 
| 
       82 
     | 
    
         
            -
                get settings(): FaceDetectionSettings;
         
     | 
| 
       83 
     | 
    
         
            -
                attributeChangedCallback(name: string): void;
         
     | 
| 
       84 
     | 
    
         
            -
                connectedCallback(): void;
         
     | 
| 
       85 
     | 
    
         
            -
                private render;
         
     | 
| 
       86 
     | 
    
         
            -
                disconnectedCallback(): void;
         
     | 
| 
       87 
     | 
    
         
            -
            }
         
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
            export declare type FaceDictionaries = Partial<Record<Locales, FaceTranslations>>;
         
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
            export declare type FaceEventActions = 'ELEMENT_VISIBLE' | 'PRESS_START_BUTTON' | 'PRESS_RETRY_BUTTON' | 'CLOSE' | 'PROCESS_FINISHED' | 'SERVICE_INITIALIZED' | 'RETRY_COUNTER_EXCEEDED';
         
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
            export declare type FaceLivenessDetailType = DetailEvent<FaceEventActions, FaceLivenessResponseType>;
         
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
            export declare type FaceLivenessResponseType = {
         
     | 
| 
       96 
     | 
    
         
            -
                images: Array<string>;
         
     | 
| 
       97 
     | 
    
         
            -
                code: number;
         
     | 
| 
       98 
     | 
    
         
            -
                metadata: Record<string, any>;
         
     | 
| 
       99 
     | 
    
         
            -
                estimatedAge: number | null;
         
     | 
| 
       100 
     | 
    
         
            -
                tag: string;
         
     | 
| 
       101 
     | 
    
         
            -
                status: number;
         
     | 
| 
       102 
     | 
    
         
            -
                transactionId: string;
         
     | 
| 
       103 
     | 
    
         
            -
                type: number;
         
     | 
| 
       104 
     | 
    
         
            -
            };
         
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
            export declare interface FaceLivenessSettings extends Omit<FaceDetectionSettings, 'holdStillDuration' | 'timeoutInterval'> {
         
     | 
| 
       107 
     | 
    
         
            -
                url?: string;
         
     | 
| 
       108 
     | 
    
         
            -
                deviceOrientation?: boolean;
         
     | 
| 
       109 
     | 
    
         
            -
                videoRecording?: boolean;
         
     | 
| 
       110 
     | 
    
         
            -
                tag?: string;
         
     | 
| 
       111 
     | 
    
         
            -
                headers?: Record<string, string>;
         
     | 
| 
       112 
     | 
    
         
            -
                retryCount?: number;
         
     | 
| 
       113 
     | 
    
         
            -
                metadata?: Record<string, any>;
         
     | 
| 
       114 
     | 
    
         
            -
                recordingProcess?: RecordingProcess;
         
     | 
| 
       115 
     | 
    
         
            -
                livenessType?: FaceLivenessType;
         
     | 
| 
       116 
     | 
    
         
            -
            }
         
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
            export declare enum FaceLivenessType {
         
     | 
| 
       119 
     | 
    
         
            -
                ACTIVE = 0,
         
     | 
| 
       120 
     | 
    
         
            -
                PASSIVE = 1
         
     | 
| 
       121 
     | 
    
         
            -
            }
         
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
       123 
     | 
    
         
            -
            export declare class FaceLivenessWebComponent extends HTMLElement {
         
     | 
| 
       124 
     | 
    
         
            -
                private _root;
         
     | 
| 
       125 
     | 
    
         
            -
                private _mounted;
         
     | 
| 
       126 
     | 
    
         
            -
                private _translations;
         
     | 
| 
       127 
     | 
    
         
            -
                constructor();
         
     | 
| 
       128 
     | 
    
         
            -
                static get observedAttributes(): Array<string>;
         
     | 
| 
       129 
     | 
    
         
            -
                private onEvent;
         
     | 
| 
       130 
     | 
    
         
            -
                attributeChangedCallback(name: string): void;
         
     | 
| 
       131 
     | 
    
         
            -
                connectedCallback(): void;
         
     | 
| 
       132 
     | 
    
         
            -
                get version(): string;
         
     | 
| 
       133 
     | 
    
         
            -
                set translations(dictionary: FaceDictionaries | null);
         
     | 
| 
       134 
     | 
    
         
            -
                get translations(): FaceDictionaries | null;
         
     | 
| 
       135 
     | 
    
         
            -
                set settings(params: FaceLivenessSettings);
         
     | 
| 
       136 
     | 
    
         
            -
                get settings(): FaceLivenessSettings;
         
     | 
| 
       137 
     | 
    
         
            -
                private render;
         
     | 
| 
       138 
     | 
    
         
            -
                disconnectedCallback(): void;
         
     | 
| 
       139 
     | 
    
         
            -
            }
         
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
            export declare interface FaceTranslations {
         
     | 
| 
       142 
     | 
    
         
            -
                showOnlyOneFace?: string;
         
     | 
| 
       143 
     | 
    
         
            -
                preparingCamera?: string;
         
     | 
| 
       144 
     | 
    
         
            -
                allowAccessCamera?: string;
         
     | 
| 
       145 
     | 
    
         
            -
                somethingWentWrong?: string;
         
     | 
| 
       146 
     | 
    
         
            -
                incorrectCameraId?: string;
         
     | 
| 
       147 
     | 
    
         
            -
                checkCameraId?: string;
         
     | 
| 
       148 
     | 
    
         
            -
                preparingService?: string;
         
     | 
| 
       149 
     | 
    
         
            -
                allowAccessToCamera?: string;
         
     | 
| 
       150 
     | 
    
         
            -
                error?: string;
         
     | 
| 
       151 
     | 
    
         
            -
                versionNotSupported?: string;
         
     | 
| 
       152 
     | 
    
         
            -
                updateBrowser?: string;
         
     | 
| 
       153 
     | 
    
         
            -
                licenseError?: string;
         
     | 
| 
       154 
     | 
    
         
            -
                licenseExpired?: string;
         
     | 
| 
       155 
     | 
    
         
            -
                onlyPortraitOrientation?: string;
         
     | 
| 
       156 
     | 
    
         
            -
                turnDeviceIntoPortrait?: string;
         
     | 
| 
       157 
     | 
    
         
            -
                tryAgain?: string;
         
     | 
| 
       158 
     | 
    
         
            -
                noCameraAvailable?: string;
         
     | 
| 
       159 
     | 
    
         
            -
                checkCameraConnection?: string;
         
     | 
| 
       160 
     | 
    
         
            -
                noMaskSunglassesHeaddress?: string;
         
     | 
| 
       161 
     | 
    
         
            -
                ambientLighting?: string;
         
     | 
| 
       162 
     | 
    
         
            -
                lookStraight?: string;
         
     | 
| 
       163 
     | 
    
         
            -
                fitYourFace?: string;
         
     | 
| 
       164 
     | 
    
         
            -
                moveCloser?: string;
         
     | 
| 
       165 
     | 
    
         
            -
                moveAway?: string;
         
     | 
| 
       166 
     | 
    
         
            -
                holdSteady?: string;
         
     | 
| 
       167 
     | 
    
         
            -
                turnHead?: string;
         
     | 
| 
       168 
     | 
    
         
            -
                processing?: string;
         
     | 
| 
       169 
     | 
    
         
            -
                retryButtonText?: string;
         
     | 
| 
       170 
     | 
    
         
            -
                followGuidelinesText?: string;
         
     | 
| 
       171 
     | 
    
         
            -
                letsTryAgainTitle?: string;
         
     | 
| 
       172 
     | 
    
         
            -
                noCameraPermission?: string;
         
     | 
| 
       173 
     | 
    
         
            -
                goButton?: string;
         
     | 
| 
       174 
     | 
    
         
            -
                centerFaceTurnHead?: string;
         
     | 
| 
       175 
     | 
    
         
            -
                centerFace?: string;
         
     | 
| 
       176 
     | 
    
         
            -
                selfieTime?: string;
         
     | 
| 
       177 
     | 
    
         
            -
                errorCode?: string;
         
     | 
| 
       178 
     | 
    
         
            -
                illumination?: string;
         
     | 
| 
       179 
     | 
    
         
            -
                cameraLevel?: string;
         
     | 
| 
       180 
     | 
    
         
            -
                noAccessories?: string;
         
     | 
| 
       181 
     | 
    
         
            -
                getReady?: string;
         
     | 
| 
       182 
     | 
    
         
            -
            }
         
     | 
| 
       183 
     | 
    
         
            -
             
     | 
| 
       184 
     | 
    
         
            -
            export declare class FullScreenContainer extends HTMLElement {
         
     | 
| 
       185 
     | 
    
         
            -
                private _root;
         
     | 
| 
       186 
     | 
    
         
            -
                constructor();
         
     | 
| 
       187 
     | 
    
         
            -
            }
         
     | 
| 
       188 
     | 
    
         
            -
             
     | 
| 
       189 
     | 
    
         
            -
            export declare interface IFaceDetection {
         
     | 
| 
       190 
     | 
    
         
            -
                locale?: Locales | string;
         
     | 
| 
       191 
     | 
    
         
            -
                copyright?: boolean;
         
     | 
| 
       192 
     | 
    
         
            -
                'camera-id'?: string;
         
     | 
| 
       193 
     | 
    
         
            -
                'change-camera'?: boolean;
         
     | 
| 
       194 
     | 
    
         
            -
                'start-screen'?: boolean;
         
     | 
| 
       195 
     | 
    
         
            -
                'close-disabled'?: boolean;
         
     | 
| 
       196 
     | 
    
         
            -
                'finish-screen'?: boolean;
         
     | 
| 
       197 
     | 
    
         
            -
            }
         
     | 
| 
       198 
     | 
    
         
            -
             
     | 
| 
       199 
     | 
    
         
            -
            export declare interface IFaceLiveness extends IFaceDetection {
         
     | 
| 
       200 
     | 
    
         
            -
                url?: string;
         
     | 
| 
       201 
     | 
    
         
            -
                'device-orientation'?: boolean;
         
     | 
| 
       202 
     | 
    
         
            -
            }
         
     | 
| 
       203 
     | 
    
         
            -
             
     | 
| 
       204 
     | 
    
         
            -
            export declare type Locales = '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' | string;
         
     | 
| 
       205 
     | 
    
         
            -
             
     | 
| 
       206 
     | 
    
         
            -
            export declare enum RecordingProcess {
         
     | 
| 
       207 
     | 
    
         
            -
                ASYNCHRONOUS_UPLOAD = 0,
         
     | 
| 
       208 
     | 
    
         
            -
                SYNCHRONOUS_UPLOAD = 1,
         
     | 
| 
       209 
     | 
    
         
            -
                NOT_UPLOAD = 2
         
     | 
| 
       210 
     | 
    
         
            -
            }
         
     | 
| 
       211 
     | 
    
         
            -
             
     | 
| 
       212 
     | 
    
         
            -
            declare enum ResponseCode {
         
     | 
| 
       213 
     | 
    
         
            -
                EMPTY = -1,
         
     | 
| 
       214 
     | 
    
         
            -
                ERROR = 0,
         
     | 
| 
       215 
     | 
    
         
            -
                OK = 1,
         
     | 
| 
       216 
     | 
    
         
            -
                TIMEOUT = 2
         
     | 
| 
       217 
     | 
    
         
            -
            }
         
     | 
| 
       218 
     | 
    
         
            -
             
     | 
| 
       219 
     | 
    
         
            -
            export { }
         
     | 
| 
      
 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;
         
     | 
| 
       220 
35 
     | 
    
         | 
| 
      
 36 
     | 
    
         
            +
            interface FaceTranslations {
         
     | 
| 
      
 37 
     | 
    
         
            +
                showOnlyOneFace?: string;
         
     | 
| 
      
 38 
     | 
    
         
            +
                preparingCamera?: string;
         
     | 
| 
      
 39 
     | 
    
         
            +
                allowAccessCamera?: string;
         
     | 
| 
      
 40 
     | 
    
         
            +
                somethingWentWrong?: string;
         
     | 
| 
      
 41 
     | 
    
         
            +
                incorrectCameraId?: string;
         
     | 
| 
      
 42 
     | 
    
         
            +
                checkCameraId?: string;
         
     | 
| 
      
 43 
     | 
    
         
            +
                preparingService?: string;
         
     | 
| 
      
 44 
     | 
    
         
            +
                allowAccessToCamera?: string;
         
     | 
| 
      
 45 
     | 
    
         
            +
                error?: string;
         
     | 
| 
      
 46 
     | 
    
         
            +
                versionNotSupported?: string;
         
     | 
| 
      
 47 
     | 
    
         
            +
                updateBrowser?: string;
         
     | 
| 
      
 48 
     | 
    
         
            +
                licenseError?: string;
         
     | 
| 
      
 49 
     | 
    
         
            +
                licenseExpired?: string;
         
     | 
| 
      
 50 
     | 
    
         
            +
                onlyPortraitOrientation?: string;
         
     | 
| 
      
 51 
     | 
    
         
            +
                turnDeviceIntoPortrait?: string;
         
     | 
| 
      
 52 
     | 
    
         
            +
                tryAgain?: string;
         
     | 
| 
      
 53 
     | 
    
         
            +
                noCameraAvailable?: string;
         
     | 
| 
      
 54 
     | 
    
         
            +
                checkCameraConnection?: string;
         
     | 
| 
      
 55 
     | 
    
         
            +
                noMaskSunglassesHeaddress?: string;
         
     | 
| 
      
 56 
     | 
    
         
            +
                ambientLighting?: string;
         
     | 
| 
      
 57 
     | 
    
         
            +
                lookStraight?: string;
         
     | 
| 
      
 58 
     | 
    
         
            +
                fitYourFace?: string;
         
     | 
| 
      
 59 
     | 
    
         
            +
                moveCloser?: string;
         
     | 
| 
      
 60 
     | 
    
         
            +
                moveAway?: string;
         
     | 
| 
      
 61 
     | 
    
         
            +
                holdSteady?: string;
         
     | 
| 
      
 62 
     | 
    
         
            +
                turnHead?: string;
         
     | 
| 
      
 63 
     | 
    
         
            +
                processing?: string;
         
     | 
| 
      
 64 
     | 
    
         
            +
                retryButtonText?: string;
         
     | 
| 
      
 65 
     | 
    
         
            +
                followGuidelinesText?: string;
         
     | 
| 
      
 66 
     | 
    
         
            +
                letsTryAgainTitle?: string;
         
     | 
| 
      
 67 
     | 
    
         
            +
                noCameraPermission?: string;
         
     | 
| 
      
 68 
     | 
    
         
            +
                goButton?: string;
         
     | 
| 
      
 69 
     | 
    
         
            +
                centerFaceTurnHead?: string;
         
     | 
| 
      
 70 
     | 
    
         
            +
                centerFace?: string;
         
     | 
| 
      
 71 
     | 
    
         
            +
                selfieTime?: string;
         
     | 
| 
      
 72 
     | 
    
         
            +
                errorCode?: string;
         
     | 
| 
      
 73 
     | 
    
         
            +
                illumination?: string;
         
     | 
| 
      
 74 
     | 
    
         
            +
                cameraLevel?: string;
         
     | 
| 
      
 75 
     | 
    
         
            +
                noAccessories?: string;
         
     | 
| 
      
 76 
     | 
    
         
            +
                getReady?: string;
         
     | 
| 
      
 77 
     | 
    
         
            +
            }
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
            type FaceDictionaries = Partial<Record<Locales, FaceTranslations>>;
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
            type ErrorTypes =
         
     | 
| 
      
 82 
     | 
    
         
            +
                | 'WASM_ERROR'
         
     | 
| 
      
 83 
     | 
    
         
            +
                | 'UNKNOWN_ERROR'
         
     | 
| 
      
 84 
     | 
    
         
            +
                | 'NOT_SUPPORTED'
         
     | 
| 
      
 85 
     | 
    
         
            +
                | 'CAMERA_UNKNOWN_ERROR'
         
     | 
| 
      
 86 
     | 
    
         
            +
                | 'CAMERA_PERMISSION_DENIED'
         
     | 
| 
      
 87 
     | 
    
         
            +
                | 'NO_CAMERA'
         
     | 
| 
      
 88 
     | 
    
         
            +
                | 'INCORRECT_CAMERA_ID'
         
     | 
| 
      
 89 
     | 
    
         
            +
                | 'CONNECTION_ERROR'
         
     | 
| 
      
 90 
     | 
    
         
            +
                | 'LANDSCAPE_MODE_RESTRICTED'
         
     | 
| 
      
 91 
     | 
    
         
            +
                | 'TIMEOUT_ERROR'
         
     | 
| 
      
 92 
     | 
    
         
            +
                | 'CHANGE_CAMERA'
         
     | 
| 
      
 93 
     | 
    
         
            +
                | 'DEVICE_ROTATE'
         
     | 
| 
      
 94 
     | 
    
         
            +
                | 'APP_INACTIVE'
         
     | 
| 
      
 95 
     | 
    
         
            +
                | 'HTTP_NOT_SUPPORTED';
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
            type FaceEventActions =
         
     | 
| 
      
 98 
     | 
    
         
            +
                | 'ELEMENT_VISIBLE'
         
     | 
| 
      
 99 
     | 
    
         
            +
                | 'PRESS_START_BUTTON'
         
     | 
| 
      
 100 
     | 
    
         
            +
                | 'PRESS_RETRY_BUTTON'
         
     | 
| 
      
 101 
     | 
    
         
            +
                | 'CLOSE'
         
     | 
| 
      
 102 
     | 
    
         
            +
                | 'PROCESS_FINISHED'
         
     | 
| 
      
 103 
     | 
    
         
            +
                | 'SERVICE_INITIALIZED'
         
     | 
| 
      
 104 
     | 
    
         
            +
                | 'RETRY_COUNTER_EXCEEDED';
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
            declare enum ResponseCode {
         
     | 
| 
      
 107 
     | 
    
         
            +
                EMPTY = -1,
         
     | 
| 
      
 108 
     | 
    
         
            +
                ERROR = 0,
         
     | 
| 
      
 109 
     | 
    
         
            +
                OK = 1,
         
     | 
| 
      
 110 
     | 
    
         
            +
                TIMEOUT = 2,
         
     | 
| 
      
 111 
     | 
    
         
            +
            }
         
     | 
| 
      
 112 
     | 
    
         
            +
             
     | 
| 
      
 113 
     | 
    
         
            +
            type CustomEventDataType<R> = {
         
     | 
| 
      
 114 
     | 
    
         
            +
                status: ResponseCode;
         
     | 
| 
      
 115 
     | 
    
         
            +
                reason?: ErrorTypes;
         
     | 
| 
      
 116 
     | 
    
         
            +
                response?: R;
         
     | 
| 
      
 117 
     | 
    
         
            +
            };
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
            interface DetailEvent<A, R> {
         
     | 
| 
      
 120 
     | 
    
         
            +
                action: A;
         
     | 
| 
      
 121 
     | 
    
         
            +
                data: CustomEventDataType<R> | null;
         
     | 
| 
      
 122 
     | 
    
         
            +
            }
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
      
 124 
     | 
    
         
            +
            type FaceLivenessResponseType = {
         
     | 
| 
      
 125 
     | 
    
         
            +
                images: Array<string>;
         
     | 
| 
      
 126 
     | 
    
         
            +
                code: number;
         
     | 
| 
      
 127 
     | 
    
         
            +
                metadata: Record<string, any>;
         
     | 
| 
      
 128 
     | 
    
         
            +
                estimatedAge: number | null;
         
     | 
| 
      
 129 
     | 
    
         
            +
                tag: string;
         
     | 
| 
      
 130 
     | 
    
         
            +
                status: number;
         
     | 
| 
      
 131 
     | 
    
         
            +
                transactionId: string;
         
     | 
| 
      
 132 
     | 
    
         
            +
                type: number;
         
     | 
| 
      
 133 
     | 
    
         
            +
            };
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
            type FaceDetectionResponseType = {
         
     | 
| 
      
 136 
     | 
    
         
            +
                capture: Array<string>;
         
     | 
| 
      
 137 
     | 
    
         
            +
            };
         
     | 
| 
       221 
138 
     | 
    
         | 
| 
       222 
139 
     | 
    
         
             
            declare global {
         
     | 
| 
       223 
140 
     | 
    
         
             
                interface HTMLElementEventMap {
         
     | 
| 
         @@ -225,3 +142,105 @@ declare global { 
     | 
|
| 
       225 
142 
     | 
    
         
             
                    'face-capture': CustomEvent<FaceCaptureDetailType>;
         
     | 
| 
       226 
143 
     | 
    
         
             
                }
         
     | 
| 
       227 
144 
     | 
    
         
             
            }
         
     | 
| 
      
 145 
     | 
    
         
            +
             
     | 
| 
      
 146 
     | 
    
         
            +
            export interface IFaceDetection {
         
     | 
| 
      
 147 
     | 
    
         
            +
                locale?: Locales | string;
         
     | 
| 
      
 148 
     | 
    
         
            +
                copyright?: boolean;
         
     | 
| 
      
 149 
     | 
    
         
            +
                'camera-id'?: string;
         
     | 
| 
      
 150 
     | 
    
         
            +
                'change-camera'?: boolean;
         
     | 
| 
      
 151 
     | 
    
         
            +
                'start-screen'?: boolean;
         
     | 
| 
      
 152 
     | 
    
         
            +
                debug?: boolean;
         
     | 
| 
      
 153 
     | 
    
         
            +
                'close-disabled'?: boolean;
         
     | 
| 
      
 154 
     | 
    
         
            +
                'finish-screen'?: boolean;
         
     | 
| 
      
 155 
     | 
    
         
            +
            }
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
      
 157 
     | 
    
         
            +
            export interface IFaceLiveness extends IFaceDetection {
         
     | 
| 
      
 158 
     | 
    
         
            +
                url?: string;
         
     | 
| 
      
 159 
     | 
    
         
            +
                'device-orientation'?: boolean;
         
     | 
| 
      
 160 
     | 
    
         
            +
            }
         
     | 
| 
      
 161 
     | 
    
         
            +
             
     | 
| 
      
 162 
     | 
    
         
            +
            export type ComputedCss = {
         
     | 
| 
      
 163 
     | 
    
         
            +
                fontFamily?: string;
         
     | 
| 
      
 164 
     | 
    
         
            +
                fontSize?: string;
         
     | 
| 
      
 165 
     | 
    
         
            +
                onboardingScreenStartButtonBackground?: string;
         
     | 
| 
      
 166 
     | 
    
         
            +
                onboardingScreenStartButtonBackgroundHover?: string;
         
     | 
| 
      
 167 
     | 
    
         
            +
                onboardingScreenStartButtonTitle?: string;
         
     | 
| 
      
 168 
     | 
    
         
            +
                onboardingScreenStartButtonTitleHover?: string;
         
     | 
| 
      
 169 
     | 
    
         
            +
                onboardingScreenIllumination?: string;
         
     | 
| 
      
 170 
     | 
    
         
            +
                onboardingScreenAccessories?: string;
         
     | 
| 
      
 171 
     | 
    
         
            +
                onboardingScreenCameraLevel?: string;
         
     | 
| 
      
 172 
     | 
    
         
            +
                cameraScreenSectorTarget?: string;
         
     | 
| 
      
 173 
     | 
    
         
            +
                cameraScreenSectorActive?: string;
         
     | 
| 
      
 174 
     | 
    
         
            +
                cameraScreenStrokeNormal?: string;
         
     | 
| 
      
 175 
     | 
    
         
            +
                retryScreenRetryButtonBackground?: string;
         
     | 
| 
      
 176 
     | 
    
         
            +
                retryScreenRetryButtonBackgroundHover?: string;
         
     | 
| 
      
 177 
     | 
    
         
            +
                retryScreenRetryButtonTitle?: string;
         
     | 
| 
      
 178 
     | 
    
         
            +
                retryScreenRetryButtonTitleHover?: string;
         
     | 
| 
      
 179 
     | 
    
         
            +
                processingScreenProgress?: string;
         
     | 
| 
      
 180 
     | 
    
         
            +
                cameraScreenFrontHintLabelBackground?: string;
         
     | 
| 
      
 181 
     | 
    
         
            +
                cameraScreenFrontHintLabelText?: string;
         
     | 
| 
      
 182 
     | 
    
         
            +
                successScreenImage?: string;
         
     | 
| 
      
 183 
     | 
    
         
            +
                retryScreenEnvironmentImage?: string;
         
     | 
| 
      
 184 
     | 
    
         
            +
                retryScreenPersonImage?: string;
         
     | 
| 
      
 185 
     | 
    
         
            +
            };
         
     | 
| 
      
 186 
     | 
    
         
            +
             
     | 
| 
      
 187 
     | 
    
         
            +
            declare enum RecordingProcess {
         
     | 
| 
      
 188 
     | 
    
         
            +
                ASYNCHRONOUS_UPLOAD = 0,
         
     | 
| 
      
 189 
     | 
    
         
            +
                SYNCHRONOUS_UPLOAD = 1,
         
     | 
| 
      
 190 
     | 
    
         
            +
                NOT_UPLOAD = 2,
         
     | 
| 
      
 191 
     | 
    
         
            +
            }
         
     | 
| 
      
 192 
     | 
    
         
            +
             
     | 
| 
      
 193 
     | 
    
         
            +
            declare enum FaceLivenessType {
         
     | 
| 
      
 194 
     | 
    
         
            +
                ACTIVE = 0,
         
     | 
| 
      
 195 
     | 
    
         
            +
                PASSIVE = 1,
         
     | 
| 
      
 196 
     | 
    
         
            +
            }
         
     | 
| 
      
 197 
     | 
    
         
            +
             
     | 
| 
      
 198 
     | 
    
         
            +
            interface FaceDetectionSettings {
         
     | 
| 
      
 199 
     | 
    
         
            +
                url?: string;
         
     | 
| 
      
 200 
     | 
    
         
            +
                debug?: boolean;
         
     | 
| 
      
 201 
     | 
    
         
            +
                locale?: Locales | string;
         
     | 
| 
      
 202 
     | 
    
         
            +
                copyright?: boolean;
         
     | 
| 
      
 203 
     | 
    
         
            +
                cameraId?: string;
         
     | 
| 
      
 204 
     | 
    
         
            +
                changeCamera?: boolean;
         
     | 
| 
      
 205 
     | 
    
         
            +
                closeDisabled?: boolean;
         
     | 
| 
      
 206 
     | 
    
         
            +
                finishScreen?: boolean;
         
     | 
| 
      
 207 
     | 
    
         
            +
                startScreen?: boolean;
         
     | 
| 
      
 208 
     | 
    
         
            +
                customization?: ComputedCss;
         
     | 
| 
      
 209 
     | 
    
         
            +
                nonce?: string;
         
     | 
| 
      
 210 
     | 
    
         
            +
                rotationAngle?: number;
         
     | 
| 
      
 211 
     | 
    
         
            +
                holdStillDuration?: number;
         
     | 
| 
      
 212 
     | 
    
         
            +
                timeoutInterval?: number;
         
     | 
| 
      
 213 
     | 
    
         
            +
            }
         
     | 
| 
      
 214 
     | 
    
         
            +
             
     | 
| 
      
 215 
     | 
    
         
            +
            interface FaceLivenessSettings extends Omit<FaceDetectionSettings, 'holdStillDuration' | 'timeoutInterval'> {
         
     | 
| 
      
 216 
     | 
    
         
            +
                url?: string;
         
     | 
| 
      
 217 
     | 
    
         
            +
                deviceOrientation?: boolean;
         
     | 
| 
      
 218 
     | 
    
         
            +
                videoRecording?: boolean;
         
     | 
| 
      
 219 
     | 
    
         
            +
                tag?: string;
         
     | 
| 
      
 220 
     | 
    
         
            +
                headers?: Record<string, string>;
         
     | 
| 
      
 221 
     | 
    
         
            +
                retryCount?: number;
         
     | 
| 
      
 222 
     | 
    
         
            +
                metadata?: Record<string, any>;
         
     | 
| 
      
 223 
     | 
    
         
            +
                recordingProcess?: RecordingProcess;
         
     | 
| 
      
 224 
     | 
    
         
            +
                livenessType?: FaceLivenessType;
         
     | 
| 
      
 225 
     | 
    
         
            +
            }
         
     | 
| 
      
 226 
     | 
    
         
            +
             
     | 
| 
      
 227 
     | 
    
         
            +
            export type FaceLivenessDetailType = DetailEvent<FaceEventActions, FaceLivenessResponseType>;
         
     | 
| 
      
 228 
     | 
    
         
            +
            export type FaceCaptureDetailType = DetailEvent<FaceEventActions, FaceDetectionResponseType>;
         
     | 
| 
      
 229 
     | 
    
         
            +
             
     | 
| 
      
 230 
     | 
    
         
            +
            export class FullScreenContainer extends HTMLElement {}
         
     | 
| 
      
 231 
     | 
    
         
            +
             
     | 
| 
      
 232 
     | 
    
         
            +
            export class FaceDetectionWebComponent extends HTMLElement {
         
     | 
| 
      
 233 
     | 
    
         
            +
                get version(): string;
         
     | 
| 
      
 234 
     | 
    
         
            +
                set translations(dictionary: FaceDictionaries | null);
         
     | 
| 
      
 235 
     | 
    
         
            +
                get translations(): FaceDictionaries | null;
         
     | 
| 
      
 236 
     | 
    
         
            +
                get settings(): FaceDetectionSettings;
         
     | 
| 
      
 237 
     | 
    
         
            +
                set settings(params: FaceDetectionSettings);
         
     | 
| 
      
 238 
     | 
    
         
            +
            }
         
     | 
| 
      
 239 
     | 
    
         
            +
             
     | 
| 
      
 240 
     | 
    
         
            +
            export class FaceLivenessWebComponent extends HTMLElement {
         
     | 
| 
      
 241 
     | 
    
         
            +
                get version(): string;
         
     | 
| 
      
 242 
     | 
    
         
            +
                set translations(dictionary: FaceDictionaries | null);
         
     | 
| 
      
 243 
     | 
    
         
            +
                get translations(): FaceDictionaries | null;
         
     | 
| 
      
 244 
     | 
    
         
            +
                get settings(): FaceLivenessSettings;
         
     | 
| 
      
 245 
     | 
    
         
            +
                set settings(params: FaceLivenessSettings);
         
     | 
| 
      
 246 
     | 
    
         
            +
            }
         
     | 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@regulaforensics/vp-frontend-face-components",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "6.3. 
     | 
| 
      
 3 
     | 
    
         
            +
              "version": "6.3.1415-rc",
         
     | 
| 
       4 
4 
     | 
    
         
             
              "description": "Regula framework agnostic web components to work with webcamera",
         
     | 
| 
       5 
     | 
    
         
            -
              "types": "./ 
     | 
| 
      
 5 
     | 
    
         
            +
              "types": "./lib/index.d.ts",
         
     | 
| 
       6 
6 
     | 
    
         
             
              "main": "./dist/main.iife.js",
         
     | 
| 
       7 
7 
     | 
    
         
             
              "type": "module",
         
     | 
| 
       8 
8 
     | 
    
         
             
              "files": [
         
     | 
| 
       9 
9 
     | 
    
         
             
                "dist/main.iife.js",
         
     | 
| 
       10 
     | 
    
         
            -
                " 
     | 
| 
      
 10 
     | 
    
         
            +
                "lib"
         
     | 
| 
       11 
11 
     | 
    
         
             
              ],
         
     | 
| 
       12 
12 
     | 
    
         
             
              "author": "Regula Forensics, Inc.",
         
     | 
| 
       13 
13 
     | 
    
         
             
              "license": "MIT",
         
     |