@refinitiv-ui/efx-grid 6.0.1 → 6.0.4

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 (268) 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 +226 -23
  8. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +1 -1
  9. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +1 -1
  10. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +1 -1
  11. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +1 -1
  12. package/lib/core/dist/core.css +1 -1
  13. package/lib/core/dist/core.js +17835 -16266
  14. package/lib/core/dist/core.min.js +1 -1
  15. package/lib/core/es6/data/ColumnStats.d.ts +2 -2
  16. package/lib/core/es6/data/DataCache.d.ts +4 -4
  17. package/lib/core/es6/data/DataTable.d.ts +5 -5
  18. package/lib/core/es6/data/DataTable.js +33 -11
  19. package/lib/core/es6/data/DataView.d.ts +26 -17
  20. package/lib/core/es6/data/DataView.js +172 -49
  21. package/lib/core/es6/data/Segment.d.ts +2 -0
  22. package/lib/core/es6/data/Segment.js +7 -0
  23. package/lib/core/es6/data/SegmentCollection.d.ts +3 -3
  24. package/lib/core/es6/data/WrappedView.d.ts +289 -0
  25. package/lib/core/es6/data/WrappedView.js +1319 -0
  26. package/lib/core/es6/grid/Core.d.ts +42 -27
  27. package/lib/core/es6/grid/Core.js +431 -163
  28. package/lib/core/es6/grid/ILayoutGrid.d.ts +23 -15
  29. package/lib/core/es6/grid/ILayoutGrid.js +45 -2
  30. package/lib/core/es6/grid/LayoutGrid.d.ts +10 -1
  31. package/lib/core/es6/grid/LayoutGrid.js +311 -108
  32. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +10 -1
  33. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +382 -24
  34. package/lib/core/es6/grid/components/Cell.d.ts +4 -4
  35. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +1 -1
  36. package/lib/core/es6/grid/components/CellSpans.d.ts +8 -8
  37. package/lib/core/es6/grid/components/Column.d.ts +1 -1
  38. package/lib/core/es6/grid/components/Column.js +8 -2
  39. package/lib/core/es6/grid/components/ElementWrapper.d.ts +6 -6
  40. package/lib/core/es6/grid/components/HScrollbar.d.ts +4 -0
  41. package/lib/core/es6/grid/components/HScrollbar.js +20 -4
  42. package/lib/core/es6/grid/components/Scrollbar.d.ts +1 -1
  43. package/lib/core/es6/grid/components/StretchedCells.js +2 -2
  44. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  45. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +147 -81
  46. package/lib/core/es6/grid/util/Conflator.d.ts +2 -2
  47. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +3 -3
  48. package/lib/core/es6/grid/util/HttpRequest.d.ts +2 -2
  49. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +1 -1
  50. package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
  51. package/lib/core/es6/grid/util/SectionSettings.d.ts +5 -5
  52. package/lib/core/es6/grid/util/SectionSettings.js +5 -0
  53. package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
  54. package/lib/core/es6/grid/util/TrackLayout.d.ts +7 -3
  55. package/lib/core/es6/grid/util/TrackLayout.js +29 -3
  56. package/lib/core/es6/grid/util/util.d.ts +2 -2
  57. package/lib/core/es6/index.d.ts +1 -5
  58. package/lib/core/es6/index.js +1 -7
  59. package/lib/core/es6/tr-grid-theme.js +1 -1
  60. package/lib/filter-dialog/lib/checkbox-list.d.ts +13 -1
  61. package/lib/filter-dialog/lib/filter-dialog.d.ts +14 -1
  62. package/lib/filter-dialog/lib/filter-dialog.js +94 -32
  63. package/lib/filter-dialog/themes/base-checkbox.less +8 -1
  64. package/lib/filter-dialog/themes/base.less +69 -1
  65. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
  66. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
  67. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
  68. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
  69. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
  70. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
  71. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
  72. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
  73. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
  74. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
  75. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
  76. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
  77. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
  78. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
  79. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
  80. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
  81. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
  82. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
  83. package/lib/grid/lib/efx-grid.d.ts +30 -8
  84. package/lib/grid/lib/efx-grid.js +120 -115
  85. package/lib/grid/themes/base.less +5 -3
  86. package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
  87. package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
  88. package/lib/grid/themes/halo/efx-grid.less +72 -41
  89. package/lib/grid/themes/halo/light/efx-grid.js +1 -1
  90. package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
  91. package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
  92. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
  93. package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
  94. package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
  95. package/lib/index.d.ts +2 -0
  96. package/lib/index.js +2 -0
  97. package/lib/row-segmenting/es6/RowSegmenting.d.ts +8 -2
  98. package/lib/row-segmenting/es6/RowSegmenting.js +137 -21
  99. package/lib/rt-grid/dist/rt-grid.js +11017 -9193
  100. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  101. package/lib/rt-grid/es6/ColumnDefinition.d.ts +9 -4
  102. package/lib/rt-grid/es6/ColumnDefinition.js +20 -108
  103. package/lib/rt-grid/es6/DataConnector.d.ts +3 -3
  104. package/lib/rt-grid/es6/Grid.d.ts +30 -15
  105. package/lib/rt-grid/es6/Grid.js +436 -167
  106. package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
  107. package/lib/rt-grid/es6/RowDefSorter.js +137 -0
  108. package/lib/rt-grid/es6/RowDefinition.d.ts +12 -7
  109. package/lib/rt-grid/es6/RowDefinition.js +58 -2
  110. package/lib/rt-grid/es6/SnapshotFiller.d.ts +3 -1
  111. package/lib/rt-grid/es6/SnapshotFiller.js +23 -0
  112. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +1 -1
  113. package/lib/tr-grid-cell-selection/es6/CellSelection.js +53 -40
  114. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +6 -3
  115. package/lib/tr-grid-checkbox/es6/Checkbox.js +79 -34
  116. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +1 -0
  117. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +10 -0
  118. package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +5 -1
  119. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +269 -10
  120. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +8 -4
  121. package/lib/tr-grid-column-stack/es6/ColumnStack.js +243 -125
  122. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +1 -1
  123. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +24 -13
  124. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +4 -2
  125. package/lib/tr-grid-filter-input/es6/FilterInput.js +73 -10
  126. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +8 -5
  127. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +106 -3
  128. package/lib/tr-grid-printer/es6/CellWriter.d.ts +3 -3
  129. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +1 -1
  130. package/lib/tr-grid-printer/es6/GridPrinter.js +26 -13
  131. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +2 -2
  132. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +3 -3
  133. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +3 -4
  134. package/lib/tr-grid-row-dragging/es6/RowDragging.js +108 -127
  135. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +2 -0
  136. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +88 -33
  137. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +7 -2
  138. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +138 -38
  139. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +13 -9
  140. package/lib/tr-grid-row-selection/es6/RowSelection.js +230 -29
  141. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +2 -0
  142. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +36 -0
  143. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
  144. package/lib/tr-grid-textformatting/es6/TextFormatting.js +12 -0
  145. package/lib/tr-grid-util/es6/CellPainter.d.ts +8 -8
  146. package/lib/tr-grid-util/es6/Conflator.d.ts +2 -2
  147. package/lib/tr-grid-util/es6/CoralItems.d.ts +1 -1
  148. package/lib/tr-grid-util/es6/DateTime.d.ts +4 -4
  149. package/lib/tr-grid-util/es6/Delay.d.ts +1 -1
  150. package/lib/tr-grid-util/es6/Dom.d.ts +4 -4
  151. package/lib/tr-grid-util/es6/DragUI.d.ts +16 -0
  152. package/lib/tr-grid-util/es6/DragUI.js +214 -0
  153. package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -0
  154. package/lib/tr-grid-util/es6/ElementObserver.js +28 -1
  155. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +1 -1
  156. package/lib/tr-grid-util/es6/ElfDate.d.ts +3 -3
  157. package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -4
  158. package/lib/tr-grid-util/es6/ElfUtil.js +1 -1
  159. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +1 -1
  160. package/lib/tr-grid-util/es6/ExpanderIcon.js +2 -2
  161. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +1 -1
  162. package/lib/tr-grid-util/es6/FieldFormatter.js +7 -5
  163. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +5 -5
  164. package/lib/tr-grid-util/es6/GridPlugin.d.ts +3 -3
  165. package/lib/tr-grid-util/es6/GridPlugin.js +8 -4
  166. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +1 -1
  167. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +10 -2
  168. package/lib/tr-grid-util/es6/MultiTableManager.js +164 -57
  169. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +2 -0
  170. package/lib/tr-grid-util/es6/NumberFormatter.js +64 -19
  171. package/lib/tr-grid-util/es6/PercentBar.d.ts +1 -1
  172. package/lib/tr-grid-util/es6/Perf.d.ts +4 -4
  173. package/lib/tr-grid-util/es6/Popup.d.ts +2 -2
  174. package/lib/tr-grid-util/es6/RequestQueue.d.ts +1 -1
  175. package/lib/tr-grid-util/es6/RowPainter.d.ts +3 -0
  176. package/lib/tr-grid-util/es6/RowPainter.js +120 -28
  177. package/lib/tr-grid-util/es6/SubTable.d.ts +9 -9
  178. package/lib/tr-grid-util/es6/Table.d.ts +13 -13
  179. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +3 -3
  180. package/lib/tr-grid-util/es6/TickCodes.d.ts +2 -2
  181. package/lib/tr-grid-util/es6/TouchProxy.d.ts +1 -1
  182. package/lib/tr-grid-util/es6/Util.d.ts +6 -6
  183. package/lib/tr-grid-util/es6/formula/Engine.d.ts +5 -5
  184. package/lib/tr-grid-util/es6/formula/Formula.d.ts +3 -3
  185. package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
  186. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +1 -1
  187. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +2 -2
  188. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +4 -4
  189. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +1 -1
  190. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +4 -4
  191. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +11 -11
  192. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +7 -7
  193. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +1 -1
  194. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +1 -1
  195. package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
  196. package/lib/types/es6/CellSelection.d.ts +1 -1
  197. package/lib/types/es6/Checkbox.d.ts +6 -3
  198. package/lib/types/es6/ColumnGrouping.d.ts +1 -0
  199. package/lib/types/es6/ColumnSelection.d.ts +5 -1
  200. package/lib/types/es6/ColumnStack.d.ts +8 -4
  201. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +3 -2
  202. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +2 -1
  203. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +20 -18
  204. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +2 -1
  205. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +3 -2
  206. package/lib/types/es6/CompositeGrid/Plugin.d.ts +28 -0
  207. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
  208. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +5 -4
  209. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +2 -1
  210. package/lib/types/es6/CompositeGrid/index.d.ts +9 -9
  211. package/lib/types/es6/ConditionalColoring.d.ts +1 -1
  212. package/lib/types/es6/Core/data/ColumnStats.d.ts +2 -2
  213. package/lib/types/es6/Core/data/DataCache.d.ts +4 -4
  214. package/lib/types/es6/Core/data/DataTable.d.ts +5 -5
  215. package/lib/types/es6/Core/data/DataView.d.ts +26 -17
  216. package/lib/types/es6/Core/data/Segment.d.ts +2 -0
  217. package/lib/types/es6/Core/data/SegmentCollection.d.ts +3 -3
  218. package/lib/types/es6/Core/data/WrappedView.d.ts +289 -0
  219. package/lib/types/es6/Core/grid/Core.d.ts +42 -27
  220. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +23 -15
  221. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +10 -1
  222. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +10 -1
  223. package/lib/types/es6/Core/grid/components/Cell.d.ts +4 -4
  224. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +1 -1
  225. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +8 -8
  226. package/lib/types/es6/Core/grid/components/Column.d.ts +1 -1
  227. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +6 -6
  228. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +4 -0
  229. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +1 -1
  230. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  231. package/lib/types/es6/Core/grid/util/Conflator.d.ts +2 -2
  232. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +3 -3
  233. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +2 -2
  234. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +1 -1
  235. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
  236. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +5 -5
  237. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
  238. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +7 -3
  239. package/lib/types/es6/Core/grid/util/util.d.ts +2 -2
  240. package/lib/types/es6/Core/index.d.ts +1 -5
  241. package/lib/types/es6/ExtensionOptions.d.ts +2 -0
  242. package/lib/types/es6/FilterInput.d.ts +4 -2
  243. package/lib/types/es6/InCellEditing.d.ts +8 -5
  244. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +9 -4
  245. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +3 -3
  246. package/lib/types/es6/RealtimeGrid/Grid.d.ts +31 -16
  247. package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
  248. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +12 -7
  249. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +3 -1
  250. package/lib/types/es6/RowColoring.d.ts +2 -0
  251. package/lib/types/es6/RowDragging.d.ts +3 -4
  252. package/lib/types/es6/RowFiltering.d.ts +2 -0
  253. package/lib/types/es6/RowGrouping.d.ts +7 -2
  254. package/lib/types/es6/RowSegmenting.d.ts +8 -2
  255. package/lib/types/es6/RowSelection.d.ts +13 -9
  256. package/lib/types/es6/TextFormatting.d.ts +1 -1
  257. package/lib/types/es6/Zoom.d.ts +2 -1
  258. package/lib/types/es6/index.d.ts +3 -0
  259. package/lib/versions.json +22 -21
  260. package/lib/zoom/es6/Zoom.d.ts +2 -1
  261. package/lib/zoom/es6/Zoom.js +11 -4
  262. package/package.json +7 -7
  263. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  264. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +0 -615
  265. package/lib/core/es6/grid/plugins/Plugin.d.ts +0 -28
  266. package/lib/core/es6/grid/plugins/Plugin.js +0 -272
  267. package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  268. package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +0 -28
@@ -49,6 +49,10 @@ var _newArrayOfObject = function (num) {
49
49
  * @param {boolean=} bool
50
50
  */
51
51
  var _toggleInlineElement = function (elem, bool) {
52
+ if(!elem || elem.style.display === "none") {
53
+ return;
54
+ }
55
+
52
56
  var s = elem.style;
53
57
  if(bool == null) {
54
58
  bool = s.display !== "inline-block";
@@ -68,7 +72,7 @@ var _toggleInlineElement = function (elem, bool) {
68
72
  var MultiTableManager = function (gridElem) {
69
73
  this._onDelayedConfiguration = this._onDelayedConfiguration.bind(this);
70
74
  this._onConfiguration = this._onConfiguration.bind(this);
71
- this._onDataChanged = this._onDataChanged.bind(this);
75
+ this._onWrapCountChanged = this._onWrapCountChanged.bind(this);
72
76
 
73
77
  this._tables = [];
74
78
  if(gridElem) {
@@ -102,6 +106,10 @@ MultiTableManager.prototype._emeraldGrid = false;
102
106
  * @private
103
107
  */
104
108
  MultiTableManager.prototype._ready = false;
109
+ /** @type {number}
110
+ * @private
111
+ */
112
+ MultiTableManager.prototype._wrapSize = 0;
105
113
 
106
114
 
107
115
  /** @public
@@ -196,6 +204,7 @@ MultiTableManager._onVScrollbarSynchronization = function(vScrollbarHost, hScrol
196
204
  for(var i = 0; i < gridLen; ++i) {
197
205
  var gridElem = gridElems[i];
198
206
  var core = gridElem.api.getCoreGrid();
207
+
199
208
  _toggleInlineElement(gridElem, true);
200
209
  if(i > 0) {
201
210
  mainCore.synchronizeVScrollbar(core);
@@ -234,6 +243,8 @@ MultiTableManager.prototype.setGridConfig = function (configObj) {
234
243
  * @param {Object} e
235
244
  */
236
245
  MultiTableManager.prototype._onDelayedConfiguration = function (e) {
246
+ this._ready = false;
247
+ // TODO: Handle the case where config is changed at runtime
237
248
  setTimeout(this._onConfiguration, 10); // Add delay to ensure that scrollbars are synchronized first
238
249
  };
239
250
  /** @private
@@ -245,15 +256,16 @@ MultiTableManager.prototype._onConfiguration = function () {
245
256
  }
246
257
  this._ready = true;
247
258
 
248
- this.setTableCount(this._tableCount);
259
+ if(this._wrapSize) {
260
+ this._wrapTable(this._wrapSize);
261
+ } else {
262
+ this._setTableCount(this._tableCount);
263
+ }
249
264
  };
250
265
 
251
266
  /** @public
252
267
  */
253
268
  MultiTableManager.prototype.dispose = function () {
254
- // var main = this._tables[0];
255
- // main.api.getDataSource().unlisten("dataChanged", this._onDataChanged);
256
-
257
269
  var len = this._tables.length;
258
270
  for(var i = 0; i < len; ++i) {
259
271
  this._tables[i].dispose();
@@ -272,7 +284,8 @@ MultiTableManager.prototype._cloneConfig = function () {
272
284
  if(this._configObj) {
273
285
  obj = cloneObject(this._configObj);
274
286
  if(Array.isArray(obj.columns)) {
275
- obj.columns = this._configObj.columns.slice();
287
+ var runtimeConfig = this._tables[0].api ? this._tables[0].api.getConfigObject() : this._configObj;
288
+ obj.columns = runtimeConfig.columns.slice();
276
289
  }
277
290
  }
278
291
  return obj || {};
@@ -282,13 +295,12 @@ MultiTableManager.prototype._cloneConfig = function () {
282
295
  * @return {number}
283
296
  */
284
297
  MultiTableManager.prototype.getTableCount = function() {
285
- return this._tableCount;
298
+ return this._tables.length;
286
299
  };
287
- /**
288
- * @public
300
+ /** @private
289
301
  * @param {number} num Number of tables. Number cannot be less than one.
290
302
  */
291
- MultiTableManager.prototype.setTableCount = function(num) {
303
+ MultiTableManager.prototype._setTableCount = function(num) {
292
304
  this._tableCount = num > 0 ? num : 1;
293
305
 
294
306
  if(this._ready) {
@@ -301,30 +313,53 @@ MultiTableManager.prototype.setTableCount = function(num) {
301
313
  }
302
314
  };
303
315
  /**
316
+ * @public
317
+ * @param {number} num Number of tables. Number cannot be less than one.
318
+ */
319
+ MultiTableManager.prototype.setTableCount = function(num) {
320
+ if(this._wrapSize) {
321
+ this._wrapTable(0);
322
+ }
323
+ this._setTableCount(num);
324
+ };
325
+ /**
304
326
  * @private
327
+ * @param {number} tableIndex
305
328
  * @return {Element}
306
329
  */
307
- MultiTableManager.prototype._addTable = function() {
330
+ MultiTableManager.prototype._addTable = function(tableIndex) {
308
331
  var main = this._tables[0];
309
332
  var parentElem = main.parentNode;
333
+ var core = main.api.getCoreGrid();
310
334
  var mainDataView = main.api.getDataView();
311
335
  // var mainDataTable = main.api.getDataTable();
336
+ var stp = core.getPlugin("SortableTitlePlugin");
337
+ var dtp = core.getPlugin("DragAndDropTitlePlugin");
312
338
 
313
339
  var configObj = this._cloneConfig();
314
340
  configObj.extensions = this._generateExtensions();
341
+
315
342
  delete configObj.staticDataRows;
316
343
  delete configObj.rows;
317
344
  delete configObj.dataModel;
318
345
 
319
- var rowCount = mainDataView.getRowCount();
320
-
321
- var ary = _newArrayOfObject(rowCount);
322
- if(this._emeraldGrid) {
323
- configObj.dataModel = {
324
- data: ary
325
- };
346
+ if(this._wrapSize) {
347
+ var wrappedViews = mainDataView.getWrappedViews();
348
+ configObj.dataView = wrappedViews[tableIndex - 1];
349
+ configObj.grid = main.api;
326
350
  } else {
327
- configObj.rows = ary;
351
+ configObj["SortableTitle"] = stp;
352
+ configObj["DragAndDropTitle"] = dtp;
353
+ var rowCount = mainDataView.getRowCount();
354
+
355
+ var ary = _newArrayOfObject(rowCount);
356
+ if(this._emeraldGrid) {
357
+ configObj.dataModel = {
358
+ data: ary
359
+ };
360
+ } else {
361
+ configObj.rows = ary;
362
+ }
328
363
  }
329
364
 
330
365
  var sub = document.createElement(main.tagName);
@@ -347,19 +382,22 @@ MultiTableManager.prototype._addTables = function(num) {
347
382
 
348
383
  var main = this._tables[0];
349
384
  _toggleInlineElement(main, true); // TODO: Check if we need to do this every time
385
+
350
386
  // main.api.setFitContentWidth(true);
351
387
 
352
388
  for(var i = 0; i < num; ++i) {
353
- var grid = this._addTable();
389
+ var grid = this._addTable(this._tables.length);
354
390
  this._tables.push(grid);
355
391
  }
356
392
 
357
- if(main._vScrollbarSynchronization) {
358
- MultiTableManager.synchronizeVScrollbar(
359
- main.api.getCoreGrid().getVScrollbar().getParent(),
360
- main.parentNode,
361
- this._tables
362
- );
393
+ if(!this._wrapSize) {
394
+ if(main._vScrollbarSynchronization) {
395
+ MultiTableManager.synchronizeVScrollbar(
396
+ main.api.getCoreGrid().getVScrollbar().getParent(),
397
+ main.parentNode,
398
+ this._tables
399
+ );
400
+ }
363
401
  }
364
402
  };
365
403
  /**
@@ -381,20 +419,62 @@ MultiTableManager.prototype._removeTables = function(num) {
381
419
  sub.parentNode.removeChild(sub);
382
420
  }
383
421
  }
384
- if(this._tables.length === 1) {
385
- // TODO: Reset state
386
- this._tables[0].style.display = "";
422
+ // if(this._tables.length === 1) {
423
+ // TODO: Reset state
424
+ // this._tables[0].style.display = ""; // Remove display inline
425
+ // }
426
+ };
427
+
428
+
429
+ /** @private
430
+ * @param {number} rowCount Number of row per table. Set number to zero to turn off wrap mode.
431
+ */
432
+ MultiTableManager.prototype._wrapTable = function(rowCount) {
433
+ this._wrapSize = rowCount > 0 ? rowCount : 0;
434
+
435
+ if(this._ready) {
436
+ var main = this._tables[0];
437
+ if(this._wrapSize) {
438
+ main.style.display = "none";
439
+ main.api.getCoreGrid().getVScrollbar().disable();
440
+ } else {
441
+ main.style.display = "";
442
+ _toggleInlineElement(main, true);
443
+ main.api.getCoreGrid().getVScrollbar().disable(false);
444
+ }
445
+
446
+ var dv = main.api.getDataView();
447
+ dv.listen("wrapCountChanged", this._onWrapCountChanged);
448
+ dv.wrapView(this._wrapSize);
387
449
  }
388
450
  };
389
451
  /**
390
- * @private
452
+ * @public
453
+ * @param {number} rowCount Number of row per table. Set number to zero to turn off wrap mode.
454
+ */
455
+ MultiTableManager.prototype.wrapTable = function(rowCount) {
456
+ if(rowCount && this._tableCount > 1) {
457
+ this._setTableCount(1);
458
+ }
459
+ if(!rowCount || rowCount < 0) {
460
+ rowCount = 0;
461
+ }
462
+ if(this._wrapSize !== rowCount) {
463
+ this._wrapTable(rowCount);
464
+ }
465
+ };
466
+ /** @private
391
467
  * @param {Object} e
392
468
  */
393
- MultiTableManager.prototype._onDataChanged = function(e) {
394
-
469
+ MultiTableManager.prototype._onWrapCountChanged = function(e) {
470
+ if(e.prevCount < e.newCount) {
471
+ this._addTables(e.newCount - e.prevCount);
472
+ }
473
+ if(e.newCount < e.prevCount) {
474
+ this._removeTables(e.prevCount - e.newCount);
475
+ }
395
476
  };
396
477
 
397
-
398
478
  /** @public
399
479
  * @param {number=} at
400
480
  * @return {Element}
@@ -445,23 +525,6 @@ MultiTableManager.prototype._execAll = function(methodName, args) {
445
525
  }
446
526
  };
447
527
 
448
- /** @private
449
- * @param {number} num
450
- */
451
- MultiTableManager.prototype._setRtRowCount = function(num) {
452
- var tableCount = this._tables.length;
453
- // grid.api.getRowCount();
454
- for(var i = 1; i < tableCount; ++i) {
455
- var sub = this._tables[i];
456
- sub.api.insertRows(_newArrayOfObject(num));
457
- }
458
- };
459
- /** @private
460
- * @param {number} num
461
- */
462
- MultiTableManager.prototype._addCsRows = function(num) {
463
- };
464
-
465
528
  /** @public
466
529
  * @param {Object=} rowOption
467
530
  * @param {number=} at
@@ -471,10 +534,14 @@ MultiTableManager.prototype.insertRow = function(rowOption, at) {
471
534
  return; // TODO
472
535
  }
473
536
 
474
- var tableCount = this._tables.length;
475
- for(var i = 0; i < tableCount; ++i) {
476
- var tbl = this._tables[i];
477
- tbl.api.insertRow(rowOption, at);
537
+ if(this._wrapSize) {
538
+ this.getTable().api.insertRow(rowOption, at);
539
+ } else {
540
+ var tableCount = this._tables.length;
541
+ for(var i = 0; i < tableCount; ++i) {
542
+ var tbl = this._tables[i];
543
+ tbl.api.insertRow(rowOption, at);
544
+ }
478
545
  }
479
546
  };
480
547
  /** @public
@@ -488,18 +555,58 @@ MultiTableManager.prototype.removeRow = function(at) {
488
555
  at = this.getRowCount() - 1;
489
556
  }
490
557
 
558
+ if(this._wrapSize) {
559
+ this.getTable().api.removeRow(at);
560
+ } else {
561
+ var tableCount = this._tables.length;
562
+ for(var i = 0; i < tableCount; ++i) {
563
+ var tbl = this._tables[i];
564
+ tbl.api.removeRow(at);
565
+ }
566
+ }
567
+ };
568
+
569
+ /** @public
570
+ * @return {number}
571
+ */
572
+ MultiTableManager.prototype.getRowCount = function() {
573
+ return this.getTable().api.getRowCount();
574
+ };
575
+
576
+ /** @public
577
+ * @param {*} columnOption String will be treated as field, while object is treated as the column options
578
+ * @param {number=} idx
579
+ */
580
+ MultiTableManager.prototype.insertColumn = function(columnOption, idx) {
581
+ if(this._emeraldGrid) {
582
+ return; // TODO
583
+ }
584
+
491
585
  var tableCount = this._tables.length;
492
586
  for(var i = 0; i < tableCount; ++i) {
493
587
  var tbl = this._tables[i];
494
- tbl.api.removeRow(at);
588
+ tbl.api.insertColumn(columnOption, idx);
589
+ }
590
+ };
591
+ /** @public
592
+ * @param {*} colRef Column reference
593
+ */
594
+ MultiTableManager.prototype.removeColumn = function(colRef) {
595
+ if(this._emeraldGrid) {
596
+ return; // TODO
597
+ }
598
+ var tableCount = this._tables.length;
599
+ for(var i = 0; i < tableCount; ++i) {
600
+ var tbl = this._tables[i];
601
+ tbl.api.removeColumn(colRef);
495
602
  }
496
603
  };
497
604
 
498
605
  /** @public
499
606
  * @return {number}
500
607
  */
501
- MultiTableManager.prototype.getRowCount = function() {
502
- return this.getTable().api.getRowCount();
608
+ MultiTableManager.prototype.getColumnCount = function() {
609
+ return this.getTable().api.getColumnCount();
503
610
  };
504
611
 
505
612
  export default MultiTableManager;
@@ -27,6 +27,8 @@ declare class NumberFormatter {
27
27
 
28
28
  public static padDecimalPartWithZeroes(str: string, precision: number): string;
29
29
 
30
+ public static multiplyByHundred(num: number): number;
31
+
30
32
  public getOptions(options?: any): any;
31
33
 
32
34
  public format(origVal: number): string;
@@ -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
@@ -23,7 +23,7 @@ declare class PercentBar {
23
23
 
24
24
  public static toAlignment(str: string|null): string;
25
25
 
26
- public getElement(): Element;
26
+ public getElement(): Element|null;
27
27
 
28
28
  public getValue(): number;
29
29
 
@@ -12,13 +12,13 @@ declare namespace Perf {
12
12
 
13
13
  function clearResourceTimings(): void;
14
14
 
15
- function getEntries(): (PerformanceEntry)[];
15
+ function getEntries(): (PerformanceEntry)[]|null;
16
16
 
17
- function getEntriesByName(entryName: string, entryType?: string): (PerformanceEntry)[];
17
+ function getEntriesByName(entryName: string, entryType?: string): (PerformanceEntry)[]|null;
18
18
 
19
- function getEntriesByType(entryType: string): (PerformanceEntry)[];
19
+ function getEntriesByType(entryType: string): (PerformanceEntry)[]|null;
20
20
 
21
- function getEntry(entryName: string, entryType?: string): PerformanceEntry;
21
+ function getEntry(entryName: string, entryType?: string): PerformanceEntry|null;
22
22
 
23
23
  function mark(markName: string): void;
24
24
 
@@ -28,7 +28,7 @@ declare class Popup extends EventDispatcher {
28
28
 
29
29
  public dispose(): void;
30
30
 
31
- public getElement(): Element;
31
+ public getElement(): Element|null;
32
32
 
33
33
  public appendChild(childElem: Element): void;
34
34
 
@@ -50,7 +50,7 @@ declare class Popup extends EventDispatcher {
50
50
 
51
51
  public setPopupGap(gap?: number): void;
52
52
 
53
- public setParentElement(parentElement: Element): Element;
53
+ public setParentElement(parentElement: Element): Element|null;
54
54
 
55
55
  public show(opt_shown?: boolean, parentElement?: Element): void;
56
56
 
@@ -20,7 +20,7 @@ declare class RequestQueue {
20
20
 
21
21
  public getQueue(): any[];
22
22
 
23
- public makeRequest(obj: any): Promise<Response>;
23
+ public makeRequest(obj: any): Promise<Response>|null;
24
24
 
25
25
  public isLimitReached(): boolean;
26
26
 
@@ -1,5 +1,6 @@
1
1
  import { injectCss, prettifyCss } from "./Util.js";
2
2
  import { ExpanderIcon } from "./ExpanderIcon.js";
3
+ import { Icon } from "./Icon.js";
3
4
 
4
5
  declare class RowPainter {
5
6
 
@@ -9,6 +10,8 @@ declare class RowPainter {
9
10
 
10
11
  public static disableColorTag(grid: any, disabled?: boolean): void;
11
12
 
13
+ public static enableHeaderMenu(grid: any, enabled?: boolean): void;
14
+
12
15
  public removeHeaderStyle(section: any, columnIndex: number, rowIndex: number): void;
13
16
 
14
17
  public applyHeaderStyle(e: any): void;