@covalent/core
Version:
Core Teradata UI Platform for layouts, icons, custom components and themes. This should be added as a dependency for any project that wants to use layouts, icons and themes for Angular Material.
51 lines (50 loc) • 2.11 kB
TypeScript
import { EventEmitter, ElementRef, Renderer2, OnInit, OnDestroy, NgZone } from '@angular/core';
import * as i0 from "@angular/core";
export declare class TdFileDropBase {
}
export declare class TdFileDropDirective implements OnInit, OnDestroy {
private _renderer;
private _element;
private _ngZone;
private _multiple;
private _dragenterListener?;
private _dragleaveListener?;
private _dragoverListener?;
/**
* multiple?: boolean
* Sets whether multiple files can be dropped at once in host element, or just a single file.
* Can also be 'multiple' native attribute.
*/
set multiple(multiple: boolean | string);
disabled?: boolean | undefined;
/**
* fileDrop?: function
* Event emitted when a file or files are dropped in host element after being validated.
* Emits a [FileList | File] object.
*/
fileDrop: EventEmitter<FileList | File>;
/**
* Binds native 'multiple' attribute if [multiple] property is 'true'.
*/
get multipleBinding(): string | undefined;
/**
* Binds native 'disabled' attribute if [disabled] property is 'true'.
*/
get disabledBinding(): string | undefined;
constructor(_renderer: Renderer2, _element: ElementRef<HTMLElement>, _ngZone: NgZone);
ngOnInit(): void;
ngOnDestroy(): void;
/**
* Listens to 'drop' host event to get validated transfer items.
* Emits the 'fileDrop' event with a [FileList] or [File] depending if 'multiple' attr exists in host.
* Stops event propagation and default action from browser for 'drop' event.
*/
onDrop(event: Event): void;
/**
* Validates if the transfer item types are 'Files'.
*/
private _typeCheck;
private _stopEvent;
static ɵfac: i0.ɵɵFactoryDeclaration<TdFileDropDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TdFileDropDirective, "[tdFileDrop]", never, { "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "fileDrop": "fileDrop"; }, never, never, false, never>;
}