import { ElementRef, OnInit, ChangeDetectorRef, TemplateRef, EventEmitter } from "@angular/core"; import { FilePickerAdapter, FilePickerComponent, FilePreviewModel, FileValidationTypes, ValidationError } from "ngx-awesome-uploader"; import { ControlBase } from "angular-extensions/controls/base-control"; import { NoUploadFileService } from "./no-upload-file.service"; import { FilePickerComponentDirective } from "./ngx-awesome-uploader.directive"; import * as i0 from "@angular/core"; export declare type ValidationErrorMessageTemplate = { [key in FileValidationTypes]: (control: FileControlComponent) => string; }; export declare class FileControlComponent extends ControlBase implements OnInit { private elementRef; private changeDetectorRef; defaultAdapter: NoUploadFileService; /** * Indicates whether you can upload single or multiple files */ multiple: boolean; /** * Restricts which file extensions are allowed to upload. * Default: any extension * * @example ['pdf', 'jpg', 'jpeg'] */ allowedFileExtensions: string[]; /** * Specifies file extension filter that would be applied during file selection. * Default: show all * * @example ['.pdf', '.jpg', '.jpeg'] */ accept: string[]; /** * Input max file size (in MB) of selected file. Default: no limit */ maxFileSize: number; /** * Total max size (in MB) limit of all files. Default: no limit */ totalFileSize: number; /** * Max count of files in multi-upload. Default: no limit */ maxFilesCount: number; /** * Whether to auto upload file on file choose or not. * Default: false */ autoUpload: boolean; /** * Custom Adapter for uploading/removing files. * Default: {@link NoUploadFileService} */ adapter: FilePickerAdapter; /** * Whether to show default files preview container. * Default: false */ showPreview: boolean; customErrorMessages: Partial; fileValidationError: EventEmitter; contentTemplate: TemplateRef; filePicker: FilePickerComponent; private suppressControlEvents; private validationErrorMessages; constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, defaultAdapter: NoUploadFileService); ngOnInit(): void; getOpenFileDialogHandler(fileUploader: FilePickerComponentDirective): () => void; onValidationError(error: ValidationError): void; onFileAdded(file: FilePreviewModel): void; onFileRemoved(removedFile: FilePreviewModel): void; private suppressControlEventsScope; /** * Patches single select mode by replacing already selected file. */ private singleSelectModePatch; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }