UNPKG

52.3 kBJavaScriptView Raw
1/**
2 * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
3 * @version v18.1.2
4 * @link http://www.ag-grid.com/
5 * @license MIT
6 */
7"use strict";
8var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
9 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
12 return c > 3 && r && Object.defineProperty(target, key, r), r;
13};
14var __metadata = (this && this.__metadata) || function (k, v) {
15 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
16};
17Object.defineProperty(exports, "__esModule", { value: true });
18var csvCreator_1 = require("./csvCreator");
19var rowRenderer_1 = require("./rendering/rowRenderer");
20var filterManager_1 = require("./filter/filterManager");
21var columnController_1 = require("./columnController/columnController");
22var selectionController_1 = require("./selectionController");
23var gridOptionsWrapper_1 = require("./gridOptionsWrapper");
24var valueService_1 = require("./valueService/valueService");
25var eventService_1 = require("./eventService");
26var constants_1 = require("./constants");
27var context_1 = require("./context/context");
28var gridCore_1 = require("./gridCore");
29var sortController_1 = require("./sortController");
30var focusedCellController_1 = require("./focusedCellController");
31var gridCell_1 = require("./entities/gridCell");
32var utils_1 = require("./utils");
33var cellRendererFactory_1 = require("./rendering/cellRendererFactory");
34var cellEditorFactory_1 = require("./rendering/cellEditorFactory");
35var paginationProxy_1 = require("./rowModels/paginationProxy");
36var immutableService_1 = require("./rowModels/clientSide/immutableService");
37var valueCache_1 = require("./valueService/valueCache");
38var alignedGridsService_1 = require("./alignedGridsService");
39var pinnedRowModel_1 = require("./rowModels/pinnedRowModel");
40var animationFrameService_1 = require("./misc/animationFrameService");
41var GridApi = (function () {
42 function GridApi() {
43 this.detailGridInfoMap = {};
44 /*
45 Taking these out, as we want to reconsider how we register components
46
47 public addCellRenderer(key: string, cellRenderer: {new(): ICellRenderer} | ICellRendererFunc): void {
48 this.cellRendererFactory.addCellRenderer(key, cellRenderer);
49 }
50
51 public addCellEditor(key: string, cellEditor: {new(): ICellEditor}): void {
52 this.cellEditorFactory.addCellEditor(key, cellEditor);
53 }*/
54 }
55 GridApi.prototype.registerGridComp = function (gridPanel) {
56 this.gridPanel = gridPanel;
57 };
58 GridApi.prototype.registerHeaderRootComp = function (headerRootComp) {
59 this.headerRootComp = headerRootComp;
60 };
61 GridApi.prototype.init = function () {
62 switch (this.rowModel.getType()) {
63 case constants_1.Constants.ROW_MODEL_TYPE_CLIENT_SIDE:
64 this.clientSideRowModel = this.rowModel;
65 break;
66 case constants_1.Constants.ROW_MODEL_TYPE_INFINITE:
67 this.infinitePageRowModel = this.rowModel;
68 break;
69 case constants_1.Constants.ROW_MODEL_TYPE_SERVER_SIDE:
70 this.serverSideRowModel = this.rowModel;
71 break;
72 }
73 };
74 /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */
75 GridApi.prototype.__getAlignedGridService = function () {
76 return this.alignedGridsService;
77 };
78 GridApi.prototype.addDetailGridInfo = function (id, gridInfo) {
79 this.detailGridInfoMap[id] = gridInfo;
80 };
81 GridApi.prototype.removeDetailGridInfo = function (id) {
82 this.detailGridInfoMap[id] = undefined;
83 };
84 GridApi.prototype.getDetailGridInfo = function (id) {
85 return this.detailGridInfoMap[id];
86 };
87 GridApi.prototype.forEachDetailGridInfo = function (callback) {
88 var index = 0;
89 utils_1.Utils.iterateObject(this.detailGridInfoMap, function (id, gridInfo) {
90 // check for undefined, as old references will still be lying around
91 if (utils_1.Utils.exists(gridInfo)) {
92 callback(gridInfo, index);
93 index++;
94 }
95 });
96 };
97 GridApi.prototype.getDataAsCsv = function (params) {
98 return this.csvCreator.getDataAsCsv(params);
99 };
100 GridApi.prototype.exportDataAsCsv = function (params) {
101 this.csvCreator.exportDataAsCsv(params);
102 };
103 GridApi.prototype.getDataAsExcel = function (params) {
104 if (!this.excelCreator) {
105 console.warn('ag-Grid: Excel export is only available in ag-Grid Enterprise');
106 }
107 return this.excelCreator.getDataAsExcelXml(params);
108 };
109 GridApi.prototype.exportDataAsExcel = function (params) {
110 if (!this.excelCreator) {
111 console.warn('ag-Grid: Excel export is only available in ag-Grid Enterprise');
112 }
113 this.excelCreator.exportDataAsExcel(params);
114 };
115 // DEPRECATED
116 GridApi.prototype.setEnterpriseDatasource = function (datasource) {
117 console.warn("ag-grid: since version 18.x, api.setEnterpriseDatasource() should be replaced with api.setServerSideDatasource()");
118 this.setServerSideDatasource(datasource);
119 };
120 GridApi.prototype.setServerSideDatasource = function (datasource) {
121 if (this.gridOptionsWrapper.isRowModelServerSide()) {
122 // should really have an IEnterpriseRowModel interface, so we are not casting to any
123 this.rowModel.setDatasource(datasource);
124 }
125 else {
126 console.warn("ag-Grid: you can only use an enterprise datasource when gridOptions.rowModelType is '" + constants_1.Constants.ROW_MODEL_TYPE_SERVER_SIDE + "'");
127 }
128 };
129 GridApi.prototype.setDatasource = function (datasource) {
130 if (this.gridOptionsWrapper.isRowModelInfinite()) {
131 this.rowModel.setDatasource(datasource);
132 }
133 else {
134 console.warn("ag-Grid: you can only use a datasource when gridOptions.rowModelType is '" + constants_1.Constants.ROW_MODEL_TYPE_INFINITE + "'");
135 }
136 };
137 GridApi.prototype.setViewportDatasource = function (viewportDatasource) {
138 if (this.gridOptionsWrapper.isRowModelViewport()) {
139 // this is bad coding, because it's using an interface that's exposed in the enterprise.
140 // really we should create an interface in the core for viewportDatasource and let
141 // the enterprise implement it, rather than casting to 'any' here
142 this.rowModel.setViewportDatasource(viewportDatasource);
143 }
144 else {
145 console.warn("ag-Grid: you can only use a viewport datasource when gridOptions.rowModelType is '" + constants_1.Constants.ROW_MODEL_TYPE_VIEWPORT + "'");
146 }
147 };
148 GridApi.prototype.setRowData = function (rowData) {
149 if (this.gridOptionsWrapper.isRowModelDefault()) {
150 if (this.gridOptionsWrapper.isDeltaRowDataMode()) {
151 var _a = this.immutableService.createTransactionForRowData(rowData), transaction = _a[0], orderIdMap = _a[1];
152 this.clientSideRowModel.updateRowData(transaction, orderIdMap);
153 }
154 else {
155 this.selectionController.reset();
156 this.clientSideRowModel.setRowData(rowData);
157 }
158 }
159 else {
160 console.log('cannot call setRowData unless using normal row model');
161 }
162 };
163 // DEPRECATED
164 GridApi.prototype.setFloatingTopRowData = function (rows) {
165 console.warn('ag-Grid: since v12, api.setFloatingTopRowData() is now api.setPinnedTopRowData()');
166 this.setPinnedTopRowData(rows);
167 };
168 // DEPRECATED
169 GridApi.prototype.setFloatingBottomRowData = function (rows) {
170 console.warn('ag-Grid: since v12, api.setFloatingBottomRowData() is now api.setPinnedBottomRowData()');
171 this.setPinnedBottomRowData(rows);
172 };
173 // DEPRECATED
174 GridApi.prototype.getFloatingTopRowCount = function () {
175 console.warn('ag-Grid: since v12, api.getFloatingTopRowCount() is now api.getPinnedTopRowCount()');
176 return this.getPinnedTopRowCount();
177 };
178 // DEPRECATED
179 GridApi.prototype.getFloatingBottomRowCount = function () {
180 console.warn('ag-Grid: since v12, api.getFloatingBottomRowCount() is now api.getPinnedBottomRowCount()');
181 return this.getPinnedBottomRowCount();
182 };
183 // DEPRECATED
184 GridApi.prototype.getFloatingTopRow = function (index) {
185 console.warn('ag-Grid: since v12, api.getFloatingTopRow() is now api.getPinnedTopRow()');
186 return this.getPinnedTopRow(index);
187 };
188 // DEPRECATED
189 GridApi.prototype.getFloatingBottomRow = function (index) {
190 console.warn('ag-Grid: since v12, api.getFloatingBottomRow() is now api.getPinnedBottomRow()');
191 return this.getPinnedBottomRow(index);
192 };
193 GridApi.prototype.setPinnedTopRowData = function (rows) {
194 this.pinnedRowModel.setPinnedTopRowData(rows);
195 };
196 GridApi.prototype.setPinnedBottomRowData = function (rows) {
197 this.pinnedRowModel.setPinnedBottomRowData(rows);
198 };
199 GridApi.prototype.getPinnedTopRowCount = function () {
200 return this.pinnedRowModel.getPinnedTopRowCount();
201 };
202 GridApi.prototype.getPinnedBottomRowCount = function () {
203 return this.pinnedRowModel.getPinnedBottomRowCount();
204 };
205 GridApi.prototype.getPinnedTopRow = function (index) {
206 return this.pinnedRowModel.getPinnedTopRow(index);
207 };
208 GridApi.prototype.getPinnedBottomRow = function (index) {
209 return this.pinnedRowModel.getPinnedBottomRow(index);
210 };
211 GridApi.prototype.setColumnDefs = function (colDefs, source) {
212 if (source === void 0) { source = "api"; }
213 this.columnController.setColumnDefs(colDefs, source);
214 };
215 GridApi.prototype.expireValueCache = function () {
216 this.valueCache.expire();
217 };
218 GridApi.prototype.getVerticalPixelRange = function () {
219 return this.gridPanel.getVScrollPosition();
220 };
221 GridApi.prototype.refreshToolPanel = function () {
222 if (this.toolPanelComp) {
223 this.toolPanelComp.refresh();
224 }
225 };
226 GridApi.prototype.refreshCells = function (params) {
227 if (params === void 0) { params = {}; }
228 if (Array.isArray(params)) {
229 // the old version of refreshCells() took an array of rowNodes for the first argument
230 console.warn('since ag-Grid v11.1, refreshCells() now takes parameters, please see the documentation.');
231 return;
232 }
233 this.rowRenderer.refreshCells(params);
234 };
235 GridApi.prototype.flashCells = function (params) {
236 if (params === void 0) { params = {}; }
237 this.rowRenderer.flashCells(params);
238 };
239 GridApi.prototype.redrawRows = function (params) {
240 if (params === void 0) { params = {}; }
241 if (params && params.rowNodes) {
242 this.rowRenderer.redrawRows(params.rowNodes);
243 }
244 else {
245 this.rowRenderer.redrawAfterModelUpdate();
246 }
247 };
248 GridApi.prototype.timeFullRedraw = function (count) {
249 if (count === void 0) { count = 1; }
250 var iterationCount = 0;
251 var totalProcessing = 0;
252 var totalReflow = 0;
253 var that = this;
254 doOneIteration();
255 function doOneIteration() {
256 var start = (new Date()).getTime();
257 that.rowRenderer.redrawAfterModelUpdate();
258 var endProcessing = (new Date()).getTime();
259 setTimeout(function () {
260 var endReflow = (new Date()).getTime();
261 var durationProcessing = endProcessing - start;
262 var durationReflow = endReflow - endProcessing;
263 console.log('duration: processing = ' + durationProcessing + 'ms, reflow = ' + durationReflow + 'ms');
264 iterationCount++;
265 totalProcessing += durationProcessing;
266 totalReflow += durationReflow;
267 if (iterationCount < count) {
268 // wait for 1s between tests
269 setTimeout(doOneIteration, 1000);
270 }
271 else {
272 finish();
273 }
274 }, 0);
275 }
276 function finish() {
277 console.log('tests complete. iteration count = ' + iterationCount);
278 console.log('average processing = ' + (totalProcessing / iterationCount) + 'ms');
279 console.log('average reflow = ' + (totalReflow / iterationCount) + 'ms');
280 }
281 };
282 // *** deprecated
283 GridApi.prototype.refreshView = function () {
284 console.warn('ag-Grid: since v11.1, refreshView() is deprecated, please call refreshCells() or redrawRows() instead');
285 this.redrawRows();
286 };
287 // *** deprecated
288 GridApi.prototype.refreshRows = function (rowNodes) {
289 console.warn('since ag-Grid v11.1, refreshRows() is deprecated, please use refreshCells({rowNodes: rows}) or redrawRows({rowNodes: rows}) instead');
290 this.refreshCells({ rowNodes: rowNodes });
291 };
292 // *** deprecated
293 GridApi.prototype.rowDataChanged = function (rows) {
294 console.log('ag-Grid: rowDataChanged is deprecated, either call refreshView() to refresh everything, or call rowNode.setRowData(newData) to set value on a particular node');
295 this.redrawRows();
296 };
297 // *** deprecated
298 GridApi.prototype.softRefreshView = function () {
299 console.error('ag-Grid: since v16, softRefreshView() is no longer supported. Please check the documentation on how to refresh.');
300 };
301 // *** deprecated
302 GridApi.prototype.refreshGroupRows = function () {
303 console.warn('ag-Grid: since v11.1, refreshGroupRows() is no longer supported, call refreshCells() instead. ' +
304 'Because refreshCells() now does dirty checking, it will only refresh cells that have changed, so it should ' +
305 'not be necessary to only refresh the group rows.');
306 this.refreshCells();
307 };
308 GridApi.prototype.setFunctionsReadOnly = function (readOnly) {
309 this.gridOptionsWrapper.setProperty('functionsReadOnly', readOnly);
310 };
311 GridApi.prototype.refreshHeader = function () {
312 this.headerRootComp.refreshHeader();
313 this.gridPanel.setBodyAndHeaderHeights();
314 };
315 GridApi.prototype.isAnyFilterPresent = function () {
316 return this.filterManager.isAnyFilterPresent();
317 };
318 GridApi.prototype.isAdvancedFilterPresent = function () {
319 return this.filterManager.isAdvancedFilterPresent();
320 };
321 GridApi.prototype.isQuickFilterPresent = function () {
322 return this.filterManager.isQuickFilterPresent();
323 };
324 GridApi.prototype.getModel = function () {
325 return this.rowModel;
326 };
327 GridApi.prototype.onGroupExpandedOrCollapsed = function (deprecated_refreshFromIndex) {
328 if (utils_1.Utils.missing(this.clientSideRowModel)) {
329 console.log('ag-Grid: cannot call onGroupExpandedOrCollapsed unless using normal row model');
330 }
331 if (utils_1.Utils.exists(deprecated_refreshFromIndex)) {
332 console.log('ag-Grid: api.onGroupExpandedOrCollapsed - refreshFromIndex parameter is no longer used, the grid will refresh all rows');
333 }
334 // we don't really want the user calling this if one one rowNode was expanded, instead they should be
335 // calling rowNode.setExpanded(boolean) - this way we do a 'keepRenderedRows=false' so that the whole
336 // grid gets refreshed again - otherwise the row with the rowNodes that were changed won't get updated,
337 // and thus the expand icon in the group cell won't get 'opened' or 'closed'.
338 this.clientSideRowModel.refreshModel({ step: constants_1.Constants.STEP_MAP });
339 };
340 GridApi.prototype.refreshInMemoryRowModel = function (step) {
341 console.warn("ag-grid: since version 18.x, api.refreshInMemoryRowModel() should be replaced with api.refreshClientSideRowModel()");
342 this.refreshClientSideRowModel(step);
343 };
344 GridApi.prototype.refreshClientSideRowModel = function (step) {
345 if (utils_1.Utils.missing(this.clientSideRowModel)) {
346 console.log('cannot call refreshClientSideRowModel unless using normal row model');
347 }
348 var paramsStep = constants_1.Constants.STEP_EVERYTHING;
349 var stepsMapped = {
350 group: constants_1.Constants.STEP_EVERYTHING,
351 filter: constants_1.Constants.STEP_FILTER,
352 map: constants_1.Constants.STEP_MAP,
353 aggregate: constants_1.Constants.STEP_AGGREGATE,
354 sort: constants_1.Constants.STEP_SORT,
355 pivot: constants_1.Constants.STEP_PIVOT
356 };
357 if (utils_1.Utils.exists(step)) {
358 paramsStep = stepsMapped[step];
359 }
360 if (utils_1.Utils.missing(paramsStep)) {
361 console.error("ag-Grid: invalid step " + step + ", available steps are " + Object.keys(stepsMapped).join(', '));
362 return;
363 }
364 var modelParams = {
365 step: paramsStep,
366 keepRenderedRows: true,
367 animate: true,
368 keepEditingRows: true
369 };
370 this.clientSideRowModel.refreshModel(modelParams);
371 };
372 GridApi.prototype.isAnimationFrameQueueEmpty = function () {
373 return this.animationFrameService.isQueueEmpty();
374 };
375 GridApi.prototype.getRowNode = function (id) {
376 return this.rowModel.getRowNode(id);
377 };
378 GridApi.prototype.expandAll = function () {
379 if (utils_1.Utils.missing(this.clientSideRowModel)) {
380 console.warn('ag-Grid: cannot call expandAll unless using normal row model');
381 return;
382 }
383 this.clientSideRowModel.expandOrCollapseAll(true);
384 };
385 GridApi.prototype.collapseAll = function () {
386 if (utils_1.Utils.missing(this.clientSideRowModel)) {
387 console.warn('ag-Grid: cannot call collapseAll unless using normal row model');
388 return;
389 }
390 this.clientSideRowModel.expandOrCollapseAll(false);
391 };
392 GridApi.prototype.addVirtualRowListener = function (eventName, rowIndex, callback) {
393 if (typeof eventName !== 'string') {
394 console.log('ag-Grid: addVirtualRowListener is deprecated, please use addRenderedRowListener.');
395 }
396 this.addRenderedRowListener(eventName, rowIndex, callback);
397 };
398 GridApi.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {
399 if (eventName === 'virtualRowSelected') {
400 console.log('ag-Grid: event virtualRowSelected is deprecated, to register for individual row ' +
401 'selection events, add a listener directly to the row node.');
402 }
403 this.rowRenderer.addRenderedRowListener(eventName, rowIndex, callback);
404 };
405 GridApi.prototype.setQuickFilter = function (newFilter) {
406 this.filterManager.setQuickFilter(newFilter);
407 };
408 GridApi.prototype.selectIndex = function (index, tryMulti, suppressEvents) {
409 console.log('ag-Grid: do not use api for selection, call node.setSelected(value) instead');
410 if (suppressEvents) {
411 console.log('ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');
412 }
413 this.selectionController.selectIndex(index, tryMulti);
414 };
415 GridApi.prototype.deselectIndex = function (index, suppressEvents) {
416 if (suppressEvents === void 0) { suppressEvents = false; }
417 console.log('ag-Grid: do not use api for selection, call node.setSelected(value) instead');
418 if (suppressEvents) {
419 console.log('ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');
420 }
421 this.selectionController.deselectIndex(index);
422 };
423 GridApi.prototype.selectNode = function (node, tryMulti, suppressEvents) {
424 if (tryMulti === void 0) { tryMulti = false; }
425 if (suppressEvents === void 0) { suppressEvents = false; }
426 console.log('ag-Grid: API for selection is deprecated, call node.setSelected(value) instead');
427 if (suppressEvents) {
428 console.log('ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');
429 }
430 node.setSelectedParams({ newValue: true, clearSelection: !tryMulti });
431 };
432 GridApi.prototype.deselectNode = function (node, suppressEvents) {
433 if (suppressEvents === void 0) { suppressEvents = false; }
434 console.log('ag-Grid: API for selection is deprecated, call node.setSelected(value) instead');
435 if (suppressEvents) {
436 console.log('ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');
437 }
438 node.setSelectedParams({ newValue: false });
439 };
440 GridApi.prototype.selectAll = function () {
441 this.selectionController.selectAllRowNodes();
442 };
443 GridApi.prototype.deselectAll = function () {
444 this.selectionController.deselectAllRowNodes();
445 };
446 GridApi.prototype.selectAllFiltered = function () {
447 this.selectionController.selectAllRowNodes(true);
448 };
449 GridApi.prototype.deselectAllFiltered = function () {
450 this.selectionController.deselectAllRowNodes(true);
451 };
452 GridApi.prototype.recomputeAggregates = function () {
453 if (utils_1.Utils.missing(this.clientSideRowModel)) {
454 console.warn('cannot call recomputeAggregates unless using normal row model');
455 }
456 console.warn("recomputeAggregates is deprecated, please call api.refreshClientSideRowModel('aggregate') instead");
457 this.clientSideRowModel.refreshModel({ step: constants_1.Constants.STEP_AGGREGATE });
458 };
459 GridApi.prototype.sizeColumnsToFit = function () {
460 this.gridPanel.sizeColumnsToFit();
461 };
462 GridApi.prototype.showLoadingOverlay = function () {
463 this.gridPanel.showLoadingOverlay();
464 };
465 GridApi.prototype.showNoRowsOverlay = function () {
466 this.gridPanel.showNoRowsOverlay();
467 };
468 GridApi.prototype.hideOverlay = function () {
469 this.gridPanel.hideOverlay();
470 };
471 GridApi.prototype.isNodeSelected = function (node) {
472 console.log('ag-Grid: no need to call api.isNodeSelected(), just call node.isSelected() instead');
473 return node.isSelected();
474 };
475 GridApi.prototype.getSelectedNodesById = function () {
476 console.error('ag-Grid: since version 3.4, getSelectedNodesById no longer exists, use getSelectedNodes() instead');
477 return null;
478 };
479 GridApi.prototype.getSelectedNodes = function () {
480 return this.selectionController.getSelectedNodes();
481 };
482 GridApi.prototype.getSelectedRows = function () {
483 return this.selectionController.getSelectedRows();
484 };
485 GridApi.prototype.getBestCostNodeSelection = function () {
486 return this.selectionController.getBestCostNodeSelection();
487 };
488 GridApi.prototype.getRenderedNodes = function () {
489 return this.rowRenderer.getRenderedNodes();
490 };
491 GridApi.prototype.ensureColIndexVisible = function (index) {
492 console.warn('ag-Grid: ensureColIndexVisible(index) no longer supported, use ensureColumnVisible(colKey) instead.');
493 };
494 GridApi.prototype.ensureColumnVisible = function (key) {
495 this.gridPanel.ensureColumnVisible(key);
496 };
497 // Valid values for position are bottom, middle and top
498 GridApi.prototype.ensureIndexVisible = function (index, position) {
499 this.gridPanel.ensureIndexVisible(index, position);
500 };
501 // Valid values for position are bottom, middle and top
502 GridApi.prototype.ensureNodeVisible = function (comparator, position) {
503 this.gridCore.ensureNodeVisible(comparator, position);
504 };
505 GridApi.prototype.forEachLeafNode = function (callback) {
506 if (utils_1.Utils.missing(this.clientSideRowModel)) {
507 console.log('cannot call forEachNode unless using normal row model');
508 }
509 this.clientSideRowModel.forEachLeafNode(callback);
510 };
511 GridApi.prototype.forEachNode = function (callback) {
512 this.rowModel.forEachNode(callback);
513 };
514 GridApi.prototype.forEachNodeAfterFilter = function (callback) {
515 if (utils_1.Utils.missing(this.clientSideRowModel)) {
516 console.log('cannot call forEachNodeAfterFilter unless using normal row model');
517 }
518 this.clientSideRowModel.forEachNodeAfterFilter(callback);
519 };
520 GridApi.prototype.forEachNodeAfterFilterAndSort = function (callback) {
521 if (utils_1.Utils.missing(this.clientSideRowModel)) {
522 console.log('cannot call forEachNodeAfterFilterAndSort unless using normal row model');
523 }
524 this.clientSideRowModel.forEachNodeAfterFilterAndSort(callback);
525 };
526 GridApi.prototype.getFilterApiForColDef = function (colDef) {
527 console.warn('ag-grid API method getFilterApiForColDef deprecated, use getFilterApi instead');
528 return this.getFilterInstance(colDef);
529 };
530 GridApi.prototype.getFilterInstance = function (key) {
531 var column = this.columnController.getPrimaryColumn(key);
532 if (column) {
533 return this.filterManager.getFilterComponent(column).resolveNow(null, function (filterComp) { return filterComp; });
534 }
535 };
536 GridApi.prototype.getFilterApi = function (key) {
537 console.warn('ag-Grid: getFilterApi is deprecated, use getFilterInstance instead');
538 return this.getFilterInstance(key);
539 };
540 GridApi.prototype.destroyFilter = function (key) {
541 var column = this.columnController.getPrimaryColumn(key);
542 if (column) {
543 return this.filterManager.destroyFilter(column, "filterDestroyed");
544 }
545 };
546 GridApi.prototype.getColumnDef = function (key) {
547 var column = this.columnController.getPrimaryColumn(key);
548 if (column) {
549 return column.getColDef();
550 }
551 else {
552 return null;
553 }
554 };
555 GridApi.prototype.onFilterChanged = function () {
556 this.filterManager.onFilterChanged();
557 };
558 GridApi.prototype.onSortChanged = function () {
559 this.sortController.onSortChanged();
560 };
561 GridApi.prototype.setSortModel = function (sortModel, source) {
562 if (source === void 0) { source = "api"; }
563 this.sortController.setSortModel(sortModel, source);
564 };
565 GridApi.prototype.getSortModel = function () {
566 return this.sortController.getSortModel();
567 };
568 GridApi.prototype.setFilterModel = function (model) {
569 this.filterManager.setFilterModel(model);
570 };
571 GridApi.prototype.getFilterModel = function () {
572 return this.filterManager.getFilterModel();
573 };
574 GridApi.prototype.getFocusedCell = function () {
575 return this.focusedCellController.getFocusedCell();
576 };
577 GridApi.prototype.clearFocusedCell = function () {
578 return this.focusedCellController.clearFocusedCell();
579 };
580 GridApi.prototype.setFocusedCell = function (rowIndex, colKey, floating) {
581 this.focusedCellController.setFocusedCell(rowIndex, colKey, floating, true);
582 };
583 GridApi.prototype.setSuppressRowDrag = function (value) {
584 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_SUPPRESS_ROW_DRAG, value);
585 };
586 GridApi.prototype.setHeaderHeight = function (headerHeight) {
587 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_HEADER_HEIGHT, headerHeight);
588 this.doLayout();
589 };
590 GridApi.prototype.setGridAutoHeight = function (gridAutoHeight) {
591 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_GRID_AUTO_HEIGHT, gridAutoHeight);
592 };
593 GridApi.prototype.getPreferredWidth = function () {
594 return this.gridCore.getPreferredWidth();
595 };
596 GridApi.prototype.setGroupHeaderHeight = function (headerHeight) {
597 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT, headerHeight);
598 this.doLayout();
599 };
600 GridApi.prototype.setFloatingFiltersHeight = function (headerHeight) {
601 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT, headerHeight);
602 this.doLayout();
603 };
604 GridApi.prototype.setPivotGroupHeaderHeight = function (headerHeight) {
605 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT, headerHeight);
606 this.doLayout();
607 };
608 GridApi.prototype.setPivotHeaderHeight = function (headerHeight) {
609 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT, headerHeight);
610 this.doLayout();
611 };
612 GridApi.prototype.showToolPanel = function (show) {
613 this.gridCore.showToolPanel(show);
614 };
615 GridApi.prototype.setSuppressClipboardPaste = function (value) {
616 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_SUPPRESS_CLIPBOARD_PASTE, value);
617 };
618 GridApi.prototype.isToolPanelShowing = function () {
619 return this.gridCore.isToolPanelShowing();
620 };
621 GridApi.prototype.doLayout = function () {
622 this.gridPanel.checkViewportAndScrolls();
623 };
624 GridApi.prototype.resetRowHeights = function () {
625 if (utils_1.Utils.exists(this.clientSideRowModel)) {
626 this.clientSideRowModel.resetRowHeights();
627 }
628 };
629 GridApi.prototype.setGroupRemoveSingleChildren = function (value) {
630 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN, value);
631 };
632 GridApi.prototype.setGroupRemoveLowestSingleChildren = function (value) {
633 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN, value);
634 };
635 GridApi.prototype.onRowHeightChanged = function () {
636 if (utils_1.Utils.exists(this.clientSideRowModel)) {
637 this.clientSideRowModel.onRowHeightChanged();
638 }
639 };
640 GridApi.prototype.getValue = function (colKey, rowNode) {
641 var column = this.columnController.getPrimaryColumn(colKey);
642 if (utils_1.Utils.missing(column)) {
643 column = this.columnController.getGridColumn(colKey);
644 }
645 if (utils_1.Utils.missing(column)) {
646 return null;
647 }
648 else {
649 return this.valueService.getValue(column, rowNode);
650 }
651 };
652 GridApi.prototype.addEventListener = function (eventType, listener) {
653 var async = this.gridOptionsWrapper.useAsyncEvents();
654 this.eventService.addEventListener(eventType, listener, async);
655 };
656 GridApi.prototype.addGlobalListener = function (listener) {
657 var async = this.gridOptionsWrapper.useAsyncEvents();
658 this.eventService.addGlobalListener(listener, async);
659 };
660 GridApi.prototype.removeEventListener = function (eventType, listener) {
661 var async = this.gridOptionsWrapper.useAsyncEvents();
662 this.eventService.removeEventListener(eventType, listener, async);
663 };
664 GridApi.prototype.removeGlobalListener = function (listener) {
665 var async = this.gridOptionsWrapper.useAsyncEvents();
666 this.eventService.removeGlobalListener(listener, async);
667 };
668 GridApi.prototype.dispatchEvent = function (event) {
669 this.eventService.dispatchEvent(event);
670 };
671 GridApi.prototype.destroy = function () {
672 this.context.destroy();
673 };
674 GridApi.prototype.resetQuickFilter = function () {
675 this.rowModel.forEachNode(function (node) { return node.quickFilterAggregateText = null; });
676 };
677 GridApi.prototype.getRangeSelections = function () {
678 if (this.rangeController) {
679 return this.rangeController.getCellRanges();
680 }
681 else {
682 console.warn('ag-Grid: cell range selection is only available in ag-Grid Enterprise');
683 return null;
684 }
685 };
686 GridApi.prototype.camelCaseToHumanReadable = function (camelCase) {
687 return utils_1.Utils.camelCaseToHumanText(camelCase);
688 };
689 GridApi.prototype.addRangeSelection = function (rangeSelection) {
690 if (!this.rangeController) {
691 console.warn('ag-Grid: cell range selection is only available in ag-Grid Enterprise');
692 }
693 this.rangeController.addRange(rangeSelection);
694 };
695 GridApi.prototype.clearRangeSelection = function () {
696 if (!this.rangeController) {
697 console.warn('ag-Grid: cell range selection is only available in ag-Grid Enterprise');
698 }
699 this.rangeController.clearSelection();
700 };
701 GridApi.prototype.copySelectedRowsToClipboard = function (includeHeader, columnKeys) {
702 if (!this.clipboardService) {
703 console.warn('ag-Grid: clipboard is only available in ag-Grid Enterprise');
704 }
705 this.clipboardService.copySelectedRowsToClipboard(includeHeader, columnKeys);
706 };
707 GridApi.prototype.copySelectedRangeToClipboard = function (includeHeader) {
708 if (!this.clipboardService) {
709 console.warn('ag-Grid: clipboard is only available in ag-Grid Enterprise');
710 }
711 this.clipboardService.copySelectedRangeToClipboard(includeHeader);
712 };
713 GridApi.prototype.copySelectedRangeDown = function () {
714 if (!this.clipboardService) {
715 console.warn('ag-Grid: clipboard is only available in ag-Grid Enterprise');
716 }
717 this.clipboardService.copyRangeDown();
718 };
719 GridApi.prototype.showColumnMenuAfterButtonClick = function (colKey, buttonElement) {
720 var column = this.columnController.getPrimaryColumn(colKey);
721 this.menuFactory.showMenuAfterButtonClick(column, buttonElement);
722 };
723 GridApi.prototype.showColumnMenuAfterMouseClick = function (colKey, mouseEvent) {
724 var column = this.columnController.getPrimaryColumn(colKey);
725 this.menuFactory.showMenuAfterMouseEvent(column, mouseEvent);
726 };
727 GridApi.prototype.hidePopupMenu = function () {
728 // hide the context menu if in enterprise
729 if (this.contextMenuFactory) {
730 this.contextMenuFactory.hideActiveMenu();
731 }
732 // and hide the column menu always
733 this.menuFactory.hideActiveMenu();
734 };
735 GridApi.prototype.setPopupParent = function (ePopupParent) {
736 this.gridOptionsWrapper.setProperty(gridOptionsWrapper_1.GridOptionsWrapper.PROP_POPUP_PARENT, ePopupParent);
737 };
738 GridApi.prototype.tabToNextCell = function () {
739 return this.rowRenderer.tabToNextCell(false);
740 };
741 GridApi.prototype.tabToPreviousCell = function () {
742 return this.rowRenderer.tabToNextCell(true);
743 };
744 GridApi.prototype.getCellRendererInstances = function (params) {
745 if (params === void 0) { params = {}; }
746 return this.rowRenderer.getCellRendererInstances(params);
747 };
748 GridApi.prototype.getCellEditorInstances = function (params) {
749 if (params === void 0) { params = {}; }
750 return this.rowRenderer.getCellEditorInstances(params);
751 };
752 GridApi.prototype.getEditingCells = function () {
753 return this.rowRenderer.getEditingCells();
754 };
755 GridApi.prototype.stopEditing = function (cancel) {
756 if (cancel === void 0) { cancel = false; }
757 this.rowRenderer.stopEditing(cancel);
758 };
759 GridApi.prototype.startEditingCell = function (params) {
760 var column = this.columnController.getGridColumn(params.colKey);
761 if (!column) {
762 console.warn("ag-Grid: no column found for " + params.colKey);
763 return;
764 }
765 var gridCellDef = {
766 rowIndex: params.rowIndex,
767 floating: params.rowPinned,
768 column: column
769 };
770 var gridCell = new gridCell_1.GridCell(gridCellDef);
771 var notPinned = utils_1.Utils.missing(params.rowPinned);
772 if (notPinned) {
773 this.gridPanel.ensureIndexVisible(params.rowIndex);
774 }
775 this.rowRenderer.startEditingCell(gridCell, params.keyPress, params.charPress);
776 };
777 GridApi.prototype.addAggFunc = function (key, aggFunc) {
778 if (this.aggFuncService) {
779 this.aggFuncService.addAggFunc(key, aggFunc);
780 }
781 };
782 GridApi.prototype.addAggFuncs = function (aggFuncs) {
783 if (this.aggFuncService) {
784 this.aggFuncService.addAggFuncs(aggFuncs);
785 }
786 };
787 GridApi.prototype.clearAggFuncs = function () {
788 if (this.aggFuncService) {
789 this.aggFuncService.clear();
790 }
791 };
792 GridApi.prototype.updateRowData = function (rowDataTransaction) {
793 var res = null;
794 if (this.clientSideRowModel) {
795 res = this.clientSideRowModel.updateRowData(rowDataTransaction);
796 }
797 else if (this.infinitePageRowModel) {
798 this.infinitePageRowModel.updateRowData(rowDataTransaction);
799 }
800 else {
801 console.error('ag-Grid: updateRowData() only works with ClientSideRowModel and InfiniteRowModel.');
802 }
803 // do change detection for all present cells
804 if (!this.gridOptionsWrapper.isSuppressChangeDetection()) {
805 this.rowRenderer.refreshCells();
806 }
807 return res;
808 };
809 GridApi.prototype.batchUpdateRowData = function (rowDataTransaction, callback) {
810 if (!this.clientSideRowModel) {
811 console.error('ag-Grid: api.batchUpdateRowData() only works with ClientSideRowModel.');
812 return;
813 }
814 this.clientSideRowModel.batchUpdateRowData(rowDataTransaction, callback);
815 };
816 GridApi.prototype.insertItemsAtIndex = function (index, items, skipRefresh) {
817 if (skipRefresh === void 0) { skipRefresh = false; }
818 console.warn('ag-Grid: insertItemsAtIndex() is deprecated, use updateRowData(transaction) instead.');
819 this.updateRowData({ add: items, addIndex: index, update: null, remove: null });
820 };
821 GridApi.prototype.removeItems = function (rowNodes, skipRefresh) {
822 if (skipRefresh === void 0) { skipRefresh = false; }
823 console.warn('ag-Grid: removeItems() is deprecated, use updateRowData(transaction) instead.');
824 var dataToRemove = rowNodes.map(function (rowNode) { return rowNode.data; });
825 this.updateRowData({ add: null, addIndex: null, update: null, remove: dataToRemove });
826 };
827 GridApi.prototype.addItems = function (items, skipRefresh) {
828 if (skipRefresh === void 0) { skipRefresh = false; }
829 console.warn('ag-Grid: addItems() is deprecated, use updateRowData(transaction) instead.');
830 this.updateRowData({ add: items, addIndex: null, update: null, remove: null });
831 };
832 GridApi.prototype.refreshVirtualPageCache = function () {
833 console.warn('ag-Grid: refreshVirtualPageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead');
834 this.refreshInfiniteCache();
835 };
836 GridApi.prototype.refreshInfinitePageCache = function () {
837 console.warn('ag-Grid: refreshInfinitePageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead');
838 this.refreshInfiniteCache();
839 };
840 GridApi.prototype.refreshInfiniteCache = function () {
841 if (this.infinitePageRowModel) {
842 this.infinitePageRowModel.refreshCache();
843 }
844 else {
845 console.warn("ag-Grid: api.refreshInfiniteCache is only available when rowModelType='infinite'.");
846 }
847 };
848 GridApi.prototype.purgeVirtualPageCache = function () {
849 console.warn('ag-Grid: purgeVirtualPageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead');
850 this.purgeInfinitePageCache();
851 };
852 GridApi.prototype.purgeInfinitePageCache = function () {
853 console.warn('ag-Grid: purgeInfinitePageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead');
854 this.purgeInfiniteCache();
855 };
856 GridApi.prototype.purgeInfiniteCache = function () {
857 if (this.infinitePageRowModel) {
858 this.infinitePageRowModel.purgeCache();
859 }
860 else {
861 console.warn("ag-Grid: api.purgeInfiniteCache is only available when rowModelType='infinite'.");
862 }
863 };
864 // DEPRECATED
865 GridApi.prototype.purgeEnterpriseCache = function (route) {
866 console.warn("ag-grid: since version 18.x, api.purgeEnterpriseCache() should be replaced with api.purgeServerSideCache()");
867 this.purgeServerSideCache(route);
868 };
869 GridApi.prototype.purgeServerSideCache = function (route) {
870 if (this.serverSideRowModel) {
871 this.serverSideRowModel.purgeCache(route);
872 }
873 else {
874 console.warn("ag-Grid: api.purgeServerSideCache is only available when rowModelType='enterprise'.");
875 }
876 };
877 // public removeFromEnterpriseCache(route: string[], items: any[]): void {
878 // if (this.serverSideRowModel) {
879 // this.serverSideRowModel.removeFromCache(route, items);
880 // } else {
881 // console.warn(`ag-Grid: api.removeFromEnterpriseCache is only available when rowModelType='enterprise'.`);
882 // }
883 // }
884 //
885 // public addToEnterpriseCache(route: string[], items: any[], index: number): void {
886 // if (this.serverSideRowModel) {
887 // this.serverSideRowModel.addToCache(route, items, index);
888 // } else {
889 // console.warn(`ag-Grid: api.addToEnterpriseCache is only available when rowModelType='enterprise'.`);
890 // }
891 // }
892 GridApi.prototype.getVirtualRowCount = function () {
893 console.warn('ag-Grid: getVirtualRowCount() is now called getInfiniteRowCount(), please call getInfiniteRowCount() instead');
894 return this.getInfiniteRowCount();
895 };
896 GridApi.prototype.getInfiniteRowCount = function () {
897 if (this.infinitePageRowModel) {
898 return this.infinitePageRowModel.getVirtualRowCount();
899 }
900 else {
901 console.warn("ag-Grid: api.getVirtualRowCount is only available when rowModelType='virtual'.");
902 }
903 };
904 GridApi.prototype.isMaxRowFound = function () {
905 if (this.infinitePageRowModel) {
906 return this.infinitePageRowModel.isMaxRowFound();
907 }
908 else {
909 console.warn("ag-Grid: api.isMaxRowFound is only available when rowModelType='virtual'.");
910 }
911 };
912 GridApi.prototype.setVirtualRowCount = function (rowCount, maxRowFound) {
913 console.warn('ag-Grid: setVirtualRowCount() is now called setInfiniteRowCount(), please call setInfiniteRowCount() instead');
914 this.setInfiniteRowCount(rowCount, maxRowFound);
915 };
916 GridApi.prototype.setInfiniteRowCount = function (rowCount, maxRowFound) {
917 if (this.infinitePageRowModel) {
918 this.infinitePageRowModel.setVirtualRowCount(rowCount, maxRowFound);
919 }
920 else {
921 console.warn("ag-Grid: api.setVirtualRowCount is only available when rowModelType='virtual'.");
922 }
923 };
924 GridApi.prototype.getVirtualPageState = function () {
925 console.warn('ag-Grid: getVirtualPageState() is now called getCacheBlockState(), please call getCacheBlockState() instead');
926 return this.getCacheBlockState();
927 };
928 GridApi.prototype.getInfinitePageState = function () {
929 console.warn('ag-Grid: getInfinitePageState() is now called getCacheBlockState(), please call getCacheBlockState() instead');
930 return this.getCacheBlockState();
931 };
932 GridApi.prototype.getCacheBlockState = function () {
933 if (this.infinitePageRowModel) {
934 return this.infinitePageRowModel.getBlockState();
935 }
936 else if (this.serverSideRowModel) {
937 return this.serverSideRowModel.getBlockState();
938 }
939 else {
940 console.warn("ag-Grid: api.getCacheBlockState() is only available when rowModelType='infinite' or rowModelType='serverSide'.");
941 }
942 };
943 GridApi.prototype.checkGridSize = function () {
944 this.gridPanel.setBodyAndHeaderHeights();
945 };
946 GridApi.prototype.getFirstRenderedRow = function () {
947 console.log('in ag-Grid v12, getFirstRenderedRow() was renamed to getFirstDisplayedRow()');
948 return this.getFirstDisplayedRow();
949 };
950 GridApi.prototype.getFirstDisplayedRow = function () {
951 return this.rowRenderer.getFirstVirtualRenderedRow();
952 };
953 GridApi.prototype.getLastRenderedRow = function () {
954 console.log('in ag-Grid v12, getLastRenderedRow() was renamed to getLastDisplayedRow()');
955 return this.getLastDisplayedRow();
956 };
957 GridApi.prototype.getLastDisplayedRow = function () {
958 return this.rowRenderer.getLastVirtualRenderedRow();
959 };
960 GridApi.prototype.getDisplayedRowAtIndex = function (index) {
961 return this.rowModel.getRow(index);
962 };
963 GridApi.prototype.getDisplayedRowCount = function () {
964 return this.rowModel.getRowCount();
965 };
966 GridApi.prototype.paginationIsLastPageFound = function () {
967 return this.paginationProxy.isLastPageFound();
968 };
969 GridApi.prototype.paginationGetPageSize = function () {
970 return this.paginationProxy.getPageSize();
971 };
972 GridApi.prototype.paginationSetPageSize = function (size) {
973 this.gridOptionsWrapper.setProperty('paginationPageSize', size);
974 };
975 GridApi.prototype.paginationGetCurrentPage = function () {
976 return this.paginationProxy.getCurrentPage();
977 };
978 GridApi.prototype.paginationGetTotalPages = function () {
979 return this.paginationProxy.getTotalPages();
980 };
981 GridApi.prototype.paginationGetRowCount = function () {
982 return this.paginationProxy.getTotalRowCount();
983 };
984 GridApi.prototype.paginationGoToNextPage = function () {
985 this.paginationProxy.goToNextPage();
986 };
987 GridApi.prototype.paginationGoToPreviousPage = function () {
988 this.paginationProxy.goToPreviousPage();
989 };
990 GridApi.prototype.paginationGoToFirstPage = function () {
991 this.paginationProxy.goToFirstPage();
992 };
993 GridApi.prototype.paginationGoToLastPage = function () {
994 this.paginationProxy.goToLastPage();
995 };
996 GridApi.prototype.paginationGoToPage = function (page) {
997 this.paginationProxy.goToPage(page);
998 };
999 __decorate([
1000 context_1.Autowired('immutableService'),
1001 __metadata("design:type", immutableService_1.ImmutableService)
1002 ], GridApi.prototype, "immutableService", void 0);
1003 __decorate([
1004 context_1.Autowired('csvCreator'),
1005 __metadata("design:type", csvCreator_1.CsvCreator)
1006 ], GridApi.prototype, "csvCreator", void 0);
1007 __decorate([
1008 context_1.Optional('excelCreator'),
1009 __metadata("design:type", Object)
1010 ], GridApi.prototype, "excelCreator", void 0);
1011 __decorate([
1012 context_1.Autowired('gridCore'),
1013 __metadata("design:type", gridCore_1.GridCore)
1014 ], GridApi.prototype, "gridCore", void 0);
1015 __decorate([
1016 context_1.Autowired('rowRenderer'),
1017 __metadata("design:type", rowRenderer_1.RowRenderer)
1018 ], GridApi.prototype, "rowRenderer", void 0);
1019 __decorate([
1020 context_1.Autowired('filterManager'),
1021 __metadata("design:type", filterManager_1.FilterManager)
1022 ], GridApi.prototype, "filterManager", void 0);
1023 __decorate([
1024 context_1.Autowired('columnController'),
1025 __metadata("design:type", columnController_1.ColumnController)
1026 ], GridApi.prototype, "columnController", void 0);
1027 __decorate([
1028 context_1.Autowired('selectionController'),
1029 __metadata("design:type", selectionController_1.SelectionController)
1030 ], GridApi.prototype, "selectionController", void 0);
1031 __decorate([
1032 context_1.Autowired('gridOptionsWrapper'),
1033 __metadata("design:type", gridOptionsWrapper_1.GridOptionsWrapper)
1034 ], GridApi.prototype, "gridOptionsWrapper", void 0);
1035 __decorate([
1036 context_1.Autowired('valueService'),
1037 __metadata("design:type", valueService_1.ValueService)
1038 ], GridApi.prototype, "valueService", void 0);
1039 __decorate([
1040 context_1.Autowired('alignedGridsService'),
1041 __metadata("design:type", alignedGridsService_1.AlignedGridsService)
1042 ], GridApi.prototype, "alignedGridsService", void 0);
1043 __decorate([
1044 context_1.Autowired('eventService'),
1045 __metadata("design:type", eventService_1.EventService)
1046 ], GridApi.prototype, "eventService", void 0);
1047 __decorate([
1048 context_1.Autowired('pinnedRowModel'),
1049 __metadata("design:type", pinnedRowModel_1.PinnedRowModel)
1050 ], GridApi.prototype, "pinnedRowModel", void 0);
1051 __decorate([
1052 context_1.Autowired('context'),
1053 __metadata("design:type", context_1.Context)
1054 ], GridApi.prototype, "context", void 0);
1055 __decorate([
1056 context_1.Autowired('rowModel'),
1057 __metadata("design:type", Object)
1058 ], GridApi.prototype, "rowModel", void 0);
1059 __decorate([
1060 context_1.Autowired('sortController'),
1061 __metadata("design:type", sortController_1.SortController)
1062 ], GridApi.prototype, "sortController", void 0);
1063 __decorate([
1064 context_1.Autowired('paginationProxy'),
1065 __metadata("design:type", paginationProxy_1.PaginationProxy)
1066 ], GridApi.prototype, "paginationProxy", void 0);
1067 __decorate([
1068 context_1.Autowired('focusedCellController'),
1069 __metadata("design:type", focusedCellController_1.FocusedCellController)
1070 ], GridApi.prototype, "focusedCellController", void 0);
1071 __decorate([
1072 context_1.Optional('rangeController'),
1073 __metadata("design:type", Object)
1074 ], GridApi.prototype, "rangeController", void 0);
1075 __decorate([
1076 context_1.Optional('clipboardService'),
1077 __metadata("design:type", Object)
1078 ], GridApi.prototype, "clipboardService", void 0);
1079 __decorate([
1080 context_1.Optional('aggFuncService'),
1081 __metadata("design:type", Object)
1082 ], GridApi.prototype, "aggFuncService", void 0);
1083 __decorate([
1084 context_1.Autowired('menuFactory'),
1085 __metadata("design:type", Object)
1086 ], GridApi.prototype, "menuFactory", void 0);
1087 __decorate([
1088 context_1.Optional('contextMenuFactory'),
1089 __metadata("design:type", Object)
1090 ], GridApi.prototype, "contextMenuFactory", void 0);
1091 __decorate([
1092 context_1.Autowired('cellRendererFactory'),
1093 __metadata("design:type", cellRendererFactory_1.CellRendererFactory)
1094 ], GridApi.prototype, "cellRendererFactory", void 0);
1095 __decorate([
1096 context_1.Autowired('cellEditorFactory'),
1097 __metadata("design:type", cellEditorFactory_1.CellEditorFactory)
1098 ], GridApi.prototype, "cellEditorFactory", void 0);
1099 __decorate([
1100 context_1.Autowired('valueCache'),
1101 __metadata("design:type", valueCache_1.ValueCache)
1102 ], GridApi.prototype, "valueCache", void 0);
1103 __decorate([
1104 context_1.Optional('toolPanelComp'),
1105 __metadata("design:type", Object)
1106 ], GridApi.prototype, "toolPanelComp", void 0);
1107 __decorate([
1108 context_1.Autowired('animationFrameService'),
1109 __metadata("design:type", animationFrameService_1.AnimationFrameService)
1110 ], GridApi.prototype, "animationFrameService", void 0);
1111 __decorate([
1112 context_1.PostConstruct,
1113 __metadata("design:type", Function),
1114 __metadata("design:paramtypes", []),
1115 __metadata("design:returntype", void 0)
1116 ], GridApi.prototype, "init", null);
1117 GridApi = __decorate([
1118 context_1.Bean('gridApi')
1119 ], GridApi);
1120 return GridApi;
1121}());
1122exports.GridApi = GridApi;