1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | "use strict";
|
8 | var __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 | };
|
14 | var __metadata = (this && this.__metadata) || function (k, v) {
|
15 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
16 | };
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | var eventService_1 = require("../eventService");
|
19 | var utils_1 = require("../utils");
|
20 | var context_1 = require("../context/context");
|
21 | var gridOptionsWrapper_1 = require("../gridOptionsWrapper");
|
22 | var columnUtils_1 = require("../columnController/columnUtils");
|
23 | var columnApi_1 = require("../columnController/columnApi");
|
24 | var gridApi_1 = require("../gridApi");
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | var Column = (function () {
|
32 | function Column(colDef, colId, primary) {
|
33 | this.moving = false;
|
34 | this.menuVisible = false;
|
35 | this.filterActive = false;
|
36 | this.eventService = new eventService_1.EventService();
|
37 | this.rowGroupActive = false;
|
38 | this.pivotActive = false;
|
39 | this.aggregationActive = false;
|
40 | this.colDef = colDef;
|
41 | this.visible = !colDef.hide;
|
42 | this.sort = colDef.sort;
|
43 | this.sortedAt = colDef.sortedAt;
|
44 | this.colId = colId;
|
45 | this.primary = primary;
|
46 | this.lockPosition = colDef.lockPosition === true;
|
47 | this.lockPinned = colDef.lockPinned === true;
|
48 | this.lockVisible = colDef.lockVisible === true;
|
49 | }
|
50 | Column.prototype.isLockPosition = function () {
|
51 | return this.lockPosition;
|
52 | };
|
53 | Column.prototype.isLockVisible = function () {
|
54 | return this.lockVisible;
|
55 | };
|
56 | Column.prototype.isLockPinned = function () {
|
57 | return this.lockPinned;
|
58 | };
|
59 | Column.prototype.setParent = function (parent) {
|
60 | this.parent = parent;
|
61 | };
|
62 | Column.prototype.getParent = function () {
|
63 | return this.parent;
|
64 | };
|
65 |
|
66 | Column.prototype.initialise = function () {
|
67 | this.setPinned(this.colDef.pinned);
|
68 | var minColWidth = this.gridOptionsWrapper.getMinColWidth();
|
69 | var maxColWidth = this.gridOptionsWrapper.getMaxColWidth();
|
70 | if (this.colDef.minWidth) {
|
71 | this.minWidth = this.colDef.minWidth;
|
72 | }
|
73 | else {
|
74 | this.minWidth = minColWidth;
|
75 | }
|
76 | if (this.colDef.maxWidth) {
|
77 | this.maxWidth = this.colDef.maxWidth;
|
78 | }
|
79 | else {
|
80 | this.maxWidth = maxColWidth;
|
81 | }
|
82 | this.actualWidth = this.columnUtils.calculateColInitialWidth(this.colDef);
|
83 | var suppressDotNotation = this.gridOptionsWrapper.isSuppressFieldDotNotation();
|
84 | this.fieldContainsDots = utils_1.Utils.exists(this.colDef.field) && this.colDef.field.indexOf('.') >= 0 && !suppressDotNotation;
|
85 | this.tooltipFieldContainsDots = utils_1.Utils.exists(this.colDef.tooltipField) && this.colDef.tooltipField.indexOf('.') >= 0 && !suppressDotNotation;
|
86 | this.validate();
|
87 | };
|
88 | Column.prototype.isEmptyGroup = function () {
|
89 | return false;
|
90 | };
|
91 | Column.prototype.isRowGroupDisplayed = function (colId) {
|
92 | if (utils_1.Utils.missing(this.colDef) || utils_1.Utils.missing(this.colDef.showRowGroup)) {
|
93 | return false;
|
94 | }
|
95 | var showingAllGroups = this.colDef.showRowGroup === true;
|
96 | var showingThisGroup = this.colDef.showRowGroup === colId;
|
97 | return showingAllGroups || showingThisGroup;
|
98 | };
|
99 | Column.prototype.getUniqueId = function () {
|
100 | return this.getId();
|
101 | };
|
102 | Column.prototype.isPrimary = function () {
|
103 | return this.primary;
|
104 | };
|
105 | Column.prototype.isFilterAllowed = function () {
|
106 | return this.primary && !this.colDef.suppressFilter;
|
107 | };
|
108 | Column.prototype.isFieldContainsDots = function () {
|
109 | return this.fieldContainsDots;
|
110 | };
|
111 | Column.prototype.isTooltipFieldContainsDots = function () {
|
112 | return this.tooltipFieldContainsDots;
|
113 | };
|
114 | Column.prototype.validate = function () {
|
115 | var colDefAny = this.colDef;
|
116 | if (!this.gridOptionsWrapper.isEnterprise()) {
|
117 | var itemsNotAllowedWithoutEnterprise = ['enableRowGroup', 'rowGroup', 'rowGroupIndex', 'enablePivot', 'pivot', 'pivotIndex', 'aggFunc'];
|
118 | itemsNotAllowedWithoutEnterprise.forEach(function (item) {
|
119 | if (utils_1.Utils.exists(colDefAny[item])) {
|
120 | console.warn("ag-Grid: " + item + " is only valid in ag-Grid-Enterprise, your column definition should not have " + item);
|
121 | }
|
122 | });
|
123 | }
|
124 | if (this.gridOptionsWrapper.isTreeData()) {
|
125 | var itemsNotAllowedWithTreeData = ['enableRowGroup', 'rowGroup', 'rowGroupIndex', 'enablePivot', 'pivot', 'pivotIndex'];
|
126 | itemsNotAllowedWithTreeData.forEach(function (item) {
|
127 | if (utils_1.Utils.exists(colDefAny[item])) {
|
128 | console.warn("ag-Grid: " + item + " is not possible when doing tree data, your column definition should not have " + item);
|
129 | }
|
130 | });
|
131 | }
|
132 | if (utils_1.Utils.exists(this.colDef.width) && typeof this.colDef.width !== 'number') {
|
133 | console.warn('ag-Grid: colDef.width should be a number, not ' + typeof this.colDef.width);
|
134 | }
|
135 | if (utils_1.Utils.get(this, 'colDef.cellRendererParams.restrictToOneGroup', null)) {
|
136 | console.warn('ag-Grid: Since ag-grid 11.0.0 cellRendererParams.restrictToOneGroup is deprecated. You should use showRowGroup');
|
137 | }
|
138 | if (utils_1.Utils.get(this, 'colDef.cellRendererParams.keyMap', null)) {
|
139 | console.warn('ag-Grid: Since ag-grid 11.0.0 cellRendererParams.keyMap is deprecated. You should use colDef.keyCreator');
|
140 | }
|
141 | if (utils_1.Utils.get(this, 'colDef.cellRendererParams.keyMap', null)) {
|
142 | console.warn('ag-Grid: Since ag-grid 11.0.0 cellRendererParams.keyMap is deprecated. You should use colDef.keyCreator');
|
143 | }
|
144 | if (colDefAny.floatingCellRenderer) {
|
145 | console.warn('ag-Grid: since v11, floatingCellRenderer is now pinnedRowCellRenderer');
|
146 | this.colDef.pinnedRowCellRenderer = colDefAny.floatingCellRenderer;
|
147 | }
|
148 | if (colDefAny.floatingRendererFramework) {
|
149 | console.warn('ag-Grid: since v11, floatingRendererFramework is now pinnedRowCellRendererFramework');
|
150 | this.colDef.pinnedRowCellRendererFramework = colDefAny.floatingRendererFramework;
|
151 | }
|
152 | if (colDefAny.floatingRendererParams) {
|
153 | console.warn('ag-Grid: since v11, floatingRendererParams is now pinnedRowCellRendererParams');
|
154 | this.colDef.pinnedRowCellRendererParams = colDefAny.floatingRendererParams;
|
155 | }
|
156 | if (colDefAny.floatingValueFormatter) {
|
157 | console.warn('ag-Grid: since v11, floatingValueFormatter is now pinnedRowValueFormatter');
|
158 | this.colDef.pinnedRowValueFormatter = colDefAny.floatingValueFormatter;
|
159 | }
|
160 | if (colDefAny.cellFormatter) {
|
161 | console.warn('ag-Grid: since v12, cellFormatter is now valueFormatter');
|
162 | if (utils_1.Utils.missing(this.colDef.valueFormatter)) {
|
163 | this.colDef.valueFormatter = colDefAny.cellFormatter;
|
164 | }
|
165 | }
|
166 | if (colDefAny.headerCellTemplate) {
|
167 | console.warn('ag-Grid: since v15, headerCellTemplate is gone, use header component instead.');
|
168 | }
|
169 | if (colDefAny.headerCellRenderer) {
|
170 | console.warn('ag-Grid: since v15, headerCellRenderer is gone, use header component instead.');
|
171 | }
|
172 | if (colDefAny.volatile) {
|
173 | console.warn('ag-Grid: since v16, colDef.volatile is gone, please check refresh docs on how to refresh specific cells.');
|
174 | }
|
175 | };
|
176 | Column.prototype.addEventListener = function (eventType, listener) {
|
177 | this.eventService.addEventListener(eventType, listener);
|
178 | };
|
179 | Column.prototype.removeEventListener = function (eventType, listener) {
|
180 | this.eventService.removeEventListener(eventType, listener);
|
181 | };
|
182 | Column.prototype.createIsColumnFuncParams = function (rowNode) {
|
183 | return {
|
184 | node: rowNode,
|
185 | data: rowNode.data,
|
186 | column: this,
|
187 | colDef: this.colDef,
|
188 | context: this.gridOptionsWrapper.getContext(),
|
189 | api: this.gridOptionsWrapper.getApi(),
|
190 | columnApi: this.gridOptionsWrapper.getColumnApi()
|
191 | };
|
192 | };
|
193 | Column.prototype.isSuppressNavigable = function (rowNode) {
|
194 |
|
195 | if (typeof this.colDef.suppressNavigable === 'boolean') {
|
196 | return this.colDef.suppressNavigable;
|
197 | }
|
198 |
|
199 | if (typeof this.colDef.suppressNavigable === 'function') {
|
200 | var params = this.createIsColumnFuncParams(rowNode);
|
201 | var userFunc = this.colDef.suppressNavigable;
|
202 | return userFunc(params);
|
203 | }
|
204 | return false;
|
205 | };
|
206 | Column.prototype.isCellEditable = function (rowNode) {
|
207 |
|
208 | if (rowNode.group && !this.gridOptionsWrapper.isEnableGroupEdit()) {
|
209 | return false;
|
210 | }
|
211 | return this.isColumnFunc(rowNode, this.colDef.editable);
|
212 | };
|
213 | Column.prototype.isRowDrag = function (rowNode) {
|
214 | return this.isColumnFunc(rowNode, this.colDef.rowDrag);
|
215 | };
|
216 | Column.prototype.isCellCheckboxSelection = function (rowNode) {
|
217 | return this.isColumnFunc(rowNode, this.colDef.checkboxSelection);
|
218 | };
|
219 | Column.prototype.isSuppressPaste = function (rowNode) {
|
220 | return this.isColumnFunc(rowNode, this.colDef ? this.colDef.suppressPaste : null);
|
221 | };
|
222 | Column.prototype.isResizable = function () {
|
223 | var enableColResize = this.gridOptionsWrapper.isEnableColResize();
|
224 | var suppressResize = this.colDef && this.colDef.suppressResize;
|
225 | return enableColResize && !suppressResize;
|
226 | };
|
227 | Column.prototype.isColumnFunc = function (rowNode, value) {
|
228 |
|
229 | if (typeof value === 'boolean') {
|
230 | return value;
|
231 | }
|
232 |
|
233 | if (typeof value === 'function') {
|
234 | var params = this.createIsColumnFuncParams(rowNode);
|
235 | var editableFunc = value;
|
236 | return editableFunc(params);
|
237 | }
|
238 | return false;
|
239 | };
|
240 | Column.prototype.setMoving = function (moving, source) {
|
241 | if (source === void 0) { source = "api"; }
|
242 | this.moving = moving;
|
243 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MOVING_CHANGED, source));
|
244 | };
|
245 | Column.prototype.createColumnEvent = function (type, source) {
|
246 | return {
|
247 | api: this.gridApi,
|
248 | columnApi: this.columnApi,
|
249 | type: type,
|
250 | column: this,
|
251 | columns: [this],
|
252 | source: source
|
253 | };
|
254 | };
|
255 | Column.prototype.isMoving = function () {
|
256 | return this.moving;
|
257 | };
|
258 | Column.prototype.getSort = function () {
|
259 | return this.sort;
|
260 | };
|
261 | Column.prototype.setSort = function (sort, source) {
|
262 | if (source === void 0) { source = "api"; }
|
263 | if (this.sort !== sort) {
|
264 | this.sort = sort;
|
265 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_SORT_CHANGED, source));
|
266 | }
|
267 | };
|
268 | Column.prototype.setMenuVisible = function (visible, source) {
|
269 | if (source === void 0) { source = "api"; }
|
270 | if (this.menuVisible !== visible) {
|
271 | this.menuVisible = visible;
|
272 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MENU_VISIBLE_CHANGED, source));
|
273 | }
|
274 | };
|
275 | Column.prototype.isMenuVisible = function () {
|
276 | return this.menuVisible;
|
277 | };
|
278 | Column.prototype.isSortAscending = function () {
|
279 | return this.sort === Column.SORT_ASC;
|
280 | };
|
281 | Column.prototype.isSortDescending = function () {
|
282 | return this.sort === Column.SORT_DESC;
|
283 | };
|
284 | Column.prototype.isSortNone = function () {
|
285 | return utils_1.Utils.missing(this.sort);
|
286 | };
|
287 | Column.prototype.isSorting = function () {
|
288 | return utils_1.Utils.exists(this.sort);
|
289 | };
|
290 | Column.prototype.getSortedAt = function () {
|
291 | return this.sortedAt;
|
292 | };
|
293 | Column.prototype.setSortedAt = function (sortedAt) {
|
294 | this.sortedAt = sortedAt;
|
295 | };
|
296 | Column.prototype.setAggFunc = function (aggFunc) {
|
297 | this.aggFunc = aggFunc;
|
298 | };
|
299 | Column.prototype.getAggFunc = function () {
|
300 | return this.aggFunc;
|
301 | };
|
302 | Column.prototype.getLeft = function () {
|
303 | return this.left;
|
304 | };
|
305 | Column.prototype.getOldLeft = function () {
|
306 | return this.oldLeft;
|
307 | };
|
308 | Column.prototype.getRight = function () {
|
309 | return this.left + this.actualWidth;
|
310 | };
|
311 | Column.prototype.setLeft = function (left, source) {
|
312 | if (source === void 0) { source = "api"; }
|
313 | this.oldLeft = this.left;
|
314 | if (this.left !== left) {
|
315 | this.left = left;
|
316 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LEFT_CHANGED, source));
|
317 | }
|
318 | };
|
319 | Column.prototype.isFilterActive = function () {
|
320 | return this.filterActive;
|
321 | };
|
322 | Column.prototype.setFilterActive = function (active, source) {
|
323 | if (source === void 0) { source = "api"; }
|
324 | if (this.filterActive !== active) {
|
325 | this.filterActive = active;
|
326 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FILTER_ACTIVE_CHANGED, source));
|
327 | }
|
328 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FILTER_CHANGED, source));
|
329 | };
|
330 | Column.prototype.setPinned = function (pinned) {
|
331 | if (pinned === true || pinned === Column.PINNED_LEFT) {
|
332 | this.pinned = Column.PINNED_LEFT;
|
333 | }
|
334 | else if (pinned === Column.PINNED_RIGHT) {
|
335 | this.pinned = Column.PINNED_RIGHT;
|
336 | }
|
337 | else {
|
338 | this.pinned = null;
|
339 | }
|
340 | };
|
341 | Column.prototype.setFirstRightPinned = function (firstRightPinned, source) {
|
342 | if (source === void 0) { source = "api"; }
|
343 | if (this.firstRightPinned !== firstRightPinned) {
|
344 | this.firstRightPinned = firstRightPinned;
|
345 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, source));
|
346 | }
|
347 | };
|
348 | Column.prototype.setLastLeftPinned = function (lastLeftPinned, source) {
|
349 | if (source === void 0) { source = "api"; }
|
350 | if (this.lastLeftPinned !== lastLeftPinned) {
|
351 | this.lastLeftPinned = lastLeftPinned;
|
352 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LAST_LEFT_PINNED_CHANGED, source));
|
353 | }
|
354 | };
|
355 | Column.prototype.isFirstRightPinned = function () {
|
356 | return this.firstRightPinned;
|
357 | };
|
358 | Column.prototype.isLastLeftPinned = function () {
|
359 | return this.lastLeftPinned;
|
360 | };
|
361 | Column.prototype.isPinned = function () {
|
362 | return this.pinned === Column.PINNED_LEFT || this.pinned === Column.PINNED_RIGHT;
|
363 | };
|
364 | Column.prototype.isPinnedLeft = function () {
|
365 | return this.pinned === Column.PINNED_LEFT;
|
366 | };
|
367 | Column.prototype.isPinnedRight = function () {
|
368 | return this.pinned === Column.PINNED_RIGHT;
|
369 | };
|
370 | Column.prototype.getPinned = function () {
|
371 | return this.pinned;
|
372 | };
|
373 | Column.prototype.setVisible = function (visible, source) {
|
374 | if (source === void 0) { source = "api"; }
|
375 | var newValue = visible === true;
|
376 | if (this.visible !== newValue) {
|
377 | this.visible = newValue;
|
378 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VISIBLE_CHANGED, source));
|
379 | }
|
380 | };
|
381 | Column.prototype.isVisible = function () {
|
382 | return this.visible;
|
383 | };
|
384 | Column.prototype.getColDef = function () {
|
385 | return this.colDef;
|
386 | };
|
387 | Column.prototype.getColumnGroupShow = function () {
|
388 | return this.colDef.columnGroupShow;
|
389 | };
|
390 | Column.prototype.getColId = function () {
|
391 | return this.colId;
|
392 | };
|
393 | Column.prototype.getId = function () {
|
394 | return this.getColId();
|
395 | };
|
396 | Column.prototype.getDefinition = function () {
|
397 | return this.colDef;
|
398 | };
|
399 | Column.prototype.getActualWidth = function () {
|
400 | return this.actualWidth;
|
401 | };
|
402 | Column.prototype.createBaseColDefParams = function (rowNode) {
|
403 | var params = {
|
404 | node: rowNode,
|
405 | data: rowNode.data,
|
406 | colDef: this.colDef,
|
407 | column: this,
|
408 | api: this.gridOptionsWrapper.getApi(),
|
409 | columnApi: this.gridOptionsWrapper.getColumnApi(),
|
410 | context: this.gridOptionsWrapper.getContext()
|
411 | };
|
412 | return params;
|
413 | };
|
414 | Column.prototype.getColSpan = function (rowNode) {
|
415 | if (utils_1.Utils.missing(this.colDef.colSpan)) {
|
416 | return 1;
|
417 | }
|
418 | else {
|
419 | var params = this.createBaseColDefParams(rowNode);
|
420 | var colSpan = this.colDef.colSpan(params);
|
421 |
|
422 | if (colSpan > 1) {
|
423 | return colSpan;
|
424 | }
|
425 | else {
|
426 | return 1;
|
427 | }
|
428 | }
|
429 | };
|
430 | Column.prototype.getRowSpan = function (rowNode) {
|
431 | if (utils_1.Utils.missing(this.colDef.rowSpan)) {
|
432 | return 1;
|
433 | }
|
434 | else {
|
435 | var params = this.createBaseColDefParams(rowNode);
|
436 | var rowSpan = this.colDef.rowSpan(params);
|
437 |
|
438 | if (rowSpan > 1) {
|
439 | return rowSpan;
|
440 | }
|
441 | else {
|
442 | return 1;
|
443 | }
|
444 | }
|
445 | };
|
446 | Column.prototype.setActualWidth = function (actualWidth, source) {
|
447 | if (source === void 0) { source = "api"; }
|
448 | if (this.actualWidth !== actualWidth) {
|
449 | this.actualWidth = actualWidth;
|
450 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_WIDTH_CHANGED, source));
|
451 | }
|
452 | };
|
453 | Column.prototype.isGreaterThanMax = function (width) {
|
454 | if (this.maxWidth) {
|
455 | return width > this.maxWidth;
|
456 | }
|
457 | else {
|
458 | return false;
|
459 | }
|
460 | };
|
461 | Column.prototype.getMinWidth = function () {
|
462 | return this.minWidth;
|
463 | };
|
464 | Column.prototype.getMaxWidth = function () {
|
465 | return this.maxWidth;
|
466 | };
|
467 | Column.prototype.setMinimum = function (source) {
|
468 | if (source === void 0) { source = "api"; }
|
469 | this.setActualWidth(this.minWidth, source);
|
470 | };
|
471 | Column.prototype.setRowGroupActive = function (rowGroup, source) {
|
472 | if (source === void 0) { source = "api"; }
|
473 | if (this.rowGroupActive !== rowGroup) {
|
474 | this.rowGroupActive = rowGroup;
|
475 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_ROW_GROUP_CHANGED, source));
|
476 | }
|
477 | };
|
478 | Column.prototype.isRowGroupActive = function () {
|
479 | return this.rowGroupActive;
|
480 | };
|
481 | Column.prototype.setPivotActive = function (pivot, source) {
|
482 | if (source === void 0) { source = "api"; }
|
483 | if (this.pivotActive !== pivot) {
|
484 | this.pivotActive = pivot;
|
485 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_PIVOT_CHANGED, source));
|
486 | }
|
487 | };
|
488 | Column.prototype.isPivotActive = function () {
|
489 | return this.pivotActive;
|
490 | };
|
491 | Column.prototype.isAnyFunctionActive = function () {
|
492 | return this.isPivotActive() || this.isRowGroupActive() || this.isValueActive();
|
493 | };
|
494 | Column.prototype.isAnyFunctionAllowed = function () {
|
495 | return this.isAllowPivot() || this.isAllowRowGroup() || this.isAllowValue();
|
496 | };
|
497 | Column.prototype.setValueActive = function (value, source) {
|
498 | if (source === void 0) { source = "api"; }
|
499 | if (this.aggregationActive !== value) {
|
500 | this.aggregationActive = value;
|
501 | this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VALUE_CHANGED, source));
|
502 | }
|
503 | };
|
504 | Column.prototype.isValueActive = function () {
|
505 | return this.aggregationActive;
|
506 | };
|
507 | Column.prototype.isAllowPivot = function () {
|
508 | return this.colDef.enablePivot === true;
|
509 | };
|
510 | Column.prototype.isAllowValue = function () {
|
511 | return this.colDef.enableValue === true;
|
512 | };
|
513 | Column.prototype.isAllowRowGroup = function () {
|
514 | return this.colDef.enableRowGroup === true;
|
515 | };
|
516 | Column.prototype.getMenuTabs = function (defaultValues) {
|
517 | var menuTabs = this.getColDef().menuTabs;
|
518 | if (menuTabs == null) {
|
519 | menuTabs = defaultValues;
|
520 | }
|
521 | return menuTabs;
|
522 | };
|
523 |
|
524 | Column.EVENT_MOVING_CHANGED = 'movingChanged';
|
525 |
|
526 | Column.EVENT_LEFT_CHANGED = 'leftChanged';
|
527 |
|
528 | Column.EVENT_WIDTH_CHANGED = 'widthChanged';
|
529 |
|
530 | Column.EVENT_LAST_LEFT_PINNED_CHANGED = 'lastLeftPinnedChanged';
|
531 | Column.EVENT_FIRST_RIGHT_PINNED_CHANGED = 'firstRightPinnedChanged';
|
532 |
|
533 | Column.EVENT_VISIBLE_CHANGED = 'visibleChanged';
|
534 |
|
535 | Column.EVENT_FILTER_CHANGED = 'filterChanged';
|
536 |
|
537 | Column.EVENT_FILTER_ACTIVE_CHANGED = 'filterActiveChanged';
|
538 |
|
539 | Column.EVENT_SORT_CHANGED = 'sortChanged';
|
540 | Column.EVENT_MENU_VISIBLE_CHANGED = 'menuVisibleChanged';
|
541 |
|
542 | Column.EVENT_ROW_GROUP_CHANGED = 'columnRowGroupChanged';
|
543 |
|
544 | Column.EVENT_PIVOT_CHANGED = 'columnPivotChanged';
|
545 |
|
546 | Column.EVENT_VALUE_CHANGED = 'columnValueChanged';
|
547 | Column.PINNED_RIGHT = 'right';
|
548 | Column.PINNED_LEFT = 'left';
|
549 | Column.SORT_ASC = 'asc';
|
550 | Column.SORT_DESC = 'desc';
|
551 | __decorate([
|
552 | context_1.Autowired('gridOptionsWrapper'),
|
553 | __metadata("design:type", gridOptionsWrapper_1.GridOptionsWrapper)
|
554 | ], Column.prototype, "gridOptionsWrapper", void 0);
|
555 | __decorate([
|
556 | context_1.Autowired('columnUtils'),
|
557 | __metadata("design:type", columnUtils_1.ColumnUtils)
|
558 | ], Column.prototype, "columnUtils", void 0);
|
559 | __decorate([
|
560 | context_1.Autowired('frameworkFactory'),
|
561 | __metadata("design:type", Object)
|
562 | ], Column.prototype, "frameworkFactory", void 0);
|
563 | __decorate([
|
564 | context_1.Autowired('columnApi'),
|
565 | __metadata("design:type", columnApi_1.ColumnApi)
|
566 | ], Column.prototype, "columnApi", void 0);
|
567 | __decorate([
|
568 | context_1.Autowired('gridApi'),
|
569 | __metadata("design:type", gridApi_1.GridApi)
|
570 | ], Column.prototype, "gridApi", void 0);
|
571 | __decorate([
|
572 | context_1.PostConstruct,
|
573 | __metadata("design:type", Function),
|
574 | __metadata("design:paramtypes", []),
|
575 | __metadata("design:returntype", void 0)
|
576 | ], Column.prototype, "initialise", null);
|
577 | return Column;
|
578 | }());
|
579 | exports.Column = Column;
|