import { EventEmitter, OnChanges, TemplateRef, TrackByFunction, OnDestroy, AfterViewInit, ChangeDetectorRef, ElementRef, SimpleChanges, QueryList } from '@angular/core'; import { SelectionModel } from '@angular/cdk/collections'; import { MatFooterRowDef, MatHeaderRowDef, MatRowDef, MatTable, MatTableDataSource } from '@angular/material/table'; import { MatPaginator, PageEvent } from '@angular/material/paginator'; import { Sort, MatSort, SortDirection } from '@angular/material/sort'; import { ThemePalette } from '@angular/material/core'; import { MtxGridColumn, MtxGridCellTemplate, MtxGridRowSelectionFormatter, MtxGridRowClassFormatter, MtxGridColumnMenu, MtxGridButtonType, MtxGridColumnPinOption } from './grid.interface'; import { MtxGridExpansionToggleDirective } from './expansion-toggle.directive'; import { MtxGridService } from './grid.service'; import * as i0 from "@angular/core"; export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDestroy { private _dataGridSrv; private _changeDetectorRef; table: MatTable; paginator: MatPaginator; sort: MatSort; rowDefs: QueryList>; headerRowDefs: QueryList; footerRowDefs: QueryList; columnMenu: MtxGridColumnMenu; tableContainer: ElementRef; dataSource: MatTableDataSource; /** The grid's displayed columns. */ displayedColumns: string[]; /** The grid's columns. */ columns: MtxGridColumn[]; /** The grid's data. */ data: any[]; /** The total number of the data. */ length: number; /** Whether the grid is loading. */ loading: boolean; /** Tracking function that will be used to check the differences in data changes. */ trackBy: TrackByFunction; /** Whether the column is resizable. */ columnResizable: boolean; /** Placeholder for the empty value (`null`, `''`, `[]`). */ emptyValuePlaceholder: string; /** Whether to paginate the data on front end. */ pageOnFront: boolean; /** Whether to show the paginator. */ showPaginator: boolean; /** Whether the paginator is disabled. */ pageDisabled: boolean; /** Whether to show the first/last buttons UI to the user. */ showFirstLastButtons: boolean; /** The zero-based page index of the displayed list of items. */ pageIndex: number; /** Number of items to display on a page. */ pageSize: number; /** The set of provided page size options to display to the user. */ pageSizeOptions: number[]; /** Whether to hide the page size selection UI from the user. */ hidePageSize: boolean; /** Event emitted when the paginator changes the page size or page index. */ page: EventEmitter; /** The template for the pagination. */ paginationTemplate: TemplateRef; /** Whether to sort the data on front end. */ sortOnFront: boolean; /** The id of the most recently sorted MatSortable. */ sortActive: string; /** The sort direction of the currently active MatSortable. */ sortDirection: SortDirection; /** * Whether to disable the user from clearing the sort by finishing the sort direction cycle. * May be overriden by the column's `disableClear` in `sortProp`. */ sortDisableClear: boolean; /** Whether the sort is disabled. */ sortDisabled: boolean; /** * The direction to set when an MatSortable is initially sorted. * May be overriden by the column's `start` in `sortProp`. */ sortStart: 'asc' | 'desc'; /** Event emitted when the user changes either the active sort or sort direction. */ sortChange: EventEmitter; /** Whether to use the row hover style. */ rowHover: boolean; /** Whether to use the row striped style. */ rowStriped: boolean; /** Event emitted when the user clicks the row. */ rowClick: EventEmitter; expansionRowStates: any[]; /** Whether the row is expandable. */ expandable: boolean; /** The template for the expandable row. */ expansionTemplate: TemplateRef; /** Event emitted when the user toggles the expandable row. */ expansionChange: EventEmitter; rowSelection: SelectionModel; /** Whether to support multiple row/cell selection. */ multiSelectable: boolean; /** Whether the user can select multiple rows with click. */ multiSelectionWithClick: boolean; /** The selected row items. */ rowSelected: any[]; /** Whether the row is selectable. */ rowSelectable: boolean; /** Whether to hide the row selection checkbox. */ hideRowSelectionCheckbox: boolean; /** The formatter to disable the row selection or hide the row's checkbox. */ rowSelectionFormatter: MtxGridRowSelectionFormatter; /** The formatter to set the row's class. */ rowClassFormatter: MtxGridRowClassFormatter; /** Event emitted when the row is selected. */ rowSelectionChange: EventEmitter; cellSelection: any[]; /** Whether the cell is selectable. */ cellSelectable: boolean; /** Event emitted when the cell is selected. */ cellSelectionChange: EventEmitter; private _selectedCell?; /** Whether to show the toolbar. */ showToolbar: boolean; /** The text of the toolbar's title. */ toolbarTitle: string; /** The template for the toolbar. */ toolbarTemplate: TemplateRef; /** Whether the column is hideable. */ columnHideable: boolean; /** Hide or show when the column's checkbox is checked. */ columnHideableChecked: 'show' | 'hide'; /** Whether the column is sortable. */ columnSortable: boolean; /** Whether the column is pinnable. */ columnPinnable: boolean; /** Event emitted when the column is hided or is sorted. */ columnChange: EventEmitter; /** The options for the column pin list. */ columnPinOptions: MtxGridColumnPinOption[]; /** Whether to show the column menu button. */ showColumnMenuButton: boolean; /** The text for the column menu button. */ columnMenuButtonText: string; /** The type for the column menu button. */ columnMenuButtonType: MtxGridButtonType; /** The color for the column menu button. */ columnMenuButtonColor: ThemePalette; /** The class for the column menu button. */ columnMenuButtonClass: string; /** The icon for the column menu button. */ columnMenuButtonIcon: string; /** Whether to show the column-menu's header. */ showColumnMenuHeader: boolean; /** The text for the column-menu's header. */ columnMenuHeaderText: string; /** The template for the column-menu's header. */ columnMenuHeaderTemplate: TemplateRef; /** Whether to show the the column-menu's footer. */ showColumnMenuFooter: boolean; /** The text for the column-menu's footer. */ columnMenuFooterText: string; /** The template for the column-menu's footer. */ columnMenuFooterTemplate: TemplateRef; /** The displayed text for the empty data. */ noResultText: string; /** The template for the empty data. */ noResultTemplate: TemplateRef; get _hasNoResult(): boolean; /** The header's cell template for the grid. */ headerTemplate: TemplateRef | MtxGridCellTemplate | any; /** The header's cell template for the grid exclude sort. */ headerExtraTemplate: TemplateRef | MtxGridCellTemplate | any; /** The cell template for the grid. */ cellTemplate: TemplateRef | MtxGridCellTemplate | any; /** Whether to use custom row template. If true, you should define a matRowDef. */ useContentRowTemplate: boolean; useContentHeaderRowTemplate: boolean; useContentFooterRowTemplate: boolean; /** Whether to show the summary. */ showSummary: boolean; /** The template for the summary. */ summaryTemplate: TemplateRef | MtxGridCellTemplate | any; get _whetherShowSummary(): boolean; /** Whether to show the sidebar. */ showSidebar: boolean; /** The template for the sidebar. */ sidebarTemplate: TemplateRef; /** Whether to show the status bar. */ showStatusbar: boolean; /** The template for the status bar. */ statusbarTemplate: TemplateRef; constructor(_dataGridSrv: MtxGridService, _changeDetectorRef: ChangeDetectorRef); detectChanges(): void; _isTemplateRef(obj: any): boolean; _getColData(data: any[], colDef: MtxGridColumn): any[]; _getRowClassList(rowData: any, index: number): any; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; ngOnDestroy(): void; _countPinnedPosition(): void; _getIndex(index: number, dataIndex: number): number; _onSortChange(sort: Sort): void; /** Expansion change event */ _onExpansionChange(expansionRef: MtxGridExpansionToggleDirective, rowData: any, column: any, index: number): void; /** Cell select event */ _selectCell(cellRef: MtxGridCellSelectionDirective, rowData: any, colDef: any): void; /** Row select event */ _selectRow(event: MouseEvent, rowData: any, index: number): void; /** Whether the number of selected elements matches the total number of rows. */ _isAllSelected(): boolean; /** Select all rows if they are not all selected; otherwise clear selection. */ _toggleMasterCheckbox(): void; /** Select normal row */ _toggleNormalCheckbox(row: any): void; /** Column change event */ _onColumnChange(columns: any[]): void; getDisplayedColumnFields(columns: MtxGridColumn[]): string[]; /** Customize expansion event */ toggleExpansion(index: number): any; /** Scroll to top when turn to the next page. */ _onPage(e: PageEvent): void; scrollTop(value?: number): number | void; scrollLeft(value?: number): number | void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export declare class MtxGridCellSelectionDirective { private _dataGrid; private _selected; private _rowData; ctrlKeyPressed: boolean; shiftKeyPressed: boolean; get selected(): boolean; set mtxSelectableRowData(value: any); cellSelectionChange: EventEmitter; constructor(_dataGrid: MtxGridComponent); onClick(event: MouseEvent): void; select(): void; deselect(): void; toggle(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }