1 | import { CellClassFunc, CellClassRules, CellClickedEvent, CellContextMenuEvent, CellDoubleClickedEvent, CellEditorSelectorFunc, CellRendererSelectorFunc, CellStyleFunc, CheckboxSelectionCallback, ColDef, ColGroupDef, ColSpanParams, ColumnsMenuParams, DndSourceCallback, EditableCallback, GetQuickFilterTextParams, HeaderCheckboxSelectionCallback, HeaderClass, IAggFunc, ICellEditorComp, ICellRendererComp, ICellRendererFunc, IHeaderGroupComp, IRowDragItem, ITooltipComp, ITooltipParams, NewValueParams, RowDragCallback, RowNode, RowSpanParams, SuppressHeaderKeyboardEventParams, SuppressKeyboardEventParams, SuppressNavigableCallback, SuppressPasteCallback, ToolPanelClass, ValueFormatterFunc, ValueGetterFunc, ValueParserFunc, ValueSetterFunc } from "ag-grid-community";
|
2 | import { QueryList } from "@angular/core";
|
3 | export declare class AgGridColumn {
|
4 | childColumns: QueryList<AgGridColumn>;
|
5 | hasChildColumns(): boolean;
|
6 | toColDef(): ColDef;
|
7 | private getChildColDefs;
|
8 | private createColDefFromGridColumn;
|
9 | /** Columns in this group */
|
10 | children: (ColDef | ColGroupDef)[] | undefined;
|
11 | /** The sort order, provide an array with any of the following in any order ['asc','desc',null] */
|
12 | sortingOrder: (string | null)[] | undefined;
|
13 | /** Agg funcs allowed on this column. If missing, all installed agg funcs are allowed.
|
14 | * Can be eg ['sum','avg']. This will restrict what the GUI allows to select only. */
|
15 | allowedAggFuncs: string[] | undefined;
|
16 | /** The menu tabs to show, and in which order, the valid values for this property are:
|
17 | * filterMenuTab, generalMenuTab, columnsMenuTab * */
|
18 | menuTabs: string[] | undefined;
|
19 | /** Rules for applying css classes */
|
20 | cellClassRules: CellClassRules | undefined;
|
21 | /** Icons for this column. Leave blank to use default. */
|
22 | icons: {
|
23 | [key: string]: Function | string;
|
24 | } | undefined;
|
25 | /** The custom header group component to be used for rendering the component header. If none specified the default AG Grid is used* */
|
26 | headerGroupComponent: string | {
|
27 | new (): IHeaderGroupComp;
|
28 | } | undefined;
|
29 | /** The custom header group component to be used for rendering the component header in the hosting framework (ie: React/Angular). If none specified the default AG Grid is used* */
|
30 | headerGroupComponentFramework: any | undefined;
|
31 | /** The custom header group component to be used for rendering the component header. If none specified the default AG Grid is used* */
|
32 | headerGroupComponentParams: any | undefined;
|
33 | /** An object of css values. Or a function returning an object of css values. */
|
34 | cellStyle: {
|
35 | [cssProperty: string]: string;
|
36 | } | CellStyleFunc | undefined;
|
37 | cellRendererParams: any | undefined;
|
38 | cellEditorFramework: any | undefined;
|
39 | cellEditorParams: any | undefined;
|
40 | /** @deprecated Use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned.
|
41 | */
|
42 | pinnedRowCellRendererFramework: any | undefined;
|
43 | /** @deprecated Use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned.
|
44 | */
|
45 | pinnedRowCellRendererParams: any | undefined;
|
46 | filterFramework: any;
|
47 | filterParams: any;
|
48 | /** The custom header component to be used for rendering the component header. If none specified the default AG Grid is used* */
|
49 | headerComponent: string | {
|
50 | new (): any;
|
51 | } | undefined;
|
52 | /** The custom header component to be used for rendering the component header in the hosting framework (ie: React/Angular). If none specified the default AG Grid is used* */
|
53 | headerComponentFramework: any | undefined;
|
54 | /** The custom header component parameters* */
|
55 | headerComponentParams: any | undefined;
|
56 | floatingFilterComponent: any;
|
57 | floatingFilterComponentParams: any;
|
58 | floatingFilterComponentFramework: any;
|
59 | tooltipComponent: {
|
60 | new (): ITooltipComp;
|
61 | } | string | undefined;
|
62 | tooltipComponentParams: any | undefined;
|
63 | tooltipComponentFramework: any | undefined;
|
64 | refData: {
|
65 | [key: string]: string;
|
66 | } | undefined;
|
67 | /** Params to customise the columns menu behaviour and appearance */
|
68 | columnsMenuParams: ColumnsMenuParams | undefined;
|
69 | /** The name to render in the column header */
|
70 | headerName: string | undefined;
|
71 | /** Whether to show the column when the group is open / closed. */
|
72 | columnGroupShow: string | undefined;
|
73 | /** CSS class for the header */
|
74 | headerClass: HeaderClass | undefined;
|
75 | /** CSS class for the toolPanel */
|
76 | toolPanelClass: ToolPanelClass | undefined;
|
77 | /** Expression or function to get the cells value. */
|
78 | headerValueGetter: string | Function | undefined;
|
79 | /** Group ID */
|
80 | groupId: string | undefined;
|
81 | /** The unique ID to give the column. This is optional. If missing, the ID will default to the field.
|
82 | * If both field and colId are missing, a unique ID will be generated.
|
83 | * This ID is used to identify the column in the API for sorting, filtering etc. */
|
84 | colId: string | undefined;
|
85 | /** If sorting by default, set it here. Set to 'asc' or 'desc' */
|
86 | sort: string | null | undefined;
|
87 | initialSort: string | undefined;
|
88 | /** The field of the row to get the cells data from */
|
89 | field: string | undefined;
|
90 | /** A comma separated string or array of strings containing ColumnType keys which can be used as a template for a column.
|
91 | * This helps to reduce duplication of properties when you have a lot of common column properties. */
|
92 | type: string | string[] | undefined;
|
93 | /** The field where we get the tooltip on the object */
|
94 | tooltipField: string | undefined;
|
95 | /** Tooltip for the column header */
|
96 | headerTooltip: string | undefined;
|
97 | /** Class to use for the cell. Can be string, array of strings, or function. */
|
98 | cellClass: string | string[] | CellClassFunc | undefined;
|
99 | /** Set to true to have the grid place the values for the group into the cell, or put the name of a grouped column to just show that group. */
|
100 | showRowGroup: string | boolean | undefined;
|
101 | filter: any;
|
102 | initialAggFunc: string | IAggFunc | undefined;
|
103 | /** Name of function to use for aggregation. One of [sum,min,max,first,last] or a function. */
|
104 | aggFunc: string | IAggFunc | null | undefined;
|
105 | /** A function for rendering a cell. */
|
106 | cellRenderer: {
|
107 | new (): ICellRendererComp;
|
108 | } | ICellRendererFunc | string | undefined;
|
109 | /** Cell editor */
|
110 | cellEditor: string | {
|
111 | new (): ICellEditorComp;
|
112 | } | undefined;
|
113 | /** Whether this column is pinned or not. */
|
114 | pinned: boolean | string | null | undefined;
|
115 | initialPinned: boolean | string | undefined;
|
116 | /** Defines the column data type used when charting */
|
117 | chartDataType: 'category' | 'series' | 'time' | 'excluded' | undefined;
|
118 | cellEditorPopupPosition: string | undefined;
|
119 | /** @deprecated since v24 - use sortIndex instead
|
120 | */
|
121 | sortedAt: number | undefined;
|
122 | /** If sorting more than one column by default, specifies order in which the sorting should be applied. */
|
123 | sortIndex: number | null | undefined;
|
124 | initialSortIndex: number | undefined;
|
125 | /** Sets the grow factor of a column. It specifies how much of the remaining
|
126 | * space should be assigned to the column. */
|
127 | flex: number | undefined;
|
128 | initialFlex: number | undefined;
|
129 | /** Actual width, in pixels, of the cell */
|
130 | width: number | undefined;
|
131 | /** Default width, in pixels, of the cell */
|
132 | initialWidth: number | undefined;
|
133 | /** Min width, in pixels, of the cell */
|
134 | minWidth: number | undefined;
|
135 | /** Max width, in pixels, of the cell */
|
136 | maxWidth: number | undefined;
|
137 | /** To group by this column by default, either provide an index (eg rowGroupIndex=1), or set rowGroup=true. */
|
138 | rowGroupIndex: number | null | undefined;
|
139 | initialRowGroupIndex: number | undefined;
|
140 | /** To pivot by this column by default, either provide an index (eg pivotIndex=1), or set pivot=true. */
|
141 | pivotIndex: number | null | undefined;
|
142 | initialPivotIndex: number | undefined;
|
143 | /** For native drag and drop, set to true to allow custom onRowDrag processing */
|
144 | dndSourceOnRowDrag: (params: {
|
145 | rowNode: RowNode;
|
146 | dragEvent: DragEvent;
|
147 | }) => void | undefined;
|
148 | /** Expression or function to get the cells value. */
|
149 | valueGetter: string | ValueGetterFunc | undefined;
|
150 | /** If not using a field, then this puts the value into the cell */
|
151 | valueSetter: string | ValueSetterFunc | undefined;
|
152 | /** Expression or function to get the cells value for filtering. */
|
153 | filterValueGetter: string | ValueGetterFunc | undefined;
|
154 | /** Function to return the key for a value - use this if the value is an object (not a primitive type) and you
|
155 | * want to a) group by this field or b) use set filter on this field. */
|
156 | keyCreator: (value: any) => string | undefined;
|
157 | cellRendererFramework: any | undefined;
|
158 | /** @deprecated Use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned.
|
159 | */
|
160 | pinnedRowCellRenderer: {
|
161 | new (): ICellRendererComp;
|
162 | } | ICellRendererFunc | string | undefined;
|
163 | /** A function to format a value, should return a string. Not used for CSV export or copy to clipboard, only for UI cell rendering. */
|
164 | valueFormatter: string | ValueFormatterFunc | undefined;
|
165 | /** @deprecated Use valueFormatter for pinned rows, and check params.node.rowPinned.
|
166 | */
|
167 | pinnedRowValueFormatter: string | ValueFormatterFunc | undefined;
|
168 | /** Gets called after editing, converts the value in the cell. */
|
169 | valueParser: string | ValueParserFunc | undefined;
|
170 | /** Comparator function for custom sorting. */
|
171 | comparator: (valueA: any, valueB: any, nodeA: RowNode, nodeB: RowNode, isInverted: boolean) => number | undefined;
|
172 | /** Comparator for values, used by renderer to know if values have changed. Cells who's values have not changed don't get refreshed. */
|
173 | equals: (valueA: any, valueB: any) => boolean | undefined;
|
174 | /** Comparator for ordering the pivot columns */
|
175 | pivotComparator: (valueA: string, valueB: string) => number | undefined;
|
176 | /** Allows the user to suppress certain keyboard events in the grid cell */
|
177 | suppressKeyboardEvent: (params: SuppressKeyboardEventParams) => boolean | undefined;
|
178 | /** Allows the user to suppress certain keyboard events in the grid header */
|
179 | suppressHeaderKeyboardEvent: (params: SuppressHeaderKeyboardEventParams) => boolean | undefined;
|
180 | colSpan: (params: ColSpanParams) => number | undefined;
|
181 | rowSpan: (params: RowSpanParams) => number | undefined;
|
182 | /** To create the quick filter text for this column, if toString is not good enough on the value. */
|
183 | getQuickFilterText: (params: GetQuickFilterTextParams) => string | undefined;
|
184 | /** Callbacks for editing. See editing section for further details.
|
185 | * Return true if the update was successful, or false if not.
|
186 | * If false, then skips the UI refresh and no events are emitted.
|
187 | * Return false if the values are the same (ie no update). */
|
188 | newValueHandler: (params: NewValueParams) => boolean | undefined;
|
189 | /** Callbacks for editing.See editing section for further details. */
|
190 | onCellValueChanged: (event: NewValueParams) => void | undefined;
|
191 | /** Function callback, gets called when a cell is clicked. */
|
192 | onCellClicked: (event: CellClickedEvent) => void | undefined;
|
193 | /** Function callback, gets called when a cell is double clicked. */
|
194 | onCellDoubleClicked: (event: CellDoubleClickedEvent) => void | undefined;
|
195 | /** Function callback, gets called when a cell is right clicked. */
|
196 | onCellContextMenu: (event: CellContextMenuEvent) => void | undefined;
|
197 | /** To configure the text to be displayed in the floating div while dragging a row when rowDrag is true */
|
198 | rowDragText: (params: IRowDragItem, dragItemCount: number) => string | undefined;
|
199 | /** The function used to calculate the tooltip of the object, tooltipField takes precedence */
|
200 | tooltipValueGetter: (params: ITooltipParams) => string | undefined;
|
201 | cellRendererSelector: CellRendererSelectorFunc | undefined;
|
202 | cellEditorSelector: CellEditorSelectorFunc | undefined;
|
203 | /** Set to true to not flash this column for value changes */
|
204 | suppressCellFlash: boolean | undefined;
|
205 | /** Set to true to not include this column in the Columns Tool Panel */
|
206 | suppressColumnsToolPanel: boolean | undefined;
|
207 | /** Set to true to not include this column / filter in the Filters Tool Panel */
|
208 | suppressFiltersToolPanel: boolean | undefined;
|
209 | /** Open by Default */
|
210 | openByDefault: boolean | undefined;
|
211 | /** If true, group cannot be broken up by column moving, child columns will always appear side by side, however you can rearrange child columns within the group */
|
212 | marryChildren: boolean | undefined;
|
213 | /** Set to true for this column to be hidden. Naturally you might think, it would make more sense to call this field 'visible' and mark it false to hide,
|
214 | * however we want all default values to be false and we want columns to be visible by default. */
|
215 | hide: boolean | undefined;
|
216 | initialHide: boolean | undefined;
|
217 | rowGroup: boolean | undefined;
|
218 | initialRowGroup: boolean | undefined;
|
219 | pivot: boolean | undefined;
|
220 | initialPivot: boolean | undefined;
|
221 | /** Set to true to render a selection checkbox in the column. */
|
222 | checkboxSelection: boolean | CheckboxSelectionCallback | undefined;
|
223 | /** If true, a 'select all' checkbox will be put into the header */
|
224 | headerCheckboxSelection: boolean | HeaderCheckboxSelectionCallback | undefined;
|
225 | /** If true, the header checkbox selection will work on filtered items */
|
226 | headerCheckboxSelectionFilteredOnly: boolean | undefined;
|
227 | /** Set to true if no menu should be shown for this column header. */
|
228 | suppressMenu: boolean | undefined;
|
229 | /** Set to true to not allow moving this column via dragging it's header */
|
230 | suppressMovable: boolean | undefined;
|
231 | /** Set to true to make sure this column is always first. Other columns, if movable, cannot move before this column. */
|
232 | lockPosition: boolean | undefined;
|
233 | /** Set to true to block the user showing / hiding the column, the column can only be shown / hidden via definitions or API */
|
234 | lockVisible: boolean | undefined;
|
235 | /** Set to true to block the user pinning the column, the column can only be pinned via definitions or API */
|
236 | lockPinned: boolean | undefined;
|
237 | /** Set to true if you want the unsorted icon to be shown when no sort is applied to this column. */
|
238 | unSortIcon: boolean | undefined;
|
239 | /** Set to true if you want this columns width to be fixed during 'size to fit' operation. */
|
240 | suppressSizeToFit: boolean | undefined;
|
241 | /** Set to true if you do not want this column to be auto-resizable by double clicking it's edge. */
|
242 | suppressAutoSize: boolean | undefined;
|
243 | /** If true, GUI will allow adding this columns as a row group */
|
244 | enableRowGroup: boolean | undefined;
|
245 | /** If true, GUI will allow adding this columns as a pivot */
|
246 | enablePivot: boolean | undefined;
|
247 | /** If true, GUI will allow adding this columns as a value */
|
248 | enableValue: boolean | undefined;
|
249 | /** Set to true if this col is editable, otherwise false. Can also be a function to have different rows editable. */
|
250 | editable: boolean | EditableCallback | undefined;
|
251 | /** Set to true if this col should not be allowed take new values from the clipboard . */
|
252 | suppressPaste: boolean | SuppressPasteCallback | undefined;
|
253 | /** Set to true if this col should not be navigable with the tab key. Can also be a function to have different rows editable. */
|
254 | suppressNavigable: boolean | SuppressNavigableCallback | undefined;
|
255 | /** If true, grid will flash cell after cell is refreshed */
|
256 | enableCellChangeFlash: boolean | undefined;
|
257 | /** For grid row dragging, set to true to enable row dragging within the grid */
|
258 | rowDrag: boolean | RowDragCallback | undefined;
|
259 | /** For native drag and drop, set to true to enable drag source */
|
260 | dndSource: boolean | DndSourceCallback | undefined;
|
261 | /** True if this column should stretch rows height to fit contents */
|
262 | autoHeight: boolean | undefined;
|
263 | /** True if this column should wrap cell contents - typically used with autoHeight */
|
264 | wrapText: boolean | undefined;
|
265 | /** Set to true if sorting allowed for this column. */
|
266 | sortable: boolean | undefined;
|
267 | /** Set to true if this column should be resizable */
|
268 | resizable: boolean | undefined;
|
269 | /** If true, this cell will be in editing mode after first click. */
|
270 | singleClickEdit: boolean | undefined;
|
271 | /** Whether to display a floating filter for this column. */
|
272 | floatingFilter: boolean | undefined;
|
273 | cellEditorPopup: boolean | undefined;
|
274 | }
|