@refinitiv-ui/efx-grid 6.0.90 → 6.0.92

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) 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 +2446 -2625
  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 +4 -0
  8. package/lib/core/es6/data/DataTable.js +219 -190
  9. package/lib/core/es6/data/DataView.d.ts +2 -0
  10. package/lib/core/es6/data/DataView.js +300 -292
  11. package/lib/core/es6/data/Segment.js +85 -83
  12. package/lib/core/es6/data/SegmentCollection.d.ts +2 -0
  13. package/lib/core/es6/data/SegmentCollection.js +91 -80
  14. package/lib/core/es6/data/WrappedView.js +41 -41
  15. package/lib/core/es6/grid/Core.js +635 -635
  16. package/lib/core/es6/grid/ILayoutGrid.js +1 -1
  17. package/lib/core/es6/grid/LayoutGrid.js +183 -183
  18. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +91 -91
  19. package/lib/core/es6/grid/components/Cell.js +29 -29
  20. package/lib/core/es6/grid/components/CellFloatingPanel.js +11 -11
  21. package/lib/core/es6/grid/components/CellSpan.js +7 -7
  22. package/lib/core/es6/grid/components/CellSpans.js +36 -34
  23. package/lib/core/es6/grid/components/Column.js +40 -40
  24. package/lib/core/es6/grid/components/ElementWrapper.js +17 -17
  25. package/lib/core/es6/grid/components/HScrollbar.js +31 -31
  26. package/lib/core/es6/grid/components/Scrollbar.js +77 -77
  27. package/lib/core/es6/grid/components/StretchedCells.js +49 -49
  28. package/lib/core/es6/grid/components/VScrollbar.js +11 -11
  29. package/lib/core/es6/grid/components/VirtualItems.js +3 -3
  30. package/lib/core/es6/grid/event/EventDispatcher.js +9 -9
  31. package/lib/core/es6/grid/event/EventListeners.js +4 -4
  32. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +186 -186
  33. package/lib/core/es6/grid/util/Conflator.js +4 -4
  34. package/lib/core/es6/grid/util/Reverter.js +1 -1
  35. package/lib/core/es6/grid/util/SectionSettings.js +20 -20
  36. package/lib/core/es6/grid/util/SelectionList.js +23 -23
  37. package/lib/core/es6/grid/util/TrackLayout.js +74 -74
  38. package/lib/core/es6/grid/util/Virtualizer.js +15 -15
  39. package/lib/core/es6/grid/util/util.js +20 -20
  40. package/lib/core/es6/index.d.ts +0 -2
  41. package/lib/core/es6/index.js +0 -3
  42. package/lib/grid/index.js +1 -1
  43. package/lib/rt-grid/dist/rt-grid.js +193 -70
  44. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  45. package/lib/rt-grid/es6/Grid.js +46 -30
  46. package/lib/rt-grid/es6/RowDefinition.d.ts +2 -1
  47. package/lib/rt-grid/es6/RowDefinition.js +74 -16
  48. package/lib/tr-grid-cell-selection/es6/CellSelection.js +56 -1
  49. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +3 -1
  50. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +29 -1
  51. package/lib/tr-grid-util/es6/CellPainter.js +94 -93
  52. package/lib/tr-grid-util/es6/Conflator.js +4 -4
  53. package/lib/tr-grid-util/es6/CoralItems.js +6 -6
  54. package/lib/tr-grid-util/es6/DateTime.js +39 -39
  55. package/lib/tr-grid-util/es6/Deferred.js +5 -5
  56. package/lib/tr-grid-util/es6/Delay.js +1 -1
  57. package/lib/tr-grid-util/es6/Dom.js +26 -26
  58. package/lib/tr-grid-util/es6/DragUI.js +17 -17
  59. package/lib/tr-grid-util/es6/ElementObserver.js +12 -12
  60. package/lib/tr-grid-util/es6/ElementWrapper.js +2 -2
  61. package/lib/tr-grid-util/es6/ElfDate.js +4 -4
  62. package/lib/tr-grid-util/es6/ElfUtil.js +37 -37
  63. package/lib/tr-grid-util/es6/EventDispatcher.js +12 -12
  64. package/lib/tr-grid-util/es6/ExpanderIcon.js +6 -6
  65. package/lib/tr-grid-util/es6/ExpressionParser.js +43 -43
  66. package/lib/tr-grid-util/es6/Ext.js +6 -6
  67. package/lib/tr-grid-util/es6/FieldFormatter.js +17 -17
  68. package/lib/tr-grid-util/es6/FilterBuilder.js +57 -57
  69. package/lib/tr-grid-util/es6/FilterOperators.d.ts +12 -1
  70. package/lib/tr-grid-util/es6/FilterOperators.js +13 -2
  71. package/lib/tr-grid-util/es6/GridPlugin.js +86 -86
  72. package/lib/tr-grid-util/es6/GroupDefinitions.js +90 -90
  73. package/lib/tr-grid-util/es6/Icon.js +4 -4
  74. package/lib/tr-grid-util/es6/MouseDownTrait.js +6 -6
  75. package/lib/tr-grid-util/es6/MultiTableManager.js +68 -68
  76. package/lib/tr-grid-util/es6/NumberFormatter.js +22 -22
  77. package/lib/tr-grid-util/es6/PercentBar.js +17 -17
  78. package/lib/tr-grid-util/es6/Perf.js +5 -5
  79. package/lib/tr-grid-util/es6/Popup.js +42 -42
  80. package/lib/tr-grid-util/es6/RangeBar.js +5 -5
  81. package/lib/tr-grid-util/es6/RequestQueue.js +5 -5
  82. package/lib/tr-grid-util/es6/RowPainter.js +23 -23
  83. package/lib/tr-grid-util/es6/SubTable.js +94 -94
  84. package/lib/tr-grid-util/es6/Table.js +51 -51
  85. package/lib/tr-grid-util/es6/TextHighlighter.js +49 -49
  86. package/lib/tr-grid-util/es6/TickCodes.js +2 -2
  87. package/lib/tr-grid-util/es6/Timer.js +2 -2
  88. package/lib/tr-grid-util/es6/TouchProxy.js +7 -7
  89. package/lib/tr-grid-util/es6/Util.js +50 -50
  90. package/lib/tr-grid-util/es6/formula/ADCService.js +2 -2
  91. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +19 -19
  92. package/lib/tr-grid-util/es6/formula/AdFinService.js +2 -2
  93. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +19 -19
  94. package/lib/tr-grid-util/es6/formula/Engine.js +56 -56
  95. package/lib/tr-grid-util/es6/formula/Formula.js +62 -62
  96. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +3 -3
  97. package/lib/tr-grid-util/es6/formula/Realtime.js +15 -15
  98. package/lib/tr-grid-util/es6/formula/RealtimeService.js +15 -15
  99. package/lib/tr-grid-util/es6/formula/TSIService.js +2 -2
  100. package/lib/tr-grid-util/es6/formula/TSISubscription.js +104 -104
  101. package/lib/tr-grid-util/es6/formula/VariableToken.js +20 -20
  102. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +10 -10
  103. package/lib/tr-grid-util/es6/formula/functions/Excel.js +1 -1
  104. package/lib/tr-grid-util/es6/formula/functions/Info.js +2 -2
  105. package/lib/tr-grid-util/es6/formula/functions/Internal.js +5 -5
  106. package/lib/tr-grid-util/es6/formula/functions/Logic.js +5 -5
  107. package/lib/tr-grid-util/es6/formula/functions/Math.js +46 -46
  108. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +27 -27
  109. package/lib/tr-grid-util/es6/formula/functions/Text.js +19 -19
  110. package/lib/tr-grid-util/es6/index.js +1 -1
  111. package/lib/tr-grid-util/es6/jet/Adc.js +36 -36
  112. package/lib/tr-grid-util/es6/jet/CollectionDict.js +11 -11
  113. package/lib/tr-grid-util/es6/jet/DataGenerator.js +95 -95
  114. package/lib/tr-grid-util/es6/jet/DataSet.js +1 -1
  115. package/lib/tr-grid-util/es6/jet/MockArchive.js +5 -5
  116. package/lib/tr-grid-util/es6/jet/MockJET.js +1 -1
  117. package/lib/tr-grid-util/es6/jet/MockQuotes.js +13 -13
  118. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +100 -100
  119. package/lib/tr-grid-util/es6/jet/MockRTK.js +4 -4
  120. package/lib/tr-grid-util/es6/jet/MockUtil.js +2 -2
  121. package/lib/tr-grid-util/es6/jet/index.js +1 -1
  122. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +15 -15
  123. package/lib/tr-grid-util/es6/locale/translation-de.js +1 -1
  124. package/lib/tr-grid-util/es6/locale/translation-en.js +1 -1
  125. package/lib/tr-grid-util/es6/locale/translation-ja.js +1 -1
  126. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +1 -1
  127. package/lib/tr-grid-util/es6/locale/translation-zh.js +1 -1
  128. package/lib/tr-grid-util/es6/locale/translation.js +1 -1
  129. package/lib/types/es6/ColumnDragging.d.ts +1 -1
  130. package/lib/types/es6/ColumnGrouping.d.ts +3 -1
  131. package/lib/types/es6/Core/data/DataTable.d.ts +4 -0
  132. package/lib/types/es6/Core/data/DataView.d.ts +2 -0
  133. package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
  134. package/lib/types/es6/Core/index.d.ts +0 -2
  135. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -1
  136. package/lib/versions.json +4 -4
  137. package/package.json +1 -1
  138. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +0 -18
  139. package/lib/core/es6/grid/util/ElementFrameWork.js +0 -227
  140. package/lib/core/es6/grid/util/HttpRequest.d.ts +0 -53
  141. package/lib/core/es6/grid/util/HttpRequest.js +0 -371
  142. package/lib/core/es6/grid/util/PercentBar.d.ts +0 -43
  143. package/lib/core/es6/grid/util/PercentBar.js +0 -390
  144. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +0 -41
  145. package/lib/core/es6/grid/util/PercentBarRenderer.js +0 -316
  146. package/lib/core/es6/grid/util/RangeBar.d.ts +0 -25
  147. package/lib/core/es6/grid/util/RangeBar.js +0 -255
  148. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +0 -18
  149. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +0 -53
  150. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +0 -43
  151. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +0 -41
  152. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +0 -25
