blob: 793c7f08ef33b31956f1dfba46a8021157a03e20 [file] [log] [blame]
import { EventEmitter, ElementRef, Renderer2, TemplateRef, ViewContainerRef, ChangeDetectorRef } from '@angular/core';
import { TemplatePortalDirective } from '@angular/cdk/portal';
import { ICanDisable, IControlValueAccessor } from '@covalent/core/common';
export declare class TdFileInputLabelDirective extends TemplatePortalDirective {
constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef);
}
export declare class TdFileInputBase {
_changeDetectorRef: ChangeDetectorRef;
constructor(_changeDetectorRef: ChangeDetectorRef);
}
export declare const _TdFileInputMixinBase: (new (...args: any[]) => IControlValueAccessor) & (new (...args: any[]) => ICanDisable) & typeof TdFileInputBase;
export declare class TdFileInputComponent extends _TdFileInputMixinBase implements IControlValueAccessor, ICanDisable {
private _renderer;
private _multiple;
/** The native `<input type="file"> element */
_inputElement: ElementRef;
get inputElement(): HTMLInputElement;
/**
* color?: 'accent' | 'primary' | 'warn'
* Sets button color. Uses same color palette accepted as [MatButton].
*/
color: 'accent' | 'primary' | 'warn';
/**
* multiple?: boolean
* Sets if multiple files can be dropped/selected at once in [TdFileInputComponent].
*/
set multiple(multiple: boolean);
get multiple(): boolean;
/**
* accept?: string
* Sets files accepted when opening the file browser dialog.
* Same as 'accept' attribute in <input/> element.
*/
accept: string;
/**
* select?: function
* Event emitted a file is selected
* Emits a [File | FileList] object.
*/
select: EventEmitter<File | FileList>;
constructor(_renderer: Renderer2, _changeDetectorRef: ChangeDetectorRef);
/**
* Method executed when a file is selected.
*/
handleSelect(files: File | FileList): void;
/**
* Used to clear the selected files from the [TdFileInputComponent].
*/
clear(): void;
/** Method executed when the disabled value changes */
onDisabledChange(v: boolean): void;
/**
* Sets disable to the component. Implemented as part of ControlValueAccessor.
*/
setDisabledState(isDisabled: boolean): void;
}