ag-grid-enterprise
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
30 lines (29 loc) • 2.06 kB
TypeScript
import type { AgColumn, BeanCollection, ColAggFunc, ColKey, ColumnEventType, ColumnState, ColumnStateParams, IValueColsService, NamedBean } from 'ag-grid-community';
import { BaseColsService } from '../columns/baseColsService';
export declare class ValueColsSvc extends BaseColsService implements NamedBean, IValueColsService {
beanName: "valueColsSvc";
protected eventName: "columnValueChanged";
private aggFuncSvc?;
wireBeans(beans: BeanCollection): void;
/** Value cols are included from a truthy aggFunc; `undefined` falls back to `initialAggFunc`
* (new cols) or the current flag (existing). Ordering is driven by `valueIndex`/`initialValueIndex`. */
extractCol(col: AgColumn, colIsNew: boolean): void;
/** Seat an included value col: indexed (`valueIndex`, or `initialValueIndex` for new cols) cols are
* sorted by `commitExtract`; the rest keep their prior/col-def order. */
private bucketCol;
protected onColActiveChanged(column: AgColumn, active: boolean): void;
protected writeColActive(col: AgColumn, active: boolean, source: ColumnEventType): boolean;
setColumnAggFunc(key: ColKey | undefined, aggFunc: ColAggFunc, source: ColumnEventType): void;
/** `valueIndex` per active col from the current state-apply pass; consumed by {@link sortByPendingState}.
* Non-null signals a pending re-sort. */
private pendingStateOrder;
syncColState(column: AgColumn, stateItem: ColumnState | null, defaultState: ColumnStateParams | undefined, source: ColumnEventType): void;
/** Re-order active value cols by the `valueIndex` recorded during the last `syncColState` pass; else keep
* insertion order. Runs before `refreshCols` so pivot result columns pick up the new value-col order. */
sortByPendingState(): void;
private readonly compareByStateIndex;
/** Stamps each active col's position as its value-column order (`aggregationActiveIndex`, valid only when active). */
protected onColumnsChanged(): void;
private applyAggFunc;
private writeAggFunc;
}