@alfresco/adf-core
Version:
45 lines (44 loc) • 1.59 kB
TypeScript
import { AppExtensionService, ViewerExtensionRef } from '@alfresco/adf-extensions';
import * as i0 from "@angular/core";
export declare class ViewUtilService {
private extensionService;
private extensions;
private mimeTypes;
/**
* Returns a list of the active Viewer content extensions.
*
* @returns list of extension references
*/
get viewerExtensions(): ViewerExtensionRef[];
/**
* Provides a list of file extensions supported by external plugins.
*
* @returns list of extensions
*/
get externalExtensions(): string[];
constructor(extensionService: AppExtensionService);
/**
* get File name from url
*
* @param url - url file
* @returns file name portion of the url
*/
getFilenameFromUrl(url: string): string;
/**
* Get file extension from the string.
* Supports the URL formats like:
* http://localhost/test.jpg?cache=1000
* http://localhost/test.jpg#cache=1000
*
* @param fileName - file name
* @returns file extension
*/
getFileExtension(fileName: string): string;
getViewerType(extension: string, mimeType: string, extensionsSupportedByTemplates?: string[]): string;
getViewerTypeByMimeType(mimeType: string): string;
private getViewerTypeByExtension;
private isExternalViewer;
isCustomViewerExtension(extension: string, extensionsSupportedByTemplates?: string[]): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<ViewUtilService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ViewUtilService>;
}