@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.
68 lines (67 loc) • 3.35 kB
TypeScript
import { EventEmitter, ElementRef, Renderer2, TemplateRef, ViewContainerRef, ChangeDetectorRef, OnInit, OnDestroy, NgZone } from '@angular/core';
import { TemplatePortalDirective } from '@angular/cdk/portal';
import { ICanDisable, IControlValueAccessor } from '@covalent/core/common';
import * as i0 from "@angular/core";
export declare class TdFileInputLabelDirective extends TemplatePortalDirective {
constructor(templateRef: TemplateRef<unknown>, viewContainerRef: ViewContainerRef);
static ɵfac: i0.ɵɵFactoryDeclaration<TdFileInputLabelDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TdFileInputLabelDirective, "[tdFileInputLabel]ng-template", never, {}, {}, never, never, false, never>;
}
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 OnInit, OnDestroy, IControlValueAccessor, ICanDisable {
private _ngZone;
private _renderer;
private _multiple;
/** The native `<button class="td-file-input"></button>` element */
_inputButton: ElementRef<HTMLElement>;
/** The native `<input type="file"> element */
_inputElement: ElementRef<HTMLInputElement>;
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 | string);
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.
*/
selectFile: EventEmitter<File | FileList>;
private _destroy$;
constructor(_ngZone: NgZone, _renderer: Renderer2, _changeDetectorRef: ChangeDetectorRef);
ngOnInit(): void;
ngOnDestroy(): void;
/**
* 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;
static ɵfac: i0.ɵɵFactoryDeclaration<TdFileInputComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TdFileInputComponent, "td-file-input", never, { "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "color": { "alias": "color"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; }, { "selectFile": "selectFile"; }, never, ["*"], false, never>;
}