@refinitiv-ui/efx-grid 6.0.91 → 6.0.93

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 (160) 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/filter-dialog/lib/filter-dialog.js +1 -0
  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-checkbox/es6/Checkbox.js +268 -268
  50. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +3 -2
  51. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +60 -32
  52. package/lib/tr-grid-column-stack/es6/ColumnStack.js +279 -279
  53. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +227 -207
  54. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +11 -11
  55. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +1 -2
  56. package/lib/tr-grid-row-dragging/es6/RowDragging.js +120 -121
  57. package/lib/tr-grid-util/es6/CellPainter.js +94 -104
  58. package/lib/tr-grid-util/es6/Conflator.js +4 -4
  59. package/lib/tr-grid-util/es6/CoralItems.js +6 -6
  60. package/lib/tr-grid-util/es6/DateTime.js +41 -41
  61. package/lib/tr-grid-util/es6/Deferred.js +5 -5
  62. package/lib/tr-grid-util/es6/Delay.d.ts +3 -3
  63. package/lib/tr-grid-util/es6/Delay.js +14 -3
  64. package/lib/tr-grid-util/es6/Dom.js +26 -26
  65. package/lib/tr-grid-util/es6/DragUI.js +17 -17
  66. package/lib/tr-grid-util/es6/ElementObserver.js +12 -12
  67. package/lib/tr-grid-util/es6/ElementWrapper.js +2 -2
  68. package/lib/tr-grid-util/es6/ElfDate.js +4 -4
  69. package/lib/tr-grid-util/es6/ElfUtil.js +37 -37
  70. package/lib/tr-grid-util/es6/EventDispatcher.js +12 -12
  71. package/lib/tr-grid-util/es6/ExpanderIcon.js +6 -6
  72. package/lib/tr-grid-util/es6/ExpressionParser.js +43 -43
  73. package/lib/tr-grid-util/es6/Ext.js +6 -6
  74. package/lib/tr-grid-util/es6/FieldFormatter.js +17 -17
  75. package/lib/tr-grid-util/es6/FilterBuilder.js +57 -58
  76. package/lib/tr-grid-util/es6/FilterOperators.d.ts +12 -1
  77. package/lib/tr-grid-util/es6/FilterOperators.js +13 -2
  78. package/lib/tr-grid-util/es6/GridPlugin.js +86 -87
  79. package/lib/tr-grid-util/es6/GroupDefinitions.js +90 -90
  80. package/lib/tr-grid-util/es6/Icon.js +4 -4
  81. package/lib/tr-grid-util/es6/MouseDownTrait.js +6 -6
  82. package/lib/tr-grid-util/es6/MultiTableManager.js +71 -80
  83. package/lib/tr-grid-util/es6/NumberFormatter.js +23 -23
  84. package/lib/tr-grid-util/es6/PercentBar.js +17 -17
  85. package/lib/tr-grid-util/es6/Perf.js +5 -5
  86. package/lib/tr-grid-util/es6/Popup.js +42 -42
  87. package/lib/tr-grid-util/es6/RangeBar.js +5 -5
  88. package/lib/tr-grid-util/es6/RequestQueue.js +5 -5
  89. package/lib/tr-grid-util/es6/RowPainter.js +23 -23
  90. package/lib/tr-grid-util/es6/SubTable.js +94 -94
  91. package/lib/tr-grid-util/es6/Table.js +51 -51
  92. package/lib/tr-grid-util/es6/TextHighlighter.js +52 -52
  93. package/lib/tr-grid-util/es6/TickCodes.js +2 -2
  94. package/lib/tr-grid-util/es6/Timer.js +2 -2
  95. package/lib/tr-grid-util/es6/TouchProxy.js +7 -7
  96. package/lib/tr-grid-util/es6/Util.js +50 -50
  97. package/lib/tr-grid-util/es6/formula/ADCService.js +2 -2
  98. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +19 -19
  99. package/lib/tr-grid-util/es6/formula/AdFinService.js +2 -2
  100. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +19 -19
  101. package/lib/tr-grid-util/es6/formula/Engine.js +56 -56
  102. package/lib/tr-grid-util/es6/formula/Formula.js +62 -62
  103. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +3 -3
  104. package/lib/tr-grid-util/es6/formula/Realtime.js +15 -15
  105. package/lib/tr-grid-util/es6/formula/RealtimeService.js +15 -15
  106. package/lib/tr-grid-util/es6/formula/TSIService.js +2 -2
  107. package/lib/tr-grid-util/es6/formula/TSISubscription.js +104 -104
  108. package/lib/tr-grid-util/es6/formula/VariableToken.js +20 -20
  109. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +10 -10
  110. package/lib/tr-grid-util/es6/formula/functions/Excel.js +1 -1
  111. package/lib/tr-grid-util/es6/formula/functions/Info.js +2 -2
  112. package/lib/tr-grid-util/es6/formula/functions/Internal.js +5 -5
  113. package/lib/tr-grid-util/es6/formula/functions/Logic.js +5 -5
  114. package/lib/tr-grid-util/es6/formula/functions/Math.js +46 -46
  115. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +27 -27
  116. package/lib/tr-grid-util/es6/formula/functions/Text.js +19 -19
  117. package/lib/tr-grid-util/es6/index.js +1 -1
  118. package/lib/tr-grid-util/es6/jet/Adc.js +36 -36
  119. package/lib/tr-grid-util/es6/jet/CollectionDict.js +11 -11
  120. package/lib/tr-grid-util/es6/jet/DataGenerator.js +95 -95
  121. package/lib/tr-grid-util/es6/jet/DataSet.js +1 -1
  122. package/lib/tr-grid-util/es6/jet/MockArchive.js +5 -5
  123. package/lib/tr-grid-util/es6/jet/MockJET.js +1 -1
  124. package/lib/tr-grid-util/es6/jet/MockQuotes.js +13 -13
  125. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +100 -100
  126. package/lib/tr-grid-util/es6/jet/MockRTK.js +4 -4
  127. package/lib/tr-grid-util/es6/jet/MockUtil.js +2 -2
  128. package/lib/tr-grid-util/es6/jet/index.js +1 -1
  129. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +15 -15
  130. package/lib/tr-grid-util/es6/locale/translation-de.js +1 -1
  131. package/lib/tr-grid-util/es6/locale/translation-en.js +1 -1
  132. package/lib/tr-grid-util/es6/locale/translation-ja.js +1 -1
  133. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +1 -1
  134. package/lib/tr-grid-util/es6/locale/translation-zh.js +1 -1
  135. package/lib/tr-grid-util/es6/locale/translation.js +1 -1
  136. package/lib/types/es6/ColumnDragging.d.ts +1 -1
  137. package/lib/types/es6/ColumnGrouping.d.ts +3 -1
  138. package/lib/types/es6/Core/data/DataTable.d.ts +4 -0
  139. package/lib/types/es6/Core/data/DataView.d.ts +2 -0
  140. package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
  141. package/lib/types/es6/Core/index.d.ts +0 -2
  142. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -1
  143. package/lib/types/es6/RowDragging.d.ts +1 -2
  144. package/lib/versions.json +12 -12
  145. package/package.json +1 -1
  146. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +0 -18
  147. package/lib/core/es6/grid/util/ElementFrameWork.js +0 -227
  148. package/lib/core/es6/grid/util/HttpRequest.d.ts +0 -53
  149. package/lib/core/es6/grid/util/HttpRequest.js +0 -371
  150. package/lib/core/es6/grid/util/PercentBar.d.ts +0 -43
  151. package/lib/core/es6/grid/util/PercentBar.js +0 -390
  152. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +0 -41
  153. package/lib/core/es6/grid/util/PercentBarRenderer.js +0 -316
  154. package/lib/core/es6/grid/util/RangeBar.d.ts +0 -25
  155. package/lib/core/es6/grid/util/RangeBar.js +0 -255
  156. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +0 -18
  157. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +0 -53
  158. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +0 -43
  159. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +0 -41
  160. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +0 -25
