@evan.network/ui-angular-core
Version:
The angular-core operates as an global and central library for the evan.network Angular 5 frontend development. Using this project you will be able to to the following things:
81 lines (80 loc) • 2.45 kB
TypeScript
import { OnInit, FormBuilder, // @angular/forms
AfterViewInit, ChangeDetectorRef } from 'angular-libs';
import { EvanTranslationService } from '../../services/ui/translate';
import { EvanAlertService } from '../../services/ui/alert';
/**************************************************************************************************/
/**
* Global password component that is used within each Angular DApp. Will be
* registered in the root.ts in each evan.network featured DApp. Unlocks the
* current users profile. Should only be used using the modal service!
*
* Usage within root component:
* await this.bcc.initialize((accountId) => this.bcc.globalPasswordDialog(accountId));
*
* Directly usage:
* password = await this.modalService.createModal(GlobalPasswordComponent, {
* core: this.core,
* bcc: this,
* accountId: accountId
* });
*
* @class Component GlobalPasswordComponent
*/
export declare class GlobalPasswordComponent implements OnInit, AfterViewInit {
private alertService;
private formBuilder;
private ref;
private translate;
/***************** variables *****************/
/**
* resolvle function that is applied from modal service
*/
private resolveDialog;
/**
* reject function that is applied from modal service
*/
private rejectDialog;
/**
* remove function that is applied from modal service
*/
private removeDialog;
/**
* used to hide the background using smooth transitions
*/
private showBackground;
/**
* is the password invald?
*/
private invalidPassword;
/**
* ngModel for password inptu
*/
private password;
/**
* current account id
*/
private accountId;
/**
* will be applied from the modal service
*/
private bcc;
/**
* will be applied from the modal service
*/
private core;
/**
* show loading
*/
private loading;
/**
* password input reference for auto focus
*/
private passwordInput;
/***************** initialization *****************/
constructor(alertService: EvanAlertService, formBuilder: FormBuilder, ref: ChangeDetectorRef, translate: EvanTranslationService);
ngOnInit(): Promise<void>;
/***************** functions *****************/
usePassword(): Promise<void>;
logout(): Promise<void>;
ngAfterViewInit(): void;
}