UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

26 lines 1.14 kB
import { PipeTransform } from '@angular/core'; import { FilesService, GENERIC_FILE_TYPE } from './files.service'; import * as i0 from "@angular/core"; /** * Returns a generic file icon name matching the extension of the given File object. * One of the following icon names may be returned: file-archive-o, file-audio-o, * document-with-code, file, file-excel-o, file-image-o, pdf-2, file-powerpoint-o, * file-text, file-video-o, file-word-o, file, or unknown. * * ```html * <div *ngFor="let file of droppedFiles"> * <i class="icon" [c8yIcon]="file | fileIcon"></i> * </div> * ``` */ export declare class GenericFileIconPipe implements PipeTransform { filesService: FilesService; constructor(filesService: FilesService); transform(file: File): string; getGenericType(file: File): GENERIC_FILE_TYPE | 'unknown'; getIcon(genericType: GENERIC_FILE_TYPE | 'unknown'): string; private matchGenericType; static ɵfac: i0.ɵɵFactoryDeclaration<GenericFileIconPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<GenericFileIconPipe, "fileIcon", true>; } //# sourceMappingURL=generic-file-icon.pipe.d.ts.map