UNPKG

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

92 lines (91 loc) 3.79 kB
import { EventEmitter, ChangeDetectorRef } from '@angular/core'; import { TdFileInputComponent, TdFileInputLabelDirective } from '../file-input/file-input.component'; import { ControlValueAccessor } from '@angular/forms'; import * as i0 from "@angular/core"; export declare class TdFileUploadBase { _changeDetectorRef: ChangeDetectorRef; constructor(_changeDetectorRef: ChangeDetectorRef); } export declare class TdFileUploadComponent implements ControlValueAccessor { private _changeDetectorRef; private _multiple; private _required; private _disabled; fileInput?: TdFileInputComponent; inputLabel?: TdFileInputLabelDirective; /** * defaultColor?: 'accent' | 'primary' | 'warn' * Sets browse button color. Uses same color palette accepted as [MatButton] and defaults to 'primary'. */ defaultColor: 'accent' | 'primary' | 'warn'; /** * activeColor?: 'accent' | 'primary' | 'warn' * Sets upload button color. Uses same color palette accepted as [MatButton] and defaults to 'accent'. */ activeColor: 'accent' | 'primary' | 'warn'; /** * cancelColor?: 'accent' | 'primary' | 'warn' * Sets cancel button color. Uses same color palette accepted as [MatButton] and defaults to 'warn'. */ cancelColor: 'accent' | 'primary' | 'warn'; /** * multiple?: boolean * Sets if multiple files can be dropped/selected at once in [TdFileUploadComponent]. */ set multiple(multiple: boolean); get multiple(): boolean; /** * required?: boolean * Forces at least one file upload. * Defaults to 'false' */ set required(required: boolean); get required(): boolean; /** * accept?: string * Sets files accepted when opening the file browser dialog. * Same as 'accept' attribute in <input/> element. */ accept?: string; set disabled(disabled: boolean); get disabled(): boolean; value?: unknown | undefined; /** * select?: function * Event emitted when a file is selected. * Emits a [File | FileList] object. */ selectFile: EventEmitter<File | FileList>; /** * upload?: function * Event emitted when upload button is clicked. * Emits a [File | FileList] object. */ upload: EventEmitter<File | FileList | unknown>; /** * cancel?: function * Event emitted when cancel button is clicked. */ cancel: EventEmitter<void>; constructor(_changeDetectorRef: ChangeDetectorRef); writeValue(value: unknown): void; registerOnChange(): void; registerOnTouched(): void; /** * Method executed when upload button is clicked. */ uploadPressed(): void; /** * Method executed when a file is selected. */ handleSelect(value: File | FileList): void; /** * Methods executed when cancel button is clicked. * Clears files. */ _cancel(): void; /** Method executed when the disabled value changes */ onDisabledChange(v: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration<TdFileUploadComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TdFileUploadComponent, "td-file-upload", never, { "defaultColor": { "alias": "defaultColor"; "required": false; }; "activeColor": { "alias": "activeColor"; "required": false; }; "cancelColor": { "alias": "cancelColor"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "required": { "alias": "required"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "selectFile": "selectFile"; "upload": "upload"; "cancel": "cancel"; }, ["inputLabel"], ["*"], false, never>; }