UNPKG

@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:

70 lines (69 loc) 1.93 kB
import { OnInit } from 'angular-libs'; /**************************************************************************************************/ /** * Shows an QR-Code Scanner Dialog for HTML 5. Should only be used within a modal. * * Usage: * await this.modalService.createModal(QRCodeScannerDialogComponent, {}); * * @class Component QRCodeScannerDialogComponent */ export declare class QRCodeScannerDialogComponent implements OnInit { /***************** variables *****************/ /** * available camera devices */ private availableDevices; /** * check if camera is available */ private hasCameras; /** * qr code scanned result */ private qrResult; /** * formatted result to resolved dialog */ private qrResultString; /** * resolvle function that is applied from modal service */ private resolveDialog; /** * reject function that is applied from modal service */ private rejectDialog; /** * ZXingsScanner instance */ private scanner; /** * active selected device */ private selectedDevice; /***************** initialization *****************/ constructor(); /** * Search for cameras and set the active one for scanning */ ngOnInit(): void; /***************** functions *****************/ /** * show detected camereas in frontend * * @param {<type>} cameras The cameras * @return {<type>} { description_of_the_return_value } */ displayCameras(cameras: MediaDeviceInfo[]): void; /** * resolve the dialog with the qr-code result * * @param {string} resultString qr-code result */ handleQrCodeResult(resultString: string): void; /** * Switch to the next available camera (only can handle two devices) */ switchCamera(): void; }