forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ag-grid.d.ts
1991 lines (1991 loc) · 77.5 KB
/
ag-grid.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Type definitions for ag-grid v2.1.2
// Project: http://www.ag-grid.com/
// Definitions by: Niall Crosby <https://github.com/ceolter/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module ag.grid {
class ColumnChangeEvent {
private type;
private column;
private columnGroup;
private fromIndex;
private toIndex;
private pinnedColumnCount;
constructor(type: string);
toString(): string;
withColumn(column: Column): ColumnChangeEvent;
withColumnGroup(columnGroup: ColumnGroup): ColumnChangeEvent;
withFromIndex(fromIndex: number): ColumnChangeEvent;
withPinnedColumnCount(pinnedColumnCount: number): ColumnChangeEvent;
withToIndex(toIndex: number): ColumnChangeEvent;
getFromIndex(): number;
getToIndex(): number;
getPinnedColumnCount(): number;
getType(): string;
getColumn(): Column;
getColumnGroup(): ColumnGroup;
isPivotChanged(): boolean;
isValueChanged(): boolean;
isIndividualColumnResized(): boolean;
}
}
declare module ag.grid {
class Utils {
private static isSafari;
private static isIE;
static iterateObject(object: any, callback: (key: string, value: any) => void): void;
static cloneObject(object: any): any;
static map<TItem, TResult>(array: TItem[], callback: (item: TItem) => TResult): TResult[];
static forEach<T>(array: T[], callback: (item: T, index: number) => void): void;
static filter<T>(array: T[], callback: (item: T) => boolean): T[];
static assign(object: any, source: any): void;
static getFunctionParameters(func: any): any;
static find(collection: any, predicate: any, value: any): any;
static toStrings<T>(array: T[]): string[];
static iterateArray<T>(array: T[], callback: (item: T, index: number) => void): void;
static isNode(o: any): boolean;
static isElement(o: any): boolean;
static isNodeOrElement(o: any): boolean;
static addChangeListener(element: HTMLElement, listener: EventListener): void;
static makeNull(value: any): any;
static removeAllChildren(node: HTMLElement): void;
static removeElement(parent: HTMLElement, cssSelector: string): void;
static removeFromParent(node: Element): void;
static isVisible(element: HTMLElement): boolean;
/**
* loads the template and returns it as an element. makes up for no simple way in
* the dom api to load html directly, eg we cannot do this: document.createElement(template)
*/
static loadTemplate(template: string): Node;
static querySelectorAll_addCssClass(eParent: any, selector: string, cssClass: string): void;
static querySelectorAll_removeCssClass(eParent: any, selector: string, cssClass: string): void;
static querySelectorAll_replaceCssClass(eParent: any, selector: string, cssClassToRemove: string, cssClassToAdd: string): void;
static addOrRemoveCssClass(element: HTMLElement, className: string, addOrRemove: boolean): void;
static addCssClass(element: HTMLElement, className: string): void;
static offsetHeight(element: HTMLElement): number;
static offsetWidth(element: HTMLElement): number;
static removeCssClass(element: HTMLElement, className: string): void;
static removeFromArray<T>(array: T[], object: T): void;
static defaultComparator(valueA: any, valueB: any): number;
static formatWidth(width: number | string): string;
/**
* Tries to use the provided renderer.
*/
static useRenderer<TParams>(eParent: Element, eRenderer: (params: TParams) => Node | string, params: TParams): void;
/**
* If icon provided, use this (either a string, or a function callback).
* if not, then use the second parameter, which is the svgFactory function
*/
static createIcon(iconName: any, gridOptionsWrapper: any, colDefWrapper: any, svgFactoryFunc: () => Node): HTMLSpanElement;
static addStylesToElement(eElement: any, styles: any): void;
static getScrollbarWidth(): number;
static isKeyPressed(event: KeyboardEvent, keyToCheck: number): boolean;
static setVisible(element: HTMLElement, visible: boolean): void;
static isBrowserIE(): boolean;
static isBrowserSafari(): boolean;
}
}
declare module ag.grid {
class Constants {
static STEP_EVERYTHING: number;
static STEP_FILTER: number;
static STEP_SORT: number;
static STEP_MAP: number;
static ASC: string;
static DESC: string;
static ROW_BUFFER_SIZE: number;
static MIN_COL_WIDTH: number;
static SUM: string;
static MIN: string;
static MAX: string;
static KEY_TAB: number;
static KEY_ENTER: number;
static KEY_BACKSPACE: number;
static KEY_DELETE: number;
static KEY_ESCAPE: number;
static KEY_SPACE: number;
static KEY_DOWN: number;
static KEY_UP: number;
static KEY_LEFT: number;
static KEY_RIGHT: number;
}
}
declare module ag.grid {
class Column {
static colIdSequence: number;
colDef: ColDef;
actualWidth: any;
visible: any;
colId: any;
pinned: boolean;
index: number;
aggFunc: string;
pivotIndex: number;
sort: string;
sortedAt: number;
constructor(colDef: ColDef, actualWidth: any);
isGreaterThanMax(width: number): boolean;
getMinimumWidth(): number;
setMinimum(): void;
}
}
declare module ag.grid {
class ColumnGroup {
pinned: any;
name: any;
allColumns: Column[];
displayedColumns: Column[];
expandable: boolean;
expanded: boolean;
actualWidth: number;
constructor(pinned: any, name: any);
getMinimumWidth(): number;
addColumn(column: any): void;
calculateExpandable(): void;
calculateActualWidth(): void;
calculateDisplayedColumns(): void;
addToVisibleColumns(colsToAdd: any): void;
}
}
declare module ag.grid {
class GridOptionsWrapper {
private gridOptions;
private groupHeaders;
private headerHeight;
private rowHeight;
private floatingTopRowData;
private floatingBottomRowData;
init(gridOptions: GridOptions, eventService: EventService): void;
isRowSelection(): boolean;
isRowDeselection(): boolean;
isRowSelectionMulti(): boolean;
getContext(): any;
isVirtualPaging(): boolean;
isShowToolPanel(): boolean;
isToolPanelSuppressPivot(): boolean;
isToolPanelSuppressValues(): boolean;
isRowsAlreadyGrouped(): boolean;
isGroupSelectsChildren(): boolean;
isGroupHidePivotColumns(): boolean;
isGroupIncludeFooter(): boolean;
isGroupSuppressBlankHeader(): boolean;
isSuppressRowClickSelection(): boolean;
isSuppressCellSelection(): boolean;
isSuppressMultiSort(): boolean;
isGroupSuppressAutoColumn(): boolean;
isForPrint(): boolean;
isSuppressHorizontalScroll(): boolean;
isUnSortIcon(): boolean;
isSuppressMenuHide(): boolean;
getRowStyle(): any;
getRowClass(): any;
getRowStyleFunc(): any;
getRowClassFunc(): any;
getHeaderCellRenderer(): any;
getApi(): GridApi;
isEnableColResize(): boolean;
isSingleClickEdit(): boolean;
getGroupDefaultExpanded(): any;
getGroupKeys(): string[];
getGroupAggFunction(): (nodes: any[]) => any;
getGroupAggFields(): string[];
getRowData(): any[];
isGroupUseEntireRow(): boolean;
getGroupColumnDef(): any;
isGroupSuppressRow(): boolean;
isAngularCompileRows(): boolean;
isAngularCompileFilters(): boolean;
isAngularCompileHeaders(): boolean;
isDebug(): boolean;
getColumnDefs(): any[];
getDatasource(): any;
getRowBuffer(): number;
isEnableSorting(): boolean;
isEnableCellExpressions(): boolean;
isEnableServerSideSorting(): boolean;
isEnableFilter(): boolean;
isEnableServerSideFilter(): boolean;
isSuppressScrollLag(): boolean;
getIcons(): any;
getIsScrollLag(): () => boolean;
getSortingOrder(): string[];
getSlaveGrids(): GridOptions[];
getGroupRowRenderer(): Object | Function;
getRowHeight(): number;
getHeaderHeight(): number;
setHeaderHeight(headerHeight: number): void;
isGroupHeaders(): boolean;
setGroupHeaders(groupHeaders: boolean): void;
getFloatingTopRowData(): any[];
setFloatingTopRowData(rows: any[]): void;
getFloatingBottomRowData(): any[];
setFloatingBottomRowData(rows: any[]): void;
isExternalFilterPresent(): boolean;
doesExternalFilterPass(node: RowNode): boolean;
getGroupRowInnerRenderer(): (params: any) => void;
getColWidth(): number;
private checkForDeprecated();
getPinnedColCount(): number;
getLocaleTextFunc(): Function;
globalEventHandler(eventName: string, event?: any): void;
private getCallbackForEvent(eventName);
}
}
declare module ag.grid {
class LoggerFactory {
private logging;
init(gridOptionsWrapper: GridOptionsWrapper): void;
create(name: string): Logger;
}
class Logger {
private logging;
private name;
constructor(name: string, logging: boolean);
log(message: string): void;
}
}
declare module ag.grid {
class Events {
/** A new set of columns has been entered, everything has potentially changed. */
static EVENT_COLUMN_EVERYTHING_CHANGED: string;
/** A pivot column was added, removed or order changed. */
static EVENT_COLUMN_PIVOT_CHANGE: string;
/** A value column was added, removed or agg function was changed. */
static EVENT_COLUMN_VALUE_CHANGE: string;
/** A column was moved */
static EVENT_COLUMN_MOVED: string;
/** One or more columns was shown / hidden */
static EVENT_COLUMN_VISIBLE: string;
/** A column group was opened / closed */
static EVENT_COLUMN_GROUP_OPENED: string;
/** One or more columns was resized. If just one, the column in the event is set. */
static EVENT_COLUMN_RESIZED: string;
/** One or more columns was resized. If just one, the column in the event is set. */
static EVENT_COLUMN_PINNED_COUNT_CHANGED: string;
static EVENT_MODEL_UPDATED: string;
static EVENT_CELL_CLICKED: string;
static EVENT_CELL_DOUBLE_CLICKED: string;
static EVENT_CELL_CONTEXT_MENU: string;
static EVENT_CELL_VALUE_CHANGED: string;
static EVENT_CELL_FOCUSED: string;
static EVENT_ROW_SELECTED: string;
static EVENT_SELECTION_CHANGED: string;
static EVENT_BEFORE_FILTER_CHANGED: string;
static EVENT_AFTER_FILTER_CHANGED: string;
static EVENT_FILTER_MODIFIED: string;
static EVENT_BEFORE_SORT_CHANGED: string;
static EVENT_AFTER_SORT_CHANGED: string;
static EVENT_VIRTUAL_ROW_REMOVED: string;
static EVENT_ROW_CLICKED: string;
static EVENT_READY: string;
}
}
declare module ag.grid {
class EventService {
private allListeners;
private globalListeners;
private getListenerList(eventType);
addEventListener(eventType: string, listener: Function): void;
addGlobalListener(listener: Function): void;
removeEventListener(eventType: string, listener: Function): void;
removeGlobalListener(listener: Function): void;
dispatchEvent(eventType: string, event?: any): void;
}
}
declare module ag.grid {
class MasterSlaveService {
private gridOptionsWrapper;
private columnController;
private gridPanel;
private logger;
private eventService;
private consuming;
init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, loggerFactory: LoggerFactory, eventService: EventService): void;
private fireEvent(callback);
private onEvent(callback);
private fireColumnEvent(event);
fireHorizontalScrollEvent(horizontalScroll: number): void;
onScrollEvent(horizontalScroll: number): void;
onColumnEvent(event: ColumnChangeEvent): void;
}
}
declare module ag.grid {
class ColumnApi {
private _columnController;
constructor(_columnController: ColumnController);
sizeColumnsToFit(gridWidth: any): void;
hideColumns(colIds: any, hide: any): void;
columnGroupOpened(group: ColumnGroup, newValue: boolean): void;
getColumnGroup(name: string): ColumnGroup;
getDisplayNameForCol(column: any): string;
getColumn(key: any): Column;
setState(columnState: any): void;
getState(): [any];
isPinning(): boolean;
getVisibleColAfter(col: Column): Column;
getVisibleColBefore(col: Column): Column;
setColumnVisible(column: Column, visible: boolean): void;
getAllColumns(): Column[];
getDisplayedColumns(): Column[];
getPivotedColumns(): Column[];
getValueColumns(): Column[];
moveColumn(fromIndex: number, toIndex: number): void;
movePivotColumn(fromIndex: number, toIndex: number): void;
setColumnAggFunction(column: Column, aggFunc: string): void;
setColumnWidth(column: Column, newWidth: number): void;
removeValueColumn(column: Column): void;
addValueColumn(column: Column): void;
removePivotColumn(column: Column): void;
setPinnedColumnCount(count: number): void;
addPivotColumn(column: Column): void;
getHeaderGroups(): ColumnGroup[];
hideColumn(colId: any, hide: any): void;
}
class ColumnController {
private gridOptionsWrapper;
private angularGrid;
private selectionRendererFactory;
private expressionService;
private masterSlaveController;
private allColumns;
private visibleColumns;
private displayedColumns;
private pivotColumns;
private valueColumns;
private columnGroups;
private setupComplete;
private valueService;
private pinnedColumnCount;
private eventService;
constructor();
init(angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, valueService: ValueService, masterSlaveController: MasterSlaveService, eventService: EventService): void;
getColumnApi(): ColumnApi;
isSetupComplete(): boolean;
getHeaderGroups(): ColumnGroup[];
getPinnedContainerWidth(): number;
addPivotColumn(column: Column): void;
setPinnedColumnCount(count: number): void;
removePivotColumn(column: Column): void;
addValueColumn(column: Column): void;
removeValueColumn(column: Column): void;
private doesColumnExistInGrid(column);
setColumnWidth(column: Column, newWidth: number): void;
private updateGroupWidthsAfterColumnResize(column);
setColumnAggFunction(column: Column, aggFunc: string): void;
movePivotColumn(fromIndex: number, toIndex: number): void;
moveColumn(fromIndex: number, toIndex: number): void;
getBodyContainerWidth(): number;
getValueColumns(): Column[];
getPivotedColumns(): Column[];
getDisplayedColumns(): Column[];
getAllColumns(): Column[];
setColumnVisible(column: Column, visible: boolean): void;
getVisibleColBefore(col: any): Column;
getVisibleColAfter(col: Column): Column;
isPinning(): boolean;
getState(): [any];
setState(columnState: any): void;
getColumns(keys: any[]): Column[];
getColumn(key: any): Column;
getDisplayNameForCol(column: any): string;
getColumnGroup(name: string): ColumnGroup;
onColumnsChanged(): void;
private checkForDeprecatedItems(columnDefs);
columnGroupOpened(group: ColumnGroup, newValue: boolean): void;
hideColumns(colIds: any, hide: any): void;
private updateModel();
private updateDisplayedColumns();
sizeColumnsToFit(gridWidth: any): void;
private buildGroups();
private updateGroups();
private updateVisibleColumns();
private updatePinnedColumns();
private createColumns(colDefs);
private createPivotColumns();
private createValueColumns();
private createDummyColumn(field);
private calculateColInitialWidth(colDef);
private getTotalColWidth(includePinned);
}
}
declare module ag.grid {
interface CsvExportParams {
skipHeader?: boolean;
skipFooters?: boolean;
skipGroups?: boolean;
fileName?: string;
}
class CsvCreator {
private rowController;
private columnController;
private grid;
private valueService;
constructor(rowController: InMemoryRowController, columnController: ColumnController, grid: Grid, valueService: ValueService);
exportDataAsCsv(params?: CsvExportParams): void;
getDataAsCsv(params?: CsvExportParams): string;
private createValueForGroupNode(node);
private escape(value);
}
}
declare module ag.grid {
class ExpressionService {
private expressionToFunctionCache;
private logger;
init(loggerFactory: LoggerFactory): void;
evaluate(expression: string, params: any): any;
private createExpressionFunction(expression);
private createFunctionBody(expression);
}
}
declare module ag.grid {
interface TextAndNumberFilterParameters {
/** What to do when new rows are loaded. The default is to reset the filter, to keep it in line with 'set' filters. If you want to keep the selection, then set this value to 'keep'. */
newRowsAction?: string;
}
}
declare module ag.grid {
class TextFilter implements Filter {
private filterParams;
private filterChangedCallback;
private filterModifiedCallback;
private localeTextFunc;
private valueGetter;
private filterText;
private filterType;
private api;
private eGui;
private eFilterTextField;
private eTypeSelect;
private applyActive;
private eApplyButton;
init(params: any): void;
onNewRowsLoaded(): void;
afterGuiAttached(): void;
doesFilterPass(node: any): boolean;
getGui(): any;
isFilterActive(): boolean;
private createTemplate();
private createGui();
private setupApply();
private onTypeChanged();
private onFilterChanged();
private filterChanged();
private createApi();
private getApi();
}
}
declare module ag.grid {
class NumberFilter implements Filter {
private filterParams;
private filterChangedCallback;
private filterModifiedCallback;
private localeTextFunc;
private valueGetter;
private filterNumber;
private filterType;
private api;
private eGui;
private eFilterTextField;
private eTypeSelect;
private applyActive;
private eApplyButton;
init(params: any): void;
onNewRowsLoaded(): void;
afterGuiAttached(): void;
doesFilterPass(node: any): boolean;
getGui(): any;
isFilterActive(): boolean;
private createTemplate();
private createGui();
private setupApply();
private onTypeChanged();
private filterChanged();
private onFilterChanged();
private createApi();
private getApi();
}
}
declare module ag.grid {
interface ColDef {
/** If sorting by default, set it here. Set to 'asc' or 'desc' */
sort?: string;
/** If sorting more than one column by default, the milliseconds when this column was sorted, so we know what order to sort the columns in. */
sortedAt?: number;
/** The sort order, provide an array with any of the following in any order ['asc','desc',null] */
sortingOrder?: string[];
/** The name to render in the column header */
headerName: string;
/** The field of the row to get the cells data from */
field: string;
/** Expression or function to get the cells value. */
headerValueGetter?: string | Function;
/** The unique ID to give the column. This is optional. If missing, the ID will default to the field. If both field and colId are missing, a unique ID will be generated.
* This ID is used to identify the column in the API for sorting, filtering etc. */
colId?: string;
/** 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,
* however we want all default values to be false and we want columns to be visible by default. */
hide?: boolean;
/** Tooltip for the column header */
headerTooltip?: string;
/** Expression or function to get the cells value. */
valueGetter?: string | Function;
/** To provide custom rendering to the header. */
headerCellRenderer?: Function | Object;
/** CSS class for the header */
headerClass?: string | string[] | ((params: any) => string | string[]);
/** Initial width, in pixels, of the cell */
width?: number;
/** Min width, in pixels, of the cell */
minWidth?: number;
/** Max width, in pixels, of the cell */
maxWidth?: number;
/** Class to use for the cell. Can be string, array of strings, or function. */
cellClass?: string | string[] | ((cellClassParams: any) => string | string[]);
/** An object of css values. Or a function returning an object of css values. */
cellStyle?: {} | ((params: any) => {});
/** A function for rendering a cell. */
cellRenderer?: Function | {};
/** A function for rendering a floating cell. */
floatingCellRenderer?: Function | {};
/** Name of function to use for aggregation. One of [sum,min,max]. */
aggFunc?: string;
/** Comparator function for custom sorting. */
comparator?: Function;
/** Set to true to render a selection checkbox in the column. */
checkboxSelection?: boolean;
/** Set to true if no menu should be shown for this column header. */
suppressMenu?: boolean;
/** Set to true if no sorting should be done for this column. */
suppressSorting?: boolean;
/** Set to true if you want the unsorted icon to be shown when no sort is applied to this column. */
unSortIcon?: boolean;
/** Set to true if you want this columns width to be fixed during 'size to fit' operation. */
suppressSizeToFit?: boolean;
/** Set to true if you do not want this column to be resizable by dragging it's edge. */
suppressResize?: boolean;
/** If grouping columns, the group this column belongs to. */
headerGroup?: string;
/** Whether to show the column when the group is open / closed. */
headerGroupShow?: string;
/** Set to true if this col is editable, otherwise false. Can also be a function to have different rows editable. */
editable?: boolean | (Function);
/** Callbacks for editing.See editing section for further details. */
newValueHandler?: Function;
/** If true, this cell gets refreshed when api.softRefreshView() gets called. */
volatile?: boolean;
/** Cell template to use for cell. Useful for AngularJS cells. */
template?: string;
/** Cell template URL to load template from to use for cell. Useful for AngularJS cells. */
templateUrl?: string;
/** one of the built in filter names: [set, number, text], or a filter function*/
filter?: string | Function;
/** The filter params are specific to each filter! */
filterParams?: SetFilterParameters | TextAndNumberFilterParameters;
/** Rules for applying css classes */
cellClassRules?: {
[cssClassName: string]: (Function | string);
};
/** Callbacks for editing.See editing section for further details. */
onCellValueChanged?: Function;
/** Function callback, gets called when a cell is clicked. */
onCellClicked?: Function;
/** Function callback, gets called when a cell is double clicked. */
onCellDoubleClicked?: Function;
/** Function callback, gets called when a cell is right clicked. */
onCellContextMenu?: Function;
}
}
declare module ag.grid {
class SetFilterModel {
private colDef;
private filterParams;
private rowModel;
private valueGetter;
private allUniqueValues;
private availableUniqueValues;
private displayedValues;
private miniFilter;
private selectedValuesCount;
private selectedValuesMap;
private showingAvailableOnly;
private usingProvidedSet;
private doesRowPassOtherFilters;
constructor(colDef: ColDef, rowModel: any, valueGetter: any, doesRowPassOtherFilters: any);
refreshAfterNewRowsLoaded(keepSelection: any, isSelectAll: boolean): void;
refreshAfterAnyFilterChanged(): void;
private createAllUniqueValues();
private createAvailableUniqueValues();
private getUniqueValues(filterOutNotAvailable);
setMiniFilter(newMiniFilter: any): boolean;
getMiniFilter(): any;
private processMiniFilter();
getDisplayedValueCount(): any;
getDisplayedValue(index: any): any;
selectEverything(): void;
isFilterActive(): boolean;
selectNothing(): void;
getUniqueValueCount(): any;
getUniqueValue(index: any): any;
unselectValue(value: any): void;
selectValue(value: any): void;
isValueSelected(value: any): boolean;
isEverythingSelected(): boolean;
isNothingSelected(): boolean;
getModel(): any;
setModel(model: any, isSelectAll: boolean): void;
}
}
/** The filter parameters for set filter */
declare module ag.grid {
interface SetFilterParameters {
/** Same as cell renderer for grid (you can use the same one in both locations). Setting it separatly here allows for the value to be rendered differently in the filter. */
cellRenderer?: Function;
/** The height of the cell. */
cellHeight?: number;
/** The values to display in the filter. */
values?: any;
/** What to do when new rows are loaded. The default is to reset the filter, as the set of values to select from can have changed. If you want to keep the selection, then set this value to 'keep'. */
newRowsAction?: string;
/** If true, the filter will not remove items that are no longer availabe due to other filters. */
suppressRemoveEntries?: boolean;
}
}
declare module ag.grid {
class SetFilter implements Filter {
private eGui;
private filterParams;
private rowHeight;
private model;
private filterChangedCallback;
private filterModifiedCallback;
private valueGetter;
private rowsInBodyContainer;
private colDef;
private localeTextFunc;
private cellRenderer;
private eListContainer;
private eFilterValueTemplate;
private eSelectAll;
private eListViewport;
private eMiniFilter;
private api;
private applyActive;
private eApplyButton;
init(params: any): void;
afterGuiAttached(): void;
isFilterActive(): boolean;
doesFilterPass(node: any): boolean;
getGui(): any;
onNewRowsLoaded(): void;
onAnyFilterChanged(): void;
private createTemplate();
private createGui();
private setupApply();
private setContainerHeight();
private drawVirtualRows();
private ensureRowsRendered(start, finish);
private removeVirtualRows(rowsToRemove);
private insertRow(value, rowIndex);
private onCheckboxClicked(eCheckbox, value);
private filterChanged();
private onMiniFilterChanged();
private refreshVirtualRows();
private clearVirtualRows();
private onSelectAll();
private updateAllCheckboxes(checked);
private addScrollListener();
getApi(): any;
private createApi();
}
}
declare module ag.grid {
class PopupService {
private ePopupParent;
init(ePopupParent: any): void;
positionPopup(eventSource: any, ePopup: any, minWidth: any): void;
addAsModalPopup(eChild: any, closeOnEsc: boolean): (event: any) => void;
}
}
declare module ag.grid {
interface RowNode {
/** Unique ID for the node. Can be though of as the index of the row in the original list,
* however exceptions apply so don't depend on uniqueness. */
id?: number;
/** The user provided data */
data?: any;
/** The parent node to this node, or empty if top level */
parent?: RowNode;
/** How many levels this node is from the top */
level?: number;
/** True if this node is a group node (ie has children) */
group?: boolean;
/** True if this is the first child in this group */
firstChild?: boolean;
/** True if this is the last child in this group */
lastChild?: boolean;
/** The index of this node in the group */
childIndex?: number;
/** True if this row is a floating row */
floating?: boolean;
/** True if this row is a floating top row */
floatingTop?: boolean;
/** True if this row is a floating bottom row */
floatingBottom?: boolean;
/** If using quick filter, stores a string representation of the row for searching against */
quickFilterAggregateText?: string;
/** Groups only - True if row is a footer. Footers have group = true and footer = true */
footer?: boolean;
/** Groups only - Children of this group */
children?: RowNode[];
/** Groups only - The field we are pivoting on eg Country*/
field?: string;
/** Groups only - The key for the pivot eg Ireland, UK, USA */
key?: any;
/** Groups only - Filtered children of this group */
childrenAfterFilter?: RowNode[];
/** Groups only - Sorted children of this group */
childrenAfterSort?: RowNode[];
/** Groups only - Number of children and grand children */
allChildrenCount?: number;
/** Groups only - True if group is expanded, otherwise false */
expanded?: boolean;
/** Groups only - If doing footers, reference to the footer node for this group */
sibling?: RowNode;
/** Not to be used, internal temporary map used by the grid when creating groups */
_childrenMap?: {};
}
}
declare module ag.grid {
class FilterManager {
private $compile;
private $scope;
private gridOptionsWrapper;
private grid;
private allFilters;
private rowModel;
private popupService;
private valueService;
private columnController;
private quickFilter;
private advancedFilterPresent;
private externalFilterPresent;
init(grid: Grid, gridOptionsWrapper: GridOptionsWrapper, $compile: any, $scope: any, columnController: ColumnController, popupService: PopupService, valueService: ValueService): void;
setFilterModel(model: any): void;
private setModelOnFilterWrapper(filter, newModel);
getFilterModel(): any;
setRowModel(rowModel: any): void;
isAdvancedFilterPresent(): boolean;
isAnyFilterPresent(): boolean;
isFilterPresentForCol(colId: any): any;
private doesFilterPass(node, filterToSkip?);
setQuickFilter(newFilter: any): boolean;
onFilterChanged(): void;
isQuickFilterPresent(): boolean;
doesRowPassOtherFilters(filterToSkip: any, node: any): boolean;
doesRowPassFilter(node: any, filterToSkip?: any): boolean;
private aggregateRowForQuickFilter(node);
refreshDisplayedValues(): void;
onNewRowsLoaded(): void;
private createValueGetter(column);
getFilterApi(column: Column): any;
private getOrCreateFilterWrapper(column);
private createFilterWrapper(column);
private assertMethodHasNoParameters(theMethod);
showFilter(column: Column, eventSource: any): void;
}
}
declare module ag.grid {
class TemplateService {
templateCache: any;
waitingCallbacks: any;
$scope: any;
init($scope: any): void;
getTemplate(url: any, callback: any): any;
handleHttpResult(httpResult: any, url: any): void;
}
}
declare module ag.grid {
class SelectionRendererFactory {
private angularGrid;
private selectionController;
init(angularGrid: any, selectionController: any): void;
createSelectionCheckbox(node: any, rowIndex: any): HTMLInputElement;
}
}
declare module ag.vdom {
class VElement {
static idSequence: number;
private id;
private elementAttachedListeners;
constructor();
getId(): number;
addElementAttachedListener(listener: (element: Element) => void): void;
protected fireElementAttached(element: Element): void;
elementAttached(element: Element): void;
toHtmlString(): string;
}
}
declare module ag.vdom {
class VHtmlElement extends VElement {
private type;
private classes;
private eventListeners;
private attributes;
private children;
private innerHtml;
private style;
private bound;
private element;
constructor(type: string);
getElement(): HTMLElement;
setInnerHtml(innerHtml: string): void;
addStyles(styles: any): void;
private attachEventListeners(node);
addClass(newClass: string): void;
removeClass(oldClass: string): void;
addClasses(classes: string[]): void;
toHtmlString(): string;
private toHtmlStringChildren();
private toHtmlStringAttributes();
private toHtmlStringClasses();
private toHtmlStringStyles();
appendChild(child: any): void;
setAttribute(key: string, value: string): void;
addEventListener(event: string, listener: EventListener): void;
elementAttached(element: Element): void;
fireElementAttachedToChildren(element: Element): void;
}
}
declare module ag.vdom {
class VWrapperElement extends VElement {
private wrappedElement;
constructor(wrappedElement: Element);
toHtmlString(): string;
elementAttached(element: Element): void;
}
}
declare module ag.grid {
class RenderedCell {
private vGridCell;
private vSpanWithValue;
private vCellWrapper;
private vParentOfValue;
private checkboxOnChangeListener;
private column;
private data;
private node;
private rowIndex;
private editingCell;
private scope;
private isFirstColumn;
private gridOptionsWrapper;
private expressionService;
private selectionRendererFactory;
private rowRenderer;
private selectionController;
private $compile;
private templateService;
private cellRendererMap;
private eCheckbox;
private columnController;
private valueService;
private eventService;
private value;
private checkboxSelection;
constructor(isFirstColumn: any, column: any, $compile: any, rowRenderer: RowRenderer, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, selectionRendererFactory: SelectionRendererFactory, selectionController: SelectionController, templateService: TemplateService, cellRendererMap: {
[key: string]: any;
}, node: any, rowIndex: number, scope: any, columnController: ColumnController, valueService: ValueService, eventService: EventService);
getColumn(): Column;
private getValue();
getVGridCell(): ag.vdom.VHtmlElement;
private getDataForRow();
private setupComponents();
startEditing(key?: number): void;
focusCell(forceBrowserFocus: boolean): void;
private stopEditing(eInput, blurListener, reset?);
createParams(): any;
createEvent(event: any, eventSource: any): any;
private addCellDoubleClickedHandler();
private addCellContextMenuHandler();
isCellEditable(): any;
private addCellClickedHandler();
private populateCell();
private addStylesFromCollDef();
private addClassesFromCollDef();
private addClassesFromRules();
private addCellNavigationHandler();
private isKeycodeForStartEditing(key);
createSelectionCheckbox(): void;
setSelected(state: boolean): void;
private createParentOfValue();
isVolatile(): boolean;
refreshCell(): void;
private putDataIntoCell();
private useCellRenderer(cellRenderer);
private addClasses();
}
}
declare module ag.grid {
class RenderedRow {
vPinnedRow: any;
vBodyRow: any;
private renderedCells;
private scope;
private node;
private rowIndex;
private cellRendererMap;
private gridOptionsWrapper;
private parentScope;
private angularGrid;
private columnController;
private expressionService;
private rowRenderer;
private selectionRendererFactory;
private $compile;
private templateService;
private selectionController;
private pinning;
private eBodyContainer;
private ePinnedContainer;
private valueService;
private eventService;
constructor(gridOptionsWrapper: GridOptionsWrapper, valueService: ValueService, parentScope: any, angularGrid: Grid, columnController: ColumnController, expressionService: ExpressionService, cellRendererMap: {
[key: string]: any;
}, selectionRendererFactory: SelectionRendererFactory, $compile: any, templateService: TemplateService, selectionController: SelectionController, rowRenderer: RowRenderer, eBodyContainer: HTMLElement, ePinnedContainer: HTMLElement, node: any, rowIndex: number, eventService: EventService);
onRowSelected(selected: boolean): void;
softRefresh(): void;
getRenderedCellForColumn(column: Column): RenderedCell;
getCellForCol(column: Column): any;
destroy(): void;
private destroyScope();
isDataInList(rows: any[]): boolean;
isNodeInList(nodes: RowNode[]): boolean;
isGroup(): boolean;
private drawNormalRow();
private bindVirtualElement(vElement);
private createGroupRow();
private createGroupSpanningEntireRowCell(padding);
setMainRowWidth(width: number): void;
private createChildScopeOrNull(data);
private addDynamicStyles();
private createRowContainer();
getRowNode(): any;
getRowIndex(): any;
refreshCells(colIds: string[]): void;
private addDynamicClasses();
}
}
declare module ag.grid {
class SvgFactory {
static theInstance: SvgFactory;
static getInstance(): SvgFactory;
createFilterSvg(): Element;
createColumnShowingSvg(): Element;
createColumnHiddenSvg(): Element;
createMenuSvg(): Element;
createArrowUpSvg(): Element;
createArrowLeftSvg(): Element;
createArrowDownSvg(): Element;
createArrowRightSvg(): Element;
createSmallArrowDownSvg(): Element;
createArrowUpDownSvg(): Element;
}
}
declare module ag.grid {
function groupCellRendererFactory(gridOptionsWrapper: GridOptionsWrapper, selectionRendererFactory: SelectionRendererFactory, expressionService: ExpressionService): (params: any) => HTMLSpanElement;
}
declare module ag.grid {
class RowRenderer {
private columnModel;
private gridOptionsWrapper;
private angularGrid;