UNPKG

ng-fusion-ui

Version:

Angular data table library!

48 lines (47 loc) 1.95 kB
import { CdkContextMenuTrigger } from '@angular/cdk/menu'; import * as i0 from "@angular/core"; export interface FuTableCellContextMenuTemplateContext<T extends object> { /** The current value of the cell */ value: unknown; /** The current row object */ row: T; /** Column index in the rendered table */ colIndex: number; /** Row index in the rendered table */ rowIndex: number; /** The context menu trigger */ trigger: CdkContextMenuTrigger; } /** * Defines a custom cell context menu template for a `fu-column`. * * The template context exposes: * - `value` – the current cell value * - `row` – the current row data * - `colIndex` – column index * - `rowIndex` – row index * - `trigger` – the context menu trigger * * ## 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 fuTableCellContextMenu let-row="row" let-colIndex="colIndex"> * {{ row.name }} * </ng-template> * ``` * * If `rowOf` is omitted, `row` will be typed as `any`. */ export declare class FuTableCellContextMenuTemplateDirective<T extends object> { /** * Provides typing context for the row context menu template. * Used only for type inference – not consumed at runtime. */ of: import("@angular/core").InputSignal<T[] | null>; static ngTemplateContextGuard<TContext extends object>(_dir: FuTableCellContextMenuTemplateDirective<TContext>, ctx: unknown): ctx is FuTableCellContextMenuTemplateContext<TContext>; static ɵfac: i0.ɵɵFactoryDeclaration<FuTableCellContextMenuTemplateDirective<any>, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<FuTableCellContextMenuTemplateDirective<any>, "[fuTableCellContextMenu]", never, { "of": { "alias": "rowOf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; }