UNPKG

@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.

31 lines (30 loc) 1.41 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /* eslint-disable @angular-eslint/pipe-prefix */ import { Pipe } from '@angular/core'; import * as i0 from "@angular/core"; /** * @hidden */ export class LevelItemsPipe { transform(level, hasChildren) { const result = []; const count = level + 1 - (hasChildren ? 1 : 0); for (let idx = 0; idx < count; idx++) { result.push(idx); } return result; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LevelItemsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: LevelItemsPipe, isStandalone: true, name: "levelItems" }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LevelItemsPipe, decorators: [{ type: Pipe, args: [{ name: 'levelItems', pure: true, standalone: true }] }] });