@agentman/chat-widget
Version:
Agentman Chat Widget for easy integration with web applications
36 lines (35 loc) • 916 B
TypeScript
/**
* UIUtils - Common UI helper functions used across components
*
* This module contains utility functions for:
* - File type icon mapping
* - File size formatting
* - HTML escaping
* - Other common UI operations
*/
export declare class UIUtils {
/**
* Get attachment icon based on file type
*/
static getAttachmentIcon(fileType: string): string;
/**
* Format file size for display
*/
static formatFileSize(bytes: number): string;
/**
* Escape HTML to prevent XSS
*/
static escapeHtml(text: string): string;
/**
* Get file type from file object
*/
static getFileType(file: File): 'image' | 'document' | 'audio' | 'video' | 'text' | 'data';
/**
* Generate unique ID
*/
static generateId(): string;
/**
* Truncate text with ellipsis
*/
static truncateText(text: string, maxLength: number): string;
}