@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
104 lines (103 loc) • 4.64 kB
TypeScript
import { AdaptableAgGrid } from './AdaptableAgGrid';
import { ColumnSetupInfo } from '../AdaptableState/Common/ColumnSetupInfo';
import { ColDef, ColGroupDef, Column } from 'ag-grid-enterprise';
import { AdaptableColumnDataType } from '../AdaptableState/Common/AdaptableColumn';
import { AdaptableVariant } from '../AdaptableInterfaces/IAdaptable';
export declare function getEditorForColumnDataType(columnDataType: AdaptableColumnDataType, variant: AdaptableVariant): ColDef['cellEditor'];
export declare class AgGridColumnAdapter {
private adaptableInstance;
private colDefPropertyCache;
constructor(adaptableInstance: AdaptableAgGrid);
private getVariant;
destroy(): void;
private get adaptableApi();
private get adaptableOptions();
private get agGridApi();
setColDefProperty<T extends keyof ColDef>(col: Column, propertyName: T, propertyGetter: (userPropertyValue: ColDef[T]) => ColDef[T] | undefined): void;
getUserColDefProperty<T extends keyof ColDef>(columnId: string, propertyName: T): ColDef[T] | undefined;
shouldSkipColumn(colId: string): boolean;
getAllAgGridColumns(): Column<any>[];
/**
* Setup all columns, or only those with the given Ids
* @param specificColumnIds - optional list of column Ids to setup. If not provided, all columns are setup
*/
setupColumns(specificColumnIds?: string[]): void;
private setupColumnValueGetter;
private setupColumnCellClass;
private setupColumnHeaderClass;
private quickSearchStyleToDynamicCssVars;
private setupColumnCellStyle;
private setupColumnHeaderStyle;
private setupColumnCellEditor;
private setupColumnCellRenderer;
private setupColumnTooltipValueGetter;
/**
* Resolves a Range Bar bound (number / column id / Col-Min / Col-Max /
* Col-Avg / Col-Median) into a concrete numeric value for the supplied row.
* Mirrors the resolution logic in `RangeBarRenderer.resolveBoundValue` and
* is used by the tooltip path. Returns `undefined` when the bound cannot
* be resolved (e.g. unknown column id or non-numeric source value).
*/
private resolveRangeBarBound;
private setupColumnQuickFilterText;
private setupColumnAllowedAggFuncs;
private setupColumnType;
private setupColumnCellDataType;
setupColumnHeader({ col }: ColumnSetupInfo): void;
private setupColumnFilter;
private setupColumnFloatingFilter;
private setupColumnValueFormatter;
private setupColumnEditable;
private setupColumnValueSetter;
private setupColumnComparator;
private setupColumnGetFindText;
private getCellSearchText;
private isCellSearchable;
private isQuickSearchActive;
private getEditableCellClass;
private getReadonlyCellClass;
private getEditedCellClass;
private getAlertCellClass;
private getFlashingCellClass;
private getNoteCellClassName;
private getCommentCellClassName;
private getFormatColumnCellClass;
private getQuickSearchCellStyle;
private getQuickSearchTextMatchStyle;
private getQuickSearchCurrentTextMatchStyle;
private getReadOnlyCellStyle;
private getEditableCellStyle;
private getEditedCellStyle;
/**
* The combination of styled column and format cells
* This function decides when the two can be merged.
*/
private getFormatColumnAndStyledColumnCellStyle;
/**
* Returns true when the active Styled Column declares a `Font` slot
* (and therefore claims all Font-slice properties on this column).
*
* Note: Badge claims **only** `Alignment` from the Font slice — pill
* typography is owned per-pill via `PillStyle`, never inherited from a
* Format Column. Stripping the whole Font slice when Badge declares
* `Alignment` keeps the precedence rule simple and is fine in practice
* because Format-Column-derived font styles don't apply to flex rows of
* pills anyway.
*/
private styledColumnClaimsFontStyle;
/**
* Returns true when the active Styled Column declares a `Cell` slot
* (and therefore claims all Cell-slice properties on this column).
*/
private styledColumnClaimsCellBoxStyle;
private getFormatColumnHeaderStyle;
private getStyledColumnStyle;
private getFormatColumnCellStyle;
private getFormatColumnAdaptableStyle;
private getAlertCellStyle;
private getFlashingCellStyle;
private getCellHighlightStyle;
private getColumnHighlightStyle;
isColGroupDef(columnDefinition: ColDef | ColGroupDef): columnDefinition is ColGroupDef;
private getRelevantFormatColumnHeaderStyles;
}