UNPKG

@progress/kendo-angular-pivotgrid

Version:
45 lines (44 loc) 2.91 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Directive, TemplateRef } from '@angular/core'; import * as i0 from "@angular/core"; /** * Represents the row header cell template of the PivotGrid. Allows customizing the content of the row header cells. * * To define the row header cell template, nest an `<ng-template>` tag with the * `kendoPivotGridRowHeaderCellTemplate` directive inside a `<kendo-pivot-grid>` tag ([see example](slug:templates_pivotgrid#toc-row-header-cell-template)). * * The template context provides the current cell item and the following additional fields: * - `cellItem`&mdash;The current cell item. This is the default template context that you can access with any `let-x` syntax&mdash;for example, `let-cellItem`. * - `columnIndex`&mdash;The current column index. Use `let-columnIndex="columnIndex"` to access this variable in your template. * - `rowIndex`&mdash;The current row index. Use `let-rowIndex="rowIndex"` to access this variable in your template. * - `expanded`&mdash;The expanded state of the cell. Use `let-expanded="expanded"` to access this boolean variable in your template. * - `tableType`&mdash;The table type identifier. Use `let-tableType="tableType"` to access this variable in your template. * - `text`&mdash;The default cell text. Use `let-text="text"` to access this variable in your template. * * @example * ```html * <kendo-pivot-grid [data]="data" ...> * <ng-template kendoPivotGridRowHeaderCellTemplate let-cellItem let-rowIndex="rowIndex" let-column="column"> * Row: {{rowIndex}} * </ng-template> * </kendo-pivot-grid> * ``` */ export class RowHeaderCellTemplateDirective { templateRef; constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RowHeaderCellTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: RowHeaderCellTemplateDirective, isStandalone: true, selector: "[kendoPivotGridRowHeaderCellTemplate]", ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RowHeaderCellTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoPivotGridRowHeaderCellTemplate]', standalone: true }] }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });