ng-fad-signed-document-desktop
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

Getting started

Installation

npm install ng-fad-signed-document-desktop

Dependencies

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

Import

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

In this case app.module.ts

import { NgFadSignedDocumentDesktopModule } from 'ng-fad-signed-document-desktop';
.
.
.
... imports: [
       ...,
       BrowserAnimationsModule 
       NgFadSignedDocumentDesktopModule
    ]...

Note: BrowserAnimationsModule is required.

Usage

HTML

Add the selector inside some component and configure the input parameters:

  <ng-fad-signed-document-desktop
    [configuration]="configuration"
    [email]="email"
    [emailLimit]="emailLimit"
    [showAd]="showAd"
    (onsend)="onsend($event)"
    (onerror)="onerror($event)"
    (onclicktemplate)="onclicktemplate()"
    (oneventprocess)="oneventprocess($event)">
  </ng-fad-signed-document-desktop>

Typescript

Listen to the events and execute methods:

  public configuration = {};
  public email = 'email@example.com';
  public emailLimit = 3;
  public showAd = false;
  @ViewChild(NgFadSignedDocumentDesktopComponent) signedDocumentDesktop: NgFadSignedDocumentDesktopComponent;

  onerror(error) {
    alert(JSON.stringify(error));
  }

  onsend(emails: string[]) {
    // Do something
    // if process is correct
    this.signedDocumentDesktop.showSuccess();
    // if process is incorrect
    this.signedDocumentDesktop.showError();
  }

  oneventprocess(process: string) 'SUCCESS_SEND_MAIL' | 'CLOSE_MAILS' | 'OPEN_MAILS') {
    // Do something after onclosebyprocess event
  }

  onclicktemplate() {
    // Do something after onclicktemplate event
  }

Inputs

Name Type Required Default Description
configuration object false {} module data to be configured
email string true undefined signer's email displayed on screen
emailLimit number false 6 limit of emails to resend
showAd boolean fals undefined show notice

Outputs

Name Return Description
onerror object Is called when an error happens
onsend string[] Is called when the user continues the process
onclicktemplate void Is called when the user has interaction the ad
oneventprocess Process Is called when the user has interaction with some elements *

oneventprocess

export enum Process {
  SUCCESS_SEND_MAIL = 'SUCCESS_SEND_MAIL',
  CLOSE_MAILS = 'CLOSE_MAILS',
  OPEN_MAILS = 'OPEN_MAILS'
}

SUCCESS_SEND_MAIL: is sent after the method this.signedDocumentDesktop.showSuccess(); CLOSE_MAILS: is sent when the user remove all emails OPEN_MAILS: is sent whe the user open the screen to send emails

Readme

Keywords

none

Package Sidebar

Install

npm i ng-fad-signed-document-desktop

Weekly Downloads

0

Version

3.0.0

License

none

Unpacked Size

658 kB

Total Files

95

Last publish

Collaborators

  • fad-producto-test
  • psoto-naat
  • fad-producto