@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
@@ -2,12 +2,12 @@ import { DataGenerator } from "./DataGenerator.js";
2
2
  import { invalidFieldDict } from "./MockUtil.js";
3
3
  import { DateTime } from "../DateTime.js";
4
4
 
5
- var dataGen = new DataGenerator();
5
+ let dataGen = new DataGenerator();
6
6
 
7
7
  /** @private
8
8
  * @namespace
9
9
  */
10
- var Adc = {};
10
+ let Adc = {};
11
11
 
12
12
  /** @private
13
13
  * @function
@@ -21,9 +21,9 @@ Adc.request = function (payload, mockResponse) {
21
21
  }
22
22
 
23
23
  // build row header
24
- var rows = [];
25
- var i, f, len, row, j;
26
- var identifiers, formula, fields, invalidDict;
24
+ let rows = [];
25
+ let i, f, len, row, j;
26
+ let identifiers, formula, fields, invalidDict;
27
27
  if(payload.output === "Col,date|,Row,In|,va,T,NoEmptyTickers") {
28
28
 
29
29
  identifiers = payload.identifiers;
@@ -40,7 +40,7 @@ Adc.request = function (payload, mockResponse) {
40
40
  }
41
41
  }
42
42
 
43
- var fieldCount = fields.length;
43
+ let fieldCount = fields.length;
44
44
  // formula = payload.formula.trim().split(",TR"); // TODO: split wit
45
45
 
46
46
  rows.push([
@@ -56,38 +56,38 @@ Adc.request = function (payload, mockResponse) {
56
56
  }
57
57
  ]);
58
58
 
59
- for (var index = 0; index < fieldCount; index++) {
60
- var timeSeriesField = fields[index];
59
+ for (let index = 0; index < fieldCount; index++) {
60
+ let timeSeriesField = fields[index];
61
61
 
62
- var regex = /TR.(.*)(?=\()/;
63
- var result = timeSeriesField.match(regex);
64
- var field = result[0].replace("TR.", "");
65
- var phrase = timeSeriesField.toLowerCase();
66
- var startDateRegex = /sdate=(.*)[,]/;
67
- var endDateRegex = /edate=(.*)[)]/;
68
- var startDateMatch = phrase.match(startDateRegex);
69
- var endDateMatch = phrase.match(endDateRegex);
62
+ let regex = /TR.(.*)(?=\()/;
63
+ let result = timeSeriesField.match(regex);
64
+ let field = result[0].replace("TR.", "");
65
+ let phrase = timeSeriesField.toLowerCase();
66
+ let startDateRegex = /sdate=(.*)[,]/;
67
+ let endDateRegex = /edate=(.*)[)]/;
68
+ let startDateMatch = phrase.match(startDateRegex);
69
+ let endDateMatch = phrase.match(endDateRegex);
70
70
 
71
- var startDate = startDateMatch ? startDateMatch[1] : DateTime.format(new Date(), "YYYY-MM-DD");
72
- var endDate = endDateMatch[1];
71
+ let startDate = startDateMatch ? startDateMatch[1] : DateTime.format(new Date(), "YYYY-MM-DD");
72
+ let endDate = endDateMatch[1];
73
73
 
74
- var swapDateTmp;
74
+ let swapDateTmp;
75
75
  if(startDate > endDate) {
76
76
  swapDateTmp = startDate;
77
77
  startDate = endDate;
78
78
  endDate = swapDateTmp;
79
79
  }
80
80
 
81
- var msBetweenDate = (+new Date(endDate)) - (+new Date(startDate));
81
+ let msBetweenDate = (+new Date(endDate)) - (+new Date(startDate));
82
82
 
83
- var msInDay = 1000 * 60 * 60 * 24;
84
- var betweenDay = msBetweenDate / msInDay;
85
- // var betweenDay = Math.floor(Math.random() * 10); // For random length
83
+ let msInDay = 1000 * 60 * 60 * 24;
84
+ let betweenDay = msBetweenDate / msInDay;
85
+ // let betweenDay = Math.floor(Math.random() * 10); // For random length
86
86
 
87
87
 
88
88
  for (i = 0; i <= betweenDay; i++) {
89
- var date = new Date(new Date(startDate).setDate(new Date(startDate).getDate() + i));
90
- var fieldValue = {
89
+ let date = new Date(new Date(startDate).setDate(new Date(startDate).getDate() + i));
90
+ let fieldValue = {
91
91
  "h": true,
92
92
  "v": DateTime.format(date, "YYYY-MM-DDT00:00:00")
93
93
  };
@@ -96,16 +96,16 @@ Adc.request = function (payload, mockResponse) {
96
96
  }
97
97
  }
98
98
 
99
- var rics = identifiers;
99
+ let rics = identifiers;
100
100
  for (i = 0; i < rics.length; i++) {
101
101
 
102
- var ric = rics[i];
103
- var rowValue = [
102
+ let ric = rics[i];
103
+ let rowValue = [
104
104
  ric,
105
105
  field
106
106
  ];
107
107
  for (j = 1; j <= betweenDay + 1; j++) {
108
- var generatedValue = DataGenerator.generateRecord(field);
108
+ let generatedValue = DataGenerator.generateRecord(field);
109
109
  rowValue.push(generatedValue[field]);
110
110
 
111
111
  }
@@ -188,12 +188,12 @@ Adc.request = function (payload, mockResponse) {
188
188
  }
189
189
 
190
190
  // build data
191
- var rowMap = {};
191
+ let rowMap = {};
192
192
 
193
193
  len = identifiers.length;
194
- var rowData = dataGen.generate(fields, len);
194
+ let rowData = dataGen.generate(fields, len);
195
195
  for (i = 0; i < len; ++i) {
196
- var inst = identifiers[i];
196
+ let inst = identifiers[i];
197
197
  row = rowMap[inst];
198
198
  if (!row) {
199
199
  row = rowMap[inst] = rowData[i];
@@ -205,12 +205,12 @@ Adc.request = function (payload, mockResponse) {
205
205
  // There is a chance that rtk will return multiple row data per instrument
206
206
  // so we must create mock up for this case
207
207
  if (rows.length > 0) {
208
- var chance = dataGen.randInt(1, 10);
208
+ let chance = dataGen.randInt(1, 10);
209
209
  if (chance <= 3) { // chance 30%
210
- var pos = dataGen.randInt(0, rows.length - 1); // random row pos
210
+ let pos = dataGen.randInt(0, rows.length - 1); // random row pos
211
211
  row = rows[pos];
212
212
  len = row.length;
213
- var mockupRow = new Array(len);
213
+ let mockupRow = new Array(len);
214
214
  mockupRow[0] = row[0]; // 1st index is for instrument
215
215
  for (i = 1; i < len; i++) {
216
216
  mockupRow[i] = ''; // real case will return null or empty string
@@ -257,7 +257,7 @@ Adc.splitFields = function(strFields) {
257
257
  \) - a closing parenthesis
258
258
  ) - ending delimiter of the regular expression
259
259
  */
260
- var fields = strFields.split(/,(?![^()]*\))/);
260
+ let fields = strFields.split(/,(?![^()]*\))/);
261
261
  fields = fields.map(function(field) {
262
262
  return field.trim();
263
263
  });
@@ -1,7 +1,7 @@
1
1
  /** @description CollectionDict stores a collection (Array) of any value using a text (string) as a key for accessing the collection.
2
2
  * @constructor
3
3
  */
4
- var CollectionDict = function() {
4
+ let CollectionDict = function() {
5
5
  this._dict = {};
6
6
  };
7
7
  /** @type {!Object.<string, Array>}
@@ -20,7 +20,7 @@ CollectionDict.prototype._count = 0;
20
20
  */
21
21
  CollectionDict.prototype.addItem = function(key, item) {
22
22
  if(key && item != null) {
23
- var ary = this._dict[key];
23
+ let ary = this._dict[key];
24
24
  if(ary) {
25
25
  ary.push(item);
26
26
  } else {
@@ -42,9 +42,9 @@ CollectionDict.prototype.addItems = function(key, items) {
42
42
  if(!Array.isArray(items)) {
43
43
  return this.addItem(key, items);
44
44
  }
45
- var len = items ? items.length : 0;
45
+ let len = items ? items.length : 0;
46
46
  if(len) {
47
- var ary = this._dict[key];
47
+ let ary = this._dict[key];
48
48
  if(!ary) {
49
49
  ary = this._dict[key] = [];
50
50
  }
@@ -64,9 +64,9 @@ CollectionDict.prototype.addItems = function(key, items) {
64
64
  * @return {boolean} Return true if the item has been removed
65
65
  */
66
66
  CollectionDict.prototype.removeItem = function(key, item) {
67
- var ary = this._dict[key];
67
+ let ary = this._dict[key];
68
68
  if(ary) {
69
- var at = ary.indexOf(item);
69
+ let at = ary.indexOf(item);
70
70
  if(at >= 0) {
71
71
  if(ary.length > 1) {
72
72
  ary.splice(at, 1);
@@ -84,7 +84,7 @@ CollectionDict.prototype.removeItem = function(key, item) {
84
84
  * @return {boolean} Return true if any item has been removed
85
85
  */
86
86
  CollectionDict.prototype.removeItemsByKey = function(key) {
87
- var ary = this._dict[key];
87
+ let ary = this._dict[key];
88
88
  if(ary) {
89
89
  delete this._dict[key];
90
90
  this._count -= ary.length;
@@ -116,9 +116,9 @@ CollectionDict.prototype.getItems = function(key) {
116
116
  */
117
117
  CollectionDict.prototype.getAllItems = function() {
118
118
  if(this._count > 0) {
119
- var ary = [];
120
- var dict = this._dict;
121
- for(var key in dict) {
119
+ let ary = [];
120
+ let dict = this._dict;
121
+ for(let key in dict) {
122
122
  // Fastest way to add multiple items at once to an array. WARNING: There is a 10,000 item limit.
123
123
  Array.prototype.push.apply(ary, dict[key]);
124
124
  }
@@ -132,7 +132,7 @@ CollectionDict.prototype.getAllItems = function() {
132
132
  */
133
133
  CollectionDict.prototype.getItemCount = function(key) {
134
134
  if(key) {
135
- var items = this._dict[key] || null;
135
+ let items = this._dict[key] || null;
136
136
  if(items) {
137
137
  return items.length;
138
138
  }