@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
@@ -14,7 +14,7 @@ declare class ColumnStats {
14
14
 
15
15
  public setColumnDataGetter(func: ((...params: any[]) => any)): void;
16
16
 
17
- public getColumnDataGetter(): ((...params: any[]) => any);
17
+ public getColumnDataGetter(): ((...params: any[]) => any)|null;
18
18
 
19
19
  public getSum(): number;
20
20
 
@@ -32,7 +32,7 @@ declare class ColumnStats {
32
32
 
33
33
  public getMidRange(): number;
34
34
 
35
- public getCachedColumnData(): (number)[];
35
+ public getCachedColumnData(): (number)[]|null;
36
36
 
37
37
  public markDirty(): boolean;
38
38
 
@@ -29,9 +29,9 @@ declare class DataCache extends EventDispatcher {
29
29
 
30
30
  public getData(rid: string, cid: string): any;
31
31
 
32
- public getAllRics(): { [key: string]: any };
32
+ public getAllRics(): { [key: string]: any }|null;
33
33
 
34
- public getAllRowIds(): (string)[];
34
+ public getAllRowIds(): (string)[]|null;
35
35
 
36
36
  public hasRowId(rid: string): boolean;
37
37
 
@@ -57,7 +57,7 @@ declare class DataCache extends EventDispatcher {
57
57
 
58
58
  public resetStaticFields(): void;
59
59
 
60
- public getStaticFields(): { [key: string]: number };
60
+ public getStaticFields(): { [key: string]: number }|null;
61
61
 
62
62
  public dump(options?: any): (any)[];
63
63
 
@@ -65,7 +65,7 @@ declare class DataCache extends EventDispatcher {
65
65
 
66
66
  public setDataCloudSettings(userId: string, productId: string, url: string, opt_lang?: string): void;
67
67
 
68
- public getDataCloudFields(): (string)[];
68
+ public getDataCloudFields(): (string)[]|null;
69
69
 
70
70
  public addDataCloudFields(fields: (string)[]|string): boolean;
71
71
 
@@ -51,9 +51,9 @@ declare class DataTable extends DataCache {
51
51
 
52
52
  public removeAllRows(suppressEvent?: boolean): void;
53
53
 
54
- public moveRow(fromIndex: (number)[]|number, toIndex: number, suppressEvent?: boolean): (string)[]|string;
54
+ public moveRow(fromIndex: (number)[]|number, toIndex: number, suppressEvent?: boolean): (string)[]|string|null;
55
55
 
56
- public moveRows(startIndex: number|string, toIndex: number|string, opt_count?: number, suppressEvent?: boolean): (string)[];
56
+ public moveRows(startIndex: number|string, toIndex: number|string, opt_count?: number, suppressEvent?: boolean): (string)[]|null;
57
57
 
58
58
  public swapRow(fromIndex: number, toIndex: number): void;
59
59
 
@@ -85,7 +85,7 @@ declare class DataTable extends DataCache {
85
85
 
86
86
  public getSegmentParentRowId(rid: string): string;
87
87
 
88
- public getSegmentValues(rids?: (string)[]): (number)[];
88
+ public getSegmentValues(rids?: (string)[]): (number)[]|null;
89
89
 
90
90
  public fillSegment(segmentId: string): void;
91
91
 
@@ -101,9 +101,9 @@ declare class DataTable extends DataCache {
101
101
 
102
102
  public removeAllSegmentChildren(): boolean;
103
103
 
104
- public getSegmentIds(): (string)[];
104
+ public getSegmentIds(): (string)[]|null;
105
105
 
106
- public getSegmentChildIds(segmentId: string): (string)[];
106
+ public getSegmentChildIds(segmentId: string): (string)[]|null;
107
107
 
108
108
  public sortSegments(compare: ((...params: any[]) => any)): void;
109
109
 
@@ -841,7 +841,7 @@ DataTable.prototype.setColumnSortingLogic = function(cid, func) {
841
841
  * @example
842
842
  * var prevState = dt.freeze();
843
843
  * for(var i = 0; i < 100; ++i) {
844
- * dt.insertRow({}); // no event is fired
844
+ * dt.insertRow(); // no event is fired
845
845
  * }
846
846
  * dt.freeze(prevState); // Restore previous freeze states
847
847
  */
@@ -878,6 +878,7 @@ DataTable.prototype.isFrozen = function() {
878
878
  */
879
879
  DataTable.prototype.setSegmentSeparator = function(rid, enabled) {
880
880
  var change = false;
881
+ var memberCount = 0;
881
882
  if(typeof rid === "string") {
882
883
  if(enabled !== false) {
883
884
  if(!this._segments) {
@@ -887,16 +888,20 @@ DataTable.prototype.setSegmentSeparator = function(rid, enabled) {
887
888
  change = true;
888
889
  }
889
890
  } else if(this._segments) {
890
- if(this._segments.removeSegment(rid)) {
891
- change = true;
892
- if(!this._segments.getSegmentCount()) {
893
- this._segments = null;
891
+ var segment = this._segments.getSegment(rid);
892
+ if(segment) {
893
+ memberCount = segment.getChildCount();
894
+ if(this._segments.removeSegment(rid)) {
895
+ change = true;
896
+ if(!this._segments.getSegmentCount()) {
897
+ this._segments = null;
898
+ }
894
899
  }
895
900
  }
896
901
  }
897
902
  }
898
903
  if(change && this._needFiring()) {
899
- if(this._autoFillSegments()) {
904
+ if(this._autoFillSegments() || memberCount) {
900
905
  this.dispatchGlobalChange();
901
906
  } else {
902
907
  var rowData = this._rows[rid] || null;
@@ -1008,13 +1013,14 @@ DataTable.prototype._autoFillSegments = function() {
1008
1013
  }
1009
1014
  return false;
1010
1015
  };
1011
- /** Remove existing segment children and fill the segments with all contnet rows before the next segment separator
1016
+ /** Remove existing segment children and fill the segments with all content rows before the next segment separator
1012
1017
  * @public
1013
1018
  * @param {string} segmentId Row id
1014
1019
  */
1015
1020
  DataTable.prototype.fillSegment = function(segmentId) {
1016
1021
  if(this._segments) {
1017
1022
  this._segments.fillSegment(segmentId, this._rids);
1023
+ this.dispatchGlobalChange();
1018
1024
  }
1019
1025
  };
1020
1026
  /** Remove all existing segment children in each segment and fill the segments with all contnet rows before the next segment separator
@@ -1023,7 +1029,11 @@ DataTable.prototype.fillSegment = function(segmentId) {
1023
1029
  */
1024
1030
  DataTable.prototype.fillSegments = function() {
1025
1031
  if(this._segments) {
1026
- return this._segments.fillSegments(this._rids);
1032
+ var dirty = this._segments.fillSegments(this._rids);
1033
+ if(dirty) {
1034
+ this.dispatchGlobalChange();
1035
+ }
1036
+ return dirty;
1027
1037
  }
1028
1038
  return false;
1029
1039
  };
@@ -1068,7 +1078,11 @@ DataTable.prototype.addSegmentChildren = function(segmentId, rids) {
1068
1078
  */
1069
1079
  DataTable.prototype.removeSegmentChild = function(segmentId, rid) {
1070
1080
  if(this._segments) {
1071
- return this._segments.removeSegmentChild(segmentId, rid);
1081
+ var dirty = this._segments.removeSegmentChild(segmentId, rid);
1082
+ if(dirty) {
1083
+ this.dispatchGlobalChange();
1084
+ }
1085
+ return dirty;
1072
1086
  }
1073
1087
  return false;
1074
1088
  };
@@ -1079,7 +1093,11 @@ DataTable.prototype.removeSegmentChild = function(segmentId, rid) {
1079
1093
  */
1080
1094
  DataTable.prototype.removeSegmentChildren = function(segmentId, rids) {
1081
1095
  if(this._segments) {
1082
- return this._segments.removeSegmentChildren(segmentId, rids);
1096
+ var dirty = this._segments.removeSegmentChildren(segmentId, rids);
1097
+ if(dirty) {
1098
+ this.dispatchGlobalChange();
1099
+ }
1100
+ return dirty;
1083
1101
  }
1084
1102
  return false;
1085
1103
  };
@@ -1088,7 +1106,11 @@ DataTable.prototype.removeSegmentChildren = function(segmentId, rids) {
1088
1106
  */
1089
1107
  DataTable.prototype.removeAllSegmentChildren = function() {
1090
1108
  if(this._segments) {
1091
- return this._segments.removeAllSegmentChildren();
1109
+ var dirty = this._segments.removeAllSegmentChildren();
1110
+ if (dirty) {
1111
+ this.dispatchGlobalChange();
1112
+ }
1113
+ return dirty;
1092
1114
  }
1093
1115
  return false;
1094
1116
  };
@@ -1,6 +1,7 @@
1
1
  import Ext from "../../../tr-grid-util/es6/Ext.js";
2
2
  import DataCache from "./DataCache.js";
3
3
  import DataTable from "./DataTable.js";
4
+ import WrappedView from "./WrappedView.js"; // eslint-disable-line
4
5
  import ColumnStats from "./ColumnStats.js";
5
6
  import EventDispatcher from "../grid/event/EventDispatcher.js";
6
7
  import Util from "../grid/util/util.js";
@@ -22,7 +23,9 @@ declare class DataView extends EventDispatcher {
22
23
 
23
24
  public getAllRowIds(shallowCopy?: boolean, inclNonDataRow?: boolean): (string)[];
24
25
 
25
- public getSortedRowIds(opt_shallowCopy?: boolean): (string)[];
26
+ public getVisibleRowIds(shallowCopy?: boolean): (string)[];
27
+
28
+ public getSortedRowIds(shallowCopy?: boolean): (string)[];
26
29
 
27
30
  public getRowIndex(rid: string): number;
28
31
 
@@ -52,17 +55,17 @@ declare class DataView extends EventDispatcher {
52
55
 
53
56
  public removeRow(rowRef: number|string): void;
54
57
 
55
- public removeRows(refs: (number|string)[]): void;
58
+ public removeRows(rowRefs: (number|string)[]): void;
56
59
 
57
- public moveRow(fromIndex: (number)[]|number, toIndex: number): (string)[]|string;
60
+ public moveRow(fromRef: (number|string)[]|number|string, toRef: number|string): (string)[]|string|null;
58
61
 
59
62
  public swapRow(fromIndex: number, toIndex: number): void;
60
63
 
61
- public getDataTable(): DataTable;
64
+ public getDataTable(): DataTable|null;
62
65
 
63
- public getDataSource(): DataTable|DataView;
66
+ public getDataSource(): DataTable|DataView|null;
64
67
 
65
- public setDataSource(source?: DataTable|DataView): void;
68
+ public setDataSource(source?: (DataTable|DataView)): void;
66
69
 
67
70
  public setConflationRate(milliSecond: number): void;
68
71
 
@@ -144,13 +147,13 @@ declare class DataView extends EventDispatcher {
144
147
 
145
148
  public removeFooter(): void;
146
149
 
147
- public getGroupByRowId(rowId: string): DataView;
150
+ public getGroupByRowId(rowId: string): DataView|null;
148
151
 
149
- public getGroup(groupRef: number|string): DataView;
152
+ public getGroup(groupRef: number|string): DataView|null;
150
153
 
151
154
  public getAllGroups(out_ary?: any[]): (DataView)[];
152
155
 
153
- public getGroupList(): (string)[];
156
+ public getGroupList(): (string)[]|null;
154
157
 
155
158
  public getGroupId(): string;
156
159
 
@@ -164,14 +167,16 @@ declare class DataView extends EventDispatcher {
164
167
 
165
168
  public getGroupLevel(rowRef?: (number|string)): number;
166
169
 
167
- public enableColumnStats(cid: string, opt_enabled?: boolean, opt_refId?: string): ColumnStats;
170
+ public enableColumnStats(cid: string, opt_enabled?: boolean, opt_refId?: string): ColumnStats|null;
168
171
 
169
- public getColumnStats(cid: string): ColumnStats;
172
+ public getColumnStats(cid: string): ColumnStats|null;
170
173
 
171
174
  public hide(opt_hidden?: boolean): boolean;
172
175
 
173
176
  public isHidden(): boolean;
174
177
 
178
+ public isHiddenRow(rowId: string): boolean;
179
+
175
180
  public collapse(opt_collapsed?: boolean): void;
176
181
 
177
182
  public collapseAllGroups(opt_collapsed?: boolean): void;
@@ -182,8 +187,6 @@ declare class DataView extends EventDispatcher {
182
187
 
183
188
  public enableContentAsHeader(bool?: boolean): void;
184
189
 
185
- public getVisibleRowIds(opt_shallowCopy?: boolean): (string)[];
186
-
187
190
  public getVisibleRowCount(): number;
188
191
 
189
192
  public isRowDataInGroup(rowData: any, groupID?: string): boolean;
@@ -198,7 +201,7 @@ declare class DataView extends EventDispatcher {
198
201
 
199
202
  public removeAllRowExpansions(): void;
200
203
 
201
- public getExpansionParents(from?: number, to?: number): (string)[];
204
+ public getExpansionParents(from?: number, to?: number): (string)[]|null;
202
205
 
203
206
  public isRowExpansion(rid: string): boolean;
204
207
 
@@ -254,12 +257,18 @@ declare class DataView extends EventDispatcher {
254
257
 
255
258
  public removeAllSegmentChildren(): boolean;
256
259
 
257
- public getSegmentIds(): (string)[];
260
+ public getSegmentIds(): (string)[]|null;
258
261
 
259
- public getSegmentChildIds(segmentRef: string|number): (string)[];
262
+ public getSegmentChildIds(segmentRef: string|number): (string)[]|null;
260
263
 
261
264
  public sortSegments(compare: ((...params: any[]) => any)): void;
262
265
 
266
+ public getWrapSize(): number;
267
+
268
+ public getWrappedViews(): (WrappedView)[]|null;
269
+
270
+ public wrapView(wrapSize?: number): void;
271
+
263
272
  public dump(opt_options?: any): (any)[];
264
273
 
265
274
  public log(opt_options?: any): void;
@@ -268,7 +277,7 @@ declare class DataView extends EventDispatcher {
268
277
 
269
278
  }
270
279
 
271
- declare function len(fromIndex: number, toIndex: number): void;
280
+ declare function fromRids(fromIndex: number, toIndex: number): void;
272
281
 
273
282
  declare function criteria(value: any|any[]): void;
274
283
 
@@ -1,6 +1,7 @@
1
1
  import Ext from "../../../tr-grid-util/es6/Ext.js";
2
2
  import DataCache from "./DataCache.js";
3
3
  import DataTable from "./DataTable.js";
4
+ import WrappedView from "./WrappedView.js"; // eslint-disable-line
4
5
  import ColumnStats from "./ColumnStats.js";
5
6
  import EventDispatcher from "../grid/event/EventDispatcher.js";
6
7
  import Util from "../grid/util/util.js";
@@ -40,6 +41,14 @@ import { Conflator } from "../../../tr-grid-util/es6/Conflator.js";
40
41
  * @description Fired once before actual row filtering (before multiple execution of filter logic). This allow optimization by preparing data needed for the filtering
41
42
  * @type {Object}
42
43
  */
44
+ /** @event DataView#wrapCountChanged
45
+ * @property {number} prevCount
46
+ * @property {number} newCount
47
+ */
48
+ /** @event DataView#wrapSizeChanged
49
+ * @property {number} wrapSize
50
+ * @property {Array.<string>} rids
51
+ */
43
52
 
44
53
  /** DataView doesn't hold the actual data. It is just a transform view (by applying filtering or sorting) of the data from the {@link DataTable}
45
54
  * @constructor
@@ -56,6 +65,7 @@ var DataView = function(source) {
56
65
  t._onGroupAdded = t._onGroupAdded.bind(t);
57
66
  t._onBeforeGroupAdded = t._onBeforeGroupAdded.bind(t);
58
67
  t._onRefreshTimeout = t._onRefreshTimeout.bind(t);
68
+ t._updateWrapCount = t._updateWrapCount.bind(t);
59
69
 
60
70
  t._rids = [];
61
71
  t._sortingDefs = [];
@@ -72,7 +82,9 @@ var DataView = function(source) {
72
82
  "groupAdded",
73
83
  "beforeGroupAdded",
74
84
  "groupCriteriaChanged",
75
- "beforeFiltering"
85
+ "beforeFiltering",
86
+ "wrapCountChanged",
87
+ "wrapSizeChanged"
76
88
  );
77
89
 
78
90
  t.setDataSource(source);
@@ -251,9 +263,21 @@ DataView.prototype._showOnlyFirstMember = false;
251
263
  */
252
264
  DataView.prototype._beingAdded = false;
253
265
  /** @private
254
- * @type {Conflator | null}
266
+ * @type {Conflator}
255
267
  */
256
268
  DataView.prototype._conflator = null;
269
+ /** @private
270
+ * @type {Array.<WrappedView>}
271
+ */
272
+ DataView.prototype._wrappedViews = null;
273
+ /** @private
274
+ * @type {number}
275
+ */
276
+ DataView.prototype._wrapSize = 0;
277
+ /** @private
278
+ * @type {number}
279
+ */
280
+ DataView.prototype._wrapTimerId = 0;
257
281
 
258
282
  /** @public
259
283
  * @fires DataView#preDisposed
@@ -262,6 +286,8 @@ DataView.prototype.dispose = function() {
262
286
  this._dispatch("preDisposed", {});
263
287
 
264
288
  this.unlistenAll();
289
+ this.wrapView(0);
290
+
265
291
  this.setDataSource(null); // Remove this._dt and this._parent. WARNING: an event is fired
266
292
  this.groupBy(null); // Remove this._groupCriteria, this._groupRows and all of its children. WARNING: an event is fired
267
293
 
@@ -271,6 +297,10 @@ DataView.prototype.dispose = function() {
271
297
 
272
298
  this._userFilter = this._groupSortingLogic = null;
273
299
 
300
+ if(this._wrapTimerId) {
301
+ clearTimeout(this._wrapTimerId);
302
+ this._wrapTimerId = 0;
303
+ }
274
304
  if(this._refreshTimerId) {
275
305
  clearTimeout(this._refreshTimerId);
276
306
  this._refreshTimerId = 0;
@@ -344,7 +374,7 @@ DataView.prototype._toRowId = function(rowRef) {
344
374
  };
345
375
  /** @private
346
376
  * @param {Array.<number|string>} rowRefs
347
- * @return {Array.<string>}
377
+ * @return {!Array.<string>}
348
378
  */
349
379
  DataView.prototype._toRowIds = function(rowRefs) {
350
380
  var rowCount = Array.isArray(rowRefs) ? rowRefs.length : 0;
@@ -361,14 +391,15 @@ DataView.prototype._toRowIds = function(rowRefs) {
361
391
  }
362
392
  return ary;
363
393
  };
364
- /** Return all row ids with row data, excluding the group header rows (auto generated rows).<br>
365
- * Do use getAllRowData to retrieve all data
394
+ /** Return all row ids with row data, excluding the group header rows (auto generated rows).
366
395
  * @public
367
- * @param {boolean=} shallowCopy Default value is false. Set to true for speed
368
- * @param {boolean=} inclNonDataRow=false If enabled, group header rows are included
396
+ * @param {boolean=} shallowCopy=false If enabled, no new copy of Array is created (better for performance).
397
+ * @param {boolean=} inclNonDataRow=false If enabled, group header rows are included. In pagination mode, this flag will always be true.
369
398
  * @return {!Array.<string>}
370
399
  * @see {@link DataView#getAllRowData}
371
400
  * @see {@link DataView#getMultipleRowData}
401
+ * @see {@link DataView#getSortedRowIds}
402
+ * @see {@link DataView#getVisibleRowIds}
372
403
  */
373
404
  DataView.prototype.getAllRowIds = function(shallowCopy, inclNonDataRow) {
374
405
  this._rebuildRowIdsFromChildren();
@@ -378,17 +409,26 @@ DataView.prototype.getAllRowIds = function(shallowCopy, inclNonDataRow) {
378
409
 
379
410
  return (shallowCopy) ? rids : rids.slice(0); // Fastest way to clone an array is Array.slice()
380
411
  };
412
+ /** This method returns current visible rows (i.e. Rows in other pages or in collapsed groups are excluded). Group header rows may be included in the results.
413
+ * @public
414
+ * @param {boolean=} shallowCopy=false If enabled, no new copy of Array is created (better for performance).
415
+ * @return {!Array.<string>}
416
+ * @see {@link DataView#getAllRowData}
417
+ */
418
+ DataView.prototype.getVisibleRowIds = function(shallowCopy) {
419
+ this._rebuildRowIdsFromChildren();
420
+ var rids = this._getRids();
421
+ return shallowCopy ? rids : rids.slice(0); // Fastest way to clone an array
422
+ };
381
423
  /** Return all data rows that is filtered and sorted, excluding header rows or paging. This method ignores pagination.
382
424
  * @public
383
- * @param {boolean=} opt_shallowCopy Default value is false. Set to true for speed
425
+ * @param {boolean=} shallowCopy=false If enabled, no new copy of Array is created (better for performance).
384
426
  * @return {!Array.<string>}
427
+ * @see {@link DataView#getAllRowData}
385
428
  */
386
- DataView.prototype.getSortedRowIds = function(opt_shallowCopy) {
429
+ DataView.prototype.getSortedRowIds = function(shallowCopy) {
387
430
  this._rebuildRowIdsFromChildren();
388
- if(opt_shallowCopy) {
389
- return this._rids;
390
- }
391
- return this._rids.slice(0); // Fastest way to clone an array
431
+ return shallowCopy ? this._rids : this._rids.slice(0); // Fastest way to clone an array
392
432
  };
393
433
  /** This method is quite slow
394
434
  * @public
@@ -532,7 +572,7 @@ DataView.prototype.insertRow = function(rowRef, opt_values, opt_rid) { // Data c
532
572
  return "";
533
573
  };
534
574
 
535
- /** Permanently remove the specified row by row id or DataView's row index. If you want to temporarily remove the row, use {@link DataView.hideRows} instead
575
+ /** Permanently remove the specified row by row id or DataView's row index. If you want to temporarily remove the row, use {@link DataView#hideRows} instead
536
576
  * @public
537
577
  * @param {number|string} rowRef
538
578
  * @fires DataView#dataChanged
@@ -542,42 +582,30 @@ DataView.prototype.removeRow = function(rowRef) {
542
582
  this._dt.removeRow(this._toRowId(rowRef)); // Trigger dataChanged
543
583
  }
544
584
  };
545
- /** Permanently remove the specified rows by row id or DataView's row index. If you want to temporarily remove the rows, use {@link DataView.hideRows} instead
585
+ /** Permanently remove the specified rows by row id or DataView's row index. If you want to temporarily remove the rows, use {@link DataView#hideRows} instead
546
586
  * @public
547
- * @param {Array.<number|string>} refs
587
+ * @param {Array.<number|string>} rowRefs
548
588
  */
549
- DataView.prototype.removeRows = function(refs) {
550
- if(!this._dt) { return; }
551
- for(var i = refs.length; --i >= 0;) {
552
- var rowRef = refs[i];
553
- if(typeof rowRef === "number") {
554
- refs[i] = this.getRowId(rowRef);
555
- }
589
+ DataView.prototype.removeRows = function(rowRefs) {
590
+ if(this._dt) {
591
+ this._dt.removeRows(this._toRowIds(rowRefs)); // Trigger dataChanged
556
592
  }
557
- this._dt.removeRows(refs); // Trigger dataChanged
558
593
  };
559
- /** Move a single row or multiple rows to the position BEFORE the specified index (toIndex).
594
+ /** Move a single row or multiple rows to the position BEFORE the specified target row.
560
595
  * @public
561
- * @param {Array.<number>|number} fromIndex fromIndex could be a rowIndex or array of rowIndex.
562
- * @param {number} toIndex
596
+ * @param {Array.<number|string>|number|string} fromRef The value could be row index, row id, or array of row indices or row ids.
597
+ * @param {number|string} toRef Destination target could be row index or row id
563
598
  * @return {Array.<string>|string} rid rowId or array of the rowId of the moved row(s)
564
599
  * @example
565
600
  * ary = [0, 1, 2];
566
601
  * move(ary, 0, 1); // [0, 1, 2] Move index 0 to the position before index 1 (nothing is changed)
567
602
  * move(ary, 1, 0); // [1, 0, 2] Move index 1 to the position before index 0
568
603
  */
569
- DataView.prototype.moveRow = function(fromIndex, toIndex) {
570
- this._rebuildRowIdsFromChildren();
571
- var rids = this._getRids();
604
+ DataView.prototype.moveRow = function(fromRef, toRef) {
605
+ var toRid = this._toRowId(toRef);
572
606
 
573
- var toRid = (toIndex >= 0 && toIndex < rids.length) ? rids[toIndex] : "";
574
-
575
- var fromIndices = /** @type{Array.<number>} */(Array.isArray(fromIndex) ? fromIndex : [fromIndex]);
576
- var len = fromIndices.length;
577
- var fromRids = new Array(len);
578
- for(var i = 0; i < len; ++i) {
579
- fromRids[i] = rids[fromIndices[i]];
580
- }
607
+ var fromIndices = /** @type{!Array.<number|string>} */(Array.isArray(fromRef) ? fromRef : [fromRef]);
608
+ var fromRids = this._toRowIds(fromIndices);
581
609
 
582
610
  if(this._dt.hasSegmentation()) {
583
611
  this.synchronizeRowOrder();
@@ -611,7 +639,7 @@ DataView.prototype.getDataSource = function() {
611
639
  return this._parent;
612
640
  };
613
641
  /** @public
614
- * @param {DataTable|DataView=} source
642
+ * @param {(DataTable|DataView)=} source
615
643
  * @fires DataView#dataChanged
616
644
  */
617
645
  DataView.prototype.setDataSource = function(source) {
@@ -1095,7 +1123,7 @@ DataView.prototype.setPageSize = function (pageSize) {
1095
1123
  this._dispatchGlobalChange();
1096
1124
  };
1097
1125
 
1098
- /** string|function(Object.<string, *>):string|null
1126
+ /** Group all rows by the specified criteria. The criteria can be field name (field value will be used as a group id) or a function that takes row data and returns group id.
1099
1127
  * @public
1100
1128
  * @param {string|Function|Array.<string|Function>} cid Column id or grouper method that take one parameter for row data in JSON format, and returns groupId (string)
1101
1129
  * @param {Array=} opt_predefinedGroups
@@ -1606,6 +1634,17 @@ DataView.prototype.hide = function(opt_hidden) {
1606
1634
  DataView.prototype.isHidden = function() {
1607
1635
  return this._hidden;
1608
1636
  };
1637
+ /** @public
1638
+ * @param {string} rowId
1639
+ * @return {boolean} Returns true when this row is hidden
1640
+ */
1641
+ DataView.prototype.isHiddenRow = function(rowId) {
1642
+ if(this._hiddenRids) {
1643
+ return this._hiddenRids[rowId] === true;
1644
+ }
1645
+ return false;
1646
+ };
1647
+
1609
1648
  /** @private
1610
1649
  * @return {boolean}
1611
1650
  */
@@ -1714,14 +1753,7 @@ DataView.prototype._getFirstHiddenRids = function() {
1714
1753
  }
1715
1754
  return null;
1716
1755
  };
1717
- /** This method returns current visible rows (i.e. it excludes rows that are not in current page, and are in collapsed groups). Group header rows are also includes in the results.
1718
- * @public
1719
- * @param {boolean=} opt_shallowCopy Default value is false. Set to true for speed
1720
- * @return {!Array.<string>}
1721
- */
1722
- DataView.prototype.getVisibleRowIds = function(opt_shallowCopy) {
1723
- return this.getAllRowIds(opt_shallowCopy, true);
1724
- };
1756
+
1725
1757
  /** This will not include collapsed group and rows
1726
1758
  * @public
1727
1759
  * @return {number}
@@ -2454,6 +2486,95 @@ DataView.prototype.sortSegments = function (compare) {
2454
2486
  this._dt.sortSegments(compare);
2455
2487
  };
2456
2488
 
2489
+ /** @public
2490
+ * @ignore
2491
+ * @return {Object}
2492
+ */
2493
+ DataView.prototype._getSharedObject = function () {
2494
+ return this._shared;
2495
+ };
2496
+ /** Return 0, if there is no wrapping
2497
+ * @public
2498
+ * @return {number}
2499
+ */
2500
+ DataView.prototype.getWrapSize = function () {
2501
+ return this._wrapSize;
2502
+ };
2503
+ /** Return null, if there is no wrapping
2504
+ * @public
2505
+ * @return {Array.<WrappedView>}
2506
+ */
2507
+ DataView.prototype.getWrappedViews = function () {
2508
+ return this._wrappedViews;
2509
+ };
2510
+ /**
2511
+ * @public
2512
+ * @param {number=} wrapSize
2513
+ * @fires DataView#wrapCountChanged
2514
+ */
2515
+ DataView.prototype.wrapView = function (wrapSize) {
2516
+ if(wrapSize != null) {
2517
+ if(!wrapSize || wrapSize < 0) {
2518
+ wrapSize = 0;
2519
+ }
2520
+ if(this._wrapSize !== wrapSize) {
2521
+ this._wrapSize = wrapSize;
2522
+ this._dispatch("wrapSizeChanged", {
2523
+ "wrapSize": wrapSize,
2524
+ "rids": this.getVisibleRowIds(true)
2525
+ });
2526
+ }
2527
+ }
2528
+ this._updateWrapCount();
2529
+ };
2530
+
2531
+ /** @private
2532
+ * @fires DataView#wrapCountChanged
2533
+ */
2534
+ DataView.prototype._updateWrapCount = function () {
2535
+ this._wrapTimerId = 0;
2536
+ var wrapSize = this._wrapSize;
2537
+
2538
+ var i;
2539
+ var views = this._wrappedViews;
2540
+ var viewCount = views ? views.length : 0;
2541
+ var targetCount = 0;
2542
+ if(wrapSize) {
2543
+ var rids = this.getVisibleRowIds(true);
2544
+ var rowCount = rids.length;
2545
+ targetCount = Math.ceil(rowCount / wrapSize);
2546
+ if(viewCount < targetCount) {
2547
+ if(!views) {
2548
+ views = this._wrappedViews = [];
2549
+ }
2550
+ for(i = viewCount; i < targetCount; ++i) {
2551
+ this._wrappedViews[i] = new WrappedView({
2552
+ "dataView": this,
2553
+ "wrapIndex": i,
2554
+ "rids": rids
2555
+ });
2556
+ }
2557
+ }
2558
+ }
2559
+
2560
+ if(targetCount < viewCount) {
2561
+ for(i = viewCount; --i >= targetCount;) {
2562
+ this._wrappedViews[i].dispose();
2563
+ }
2564
+ this._wrappedViews.length = targetCount;
2565
+ }
2566
+ if(!wrapSize) {
2567
+ this._wrappedViews = null;
2568
+ }
2569
+
2570
+ if(viewCount !== targetCount) {
2571
+ this._dispatch("wrapCountChanged", {
2572
+ "prevCount": viewCount,
2573
+ "newCount": targetCount
2574
+ });
2575
+ }
2576
+ };
2577
+
2457
2578
  /** Construct a JSON object that is compatible with console.table()
2458
2579
  * @public
2459
2580
  * @param {Object=} opt_options {@link DataCache#dump}
@@ -3291,6 +3412,9 @@ DataView.prototype._dispatchGlobalChange = function() {
3291
3412
  */
3292
3413
  DataView.prototype._dispatchDataChange = function(evtArgument) {
3293
3414
  this._dispatch("dataChanged", evtArgument);
3415
+ if(this._wrapSize && !this._wrapTimerId) {
3416
+ this._wrapTimerId = setTimeout(this._updateWrapCount);
3417
+ }
3294
3418
  };
3295
3419
 
3296
3420
  /** @private
@@ -3648,7 +3772,6 @@ DataView._defaultGroupSortingLogic = function(strA, strB) {
3648
3772
  return (strA < strB) ? -1 : 1;
3649
3773
  };
3650
3774
 
3651
- DataView._proto = DataView.prototype;
3652
3775
 
3653
3776
  export default DataView;
3654
3777
  export { DataView };