@refinitiv-ui/efx-grid 6.0.91 → 6.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/lib/column-dragging/es6/ColumnDragging.d.ts +1 -1
  2. package/lib/column-dragging/es6/ColumnDragging.js +144 -34
  3. package/lib/core/dist/core.js +2410 -2621
  4. package/lib/core/dist/core.min.js +1 -1
  5. package/lib/core/es6/data/ColumnStats.js +14 -14
  6. package/lib/core/es6/data/DataCache.js +118 -118
  7. package/lib/core/es6/data/DataTable.d.ts +3 -1
  8. package/lib/core/es6/data/DataTable.js +208 -190
  9. package/lib/core/es6/data/DataView.d.ts +1 -1
  10. package/lib/core/es6/data/DataView.js +291 -291
  11. package/lib/core/es6/data/Segment.js +79 -79
  12. package/lib/core/es6/data/SegmentCollection.js +81 -81
  13. package/lib/core/es6/data/WrappedView.js +41 -41
  14. package/lib/core/es6/grid/Core.js +635 -635
  15. package/lib/core/es6/grid/ILayoutGrid.js +1 -1
  16. package/lib/core/es6/grid/LayoutGrid.js +183 -183
  17. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +91 -91
  18. package/lib/core/es6/grid/components/Cell.js +29 -29
  19. package/lib/core/es6/grid/components/CellFloatingPanel.js +11 -11
  20. package/lib/core/es6/grid/components/CellSpan.js +7 -7
  21. package/lib/core/es6/grid/components/CellSpans.js +36 -34
  22. package/lib/core/es6/grid/components/Column.js +40 -40
  23. package/lib/core/es6/grid/components/ElementWrapper.js +17 -17
  24. package/lib/core/es6/grid/components/HScrollbar.js +31 -31
  25. package/lib/core/es6/grid/components/Scrollbar.js +77 -77
  26. package/lib/core/es6/grid/components/StretchedCells.js +49 -49
  27. package/lib/core/es6/grid/components/VScrollbar.js +11 -11
  28. package/lib/core/es6/grid/components/VirtualItems.js +3 -3
  29. package/lib/core/es6/grid/event/EventDispatcher.js +9 -9
  30. package/lib/core/es6/grid/event/EventListeners.js +4 -4
  31. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +186 -186
  32. package/lib/core/es6/grid/util/Conflator.js +4 -4
  33. package/lib/core/es6/grid/util/Reverter.js +1 -1
  34. package/lib/core/es6/grid/util/SectionSettings.js +20 -20
  35. package/lib/core/es6/grid/util/SelectionList.js +23 -23
  36. package/lib/core/es6/grid/util/TrackLayout.js +74 -74
  37. package/lib/core/es6/grid/util/Virtualizer.js +15 -15
  38. package/lib/core/es6/grid/util/util.js +20 -20
  39. package/lib/core/es6/index.d.ts +0 -2
  40. package/lib/core/es6/index.js +0 -3
  41. package/lib/grid/index.js +1 -1
  42. package/lib/rt-grid/dist/rt-grid.js +193 -70
  43. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  44. package/lib/rt-grid/es6/Grid.js +46 -30
  45. package/lib/rt-grid/es6/RowDefinition.d.ts +2 -1
  46. package/lib/rt-grid/es6/RowDefinition.js +74 -16
  47. package/lib/tr-grid-cell-selection/es6/CellSelection.js +56 -1
  48. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +3 -1
  49. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +29 -1
  50. package/lib/tr-grid-util/es6/CellPainter.js +94 -93
  51. package/lib/tr-grid-util/es6/Conflator.js +4 -4
  52. package/lib/tr-grid-util/es6/CoralItems.js +6 -6
  53. package/lib/tr-grid-util/es6/DateTime.js +39 -39
  54. package/lib/tr-grid-util/es6/Deferred.js +5 -5
  55. package/lib/tr-grid-util/es6/Delay.js +1 -1
  56. package/lib/tr-grid-util/es6/Dom.js +26 -26
  57. package/lib/tr-grid-util/es6/DragUI.js +17 -17
  58. package/lib/tr-grid-util/es6/ElementObserver.js +12 -12
  59. package/lib/tr-grid-util/es6/ElementWrapper.js +2 -2
  60. package/lib/tr-grid-util/es6/ElfDate.js +4 -4
  61. package/lib/tr-grid-util/es6/ElfUtil.js +37 -37
  62. package/lib/tr-grid-util/es6/EventDispatcher.js +12 -12
  63. package/lib/tr-grid-util/es6/ExpanderIcon.js +6 -6
  64. package/lib/tr-grid-util/es6/ExpressionParser.js +43 -43
  65. package/lib/tr-grid-util/es6/Ext.js +6 -6
  66. package/lib/tr-grid-util/es6/FieldFormatter.js +17 -17
  67. package/lib/tr-grid-util/es6/FilterBuilder.js +57 -57
  68. package/lib/tr-grid-util/es6/FilterOperators.d.ts +12 -1
  69. package/lib/tr-grid-util/es6/FilterOperators.js +13 -2
  70. package/lib/tr-grid-util/es6/GridPlugin.js +86 -86
  71. package/lib/tr-grid-util/es6/GroupDefinitions.js +90 -90
  72. package/lib/tr-grid-util/es6/Icon.js +4 -4
  73. package/lib/tr-grid-util/es6/MouseDownTrait.js +6 -6
  74. package/lib/tr-grid-util/es6/MultiTableManager.js +68 -68
  75. package/lib/tr-grid-util/es6/NumberFormatter.js +22 -22
  76. package/lib/tr-grid-util/es6/PercentBar.js +17 -17
  77. package/lib/tr-grid-util/es6/Perf.js +5 -5
  78. package/lib/tr-grid-util/es6/Popup.js +42 -42
  79. package/lib/tr-grid-util/es6/RangeBar.js +5 -5
  80. package/lib/tr-grid-util/es6/RequestQueue.js +5 -5
  81. package/lib/tr-grid-util/es6/RowPainter.js +23 -23
  82. package/lib/tr-grid-util/es6/SubTable.js +94 -94
  83. package/lib/tr-grid-util/es6/Table.js +51 -51
  84. package/lib/tr-grid-util/es6/TextHighlighter.js +49 -49
  85. package/lib/tr-grid-util/es6/TickCodes.js +2 -2
  86. package/lib/tr-grid-util/es6/Timer.js +2 -2
  87. package/lib/tr-grid-util/es6/TouchProxy.js +7 -7
  88. package/lib/tr-grid-util/es6/Util.js +50 -50
  89. package/lib/tr-grid-util/es6/formula/ADCService.js +2 -2
  90. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +19 -19
  91. package/lib/tr-grid-util/es6/formula/AdFinService.js +2 -2
  92. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +19 -19
  93. package/lib/tr-grid-util/es6/formula/Engine.js +56 -56
  94. package/lib/tr-grid-util/es6/formula/Formula.js +62 -62
  95. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +3 -3
  96. package/lib/tr-grid-util/es6/formula/Realtime.js +15 -15
  97. package/lib/tr-grid-util/es6/formula/RealtimeService.js +15 -15
  98. package/lib/tr-grid-util/es6/formula/TSIService.js +2 -2
  99. package/lib/tr-grid-util/es6/formula/TSISubscription.js +104 -104
  100. package/lib/tr-grid-util/es6/formula/VariableToken.js +20 -20
  101. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +10 -10
  102. package/lib/tr-grid-util/es6/formula/functions/Excel.js +1 -1
  103. package/lib/tr-grid-util/es6/formula/functions/Info.js +2 -2
  104. package/lib/tr-grid-util/es6/formula/functions/Internal.js +5 -5
  105. package/lib/tr-grid-util/es6/formula/functions/Logic.js +5 -5
  106. package/lib/tr-grid-util/es6/formula/functions/Math.js +46 -46
  107. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +27 -27
  108. package/lib/tr-grid-util/es6/formula/functions/Text.js +19 -19
  109. package/lib/tr-grid-util/es6/index.js +1 -1
  110. package/lib/tr-grid-util/es6/jet/Adc.js +36 -36
  111. package/lib/tr-grid-util/es6/jet/CollectionDict.js +11 -11
  112. package/lib/tr-grid-util/es6/jet/DataGenerator.js +95 -95
  113. package/lib/tr-grid-util/es6/jet/DataSet.js +1 -1
  114. package/lib/tr-grid-util/es6/jet/MockArchive.js +5 -5
  115. package/lib/tr-grid-util/es6/jet/MockJET.js +1 -1
  116. package/lib/tr-grid-util/es6/jet/MockQuotes.js +13 -13
  117. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +100 -100
  118. package/lib/tr-grid-util/es6/jet/MockRTK.js +4 -4
  119. package/lib/tr-grid-util/es6/jet/MockUtil.js +2 -2
  120. package/lib/tr-grid-util/es6/jet/index.js +1 -1
  121. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +15 -15
  122. package/lib/tr-grid-util/es6/locale/translation-de.js +1 -1
  123. package/lib/tr-grid-util/es6/locale/translation-en.js +1 -1
  124. package/lib/tr-grid-util/es6/locale/translation-ja.js +1 -1
  125. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +1 -1
  126. package/lib/tr-grid-util/es6/locale/translation-zh.js +1 -1
  127. package/lib/tr-grid-util/es6/locale/translation.js +1 -1
  128. package/lib/types/es6/ColumnDragging.d.ts +1 -1
  129. package/lib/types/es6/ColumnGrouping.d.ts +3 -1
  130. package/lib/types/es6/Core/data/DataTable.d.ts +4 -0
  131. package/lib/types/es6/Core/data/DataView.d.ts +2 -0
  132. package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
  133. package/lib/types/es6/Core/index.d.ts +0 -2
  134. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -1
  135. package/lib/versions.json +4 -4
  136. package/package.json +1 -1
  137. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +0 -18
  138. package/lib/core/es6/grid/util/ElementFrameWork.js +0 -227
  139. package/lib/core/es6/grid/util/HttpRequest.d.ts +0 -53
  140. package/lib/core/es6/grid/util/HttpRequest.js +0 -371
  141. package/lib/core/es6/grid/util/PercentBar.d.ts +0 -43
  142. package/lib/core/es6/grid/util/PercentBar.js +0 -390
  143. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +0 -41
  144. package/lib/core/es6/grid/util/PercentBarRenderer.js +0 -316
  145. package/lib/core/es6/grid/util/RangeBar.d.ts +0 -25
  146. package/lib/core/es6/grid/util/RangeBar.js +0 -255
  147. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +0 -18
  148. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +0 -53
  149. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +0 -43
  150. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +0 -41
  151. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +0 -25
