UNPKG

@linzjs/step-ag-grid

Version:

[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) > Reusable [ag-grid](https://www.ag-grid.com/) component for LINZ / Toitū te whenua.

24 lines (23 loc) 1.6 kB
import { GetQuickFilterTextParams, ICellEditorParams, ICellRendererParams, SuppressKeyboardEventParams, ValueFormatterFunc, ValueFormatterParams } from 'ag-grid-community'; import { ReactElement } from 'react'; import { GenericCellColDef } from './gridRender'; import { ColDefT, GridBaseRow } from './types'; export interface GenericCellEditorProps<E> { multiEdit?: boolean; editor?: (editorProps: E) => ReactElement; editorParams?: E; } export declare const GridCellRenderer: (props: ICellRendererParams) => import("react/jsx-runtime").JSX.Element; export declare const suppressCellKeyboardEvents: (e: SuppressKeyboardEventParams) => any; export declare const generateFilterGetter: <TData extends GridBaseRow, ValueType>(valueFormatter: string | ValueFormatterFunc<TData, ValueType> | undefined) => string | ((params: GetQuickFilterTextParams<TData, ValueType>) => string) | undefined; export declare const defaultValueFormatter: ({ value }: ValueFormatterParams) => string; export declare const GridCell: <TData extends GridBaseRow, TValue = any, Props extends CellEditorCommon = any>(props: GenericCellColDef<TData, TValue>, custom?: { multiEdit?: boolean; preventAutoEdit?: boolean; editor?: (editorProps: Props) => ReactElement; editorParams?: Props; }) => ColDefT<TData, TValue>; export interface CellEditorCommon { className?: string | undefined; } export declare const GenericCellEditorComponentWrapper: (editor?: (props: any) => ReactElement) => import("react").ForwardRefExoticComponent<ICellEditorParams<any, any, any> & import("react").RefAttributes<unknown>>;