UNPKG

2.64 kBTypeScriptView Raw
1import type { AnimationFrameService, BeanCollection, Component, ComponentEvent } from 'ag-grid-community';
2import { TabGuardComp } from 'ag-grid-community';
3import type { VirtualListModel } from './iVirtualList';
4interface VirtualListParams {
5 cssIdentifier?: string;
6 ariaRole?: string;
7 listName?: string;
8}
9export declare class VirtualList<C extends Component<any> = Component<any>, TEventType extends string = ComponentEvent> extends TabGuardComp<TEventType> {
10 private resizeObserverService;
11 protected animationFrameService: AnimationFrameService;
12 private environment;
13 wireBeans(beans: BeanCollection): void;
14 private readonly cssIdentifier;
15 private readonly ariaRole;
16 private listName?;
17 private model;
18 private renderedRows;
19 private componentCreator;
20 private componentUpdater;
21 private rowHeight;
22 private pageSize;
23 private isScrolling;
24 private lastFocusedRowIndex;
25 private isHeightFromTheme;
26 private readonly eContainer;
27 constructor(params?: VirtualListParams);
28 postConstruct(): void;
29 private onGridStylesChanged;
30 private setAriaProperties;
31 private addResizeObserver;
32 protected focusInnerElement(fromBottom: boolean): void;
33 protected onFocusIn(e: FocusEvent): void;
34 protected onFocusOut(e: FocusEvent): void;
35 protected handleKeyDown(e: KeyboardEvent): void;
36 protected onTabKeyDown(e: KeyboardEvent): void;
37 private navigate;
38 navigateToPage(key: 'Home' | 'PageUp' | 'PageDown' | 'End', fromItem?: number | 'focused'): number | null;
39 getLastFocusedRow(): number | null;
40 focusRow(rowNumber: number): void;
41 getComponentAt(rowIndex: number): C | undefined;
42 forEachRenderedRow(func: (comp: C, idx: number) => void): void;
43 private getItemHeight;
44 /**
45 * Returns true if the view had to be scrolled, otherwise, false.
46 */
47 ensureIndexVisible(index: number, scrollPartialIntoView?: boolean): boolean;
48 setComponentCreator(componentCreator: (value: any, listItemElement: HTMLElement) => C): void;
49 setComponentUpdater(componentUpdater: (value: any, component: C) => void): void;
50 getRowHeight(): number;
51 getScrollTop(): number;
52 setRowHeight(rowHeight: number): void;
53 refresh(softRefresh?: boolean): void;
54 private canSoftRefresh;
55 private clearVirtualRows;
56 protected drawVirtualRows(softRefresh?: boolean): void;
57 private ensureRowsRendered;
58 private insertRow;
59 private removeRow;
60 private refreshRows;
61 private addScrollListener;
62 setModel(model: VirtualListModel): void;
63 getAriaElement(): Element;
64 destroy(): void;
65}
66export {};