@refinitiv-ui/efx-grid 6.0.2 → 6.0.5

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 (203) hide show
  1. package/lib/column-dragging/es6/ColumnDragging.d.ts +49 -0
  2. package/lib/column-dragging/es6/ColumnDragging.js +764 -0
  3. package/lib/column-dragging/es6/index.d.ts +1 -0
  4. package/lib/column-dragging/es6/index.js +1 -0
  5. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +13 -1
  6. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +15 -2
  7. package/lib/column-selection-dialog/lib/column-selection-dialog.js +146 -5
  8. package/lib/core/dist/core.css +1 -1
  9. package/lib/core/dist/core.js +468 -1092
  10. package/lib/core/dist/core.min.js +1 -1
  11. package/lib/core/es6/data/ColumnStats.d.ts +2 -2
  12. package/lib/core/es6/data/DataCache.d.ts +4 -4
  13. package/lib/core/es6/data/DataTable.d.ts +5 -5
  14. package/lib/core/es6/data/DataTable.js +33 -11
  15. package/lib/core/es6/data/DataView.d.ts +12 -18
  16. package/lib/core/es6/data/DataView.js +0 -4
  17. package/lib/core/es6/data/Segment.d.ts +2 -0
  18. package/lib/core/es6/data/Segment.js +7 -0
  19. package/lib/core/es6/data/SegmentCollection.d.ts +3 -3
  20. package/lib/core/es6/data/WrappedView.d.ts +13 -13
  21. package/lib/core/es6/data/WrappedView.js +6 -6
  22. package/lib/core/es6/grid/Core.d.ts +31 -27
  23. package/lib/core/es6/grid/Core.js +47 -11
  24. package/lib/core/es6/grid/ILayoutGrid.d.ts +15 -15
  25. package/lib/core/es6/grid/LayoutGrid.js +54 -26
  26. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +71 -0
  27. package/lib/core/es6/grid/components/Cell.d.ts +4 -4
  28. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +1 -1
  29. package/lib/core/es6/grid/components/CellSpans.d.ts +8 -8
  30. package/lib/core/es6/grid/components/Column.d.ts +1 -1
  31. package/lib/core/es6/grid/components/ElementWrapper.d.ts +6 -6
  32. package/lib/core/es6/grid/components/Scrollbar.d.ts +3 -1
  33. package/lib/core/es6/grid/components/Scrollbar.js +13 -0
  34. package/lib/core/es6/grid/components/StretchedCells.js +2 -2
  35. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  36. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +147 -81
  37. package/lib/core/es6/grid/util/Conflator.d.ts +2 -2
  38. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +3 -3
  39. package/lib/core/es6/grid/util/HttpRequest.d.ts +2 -2
  40. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +1 -1
  41. package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
  42. package/lib/core/es6/grid/util/SectionSettings.d.ts +5 -5
  43. package/lib/core/es6/grid/util/SectionSettings.js +5 -0
  44. package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
  45. package/lib/core/es6/grid/util/TrackLayout.d.ts +7 -3
  46. package/lib/core/es6/grid/util/TrackLayout.js +27 -0
  47. package/lib/core/es6/grid/util/util.d.ts +2 -2
  48. package/lib/core/es6/index.d.ts +1 -5
  49. package/lib/core/es6/index.js +1 -7
  50. package/lib/core/es6/tr-grid-theme.js +1 -1
  51. package/lib/filter-dialog/lib/checkbox-list.d.ts +13 -1
  52. package/lib/filter-dialog/lib/filter-dialog.d.ts +14 -1
  53. package/lib/filter-dialog/lib/filter-dialog.js +86 -26
  54. package/lib/filter-dialog/themes/base-checkbox.less +8 -1
  55. package/lib/filter-dialog/themes/base.less +69 -1
  56. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
  57. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
  58. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
  59. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
  60. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
  61. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
  62. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
  63. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
  64. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
  65. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
  66. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
  67. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
  68. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
  69. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
  70. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
  71. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
  72. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
  73. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
  74. package/lib/grid/lib/efx-grid.d.ts +25 -10
  75. package/lib/grid/lib/efx-grid.js +22 -56
  76. package/lib/grid/themes/base.less +1 -1
  77. package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
  78. package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
  79. package/lib/grid/themes/halo/efx-grid.less +33 -39
  80. package/lib/grid/themes/halo/light/efx-grid.js +1 -1
  81. package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
  82. package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
  83. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
  84. package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
  85. package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
  86. package/lib/index.d.ts +2 -0
  87. package/lib/index.js +2 -0
  88. package/lib/row-segmenting/es6/RowSegmenting.d.ts +7 -2
  89. package/lib/row-segmenting/es6/RowSegmenting.js +98 -11
  90. package/lib/rt-grid/dist/rt-grid.js +1244 -1249
  91. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  92. package/lib/rt-grid/es6/ColumnDefinition.d.ts +5 -3
  93. package/lib/rt-grid/es6/ColumnDefinition.js +17 -108
  94. package/lib/rt-grid/es6/DataConnector.d.ts +3 -3
  95. package/lib/rt-grid/es6/Grid.d.ts +24 -9
  96. package/lib/rt-grid/es6/Grid.js +285 -103
  97. package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
  98. package/lib/rt-grid/es6/RowDefSorter.js +137 -0
  99. package/lib/rt-grid/es6/RowDefinition.d.ts +9 -7
  100. package/lib/rt-grid/es6/RowDefinition.js +6 -0
  101. package/lib/rt-grid/es6/SnapshotFiller.d.ts +6 -1
  102. package/lib/rt-grid/es6/SnapshotFiller.js +144 -15
  103. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +4 -3
  104. package/lib/tr-grid-checkbox/es6/Checkbox.js +51 -21
  105. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +46 -9
  106. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +8 -4
  107. package/lib/tr-grid-column-stack/es6/ColumnStack.js +240 -125
  108. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +4 -3
  109. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +28 -13
  110. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +8 -5
  111. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +106 -3
  112. package/lib/tr-grid-percent-bar/es6/PercentBar.js +1 -1
  113. package/lib/tr-grid-printer/es6/CellWriter.d.ts +3 -3
  114. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +1 -1
  115. package/lib/tr-grid-printer/es6/GridPrinter.js +26 -13
  116. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +2 -2
  117. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +3 -3
  118. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +3 -4
  119. package/lib/tr-grid-row-dragging/es6/RowDragging.js +86 -195
  120. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +7 -2
  121. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +97 -7
  122. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +8 -8
  123. package/lib/tr-grid-row-selection/es6/RowSelection.js +55 -31
  124. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
  125. package/lib/tr-grid-textformatting/es6/TextFormatting.js +12 -0
  126. package/lib/tr-grid-util/es6/CellPainter.js +1 -1
  127. package/lib/tr-grid-util/es6/DragUI.d.ts +16 -0
  128. package/lib/tr-grid-util/es6/DragUI.js +214 -0
  129. package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -0
  130. package/lib/tr-grid-util/es6/ElementObserver.js +32 -2
  131. package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -1
  132. package/lib/tr-grid-util/es6/ElfUtil.js +131 -28
  133. package/lib/tr-grid-util/es6/ExpanderIcon.js +2 -2
  134. package/lib/tr-grid-util/es6/FieldFormatter.js +7 -5
  135. package/lib/tr-grid-util/es6/GridPlugin.js +8 -4
  136. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +8 -0
  137. package/lib/tr-grid-util/es6/MultiTableManager.js +164 -57
  138. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +2 -0
  139. package/lib/tr-grid-util/es6/NumberFormatter.js +64 -19
  140. package/lib/tr-grid-util/es6/RowPainter.js +57 -19
  141. package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
  142. package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
  143. package/lib/types/es6/Checkbox.d.ts +4 -3
  144. package/lib/types/es6/ColumnStack.d.ts +8 -4
  145. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +3 -2
  146. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +2 -1
  147. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +20 -18
  148. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +2 -1
  149. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +3 -2
  150. package/lib/types/es6/CompositeGrid/Plugin.d.ts +28 -0
  151. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
  152. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +5 -4
  153. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +2 -1
  154. package/lib/types/es6/CompositeGrid/index.d.ts +9 -9
  155. package/lib/types/es6/ConditionalColoring.d.ts +4 -3
  156. package/lib/types/es6/Core/data/ColumnStats.d.ts +2 -2
  157. package/lib/types/es6/Core/data/DataCache.d.ts +4 -4
  158. package/lib/types/es6/Core/data/DataTable.d.ts +5 -5
  159. package/lib/types/es6/Core/data/DataView.d.ts +12 -18
  160. package/lib/types/es6/Core/data/Segment.d.ts +2 -0
  161. package/lib/types/es6/Core/data/SegmentCollection.d.ts +3 -3
  162. package/lib/types/es6/Core/data/WrappedView.d.ts +13 -13
  163. package/lib/types/es6/Core/grid/Core.d.ts +31 -27
  164. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +15 -15
  165. package/lib/types/es6/Core/grid/components/Cell.d.ts +4 -4
  166. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +1 -1
  167. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +8 -8
  168. package/lib/types/es6/Core/grid/components/Column.d.ts +1 -1
  169. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +6 -6
  170. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +3 -1
  171. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  172. package/lib/types/es6/Core/grid/util/Conflator.d.ts +2 -2
  173. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +3 -3
  174. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +2 -2
  175. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +1 -1
  176. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
  177. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +5 -5
  178. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
  179. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +7 -3
  180. package/lib/types/es6/Core/grid/util/util.d.ts +2 -2
  181. package/lib/types/es6/Core/index.d.ts +1 -5
  182. package/lib/types/es6/ExtensionOptions.d.ts +2 -0
  183. package/lib/types/es6/InCellEditing.d.ts +8 -5
  184. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +5 -3
  185. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +3 -3
  186. package/lib/types/es6/RealtimeGrid/Grid.d.ts +24 -9
  187. package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
  188. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +9 -7
  189. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +6 -1
  190. package/lib/types/es6/RowDragging.d.ts +3 -4
  191. package/lib/types/es6/RowGrouping.d.ts +7 -2
  192. package/lib/types/es6/RowSegmenting.d.ts +7 -2
  193. package/lib/types/es6/RowSelection.d.ts +8 -8
  194. package/lib/types/es6/TextFormatting.d.ts +1 -1
  195. package/lib/types/es6/index.d.ts +1 -0
  196. package/lib/versions.json +17 -16
  197. package/package.json +1 -1
  198. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  199. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +0 -615
  200. package/lib/core/es6/grid/plugins/Plugin.d.ts +0 -28
  201. package/lib/core/es6/grid/plugins/Plugin.js +0 -272
  202. package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  203. package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +0 -28
