@asi-ngtools/lib
Version:
This project is a little components library, simple to use, which will help you to simplify your project.
42 lines (41 loc) • 1.51 kB
TypeScript
import { AsiFileService } from './../../services/asi-file.service';
import { DefaultControlValueAccessor } from './../common/default-control-value-accessor';
import { EventEmitter, AfterViewInit, OnInit, Renderer2, ElementRef } from '@angular/core';
export declare class AsiImageChooserComponent extends DefaultControlValueAccessor implements AfterViewInit, OnInit {
private fileService;
private renderer;
private elementRef;
/** html id */
id: string;
/** html name */
name: string;
/** Label to display (is translated) */
label: string;
/** Label position */
labelPosition: 'top' | 'left' | 'right' | 'bottom' | 'bottom-center' | 'top-center';
/** Init the image chooser with an url */
imageSrc: string;
/** Init the image chooser with a base64 */
image64: string;
/** Icon to display when empty */
icon: string;
/** Event emitted when an image is selected */
onImageSelected: EventEmitter<File>;
fileInput: any;
dragging: boolean;
loaded: boolean;
imageLoaded: boolean;
imageFile: File;
init: boolean;
constructor(fileService: AsiFileService, renderer: Renderer2, elementRef: ElementRef);
ngOnInit(): void;
ngAfterViewInit(): void;
openFileInput(): void;
handleDragEnter(): void;
handleDragLeave(): void;
handleDrop(e: Event): void;
handleImageLoad(): void;
handleInputChange(event: any): void;
_handleReaderLoaded(event: any): void;
writeValue(value: any): void;
}