import { TemplateRef, QueryList, ElementRef, AfterViewInit, AfterContentInit, OnInit, OnDestroy, DoCheck, EventEmitter } from '@angular/core'; import { IgxRowIslandComponent } from './row-island.component'; import { IgxChildGridRowComponent } from './child-grid-row.component'; import { IgxColumnComponent } from '../columns/column.component'; import { IgxHierarchicalGridBaseDirective } from './hierarchical-grid-base.directive'; import { GridType } from '../common/grid.interface'; export interface HierarchicalStateRecord { rowID: any; } export declare class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective implements GridType, AfterViewInit, AfterContentInit, OnInit, OnDestroy, DoCheck { /** * Sets the value of the `id` attribute. If not provided it will be automatically generated. * ```html * * ``` * @memberof IgxHierarchicalGridComponent */ readonly id: string; /** * An @Input property that lets you fill the `IgxHierarchicalGridComponent` with an array of data. * ```html * * ``` * @memberof IgxHierarchicalGridComponent */ /** * Returns an array of data set to the `IgxHierarchicalGridComponent`. * ```typescript * let filteredData = this.grid.filteredData; * ``` * @memberof IgxHierarchicalGridComponent */ data: any[]; /** * Sets the state of the `IgxHierarchicalGridComponent` containing which rows are expanded. * ```typescript * this.gridState = [{ rowID: 1 }, { rowID: 4}]; * ``` * ```html * * * * * * ``` * * Two-way data binding. * ```html * * * * * * ``` * @memberof IgxHierarchicalGridComponent */ hierarchicalState: any[]; /** *@hidden */ hierarchicalStateChange: EventEmitter; /** * Sets an array of objects containing the filtered data in the `IgxHierarchicalGridComponent`. * ```typescript * this.grid.filteredData = [{ * ID: 1, * Name: "A" * }]; * ``` * @memberof IgxHierarchicalGridComponent */ /** * Returns an array of objects containing the filtered data in the `IgxHierarchicalGridComponent`. * ```typescript * let filteredData = this.grid.filteredData; * ``` * @memberof IgxHierarchicalGridComponent */ filteredData: any; /** * Sets if all immediate children of the `IgxHierarchicalGridComponent` should be expanded/collapsed. * Defult value is false. * ```html * * ``` * @memberof IgxHierarchicalGridComponent */ /** * Gets if all immediate children of the `IgxHierarchicalGridComponent` previously have been set to be expanded/collapsed. * If previously set and some rows have been manually expanded/collapsed it will still return the last set value. * ```typescript * const expanded = this.grid.expandChildren; * ``` * @memberof IgxHierarchicalGridComponent */ expandChildren: boolean; /** * Gets the unique identifier of the parent row. It may be a `string` or `number` if `primaryKey` of the * parent grid is set or an object reference of the parent record otherwise. * ```typescript * const foreignKey = this.grid.foreignKey; * ``` * @memberof IgxHierarchicalGridComponent */ readonly foreignKey: any; /** * @hidden */ childLayoutList: QueryList; /** * @hidden */ allLayoutList: QueryList; protected hierarchicalRecordTemplate: TemplateRef; protected childTemplate: TemplateRef; protected headerHierarchyExpander: ElementRef; /** * @hidden */ templateOutlets: QueryList; /** * @hidden */ hierarchicalRows: QueryList; /** * @hidden */ readonly hasExpandableChildren: boolean; /** * @hidden */ childLayoutKeys: any[]; /** * @hidden */ highlightedRowID: any; /** * @hidden */ updateOnRender: boolean; /** * @hidden */ parent: any; private _hierarchicalState; private _data; private _filteredData; private h_id; private childGridTemplates; private scrollTop; private scrollLeft; /** * @hidden */ ngOnInit(): void; ngDoCheck(): void; /** * @hidden */ ngAfterViewInit(): void; private updateSizes; protected _shouldAutoSize(renderedHeight: any): boolean; readonly outletDirective: import("../../../public_api").IgxOverlayOutletDirective; /** * @hidden */ ngAfterContentInit(): void; /** * @hidden */ onRowIslandChange(): void; protected onColumnsChanged(change: QueryList): void; private updateColumnList; ngOnDestroy(): void; private _clearSeletionHighlights; /** * @hidden */ readonly template: TemplateRef; /** * @hidden * Gets the combined width of the columns that are specific to the enabled grid features. They are fixed. * TODO: Remove for Angular 8. Calling parent class getter using super is not supported for now. */ getFeatureColumnsWidth(): number; private getDefaultExpanderWidth; /** * @hidden */ isRowHighlighted(rowData: any): boolean; /** * @hidden */ isHierarchicalRecord(record: any): boolean; /** * @hidden */ isChildGridRecord(record: any): boolean; /** * @hidden */ trackChanges(index: any, rec: any): any; /** * @hidden */ getContext(rowData: any): any; /** * @hidden */ readonly rootGrid: this; /** * @hidden */ readonly iconTemplate: TemplateRef; /** * @hidden * @internal */ getDragGhostCustomTemplate(): TemplateRef; /** * @hidden */ protected initColumns(collection: QueryList, cb?: Function): void; /** * @hidden * Gets the visible content height that includes header + tbody + footer. * For hierarchical child grid it may be scrolled and not fully visible. */ getVisibleContentHeight(): any; /** * @hidden */ toggleAll(): void; /** * Collapses all rows of the current hierarchical grid. * ```typescript * this.grid.collapseAll(); * ``` * @memberof IgxHierarchicalGridComponent */ collapseAll(): void; /** * Expands all rows of the current hierarchical grid. * ```typescript * this.grid.expandAll(); * ``` * @memberof IgxHierarchicalGridComponent */ expandAll(): void; /** * @hidden */ isExpanded(record: any): boolean; /** * @hidden */ viewCreatedHandler(args: any): void; /** * @hidden */ viewMovedHandler(args: any): void; /** * @hidden */ updateScrollPosition(): void; protected getChildGrids(inDeph?: boolean): any[]; protected generateDataFields(data: any[]): string[]; private hg_verticalScrollHandler; onContainerScroll(): void; private hg_horizontalScrollHandler; }