@@ -13,6 +13,22 @@
13
13
  * @property {boolean=} mutiplyBy100=false Alias of multiplyBy100
14
14
  */
15
15
 
16
+ /** @private
17
+ * @function
18
+ * @param {number} num Absolute number
19
+ * @return {number}
20
+ */
21
+ var _multiplyByHundred = function(num) {
22
+ var intPart = num | 0;
23
+ if(intPart && num > intPart) {
24
+ var str = num + "";
25
+ var at = str.indexOf(".");
26
+ var fracStr = str.slice(at + 1) + "00";
27
+ return +(str.slice(0, at) + fracStr.slice(0, 2) + "." + fracStr.slice(2));
28
+ }
29
+ return num * 100;
30
+ };
31
+
16
32
  /** NumberFormatter provides a way to format the given number quickly.
17
33
  * @constructor
18
34
  * @param {NumberFormatter~Options=} options
@@ -198,6 +214,24 @@ NumberFormatter.padDecimalPartWithZeroes = function (str, precision) {
198
214
  }
199
215
  return str;
200
216
  };
217
+ /** @public
218
+ * @function
219
+ * @param {number} num
220
+ * @return {number}
221
+ * @example
222
+ * NumberFormatter.multiplyByHundred(1); // 1
223
+ * NumberFormatter.multiplyByHundred(1.1); // 110
224
+ * NumberFormatter.multiplyByHundred(1.21); // 121
225
+ * NumberFormatter.multiplyByHundred(1.321); // 132.1
226
+ * NumberFormatter.multiplyByHundred(-1.4321); // -143.21
227
+ */
228
+ NumberFormatter.multiplyByHundred = function (num) {
229
+ if(num < 0) {
230
+ return -(_multiplyByHundred(-num));
231
+ }
232
+ return _multiplyByHundred(num);
233
+ };
234
+
201
235
 
202
236
  /** @public
203
237
  * @param {Object=} options
@@ -206,20 +240,28 @@ NumberFormatter.padDecimalPartWithZeroes = function (str, precision) {
206
240
  NumberFormatter.prototype.getOptions = function(options) { // serialize
207
241
  if(!options) { options = {}; }
208
242
 
243
+ var formatType = options["formatType"];
244
+
209
245
  options["precisionEnabled"] = this._precisionEnabled;
210
246
  options["decimalPlaces"] = this._precision;
211
247
  options["plusSign"] = this._plusSignEnabled;
212
248
  options["separator"] = this._separatorEnabled;
213
- options["percentSign"] = this._percentSignEnabled;
214
- var su = "";
215
- if(this._scaler == "b") {
216
- su = "billion";
217
- } else if(this._scaler == "m") {
218
- su = "million";
249
+
250
+ if(formatType === "scaled" || formatType === "scaledvalue") {
251
+ var su = "";
252
+ if(this._scaler == "b") {
253
+ su = "billion";
254
+ } else if(this._scaler == "m") {
255
+ su = "million";
256
+ }
257
+ options["scalingUnit"] = su;
258
+ }
259
+
260
+ if(formatType === "percent") {
261
+ options["percentSign"] = this._percentSignEnabled;
262
+ options["mutiplyBy100"] = this._multiplyBy100Enabled;
263
+ options["multiplyBy100"] = this._multiplyBy100Enabled;
219
264
  }
220
- options["scalingUnit"] = su;
221
- options["mutiplyBy100"] = this._multiplyBy100Enabled;
222
- options["multiplyBy100"] = this._multiplyBy100Enabled;
223
265
  return options;
224
266
  };
225
267
 
@@ -240,7 +282,7 @@ NumberFormatter.prototype.format = function(origVal) {
240
282
  }
241
283
  }
242
284
 
243
- // Make value to be positive value for simpler logic
285
+ // Simplify logic by making positive value
244
286
  var val, sign;
245
287
  if(origVal >= 0) {
246
288
  val = origVal;
@@ -249,14 +291,18 @@ NumberFormatter.prototype.format = function(origVal) {
249
291
  val = -origVal;
250
292
  sign = "-";
251
293
  }
252
- if(this._multiplyBy100Enabled) {
253
- val = val * 100;
254
- }
255
- var absVal = val;
256
294
  var scalingMode = this._percentFormatEnabled ? "" : this._scaler; // Percent formatting overwrite scaling mode
257
295
 
258
- // Perform rounding
296
+ if(this._multiplyBy100Enabled) {
297
+ if(this._precisionEnabled || scalingMode) {
298
+ val = val * 100; // Since value will be rounded later, there is no need to avoid rounding issue
299
+ } else {
300
+ val = _multiplyByHundred(val);
301
+ }
302
+ }
259
303
 
304
+ var absVal = val;
305
+ // Perform scaling
260
306
  if (scalingMode) {
261
307
  if (scalingMode === "b" && val < 1e9) {
262
308
  scalingMode = "m";
@@ -270,11 +316,8 @@ NumberFormatter.prototype.format = function(origVal) {
270
316
  } else if (scalingMode === "b") {
271
317
  val = val / 1e9;
272
318
  }
273
-
274
- if (!this._precisionEnabled) {
275
- val = Math.round(val * 100) / 100;
276
- }
277
319
  }
320
+ // Perform rounding
278
321
  if (this._precisionEnabled) {
279
322
  if (this._precision > 0) {
280
323
  var deno = NumberFormatter._denominator[this._precision];
@@ -282,6 +325,8 @@ NumberFormatter.prototype.format = function(origVal) {
282
325
  } else {
283
326
  val = Math.round(val);
284
327
  }
328
+ } else if(scalingMode) {
329
+ val = Math.round(val * 100) / 100;
285
330
  }
286
331
 
287
332
  // Convert value to string
@@ -13,6 +13,7 @@ var RowPainter = function(options) {
13
13
  this._onCellClicked = options.onCellClicked;
14
14
  this._headerMenuClicked = options.headerMenuClicked;
15
15
  this._menuIconClicked = this._menuIconClicked.bind(this);
16
+ this._segmentMode = options.segmentMode;
16
17
  };
17
18
 
18
19
  /** @type {string}
@@ -71,6 +72,29 @@ RowPainter._styles = prettifyCss([
71
72
  ]
72
73
  ]);
73
74
 
75
+ /** @private
76
+ * @param {Object} cell
77
+ * @param {string=} className
78
+ */
79
+ RowPainter._applyColorTagClass = function(cell, className) {
80
+ if (!cell) {
81
+ return;
82
+ }
83
+ var el = cell.getElement();
84
+ if (el) {
85
+ if (el._tagColoringClass !== className) {
86
+ if (el._tagColoringClass) {
87
+ el.classList.remove(el._tagColoringClass);
88
+ el._tagColoringClass = null;
89
+ }
90
+ if (className) {
91
+ el.classList.add(className);
92
+ el._tagColoringClass = className;
93
+ }
94
+ }
95
+ }
96
+ };
97
+
74
98
  /** @public
75
99
  * @param {tr.Grid} grid
76
100
  */
@@ -108,10 +132,12 @@ RowPainter.enableHeaderMenu = function(grid, enabled) {
108
132
  * @param {number} rowIndex
109
133
  * @param {number} checkboxColumnIndex
110
134
  */
111
- RowPainter._clearCellContent = function(section, fromColumnIndex, toColumnIndex, rowIndex, checkboxColumnIndex) {
112
- for (var c = fromColumnIndex; c <= toColumnIndex; ++c) {
113
- if (section.isColumnVisible(c) && c !== checkboxColumnIndex) {
114
- section.getCell(c, rowIndex, false).setContent("");
135
+ RowPainter.prototype._clearCellContent = function(section, fromColumnIndex, toColumnIndex, rowIndex, checkboxColumnIndex) {
136
+ if(!this._segmentMode) {
137
+ for (var c = fromColumnIndex; c <= toColumnIndex; ++c) {
138
+ if (section.isColumnVisible(c) && c !== checkboxColumnIndex) {
139
+ section.getCell(c, rowIndex, false).setContent("");
140
+ }
115
141
  }
116
142
  }
117
143
  };
@@ -123,6 +149,7 @@ RowPainter._clearCellContent = function(section, fromColumnIndex, toColumnIndex,
123
149
  */
124
150
  RowPainter.prototype.removeHeaderStyle = function(section, columnIndex, rowIndex) {
125
151
  section.enableRowClass(rowIndex, "header", false); // TODO: Slow
152
+ section.enableRowClass(rowIndex, "folder", false); // TODO: Slow
126
153
  var cell = section.unstretchCell(columnIndex, rowIndex);
127
154
  this._removeHeaderStyle(cell);
128
155
  cell = section.getCell(columnIndex, rowIndex, false);
@@ -133,18 +160,23 @@ RowPainter.prototype.removeHeaderStyle = function(section, columnIndex, rowIndex
133
160
  * @param {Object} cell Cell container
134
161
  */
135
162
  RowPainter.prototype._removeHeaderStyle = function(cell) {
136
- if(!cell || !cell._groupHeaderStyle) {
163
+ if(!cell) {
137
164
  return;
138
165
  }
139
- cell._groupHeaderStyle = false;
140
- cell.removeClass("folder");
141
- cell.removeClass("closed");
142
- cell.removeClass("content-header");
143
- cell.removeClass("color-tag");
144
- cell.removeClass("main-group");
145
- cell.setStyle("paddingLeft", "");
146
- cell.removeIcon();
147
- cell.unlisten("click", this._onCellClicked);
166
+
167
+ RowPainter._applyColorTagClass(cell, "");
168
+
169
+ if(cell._groupHeaderStyle) {
170
+ cell._groupHeaderStyle = false;
171
+ cell.removeClass("folder");
172
+ cell.removeClass("closed");
173
+ cell.removeClass("content-header");
174
+ cell.removeClass("color-tag");
175
+ cell.removeClass("main-group");
176
+ cell.setStyle("paddingLeft", "");
177
+ cell.removeIcon();
178
+ cell.unlisten("click", this._onCellClicked);
179
+ }
148
180
  };
149
181
 
150
182
  /** @public
@@ -165,14 +197,14 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
165
197
  } else {
166
198
  section.unstretchCell(mainCol, r);
167
199
  section.enableRowClass(r, "header", true);
168
-
200
+ section.enableRowClass(r, "closed", e.collapsed ? true : false);
169
201
  // Remove content from cell that appear on right side of mainCol
170
- RowPainter._clearCellContent(section, mainCol + 1, colCount - 1, r, checkboxColumnIndex);
202
+ this._clearCellContent(section, mainCol + 1, colCount - 1, r, checkboxColumnIndex);
171
203
  }
172
204
  cell._groupHeaderStyle = true;
173
205
 
174
206
  // Remove content from cell that appear on left side of mainCol
175
- RowPainter._clearCellContent(section, 0, mainCol - 1, r, checkboxColumnIndex);
207
+ this._clearCellContent(section, 0, mainCol - 1, r, checkboxColumnIndex);
176
208
 
177
209
  // Footer rows and some specific group levels contains no expander (arrow)
178
210
  var newIcon = ExpanderIcon.renderOn(cell, e.hiddenArrow);
@@ -181,7 +213,11 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
181
213
  }
182
214
 
183
215
  if (!footerRow) {
184
- cell.addClass("folder"); // Required by the fallback arrow from the CSS rules. TODO: Change this
216
+ if (stretching) {
217
+ cell.addClass("folder"); // Stretched cell is in the cover-layer
218
+ } else {
219
+ section.enableRowClass(r, "folder", true); // Required by the fallback arrow from the CSS rules. TODO: Change this
220
+ }
185
221
  if (this._clickableCell) {
186
222
  cell.listen("click", this._onCellClicked);
187
223
  }
@@ -201,6 +237,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
201
237
  }
202
238
  cell.enableClass("closed", e.collapsed ? true : false);
203
239
  cell.enableClass("color-tag", true);
240
+ RowPainter._applyColorTagClass(cell, e.colorTagClass);
204
241
  cell.setStyle("paddingLeft", (e.indentSize > 0) ? e.indentSize + "px" : "");
205
242
  };
206
243
 
@@ -210,7 +247,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
210
247
  */
211
248
  RowPainter.prototype.applyContentAsHeaderStyle = function (e) {
212
249
  var cell = e.cell;
213
-
250
+ cell._groupHeaderStyle = true;
214
251
  cell.addClass("folder"); // Required by the fallback arrow from the CSS rules. TODO: Change this
215
252
  cell.enableClass("content-header", true);
216
253
  cell.enableClass("closed", e.collapsed);
@@ -228,6 +265,7 @@ RowPainter.prototype.applyRowStyle = function(e) {
228
265
  var indentSize = e.indentSize;
229
266
  cell.setStyle("paddingLeft", (indentSize > 0) ? indentSize + "px" : "");
230
267
  cell.enableClass("color-tag", e.nonGroupRow ? false : true);
268
+ RowPainter._applyColorTagClass(cell, e.colorTagClass);
231
269
  };
232
270
 
233
271
  /** @private
@@ -345,7 +345,15 @@ Formula.toUpperCase = function(exp) {
345
345
  exp = exp.toUpperCase(); // Upper case the remaining
346
346
 
347
347
  // May have the new string token from ADC field with parameter
348
- exp = exp.replace(/TR\.[\w_ ]+\([^\(\)]*\)(\.[a-zA-Z]+)*/g, Formula._encloseWithTR);
348
+ // Regex for adc fileds
349
+ // TR : start with tr
350
+ // (\.[\w]+)+ : dot follow by any character at least 1
351
+ // \( : start parentheses
352
+ // [^\(\)]* : any except parentheses
353
+ // \) : end parentheses
354
+ // (\.[a-zA-Z]+)* : dot follow by any character (optional)
355
+
356
+ exp = exp.replace(/TR(\.[\w ]+)+\([^\(\)]*\)(\.[a-zA-Z]+)*/g, Formula._encloseWithTR);
349
357
 
350
358
  exp = Formula.resolveTokens(exp, tokens, calcHierarchy); // Restore the string
351
359
 
@@ -0,0 +1,223 @@
1
+ export declare namespace JSXInterface {
2
+ interface ControlHTMLAttributes<T> extends HTMLAttributes<T> {
3
+ accept?: string;
4
+ alt?: string;
5
+ autoComplete?: string;
6
+ autocomplete?: string;
7
+ autoFocus?: boolean;
8
+ autofocus?: boolean | string;
9
+ capture?: string;
10
+ checked?: boolean;
11
+ crossOrigin?: string;
12
+ crossorigin?: string;
13
+ disabled?: boolean;
14
+ form?: string;
15
+ formAction?: string;
16
+ formaction?: string;
17
+ formEncType?: string;
18
+ formenctype?: string;
19
+ formMethod?: string;
20
+ formmethod?: string;
21
+ formNoValidate?: boolean;
22
+ formnovalidate?: boolean;
23
+ formTarget?: string;
24
+ formtarget?: string;
25
+ height?: number | string;
26
+ list?: string;
27
+ max?: number | string;
28
+ maxLength?: number;
29
+ maxlength?: number | string;
30
+ min?: number | string;
31
+ minLength?: number;
32
+ minlength?: number | string;
33
+ multiple?: boolean;
34
+ name?: string;
35
+ pattern?: string;
36
+ placeholder?: string;
37
+ readOnly?: boolean;
38
+ readonly?: boolean | string;
39
+ required?: boolean;
40
+ size?: number;
41
+ src?: string;
42
+ step?: number | string;
43
+ type?: string;
44
+ value?: string | string[] | number;
45
+ width?: number | string;
46
+ }
47
+ interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
48
+ innerHTML?: string;
49
+ key?: string | number;
50
+ accessKey?: string;
51
+ class?: string | {
52
+ [className: string]: boolean;
53
+ };
54
+ contentEditable?: boolean | string;
55
+ contenteditable?: boolean | string;
56
+ contextMenu?: string;
57
+ contextmenu?: string;
58
+ dir?: string;
59
+ draggable?: boolean;
60
+ hidden?: boolean;
61
+ id?: string;
62
+ lang?: string;
63
+ spellCheck?: boolean;
64
+ spellcheck?: boolean | string;
65
+ style?: {
66
+ [key: string]: string | undefined;
67
+ };
68
+ tabIndex?: number;
69
+ tabindex?: number | string;
70
+ title?: string;
71
+ inputMode?: string;
72
+ inputmode?: string;
73
+ is?: string;
74
+ radioGroup?: string;
75
+ radiogroup?: string;
76
+ part?: string;
77
+ role?: string;
78
+ about?: string;
79
+ datatype?: string;
80
+ inlist?: any;
81
+ prefix?: string;
82
+ property?: string;
83
+ resource?: string;
84
+ typeof?: string;
85
+ vocab?: string;
86
+ autoCapitalize?: string;
87
+ autocapitalize?: string;
88
+ autoCorrect?: string;
89
+ autocorrect?: string;
90
+ autoSave?: string;
91
+ autosave?: string;
92
+ color?: string;
93
+ itemProp?: string;
94
+ itemprop?: string;
95
+ itemScope?: boolean;
96
+ itemscope?: boolean;
97
+ itemType?: string;
98
+ itemtype?: string;
99
+ itemID?: string;
100
+ itemid?: string;
101
+ itemRef?: string;
102
+ itemref?: string;
103
+ results?: number;
104
+ security?: string;
105
+ unselectable?: boolean;
106
+ }
107
+ interface DOMAttributes<T = Element> {
108
+ ref?: any;
109
+ slot?: string;
110
+ children?: any;
111
+ onCopy?: (event: ClipboardEvent) => void;
112
+ onCopyCapture?: (event: ClipboardEvent) => void;
113
+ onCut?: (event: ClipboardEvent) => void;
114
+ onCutCapture?: (event: ClipboardEvent) => void;
115
+ onPaste?: (event: ClipboardEvent) => void;
116
+ onPasteCapture?: (event: ClipboardEvent) => void;
117
+ onCompositionEnd?: (event: CompositionEvent) => void;
118
+ onCompositionEndCapture?: (event: CompositionEvent) => void;
119
+ onCompositionStart?: (event: CompositionEvent) => void;
120
+ onCompositionStartCapture?: (event: CompositionEvent) => void;
121
+ onCompositionUpdate?: (event: CompositionEvent) => void;
122
+ onCompositionUpdateCapture?: (event: CompositionEvent) => void;
123
+ onFocus?: (event: FocusEvent) => void;
124
+ onFocusCapture?: (event: FocusEvent) => void;
125
+ onBlur?: (event: FocusEvent) => void;
126
+ onBlurCapture?: (event: FocusEvent) => void;
127
+ onChange?: (event: Event) => void;
128
+ onChangeCapture?: (event: Event) => void;
129
+ onInput?: (event: Event) => void;
130
+ onInputCapture?: (event: Event) => void;
131
+ onReset?: (event: Event) => void;
132
+ onResetCapture?: (event: Event) => void;
133
+ onSubmit?: (event: Event) => void;
134
+ onSubmitCapture?: (event: Event) => void;
135
+ onInvalid?: (event: Event) => void;
136
+ onInvalidCapture?: (event: Event) => void;
137
+ onLoad?: (event: Event) => void;
138
+ onLoadCapture?: (event: Event) => void;
139
+ onError?: (event: Event) => void;
140
+ onErrorCapture?: (event: Event) => void;
141
+ onKeyDown?: (event: KeyboardEvent) => void;
142
+ onKeyDownCapture?: (event: KeyboardEvent) => void;
143
+ onKeyPress?: (event: KeyboardEvent) => void;
144
+ onKeyPressCapture?: (event: KeyboardEvent) => void;
145
+ onKeyUp?: (event: KeyboardEvent) => void;
146
+ onKeyUpCapture?: (event: KeyboardEvent) => void;
147
+ onAuxClick?: (event: MouseEvent) => void;
148
+ onClick?: (event: MouseEvent) => void;
149
+ onClickCapture?: (event: MouseEvent) => void;
150
+ onContextMenu?: (event: MouseEvent) => void;
151
+ onContextMenuCapture?: (event: MouseEvent) => void;
152
+ onDblClick?: (event: MouseEvent) => void;
153
+ onDblClickCapture?: (event: MouseEvent) => void;
154
+ onDrag?: (event: DragEvent) => void;
155
+ onDragCapture?: (event: DragEvent) => void;
156
+ onDragEnd?: (event: DragEvent) => void;
157
+ onDragEndCapture?: (event: DragEvent) => void;
158
+ onDragEnter?: (event: DragEvent) => void;
159
+ onDragEnterCapture?: (event: DragEvent) => void;
160
+ onDragExit?: (event: DragEvent) => void;
161
+ onDragExitCapture?: (event: DragEvent) => void;
162
+ onDragLeave?: (event: DragEvent) => void;
163
+ onDragLeaveCapture?: (event: DragEvent) => void;
164
+ onDragOver?: (event: DragEvent) => void;
165
+ onDragOverCapture?: (event: DragEvent) => void;
166
+ onDragStart?: (event: DragEvent) => void;
167
+ onDragStartCapture?: (event: DragEvent) => void;
168
+ onDrop?: (event: DragEvent) => void;
169
+ onDropCapture?: (event: DragEvent) => void;
170
+ onMouseDown?: (event: MouseEvent) => void;
171
+ onMouseDownCapture?: (event: MouseEvent) => void;
172
+ onMouseEnter?: (event: MouseEvent) => void;
173
+ onMouseLeave?: (event: MouseEvent) => void;
174
+ onMouseMove?: (event: MouseEvent) => void;
175
+ onMouseMoveCapture?: (event: MouseEvent) => void;
176
+ onMouseOut?: (event: MouseEvent) => void;
177
+ onMouseOutCapture?: (event: MouseEvent) => void;
178
+ onMouseOver?: (event: MouseEvent) => void;
179
+ onMouseOverCapture?: (event: MouseEvent) => void;
180
+ onMouseUp?: (event: MouseEvent) => void;
181
+ onMouseUpCapture?: (event: MouseEvent) => void;
182
+ onTouchCancel?: (event: TouchEvent) => void;
183
+ onTouchCancelCapture?: (event: TouchEvent) => void;
184
+ onTouchEnd?: (event: TouchEvent) => void;
185
+ onTouchEndCapture?: (event: TouchEvent) => void;
186
+ onTouchMove?: (event: TouchEvent) => void;
187
+ onTouchMoveCapture?: (event: TouchEvent) => void;
188
+ onTouchStart?: (event: TouchEvent) => void;
189
+ onTouchStartCapture?: (event: TouchEvent) => void;
190
+ onPointerDown?: (event: PointerEvent) => void;
191
+ onPointerDownCapture?: (event: PointerEvent) => void;
192
+ onPointerMove?: (event: PointerEvent) => void;
193
+ onPointerMoveCapture?: (event: PointerEvent) => void;
194
+ onPointerUp?: (event: PointerEvent) => void;
195
+ onPointerUpCapture?: (event: PointerEvent) => void;
196
+ onPointerCancel?: (event: PointerEvent) => void;
197
+ onPointerCancelCapture?: (event: PointerEvent) => void;
198
+ onPointerEnter?: (event: PointerEvent) => void;
199
+ onPointerEnterCapture?: (event: PointerEvent) => void;
200
+ onPointerLeave?: (event: PointerEvent) => void;
201
+ onPointerLeaveCapture?: (event: PointerEvent) => void;
202
+ onPointerOver?: (event: PointerEvent) => void;
203
+ onPointerOverCapture?: (event: PointerEvent) => void;
204
+ onPointerOut?: (event: PointerEvent) => void;
205
+ onPointerOutCapture?: (event: PointerEvent) => void;
206
+ onGotPointerCapture?: (event: PointerEvent) => void;
207
+ onGotPointerCaptureCapture?: (event: PointerEvent) => void;
208
+ onLostPointerCapture?: (event: PointerEvent) => void;
209
+ onLostPointerCaptureCapture?: (event: PointerEvent) => void;
210
+ onScroll?: (event: UIEvent) => void;
211
+ onScrollCapture?: (event: UIEvent) => void;
212
+ onWheel?: (event: WheelEvent) => void;
213
+ onWheelCapture?: (event: WheelEvent) => void;
214
+ onAnimationStart?: (event: AnimationEvent) => void;
215
+ onAnimationStartCapture?: (event: AnimationEvent) => void;
216
+ onAnimationEnd?: (event: AnimationEvent) => void;
217
+ onAnimationEndCapture?: (event: AnimationEvent) => void;
218
+ onAnimationIteration?: (event: AnimationEvent) => void;
219
+ onAnimationIterationCapture?: (event: AnimationEvent) => void;
220
+ onTransitionEnd?: (event: TransitionEvent) => void;
221
+ onTransitionEndCapture?: (event: TransitionEvent) => void;
222
+ }
223
+ }
@@ -1,7 +1,7 @@
1
1
  import {Ext} from '../../tr-grid-util/es6/Ext.js';
2
2
  import {GridPlugin} from '../../tr-grid-util/es6/GridPlugin.js';
3
3
  import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
4
- import {injectCss, prettifyCss, extendObject} from "../../tr-grid-util/es6/Util.js";
4
+ import {injectCss, prettifyCss} from "../../tr-grid-util/es6/Util.js";
5
5
 
6
6
  declare namespace CheckboxPlugin {
7
7
 
@@ -12,7 +12,8 @@ declare namespace CheckboxPlugin {
12
12
  checkboxCreated?: ((...params: any[]) => any),
13
13
  checkboxBinding?: ((...params: any[]) => any),
14
14
  clicked?: ((...params: any[]) => any),
15
- width?: number
15
+ width?: number,
16
+ topCheckboxHandler?: boolean
16
17
  };
17
18
 
18
19
  type ColumnOptions = {
@@ -41,7 +42,7 @@ declare class CheckboxPlugin extends GridPlugin {
41
42
 
42
43
  public getDisplayColumn(): number;
43
44
 
44
- public getCheckbox(sectionRef: any, rowIndex: number): Element;
45
+ public getCheckbox(sectionRef: any, rowIndex: number): Element|null;
45
46
 
46
47
  public selectAll(): void;
47
48
 
@@ -9,6 +9,10 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
9
9
 
10
10
  declare namespace ColumnStackPlugin {
11
11
 
12
+ type Options = {
13
+ fields: (string)[]
14
+ };
15
+
12
16
  type ColumnOptions = {
13
17
  stackId?: string,
14
18
  stack?: (string|StackOptions)
@@ -34,11 +38,11 @@ declare class ColumnStackPlugin extends GridPlugin {
34
38
 
35
39
  public getConfigObject(gridOptions?: any): any;
36
40
 
37
- public getMemberIndices(colIndex: number): (number)[];
41
+ public getMemberIndices(colIndex: number): (number)[]|null;
38
42
 
39
- public collapseGroup(colIndex: number, collapsed?: boolean): (number)[];
43
+ public collapseGroup(colIndex: number, collapsed?: boolean): (number)[]|null;
40
44
 
41
- public expandGroup(colIndex: number): (number)[];
45
+ public expandGroup(colIndex: number): (number)[]|null;
42
46
 
43
47
  public isColumnStackable(colIndices: (number)[]): boolean;
44
48
 
@@ -60,7 +64,7 @@ declare class ColumnStackPlugin extends GridPlugin {
60
64
 
61
65
  public getStackId(colIndex: number): string;
62
66
 
63
- public stackColumns(colIndices?: (number)[], stackId?: string, options?: any): boolean;
67
+ public stackColumns(colRefs?: (number|string)[], stackId?: string, options?: any): boolean;
64
68
 
65
69
  public setStack(colRefs: (number|string)[]): boolean;
66
70
 
@@ -1,6 +1,7 @@
1
1
  import Ext from "../../../tr-grid-util/es6/Ext.js";
2
2
  import Util from "../Core/grid/util/util.js";
3
- import { Plugin, ILayoutGrid, Core} from "../Core/index.js";
3
+ import Plugin from "./Plugin.js";
4
+ import { ILayoutGrid, Core} from "../Core/index.js";
4
5
 
5
6
  declare class ColumnSelectionPlugin extends Plugin {
6
7
 
@@ -28,7 +29,7 @@ declare class ColumnSelectionPlugin extends Plugin {
28
29
 
29
30
  public isSelectedColumn(colIndex: number): boolean;
30
31
 
31
- public getActiveGrid(): Core;
32
+ public getActiveGrid(): Core|null;
32
33
 
33
34
  public enableSingleSelectionMode(bool?: boolean): void;
34
35
 
@@ -1,6 +1,7 @@
1
1
  import Ext from "../../../tr-grid-util/es6/Ext.js";
2
2
  import Util from "../Core/grid/util/util.js";
3
- import { Plugin, Conflator } from "../Core/index.js";
3
+ import Plugin from "./Plugin.js";
4
+ import { Conflator } from "../Core/index.js";
4
5
  import TextWidthCalculator from "./TextWidthCalculator.js"
5
6
 
6
7
  declare class ColumnWidthAdjustingPlugin extends Plugin {