import { ElementRef, IterableChanges, IterableDiffer, IterableDiffers, OnChanges, OnDestroy, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core'; import { SafeAny } from '@ngx-simple/core/types'; import { SimCellDefDirective, SimColumnDefDirective } from './cell'; export declare class SimCdkCellOutletDirective implements OnDestroy { _viewContainer: ViewContainerRef; constructor(_viewContainer: ViewContainerRef); /** * 如果这是视图中呈现的最后一个出口,则在销毁静态属性之后从该引用中删除,以避免内存泄漏。 * 静态属性,包含该类的最新构造实例。当使用createEmbeddedView创建每个SImHeaderRow和SimRow组件时,由SimTable使用。 * 在创建其中一个组件后,此属性将提供一个句柄来提供该组件的单元格和上下文。init之后,SimCellOutlet将使用提供的上下文构造单元格。 */ static mostRecentCellOutlet: SimCdkCellOutletDirective | null; /** 要在此outlet的视图容器中呈现的单元格的有序列表 */ cells: SimCellDefDirective[]; /** 要提供给每个单元格的数据上下文 */ context: any; ngOnDestroy(): void; } export declare abstract class BaseRowDef implements OnChanges { template: TemplateRef; protected _differs: IterableDiffers; /** 要在该行上显示的列 */ columns: Iterable; /** 用于检查是否对列进行了任何更改 */ protected _columnsDiffer: IterableDiffer; constructor(template: TemplateRef, _differs: IterableDiffers); ngOnChanges(changes: SimpleChanges): void; /** 返回当前列和上一个差异的列之间的差,如果没有差异,则返回null。 */ getColumnsDiff(): IterableChanges | null; extractCellTemplate(column: SimColumnDefDirective): TemplateRef; } export declare class SimHeaderRowDefDirective extends BaseRowDef implements OnChanges { _table?: any; columns: Iterable; sticky: boolean; constructor(template: TemplateRef, _differs: IterableDiffers, _table?: any); ngOnChanges(changes: SimpleChanges): void; } export declare class SimFooterRowDefDirective extends BaseRowDef implements OnChanges { _table?: any; columns: Iterable; sticky: boolean; constructor(template: TemplateRef, _differs: IterableDiffers, _table?: any); ngOnChanges(changes: SimpleChanges): void; } export declare class SimRowDefDirective extends BaseRowDef { _table?: SafeAny; columns: Iterable; when: (index: number, rowData: T) => boolean; constructor(template: TemplateRef, _differs: IterableDiffers, _table?: SafeAny); } export declare class SimRowComponent { private _elementRef; private _renderer; constructor(_elementRef: ElementRef, _renderer: Renderer2); } export declare class SimHeaderRowComponent { private _elementRef; private _renderer; constructor(_elementRef: ElementRef, _renderer: Renderer2); } export declare class SimFooterRowComponent { private _elementRef; private _renderer; constructor(_elementRef: ElementRef, _renderer: Renderer2); } export interface SimCellOutletRowContext { /** Data for the row that this cell is located within. */ $implicit?: T; /** Index of the data object in the provided data array. */ index?: number; /** Length of the number of total rows. */ count?: number; /** True if this cell is contained in the first row. */ first?: boolean; /** True if this cell is contained in the last row. */ last?: boolean; /** True if this cell is contained in a row with an even-numbered index. */ even?: boolean; /** True if this cell is contained in a row with an odd-numbered index. */ odd?: boolean; } export interface SimCellOutletMultiRowContext { /** Data for the row that this cell is located within. */ $implicit?: T; /** Index of the data object in the provided data array. */ dataIndex?: number; /** Index location of the rendered row that this cell is located within. */ renderIndex?: number; /** Length of the number of total rows. */ count?: number; /** True if this cell is contained in the first row. */ first?: boolean; /** True if this cell is contained in the last row. */ last?: boolean; /** True if this cell is contained in a row with an even-numbered index. */ even?: boolean; /** True if this cell is contained in a row with an odd-numbered index. */ odd?: boolean; }