@@ -17,7 +17,7 @@ import { injectCss, prettifyCss } from "./Util.js";
17
17
  * @private
18
18
  * @const
19
19
  */
20
- var _alignments = {
20
+ let _alignments = {
21
21
  "l": "l",
22
22
  "c": "c",
23
23
  "r": "r",
@@ -31,7 +31,7 @@ var _alignments = {
31
31
  * @param {string|null} str Any string such as l, c, r, L, C, R, left, right, center
32
32
  * @return {string} Possible values are l, c, r or empty string
33
33
  */
34
- var toAlignment = function(str) {
34
+ let toAlignment = function(str) {
35
35
  if(str) {
36
36
  return _alignments[str.charAt(0)] || "";
37
37
  }
@@ -43,7 +43,7 @@ var toAlignment = function(str) {
43
43
  * @param {(Element|null)=} elem Element to be rendered as PercentBar
44
44
  * @param {PercentBar~Options=} options
45
45
  */
46
- var PercentBar = function (elem, options) {
46
+ let PercentBar = function (elem, options) {
47
47
  this._topNode = elem || Dom.div();
48
48
  this._topNode._percentBar = this; // HACK: For internal reference by PercentBarRenderer
49
49
  this._topNode.classList.add("tr-percent-bar");
@@ -54,7 +54,7 @@ var PercentBar = function (elem, options) {
54
54
 
55
55
  this._txt = Dom.create("span");
56
56
  // this._txt.style.textOverflow = "ellipsis";
57
- var alignment = "l";
57
+ let alignment = "l";
58
58
  if(options) {
59
59
  if(options.alignment) {
60
60
  alignment = options.alignment;
@@ -67,7 +67,7 @@ var PercentBar = function (elem, options) {
67
67
  }
68
68
 
69
69
  // Manage text visibility state
70
- var visibilityDirty = 0;
70
+ let visibilityDirty = 0;
71
71
  if(options.textWidth != null) {
72
72
  visibilityDirty = 1;
73
73
  this.setTextWidth(options.textWidth);
@@ -240,7 +240,7 @@ PercentBar.prototype.isInvalid = function () {
240
240
  * @return {boolean} Returns invalidity
241
241
  */
242
242
  PercentBar.prototype._checkInvalidity = function () {
243
- var invalid = (this._absValue !== this._absValue) || !this._maxValue;
243
+ let invalid = (this._absValue !== this._absValue) || !this._maxValue;
244
244
  if(invalid !== this._invalid) {
245
245
  this._invalid = invalid;
246
246
  this._topNode.style.display = invalid ? "none" : "";
@@ -253,7 +253,7 @@ PercentBar.prototype._checkInvalidity = function () {
253
253
  * @param {(string|boolean)=} displayText If a string is specified, it will be shown instead of the default one. If false value is specified, the existing text is left untouched.
254
254
  */
255
255
  PercentBar.prototype.setValue = function (value, opt_max, displayText) {
256
- var t = this;
256
+ let t = this;
257
257
  if(value && typeof value !== "number") { // Perform automatic data conversion if value is not a number
258
258
  value = +value;
259
259
  }
@@ -304,7 +304,7 @@ PercentBar.prototype.setMax = function (absVal) {
304
304
  * @return {boolean} Returns true if there is any change.
305
305
  */
306
306
  PercentBar.prototype.hideZeroValue = function (hidden) {
307
- var bool = hidden !== false;
307
+ let bool = hidden !== false;
308
308
  if(this._zeroValueHidden !== bool) {
309
309
  this._zeroValueHidden = bool;
310
310
  if(this._alignment) { // Execute only after the initialization
@@ -345,7 +345,7 @@ PercentBar.prototype.setText = function (txt) {
345
345
  * @return {boolean} Returns true if there is any change.
346
346
  */
347
347
  PercentBar.prototype.hideText = function (hidden) {
348
- var bool = hidden !== false;
348
+ let bool = hidden !== false;
349
349
  if(this._textHidden !== bool) {
350
350
  this._textHidden = bool;
351
351
  if(this._alignment) { // Execute only after the initialization
@@ -377,7 +377,7 @@ PercentBar.prototype.isTextHidden = function () {
377
377
  * @return {boolean} Return true if there is any change
378
378
  */
379
379
  PercentBar.prototype._updateTextVisibility = function () {
380
- var textVisibility = !this.isTextHidden();
380
+ let textVisibility = !this.isTextHidden();
381
381
  if (this._textInDoc !== textVisibility) {
382
382
  this._textInDoc = textVisibility;
383
383
  if(textVisibility) {
@@ -410,7 +410,7 @@ PercentBar.prototype._updateTextWidth = function () {
410
410
  * @param {number|string} width
411
411
  */
412
412
  PercentBar.prototype.setTextWidth = function (width) {
413
- var txtWidth = "56px"; // Default width
413
+ let txtWidth = "56px"; // Default width
414
414
  if(typeof width === "number") {
415
415
  txtWidth = (width > 8) ? width + "px" : "0px"; // Default padding is 4 on both sides, so minimum is 8
416
416
  } else if(typeof width === "string" && width) {
@@ -498,7 +498,7 @@ PercentBar.prototype._reorderElements = function () {
498
498
  * @param {boolean=} opt_enabled
499
499
  */
500
500
  PercentBar.prototype.useMovementColor = function (opt_enabled) {
501
- var newMovementColor = opt_enabled !== false;
501
+ let newMovementColor = opt_enabled !== false;
502
502
  if(this._movementColor !== newMovementColor) {
503
503
  this._movementColor = newMovementColor;
504
504
  this.updateBarColor();
@@ -515,7 +515,7 @@ PercentBar.prototype.setTrackColor = function (color) {
515
515
  * @param {string=} color
516
516
  */
517
517
  PercentBar.prototype.setBarColor = function (color) {
518
- var newColor = color || "";
518
+ let newColor = color || "";
519
519
  if(this._barColor !== newColor) {
520
520
  this._barColor = newColor;
521
521
  this.updateBarColor();
@@ -537,7 +537,7 @@ PercentBar.prototype.enableTooltip = function (enabled) {
537
537
  * @param {(string|boolean)=} displayText If a string is specified, it will be shown instead of the default one. If false value is specified, the existing text is left untouched.
538
538
  */
539
539
  PercentBar.prototype._updateValue = function (opt_updateVal, displayText) {
540
- var t = this;
540
+ let t = this;
541
541
  if(t._dirtySign) {
542
542
  t._dirtySign = false;
543
543
  if(t._alignment === "c") {
@@ -565,7 +565,7 @@ PercentBar.prototype._updateValue = function (opt_updateVal, displayText) {
565
565
  this._updateTextWidth();
566
566
  }
567
567
  }
568
- var percent = t._maxValue !== 100 ? t._absValue / t._maxValue * 100 : t._absValue;
568
+ let percent = t._maxValue !== 100 ? t._absValue / t._maxValue * 100 : t._absValue;
569
569
  t._bar.style.width = percent + "%";
570
570
  if(displayText != null) {
571
571
  if(displayText !== false) { // Allow keeping previous text
@@ -580,7 +580,7 @@ PercentBar.prototype._updateValue = function (opt_updateVal, displayText) {
580
580
  * @public
581
581
  */
582
582
  PercentBar.prototype.updateBarColor = function () {
583
- var barColor;
583
+ let barColor;
584
584
  if(this._barColor) {
585
585
  barColor = this._barColor;
586
586
  } else if(this._movementColor) {
@@ -589,7 +589,7 @@ PercentBar.prototype.updateBarColor = function () {
589
589
  barColor = ElfUtil.themeColors["trackColor"];
590
590
  }
591
591
  if(barColor) {
592
- var barStyle = this._bar.style;
592
+ let barStyle = this._bar.style;
593
593
  if(barStyle.backgroundColor !== barColor) {
594
594
  barStyle.backgroundColor = barColor;
595
595
  }
@@ -2,7 +2,7 @@
2
2
  * @namespace
3
3
  * @param {Element=} elem
4
4
  */
5
- var Perf = {};
5
+ let Perf = {};
6
6
 
7
7
  /** Enable performance profiling
8
8
  * @public
@@ -11,7 +11,7 @@ var Perf = {};
11
11
  */
12
12
  Perf.enable = function(enabled) {
13
13
  if(enabled || enabled == null) {
14
- var perfObj = window["performance"];
14
+ let perfObj = window["performance"];
15
15
  if(perfObj && typeof perfObj.mark == "function") {
16
16
  Perf._perf = perfObj;
17
17
  }
@@ -90,7 +90,7 @@ Perf.getEntriesByType = function(entryType) {
90
90
  * @return {PerformanceEntry}
91
91
  */
92
92
  Perf.getEntry = function(entryName, entryType) {
93
- var ary = Perf._perf.getEntriesByName(entryName, entryType);
93
+ let ary = Perf._perf.getEntriesByName(entryName, entryType);
94
94
  return ary ? ary[0] : null;
95
95
  };
96
96
 
@@ -132,13 +132,13 @@ Perf.now = function() {
132
132
  * @param {...*} arg
133
133
  * @return {*}
134
134
  */
135
- var emptyMethod = function(arg) {
135
+ let emptyMethod = function(arg) {
136
136
  return null;
137
137
  };
138
138
  /** @type {Object}
139
139
  * @private
140
140
  */
141
- var EmptyPerf = {};
141
+ let EmptyPerf = {};
142
142
  EmptyPerf.clearMarks = emptyMethod;
143
143
  EmptyPerf.clearMeasures = emptyMethod;
144
144
  EmptyPerf.clearResourceTimings = emptyMethod;
@@ -72,13 +72,13 @@ import { Dom } from './Dom.js';
72
72
  * @param {MouseEvent} e
73
73
  * @return {boolean}
74
74
  */
75
- var containElements = function (parentElem, e) {
75
+ let containElements = function (parentElem, e) {
76
76
  // Use e.composedPath() instead of e.target (if composedPath exists)
77
77
  // when popup inside custom element and popup has been clicked
78
78
  // e.target appear to be custom element itself (we expect to be element item inside popup)
79
79
  // so use e.composedPath() will make the trick
80
80
  if (e.composedPath) {
81
- var elems = e.composedPath();
81
+ let elems = e.composedPath();
82
82
  if (elems.indexOf(parentElem) >= 0) {
83
83
  return true;
84
84
  }
@@ -92,12 +92,12 @@ var containElements = function (parentElem, e) {
92
92
  * @param {(Element|Popup~Options)=} popupElem Popup element or popup configuration object
93
93
  * @param {Popup~Options=} options
94
94
  * @example
95
- * var pu = new Popup(popupElem);
95
+ * let pu = new Popup(popupElem);
96
96
  * pu.attachTo(some_elem);
97
97
  * pu.show();
98
98
  */
99
- var Popup = function (popupElem, options) {
100
- var t = this;
99
+ let Popup = function (popupElem, options) {
100
+ let t = this;
101
101
  t["show"] = t.show = t.show.bind(t);
102
102
  t["hide"] = t.hide = t.hide.bind(t);
103
103
  t["toggle"] = t.toggle = t.toggle.bind(t);
@@ -231,7 +231,7 @@ Popup.prototype.dispose = function () {
231
231
  this._removeEventListeners();
232
232
  this._clearMouseOverTimer();
233
233
 
234
- for (var i = this._children.length; --i >= 0;) {
234
+ for (let i = this._children.length; --i >= 0;) {
235
235
  this._children[i].dispose();
236
236
  }
237
237
 
@@ -316,10 +316,10 @@ Popup.prototype.init = function (options) {
316
316
  this.addListener(options, "shown");
317
317
  this.addListener(options, "hidden");
318
318
 
319
- var fe = options["focusElement"] || options["focusElements"];
319
+ let fe = options["focusElement"] || options["focusElements"];
320
320
  if (fe) {
321
321
  if (Array.isArray(fe)) {
322
- for (var i = fe.length; --i >= 0;) {
322
+ for (let i = fe.length; --i >= 0;) {
323
323
  this.addFocusElement(fe[i]);
324
324
  }
325
325
  } else {
@@ -378,7 +378,7 @@ Popup.prototype.addFocusElement = function (elem) {
378
378
  */
379
379
  Popup.prototype.removeFocusElement = function (elem) {
380
380
  if (elem) {
381
- var at = this._focusElements.indexOf(elem);
381
+ let at = this._focusElements.indexOf(elem);
382
382
  if (at >= 0) {
383
383
  this._focusElements.splice(at, 1);
384
384
  }
@@ -433,18 +433,18 @@ Popup.prototype.setParentElement = function (parentElement) {
433
433
  * @fires Popup#positioning
434
434
  */
435
435
  Popup.prototype.show = function (opt_shown, parentElement) {
436
- var t = this;
436
+ let t = this;
437
437
  t._clearMouseOverTimer();
438
438
  if (t._disabled) { return; }
439
439
 
440
- var shown = opt_shown !== false;
441
- var dirty = t._inDoc !== shown;
440
+ let shown = opt_shown !== false;
441
+ let dirty = t._inDoc !== shown;
442
442
  if (!dirty) {
443
443
  t.updatePosition();
444
444
  return;
445
445
  }
446
446
 
447
- var evtType = shown ? "show" : "hide";
447
+ let evtType = shown ? "show" : "hide";
448
448
  t._evtArg["type"] = evtType;
449
449
  t._dispatch(evtType, t._evtArg);
450
450
  if (t._evtArg["cancel"]) {
@@ -474,7 +474,7 @@ Popup.prototype.show = function (opt_shown, parentElement) {
474
474
  t._removeEventListeners();
475
475
  t._restoreElementSize();
476
476
 
477
- for (var i = t._children.length; --i >= 0;) {
477
+ for (let i = t._children.length; --i >= 0;) {
478
478
  t._children[i].hide();
479
479
  }
480
480
  t._inDoc = false;
@@ -539,8 +539,8 @@ Popup.prototype.contains = function (elems) {
539
539
  if (elems) {
540
540
  elems = Array.isArray(elems) ? elems : [elems];
541
541
 
542
- var fe = this._focusElements;
543
- for (var i = fe.length; --i >= 0;) {
542
+ let fe = this._focusElements;
543
+ for (let i = fe.length; --i >= 0;) {
544
544
  if (elems.indexOf(fe[i]) >= 0 || fe[i].contains(elems[0])) {
545
545
  return true;
546
546
  }
@@ -564,7 +564,7 @@ Popup.prototype.setPositioning = function (posType) {
564
564
  * @param {boolean=} opt_disabled
565
565
  */
566
566
  Popup.prototype.disableAutoHiding = function (opt_disabled) {
567
- var autoHiding = (opt_disabled === false);
567
+ let autoHiding = (opt_disabled === false);
568
568
  if (this._autoHiding !== autoHiding) {
569
569
  this._autoHiding = autoHiding;
570
570
  if (this._inDoc) {
@@ -582,7 +582,7 @@ Popup.prototype.disableAutoHiding = function (opt_disabled) {
582
582
  * @param {boolean=} opt_disabled
583
583
  */
584
584
  Popup.prototype.disableAutoRepositioning = function (opt_disabled) {
585
- var autoRepositioning = (opt_disabled === false);
585
+ let autoRepositioning = (opt_disabled === false);
586
586
  if (this._autoRepositioning !== autoRepositioning) {
587
587
  this._autoRepositioning = autoRepositioning;
588
588
  }
@@ -591,7 +591,7 @@ Popup.prototype.disableAutoRepositioning = function (opt_disabled) {
591
591
  * @param {boolean=} opt_disabled
592
592
  */
593
593
  Popup.prototype.disableAutoClipping = function (opt_disabled) {
594
- var autoClipping = (opt_disabled === false);
594
+ let autoClipping = (opt_disabled === false);
595
595
  if (this._autoClipping !== autoClipping) {
596
596
  this._autoClipping = autoClipping;
597
597
  }
@@ -600,7 +600,7 @@ Popup.prototype.disableAutoClipping = function (opt_disabled) {
600
600
  * @param {boolean=} opt_disabled
601
601
  */
602
602
  Popup.prototype.disableHideOnScroll = function (opt_disabled) {
603
- var hideOnScroll = (opt_disabled === false);
603
+ let hideOnScroll = (opt_disabled === false);
604
604
  if (this._hideOnScroll !== hideOnScroll) {
605
605
  this._hideOnScroll = hideOnScroll;
606
606
  }
@@ -615,7 +615,7 @@ Popup.prototype.updatePosition = function (fallback) {
615
615
  if(fallback == null){
616
616
  fallback = true;
617
617
  }
618
- var t = this;
618
+ let t = this;
619
619
  t._resizeTimer = 0;
620
620
 
621
621
  if (!t._inDoc) { return; }
@@ -628,26 +628,26 @@ Popup.prototype.updatePosition = function (fallback) {
628
628
  if (t._autoClipping) {
629
629
  t._restoreElementSize();
630
630
  }
631
- var refElement = document.body;
631
+ let refElement = document.body;
632
632
  if (t._positioning === "over") {
633
633
  refElement = document.documentElement;
634
634
  }
635
- var pos = Dom.getRelativePosition(t._attachedElem, refElement);
636
- var px = pos["x"];
637
- var py = pos["y"];
638
-
639
- var ww = window.innerWidth;
640
- var wh = window.innerHeight;
641
- var sx = (window.scrollX != null) ? window.scrollX : window.pageXOffset;
642
- var sy = (window.scrollY != null) ? window.scrollY : window.pageYOffset;
643
- var rb = ww + sx; // view port right bound
644
- var bb = wh + sy; // view port bottom bound
645
-
646
- var aw = t._attachedElem.offsetWidth;
647
- var ah = t._attachedElem.offsetHeight;
648
- var ew = t._elem.offsetWidth;
649
- var eh = t._elem.offsetHeight;
650
- var x, y;
635
+ let pos = Dom.getRelativePosition(t._attachedElem, refElement);
636
+ let px = pos["x"];
637
+ let py = pos["y"];
638
+
639
+ let ww = window.innerWidth;
640
+ let wh = window.innerHeight;
641
+ let sx = (window.scrollX != null) ? window.scrollX : window.pageXOffset;
642
+ let sy = (window.scrollY != null) ? window.scrollY : window.pageYOffset;
643
+ let rb = ww + sx; // view port right bound
644
+ let bb = wh + sy; // view port bottom bound
645
+
646
+ let aw = t._attachedElem.offsetWidth;
647
+ let ah = t._attachedElem.offsetHeight;
648
+ let ew = t._elem.offsetWidth;
649
+ let eh = t._elem.offsetHeight;
650
+ let x, y;
651
651
  if (t._positioning == "right") {
652
652
  x = px + aw + this._gap;
653
653
  y = py;
@@ -715,7 +715,7 @@ Popup.prototype.updatePosition = function (fallback) {
715
715
  t._elem.style.top = "calc(46vh - " + Math.floor(t._elem.offsetHeight / 2) + "px)";
716
716
  }
717
717
 
718
- var evtType = "positioning";
718
+ let evtType = "positioning";
719
719
  t._evtArg["type"] = evtType;
720
720
  t._dispatch(evtType, t._evtArg);
721
721
  };
@@ -725,7 +725,7 @@ Popup.prototype.updatePosition = function (fallback) {
725
725
  * @return {boolean} previous uiBlocking state
726
726
  */
727
727
  Popup.prototype.enableUIBlocking = function (bool) {
728
- var prev = this._uiBlocking;
728
+ let prev = this._uiBlocking;
729
729
  this._uiBlocking = bool !== false;
730
730
  return prev;
731
731
  };
@@ -735,10 +735,10 @@ Popup.prototype.enableUIBlocking = function (bool) {
735
735
  */
736
736
  Popup.prototype._attachOverlay = function (parentElem) {
737
737
  if (!this._overlay) {
738
- var elem = this._overlay = document.createElement('div');
738
+ let elem = this._overlay = document.createElement('div');
739
739
 
740
740
  // set style to overlay
741
- var style = elem.style;
741
+ let style = elem.style;
742
742
  style.height = "100%";
743
743
  style.width = "100%";
744
744
  style.top = "0";
@@ -8,7 +8,7 @@ import {ElfUtil} from './ElfUtil.js';
8
8
  * @param {Element=} elem
9
9
  * @param {Object=} options
10
10
  */
11
- var RangeBar = function (elem, options) { // TODO: Add type definition for options object showing all available options
11
+ let RangeBar = function (elem, options) { // TODO: Add type definition for options object showing all available options
12
12
  this._elem = elem || Dom.div();
13
13
  this._elem.style.lineHeight = "1";
14
14
  this._elem.style.position = "relative";
@@ -112,7 +112,7 @@ RangeBar.prototype.setStyles = function(obj) {
112
112
  if(!obj) {
113
113
  obj = {};
114
114
  }
115
- var defaults = RangeBar.defaults;
115
+ let defaults = RangeBar.defaults;
116
116
  this._styles = {};
117
117
  this._styles["trackColor"] = obj["trackColor"] || ElfUtil.themeColors["trackColor"];
118
118
  this._styles["fontColor"] = obj["color"] || obj["fontColor"] || defaults["fontColor"] || null;
@@ -153,8 +153,8 @@ RangeBar.prototype.setStyles = function(obj) {
153
153
  * @param {number=} highVal
154
154
  */
155
155
  RangeBar.prototype._updateTooltip = function(lowVal, lastVal, highVal) {
156
- // var lineBreak = "\n";
157
- // var title = "";
156
+ // let lineBreak = "\n";
157
+ // let title = "";
158
158
  // if((typeof lowVal === "number") && (lowVal >= 0)) {
159
159
  // title += ("Low: " + lowVal);
160
160
  // }
@@ -241,7 +241,7 @@ RangeBar.prototype.isInvalid = function() {
241
241
  /** @private */
242
242
  RangeBar.prototype._updateUI = function() {
243
243
  if(this.isValid()) {
244
- var percent = ((this._percent * 10000) | 0) / 10000; // rounding number
244
+ let percent = ((this._percent * 10000) | 0) / 10000; // rounding number
245
245
  this._slider.style.left = "calc(" +
246
246
  (percent * 100) +
247
247
  "% - " +
@@ -9,12 +9,12 @@
9
9
  * @param {number=} reqLimit Number of requests allowed. Use zero reqLimit to lift up the limit
10
10
  * @param {number=} timeLimit Time limit in milliseconds
11
11
  * @example
12
- * var rq = new RequestQueue(function(val, q) { console.log(val); return true; }, 1, 1000);
13
- * for(var i = 0; i < 10; ++i) {
12
+ * let rq = new RequestQueue(function(val, q) { console.log(val); return true; }, 1, 1000);
13
+ * for(let i = 0; i < 10; ++i) {
14
14
  * rq.add(i); // Number 1 - 10 will be logged to console every one second
15
15
  * }
16
16
  */
17
- var RequestQueue = function (reqBuilder, reqLimit, timeLimit) {
17
+ let RequestQueue = function (reqBuilder, reqLimit, timeLimit) {
18
18
  this._onSuccess = this._onSuccess.bind(this);
19
19
  this._onFail = this._onFail.bind(this);
20
20
  this._onRefreshCounter = this._onRefreshCounter.bind(this);
@@ -157,12 +157,12 @@ RequestQueue.prototype.getQueue = function() {
157
157
  * @return {Promise<Response>}
158
158
  */
159
159
  RequestQueue.prototype.makeRequest = function(obj) {
160
- var req = this._reqBuilder ? this._reqBuilder(obj, this._reqQueue) : null;
160
+ let req = this._reqBuilder ? this._reqBuilder(obj, this._reqQueue) : null;
161
161
  if(!req) { // 0, null, NaN, undefined, "" (empty string)
162
162
  return null; // No request is created at this time
163
163
  }
164
164
 
165
- var prom = null;
165
+ let prom = null;
166
166
  if(typeof req === "string") {
167
167
  // WARNING: fetch() is not supported in IE
168
168
  prom = fetch(req); // WARNING: Response with Response object.
@@ -32,7 +32,7 @@ import { Icon } from "./Icon.js";
32
32
  * @constructor
33
33
  * @param {RowPainter~Options=} options
34
34
  */
35
- var RowPainter = function(options) {
35
+ let RowPainter = function(options) {
36
36
  this._menuIconClicked = this._menuIconClicked.bind(this);
37
37
 
38
38
  this.config(options);
@@ -161,7 +161,7 @@ RowPainter._applyColorTagClass = function(cell, className) {
161
161
  if (!cell) {
162
162
  return;
163
163
  }
164
- var el = cell.getElement();
164
+ let el = cell.getElement();
165
165
  if (el) {
166
166
  if (el._tagColoringClass !== className) {
167
167
  if (el._tagColoringClass) {
@@ -242,7 +242,7 @@ RowPainter.prototype.removeHeaderStyle = function(section, columnIndex, rowIndex
242
242
  section.enableRowClass(rowIndex, "group-member", false); // TODO: Slow
243
243
  section.enableRowClass(rowIndex, "header", false); // TODO: Slow
244
244
 
245
- var cell = section.unstretchCell(columnIndex, rowIndex);
245
+ let cell = section.unstretchCell(columnIndex, rowIndex);
246
246
  RowPainter._removeHeaderStyle(cell);
247
247
  cell = section.getCell(columnIndex, rowIndex, false);
248
248
  RowPainter._removeHeaderStyle(cell);
@@ -257,7 +257,7 @@ RowPainter.prototype.removeAllStyles = function(section, columnIndex, rowIndex)
257
257
  section.enableRowClass(rowIndex, "group-member", false); // TODO: Slow
258
258
  section.enableRowClass(rowIndex, "header", false); // TODO: Slow
259
259
 
260
- var cell = section.unstretchCell(columnIndex, rowIndex);
260
+ let cell = section.unstretchCell(columnIndex, rowIndex);
261
261
  if(!RowPainter._removeHeaderStyle(cell)) {
262
262
  RowPainter._removeContentStyle(cell);
263
263
  }
@@ -303,15 +303,15 @@ RowPainter._removeContentStyle = function(cell) {
303
303
  * @param {RowPainter~RenderingOptions} e
304
304
  */
305
305
  RowPainter.prototype.applyHeaderStyle = function(e) {
306
- var mainCol = e.colIndex;
307
- var r = e.rowIndex;
308
- var section = e.section;
309
- var colCount = section.getColumnCount();
310
- var footerRow = e.footerRow;
311
- var checkboxColumnIndex = e.checkboxColumnIndex;
312
- var cell = e.cell;
306
+ let mainCol = e.colIndex;
307
+ let r = e.rowIndex;
308
+ let section = e.section;
309
+ let colCount = section.getColumnCount();
310
+ let footerRow = e.footerRow;
311
+ let checkboxColumnIndex = e.checkboxColumnIndex;
312
+ let cell = e.cell;
313
313
 
314
- var stretching;
314
+ let stretching;
315
315
  if(e.spanning != null) {
316
316
  stretching = e.spanning;
317
317
  } else {
@@ -320,7 +320,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
320
320
 
321
321
  section.enableRowClass(e.rowIndex, "group-member", false);
322
322
  if (stretching) {
323
- var stretchedCell = section.getStretchedCell(mainCol, r);
323
+ let stretchedCell = section.getStretchedCell(mainCol, r);
324
324
  if(!stretchedCell) {
325
325
  cell = e.cell = section.stretchCell(mainCol, r, stretching, true); // No left stretching. Header background is covered by folder class
326
326
  } else {
@@ -338,7 +338,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
338
338
  cell._groupHeaderStyle = true;
339
339
 
340
340
  // Footer rows and some specific group levels contains no expander (arrow)
341
- var newIcon = ExpanderIcon.renderOn(cell, e.hiddenArrow);
341
+ let newIcon = ExpanderIcon.renderOn(cell, e.hiddenArrow);
342
342
  if (newIcon) {
343
343
  newIcon.getElement().addEventListener("click", this._onCellClicked);
344
344
  }
@@ -359,7 +359,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
359
359
  if (stretching) {
360
360
  if (this._headerMenuClicked) {
361
361
  if (!cell._menuIcon) {
362
- var icon = cell._menuIcon = Icon.create("more", "menu-icon");
362
+ let icon = cell._menuIcon = Icon.create("more", "menu-icon");
363
363
  icon.addEventListener("click", this._menuIconClicked);
364
364
  }
365
365
  cell.insertFloatingIcon(cell._menuIcon);
@@ -370,7 +370,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
370
370
  cell.listen("click", this._onCellClicked); // WARNING: content row share this same listener with this header cell
371
371
  }
372
372
  if (this._segmentMode) {
373
- var content = e.content;
373
+ let content = e.content;
374
374
  if(content != null) {
375
375
  cell.setContent(content);
376
376
  }
@@ -394,9 +394,9 @@ RowPainter.prototype._clearCellContent = function(section, fromColumnIndex, toCo
394
394
  if(this._segmentMode) {
395
395
  return; // A group separator row has its own data row and does not need to be cleared
396
396
  }
397
- for (var c = fromColumnIndex; c < toColumnIndex; ++c) {
397
+ for (let c = fromColumnIndex; c < toColumnIndex; ++c) {
398
398
  if (c !== checkboxColumnIndex) {
399
- var cell = section.getCell(c, rowIndex, false);
399
+ let cell = section.getCell(c, rowIndex, false);
400
400
  if(cell) {
401
401
  cell.setContent("");
402
402
  }
@@ -409,12 +409,12 @@ RowPainter.prototype._clearCellContent = function(section, fromColumnIndex, toCo
409
409
  * @param {boolean} collapsed
410
410
  */
411
411
  RowPainter.prototype.applyContentAsHeaderStyle = function (e) {
412
- var cell = e.cell;
412
+ let cell = e.cell;
413
413
  cell._groupHeaderStyle = true;
414
414
  cell.addClass("folder"); // Required by the fallback arrow from the CSS rules. TODO: Change this
415
415
  cell.enableClass("content-header", true);
416
416
  cell.enableClass("closed", e.collapsed);
417
- var newIcon = ExpanderIcon.renderOn(cell, e.footerRow ? true : false);
417
+ let newIcon = ExpanderIcon.renderOn(cell, e.footerRow ? true : false);
418
418
  if (newIcon) {
419
419
  newIcon.getElement().addEventListener("click", this._onCellClicked);
420
420
  }
@@ -423,14 +423,14 @@ RowPainter.prototype.applyContentAsHeaderStyle = function (e) {
423
423
  * @param {Object} e
424
424
  */
425
425
  RowPainter.prototype.applyRowStyle = function(e) {
426
- var cell = e.cell;
427
- var indentSize = e.indentSize;
426
+ let cell = e.cell;
427
+ let indentSize = e.indentSize;
428
428
  cell.setStyle("paddingLeft", (indentSize > 0) ? indentSize + "px" : "");
429
429
  cell.enableClass("color-tag", !e.nonGroupRow);
430
430
 
431
431
  RowPainter._applyColorTagClass(cell, e.colorTagClass);
432
432
 
433
- var section = e.section;
433
+ let section = e.section;
434
434
  if(section) {
435
435
  section.enableRowClass(e.rowIndex, "group-member", !e.nonGroupRow);
436
436
  }