company-cafeteria-shared-demo
Version:
Package partagé pour l'écosystème Cafétéria Entreprise
101 lines • 3.01 kB
TypeScript
/**
* Formatage de prix en euros
*/
export declare function formatPrice(price: number, options?: {
showCurrency?: boolean;
decimals?: number;
}): string;
/**
* Formatage de prix avec symbole approprié selon la valeur
*/
export declare function formatPriceCompact(price: number): string;
/**
* Formatage de pourcentage
*/
export declare function formatPercentage(value: number, decimals?: number): string;
/**
* Formatage de date en français
*/
export declare function formatDate(date: string | Date, pattern?: string): string;
/**
* Formatage de date et heure
*/
export declare function formatDateTime(date: string | Date): string;
/**
* Formatage de temps relatif (il y a X minutes)
*/
export declare function formatRelativeTime(date: string | Date): string;
/**
* Formatage de temps relatif avec contexte (aujourd'hui, hier, etc.)
*/
export declare function formatRelativeDate(date: string | Date): string;
/**
* Formatage de durée en minutes/heures
*/
export declare function formatDuration(minutes: number): string;
/**
* Formatage de nom propre (première lettre en majuscule)
*/
export declare function formatProperName(name: string): string;
/**
* Formatage d'email (masquage partiel)
*/
export declare function formatEmailMasked(email: string): string;
/**
* Formatage de numéro de téléphone français
*/
export declare function formatPhoneNumber(phone: string): string;
/**
* Formatage de taille de fichier
*/
export declare function formatFileSize(bytes: number): string;
/**
* Formatage de nombre avec séparateurs de milliers
*/
export declare function formatNumber(num: number, decimals?: number): string;
/**
* Formatage de note (étoiles)
*/
export declare function formatRating(rating: number, maxRating?: number): string;
/**
* Formatage de temps de préparation
*/
export declare function formatPreparationTime(minutes: number): string;
/**
* Formatage d'adresse
*/
export declare function formatAddress(address: {
street?: string;
city?: string;
postalCode?: string;
country?: string;
}): string;
/**
* Formatage de statut avec icône
*/
export declare function formatStatusWithIcon(status: string, icons: Record<string, string>): string;
/**
* Formatage de liste (avec virgules et "et")
*/
export declare function formatList(items: string[], conjunction?: string): string;
/**
* Formatage de distance physique
*/
export declare function formatPhysicalDistance(meters: number): string;
/**
* Formatage de score de confiance IA
*/
export declare function formatConfidence(confidence: number): string;
/**
* Formatage de nutritions (calories, protéines, etc.)
*/
export declare function formatNutritionalValue(value: number, unit: string): string;
/**
* Raccourcit un texte avec des points de suspension
*/
export declare function truncateText(text: string, maxLength: number): string;
/**
* Formate un slug URL
*/
export declare function formatSlug(text: string): string;
//# sourceMappingURL=formatting.d.ts.map