4.0.0 • Published 2 years ago

ng-fad-fingerprints v4.0.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Getting started

Installation

npm install ng-fad-fingerprints

Dependencies

Add the folder provided by the technical team within the project assets (images and js)

Configuration project

In angular.json file add identy assets and styles

.
.
"assets": [
    "src/favicon.ico",
    "src/assets",
    {
      "glob": "**/*",
      "input": "node_modules/@identy/identy-finger/dist/assets",
      "output": "./assets/"
    },
    {
      "glob": "**/*",
      "input": "node_modules/@identy/identy-common/dist/assets",
      "output": "./assets/"
    }
],
"styles": [
    "node_modules/@identy/identy-finger/dist/identy-finger-style.css",
    "node_modules/ng-fad-fingerprints/assets/fad-fingerprints.scss"
],
.
.

In tsconfig.json or add

{ ... "skipLibCheck": true, ... }

Import

In the file necessary example.module.ts import the module.

In this case app.module.ts

import { NgFadFingerprintsModule } from 'ng-fad-fingerprints';
.
.
.
... imports: [
       ...,
       BrowserAnimationsModule 
       NgFadFingerprintsModule
    ]...

Note: BrowserAnimationsModule is required.

Usage

HTML

Add the selector inside some component

<ng-fad-fingerprints 
    [modelURL]="modelURL"
    [detectionModes]="detectionModes"
    [captureTimeout]="captureTimeout"
    [allowClose]="allowClose"
    (onerror)="onerror($event)" 
    (ondata)="ondata($event)"
    (onclose)="onclose()">
</ng-fad-fingerprints>

Typescript

import { FingerDetectionMode, NgFadFingerprintsComponent, ResponseIdentyFinger } from 'ng-fad-fingerprints';
.
.
.

modelURL: string = 'yor_model_url';
captureTimeout = 30000;
detectionModes: FingerDetectionMode[] = [L4F];
delay = 5000;
allowClose = true;

onerror(error: ResponseError) {
  // manage error
}

ondata(event: ResponseIdentyFinger) {
   // capture result
}

onclose() {
  // manage close capture
}

Inputs

NameTypeRequiredDefaultDescription
modelURLstringtrueundefinedServer url
detectionModesFingerDetectionMode[]trueundefinedHand (right or left) and fingers (4F or thumb) to capture
captureTimeoutnumberfalse30000Set capture timeout
delaynumberfalse5000Set init delay
allowClosebooleanfalsefalseButton that allows you to close the capture
FingerDetectionMode Type
L4F
R4F
RIGHT_INDEX
RIGHT_MIDDLE
RIGHT_RING
RIGHT_LITTLE
LEFT_INDEX
LEFT_MIDDLE
LEFT_RING
LEFT_LITTLE
RIGHT_THUMB
LEFT_THUMB

Outputs

NameReturnDescription
ondataResponseIdentyFingerIs called when capture completes successfully
onerrorobjectIs called when an error happens
onclosevoidIs called when user close component
4.0.0

2 years ago

3.3.0

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.1.5

2 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago