import { AfterViewInit, ElementRef } from '@angular/core'; /** * @description * * Lets a text to be truncated. * * Consider that you have a collumn in a table to display animals name that can * hold up to 10 characters. * * ```html * * ... * {{animal.name}} * ... * * ``` * * For 'Gorilla' is ok, but not for 'Tyrannosaurus rex', the layout will break. * So, using `[gorTruncate]` we can solve that problem truncating at 10th * character and displaying the original text within a tooltip on hover. * * ```html * * ... * {{animal.name}} * ... * * ``` * * By default, the trail will be `...`, but you can customize like above. * * ```html * * ... * {{animal.name}} * ... * * ``` */ export declare class TruncateDirective implements AfterViewInit { private el; /** * The message itself to be truncated. */ message: string; /** * How many columns until truncate the string. */ limitChars: number; /** * The trail to be added to truncated text. */ trail: string; private text; constructor(el: ElementRef); /** * TODO to be verified if is really needed */ ngAfterViewInit(): void; /** * Truncates the text if needed, and set up a tooltip within real text. */ transform(): void; /** * Truncates the text and add trail if needed. */ truncate(text: string, limit: number, trail: string): string; }