ag-grid
Version:
Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
83 lines (76 loc) • 4.74 kB
text/typescript
import {Autowired, Bean, Context, Optional, PostConstruct} from "../context/context";
import {ColumnApi} from "../columnController/columnApi";
import {ColumnController} from "../columnController/columnController";
import {GridApi} from "../gridApi";
import {GridOptionsWrapper} from "../gridOptionsWrapper";
import {ExpressionService} from "../valueService/expressionService";
import {RowRenderer} from "./rowRenderer";
import {TemplateService} from "../templateService";
import {ValueService} from "../valueService/valueService";
import {EventService} from "../eventService";
import {ColumnAnimationService} from "./columnAnimationService";
import {IRangeController} from "../interfaces/iRangeController";
import {FocusedCellController} from "../focusedCellController";
import {IContextMenuFactory} from "../interfaces/iContextMenuFactory";
import {CellEditorFactory} from "./cellEditorFactory";
import {CellRendererFactory} from "./cellRendererFactory";
import {PopupService} from "../widgets/popupService";
import {CellRendererService} from "./cellRendererService";
import {ValueFormatterService} from "./valueFormatterService";
import {StylingService} from "../styling/stylingService";
import {ColumnHoverService} from "./columnHoverService";
import {GridPanel} from "../gridPanel/gridPanel";
import {PaginationProxy} from "../rowModels/paginationProxy";
import {AnimationFrameService} from "../misc/animationFrameService";
import {ComponentResolver} from "../components/framework/componentResolver";
import {DragAndDropService} from "../dragAndDrop/dragAndDropService";
import {SortController} from "../sortController";
import {FilterManager} from "../filter/filterManager";
import {HeightScaler} from "./heightScaler";
/** Using the IoC has a slight performance consideration, which is no problem most of the
* time, unless we are trashing objects - which is the case when scrolling and rowComp
* and cellComp. So for performance reasons, RowComp and CellComp do not get autowired
* with the IoC. Instead they get passed this object which is all the beans the RowComp
* and CellComp need. Not autowiring all the cells gives performance improvement. */
export class Beans {
public paginationProxy: PaginationProxy;
public context: Context;
public columnApi: ColumnApi;
public gridApi: GridApi;
public gridOptionsWrapper: GridOptionsWrapper;
public expressionService: ExpressionService;
public rowRenderer: RowRenderer;
public $compile: any;
public templateService: TemplateService;
public valueService: ValueService;
public eventService: EventService;
public columnController: ColumnController;
public columnAnimationService: ColumnAnimationService;
public rangeController: IRangeController;
public focusedCellController: FocusedCellController;
public contextMenuFactory: IContextMenuFactory;
public cellEditorFactory: CellEditorFactory;
public cellRendererFactory: CellRendererFactory;
public popupService: PopupService;
public cellRendererService: CellRendererService;
public valueFormatterService: ValueFormatterService;
public stylingService: StylingService;
public columnHoverService: ColumnHoverService;
public enterprise: boolean;
public componentResolver: ComponentResolver;
public taskQueue: AnimationFrameService;
public dragAndDropService: DragAndDropService;
public sortController: SortController;
public filterManager: FilterManager;
public heightScaler: HeightScaler;
public doingMasterDetail: boolean;
public gridPanel: GridPanel;
public registerGridComp(gridPanel: GridPanel): void {
this.gridPanel = gridPanel;
}
private postConstruct(): void {
this.doingMasterDetail = this.gridOptionsWrapper.isMasterDetail();
}
}