@progress/kendo-angular-treelist
Version:
Kendo UI TreeList for Angular - Display hierarchical data in an Angular tree grid view that supports sorting, filtering, paging, and much more.
77 lines (76 loc) • 4.13 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Component, HostBinding, Input } from '@angular/core';
import { NgFor } from '@angular/common';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { LogicalCellDirective } from '../navigation/logical-cell.directive';
import { FilterCellComponent } from './cell/filter-cell.component';
import * as i0 from "@angular/core";
import * as i1 from "@progress/kendo-angular-l10n";
/**
* @hidden
*/
export class FilterRowComponent {
columns = [];
filter;
logicalRowIndex;
lockedColumnsCount;
filterRowClass = true;
filterLabel;
constructor(localization) {
this.filterLabel = localization.get('filter');
}
getColumnComponent(column) {
return column;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterRowComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FilterRowComponent, isStandalone: true, selector: "[kendoTreeListFilterRow]", inputs: { columns: "columns", filter: "filter", logicalRowIndex: "logicalRowIndex", lockedColumnsCount: "lockedColumnsCount" }, host: { properties: { "class.k-filter-row": "this.filterRowClass" } }, ngImport: i0, template: `
<td *ngFor="let column of columns; let columnIndex = index" role="gridcell"
[attr.aria-label]="filterLabel"
kendoTreeListFilterCell
[column]="$any(column)"
[filter]="filter"
kendoTreeListLogicalCell
class="k-table-td"
[logicalRowIndex]="logicalRowIndex"
[logicalColIndex]="lockedColumnsCount + columnIndex"
[column]="getColumnComponent(column)"
[colIndex]="columnIndex"
></td>
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: FilterCellComponent, selector: "[kendoTreeListFilterCell]", inputs: ["column", "filter"] }, { kind: "directive", type: LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable", "headerLabelText"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterRowComponent, decorators: [{
type: Component,
args: [{
selector: '[kendoTreeListFilterRow]',
template: `
<td *ngFor="let column of columns; let columnIndex = index" role="gridcell"
[attr.aria-label]="filterLabel"
kendoTreeListFilterCell
[column]="$any(column)"
[filter]="filter"
kendoTreeListLogicalCell
class="k-table-td"
[logicalRowIndex]="logicalRowIndex"
[logicalColIndex]="lockedColumnsCount + columnIndex"
[column]="getColumnComponent(column)"
[colIndex]="columnIndex"
></td>
`,
standalone: true,
imports: [NgFor, FilterCellComponent, LogicalCellDirective]
}]
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { columns: [{
type: Input
}], filter: [{
type: Input
}], logicalRowIndex: [{
type: Input
}], lockedColumnsCount: [{
type: Input
}], filterRowClass: [{
type: HostBinding,
args: ['class.k-filter-row']
}] } });