@@ -11,10 +11,10 @@ import {ElfUtil} from "./ElfUtil.js";
11
11
  * import {Ext} from "../../node_modules/tr-grid-util/src/Ext.js";
12
12
  * import {GridPlugin} from "../../node_modules/tr-grid-util/src/GridPlugin.js";
13
13
  *
14
- * var SomePlugin = function() {};
14
+ * let SomePlugin = function() {};
15
15
  * Ext.inherits(SomePlugin, GridPlugin);
16
16
  */
17
- var GridPlugin = function() {};
17
+ let GridPlugin = function() {};
18
18
  Ext.inherits(GridPlugin, EventDispatcher);
19
19
 
20
20
  /** @type {Array.<tr.Grid>}
@@ -68,7 +68,7 @@ GridPlugin.prototype.unlisten = GridPlugin.prototype.removeEventListener;
68
68
  * @param {tr.CompositeGrid=} grid Composite grid control
69
69
  */
70
70
  GridPlugin.prototype.afterInit = function(elem, model, grid) {
71
- var core = null;
71
+ let core = null;
72
72
  if(grid && grid["getCoreGrid"]) {
73
73
  core = grid["getCoreGrid"]();
74
74
  }
@@ -159,10 +159,10 @@ GridPlugin.prototype.unload = function (host) {
159
159
  * @return {tr.Grid}
160
160
  */
161
161
  GridPlugin.prototype.getRelativeGrid = function (e) {
162
- var targetEl = null;
162
+ let targetEl = null;
163
163
  if(e.target) { // The Given object is an Event
164
164
  targetEl = /** @type{Element} */(e.target);
165
- var gridAPI = targetEl["api"];
165
+ let gridAPI = targetEl["api"];
166
166
  if(gridAPI && gridAPI["getCoreGrid"]) {
167
167
  return /** @type{tr.Grid} */(gridAPI["getCoreGrid"]());
168
168
  }
@@ -173,8 +173,8 @@ GridPlugin.prototype.getRelativeGrid = function (e) {
173
173
  }
174
174
 
175
175
  if(targetEl) {
176
- for(var i = this._hosts.length; --i >= 0;) {
177
- var host = this._hosts[i];
176
+ for(let i = this._hosts.length; --i >= 0;) {
177
+ let host = this._hosts[i];
178
178
  if(host.getElement().contains(targetEl)) {
179
179
  return host;
180
180
  }
@@ -206,7 +206,7 @@ GridPlugin.prototype.getGridApi = function (coreRef) {
206
206
  if(coreRef == null) {
207
207
  return this._compositeGrid || this._realTimeGrid;
208
208
  } else {
209
- var host = (typeof coreRef == "number") ? this._hosts[coreRef] : coreRef;
209
+ let host = (typeof coreRef == "number") ? this._hosts[coreRef] : coreRef;
210
210
  return host ? (host._wrapper || null) : null;
211
211
  }
212
212
  };
@@ -218,7 +218,7 @@ GridPlugin.prototype.getGridApi = function (coreRef) {
218
218
  */
219
219
  GridPlugin.prototype.getColumnName = function (colRef) {
220
220
  if(this._compositeGrid) {
221
- var colOptions = this._compositeGrid.getColumnModel(colRef);
221
+ let colOptions = this._compositeGrid.getColumnModel(colRef);
222
222
  if(colOptions) {
223
223
  if(colOptions.title) {
224
224
  return colOptions.title;
@@ -227,8 +227,8 @@ GridPlugin.prototype.getColumnName = function (colRef) {
227
227
  }
228
228
  }
229
229
  } else {
230
- var colIndex = this.getColumnIndex(colRef);
231
- var colDef = this._realTimeGrid.getColumnDefinition(colIndex);
230
+ let colIndex = this.getColumnIndex(colRef);
231
+ let colDef = this._realTimeGrid.getColumnDefinition(colIndex);
232
232
  if(colDef) {
233
233
  return colDef.getName();
234
234
  }
@@ -245,8 +245,8 @@ GridPlugin.prototype.getColumnIndex = function (colRef) {
245
245
  return colRef;
246
246
  }
247
247
  if(this._compositeGrid) {
248
- var allFields = this._compositeGrid.getColumnFields();
249
- var colIndex = allFields.indexOf(colRef);
248
+ let allFields = this._compositeGrid.getColumnFields();
249
+ let colIndex = allFields.indexOf(colRef);
250
250
  if(colIndex > -1) {
251
251
  return colIndex;
252
252
  } else {
@@ -261,25 +261,25 @@ GridPlugin.prototype.getColumnIndex = function (colRef) {
261
261
  * @return {Array.<number>} column indices
262
262
  */
263
263
  GridPlugin.prototype.getColumnIndices = function (colRefs) {
264
- var api = this.getGridApi();
264
+ let api = this.getGridApi();
265
265
  if(api.getColumnIndices) {
266
266
  return api.getColumnIndices(colRefs);
267
267
  }
268
268
 
269
269
  // TODO: Unify the below logics
270
270
  if(this._compositeGrid) {
271
- var allFields = this._compositeGrid.getColumnFields();
272
- var columnCount = this._compositeGrid.getColumnCount();
273
- var columnIndices = [];
274
- var colRef;
275
- for (var i = 0; i < colRefs.length; i++) {
271
+ let allFields = this._compositeGrid.getColumnFields();
272
+ let columnCount = this._compositeGrid.getColumnCount();
273
+ let columnIndices = [];
274
+ let colRef;
275
+ for (let i = 0; i < colRefs.length; i++) {
276
276
  colRef = colRefs[i];
277
277
  if(typeof colRef === 'number') { // When user pass index
278
278
  if(colRef >= 0 && colRef < columnCount) {
279
279
  columnIndices.push(colRef);
280
280
  }
281
281
  } else {
282
- var columnIndex = allFields.indexOf(colRef); // Looping check column index of colRefs field
282
+ let columnIndex = allFields.indexOf(colRef); // Looping check column index of colRefs field
283
283
  if(columnIndex !== -1) {
284
284
  columnIndices.push(columnIndex);
285
285
  }
@@ -300,7 +300,7 @@ GridPlugin.prototype.getColumnId = function (colIndex) {
300
300
  return colIndex;
301
301
  }
302
302
 
303
- var colCount = this.getColumnCount();
303
+ let colCount = this.getColumnCount();
304
304
  if(colIndex < 0 || colIndex >= colCount) { // Avoid creating undesired column definitions in Core Grid.
305
305
  return "";
306
306
  }
@@ -308,7 +308,7 @@ GridPlugin.prototype.getColumnId = function (colIndex) {
308
308
  if(this._compositeGrid) {
309
309
  return this._compositeGrid.getColumnId(colIndex);
310
310
  } else {
311
- var colDef = this._realTimeGrid.getColumnDefinition(colIndex);
311
+ let colDef = this._realTimeGrid.getColumnDefinition(colIndex);
312
312
  if(colDef) {
313
313
  return colDef.getId();
314
314
  }
@@ -348,7 +348,7 @@ GridPlugin.prototype.getColumnFields = function () {
348
348
  */
349
349
  GridPlugin.prototype.getColumnCount = function() {
350
350
  if(this._hosts) {
351
- var g = this._hosts[0];
351
+ let g = this._hosts[0];
352
352
  return g ? g.getColumnCount() : 0;
353
353
  }
354
354
  return 0;
@@ -360,11 +360,11 @@ GridPlugin.prototype.getColumnCount = function() {
360
360
  * @return {boolean}
361
361
  */
362
362
  GridPlugin.prototype._moveColumnById = function (srcCol, destCol) {
363
- var hosts = this._hosts;
364
- var len = hosts ? hosts.length : 0;
363
+ let hosts = this._hosts;
364
+ let len = hosts ? hosts.length : 0;
365
365
  if(len) {
366
- var dirty = 0;
367
- for(var i = 0; i < len; ++i) {
366
+ let dirty = 0;
367
+ for(let i = 0; i < len; ++i) {
368
368
  dirty |= hosts[i].moveColumnById(srcCol, destCol);
369
369
  }
370
370
  return dirty ? true : false;
@@ -378,11 +378,11 @@ GridPlugin.prototype._moveColumnById = function (srcCol, destCol) {
378
378
  * @return {boolean} Return true if there is any change, and false otherwise
379
379
  */
380
380
  GridPlugin.prototype._reorderColumns = function (colRefs, destCol) {
381
- var hosts = this._hosts;
382
- var len = hosts ? hosts.length : 0;
381
+ let hosts = this._hosts;
382
+ let len = hosts ? hosts.length : 0;
383
383
  if(len) {
384
- var dirty = 0;
385
- for(var i = 0; i < len; ++i) {
384
+ let dirty = 0;
385
+ for(let i = 0; i < len; ++i) {
386
386
  dirty |= hosts[i].reorderColumns(colRefs, destCol);
387
387
  }
388
388
  return dirty ? true : false;
@@ -434,9 +434,9 @@ GridPlugin.prototype._requestPlugin = function (host, pluginRef, configObj) {
434
434
  * @return {Promise}
435
435
  */
436
436
  GridPlugin.requestPlugin = function (ref, pluginRef, configObj, compositeGrid, realTimeGrid) {
437
- var core = null;
437
+ let core = null;
438
438
  if(ref) {
439
- var gridWrapper = null;
439
+ let gridWrapper = null;
440
440
  if(ref.nodeType === 1) { // This is an element
441
441
  // TODO: Support delayed resolving
442
442
  gridWrapper = ref.api; // Grid element must already be initialized and configured
@@ -461,11 +461,11 @@ GridPlugin.requestPlugin = function (ref, pluginRef, configObj, compositeGrid, r
461
461
  return Promise.reject("Cannot find grid element");
462
462
  }
463
463
 
464
- var curPlugin = core.getPlugin(pluginRef);
464
+ let curPlugin = core.getPlugin(pluginRef);
465
465
  if(curPlugin) {
466
466
  return Promise.resolve(curPlugin);
467
467
  } else {
468
- var d = new Deferred();
468
+ let d = new Deferred();
469
469
  setTimeout(GridPlugin._onPluginRequested.bind(null, {
470
470
  grid: core,
471
471
  pluginRef: pluginRef,
@@ -482,17 +482,17 @@ GridPlugin.requestPlugin = function (ref, pluginRef, configObj, compositeGrid, r
482
482
  * @return {Promise.<*>} Promise of plugin object
483
483
  */
484
484
  GridPlugin._onPluginRequested = function (ctx) {
485
- var grid = ctx.grid;
485
+ let grid = ctx.grid;
486
486
  if(!grid.getElement()) {
487
487
  return ctx.deferred.reject("Grid has been disposed before the plugin is fully loaded: " + ctx.pluginRef);
488
488
  }
489
489
 
490
- var curPlugin = grid.getPlugin(ctx.pluginRef);
490
+ let curPlugin = grid.getPlugin(ctx.pluginRef);
491
491
  if(curPlugin) {
492
492
  return ctx.deferred.resolve(curPlugin);
493
493
  }
494
494
 
495
- var beforeInitPerformed = false;
495
+ let beforeInitPerformed = false;
496
496
  if(ctx.pluginRef.beforeInit) { // WARNING: beforeInit is usually performed before the actual loading
497
497
  beforeInitPerformed = true;
498
498
  ctx.pluginRef.beforeInit(grid.getElement(), ctx.config, true);
@@ -552,7 +552,7 @@ GridPlugin.prototype._getColumnData = function(colIndex, grid) {
552
552
  * @return {*}
553
553
  */
554
554
  GridPlugin.prototype._getColumnOption = function(colIndex, prop, grid) {
555
- var colData = this._getColumnData(colIndex, grid);
555
+ let colData = this._getColumnData(colIndex, grid);
556
556
  if(colData) {
557
557
  return colData[prop];
558
558
  }
@@ -572,7 +572,7 @@ GridPlugin.prototype._newColumnData = function(colIndex, grid) {
572
572
  return {};
573
573
  }
574
574
 
575
- var colData = grid.getColumnData(colIndex);
575
+ let colData = grid.getColumnData(colIndex);
576
576
  if(!colData) {
577
577
  colData = grid.setColumnData(colIndex, {});
578
578
  }
@@ -584,7 +584,7 @@ GridPlugin.prototype._newColumnData = function(colIndex, grid) {
584
584
  * @return {string}
585
585
  */
586
586
  GridPlugin.prototype._getField = function(colIndex) {
587
- var gridInst = this._compositeGrid || this._realTimeGrid;
587
+ let gridInst = this._compositeGrid || this._realTimeGrid;
588
588
  if (gridInst) {
589
589
  return gridInst.getColumnField(colIndex);
590
590
  }
@@ -623,7 +623,7 @@ GridPlugin.prototype._getRow = function(dv, rowIndex) {
623
623
  * @return {*}
624
624
  */
625
625
  GridPlugin.prototype._getData = function(dv, rowIndex, field) {
626
- var row = this._getRow(dv, rowIndex);
626
+ let row = this._getRow(dv, rowIndex);
627
627
  return row ? row[field] : undefined; // eslint-disable-line
628
628
  };
629
629
  /** @protected
@@ -635,7 +635,7 @@ GridPlugin.prototype._getData = function(dv, rowIndex, field) {
635
635
  */
636
636
  GridPlugin.prototype._setData = function(dv, rowRef, field, val) {
637
637
  if(this._realTimeGrid) {
638
- var rowDef = _toRowDef(dv, rowRef);
638
+ let rowDef = _toRowDef(dv, rowRef);
639
639
  if(rowDef) {
640
640
  rowDef.setData(field, val);
641
641
  }
@@ -655,7 +655,7 @@ GridPlugin.prototype._setData = function(dv, rowRef, field, val) {
655
655
  */
656
656
  GridPlugin.prototype._setRowData = function(dv, rowRef, rowData) {
657
657
  if(this._realTimeGrid) {
658
- var rowDef = _toRowDef(dv, rowRef);
658
+ let rowDef = _toRowDef(dv, rowRef);
659
659
  if(rowDef) {
660
660
  rowDef.setRowData(rowData);
661
661
  }
@@ -676,7 +676,7 @@ GridPlugin.prototype._setRowData = function(dv, rowRef, rowData) {
676
676
  */
677
677
  GridPlugin.prototype._setStaticData = function(dv, rowRef, field, value) {
678
678
  if(this._realTimeGrid) {
679
- var rowDef = _toRowDef(dv, rowRef);
679
+ let rowDef = _toRowDef(dv, rowRef);
680
680
  if(rowDef) {
681
681
  rowDef.setStaticData(field, value);
682
682
  }
@@ -702,8 +702,8 @@ GridPlugin.prototype._setColumnData = function (dv, cid, valueList, ridList) { /
702
702
  return;
703
703
  }
704
704
 
705
- var rids = Array.isArray(ridList) ? ridList : dv.getAllRowIds(true);
706
- var rowCount = rids ? rids.length : 0;
705
+ let rids = Array.isArray(ridList) ? ridList : dv.getAllRowIds(true);
706
+ let rowCount = rids ? rids.length : 0;
707
707
  if(!rowCount) {
708
708
  return;
709
709
  }
@@ -716,13 +716,13 @@ GridPlugin.prototype._setColumnData = function (dv, cid, valueList, ridList) { /
716
716
  );
717
717
  return;
718
718
  }
719
- var vals = Array.isArray(valueList) ? valueList : rids.map(function() { return valueList; });
719
+ let vals = Array.isArray(valueList) ? valueList : rids.map(function() { return valueList; });
720
720
 
721
721
  if(this._realTimeGrid) {
722
- for(var i = 0; i < rowCount; ++i) {
723
- var dvRowData = dv.getRowData(rids[i]);
722
+ for(let i = 0; i < rowCount; ++i) {
723
+ let dvRowData = dv.getRowData(rids[i]);
724
724
  if(dvRowData) {
725
- var rowDef = dvRowData["ROW_DEF"];
725
+ let rowDef = dvRowData["ROW_DEF"];
726
726
 
727
727
  if(rowDef){
728
728
  // WARNING: This does not trigger dataChanged and dataComposed on the DataCache
@@ -754,7 +754,7 @@ GridPlugin.prototype._activateColumnRenderer = function(colIndex, id, renderer)
754
754
  return;
755
755
  }
756
756
 
757
- var rtGrid = this._realTimeGrid;
757
+ let rtGrid = this._realTimeGrid;
758
758
  if (rtGrid) {
759
759
  rtGrid.activateColumnRenderer(colIndex, id, renderer);
760
760
  } else {
@@ -769,12 +769,12 @@ GridPlugin.prototype._activateColumnRenderer = function(colIndex, id, renderer)
769
769
  /** @private
770
770
  * @function
771
771
  */
772
- var _emptyFunc = function(){};
772
+ let _emptyFunc = function(){};
773
773
  /** @private
774
774
  * @type {Object.<string, number>}
775
775
  * @constant
776
776
  */
777
- var KEY_MAP = {
777
+ let KEY_MAP = {
778
778
  "left": 37,
779
779
  "right": 39,
780
780
  "up": 38,
@@ -805,13 +805,13 @@ GridPlugin.prototype._mockMouseEvent = function(colIndex, rowIndex, context) {
805
805
  rowIndex = 0;
806
806
  }
807
807
 
808
- var evt = context ? context : {};
808
+ let evt = context ? context : {};
809
809
  evt.preventDefault = _emptyFunc;
810
810
  evt.stopPropagation = _emptyFunc;
811
811
 
812
812
  if (colIndex >= 0 && rowIndex >= 0) {
813
- var grid = this._activeGrid || this._hosts[0];
814
- var cell = grid ? grid.getCell(evt.sectionType || "content", colIndex, rowIndex) : null;
813
+ let grid = this._activeGrid || this._hosts[0];
814
+ let cell = grid ? grid.getCell(evt.sectionType || "content", colIndex, rowIndex) : null;
815
815
  evt.target = cell ? cell.getElement() : null;
816
816
  }
817
817
 
@@ -823,12 +823,12 @@ GridPlugin.prototype._mockMouseEvent = function(colIndex, rowIndex, context) {
823
823
  * @return {!Object}
824
824
  */
825
825
  GridPlugin.prototype._mockKeyboardEvent = function(keyCode, context) {
826
- var evt = context ? context : {};
826
+ let evt = context ? context : {};
827
827
  evt.preventDefault = _emptyFunc;
828
828
  evt.stopPropagation = _emptyFunc;
829
829
 
830
830
  if (typeof keyCode === "string") {
831
- var predefinedCode = KEY_MAP[keyCode.toLowerCase()] || 0;
831
+ let predefinedCode = KEY_MAP[keyCode.toLowerCase()] || 0;
832
832
  keyCode = predefinedCode ? predefinedCode : keyCode.charCodeAt(0);
833
833
  }
834
834
  evt.keyCode = keyCode;
@@ -851,8 +851,8 @@ GridPlugin._themeLoaders = {};
851
851
  * @param {Object} colors
852
852
  */
853
853
  GridPlugin._themeLoadSuccess = function(styleCalculator, colors) {
854
- var extName = this.getName();
855
- var styles = GridPlugin._staticStyles[extName] = styleCalculator(colors);
854
+ let extName = this.getName();
855
+ let styles = GridPlugin._staticStyles[extName] = styleCalculator(colors);
856
856
  this.applyStyles(styles, extName);
857
857
  };
858
858
 
@@ -860,8 +860,8 @@ GridPlugin._themeLoadSuccess = function(styleCalculator, colors) {
860
860
  * @param {Function} styleCalculator
861
861
  */
862
862
  GridPlugin.prototype.applyStaticStyles = function(styleCalculator) {
863
- var extName = this.getName();
864
- var styles = GridPlugin._staticStyles[extName];
863
+ let extName = this.getName();
864
+ let styles = GridPlugin._staticStyles[extName];
865
865
  if (!styles) {
866
866
  if (styleCalculator) {
867
867
  if (!GridPlugin._themeLoaders[extName]) {
@@ -885,15 +885,15 @@ GridPlugin.prototype.applyStyles = function(cssString, nameSpace, replaceable) {
885
885
  nameSpace = this.getName();
886
886
  }
887
887
 
888
- var intNameSpace = "_style" + nameSpace;
888
+ let intNameSpace = "_style" + nameSpace;
889
889
 
890
- var hosts = this._hosts;
891
- var len = hosts.length;
890
+ let hosts = this._hosts;
891
+ let len = hosts.length;
892
892
  if (!len) {
893
893
  return;
894
894
  }
895
895
 
896
- var i, host;
896
+ let i, host;
897
897
  if (!replaceable) {
898
898
  for (i = 0; i < len; i++) {
899
899
  host = hosts[i];
@@ -921,7 +921,7 @@ GridPlugin.prototype.revokeStyles = function(host, nameSpace) {
921
921
  }
922
922
 
923
923
  nameSpace = "_style" + nameSpace;
924
- var styleTag = host[nameSpace];
924
+ let styleTag = host[nameSpace];
925
925
  if (styleTag && styleTag.nodeType === 1) {
926
926
  styleTag.parentNode.removeChild(styleTag);
927
927
  host[nameSpace] = null;
@@ -940,17 +940,17 @@ GridPlugin.prototype.revokeStyles = function(host, nameSpace) {
940
940
  * console.log(tr.grid.SomePlugin); // tr.grid.SomePlugin is added to window scope
941
941
  * console.log(tr.SomeExtension); // tr.SomeExtension is added to window scope
942
942
  */
943
- var exportExtension = function(winObj, plugin) {
943
+ let exportExtension = function(winObj, plugin) {
944
944
  if(!winObj || !plugin) { return; }
945
945
  if(!plugin.prototype["getName"]) { return; }
946
- var pluginName = plugin.prototype["getName"]().replace(/Plugin$/, "");
946
+ let pluginName = plugin.prototype["getName"]().replace(/Plugin$/, "");
947
947
  if(!pluginName) { return; }
948
948
 
949
- var trNamespace = winObj["tr"]; // For supporting composite grid extension scheme
949
+ let trNamespace = winObj["tr"]; // For supporting composite grid extension scheme
950
950
  if(!trNamespace) {
951
951
  trNamespace = winObj["tr"] = {};
952
952
  }
953
- var gridNamespace = trNamespace["grid"]; // For supporting grid plugin scheme
953
+ let gridNamespace = trNamespace["grid"]; // For supporting grid plugin scheme
954
954
  if(!gridNamespace) {
955
955
  gridNamespace = trNamespace["grid"] = {};
956
956
  }
@@ -965,8 +965,8 @@ var exportExtension = function(winObj, plugin) {
965
965
  * @param {number|string} rowRef Row index or row id
966
966
  * @return {*} RowDefinition instance
967
967
  */
968
- var _toRowDef = function(dv, rowRef) {
969
- var dvRowData = (typeof rowRef === "number") ? dv.getRowDataAt(rowRef) : dv.getRowData(rowRef);
968
+ let _toRowDef = function(dv, rowRef) {
969
+ let dvRowData = (typeof rowRef === "number") ? dv.getRowDataAt(rowRef) : dv.getRowData(rowRef);
970
970
  if(dvRowData) {
971
971
  return dvRowData["ROW_DEF"] || null;
972
972
  }
@@ -979,7 +979,7 @@ var _toRowDef = function(dv, rowRef) {
979
979
  * @param {Object} dvRowData Row data from tr.DataView
980
980
  * @return {*} Data value returned from the specified row and field
981
981
  */
982
- var defaultDataGetter = function (field, dvRowData) {
982
+ let defaultDataGetter = function (field, dvRowData) {
983
983
  return dvRowData[field];
984
984
  };
985
985
  /** @public
@@ -988,8 +988,8 @@ var defaultDataGetter = function (field, dvRowData) {
988
988
  * @param {Object} dvRowData Row data from tr.DataView
989
989
  * @return {*} Data value returned from the specified row and field
990
990
  */
991
- var rowDefDataGetter = function (field, dvRowData) {
992
- var rowData = dvRowData["ROW_DEF"].getRowData();
991
+ let rowDefDataGetter = function (field, dvRowData) {
992
+ let rowData = dvRowData["ROW_DEF"].getRowData();
993
993
  return (rowData) ? rowData[field] : null;
994
994
  };
995
995
  /** @public
@@ -997,7 +997,7 @@ var rowDefDataGetter = function (field, dvRowData) {
997
997
  * @param {Object} dvRowData
998
998
  * @return {Object} Row data Nothing is changed
999
999
  */
1000
- var defaultRowGetter = function (dvRowData) {
1000
+ let defaultRowGetter = function (dvRowData) {
1001
1001
  return dvRowData;
1002
1002
  };
1003
1003
  /** @public
@@ -1005,7 +1005,7 @@ var defaultRowGetter = function (dvRowData) {
1005
1005
  * @param {Object} dvRowData Row data from tr.DataView
1006
1006
  * @return {Object} Row data
1007
1007
  */
1008
- var rowDefRowGetter = function (dvRowData) {
1008
+ let rowDefRowGetter = function (dvRowData) {
1009
1009
  return dvRowData ? dvRowData["ROW_DEF"].getRowData() : null;
1010
1010
  };
1011
1011
  /** This is slower version of row getter. It is intended for ease of use.
@@ -1014,9 +1014,9 @@ var rowDefRowGetter = function (dvRowData) {
1014
1014
  * @param {Object} dvRowData Row data from tr.DataView
1015
1015
  * @return {Object} Row data
1016
1016
  */
1017
- var rowGetter = function (dvRowData) {
1017
+ let rowGetter = function (dvRowData) {
1018
1018
  if(dvRowData) {
1019
- var rowDef = dvRowData["ROW_DEF"];
1019
+ let rowDef = dvRowData["ROW_DEF"];
1020
1020
  return rowDef ? rowDef.getRowData() : dvRowData;
1021
1021
  }
1022
1022
  return null;
@@ -1028,11 +1028,11 @@ var rowGetter = function (dvRowData) {
1028
1028
  * @param {tr.DataTable} dt
1029
1029
  * @return {!Array.<Object>} Array of row data
1030
1030
  */
1031
- var colDataGetter = function(field, dt) {
1032
- var rowDefs = dt.getAllRowData();
1033
- var rowCount = rowDefs.length;
1034
- var rows = new Array(rowCount);
1035
- for(var i = 0; i < rowCount; ++i) { // WARNING: No data checking
1031
+ let colDataGetter = function(field, dt) {
1032
+ let rowDefs = dt.getAllRowData();
1033
+ let rowCount = rowDefs.length;
1034
+ let rows = new Array(rowCount);
1035
+ for(let i = 0; i < rowCount; ++i) { // WARNING: No data checking
1036
1036
  rows[i] = rowDefDataGetter(field, rowDefs[i]);
1037
1037
  }
1038
1038
  return rows;