@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
@@ -6,12 +6,12 @@
6
6
  * @param {number|Function=} opt_ms The delay time in millisecond before executing the function
7
7
  * @param {*=} opt_thisObj "this" object to be bound with the given function. If the function is already bound, there is no need to provide thisObj parameter
8
8
  * @example
9
- * var c = new Conflator(function() { console.log("Executed"); }, 1000);
10
- * for(var i = 10; --i >= 0;) {
9
+ * let c = new Conflator(function() { console.log("Executed"); }, 1000);
10
+ * for(let i = 10; --i >= 0;) {
11
11
  * c.conflate(i); // Only one "Executed" text will be logged to console after one second
12
12
  * }
13
13
  */
14
- var Conflator = function (opt_func, opt_ms, opt_thisObj) {
14
+ let Conflator = function (opt_func, opt_ms, opt_thisObj) {
15
15
  this._onConflated = this._onConflated.bind(this);
16
16
 
17
17
  this._data = [];
@@ -73,7 +73,7 @@ Conflator.prototype.reset = function () {
73
73
  */
74
74
  Conflator.prototype.popAllData = function() {
75
75
  if(this._data.length) {
76
- var data = this._data;
76
+ let data = this._data;
77
77
  this._data = [];
78
78
  return data;
79
79
  }
@@ -4,7 +4,7 @@
4
4
  * @param {Function|number=} opt_func
5
5
  * @param {number|Function=} opt_ms The delay time in millisecond before executing the function
6
6
  */
7
- var Reverter = function (opt_func, opt_ms) {
7
+ let Reverter = function (opt_func, opt_ms) {
8
8
  this._onInterval = this._onInterval.bind(this);
9
9
 
10
10
  if(typeof opt_func == "function") {
@@ -13,8 +13,8 @@ import Conflator from "../util/Conflator.js";
13
13
  * @extends {EventDispatcher}
14
14
  * @param {!ILayoutGrid} grid
15
15
  */
16
- var SectionSettings = function (grid) {
17
- var _t = this;
16
+ let SectionSettings = function (grid) {
17
+ let _t = this;
18
18
  _t._onDataChanged = _t._onDataChanged.bind(_t);
19
19
  _t.extendEventArg = _t.extendEventArg.bind(_t);
20
20
 
@@ -149,7 +149,7 @@ SectionSettings.prototype.getDataSource = function () {
149
149
  * @param {DataView} dataView
150
150
  */
151
151
  SectionSettings.prototype.setDataSource = function (dataView) {
152
- var t = this;
152
+ let t = this;
153
153
  if(!t.getAutoSyncRowCount() || t._dataView === dataView) {
154
154
  return;
155
155
  }
@@ -174,7 +174,7 @@ SectionSettings.prototype.setDataSource = function (dataView) {
174
174
  SectionSettings.prototype.getRootDataSource = function () {
175
175
  if (!this._dataView) { return null; }
176
176
 
177
- var dataTable = this._dataView.getDataSource();
177
+ let dataTable = this._dataView.getDataSource();
178
178
  if (!dataTable) { return null; }
179
179
 
180
180
  while (dataTable.getDataSource()) {
@@ -223,11 +223,11 @@ SectionSettings.prototype.getRowData = function (rowRef) {
223
223
  SectionSettings.prototype.removeRowData = function (rowRef) {
224
224
  if (!this._dataView) { return false; }
225
225
 
226
- var dataTable = /** @type{DataTable} */(this.getRootDataSource());
226
+ let dataTable = /** @type{DataTable} */(this.getRootDataSource());
227
227
  if (!dataTable) { return false; }
228
228
 
229
229
  rowRef = this._getRowId(rowRef);
230
- var rowIndex = dataTable.getRowIndex(/** @type{string} */(rowRef));
230
+ let rowIndex = dataTable.getRowIndex(/** @type{string} */(rowRef));
231
231
  if (rowIndex < 0) { return false; }
232
232
 
233
233
  dataTable.removeRow(rowIndex);
@@ -241,8 +241,8 @@ SectionSettings.prototype.removeRowData = function (rowRef) {
241
241
  SectionSettings.prototype.activateColumns = function (activations, firstIndex, lastIndex) {
242
242
  // Column virtual rendering should only work with content section only
243
243
  if (this._type === "content") {
244
- for(var c = lastIndex + 1; --c >= firstIndex;) {
245
- var activation = activations[c];
244
+ for(let c = lastIndex + 1; --c >= firstIndex;) {
245
+ let activation = activations[c];
246
246
  if (activation != null) {
247
247
  this._grid.activateColumn(c, activation);
248
248
  }
@@ -264,7 +264,7 @@ SectionSettings.prototype.getChildren = function () { // TODO: Deprecate this me
264
264
  */
265
265
  SectionSettings.prototype.setParent = function (parent) { // TODO: Deprecate this method
266
266
  if(this._parent) {
267
- var at = this._parent._children.indexOf(this);
267
+ let at = this._parent._children.indexOf(this);
268
268
  if(at >= 0) {
269
269
  this._parent._children.splice(at, 1);
270
270
  if(this._parent._children.length <= 0) {
@@ -320,7 +320,7 @@ SectionSettings.prototype.getAutoSyncRowCount = function () {
320
320
  SectionSettings.prototype.setAutoSyncRowCount = function (bool) {
321
321
  this._autoSyncRowCount = bool;
322
322
  if (this.getAutoSyncRowCount()) {
323
- var newRowCount = (this._dataView) ? this._dataView.getVisibleRowCount() : 0;
323
+ let newRowCount = (this._dataView) ? this._dataView.getVisibleRowCount() : 0;
324
324
  this._grid.setRowCount(newRowCount);
325
325
  }
326
326
  };
@@ -339,7 +339,7 @@ SectionSettings.prototype.isDataBindable = function () {
339
339
  * @ignore
340
340
  */
341
341
  SectionSettings.prototype.dispose = function () {
342
- var _t = this;
342
+ let _t = this;
343
343
  _t._dataChangedConflator.reset();
344
344
  _t._dataArg = null;
345
345
  if (_t._grid) {
@@ -412,7 +412,7 @@ SectionSettings.prototype.extendDataEventArg = function (e, begin, end) {
412
412
  e.firstUpdate = begin;
413
413
  e.lastUpdate = end;
414
414
 
415
- var firstInView, endOfView;
415
+ let firstInView, endOfView;
416
416
  if(this._snapshot) {
417
417
  firstInView = 0;
418
418
  endOfView = this._grid.getRowCount();
@@ -423,7 +423,7 @@ SectionSettings.prototype.extendDataEventArg = function (e, begin, end) {
423
423
 
424
424
  e["fromRowIndex"] = (begin > firstInView) ? begin : firstInView; // Handles NaN value
425
425
  if (this._dataView) {
426
- var dataRowCount = this._dataView.getVisibleRowCount();
426
+ let dataRowCount = this._dataView.getVisibleRowCount();
427
427
  e["dataRowCount"] = dataRowCount;
428
428
  if (endOfView > dataRowCount) {
429
429
  endOfView = dataRowCount;
@@ -507,9 +507,9 @@ SectionSettings.prototype._onDataChanged = function (e) {
507
507
  * @param {number} lastUpdate
508
508
  */
509
509
  SectionSettings.prototype._dispatchDataChanged = function (firstUpdate, lastUpdate) {
510
- var isAutoSync = this.getAutoSyncRowCount();
511
- var newCount = (this._dataView) ? this._dataView.getVisibleRowCount() : 0;
512
- var prevCount = this._grid.getRowCount();
510
+ let isAutoSync = this.getAutoSyncRowCount();
511
+ let newCount = (this._dataView) ? this._dataView.getVisibleRowCount() : 0;
512
+ let prevCount = this._grid.getRowCount();
513
513
  if (isAutoSync) {
514
514
  if (newCount !== prevCount) {
515
515
  this._grid.setRowCount(newCount, true);
@@ -589,7 +589,7 @@ SectionSettings.prototype._getRowId = function (rowRef) {
589
589
  * @param {!Object} e
590
590
  */
591
591
  SectionSettings.prototype._mergeEvent = function (e) {
592
- var arg = this._dataArg;
592
+ let arg = this._dataArg;
593
593
  if(!arg) {
594
594
  arg = this._dataArg = {};
595
595
  arg["actualUpdate"] = true; // Indicate that this event is fired because of some changes from data view
@@ -619,9 +619,9 @@ SectionSettings.prototype._mergeEvent = function (e) {
619
619
  return;
620
620
  }
621
621
 
622
- var rids = e["rids"];
622
+ let rids = e["rids"];
623
623
  if(rids) {
624
- for(var i = rids.length; --i >= 0;) {
624
+ for(let i = rids.length; --i >= 0;) {
625
625
  arg.updatedRids[rids[i]] = true;
626
626
  }
627
627
  } else if(e["rid"]) {
@@ -643,7 +643,7 @@ SectionSettings.prototype._calculateChangeIndices = function () {
643
643
  }
644
644
 
645
645
  // Calculate the first and last update indices.
646
- var rid, rowIndex;
646
+ let rid, rowIndex;
647
647
  if(this._dataArg.indexShifted) {
648
648
  if(this._dataArg.dataRemoved) {
649
649
  this._dataArg.firstUpdate = 0;
@@ -2,7 +2,7 @@
2
2
  /** @constructor
3
3
  * @ignore
4
4
  */
5
- var SelectionList = function () {
5
+ let SelectionList = function () {
6
6
  this._selections = [];
7
7
  };
8
8
  /** Clone all members
@@ -11,7 +11,7 @@ var SelectionList = function () {
11
11
  */
12
12
  SelectionList.prototype.clone = function () {
13
13
  // IMPORTANT NOTE: If you add any field or member to this class, clone it over here too.
14
- var newObj = new SelectionList();
14
+ let newObj = new SelectionList();
15
15
  newObj._selections = this._selections.concat();
16
16
  newObj._count = this._count;
17
17
  newObj._anchor = this._anchor;
@@ -86,9 +86,9 @@ SelectionList.prototype.deselectFrom = function (at) {
86
86
  return true;
87
87
  }
88
88
 
89
- var lastIndex = this._lastIndex;
90
- var sels = this._selections;
91
- for(var i = at; i <= lastIndex; ++i) {
89
+ let lastIndex = this._lastIndex;
90
+ let sels = this._selections;
91
+ for(let i = at; i <= lastIndex; ++i) {
92
92
  if (sels[i]) {
93
93
  sels[at] = false;
94
94
  --this._count;
@@ -150,8 +150,8 @@ SelectionList.prototype.selectRange = function (anchor, length) {
150
150
  return;
151
151
  }
152
152
 
153
- var at = anchor;
154
- var endIndex = at + length;
153
+ let at = anchor;
154
+ let endIndex = at + length;
155
155
  if (length < 0) {
156
156
  endIndex = at + 1;
157
157
  at = endIndex + length;
@@ -169,7 +169,7 @@ SelectionList.prototype.selectRange = function (anchor, length) {
169
169
  this._lastIndex = endIndex - 1;
170
170
  }
171
171
 
172
- for (var i = at; i < endIndex; ++i) {
172
+ for (let i = at; i < endIndex; ++i) {
173
173
  this._select(i);
174
174
  }
175
175
  };
@@ -188,7 +188,7 @@ SelectionList.prototype.deselectRange = function (at, length) {
188
188
  return;
189
189
  }
190
190
 
191
- var endIndex = at + length;
191
+ let endIndex = at + length;
192
192
  if (length < 0) {
193
193
  endIndex = at + 1;
194
194
  at = endIndex + length;
@@ -209,7 +209,7 @@ SelectionList.prototype.deselectRange = function (at, length) {
209
209
  this._lastIndex = this._findPrevSelection(at);
210
210
  }
211
211
 
212
- var i = 0;
212
+ let i = 0;
213
213
  for (i = at; i < endIndex; ++i) {
214
214
  if (this._selections[i]) {
215
215
  this._selections[i] = false;
@@ -226,7 +226,7 @@ SelectionList.prototype.hasSelection = function(at, length) {
226
226
  if(this._count <= 0) {
227
227
  return false;
228
228
  }
229
- var endIndex = at + length;
229
+ let endIndex = at + length;
230
230
  if (length < 0) {
231
231
  endIndex = at + 1;
232
232
  at = endIndex + length;
@@ -235,7 +235,7 @@ SelectionList.prototype.hasSelection = function(at, length) {
235
235
  return false;
236
236
  }
237
237
 
238
- for(var i = at; i < endIndex; ++i) {
238
+ for(let i = at; i < endIndex; ++i) {
239
239
  if(this._selections[i]) {
240
240
  return true;
241
241
  }
@@ -300,11 +300,11 @@ SelectionList.prototype.getLastSelectedIndex = function() {
300
300
  */
301
301
  SelectionList.prototype.getAllSelections = function() {
302
302
  if(this._count > 0) {
303
- var ary = new Array(this._count); // Fastest way to create an array
304
- var count = 0;
305
- var sels = this._selections;
306
- var lastIdx = this._lastIndex;
307
- for(var i = this._firstIndex; i <= lastIdx; ++i) {
303
+ let ary = new Array(this._count); // Fastest way to create an array
304
+ let count = 0;
305
+ let sels = this._selections;
306
+ let lastIdx = this._lastIndex;
307
+ for(let i = this._firstIndex; i <= lastIdx; ++i) {
308
308
  if(sels[i]) {
309
309
  ary[count++] = i;
310
310
  }
@@ -321,7 +321,7 @@ SelectionList.prototype.getAllSelections = function() {
321
321
  */
322
322
  SelectionList.prototype.getConnectedRanges = function(from, to) {
323
323
  if(this._count > 0) {
324
- var ary = [];
324
+ let ary = [];
325
325
  if(from == null || from < this._firstIndex) {
326
326
  from = this._firstIndex;
327
327
  }
@@ -329,8 +329,8 @@ SelectionList.prototype.getConnectedRanges = function(from, to) {
329
329
  to = this._lastIndex + 1;
330
330
  }
331
331
 
332
- var pair = null;
333
- for(var i = from; i < to; ++i) {
332
+ let pair = null;
333
+ for(let i = from; i < to; ++i) {
334
334
  if(this._selections[i]) {
335
335
  if(!pair) {
336
336
  pair = [i, -1];
@@ -364,7 +364,7 @@ SelectionList.prototype.getSelectionMap = function () {
364
364
  */
365
365
  SelectionList.prototype.clearAllSelections = function() {
366
366
  if(this._count > 0) {
367
- var count = 0;
367
+ let count = 0;
368
368
  this._selections.length = 0;
369
369
  this._count = 0;
370
370
  this._anchor = -1;
@@ -385,7 +385,7 @@ SelectionList.prototype.clearAllSelections = function() {
385
385
  SelectionList.prototype.copyFrom = function (srcSelections, fromSrcIndex, offset, forLength) {
386
386
  if (forLength <= 0) { return; }
387
387
 
388
- var toThisIndex = fromSrcIndex + offset;
388
+ let toThisIndex = fromSrcIndex + offset;
389
389
  if (srcSelections == null) {
390
390
  this.deselectRange(toThisIndex, forLength);
391
391
  return;
@@ -396,7 +396,7 @@ SelectionList.prototype.copyFrom = function (srcSelections, fromSrcIndex, offset
396
396
  }
397
397
 
398
398
 
399
- for (var i = 0; i < forLength; ++i) {
399
+ for (let i = 0; i < forLength; ++i) {
400
400
  if (srcSelections._selections[fromSrcIndex + i]) {
401
401
  this.select(toThisIndex + i);
402
402
  } else {