@@ -6,7 +6,7 @@ import ElementWrapper from "./ElementWrapper.js";
6
6
  /** @constructor
7
7
  * @extends {ElementWrapper}
8
8
  */
9
- var CellFloatingPanel = function () {
9
+ let CellFloatingPanel = function () {
10
10
  this._items = [];
11
11
  this._element = null;
12
12
  };
@@ -35,7 +35,7 @@ CellFloatingPanel.prototype.containItem = function (icon) {
35
35
  * @param {number=} opt_order The greater the order, the farther the position to the right
36
36
  */
37
37
  CellFloatingPanel.prototype.insertItem = function (item, opt_order) {
38
- var items = this._items;
38
+ let items = this._items;
39
39
  if(items.indexOf(item) > -1) {
40
40
  return; // There is no need to insert the same icon
41
41
  }
@@ -55,13 +55,13 @@ CellFloatingPanel.prototype.insertItem = function (item, opt_order) {
55
55
  * @return {Element|null} removed element
56
56
  */
57
57
  CellFloatingPanel.prototype.removeItem = function (elemRef) {
58
- var items = this._items;
59
- var targetIndex = -1;
58
+ let items = this._items;
59
+ let targetIndex = -1;
60
60
  if (!elemRef) {
61
61
  targetIndex = items.length - 1;
62
62
  } else {
63
- for(var i = items.length; --i >= 0;) {
64
- var ch = items[i];
63
+ for(let i = items.length; --i >= 0;) {
64
+ let ch = items[i];
65
65
  if (typeof elemRef === "string") {
66
66
  if(ch.classList.contains(elemRef)) {
67
67
  targetIndex = i;
@@ -75,7 +75,7 @@ CellFloatingPanel.prototype.removeItem = function (elemRef) {
75
75
  }
76
76
  }
77
77
  }
78
- var removedItem = null;
78
+ let removedItem = null;
79
79
  if (targetIndex > -1) {
80
80
  removedItem = items.splice(targetIndex, 1)[0];
81
81
  }
@@ -85,7 +85,7 @@ CellFloatingPanel.prototype.removeItem = function (elemRef) {
85
85
  /** @public
86
86
  */
87
87
  CellFloatingPanel.prototype.clearItems = function () {
88
- var items = this._items;
88
+ let items = this._items;
89
89
  if (!items.length) {
90
90
  return;
91
91
  }
@@ -110,8 +110,8 @@ CellFloatingPanel._iconComparer = function(elemA, elemB) {
110
110
  /** @private
111
111
  */
112
112
  CellFloatingPanel.prototype._updatePanelItems = function() {
113
- var items = this._items;
114
- var elem = this._element;
113
+ let items = this._items;
114
+ let elem = this._element;
115
115
  if (!items.length) {
116
116
  return;
117
117
  }
@@ -121,7 +121,7 @@ CellFloatingPanel.prototype._updatePanelItems = function() {
121
121
  while (elem.lastChild) {
122
122
  elem.removeChild(elem.lastChild);
123
123
  }
124
- for (var i = 0; i < items.length; i++) {
124
+ for (let i = 0; i < items.length; i++) {
125
125
  elem.appendChild(items[i]);
126
126
  }
127
127
  };
@@ -3,7 +3,7 @@
3
3
  * @param {number} x
4
4
  * @param {number} y
5
5
  */
6
- var CellSpan = function (x, y) {
6
+ let CellSpan = function (x, y) {
7
7
  this.indexX = x;
8
8
  this.indexY = y;
9
9
  };
@@ -45,7 +45,7 @@ CellSpan.prototype.unregister = function (allSpans, occupiedMap) {
45
45
  * @param {boolean} bool
46
46
  */
47
47
  CellSpan.prototype._register = function (allSpans, occupiedMap, bool) {
48
- var at = allSpans.indexOf(this);
48
+ let at = allSpans.indexOf(this);
49
49
  if(bool) {
50
50
  if(at < 0) {
51
51
  allSpans.push(this);
@@ -56,11 +56,11 @@ CellSpan.prototype._register = function (allSpans, occupiedMap, bool) {
56
56
  }
57
57
  }
58
58
 
59
- var obj = bool ? this : null;
60
- var endCol = this.indexX + this.colSpan;
61
- var endRow = this.indexY + this.rowSpan;
62
- for (var c = this.indexX; c < endCol; ++c) {
63
- for (var r = this.indexY; r < endRow; ++r) {
59
+ let obj = bool ? this : null;
60
+ let endCol = this.indexX + this.colSpan;
61
+ let endRow = this.indexY + this.rowSpan;
62
+ for (let c = this.indexX; c < endCol; ++c) {
63
+ for (let r = this.indexY; r < endRow; ++r) {
64
64
  occupiedMap[c + "," + r] = obj;
65
65
  }
66
66
  }
@@ -1,7 +1,7 @@
1
1
  import CellSpan from "./CellSpan.js";
2
2
 
3
3
  /** @constructor */
4
- var CellSpans = function () {
4
+ let CellSpans = function () {
5
5
  this._spans = [];
6
6
  this._occupiedMap = {};
7
7
  };
@@ -11,7 +11,7 @@ var CellSpans = function () {
11
11
  * @return {boolean} Return true if there is any change
12
12
  */
13
13
  CellSpans.prototype.removeColumn = function (at) { // Use when a column is removed
14
- var dirty = false;
14
+ let dirty = false;
15
15
  if(this.removeSpanByColIndex(at)) {
16
16
  dirty = true;
17
17
  }
@@ -34,10 +34,10 @@ CellSpans.prototype.freezeMapping = function (bool) {
34
34
  /** @private
35
35
  */
36
36
  CellSpans.prototype._mapCellSpans = function () {
37
- var cellSpans = this._spans;
37
+ let cellSpans = this._spans;
38
38
  this._spans = [];
39
39
  this._occupiedMap = {};
40
- var i, cellSpan;
40
+ let i, cellSpan;
41
41
  for(i = cellSpans.length; --i >= 0;) {
42
42
  cellSpan = cellSpans[i];
43
43
  if(cellSpan.indexX >= 0) {
@@ -55,9 +55,9 @@ CellSpans.prototype._mapCellSpans = function () {
55
55
  CellSpans.prototype.shiftColumn = function (from, amount) { // Use when a column is inserted or removed
56
56
  if(this._spans.length <= 0 || amount === 0) { return false; }
57
57
 
58
- var dirty = false;
59
- for (var i = this._spans.length; --i >= 0;) {
60
- var cellSpan = this._spans[i];
58
+ let dirty = false;
59
+ for (let i = this._spans.length; --i >= 0;) {
60
+ let cellSpan = this._spans[i];
61
61
  if(cellSpan.indexX >= from) {
62
62
  dirty = true;
63
63
  cellSpan.indexX += amount;
@@ -77,8 +77,8 @@ CellSpans.prototype.shiftColumn = function (from, amount) { // Use when a column
77
77
  CellSpans.prototype.removeSpan = function (indexX, indexY) {
78
78
  if(this._spans.length <= 0) { return null; }
79
79
 
80
- var key = indexX + "," + indexY;
81
- var cellSpan = this._occupiedMap[key];
80
+ let key = indexX + "," + indexY;
81
+ let cellSpan = this._occupiedMap[key];
82
82
  if(!cellSpan || cellSpan.isOccupiedIndices(indexX, indexY)) { return null; }
83
83
 
84
84
  cellSpan.unregister(this._spans, this._occupiedMap);
@@ -90,13 +90,14 @@ CellSpans.prototype.removeSpan = function (indexX, indexY) {
90
90
  * @return {Array.<CellSpan>} Return null if no CellSpan is removed
91
91
  */
92
92
  CellSpans.prototype.removeSpanByColIndex = function (at, opt_ary) {
93
- var len = this._spans.length;
93
+ let len = this._spans.length;
94
94
  if(len <= 0) { return null; }
95
95
 
96
- var cellSpan;
97
- var removedCellSpans = opt_ary || [];
98
- var count = 0;
99
- for (var i = 0; i < len; ++i) {
96
+ let cellSpan;
97
+ let removedCellSpans = opt_ary || [];
98
+ let count = 0;
99
+ let i;
100
+ for (i = 0; i < len; ++i) {
100
101
  cellSpan = this._spans[i];
101
102
  if(cellSpan && cellSpan.indexX === at) {
102
103
  removedCellSpans.push(cellSpan);
@@ -117,13 +118,14 @@ CellSpans.prototype.removeSpanByColIndex = function (at, opt_ary) {
117
118
  * @return {Array.<CellSpan>} Return null if no CellSpan is removed
118
119
  */
119
120
  CellSpans.prototype.removeSpanStartedFromRowIndex = function (at, opt_ary) {
120
- var len = this._spans.length;
121
+ let len = this._spans.length;
121
122
  if(len <= 0) { return null; }
122
123
 
123
- var cellSpan;
124
- var removedCellSpans = opt_ary || [];
125
- var count = 0;
126
- for (var i = 0; i < len; ++i) {
124
+ let cellSpan;
125
+ let removedCellSpans = opt_ary || [];
126
+ let count = 0;
127
+ let i;
128
+ for (i = 0; i < len; ++i) {
127
129
  cellSpan = this._spans[i];
128
130
  if(cellSpan && cellSpan.indexY >= at) {
129
131
  removedCellSpans.push(cellSpan);
@@ -145,7 +147,7 @@ CellSpans.prototype.removeSpanStartedFromRowIndex = function (at, opt_ary) {
145
147
  CellSpans.prototype.clearAllSpans = function () {
146
148
  if(this._spans.length <= 0) { return null; }
147
149
 
148
- var allCellSpans = this._spans;
150
+ let allCellSpans = this._spans;
149
151
  this._spans = [];
150
152
  this._occupiedMap = {};
151
153
  return allCellSpans;
@@ -163,7 +165,7 @@ CellSpans.prototype.hasSpan = function () {
163
165
  * @return {CellSpan|null}
164
166
  */
165
167
  CellSpans.prototype.getSpan = function (indexX, indexY) {
166
- var cellSpan = this.getOccupyingSpan(indexX, indexY);
168
+ let cellSpan = this.getOccupyingSpan(indexX, indexY);
167
169
  if(cellSpan && cellSpan.isSpanIndices(indexX, indexY)) {
168
170
  return cellSpan;
169
171
  }
@@ -195,7 +197,7 @@ CellSpans.prototype.getAllSpans = function () {
195
197
  * @return {number}
196
198
  */
197
199
  CellSpans.prototype.getColSpan = function (indexX, indexY) {
198
- var cellSpan = this._occupiedMap[indexX + "," + indexY];
200
+ let cellSpan = this._occupiedMap[indexX + "," + indexY];
199
201
  if(cellSpan == null) {
200
202
  return 1;
201
203
  }
@@ -214,7 +216,7 @@ CellSpans.prototype.getColSpan = function (indexX, indexY) {
214
216
  * @return {number}
215
217
  */
216
218
  CellSpans.prototype.getRowSpan = function (indexX, indexY) {
217
- var cellSpan = this._occupiedMap[indexX + "," + indexY];
219
+ let cellSpan = this._occupiedMap[indexX + "," + indexY];
218
220
  if(cellSpan == null) {
219
221
  return 1;
220
222
  }
@@ -252,15 +254,15 @@ CellSpans.prototype.setRowSpan = function (indexX, indexY, spanVal) {
252
254
  */
253
255
  CellSpans.prototype._updateSpan = function (c0, r0, isColumn, spanVal) {
254
256
  if (spanVal < 1) { spanVal = 1; }
255
- var cellSpan = this.getSpan(c0, r0);
257
+ let cellSpan = this.getSpan(c0, r0);
256
258
  if(cellSpan) { cellSpan.retVal = 0; }
257
259
 
258
- var c1 = c0;
259
- var r1 = r0;
260
- var cs = (cellSpan) ? cellSpan.colSpan : 1;
261
- var rs = (cellSpan) ? cellSpan.rowSpan : 1;
262
- var c2, r2, target, key;
263
- var isExpanding = true;
260
+ let c1 = c0;
261
+ let r1 = r0;
262
+ let cs = (cellSpan) ? cellSpan.colSpan : 1;
263
+ let rs = (cellSpan) ? cellSpan.rowSpan : 1;
264
+ let c2, r2, target, key;
265
+ let isExpanding = true;
264
266
  if (isColumn) {
265
267
  if (cs === spanVal) { return cellSpan; }
266
268
  if (cs > spanVal) {
@@ -294,9 +296,9 @@ CellSpans.prototype._updateSpan = function (c0, r0, isColumn, spanVal) {
294
296
  }
295
297
 
296
298
  // Collecting affected cells
297
- var c, r;
299
+ let c, r;
298
300
  if (isExpanding) { // Check all affected cells for occupying
299
- var keys = [];
301
+ let keys = [];
300
302
  for (c = c1; c < c2; ++c) {
301
303
  for (r = r1; r < r2; ++r) {
302
304
  key = c + "," + r;
@@ -318,10 +320,10 @@ CellSpans.prototype._updateSpan = function (c0, r0, isColumn, spanVal) {
318
320
  this._occupiedMap[keys[c]] = cellSpan;
319
321
  }
320
322
  } else {
321
- var noLongerSpan = (isColumn) ? (spanVal + rs <= 2) : (spanVal + cs <= 2);
323
+ let noLongerSpan = (isColumn) ? (spanVal + rs <= 2) : (spanVal + cs <= 2);
322
324
  if (noLongerSpan) {
323
325
  key = c0 + "," + r0;
324
- var at = this._spans.indexOf(cellSpan);
326
+ let at = this._spans.indexOf(cellSpan);
325
327
  this._spans.splice(at, 1);
326
328
  this._occupiedMap[key] = null;
327
329
  }
@@ -11,8 +11,8 @@ import ILayoutGrid from "../ILayoutGrid.js";
11
11
  * @extends {ElementWrapper}
12
12
  * @param {ILayoutGrid} section Parent section
13
13
  */
14
- var Column = function (section) {
15
- var elem = this._element = document.createElement("div");
14
+ let Column = function (section) {
15
+ let elem = this._element = document.createElement("div");
16
16
  elem.className = "column";
17
17
  this._cells = [];
18
18
  this._section = section;
@@ -94,7 +94,7 @@ Column.prototype._pinned = true;
94
94
  /** @public
95
95
  */
96
96
  Column.prototype.clearContent = function() {
97
- for(var r = this._cells.length; --r >= 0;) {
97
+ for(let r = this._cells.length; --r >= 0;) {
98
98
  this._cells[r].setContent(null);
99
99
  }
100
100
  };
@@ -129,7 +129,7 @@ Column.prototype.enableAbsolutePosition = function (bool) {
129
129
  */
130
130
  Column.prototype.dispose = function () {
131
131
  this._dispose();
132
- for(var r = this._cells.length; --r >= 0;) {
132
+ for(let r = this._cells.length; --r >= 0;) {
133
133
  this._cells[r].dispose();
134
134
  }
135
135
  this._scrollFrame = this._nextSibling = this._parent = this._cells = this._section = null;
@@ -138,10 +138,10 @@ Column.prototype.dispose = function () {
138
138
  * @override
139
139
  */
140
140
  Column.prototype.setStyle = function (str, val) {
141
- var elem = this._element;
141
+ let elem = this._element;
142
142
  elem.style[str] = val;
143
143
 
144
- var bgc = elem.style.backgroundColor;
144
+ let bgc = elem.style.backgroundColor;
145
145
  if(bgc) {
146
146
  if(!elem.classList.contains("no-shading")) { elem.classList.add("no-shading"); }
147
147
  } else {
@@ -152,13 +152,13 @@ Column.prototype.setStyle = function (str, val) {
152
152
  * @override
153
153
  */
154
154
  Column.prototype.setStyles = function (json) {
155
- var elem = this._element;
156
- var styles = elem.style;
157
- for (var key in json) {
155
+ let elem = this._element;
156
+ let styles = elem.style;
157
+ for (let key in json) {
158
158
  styles[key] = json[key];
159
159
  }
160
160
 
161
- var bgc = elem.style.backgroundColor;
161
+ let bgc = elem.style.backgroundColor;
162
162
  if(bgc) {
163
163
  if(!elem.classList.contains("no-shading")) { elem.classList.add("no-shading"); }
164
164
  } else {
@@ -178,7 +178,7 @@ Column.prototype.show = function (opt_shown) {
178
178
  */
179
179
  Column.prototype.setWidth = function (val) {
180
180
  this._element.style.width = val + "px";
181
- var magnitude = 0;
181
+ let magnitude = 0;
182
182
  if(val > 0 && val <= 24){
183
183
  magnitude = 3;
184
184
  }
@@ -189,8 +189,8 @@ Column.prototype.setWidth = function (val) {
189
189
  magnitude = 1;
190
190
  }
191
191
 
192
- var i;
193
- var sc = this._sizeClasses;
192
+ let i;
193
+ let sc = this._sizeClasses;
194
194
  if(sc) {
195
195
  if(sc.length > magnitude) {
196
196
  for(i = sc.length; --i >= magnitude;) {
@@ -240,11 +240,11 @@ Column.prototype.getParent = function () {
240
240
  * @override
241
241
  */
242
242
  Column.prototype.setParent = function (parent, opt_prepend) {
243
- var el = this._element;
243
+ let el = this._element;
244
244
  if(!el) { return; }
245
245
 
246
246
  this._parent = Util.getElement(parent);
247
- var hidingMethod = this._section ? this._section.getHidingMethod() : "";
247
+ let hidingMethod = this._section ? this._section.getHidingMethod() : "";
248
248
 
249
249
  // hidden column with hidingMethod should appear in tree
250
250
  // to prevent from unability of showing
@@ -345,7 +345,7 @@ Column.prototype.deactivate = function (opt_disabled) {
345
345
  * @param {number} count
346
346
  */
347
347
  Column.prototype.setCellCount = function (count) {
348
- var r;
348
+ let r;
349
349
  for(r = this._cells.length; r < count; ++r) {
350
350
  this._cells.push(new Cell(null, this._section));
351
351
  }
@@ -378,12 +378,12 @@ Column.prototype.getCell = function (rowIndex) {
378
378
  Column.prototype.collapseCells = function (from, length, collapsed, excludeFirstCell, keptInDoc) {
379
379
  if(length <= 0) { return; }
380
380
 
381
- var dirty = false;
382
- var cell = this._cells[from];
381
+ let dirty = false;
382
+ let cell = this._cells[from];
383
383
  if(cell && !excludeFirstCell) { // If we need to process the first cell
384
384
  dirty |= cell.collapse(collapsed, keptInDoc); // If we have multiple rows kept the cell in the doc for positioning
385
385
  }
386
- for(var i = 1; i < length; ++i) {
386
+ for(let i = 1; i < length; ++i) {
387
387
  cell = this._cells[from + i];
388
388
  if(cell) {
389
389
  dirty |= cell.collapse(collapsed, keptInDoc);
@@ -413,8 +413,8 @@ Column.prototype.uncollapseAllCells = Util._deprecatedFunction;
413
413
  * @param {number} to
414
414
  */
415
415
  Column.prototype.activateCells = function (from, to) {
416
- var r;
417
- var parent = this._element;
416
+ let r;
417
+ let parent = this._element;
418
418
  if(this._hasCollapsedCells) { // There is a vertical span and no row virtualization. We only need to appendChild incrementally
419
419
  from = this._cellEnd;
420
420
  if(to > this._cellEnd) {
@@ -422,7 +422,7 @@ Column.prototype.activateCells = function (from, to) {
422
422
  }
423
423
  } else {
424
424
  if(this._cellStart === from) {
425
- var diff = this._cellEnd - to;
425
+ let diff = this._cellEnd - to;
426
426
  if(diff > 0) {
427
427
  for(r = this._cellEnd; --r >= to;) {
428
428
  this._cells[r].removeParent();
@@ -445,7 +445,7 @@ Column.prototype.activateCells = function (from, to) {
445
445
  }
446
446
 
447
447
  for(r = from; r < to; ++r) {
448
- var cell = this._cells[r];
448
+ let cell = this._cells[r];
449
449
  if(cell.isKeptInDoc()) {
450
450
  cell.initialize();
451
451
  parent.appendChild(cell.getElement());
@@ -461,9 +461,9 @@ Column.prototype.moveCellsToTop = function (numCells) {
461
461
  return; // There is no point in cycling cells when the column is inactive
462
462
  }
463
463
 
464
- var parent = this._element;
465
- for(var i = 0; i < numCells; ++i) {
466
- var cell = this._cells[i];
464
+ let parent = this._element;
465
+ for(let i = 0; i < numCells; ++i) {
466
+ let cell = this._cells[i];
467
467
  if(cell.isKeptInDoc()) {
468
468
  parent.appendChild(cell.getElement());
469
469
  }
@@ -475,9 +475,9 @@ Column.prototype.moveCellsToTop = function (numCells) {
475
475
  */
476
476
  Column.prototype.updateCellOrders = function () {
477
477
  this._hasCollapsedCells = false;
478
- var parent = this._element;
479
- for(var i = this._cellStart; i < this._cellEnd; ++i) {
480
- var cell = this._cells[i];
478
+ let parent = this._element;
479
+ for(let i = this._cellStart; i < this._cellEnd; ++i) {
480
+ let cell = this._cells[i];
481
481
  if(cell.isKeptInDoc()) {
482
482
  parent.appendChild(cell.getElement());
483
483
  } else {
@@ -499,8 +499,8 @@ Column.prototype.hasCollapsedCells = function () {
499
499
  */
500
500
  Column.prototype.getCellIndex = function (cellElem) {
501
501
  if(!cellElem) { return -1; }
502
- for(var i = this._cellStart; i < this._cellEnd; ++i) {
503
- var cell = this._cells[i];
502
+ for(let i = this._cellStart; i < this._cellEnd; ++i) {
503
+ let cell = this._cells[i];
504
504
  if(cell.getElement() === cellElem) {
505
505
  return i;
506
506
  }
@@ -522,9 +522,9 @@ Column.prototype.getSection = function () {
522
522
  * @return {Array.<string>}
523
523
  */
524
524
  Column.prototype.log = function () {
525
- var ary = [];
526
- var len = this._cells.length;
527
- for(var i = 0; i < len; ++i) {
525
+ let ary = [];
526
+ let len = this._cells.length;
527
+ for(let i = 0; i < len; ++i) {
528
528
  ary.push(this._cells[i].getTextContent());
529
529
  }
530
530
  return ary;
@@ -543,32 +543,32 @@ Column.prototype.getVisibility = function () {
543
543
  * @param {*} shown
544
544
  */
545
545
  Column.prototype.setVisibility = function (bitIndex, shown) {
546
- var prevVis = !this._invisibility;
546
+ let prevVis = !this._invisibility;
547
547
 
548
- var bit = this._bits[bitIndex] || 1;
548
+ let bit = this._bits[bitIndex] || 1;
549
549
  if(shown) {
550
550
  this._invisibility &= ~bit; // Remove invisibility bit
551
551
  } else {
552
552
  this._invisibility |= bit; // Add invisibility bit
553
553
  }
554
554
 
555
- var newVis = !this._invisibility;
555
+ let newVis = !this._invisibility;
556
556
  if (prevVis === newVis) {
557
557
  return; // Nothing has changed
558
558
  }
559
559
 
560
- var hidingMethod = this._section ? this._section.getHidingMethod() : "";
560
+ let hidingMethod = this._section ? this._section.getHidingMethod() : "";
561
561
  if(hidingMethod) {
562
562
  this.enableClass("hidden", !newVis); // Custom class method
563
563
  // this._element.style.display = (newVis !== false) ? "" : "none";
564
564
  } else {
565
565
  if(newVis) { // Find a proper place to insert (show)
566
566
  // this._element.style.display = "";
567
- var curParent = this._parent;
567
+ let curParent = this._parent;
568
568
  if(!curParent) {
569
569
  return; // WARNING: It could possibly be a bug, if there is no parent at this moment
570
570
  }
571
- var nextSibling = this._nextSibling; // Next sibling can be an empty object
571
+ let nextSibling = this._nextSibling; // Next sibling can be an empty object
572
572
  while(nextSibling) {
573
573
  if (nextSibling._parent !== curParent) {
574
574
  // This could mean either this is pinned left column or column within the scroll frame (i.e. any column that is not pinned to the right)
@@ -9,7 +9,7 @@ import Util from "../util/util.js";
9
9
  * @extends {EventDispatcher}
10
10
  * @param {Element=} opt_element If not specified "div" element is instantly created.
11
11
  */
12
- var ElementWrapper = function (opt_element) {
12
+ let ElementWrapper = function (opt_element) {
13
13
  this._element = opt_element ? opt_element : document.createElement("div");
14
14
  };
15
15
  Ext.inherits(ElementWrapper, EventDispatcher);
@@ -128,7 +128,7 @@ ElementWrapper.prototype.removeContent = function (content) {
128
128
  * @param {number=} opt_priority The higher the priority, the sooner the listener get executed. Undefined priority listener will be executed last
129
129
  *
130
130
  * @example
131
- * var grid = new Core();
131
+ * let grid = new Core();
132
132
  * grid.listen("click", function(e) { console.log("Grid is clicked"); });
133
133
  */
134
134
  ElementWrapper.prototype.listen = function (type, handler, opt_priority) {
@@ -140,7 +140,7 @@ ElementWrapper.prototype.listen = function (type, handler, opt_priority) {
140
140
  if (!this._nativeEvents) {
141
141
  this._nativeEvents = {};
142
142
  }
143
- var e = this._nativeEvents[type];
143
+ let e = this._nativeEvents[type];
144
144
  if (!e) {
145
145
  e = new EventListeners();
146
146
  this._nativeEvents[type] = e;
@@ -149,9 +149,9 @@ ElementWrapper.prototype.listen = function (type, handler, opt_priority) {
149
149
 
150
150
  if (!ElementWrapper._passiveEvents) {
151
151
  // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection
152
- var supportsPassive = false;
152
+ let supportsPassive = false;
153
153
  try {
154
- var opts = /** @type{boolean} */(Object.defineProperty({}, 'passive', {
154
+ let opts = /** @type{boolean} */(Object.defineProperty({}, 'passive', {
155
155
  /**
156
156
  * @return {boolean}
157
157
  */
@@ -165,7 +165,7 @@ ElementWrapper.prototype.listen = function (type, handler, opt_priority) {
165
165
  } catch (err) {}
166
166
 
167
167
  if(supportsPassive) {
168
- var passiveOption = { "passive": true };
168
+ let passiveOption = { "passive": true };
169
169
 
170
170
  // "wheel" and "mousewheel" have default behavior that needs to be prevented. We have to exclude them from the list
171
171
  ElementWrapper._passiveEvents = {
@@ -196,7 +196,7 @@ ElementWrapper.prototype.unlisten = function (type, handler) {
196
196
  }
197
197
 
198
198
  if (this._nativeEvents) {
199
- var e = this._nativeEvents[type];
199
+ let e = this._nativeEvents[type];
200
200
  if (e) {
201
201
  e.unlisten(handler);
202
202
  }
@@ -214,7 +214,7 @@ ElementWrapper.prototype.unlistenAll = function (opt_type) {
214
214
  this._customEvents[opt_type].unlistenAll();
215
215
  }
216
216
  } else {
217
- for (var customEvt in this._customEvents) {
217
+ for (let customEvt in this._customEvents) {
218
218
  this._customEvents[customEvt].unlistenAll();
219
219
  }
220
220
  }
@@ -227,7 +227,7 @@ ElementWrapper.prototype.unlistenAll = function (opt_type) {
227
227
  delete this._nativeEvents[opt_type];
228
228
  }
229
229
  } else {
230
- for (var key in this._nativeEvents) {
230
+ for (let key in this._nativeEvents) {
231
231
  this._unlistenAll(key);
232
232
  }
233
233
  this._nativeEvents = null;
@@ -239,7 +239,7 @@ ElementWrapper.prototype.unlistenAll = function (opt_type) {
239
239
  * @param {string} type
240
240
  */
241
241
  ElementWrapper.prototype._unlistenAll = function (type) {
242
- var e = this._nativeEvents[type];
242
+ let e = this._nativeEvents[type];
243
243
  this._element.removeEventListener(type, e.dispatch, false);
244
244
  e.unlistenAll();
245
245
  };
@@ -268,7 +268,7 @@ ElementWrapper.prototype._dispose = function () {
268
268
  */
269
269
  ElementWrapper.prototype.setEventArgExtender = function (type, func) {
270
270
  if(this._customEvents) {
271
- var evt = this._customEvents[type];
271
+ let evt = this._customEvents[type];
272
272
  if(evt) {
273
273
  evt.setEventArgExtender(func);
274
274
  }
@@ -343,7 +343,7 @@ ElementWrapper.prototype._insertBefore = function (nextSibling) {
343
343
  return;
344
344
  }
345
345
 
346
- var parent = nextSibling.parentNode;
346
+ let parent = nextSibling.parentNode;
347
347
  if (parent == null) { return; }
348
348
 
349
349
  parent.insertBefore(this._element, nextSibling);
@@ -401,7 +401,7 @@ ElementWrapper.prototype.removeClass = function (str) {
401
401
  * @param {(boolean|null)=} forcedVal If specified, force CSS class state as the specified value
402
402
  */
403
403
  ElementWrapper.prototype.toggleClass = function (cls, forcedVal) {
404
- var elem = this._element;
404
+ let elem = this._element;
405
405
  if(elem) {
406
406
  if(forcedVal == null) {
407
407
  forcedVal = !elem.classList.contains(cls);
@@ -453,7 +453,7 @@ ElementWrapper.prototype.setAttribute = function (str, val) { this._element.setA
453
453
  * @param {Object} json Key is the attribute names and value is string value (i.e. "readonly", "50", "checkbox")
454
454
  */
455
455
  ElementWrapper.prototype.setAttributes = function (json) {
456
- for (var key in json) {
456
+ for (let key in json) {
457
457
  this._element.setAttribute(key, json[key]);
458
458
  }
459
459
  };
@@ -480,8 +480,8 @@ ElementWrapper.prototype.setStyle = function (str, val) { this._element.style[st
480
480
  * @param {Object} json Key is the property names and value is style value (i.e. "center", "#FF00FF", "10px")
481
481
  */
482
482
  ElementWrapper.prototype.setStyles = function (json) {
483
- var styles = this._element.style;
484
- for (var key in json) {
483
+ let styles = this._element.style;
484
+ for (let key in json) {
485
485
  styles[key] = json[key];
486
486
  }
487
487
  };
@@ -507,7 +507,7 @@ ElementWrapper.prototype.setId = function (val) {
507
507
  * @return {string}
508
508
  */
509
509
  ElementWrapper.prototype.toString = function () {
510
- var outer = this._element.outerHTML;
510
+ let outer = this._element.outerHTML;
511
511
  outer = outer.replace(this._element.innerHTML, "");
512
512
  return outer;
513
513
  };