iCellRenderer.d.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { IComponent } from "../../interfaces/iComponent";
  2. import { RowNode } from "../../entities/rowNode";
  3. import { ColDef } from "../../entities/colDef";
  4. import { Column } from "../../entities/column";
  5. import { GridApi } from "../../gridApi";
  6. import { ColumnApi } from "../../columnController/columnApi";
  7. export interface ICellRendererParams {
  8. value: any;
  9. valueFormatted: any;
  10. getValue: () => any;
  11. setValue: (value: any) => void;
  12. formatValue: (value: any) => any;
  13. data: any;
  14. node: RowNode;
  15. colDef: ColDef;
  16. column: Column;
  17. $scope: any;
  18. rowIndex: number;
  19. api: GridApi;
  20. columnApi: ColumnApi;
  21. context: any;
  22. refreshCell: () => void;
  23. eGridCell: HTMLElement;
  24. eParentOfValue: HTMLElement;
  25. addRenderedRowListener: (eventType: string, listener: Function) => void;
  26. }
  27. export interface ISetFilterCellRendererParams {
  28. value: any;
  29. valueFormatted: any;
  30. api: GridApi;
  31. }
  32. export interface ICellRenderer {
  33. /** Get the cell to refresh. Return true if successful. Return false if not (or you don't have refresh logic),
  34. * then the grid will refresh the cell for you. */
  35. refresh(params: any): boolean;
  36. }
  37. export interface ICellRendererComp extends ICellRenderer, IComponent<ICellRendererParams> {
  38. }
  39. export interface ICellRendererFunc {
  40. (params: any): HTMLElement | string;
  41. }