import * as i0 from '@angular/core'; import { TemplateRef, AfterContentInit, OnDestroy, OnInit, AfterViewInit, DoCheck, PipeTransform } from '@angular/core'; import { IgxGridBaseDirective } from 'igniteui-angular/grids/grid'; import { IgxGroupByAreaDirective, GridType, IRowDataEventArgs, RowType, CellType, IgxColumnComponent, IgxRowAddTextDirective, IgxRowEditActionsDirective, IgxRowEditTextDirective, IgxRowEditTabStopDirective, IgxRowDirective, IgxGridFooterComponent, IgxAdvancedFilteringDialogComponent, IgxRowExpandedIndicatorDirective, IgxRowCollapsedIndicatorDirective, IgxHeaderExpandedIndicatorDirective, IgxHeaderCollapsedIndicatorDirective, IgxExcelStyleHeaderIconDirective, IgxSortAscendingHeaderIconDirective, IgxSortDescendingHeaderIconDirective, IgxSortHeaderIconDirective, IgxDragIndicatorIconDirective, IgxRowDragGhostDirective, IgxGridStateDirective, IgxGridPinningActionsComponent, IgxGridEditingActionsComponent, IgxGridActionsBaseDirective, IgxGridActionButtonComponent, IgxGridHeaderComponent, IgxGridHeaderGroupComponent, IgxGridHeaderRowComponent, IgxFilterCellTemplateDirective, IgxSummaryTemplateDirective, IgxCellTemplateDirective, IgxCellValidationErrorDirective, IgxCellHeaderTemplateDirective, IgxCellFooterTemplateDirective, IgxCellEditorTemplateDirective, IgxCollapsibleIndicatorTemplateDirective, IgxColumnGroupComponent, IgxColumnLayoutComponent, IgxColumnActionsComponent, IgxColumnHidingDirective, IgxColumnPinningDirective, IgxRowSelectorDirective, IgxGroupByRowSelectorDirective, IgxHeadSelectorDirective, IgxCSVTextDirective, IgxExcelTextDirective, IgxGridToolbarActionsComponent, IgxGridToolbarAdvancedFilteringComponent, IgxGridToolbarComponent, IgxGridToolbarExporterComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarTitleComponent, IgxGridToolbarDirective, IgxGridExcelStyleFilteringComponent, IgxExcelStyleHeaderComponent, IgxExcelStyleSortingComponent, IgxExcelStylePinningComponent, IgxExcelStyleHidingComponent, IgxExcelStyleSelectingComponent, IgxExcelStyleClearFiltersComponent, IgxExcelStyleConditionalFilterComponent, IgxExcelStyleMovingComponent, IgxExcelStyleSearchComponent, IgxExcelStyleColumnOperationsTemplateDirective, IgxExcelStyleFilterOperationsTemplateDirective, IgxExcelStyleLoadingValuesTemplateDirective, IgxColumnRequiredValidatorDirective, IgxColumnMinValidatorDirective, IgxColumnMaxValidatorDirective, IgxColumnEmailValidatorDirective, IgxColumnMinLengthValidatorDirective, IgxColumnMaxLengthValidatorDirective, IgxColumnPatternValidatorDirective } from 'igniteui-angular/grids/core'; import { IGroupingExpression, HierarchicalTransactionService, HierarchicalTransaction, HierarchicalState, IgxHierarchicalTransactionFactory, ITreeGridRecord, TreeGridFilteringStrategy, IGridMergeStrategy, StateUpdateEvent, IgxSorting } from 'igniteui-angular/core'; import { IChipsAreaReorderEventArgs } from 'igniteui-angular/chips'; import { IgxPaginatorComponent, IgxPageNavigationComponent, IgxPageSizeSelectorComponent, IgxPaginatorContentDirective, IgxPaginatorDirective } from 'igniteui-angular/paginator'; /** * @hidden */ declare class IgxRowLoadingIndicatorTemplateDirective { template: TemplateRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * An internal component representing the group-by drop area for the igx-grid component. * * @hidden @internal */ declare class IgxTreeGridGroupByAreaComponent extends IgxGroupByAreaDirective implements AfterContentInit, OnDestroy { private differs; get hideGroupedColumns(): boolean; set hideGroupedColumns(value: boolean); private _hideGroupedColumns; private groupingDiffer; private destroy$; ngAfterContentInit(): void; ngOnDestroy(): void; handleReorder(event: IChipsAreaReorderEventArgs): void; handleMoveEnd(): void; groupBy(expression: IGroupingExpression): void; clearGrouping(name: string): void; protected expressionsChanged(): void; private updateColumnsVisibility; private setColumnsVisibility; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_hideGroupedColumns: unknown; } /** * **Ignite UI for Angular Tree Grid** - * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/grid) * * The Ignite UI Tree Grid displays and manipulates hierarchical data with consistent schema formatted as a table and * provides features such as sorting, filtering, editing, column pinning, paging, column moving and hiding. * * Example: * ```html * * * * * * ``` */ declare class IgxTreeGridComponent extends IgxGridBaseDirective implements GridType, OnInit, AfterViewInit, DoCheck, AfterContentInit { protected _diTransactions: HierarchicalTransactionService; protected transactionFactory: IgxHierarchicalTransactionFactory; /** * Sets the child data key of the `IgxTreeGridComponent`. * ```html * * ``` * * @memberof IgxTreeGridComponent */ childDataKey: string; /** * Sets the foreign key of the `IgxTreeGridComponent`. * ```html * * * ``` * * @memberof IgxTreeGridComponent */ foreignKey: string; /** * Sets the key indicating whether a row has children. * This property is only used for load on demand scenarios. * ```html * * * ``` * * @memberof IgxTreeGridComponent */ hasChildrenKey: string; /** * Sets whether child records should be deleted when their parent gets deleted. * By default it is set to true and deletes all children along with the parent. * ```html * * * ``` * * @memberof IgxTreeGridComponent */ cascadeOnDelete: boolean; /** * Sets a callback for loading child rows on demand. * ```html * * * ``` * ```typescript * public loadChildren = (parentID: any, done: (children: any[]) => void) => { * this.dataService.getData(parentID, children => done(children)); * } * ``` * * @memberof IgxTreeGridComponent */ loadChildrenOnDemand: (parentID: any, done: (children: any[]) => void) => void; /** * @hidden @internal */ role: string; /** * Sets the value of the `id` attribute. If not provided it will be automatically generated. * ```html * * ``` * * @memberof IgxTreeGridComponent */ id: string; /** * @hidden * @internal */ treeGroupArea: IgxTreeGridGroupByAreaComponent; /** * @hidden @internal */ protected recordTemplate: TemplateRef; /** * @hidden @internal */ protected summaryTemplate: TemplateRef; /** * @hidden */ protected rowLoadingTemplate: IgxRowLoadingIndicatorTemplateDirective; /** * @hidden */ flatData: any[] | null; /** * @hidden */ processedExpandedFlatData: any[] | null; /** * Returns an array of the root level `ITreeGridRecord`s. * ```typescript * // gets the root record with index=2 * const states = this.grid.rootRecords[2]; * ``` * * @memberof IgxTreeGridComponent */ rootRecords: ITreeGridRecord[]; /** * Returns a map of all `ITreeGridRecord`s. * ```typescript * // gets the record with primaryKey=2 * const states = this.grid.records.get(2); * ``` * * @memberof IgxTreeGridComponent */ records: Map; /** * Returns an array of processed (filtered and sorted) root `ITreeGridRecord`s. * ```typescript * // gets the processed root record with index=2 * const states = this.grid.processedRootRecords[2]; * ``` * * @memberof IgxTreeGridComponent */ processedRootRecords: ITreeGridRecord[]; /** * Returns a map of all processed (filtered and sorted) `ITreeGridRecord`s. * ```typescript * // gets the processed record with primaryKey=2 * const states = this.grid.processedRecords.get(2); * ``` * * @memberof IgxTreeGridComponent */ processedRecords: Map; /** * @hidden */ loadingRows: Set; protected _filterStrategy: TreeGridFilteringStrategy; protected _transactions: HierarchicalTransactionService; protected _mergeStrategy: IGridMergeStrategy; private _data; private _rowLoadingIndicatorTemplate; private _expansionDepth; /** * Gets/Sets the array of data that populates the component. * ```html * * ``` * * @memberof IgxTreeGridComponent */ get data(): any[] | null; set data(value: any[] | null); /** @hidden @internal */ get type(): GridType["type"]; /** * Get transactions service for the grid. * * @experimental @hidden */ get transactions(): HierarchicalTransactionService; /** * Sets the count of levels to be expanded in the `IgxTreeGridComponent`. By default it is * set to `Infinity` which means all levels would be expanded. * ```html * * ``` * * @memberof IgxTreeGridComponent */ get expansionDepth(): number; set expansionDepth(value: number); /** * Template for the row loading indicator when load on demand is enabled. * ```html * * loop * * * * * ``` * * @memberof IgxTreeGridComponent */ get rowLoadingIndicatorTemplate(): TemplateRef; set rowLoadingIndicatorTemplate(value: TemplateRef); /** * @hidden */ ngOnInit(): void; /** * @hidden */ ngAfterViewInit(): void; /** * @hidden */ ngAfterContentInit(): void; getDefaultExpandState(record: ITreeGridRecord): boolean; /** * Expands all rows. * ```typescript * this.grid.expandAll(); * ``` * * @memberof IgxTreeGridComponent */ expandAll(): void; /** * Collapses all rows. * * ```typescript * this.grid.collapseAll(); * ``` * * @memberof IgxTreeGridComponent */ collapseAll(): void; /** * @hidden */ refreshGridState(args?: IRowDataEventArgs): void; /** * Creates a new `IgxTreeGridRowComponent` with the given data. If a parentRowID is not specified, the newly created * row would be added at the root level. Otherwise, it would be added as a child of the row whose primaryKey matches * the specified parentRowID. If the parentRowID does not exist, an error would be thrown. * ```typescript * const record = { * ID: this.grid.data[this.grid1.data.length - 1].ID + 1, * Name: this.newRecord * }; * this.grid.addRow(record, 1); // Adds a new child row to the row with ID=1. * ``` * * @param data * @param parentRowID * @memberof IgxTreeGridComponent */ addRow(data: any, parentRowID?: any): void; /** * Enters add mode by spawning the UI with the context of the specified row by index. * * @remarks * Accepted values for index are integers from 0 to this.grid.dataView.length * @remarks * When adding the row as a child, the parent row is the specified row. * @remarks * To spawn the UI on top, call the function with index = null or a negative number. * In this case trying to add this row as a child will result in error. * @example * ```typescript * this.grid.beginAddRowByIndex(10); * this.grid.beginAddRowByIndex(10, true); * this.grid.beginAddRowByIndex(null); * ``` * @param index - The index to spawn the UI at. Accepts integers from 0 to this.grid.dataView.length * @param asChild - Whether the record should be added as a child. Only applicable to igxTreeGrid. */ beginAddRowByIndex(index: number, asChild?: boolean): void; /** * @hidden */ getContext(rowData: any, rowIndex: number, pinned?: boolean): any; /** * @hidden * @internal */ getInitialPinnedIndex(rec: any): number; /** * @hidden * @internal */ isRecordPinned(rec: any): boolean; /** * * Returns an array of the current cell selection in the form of `[{ column.field: cell.value }, ...]`. * * @remarks * If `formatters` is enabled, the cell value will be formatted by its respective column formatter (if any). * If `headers` is enabled, it will use the column header (if any) instead of the column field. */ getSelectedData(formatters?: boolean, headers?: boolean): any[]; /** * @hidden @internal */ getEmptyRecordObjectFor(inTreeRow: RowType): { rowID: string | number; data: any; recordRef: { key: any; data: any; children?: ITreeGridRecord[]; parent?: ITreeGridRecord; level?: number; isFilteredOutParent?: boolean; expanded?: boolean; }; }; /** @hidden */ deleteRowById(rowId: any): any; /** * Returns the `IgxTreeGridRow` by index. * * @example * ```typescript * const myRow = treeGrid.getRowByIndex(1); * ``` * @param index */ getRowByIndex(index: number): RowType; /** * Returns the `RowType` object by the specified primary key. * * @example * ```typescript * const myRow = this.treeGrid.getRowByIndex(1); * ``` * @param index */ getRowByKey(key: any): RowType; /** * Returns the collection of all RowType for current page. * * @hidden @internal */ allRows(): RowType[]; /** * Returns the collection of `IgxTreeGridRow`s for current page. * * @hidden @internal */ dataRows(): RowType[]; /** * Returns an array of the selected `IgxGridCell`s. * * @example * ```typescript * const selectedCells = this.grid.selectedCells; * ``` */ get selectedCells(): CellType[]; /** * Returns a `CellType` object that matches the conditions. * * @example * ```typescript * const myCell = this.grid1.getCellByColumn(2, "UnitPrice"); * ``` * @param rowIndex * @param columnField */ getCellByColumn(rowIndex: number, columnField: string): CellType; /** * Returns a `CellType` object that matches the conditions. * * @remarks * Requires that the primaryKey property is set. * @example * ```typescript * grid.getCellByKey(1, 'index'); * ``` * @param rowSelector match any rowID * @param columnField */ getCellByKey(rowSelector: any, columnField: string): CellType; pinRow(rowID: any, index?: number): boolean; unpinRow(rowID: any): boolean; /** @hidden */ generateRowPath(rowId: any): any[]; /** @hidden */ isTreeRow(record: any): boolean; /** @hidden */ getUnpinnedIndexById(id: any): number; /** * @hidden */ createRow(index: number, data?: any): RowType; protected generateDataFields(data: any[]): string[]; protected transactionStatusUpdate(event: StateUpdateEvent): void; protected findRecordIndexInView(rec: any): number; /** * @hidden @internal */ protected getDataBasedBodyHeight(): number; /** * @hidden */ protected scrollTo(row: any | number, column: any | number): void; protected writeToData(rowIndex: number, value: any): void; /** * @hidden */ protected initColumns(collection: IgxColumnComponent[], cb?: (args: any) => void): void; /** * @hidden @internal */ protected getGroupAreaHeight(): number; /** {@link triggerPipes} will re-create pinnedData on CRUD operations */ protected trackPinnedRowData(record: ITreeGridRecord): ITreeGridRecord; /** * @description A recursive way to deselect all selected children of a given record * @param recordID ID of the record whose children to deselect * @hidden * @internal */ private deselectChildren; private addChildRows; private loadChildrenOnRowExpansion; private handleCascadeSelection; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_cascadeOnDelete: unknown; } declare class ITreeGridAggregation { field: string; aggregate: (parent: any, children: any[]) => any; } declare class IgxGroupedTreeGridSorting extends IgxSorting { private static _instance; static instance(): IgxGroupedTreeGridSorting; protected getFieldValue(obj: any, key: string, isDate?: boolean, isTime?: boolean): any; } /** @hidden */ declare class IgxTreeGridGroupingPipe implements PipeTransform { private grid; transform(collection: any[], groupingExpressions: IGroupingExpression[], groupKey: string, childDataKey: string, grid: GridType, aggregations?: ITreeGridAggregation[]): any[]; private flattenGrouping; private groupByMultiple; private groupBy; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare const IGX_TREE_GRID_DIRECTIVES: readonly [typeof IgxTreeGridComponent, typeof IgxTreeGridGroupByAreaComponent, typeof IgxTreeGridGroupingPipe, typeof IgxRowAddTextDirective, typeof IgxRowEditActionsDirective, typeof IgxRowEditTextDirective, typeof IgxRowEditTabStopDirective, typeof IgxRowDirective, typeof IgxGridFooterComponent, typeof IgxAdvancedFilteringDialogComponent, typeof IgxRowExpandedIndicatorDirective, typeof IgxRowCollapsedIndicatorDirective, typeof IgxHeaderExpandedIndicatorDirective, typeof IgxHeaderCollapsedIndicatorDirective, typeof IgxExcelStyleHeaderIconDirective, typeof IgxSortAscendingHeaderIconDirective, typeof IgxSortDescendingHeaderIconDirective, typeof IgxSortHeaderIconDirective, typeof IgxDragIndicatorIconDirective, typeof IgxRowDragGhostDirective, typeof IgxGridStateDirective, typeof IgxGridPinningActionsComponent, typeof IgxGridEditingActionsComponent, typeof IgxGridActionsBaseDirective, typeof IgxGridActionButtonComponent, typeof IgxGridHeaderComponent, typeof IgxGridHeaderGroupComponent, typeof IgxGridHeaderRowComponent, typeof IgxFilterCellTemplateDirective, typeof IgxSummaryTemplateDirective, typeof IgxCellTemplateDirective, typeof IgxCellValidationErrorDirective, typeof IgxCellHeaderTemplateDirective, typeof IgxCellFooterTemplateDirective, typeof IgxCellEditorTemplateDirective, typeof IgxCollapsibleIndicatorTemplateDirective, typeof IgxColumnComponent, typeof IgxColumnGroupComponent, typeof IgxColumnLayoutComponent, typeof IgxColumnActionsComponent, typeof IgxColumnHidingDirective, typeof IgxColumnPinningDirective, typeof IgxRowSelectorDirective, typeof IgxGroupByRowSelectorDirective, typeof IgxHeadSelectorDirective, typeof IgxCSVTextDirective, typeof IgxExcelTextDirective, typeof IgxGridToolbarActionsComponent, typeof IgxGridToolbarAdvancedFilteringComponent, typeof IgxGridToolbarComponent, typeof IgxGridToolbarExporterComponent, typeof IgxGridToolbarHidingComponent, typeof IgxGridToolbarPinningComponent, typeof IgxGridToolbarTitleComponent, typeof IgxGridToolbarDirective, typeof IgxGridExcelStyleFilteringComponent, typeof IgxExcelStyleHeaderComponent, typeof IgxExcelStyleSortingComponent, typeof IgxExcelStylePinningComponent, typeof IgxExcelStyleHidingComponent, typeof IgxExcelStyleSelectingComponent, typeof IgxExcelStyleClearFiltersComponent, typeof IgxExcelStyleConditionalFilterComponent, typeof IgxExcelStyleMovingComponent, typeof IgxExcelStyleSearchComponent, typeof IgxExcelStyleColumnOperationsTemplateDirective, typeof IgxExcelStyleFilterOperationsTemplateDirective, typeof IgxExcelStyleLoadingValuesTemplateDirective, typeof IgxColumnRequiredValidatorDirective, typeof IgxColumnMinValidatorDirective, typeof IgxColumnMaxValidatorDirective, typeof IgxColumnEmailValidatorDirective, typeof IgxColumnMinLengthValidatorDirective, typeof IgxColumnMaxLengthValidatorDirective, typeof IgxColumnPatternValidatorDirective, typeof IgxPaginatorComponent, typeof IgxPageNavigationComponent, typeof IgxPageSizeSelectorComponent, typeof IgxPaginatorContentDirective, typeof IgxPaginatorDirective]; export { IGX_TREE_GRID_DIRECTIVES, ITreeGridAggregation, IgxGroupedTreeGridSorting, IgxTreeGridComponent, IgxTreeGridGroupByAreaComponent, IgxTreeGridGroupingPipe };