import { ColGroupDef, GridApi, GridOptions, ICellRendererParams, RowSelectionOptions, ValueSetterParams } from 'ag-grid-enterprise'; import { Component } from 'vue'; import { ColDefExtended } from './createAgGridColDef'; import { ImportFileHandle, ImportProgress } from '@platforma-sdk/model'; interface GridOptionsExtended extends Omit, "columnDefs" | "loadingOverlayComponentParams"> { /** * Array of Column / Column Group definitions. */ columnDefs?: (ColDefExtended | ColGroupDef)[] | null; /** * Show row numbers column */ rowNumbersColumn?: boolean; /** * Loading overlay text */ loadingText?: string; /** * Not ready overlay (Data is not computed). Takes priority over "loading" */ notReady?: boolean; /** * "Data is not computed" by default */ notReadyText?: string; /** * Override standard 'Empty' text for the "no rows" overlay */ noRowsText?: string; /** * @deprecated Use loading, notReady, loadingText instead */ loadingOverlayComponentParams?: never; } declare class Builder { #private; options(options: GridOptionsExtended): this; private get columnDefs(); /** * Set default column definition * @param def - column definition * @returns this */ setDefaultColDef(def: ColDefExtended): this; /** * Show loading overlay * @param loading * @returns this */ setLoading(loading?: boolean): this; /** * Set loading overlay custom text (default is "Loading") * @param loadingText * @returns this */ setLoadingText(loadingText?: string): this; /** * Show "not ready overlay * @param notReady * @returns this */ setNotReady(notReady?: boolean): this; /** * Set "not ready" text * @param notReadyText * @returns this */ setNotReadyText(notReadyText?: string): this; /** * Set "no rows" text when there are no rows (default is "Empty") * @param noRowsText * @returns this */ setNoRowsText(noRowsText?: string): this; /** * Set row selection options * @param rowSelection * @returns this */ setRowSelection(rowSelection?: RowSelectionOptions): this; /** * Set row data * @param rowData * @returns this */ setRowData(rowData?: TData[]): this; /** * Set components * @param components * @returns this */ setComponents(components?: Record): this; /** * Set an option * @param key - option key * @param value - option value * @returns this */ setOption>(key: K, value: GridOptionsExtended[K]): this; /** * Add an extended column definition * @param def - column definition * @returns this */ column(def: ColDefExtended): this; /** * Show row numbers column * @param show - show or hide row numbers column * @returns this */ columnRowNumbers(show?: boolean): this; /** * Add a file input column * @param def - column definition * @param cb - callback to set params for the file input cell renderer * @returns this */ columnFileInput(def: ColDefExtended & { /** * Allowed file extensions (like ['fastq.gz']) */ extensions?: string[]; /** * The resolveProgress function is an optional input parameter for the component * that allows tracking the file upload progress in real-time. * By passing resolveProgress, you can ensure that the component * displays accurate progress values for each file as they upload. * How to use it in AgGrid * cellRendererParams: { * resolveProgress: (cellData) => { * const progresses = app.progresses; * if (!cellData.value.importFileHandle) return undefined; * else return progresses[cellData.value.importFileHandle]; * } * } */ resolveImportProgress?: (cellData: ICellRendererParams) => ImportProgress | undefined; /** * The resolveFileHandle function is an optional input parameter for the component * that allows tracking the file upload progress in real-time. * By passing resolveFileHandle, you can ensure that the component * displays accurate progress values for each file as they upload. * How to use it in AgGrid * cellRendererParams: { * resolveFileHandle: (cellData) => { * return cellData.value.importFileHandle; * } * } */ resolveImportFileHandle?: (cellData: ICellRendererParams) => ImportFileHandle | undefined; setImportFileHandle?: (d: ValueSetterParams) => void; }): this; build(): GridOptionsExtended; } type ColumnFunc = (def: ColDefExtended) => ColDefExtended; /** * Returns a set of Ag Grid options along with a reference to the Ag Grid API. * (This is a fast prototype) * * @example * ```ts * const { gridOptions, gridApi } = useAgGridOptions(() => ({ * // custom grid options here * })); * * // Usage in a template (v-bind is required!) * * ``` */ export declare function useAgGridOptions(factory: (context: { builder: Builder; column: ColumnFunc; }) => Builder | GridOptionsExtended): { gridOptions: import('vue').ComputedRef>; gridApi: import('vue').ShallowRef | undefined, GridApi | undefined>; }; export {}; //# sourceMappingURL=useAgGridOptions.d.ts.map