@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
@@ -1,5 +1,5 @@
1
1
  /** @namespace */
2
- var Util = {};
2
+ let Util = {};
3
3
 
4
4
  /** This is a shorthand for fetch() API by POST method and with json body <br>
5
5
  * WARNING: fetch is not supported in IE (including IE11)
@@ -82,7 +82,7 @@ Util._logError = function(resp) {
82
82
  * @return {!Promise<Response>}
83
83
  */
84
84
  Util._post = function(url, obj, contentType) {
85
- var options = {
85
+ let options = {
86
86
  method: obj ? "POST" : "GET",
87
87
  headers: { "Content-Type": contentType || "application/json" }
88
88
  };
@@ -103,7 +103,7 @@ Util._post = function(url, obj, contentType) {
103
103
  * @param {Array.<string>=} limiters Specify property to be extended
104
104
  * @return {Object}
105
105
  */
106
- var extendObject = function (obj, extender, limiters) {
106
+ let extendObject = function (obj, extender, limiters) {
107
107
  if(!obj) { // null undefined NaN empty string and 0
108
108
  return null;
109
109
  }
@@ -111,10 +111,10 @@ var extendObject = function (obj, extender, limiters) {
111
111
  return obj;
112
112
  }
113
113
 
114
- var key;
114
+ let key;
115
115
  if(limiters) {
116
- var len = limiters.length;
117
- for(var i = 0; i < len; ++i) {
116
+ let len = limiters.length;
117
+ for(let i = 0; i < len; ++i) {
118
118
  key = limiters[i];
119
119
  if(key) {
120
120
  extendProperty(obj, extender, key);
@@ -135,7 +135,7 @@ var extendObject = function (obj, extender, limiters) {
135
135
  * @param {Array.<string>=} limiters
136
136
  * @return {Object}
137
137
  */
138
- var cloneObject = function (obj, limiters) {
138
+ let cloneObject = function (obj, limiters) {
139
139
  return extendObject({}, obj, limiters);
140
140
  };
141
141
 
@@ -145,8 +145,8 @@ var cloneObject = function (obj, limiters) {
145
145
  * @param {Object} obj
146
146
  * @return {boolean}=true, if the obj is empty
147
147
  */
148
- var isEmptyObject = function (obj) {
149
- for (var key in obj) {
148
+ let isEmptyObject = function (obj) {
149
+ for (let key in obj) {
150
150
  return false;
151
151
  }
152
152
  return true;
@@ -157,17 +157,17 @@ var isEmptyObject = function (obj) {
157
157
  * @param {Array.<string>=} fields In case of the given data is an array, this param will be used for mapping index to field
158
158
  * @return {Object|null}
159
159
  */
160
- var arrayToObject = function(data, fields) {
160
+ let arrayToObject = function(data, fields) {
161
161
  if(!Array.isArray(data)) {
162
162
  return data;
163
163
  } else if(!fields) {
164
164
  return null;
165
165
  }
166
- var ary = data;
166
+ let ary = data;
167
167
  data = {};
168
- var len = ary.length;
169
- for(var i = 0; i < len; ++i) {
170
- var field = fields[i];
168
+ let len = ary.length;
169
+ for(let i = 0; i < len; ++i) {
170
+ let field = fields[i];
171
171
  // eslint-disable-next-line no-undefined
172
172
  if(field && ary[i] !== undefined) {
173
173
  data[field] = ary[i];
@@ -187,10 +187,10 @@ var arrayToObject = function(data, fields) {
187
187
  * extendProperty({a: [0]}, {a: 1}, "a"); // {a: [0, 1]}
188
188
  * extendProperty({a: [0]}, {a: [1, 2]}, "a"); // {a: [0, 1, 2]}
189
189
  */
190
- var extendProperty = function (obj, extender, propName) {
191
- var val = extender[propName];
190
+ let extendProperty = function (obj, extender, propName) {
191
+ let val = extender[propName];
192
192
  if(val != null) {
193
- var objVal = obj[propName];
193
+ let objVal = obj[propName];
194
194
  if(Array.isArray(objVal)) {
195
195
  obj[propName] = objVal.concat(val);
196
196
  } else if(Array.isArray(val) && objVal) {
@@ -208,7 +208,7 @@ var extendProperty = function (obj, extender, propName) {
208
208
  * @param {*} obj2
209
209
  * @return {boolean}
210
210
  */
211
- var deepEqual = function (obj1, obj2) {
211
+ let deepEqual = function (obj1, obj2) {
212
212
 
213
213
  if(obj1 === obj2) {
214
214
  return true;
@@ -226,7 +226,7 @@ var deepEqual = function (obj1, obj2) {
226
226
  return false;
227
227
  }
228
228
 
229
- for (var i = 0; i < obj1.length; i++) {
229
+ for (let i = 0; i < obj1.length; i++) {
230
230
  if (!deepEqual(obj1[i], obj2[i])) { // The array may not be a match if the elements are not sorted, so it will not be considered equal if there is a mismatch.
231
231
  return false;
232
232
  }
@@ -238,7 +238,7 @@ var deepEqual = function (obj1, obj2) {
238
238
  return false;
239
239
  }
240
240
 
241
- for (var key in obj1) {
241
+ for (let key in obj1) {
242
242
  if (!deepEqual(obj1[key], obj2[key])) {
243
243
  return false;
244
244
  }
@@ -262,7 +262,7 @@ var deepEqual = function (obj1, obj2) {
262
262
  * @return {Array} Returns the result of the extended array
263
263
  * @see {@link https://dev.to/uilicious/javascript-array-push-is-945x-faster-than-array-concat-1oki}
264
264
  * @example
265
- * var obj = {};
265
+ * let obj = {};
266
266
  * extendArrayProperty(obj, "prop1", 1); // [1]
267
267
  * extendArrayProperty(obj, "prop1", 2); // [1, 2]
268
268
  * extendArrayProperty(obj, "prop1", [3, 4]); // [1, 2, 3, 4]
@@ -271,10 +271,10 @@ var deepEqual = function (obj1, obj2) {
271
271
  * extendArrayProperty(obj, "prop2", [7]); // [5, 6, 7]
272
272
  * extendArrayProperty(obj, "prop2", null); // null
273
273
  */
274
- var extendArrayProperty = function (obj, propName, ary) {
275
- var objAry = null;
274
+ let extendArrayProperty = function (obj, propName, ary) {
275
+ let objAry = null;
276
276
  if(ary) {
277
- var objVal = obj[propName];
277
+ let objVal = obj[propName];
278
278
  if(objVal) {
279
279
  if(Array.isArray(objVal)) {
280
280
  objAry = objVal;
@@ -305,14 +305,14 @@ var extendArrayProperty = function (obj, propName, ary) {
305
305
  * @param {string|Array.<string>} item
306
306
  * @return {string}
307
307
  */
308
- var _encloseBracket = function(item) {
308
+ let _encloseBracket = function(item) {
309
309
  return Array.isArray(item) ? "{\n" + item.join("\n") + "\n}" : item;
310
310
  };
311
311
  /** @private
312
312
  * @param {string} str
313
313
  * @return {string}
314
314
  */
315
- var _indentBracketContent = function(str){
315
+ let _indentBracketContent = function(str){
316
316
  return str.replace(/\n+/g, "\n\t").replace(/\n\t}$/, "\n}");
317
317
  };
318
318
  /** @public
@@ -328,11 +328,11 @@ var _indentBracketContent = function(str){
328
328
  * ]
329
329
  * ]);
330
330
  */
331
- var prettifyCss = function(css) {
331
+ let prettifyCss = function(css) {
332
332
  if(css) {
333
- var cssStr = "";
333
+ let cssStr = "";
334
334
  if (Array.isArray(css)) {
335
- var ary = css.map(_encloseBracket);
335
+ let ary = css.map(_encloseBracket);
336
336
  cssStr = ary.join("\n").replace(/{\s*{/g, "{").replace(/\s+{/g, " {");
337
337
  } else {
338
338
  cssStr = (typeof css === "string") ? css : css + "";
@@ -349,9 +349,9 @@ var prettifyCss = function(css) {
349
349
  * @param {Element} elem
350
350
  * @return {DocumentFragment}
351
351
  */
352
- var getShadowRoot = function(elem) {
352
+ let getShadowRoot = function(elem) {
353
353
  if(elem) {
354
- var rootNode;
354
+ let rootNode;
355
355
  if(elem.shadowRoot) {
356
356
  rootNode = elem.shadowRoot;
357
357
  } else if(elem.getRootNode) {
@@ -373,23 +373,23 @@ var getShadowRoot = function(elem) {
373
373
  * @param {Element=} targetContext Element that needs the CSS
374
374
  * @return {Element} New style tag
375
375
  */
376
- var injectCss = function(cssStr, targetContext) {
376
+ let injectCss = function(cssStr, targetContext) {
377
377
  if(!cssStr) {
378
378
  return null;
379
379
  }
380
380
 
381
- var styleTag = document.createElement("style");
381
+ let styleTag = document.createElement("style");
382
382
  styleTag.textContent = "\n" + cssStr + "\n";
383
383
 
384
- var styleHost = getShadowRoot(targetContext);
385
- var isInShadow = true;
384
+ let styleHost = getShadowRoot(targetContext);
385
+ let isInShadow = true;
386
386
  if(!styleHost) {
387
387
  isInShadow = false;
388
388
  styleHost = document.head;
389
389
  }
390
390
 
391
391
  // Find a place to insert the style tag
392
- var beforeElem;
392
+ let beforeElem;
393
393
  if(isInShadow) {
394
394
  if(styleHost.children && styleHost.children.length) {
395
395
  beforeElem = styleHost.children[0];
@@ -407,8 +407,8 @@ var injectCss = function(cssStr, targetContext) {
407
407
  * @public
408
408
  * @return {boolean}
409
409
  */
410
- var isIE = function () {
411
- var ua = window.navigator.userAgent;
410
+ let isIE = function () {
411
+ let ua = window.navigator.userAgent;
412
412
  return (ua.indexOf('MSIE ') > 0) || (ua.indexOf('Trident/') > 0) || (ua.indexOf('Edge/') > 0);
413
413
  };
414
414
 
@@ -416,7 +416,7 @@ var isIE = function () {
416
416
  * @public
417
417
  * @return {boolean}
418
418
  */
419
- var isMac = function () {
419
+ let isMac = function () {
420
420
  return /Mac/.test(navigator.platform);
421
421
  };
422
422
 
@@ -424,7 +424,7 @@ var isMac = function () {
424
424
  * @public
425
425
  * @return {boolean}
426
426
  */
427
- var isTouchDevice = function () {
427
+ let isTouchDevice = function () {
428
428
  if ((navigator["maxTouchPoints"] && navigator["maxTouchPoints"] < 256) ||
429
429
  (navigator["msMaxTouchPoints"] && navigator["msMaxTouchPoints"] < 256)) {
430
430
  return true;
@@ -438,12 +438,12 @@ var isTouchDevice = function () {
438
438
  * @param {Array=} ary
439
439
  * @return {Array}
440
440
  */
441
- var nestedObjectToArray = function (obj, ary) {
441
+ let nestedObjectToArray = function (obj, ary) {
442
442
  if (!ary) {
443
443
  ary = [];
444
444
  }
445
- for (var key in obj) {
446
- var element = obj[key];
445
+ for (let key in obj) {
446
+ let element = obj[key];
447
447
  if ('object' === typeof element) {
448
448
  nestedObjectToArray(element, ary);
449
449
  } else {
@@ -467,21 +467,21 @@ var nestedObjectToArray = function (obj, ary) {
467
467
  * rgb2Hex("invalid"); // "invalid"
468
468
  * rgb2Hex(null); // ""
469
469
  */
470
- var rgb2Hex = function (rgbCode) {
470
+ let rgb2Hex = function (rgbCode) {
471
471
  if(!rgbCode || typeof rgbCode !== "string") {
472
472
  return "";
473
473
  }
474
474
  if(rgbCode.charAt(0) === "#") {
475
475
  return rgbCode;
476
476
  }
477
- var rgb = rgbCode.match(/\d+/g);
477
+ let rgb = rgbCode.match(/\d+/g);
478
478
  if(!rgb || rgb.length < 3) {
479
479
  return rgbCode;
480
480
  }
481
481
 
482
- var hex = "#";
483
- for(var i = 0; i < 3; i++) {
484
- var num = +rgb[i];
482
+ let hex = "#";
483
+ for(let i = 0; i < 3; i++) {
484
+ let num = +rgb[i];
485
485
  if(!(num >= 16)) { // Handle NaN case
486
486
  hex += "0";
487
487
  }
@@ -495,12 +495,12 @@ var rgb2Hex = function (rgbCode) {
495
495
  * @param {*} data
496
496
  * @return {string}
497
497
  */
498
- var prepareTSVContent = function (data) {
498
+ let prepareTSVContent = function (data) {
499
499
  if (data == null) {
500
500
  return "";
501
501
  }
502
502
 
503
- var content = (typeof data === 'string') ? data : data.toString();
503
+ let content = (typeof data === 'string') ? data : data.toString();
504
504
 
505
505
  if (!content.length) { return ""; }
506
506
 
@@ -1,7 +1,7 @@
1
1
  import {ADCSubscription} from "./ADCSubscription.js";
2
2
 
3
3
  /** @namespace */
4
- var ADCService = {};
4
+ let ADCService = {};
5
5
 
6
6
  /** @type {Object}
7
7
  * @private
@@ -24,7 +24,7 @@ ADCService._adcUrl = "/datacloud/rest/select";
24
24
  * @return {Object}
25
25
  */
26
26
  ADCService.create = function() {
27
- var adcSub = ADCService._adcSubscription;
27
+ let adcSub = ADCService._adcSubscription;
28
28
  if (!adcSub) {
29
29
  if (window["JET"]) { // ADC only need JET
30
30
  adcSub = ADCService._adcSubscription = new ADCSubscription();
@@ -5,7 +5,7 @@ import {EventDispatcher} from "../EventDispatcher.js";
5
5
  /** @constructor
6
6
  * @extends {EventDispatcher}
7
7
  */
8
- var ADCSubscription = function() {
8
+ let ADCSubscription = function() {
9
9
  this._adcFieldMap = {};
10
10
  this._queue = {};
11
11
  this._onADCUpdate = this._onADCUpdate.bind(this);
@@ -107,13 +107,13 @@ ADCSubscription.prototype.addSymbolToField = function (symbol, field) {
107
107
  return;
108
108
  }
109
109
 
110
- var fieldMap = this._adcFieldMap[field];
110
+ let fieldMap = this._adcFieldMap[field];
111
111
  if(!fieldMap) {
112
112
  fieldMap = {};
113
113
  this._adcFieldMap[field] = fieldMap;
114
114
  }
115
115
 
116
- var value = fieldMap[symbol];
116
+ let value = fieldMap[symbol];
117
117
  if(value != null) {
118
118
  return value; // eslint-disable-line
119
119
  }
@@ -206,7 +206,7 @@ ADCSubscription.prototype._addQueue = function(fields) {
206
206
  if(!this._queue) {
207
207
  this._queue = {};
208
208
  }
209
- for(var i = fields.length; --i >= 0;) {
209
+ for(let i = fields.length; --i >= 0;) {
210
210
  this._queue[fields[i]] = true;
211
211
  }
212
212
  this._timerId = window.setTimeout(this._processQueue, 0);
@@ -215,8 +215,8 @@ ADCSubscription.prototype._addQueue = function(fields) {
215
215
  * @private
216
216
  */
217
217
  ADCSubscription.prototype._processQueue = function() {
218
- var fields = Object.keys(/** @type{!Object} */(this._queue));
219
- for(var j = fields.length; --j >= 0;) {
218
+ let fields = Object.keys(/** @type{!Object} */(this._queue));
219
+ for(let j = fields.length; --j >= 0;) {
220
220
  this._requestDataCloud(fields[j]);
221
221
  }
222
222
  this._queue = {}; // Clear queue
@@ -228,8 +228,8 @@ ADCSubscription.prototype._processQueue = function() {
228
228
  * @return {Promise}
229
229
  */
230
230
  ADCSubscription.prototype._requestDataCloud = function(field) {
231
- var RICs = Object.keys(this._adcFieldMap[field]);
232
- var payload = "formula=" + field + "&identifiers=" + RICs;
231
+ let RICs = Object.keys(this._adcFieldMap[field]);
232
+ let payload = "formula=" + field + "&identifiers=" + RICs;
233
233
  if(this._productId) {
234
234
  payload += '&productid=' + this._productId;
235
235
  }
@@ -256,7 +256,7 @@ ADCSubscription.prototype._requestDataCloud = function(field) {
256
256
  * @return {boolean}
257
257
  */
258
258
  ADCSubscription.prototype._isValidValueType = function(value) {
259
- var t = typeof value;
259
+ let t = typeof value;
260
260
  return (value === null || t == "string" || t == "number" || t == "boolean");
261
261
  };
262
262
  /** Function for processing the ADC response and publish the event to the listener.
@@ -269,13 +269,13 @@ ADCSubscription.prototype._onADCUpdate = function(json) {
269
269
  return;
270
270
  }
271
271
 
272
- var rows = json["rows"];
273
- var reqField = json["requestField"];
274
- var header = rows[0];
275
- var ricIndex = -1, fieldIndex = -1;
272
+ let rows = json["rows"];
273
+ let reqField = json["requestField"];
274
+ let header = rows[0];
275
+ let ricIndex = -1, fieldIndex = -1;
276
276
 
277
- var type, field;
278
- for(var idx in header) {
277
+ let type, field;
278
+ for(let idx in header) {
279
279
  type = header[idx]["i"];
280
280
  field = header[idx]["r"];
281
281
  if(type === "instrument") {
@@ -286,10 +286,10 @@ ADCSubscription.prototype._onADCUpdate = function(json) {
286
286
  }
287
287
  }
288
288
 
289
- var outputHash = {};
290
- var rowsLen = rows.length;
291
- var symbol, value, rowData;
292
- for(var i = 1; i < rowsLen; i++) {
289
+ let outputHash = {};
290
+ let rowsLen = rows.length;
291
+ let symbol, value, rowData;
292
+ for(let i = 1; i < rowsLen; i++) {
293
293
  symbol = rows[i][ricIndex];
294
294
  value = rows[i][fieldIndex];
295
295
 
@@ -1,7 +1,7 @@
1
1
  import {AdFinSubscription} from "./AdFinSubscription.js";
2
2
 
3
3
  /** @namespace */
4
- var AdFinService = {};
4
+ let AdFinService = {};
5
5
 
6
6
  /** @type {string}
7
7
  * @private
@@ -24,7 +24,7 @@ AdFinService._tracsPlugInUrl = null;
24
24
  * @return {Object}
25
25
  */
26
26
  AdFinService.create = function() {
27
- var adfinSub = AdFinService._adFinSubscription;
27
+ let adfinSub = AdFinService._adFinSubscription;
28
28
  if (!adfinSub) {
29
29
  adfinSub = new AdFinSubscription();
30
30
  AdFinService._adFinSubscription = adfinSub;
@@ -5,7 +5,7 @@ import {EventDispatcher} from "../EventDispatcher.js";
5
5
  /** @constructor
6
6
  * @extends {EventDispatcher}
7
7
  */
8
- var AdFinSubscription = function() {
8
+ let AdFinSubscription = function() {
9
9
  this._cache = {};
10
10
  this._queue = [];
11
11
  this.onAdFinUpdate = this.onAdFinUpdate.bind(this);
@@ -108,16 +108,16 @@ AdFinSubscription.prototype.call = function (name, parameters) {
108
108
  throw "Invalid parameters";
109
109
  }
110
110
 
111
- for(var i = 0, length = parameters.length; i < length; ++i) {
111
+ for(let i = 0, length = parameters.length; i < length; ++i) {
112
112
  if(parameters[i][1] === "...") {
113
113
  return "...";
114
114
  }
115
115
  }
116
116
 
117
- /** @type AdFinSubscription.Request */var request = {"Function": name, "Parameters": parameters};
117
+ /** @type AdFinSubscription.Request */let request = {"Function": name, "Parameters": parameters};
118
118
 
119
- var signature = JSON.stringify(request);
120
- var entry = this._cache[signature];
119
+ let signature = JSON.stringify(request);
120
+ let entry = this._cache[signature];
121
121
  if(entry && (entry.pending === false)) {
122
122
  return entry.value;
123
123
  }
@@ -222,8 +222,8 @@ AdFinSubscription.prototype._addQueue = function(requests) {
222
222
  * @private
223
223
  */
224
224
  AdFinSubscription.prototype._processQueue = function() {
225
- /** @type {Array.<AdFinSubscription.Request>} */ var chunckQueue = [];
226
- for(var i = 0, length = this._queue.length; i < length; ++i) {
225
+ /** @type {Array.<AdFinSubscription.Request>} */ let chunckQueue = [];
226
+ for(let i = 0, length = this._queue.length; i < length; ++i) {
227
227
  chunckQueue.push(this._queue[i]);
228
228
  if(chunckQueue.length === AdFinSubscription._chunckSize) {
229
229
  this._requestAdFin(chunckQueue);
@@ -255,7 +255,7 @@ AdFinSubscription.prototype._requestAdFin = function(requests) {
255
255
  .then(function(json) {
256
256
  json["signatures"] = [];
257
257
  json["functions"] = [];
258
- for(var i = 0, length = requests.length; i < length; ++i) {
258
+ for(let i = 0, length = requests.length; i < length; ++i) {
259
259
  json["signatures"].push(JSON.stringify(requests[i])); // Attach the signature of the requests
260
260
  json["functions"].push(requests[i]["Function"]); // Attach the function of the requests
261
261
  }
@@ -271,18 +271,18 @@ AdFinSubscription.prototype._requestAdFin = function(requests) {
271
271
  * @param {Object} json JSON object of Adfin response
272
272
  */
273
273
  AdFinSubscription.prototype.onAdFinUpdate = function(json) {
274
- var signatures = json["signatures"];
275
- var functions = json["functions"];
276
- var toDispatch = {};
277
- for(var i = 0, length = signatures.length; i < length; ++i) {
278
- var value;
279
- var signature = signatures[i];
280
- var func = functions[i];
281
- var entry = json[i];
274
+ let signatures = json["signatures"];
275
+ let functions = json["functions"];
276
+ let toDispatch = {};
277
+ for(let i = 0, length = signatures.length; i < length; ++i) {
278
+ let value;
279
+ let signature = signatures[i];
280
+ let func = functions[i];
281
+ let entry = json[i];
282
282
  if(!entry) {
283
283
  continue;
284
284
  }
285
- for(var j = 0, length2 = entry.length; j < length2; ++j) {
285
+ for(let j = 0, length2 = entry.length; j < length2; ++j) {
286
286
  if((entry[j].length >= 1) && (typeof (entry[j][0]) === "number")) {
287
287
  value = entry[j][0];
288
288
  break;
@@ -300,8 +300,8 @@ AdFinSubscription.prototype.onAdFinUpdate = function(json) {
300
300
  toDispatch[func] = true;
301
301
  }
302
302
 
303
- for(var functionName in toDispatch) {
304
- var rowData = {};
303
+ for(let functionName in toDispatch) {
304
+ let rowData = {};
305
305
  // rowData[functionName] = value;
306
306
  this._dispatch("dataChanged", { "function": functionName, "values": rowData, "sender": this }); // Publish data
307
307
  }