From cd5644e4ae88eeddc591b0942dd7314c1b4feb6f Mon Sep 17 00:00:00 2001 From: natxocc Date: Sun, 5 Apr 2026 23:00:14 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adir=20src/index.d.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.d.ts | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/index.d.ts diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 0000000..377f1df --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1,48 @@ +declare module 'sigpro-grid' { + import { GridApi, GridOptions, ICellRendererParams, IDetailCellRendererParams, ColDef } from 'ag-grid-community'; + + export type RowData = Record; + + export interface GridEvents { + onFilterChanged?: (params: any) => void; + onModelUpdated?: (params: any) => void; + onGridSizeChanged?: (params: any) => void; + onFirstDataRendered?: (params: any) => void; + onRowValueChanged?: (params: any) => void; + onSelectionChanged?: (params: any) => void; + onCellClicked?: (params: any) => void; + onCellDoubleClicked?: (params: any) => void; + onCellValueChanged?: (params: any) => void; + onRowClicked?: (params: any) => void; + onSortChanged?: (params: any) => void; + onContextMenu?: (params: any) => void; + onColumnResized?: (params: any) => void; + onColumnMoved?: (params: any) => void; + onRowDataUpdated?: (params: any) => void; + onCellEditingStarted?: (params: any) => void; + onCellEditingStopped?: (params: any) => void; + onPaginationChanged?: (params: any) => void; + onBodyScroll?: (params: any) => void; + onGridReady?: (params: { api: GridApi; columnApi: any }) => void; + } + + export interface GridProps extends Partial { + data?: RowData[] | (() => RowData[]); + options?: GridOptions | (() => GridOptions); + api?: { current: GridApi | null }; + class?: string; + style?: string; + lang?: string; + } + + export const Grid: (props: GridProps) => HTMLElement; + export function createGridApiRef(): { current: GridApi | null }; + + export type { + GridApi, + GridOptions, + ICellRendererParams, + IDetailCellRendererParams, + ColDef + } from 'ag-grid-community'; +} \ No newline at end of file