UNPKG

@progress/kendo-angular-grid

Version:

Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.

176 lines (175 loc) 8.88 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { OnInit, EventEmitter, ElementRef, OnDestroy, AfterViewInit, AfterViewChecked, SimpleChange, OnChanges, InjectionToken, QueryList, NgZone, Renderer2, TrackByFunction, ChangeDetectorRef, TemplateRef } from '@angular/core'; import { Observable } from 'rxjs'; import { RowHeightService } from '../scrolling/row-height.service'; import { ScrollerService, Action } from '../scrolling/scroller.service'; import { ScrollRequestService } from '../scrolling/scroll-request.service'; import { ColumnBase } from '../columns/column-base'; import { DetailTemplateDirective } from './details/detail-template.directive'; import { DetailsService } from './details/details.service'; import { ColumnsContainer } from '../columns/columns-container'; import { GroupDescriptor, SortDescriptor } from '@progress/kendo-data-query'; import { GroupableSettings } from '../grouping/group-settings'; import { ChangeNotificationService } from '../data/change-notification.service'; import { NoRecordsTemplateDirective } from './no-records-template.directive'; import { SuspendService } from '../scrolling/suspend.service'; import { GroupsService } from "../grouping/groups.service"; import { RowClassFn, RowStickyFn } from './common/row-class'; import { ScrollSyncService } from "../scrolling/scroll-sync.service"; import { ResizeService } from "../layout/resize.service"; import { ResizeSensorComponent } from "@progress/kendo-angular-common"; import { BrowserSupportService } from "../layout/browser-support.service"; import { SelectableSettings } from '../selection/types'; import { EditService } from '../editing/edit.service'; import { NavigationService } from '../navigation/navigation.service'; import { FilterableSettings } from '../filtering/filterable'; import { ColumnResizingService } from "../column-resizing/column-resizing.service"; import { GridItem } from '../data/grid-item.interface'; import { PDFService } from '../pdf/pdf.service'; import { ColumnInfoService } from '../common/column-info.service'; import { GridSize } from '../common/size-options'; import { ContextService } from '../common/provider.service'; import { DataMappingService } from '../data/data-mapping.service'; import * as i0 from "@angular/core"; /** * @hidden */ export declare const SCROLLER_FACTORY_TOKEN: InjectionToken<string>; /** * @hidden */ export declare function DEFAULT_SCROLLER_FACTORY(observable: Observable<any>, ctx: ContextService): ScrollerService; /** * @hidden */ export declare class ListComponent implements OnInit, OnDestroy, AfterViewInit, AfterViewChecked, OnChanges { private changeNotification; private suspendService; private groupsService; private ngZone; private renderer; private scrollSyncService; private resizeService; private editService; private supportService; private navigationService; private ctx; private columnResizingService; private changeDetector; private pdfService; private columnInfo; private dataMappingService; hostClass: boolean; hostRole: string; data: Array<any>; groups: Array<GroupDescriptor>; total: number; rowHeight: number; detailRowHeight: number; take: number; skip: number; columns: ColumnsContainer; detailTemplate: DetailTemplateDirective; noRecordsTemplate: NoRecordsTemplateDirective; selectable: SelectableSettings | boolean; groupable: GroupableSettings | boolean; filterable: FilterableSettings; rowClass: RowClassFn; rowSticky: RowStickyFn; loading: boolean; trackBy: TrackByFunction<GridItem>; virtualColumns: boolean; isVirtual: boolean; cellLoadingTemplate: TemplateRef<any>; loadingTemplate: TemplateRef<any>; sort: Array<SortDescriptor>; size: GridSize; contentScroll: EventEmitter<any>; pageChange: EventEmitter<Action>; scrollBottom: EventEmitter<void>; columnsStartIdx: number; allItems: any[]; itemsToRender: any[]; get showFooter(): boolean; get totalWidth(): number; container: ElementRef; lockedContainer: ElementRef; lockedTable: ElementRef; table: ElementRef; resizeSensors: QueryList<ResizeSensorComponent>; private scroller; private subscriptions; private scrollerSubscription; private dispatcher; rowHeightService: RowHeightService; private skipScroll; private rebind; private containerScrollTop; private viewportColumns; private columnsEndIdx; private viewportColumnsWidth; private scrollLeft; private virtualPageSize; private observer; get lockedLeafColumns(): QueryList<ColumnBase>; get nonLockedLeafColumns(): QueryList<ColumnBase>; get nonLockedColumnsToRender(): QueryList<ColumnBase>; get leafColumns(): Array<ColumnBase>; get lockedWidth(): number; get nonLockedWidth(): number; get isLocked(): boolean; private rtl; private columnUpdateFrame; private hasLockedContainer; private minRowHeight; private handleSkipOnData; private scrollToIndex; constructor(scrollerFactory: any, detailsService: DetailsService, changeNotification: ChangeNotificationService, suspendService: SuspendService, groupsService: GroupsService, ngZone: NgZone, renderer: Renderer2, scrollSyncService: ScrollSyncService, resizeService: ResizeService, editService: EditService, supportService: BrowserSupportService, navigationService: NavigationService, scrollRequestService: ScrollRequestService, ctx: ContextService, columnResizingService: ColumnResizingService, changeDetector: ChangeDetectorRef, pdfService: PDFService, columnInfo: ColumnInfoService, dataMappingService: DataMappingService); ngOnInit(): void; ngOnChanges(changes: { [propertyName: string]: SimpleChange; }): void; private zoneSub; private get totalIsAllItems(); ngDoCheck(): void; ngAfterViewInit(): void; ngAfterViewChecked(): void; syncRowsHeight(): void; ngOnDestroy(): void; init(): void; lockedScroll(): void; lockedMousewheel(args: any): void; lockedKeydown(args: any): void; updateViewportColumns(range?: any): void; /** * @hidden */ get isStacked(): boolean; resetNavigationViewport(): void; private detailExpand; private attachContainerScroll; private createScroller; private scroll; private onContainerScroll; private handleRowSync; private handleRowNavigationLocked; private scrollToVirtualRow; private scrollTo; private scrollToItem; private cleanupScroller; private initResizeService; private syncContainerHeight; private handleColumnScroll; private updateColumnViewport; private calculateViewportColumns; private viewportWidthChange; private normalizeScrollLeft; private elementScrollLeft; private calcVirtualPageSize; private setScrollerOptions; static ɵfac: i0.ɵɵFactoryDeclaration<ListComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "kendo-grid-list", never, { "data": { "alias": "data"; "required": false; }; "groups": { "alias": "groups"; "required": false; }; "total": { "alias": "total"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "detailRowHeight": { "alias": "detailRowHeight"; "required": false; }; "take": { "alias": "take"; "required": false; }; "skip": { "alias": "skip"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "detailTemplate": { "alias": "detailTemplate"; "required": false; }; "noRecordsTemplate": { "alias": "noRecordsTemplate"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "groupable": { "alias": "groupable"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "rowSticky": { "alias": "rowSticky"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "virtualColumns": { "alias": "virtualColumns"; "required": false; }; "isVirtual": { "alias": "isVirtual"; "required": false; }; "cellLoadingTemplate": { "alias": "cellLoadingTemplate"; "required": false; }; "loadingTemplate": { "alias": "loadingTemplate"; "required": false; }; "sort": { "alias": "sort"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "contentScroll": "contentScroll"; "pageChange": "pageChange"; "scrollBottom": "scrollBottom"; }, never, never, true, never>; }