@refinitiv-ui/efx-grid 6.0.91 → 6.0.93

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,13 +1,13 @@
1
1
 
2
2
  /** @namespace
3
3
  */
4
- var ElementObserver = {};
4
+ let ElementObserver = {};
5
5
 
6
6
  /** @private
7
7
  * @param {Element} elem
8
8
  * @param {MutationRecord} mutation
9
9
  */
10
- var _onLanguageMutated = function (elem, mutation) {
10
+ let _onLanguageMutated = function (elem, mutation) {
11
11
  if (mutation.type == "attributes" && mutation.attributeName == "lang") {
12
12
  elem.lang = mutation.target.lang || "en";
13
13
  }
@@ -18,7 +18,7 @@ var _onLanguageMutated = function (elem, mutation) {
18
18
  * @param {string=} attributeName
19
19
  * @param {MutationRecord} mutation
20
20
  */
21
- var _onAttributeMutated = function (listener, attributeName, mutation) {
21
+ let _onAttributeMutated = function (listener, attributeName, mutation) {
22
22
  if (mutation.type === "attributes") {
23
23
  if (attributeName != null) {
24
24
  if (mutation.attributeName === attributeName) {
@@ -34,7 +34,7 @@ var _onAttributeMutated = function (listener, attributeName, mutation) {
34
34
  * @return {string}
35
35
  */
36
36
  ElementObserver._getNewId = function () {
37
- var id = "observer_" + (++ElementObserver._id);
37
+ let id = "observer_" + (++ElementObserver._id);
38
38
  return id;
39
39
  };
40
40
 
@@ -45,7 +45,7 @@ ElementObserver._getNewId = function () {
45
45
  * @param {Object=} opt_option
46
46
  */
47
47
  ElementObserver._addObserver = function(elem, listener, opt_option) {
48
- var option = opt_option;
48
+ let option = opt_option;
49
49
  if (!option) {
50
50
  option = {};
51
51
  }
@@ -59,10 +59,10 @@ ElementObserver._addObserver = function(elem, listener, opt_option) {
59
59
  * @param {Array.<MutationRecord>} mutations
60
60
  */
61
61
  ElementObserver._onMutationCallback = function(mutations) {
62
- for (var i = 0; i < mutations.length; i++) {
63
- var mutation = mutations[i];
64
- var listeners = ElementObserver._listeners[mutation.target._observeId];
65
- for (var j = 0; j < listeners.length; j++) {
62
+ for (let i = 0; i < mutations.length; i++) {
63
+ let mutation = mutations[i];
64
+ let listeners = ElementObserver._listeners[mutation.target._observeId];
65
+ for (let j = 0; j < listeners.length; j++) {
66
66
  listeners[j](mutation);
67
67
  }
68
68
  }
@@ -73,19 +73,19 @@ ElementObserver._onMutationCallback = function(mutations) {
73
73
  * @param {Function} fn
74
74
  */
75
75
  ElementObserver._addListener = function(elem, fn) {
76
- var listeners = ElementObserver._listeners;
76
+ let listeners = ElementObserver._listeners;
77
77
  if (!listeners) {
78
78
  listeners = ElementObserver._listeners = {};
79
79
  }
80
80
  if (!elem._observeId) {
81
- var id = ElementObserver._getNewId();
81
+ let id = ElementObserver._getNewId();
82
82
  elem._observeId = id;
83
83
  }
84
84
  if (!listeners[elem._observeId]) { // Always check to support the using of separated ElfUtil module in testing page
85
85
  listeners[elem._observeId] = [];
86
86
  }
87
87
 
88
- var listener = listeners[elem._observeId];
88
+ let listener = listeners[elem._observeId];
89
89
  if (listener.indexOf(fn) < 0) {
90
90
  listener.push(fn);
91
91
  }
@@ -4,7 +4,7 @@ import {EventDispatcher} from './EventDispatcher.js';
4
4
  /** @constructor
5
5
  * @extends {EventDispatcher}
6
6
  */
7
- var ElementWrapper = function() {};
7
+ let ElementWrapper = function() {};
8
8
  Ext.inherits(ElementWrapper, EventDispatcher);
9
9
  /** @type {Element}
10
10
  * @protected
@@ -49,7 +49,7 @@ ElementWrapper.prototype.getBoundingClientRect = function() {
49
49
  */
50
50
  ElementWrapper.prototype.getMousePosition = function(e, retObj) {
51
51
  if(!retObj) { retObj = {}; }
52
- var bounds = this.getBoundingClientRect();
52
+ let bounds = this.getBoundingClientRect();
53
53
  retObj["x"] = e.clientX - bounds["left"];
54
54
  retObj["y"] = e.clientY - bounds["top"];
55
55
 
@@ -1,5 +1,5 @@
1
1
  /** @namespace */
2
- var ElfDate = {};
2
+ let ElfDate = {};
3
3
 
4
4
  /** Check ELF version
5
5
  * @public
@@ -18,7 +18,7 @@ var ElfDate = {};
18
18
  */
19
19
  ElfDate.from = function (val) {
20
20
  if(val) {
21
- var d = val;
21
+ let d = val;
22
22
  if(typeof val === "string" || typeof val === "number") {
23
23
  d = new Date(val);
24
24
  } else if(Array.isArray(val)) {
@@ -38,7 +38,7 @@ ElfDate.from = function (val) {
38
38
  */
39
39
  ElfDate.isValid = function (d) {
40
40
  if(d && d.getTime) { // Date object must have getTime method
41
- var ms = d.getTime(); // millisecond since 1 first january 1970
41
+ let ms = d.getTime(); // millisecond since 1 first january 1970
42
42
  return ms === ms; // Invalid Date will have NaN as its value
43
43
  }
44
44
  return false;
@@ -77,7 +77,7 @@ ElfDate.toYMD = function (d) {
77
77
  return d; // pass through only if we have yyyy-MM-dd
78
78
  }
79
79
  }
80
- var dateObj = ElfDate.from(d);
80
+ let dateObj = ElfDate.from(d);
81
81
  if(dateObj) {
82
82
  return dateObj.getFullYear() + "-" +
83
83
  ElfDate.prefixSingleDigit(dateObj.getMonth() + 1) + "-" +
@@ -7,7 +7,7 @@ import { ElementObserver } from "./ElementObserver.js";
7
7
  * @private
8
8
  * @const
9
9
  */
10
- var LANGUAGE_SUPPORTS = {
10
+ let LANGUAGE_SUPPORTS = {
11
11
  "en": true,
12
12
  "de": true,
13
13
  "ja": true,
@@ -16,7 +16,7 @@ var LANGUAGE_SUPPORTS = {
16
16
  };
17
17
 
18
18
  /** @namespace */
19
- var ElfUtil = {};
19
+ let ElfUtil = {};
20
20
  /** @type {Deferred}
21
21
  * @private
22
22
  */
@@ -123,14 +123,14 @@ ElfUtil._icons["solar-theme"] = ElfUtil._icons["elf-theme-solar"];
123
123
  */
124
124
  ElfUtil.getElfVersion = function () {
125
125
  if (!ElfUtil._elfVersion) {
126
- var val = 0;
126
+ let val = 0;
127
127
  if (window.EFX_GRID) {
128
- var version = window.EFX_GRID.version;
128
+ let version = window.EFX_GRID.version;
129
129
  version = version.split(".");
130
130
  val = +version[0];
131
131
  } else if (window.elf) {
132
132
  if (window.elf.version) {
133
- var ver = window.elf.version.match(/\d/); // example version code: 4.0.1
133
+ let ver = window.elf.version.match(/\d/); // example version code: 4.0.1
134
134
  if (ver && ver[0]) {
135
135
  val = parseInt(ver[0], 10);
136
136
  }
@@ -160,12 +160,12 @@ ElfUtil.getElfVersion = function () {
160
160
  * ElfUtil.hasComponent("unknown-button"); // 0
161
161
  */
162
162
  ElfUtil.hasComponent = function (compName) {
163
- var val = ElfUtil._components[compName];
163
+ let val = ElfUtil._components[compName];
164
164
  if (val == null) {
165
165
  val = 0;
166
- var ver = ElfUtil.getElfVersion();
166
+ let ver = ElfUtil.getElfVersion();
167
167
  if (compName) {
168
- var elem;
168
+ let elem;
169
169
  if (ver === 1) {
170
170
  elem = document.createElement(compName);
171
171
  if (elem.is === compName) {
@@ -198,7 +198,7 @@ ElfUtil.toLangString = function (lang) {
198
198
  if(lang === "zh-hant") {
199
199
  return "zh-Hant";
200
200
  }
201
- var mainLang = lang.replace(/-.*/, "");
201
+ let mainLang = lang.replace(/-.*/, "");
202
202
  if(LANGUAGE_SUPPORTS[mainLang]){
203
203
  return mainLang;
204
204
  }
@@ -284,13 +284,13 @@ ElfUtil.isHaloTheme = function (themeName) {
284
284
  ElfUtil.injectIcons = function (configObj, optElem) {
285
285
  if (typeof configObj !== "object") { return; }
286
286
 
287
- var theme = ElfUtil.getThemeName();
287
+ let theme = ElfUtil.getThemeName();
288
288
  configObj.themeName = theme;
289
289
 
290
- var ver = ElfUtil.getElfVersion();
290
+ let ver = ElfUtil.getElfVersion();
291
291
  configObj.elfVersion = ver;
292
292
 
293
- var icons = ElfUtil._icons[theme];
293
+ let icons = ElfUtil._icons[theme];
294
294
  if (icons) {
295
295
  configObj.icons = icons;
296
296
  }
@@ -302,7 +302,7 @@ ElfUtil.injectIcons = function (configObj, optElem) {
302
302
  * @returns {!Array.<string>} Always return a list of icons for the existing theme
303
303
  */
304
304
  ElfUtil.getIconList = function () {
305
- var iconStruct = ElfUtil._icons[ElfUtil.getThemeName()];
305
+ let iconStruct = ElfUtil._icons[ElfUtil.getThemeName()];
306
306
  return iconStruct ? nestedObjectToArray(iconStruct) : [];
307
307
  };
308
308
 
@@ -311,7 +311,7 @@ ElfUtil.getIconList = function () {
311
311
  */
312
312
  ElfUtil._onIconPreloaded = function() {
313
313
  if(ElfUtil._dummyIcon) {
314
- var pn = ElfUtil._dummyIcon.parentNode;
314
+ let pn = ElfUtil._dummyIcon.parentNode;
315
315
  if(pn) {
316
316
  pn.removeChild(ElfUtil._dummyIcon);
317
317
  }
@@ -326,10 +326,10 @@ ElfUtil._onIconPreloaded = function() {
326
326
  ElfUtil.prepareIconPreloading = function() {
327
327
  if(!ElfUtil._iconLoaded) {
328
328
  ElfUtil._iconLoaded = true;
329
- var iconList = ElfUtil.getIconList();
329
+ let iconList = ElfUtil.getIconList();
330
330
  if(iconList.length) {
331
331
  setTimeout(ElfUtil._onIconPreloaded, 10);
332
- var dummyIcon = ElfUtil._dummyIcon = document.createElement("ef-icon");
332
+ let dummyIcon = ElfUtil._dummyIcon = document.createElement("ef-icon");
333
333
  dummyIcon.style.transform = "scale(0)";
334
334
  document.body.appendChild(dummyIcon);
335
335
  return iconList;
@@ -347,8 +347,8 @@ ElfUtil.prepareIconPreloading = function() {
347
347
  * ElfUtil.getCssVariable("--valid-name", spanElement);
348
348
  */
349
349
  ElfUtil.getCssVariable = function (varName, optElem) {
350
- var result = "";
351
- var elem = optElem || document.body;
350
+ let result = "";
351
+ let elem = optElem || document.body;
352
352
  if (window && typeof varName === "string" && elem.nodeType === 1) {
353
353
  if (varName.match(/^--/)) {
354
354
  result = window.getComputedStyle(elem).getPropertyValue(varName);
@@ -368,11 +368,11 @@ ElfUtil.getCssVariable = function (varName, optElem) {
368
368
  * }, spanElement); // Css varriable names will be replaced with their value
369
369
  */
370
370
  ElfUtil.getCssVariables = function (obj, optElem) {
371
- var elem = optElem || document.body;
371
+ let elem = optElem || document.body;
372
372
  if (window && elem.nodeType === 1) {
373
- var computedStyle = window.getComputedStyle(elem);
374
- for(var key in obj) {
375
- var varName = obj[key];
373
+ let computedStyle = window.getComputedStyle(elem);
374
+ for(let key in obj) {
375
+ let varName = obj[key];
376
376
  if (varName && varName.match(/^--/)) {
377
377
  obj[key] = computedStyle.getPropertyValue(varName).replace(/\"/g, ""); // eslint-disable-line
378
378
  }
@@ -402,7 +402,7 @@ ElfUtil.getMovementColorProfile = function() {
402
402
  * @param {Function} cb
403
403
  */
404
404
  ElfUtil._addThemeChangedCallback = function(cb) {
405
- var callbacks = ElfUtil._callbacks;
405
+ let callbacks = ElfUtil._callbacks;
406
406
  if(callbacks.indexOf(cb) < 0) {
407
407
  callbacks.push(cb);
408
408
  }
@@ -438,10 +438,10 @@ ElfUtil.getThemeColors = function(themeChangedCb) {
438
438
  return ElfUtil.themeReady;
439
439
  }
440
440
 
441
- var d = ElfUtil._deferred = new Deferred();
441
+ let d = ElfUtil._deferred = new Deferred();
442
442
  ElfUtil.themeReady = d.promise;
443
443
 
444
- var profileName = ElfUtil.getMovementColorProfile();
444
+ let profileName = ElfUtil.getMovementColorProfile();
445
445
  if(profileName) {
446
446
  if(profileName !== ElfUtil._profileName) {
447
447
  setTimeout(ElfUtil._profileNameRetrieved, 100); // TODO: Find a proper way to ensure that theme is ready
@@ -449,12 +449,12 @@ ElfUtil.getThemeColors = function(themeChangedCb) {
449
449
  ElfUtil._deferred.resolve(ElfUtil.themeColors);
450
450
  }
451
451
  } else {
452
- var options = {
452
+ let options = {
453
453
  providerName: "Configuration",
454
454
  settingName: "RDE_USER_CURRENT_TICK_COLOR"
455
455
  };
456
456
 
457
- var jet = window ? window.JET : null;
457
+ let jet = window ? window.JET : null;
458
458
  ElfUtil._themeLoaded = false;
459
459
  if(ElfUtil._rtk && ElfUtil._rtk.Settings) {
460
460
  ElfUtil._rtk.Settings.getAsync(options)
@@ -477,7 +477,7 @@ ElfUtil.getThemeColors = function(themeChangedCb) {
477
477
  /** @private
478
478
  * @param {string} profileName
479
479
  */
480
- var movementColorProfileChanged = function(profileName) {
480
+ let movementColorProfileChanged = function(profileName) {
481
481
  if(profileName !== ElfUtil._profileName) {
482
482
  ElfUtil._retrieveThemeColors(profileName);
483
483
 
@@ -486,8 +486,8 @@ var movementColorProfileChanged = function(profileName) {
486
486
  ElfUtil._deferred.resolve(ElfUtil.themeColors);
487
487
  }
488
488
 
489
- var callbacks = ElfUtil._callbacks;
490
- for (var i = 0; i < callbacks.length; i++) {
489
+ let callbacks = ElfUtil._callbacks;
490
+ for (let i = 0; i < callbacks.length; i++) {
491
491
  callbacks[i]();
492
492
  }
493
493
  }
@@ -523,7 +523,7 @@ ElfUtil._loadingProfileFailure = function() {
523
523
  /** @private
524
524
  */
525
525
  ElfUtil._profileNameRetrieved = function() {
526
- var profileName = ElfUtil.getMovementColorProfile();
526
+ let profileName = ElfUtil.getMovementColorProfile();
527
527
  ElfUtil._retrieveThemeColors(profileName);
528
528
  if(!ElfUtil._observed) {
529
529
  ElfUtil._observed = true;
@@ -540,7 +540,7 @@ ElfUtil._retrieveThemeColors = function(profileName) {
540
540
  ElfUtil._themeLoaded = true;
541
541
  ElfUtil._profileName = profileName;
542
542
 
543
- var colors = ElfUtil.themeColors = ElfUtil.getCssVariables({
543
+ let colors = ElfUtil.themeColors = ElfUtil.getCssVariables({
544
544
  "primary": "--color-scheme-primary", // Usually used in headers, and selection
545
545
  "secondary": "--color-scheme-secondary",
546
546
  "tertiary": "--color-scheme-tertiary", // Usually black or white
@@ -565,20 +565,20 @@ ElfUtil._retrieveThemeColors = function(profileName) {
565
565
  colors["neutral"] = colors["level"];
566
566
 
567
567
  // Retrieve table styles to be used in grid and extensions
568
- var tableElem = document.createElement("table");
568
+ let tableElem = document.createElement("table");
569
569
  tableElem.style.visibility = "hidden";
570
570
  tableElem.style.position = "fixed";
571
571
  tableElem.style.left = "0"; // Activate fixed position
572
572
  tableElem.style.top = "0";
573
573
  tableElem.style.width = "0"; // Prevent creating scrollbar
574
- var trElem = tableElem.insertRow(-1);
575
- var tdElem = trElem.insertCell(-1);
574
+ let trElem = tableElem.insertRow(-1);
575
+ let tdElem = trElem.insertCell(-1);
576
576
 
577
577
  document.body.appendChild(tableElem);
578
- var trStyles = window.getComputedStyle(trElem);
578
+ let trStyles = window.getComputedStyle(trElem);
579
579
  colors["tableBg"] = trStyles.backgroundColor; // Usually equivalent to --color-scheme-tertiary
580
580
 
581
- var tdStyles = window.getComputedStyle(tdElem);
581
+ let tdStyles = window.getComputedStyle(tdElem);
582
582
  colors["tableText"] = tdStyles.color; // Usually equivalent to --color-scheme-neutral
583
583
  colors["tableBorder"] = tdStyles.borderColor;
584
584
  if(colors["tableText"] === colors["tableBorder"]) {
@@ -1,7 +1,7 @@
1
1
  /** Abstract base class that provides event management methods for derived class
2
2
  * @constructor
3
3
  */
4
- var EventDispatcher = function () {};
4
+ let EventDispatcher = function () {};
5
5
 
6
6
  /** @type {Object.<string, Function>}
7
7
  * @protected
@@ -26,7 +26,7 @@ EventDispatcher.prototype.addEventListener = function(type, handler) {
26
26
  this._events = {};
27
27
  }
28
28
 
29
- var listeners = this._events[type];
29
+ let listeners = this._events[type];
30
30
  if(listeners) {
31
31
  if(listeners.indexOf(handler) < 0) {
32
32
  listeners.push(handler);
@@ -43,9 +43,9 @@ EventDispatcher.prototype.addEventListener = function(type, handler) {
43
43
  * @param {Function} handler Event handler
44
44
  */
45
45
  EventDispatcher.prototype.removeEventListener = function(type, handler) {
46
- var listeners = (this._events) ? this._events[type] : null;
46
+ let listeners = (this._events) ? this._events[type] : null;
47
47
  if(listeners) {
48
- var at = listeners.indexOf(handler);
48
+ let at = listeners.indexOf(handler);
49
49
  if(at >= 0) {
50
50
  listeners.splice(at, 1);
51
51
  --this._listenerCount;
@@ -68,7 +68,7 @@ EventDispatcher.prototype.removeAllEventListeners = function() {
68
68
  EventDispatcher.prototype.hasListener = function(type) {
69
69
  if(this._listenerCount) {
70
70
  if(type) {
71
- var listeners = this._events ? this._events[type] : null;
71
+ let listeners = this._events ? this._events[type] : null;
72
72
  return listeners ? (listeners.length > 0) : false;
73
73
  } else {
74
74
  return true;
@@ -85,7 +85,7 @@ EventDispatcher.prototype.hasListener = function(type) {
85
85
  */
86
86
  EventDispatcher.prototype.getListener = function(type, idx) {
87
87
  if(type) {
88
- var listeners = this._events ? this._events[type] : null;
88
+ let listeners = this._events ? this._events[type] : null;
89
89
  if(listeners) {
90
90
  if(!idx) {
91
91
  idx = 0;
@@ -101,12 +101,12 @@ EventDispatcher.prototype.getListener = function(type, idx) {
101
101
  * @param {Object} obj Object that contains a handler with the same name as the given `type`
102
102
  * @param {string} type Event name
103
103
  * @example
104
- * var obj = {"mouseUp": function(e) { console.log(e); }};
104
+ * let obj = {"mouseUp": function(e) { console.log(e); }};
105
105
  * plugin.addListener(obj, "mouseUp");
106
106
  * plugin.addListener(obj, "mouseDown");
107
107
  */
108
108
  EventDispatcher.prototype.addListener = function(obj, type) {
109
- var func = obj ? obj[type] : null;
109
+ let func = obj ? obj[type] : null;
110
110
  if(typeof func === "function") {
111
111
  this.addEventListener(type, func);
112
112
  }
@@ -130,11 +130,11 @@ EventDispatcher.prototype._prepareEventArguments = function(type, eventArg) {
130
130
  * @param {Object} eventArg Event arguments
131
131
  */
132
132
  EventDispatcher.prototype._dispatch = function(type, eventArg) {
133
- var listeners = this._events ? this._events[type] : null;
133
+ let listeners = this._events ? this._events[type] : null;
134
134
  if(listeners) {
135
135
  eventArg = this._prepareEventArguments(type, eventArg);
136
- var len = listeners.length;
137
- for(var i = 0; i < len; ++i) {
136
+ let len = listeners.length;
137
+ for(let i = 0; i < len; ++i) {
138
138
  listeners[i](eventArg);
139
139
  }
140
140
  }
@@ -144,7 +144,7 @@ EventDispatcher.prototype._dispatch = function(type, eventArg) {
144
144
  * @function
145
145
  * @param {Event} e
146
146
  */
147
- var preventDefault = function(e) {
147
+ let preventDefault = function(e) {
148
148
  if(e && e.preventDefault) {
149
149
  e.preventDefault();
150
150
  e.stopPropagation();
@@ -6,14 +6,14 @@ import { ElfUtil } from "./ElfUtil.js";
6
6
  * @constructor
7
7
  * @extends {ElementWrapper}
8
8
  */
9
- var ExpanderIcon = function () {
10
- var elem;
9
+ let ExpanderIcon = function () {
10
+ let elem;
11
11
  if (ExpanderIcon._iconName) {
12
12
  elem = document.createElement("ef-icon");
13
13
  elem.setAttribute("icon", ExpanderIcon._iconName);
14
14
  } else {
15
15
  elem = document.createElement("span");
16
- var fallback = document.createElement("span");
16
+ let fallback = document.createElement("span");
17
17
  fallback.className = "fallback-arrow";
18
18
  fallback.textContent = "\u25bc";
19
19
  elem.appendChild(fallback);
@@ -49,7 +49,7 @@ ExpanderIcon._onThemeLoaded = function() {
49
49
  */
50
50
  ExpanderIcon.loadExpanderStyles = function() {
51
51
  if(!ExpanderIcon._iconName) {
52
- var themeName = ElfUtil.getThemeName();
52
+ let themeName = ElfUtil.getThemeName();
53
53
 
54
54
  if(themeName) {
55
55
  ExpanderIcon._onThemeLoaded(); // synchronous
@@ -65,11 +65,11 @@ ExpanderIcon.loadExpanderStyles = function() {
65
65
  * @return {ExpanderIcon} Return ExpanderIcon object only if Expander is newly created
66
66
  */
67
67
  ExpanderIcon.renderOn = function (cell, removal) {
68
- var newExpander = null;
68
+ let newExpander = null;
69
69
  if (removal) {
70
70
  cell.removeIcon();
71
71
  } else {
72
- var expander = cell._expanderIcon;
72
+ let expander = cell._expanderIcon;
73
73
  if (!expander) {
74
74
  expander = cell._expanderIcon = newExpander = new ExpanderIcon();
75
75
  }