UNPKG

ng-fusion-ui

Version:

Angular data table library!

47 lines (46 loc) 1.83 kB
import * as i0 from "@angular/core"; export interface FuColumnCellTemplateContext<T extends object> { /** The current value of the cell */ $implicit: unknown; /** The current row object */ row: T; /** Row index in the rendered table */ index: number; /** Current search term */ searchTerm: string; /** Whether this cell matches the active search match */ activeMatch: boolean; } /** * Defines a custom cell template for a `fu-column`. * * The template context exposes: * - `value` – the current cell value * - `row` – the current row data * - `index` – row index * - `searchTerm` – current search term * - `activeMatch` – whether this cell matches the active search match * * ## Typing * To enable strong typing for `row`, provide the table data using `rowOf`. * This is used only for type inference and does not affect rendering. * * Usage: * ```html * <ng-template fuColumnCell let-value let-row="row" let-index="index"> * {{ value }} * </ng-template> * ``` * * If `rowOf` is omitted, `row` will be typed as `any`. */ export declare class FuColumnCellTemplateDirective<T extends object> { /** * Provides typing context for the column cell template. * Used only for type inference – not consumed at runtime. */ of: import("@angular/core").InputSignal<T[] | null>; static ngTemplateContextGuard<TContext extends object>(_dir: FuColumnCellTemplateDirective<TContext>, ctx: unknown): ctx is FuColumnCellTemplateContext<TContext>; static ɵfac: i0.ɵɵFactoryDeclaration<FuColumnCellTemplateDirective<any>, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<FuColumnCellTemplateDirective<any>, "[fuColumnCell]", never, { "of": { "alias": "rowOf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; }