ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
41 lines (40 loc) • 2.19 kB
TypeScript
import type { NamedBean } from './context/bean';
import { BeanStub } from './context/beanStub';
import type { FakeHScrollComp } from './gridBodyComp/fakeHScrollComp';
import type { FakeVScrollComp } from './gridBodyComp/fakeVScrollComp';
import type { GridBodyCtrl } from './gridBodyComp/gridBodyCtrl';
import type { GridBodyScrollFeature } from './gridBodyComp/gridBodyScrollFeature';
import type { RowContainerCtrl, RowContainerName } from './gridBodyComp/rowContainer/rowContainerCtrl';
import type { GridCtrl } from './gridComp/gridCtrl';
import type { GridHeaderCtrl } from './headerRendering/gridHeaderCtrl';
import type { HeaderRowContainerCtrl } from './headerRendering/rowContainer/headerRowContainerCtrl';
/** A name added to `ROW_CONTAINER_NAMES` must be a container every view layer always renders, React
* included, or readiness never completes and no width is ever pushed. */
type ReadyParams = Record<RowContainerName, RowContainerCtrl> & {
gridCtrl: GridCtrl;
gridBodyCtrl: GridBodyCtrl;
fakeHScrollComp: FakeHScrollComp;
fakeVScrollComp: FakeVScrollComp;
gridHeaderCtrl: GridHeaderCtrl;
headerRowContainerCtrl: HeaderRowContainerCtrl;
};
type CtrlType = keyof ReadyParams;
type BeanDestroyFunc = Pick<BeanStub<any>, 'addDestroyFunc'>;
/** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */
export declare class CtrlsService extends BeanStub<'ready'> implements NamedBean {
beanName: "ctrlsSvc";
private params;
private ready;
private readonly readyCallbacks;
postConstruct(): void;
private updateReady;
whenReady(caller: BeanDestroyFunc, callback: (p: ReadyParams) => void): void;
register<K extends CtrlType, T extends ReadyParams[K]>(ctrlType: K, ctrl: T): void;
/** Undefined until that control registers, which for most of them is after the grid body exists. */
get<K extends CtrlType>(ctrlType: K): ReadyParams[K] | undefined;
/** Asserts a control that is only guaranteed once `ready`. */
getGridBodyCtrl(): GridBodyCtrl;
getHeaderRowContainerCtrl(): HeaderRowContainerCtrl | undefined;
getScrollFeature(): GridBodyScrollFeature;
}
export {};