@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
@@ -3,6 +3,7 @@ import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
3
3
  import { ExpanderIcon } from "../../tr-grid-util/es6/ExpanderIcon.js";
4
4
  import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
5
5
  import { RowPainter } from "../../tr-grid-util/es6/RowPainter.js";
6
+ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
6
7
 
7
8
  declare namespace RowGroupingPlugin {
8
9
 
@@ -26,6 +27,8 @@ declare namespace RowGroupingPlugin {
26
27
  autoGroupSorting?: boolean,
27
28
  indentSize?: (boolean|number|(number)[]),
28
29
  colorTag?: boolean,
30
+ predefinedColors?: any,
31
+ groupColors?: any,
29
32
  clicked?: ((...params: any[]) => any),
30
33
  groupAdded?: ((...params: any[]) => any),
31
34
  beforeGroupAdded?: ((...params: any[]) => any),
@@ -75,10 +78,12 @@ declare class RowGroupingPlugin extends GridPlugin {
75
78
 
76
79
  public setGroupSortingLogic(sortFunction: RowGroupingPlugin.GroupSortLogic): void;
77
80
 
78
- public getGroupSortingLogic(): ((...params: any[]) => any);
81
+ public getGroupSortingLogic(): ((...params: any[]) => any)|null;
79
82
 
80
83
  public setPredefinedGroups(predefinedGroups: any[]|(any[])[]): void;
81
84
 
85
+ public setPredefinedColors(predefinedColors: any): void;
86
+
82
87
  public sortGroups(): void;
83
88
 
84
89
  public updateHeaders(): void;
@@ -93,7 +98,7 @@ declare class RowGroupingPlugin extends GridPlugin {
93
98
 
94
99
  public disableClicking(opt_disabled?: boolean): void;
95
100
 
96
- public getGroupingStates(): (RowGroupingPlugin.GroupingState)[];
101
+ public getGroupingStates(): (RowGroupingPlugin.GroupingState)[]|null;
97
102
 
98
103
  public setGroupingStates(states: (RowGroupingPlugin.GroupingState)[]|string): void;
99
104
 
@@ -3,6 +3,7 @@ import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
3
3
  import { ExpanderIcon } from "../../tr-grid-util/es6/ExpanderIcon.js";
4
4
  import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
5
5
  import { RowPainter } from "../../tr-grid-util/es6/RowPainter.js";
6
+ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
6
7
 
7
8
  /** @typedef {Object} RowGroupingPlugin~Options
8
9
  * @description The options can be specified by `rowGrouping` property of the main grid's options
@@ -23,6 +24,8 @@ import { RowPainter } from "../../tr-grid-util/es6/RowPainter.js";
23
24
  * @property {boolean=} autoGroupSorting=false If enabled, group sorting will be performed after each `groupAdded` event
24
25
  * @property {(boolean|number|Array.<number>)=} indentSize Use array to define indent for each group level. Use boolean to turn on or off indentation. Use number to define incremental step.
25
26
  * @property {boolean=} colorTag If not specified, the color tag will be disabled when using extension without halo theme.
27
+ * @property {Object=} predefinedColors Predefined color object map for color tag
28
+ * @property {Object=} groupColors The object map of group ID and predefined color.
26
29
  * @property {Function=} clicked=null Event handler when user clicks on arrows or cells
27
30
  * @property {Function=} groupAdded=null Event handler
28
31
  * @property {Function=} beforeGroupAdded=null Event handler
@@ -143,7 +146,6 @@ var RowGroupingPlugin = function (options) {
143
146
  t._criteria = [];
144
147
  t._criteriaFuncs = [];
145
148
  t._hosts = [];
146
- t._indentSize = [0, 22, 37, 52, 67];
147
149
  t.config({ "rowGrouping": options });
148
150
  };
149
151
  Ext.inherits(RowGroupingPlugin, GridPlugin);
@@ -193,10 +195,14 @@ RowGroupingPlugin.prototype._headerColumn = -1; // Actual display column
193
195
  * @private
194
196
  */
195
197
  RowGroupingPlugin.prototype._headerColumnField = ''; // Actual display column field
196
- /** @type {!Array.<number>}
198
+ /** @type {Array.<number>}
197
199
  * @private
198
200
  */
199
- RowGroupingPlugin.prototype._indentSize = null;
201
+ RowGroupingPlugin.prototype._indentSizes = null;
202
+ /** @type {number}
203
+ * @private
204
+ */
205
+ RowGroupingPlugin.prototype._arrowSize = 9; // Solar theme's arrow size
200
206
  /** @type {boolean}
201
207
  * @private
202
208
  */
@@ -261,6 +267,22 @@ RowGroupingPlugin.prototype._rowPainter = null;
261
267
  * @private
262
268
  */
263
269
  RowGroupingPlugin.prototype._colorTag = null;
270
+ /** @type {Object}
271
+ * @private
272
+ */
273
+ RowGroupingPlugin.prototype._predefinedColors = null;
274
+ /** @type {Object}
275
+ * @private
276
+ */
277
+ RowGroupingPlugin.prototype._groupColors = null;
278
+ /** @type {string}
279
+ * @private
280
+ */
281
+ RowGroupingPlugin._controlClass = "predefined-color-tag";
282
+ /** @type {Object}
283
+ * @private
284
+ */
285
+ RowGroupingPlugin.prototype._styleTag = null;
264
286
 
265
287
  /** @type {Function}
266
288
  * @private
@@ -359,12 +381,8 @@ RowGroupingPlugin.prototype.getName = function () {
359
381
  * @param {Object} config
360
382
  */
361
383
  RowGroupingPlugin.prototype.beforeInit = function(elem, config) {
362
- // Set default indentSize here
363
384
  if (ElfUtil.isHaloTheme()) {
364
- // only for halo theme
365
- this._indentSize = [0, 30, 50, 70, 90];
366
- } else {
367
- this._indentSize = [0, 22, 37, 52, 67];
385
+ this._arrowSize = 18;
368
386
  }
369
387
  };
370
388
 
@@ -392,6 +410,12 @@ RowGroupingPlugin.prototype.initialize = function (host, options) {
392
410
 
393
411
  var enabled = this._colorTag != null ? this._colorTag : ElfUtil.isHaloTheme();
394
412
  RowPainter.disableColorTag(host, enabled === false);
413
+
414
+ if (this._predefinedColors != null) {
415
+ this._injectStyles(this._predefinedColors);
416
+ host.enableClass(RowGroupingPlugin._controlClass);
417
+ }
418
+
395
419
  RowPainter.applyGroupingStyles(host);
396
420
 
397
421
  this._applyGrouping(); // TODO: Support run-time theme loading
@@ -495,22 +519,24 @@ RowGroupingPlugin.prototype.config = function (options) {
495
519
  var indentSize = option.indentSize;
496
520
  if (indentSize != null) {
497
521
  if (typeof indentSize === "boolean") {
498
- if (!indentSize) {
499
- this._indentSize = [0];
522
+ if (indentSize) {
523
+ this._indentSizes = null; // Set to default
524
+ } else {
525
+ this._indentSizes = [0];
500
526
  } // TODO: Handle default case
501
527
  } else if (typeof indentSize === "number") {
502
- this._indentSize = new Array(5);
528
+ this._indentSizes = new Array(5);
503
529
  for (var j = 0; j < 5; j++) {
504
- this._indentSize[j] = indentSize * j;
530
+ this._indentSizes[j] = indentSize * j;
505
531
  }
506
532
  } else if (Array.isArray(indentSize)) {
507
- this._indentSize = indentSize;
533
+ this._indentSizes = indentSize;
508
534
  }
509
535
  }
510
536
  if (option.noCollapsible != null) {
511
537
  this._noCollapsible = !!option.noCollapsible;
512
538
  if (this._noCollapsible) {
513
- this._indentSize = [0]; // Content will not be indented
539
+ this._indentSizes = [0]; // Content will not be indented
514
540
  }
515
541
  }
516
542
  if (this._contentAsHeader || this._noCollapsible) { // contentAsHeader has higher priority than hiddenArrow
@@ -527,17 +553,27 @@ RowGroupingPlugin.prototype.config = function (options) {
527
553
  if (this.hasListener("groupFooterBinding")) {
528
554
  this._footerRows = 1;
529
555
  }
530
- this._rowPainter = new RowPainter({
531
- clickableCell: this._clickableCell,
532
- headerSpanning: this._headerSpanning,
533
- footerSpanning: this._footerSpanning,
534
- onCellClicked: this._onCellClicked
535
- });
556
+
536
557
  if (option.colorTag != null) {
537
558
  this._colorTag = option.colorTag;
538
559
  }
560
+
561
+ if (option.groupColors != null && typeof option.groupColors === "object") {
562
+ this._groupColors = option.groupColors;
563
+ }
564
+
565
+ if (option.predefinedColors != null && typeof option.predefinedColors === "object") {
566
+ this._predefinedColors = option.predefinedColors;
567
+ }
539
568
  }
540
569
 
570
+ this._rowPainter = new RowPainter({
571
+ clickableCell: this._clickableCell,
572
+ headerSpanning: this._headerSpanning,
573
+ footerSpanning: this._footerSpanning,
574
+ onCellClicked: this._onCellClicked
575
+ });
576
+
541
577
  if (this._fixedDisplayColumn < 0) {
542
578
  var checkboxColumnIndex = this._findCheckboxColumnIndexFromConfig(options.columns);
543
579
  if (checkboxColumnIndex >= 0) { // has checkbox column
@@ -616,11 +652,18 @@ RowGroupingPlugin.prototype.getConfigObject = function (gridOptions) {
616
652
  if(this._autoGroupSorting) {
617
653
  extOptions.autoGroupSorting = this._autoGroupSorting;
618
654
  }
619
- extOptions.indentSize = this._indentSize;
620
-
655
+ if(this._indentSizes) {
656
+ extOptions.indentSize = this._indentSizes;
657
+ }
621
658
  if(this._colorTag != null) {
622
659
  extOptions.colorTag = this._colorTag;
623
660
  }
661
+ if(this._groupColors != null) {
662
+ extOptions.groupColors = this._groupColors;
663
+ }
664
+ if(this._predefinedColors != null) {
665
+ extOptions.predefinedColors = this._predefinedColors;
666
+ }
624
667
 
625
668
  return obj;
626
669
  };
@@ -696,6 +739,32 @@ RowGroupingPlugin.prototype.getColumnMenu = function (colIndex, config) {
696
739
  return config;
697
740
  };
698
741
 
742
+ /** @private
743
+ * @param {Object} predefinedColors Predefined color object map
744
+ */
745
+ RowGroupingPlugin.prototype._injectStyles = function(predefinedColors) {
746
+ var prefix = ".tr-grid." + RowGroupingPlugin._controlClass + " .tr-lg .cell";
747
+ var css = [];
748
+ var value;
749
+ for (var className in predefinedColors) {
750
+ css.push(prefix + "." + className + "::before");
751
+ value = predefinedColors[className]["backgroundColor"];
752
+ if (value) {
753
+ css.push(["background-color: " + value + ";"]);
754
+ }
755
+ }
756
+
757
+ var host = this._hosts[0];
758
+
759
+ if (this._styleTag) {
760
+ if (this._styleTag.parentNode) {
761
+ this._styleTag.parentNode.removeChild(this._styleTag);
762
+ }
763
+ this._styleTag = null;
764
+ }
765
+ this._styleTag = injectCss(prettifyCss(css), host.getElement());
766
+ };
767
+
699
768
  /** @private
700
769
  * @param {Object} e
701
770
  */
@@ -915,6 +984,16 @@ RowGroupingPlugin.prototype.setPredefinedGroups = function (predefinedGroups) {
915
984
  }
916
985
  };
917
986
 
987
+ /** @public
988
+ * @param {Object} predefinedColors Predefined color object map
989
+ */
990
+ RowGroupingPlugin.prototype.setPredefinedColors = function(predefinedColors) {
991
+ if(predefinedColors != null && typeof predefinedColors === "object") {
992
+ this._predefinedColors = predefinedColors;
993
+ this._injectStyles(predefinedColors);
994
+ }
995
+ };
996
+
918
997
  /** Trigger group sorting logic -- re-sort the existing groups. This will not continuously apply to each data update.
919
998
  * @public
920
999
  */
@@ -1197,7 +1276,7 @@ RowGroupingPlugin.prototype._updateHeader = function (settings, firstRowIndex, l
1197
1276
  arg.rowData = this._rowGetter(dataSource.getRowData(rowId));
1198
1277
  arg.noIndent = false;
1199
1278
 
1200
- rowPainter.removeHeaderStyle(section, headerColumn, r);
1279
+ var contentHeaderGroup = rowsForContentHeader[rowId];
1201
1280
  var groupView = dataSource.getGroupByRowId(rowId);
1202
1281
  if (groupView) { // Header Render
1203
1282
  currentGroup = groupView;
@@ -1214,24 +1293,24 @@ RowGroupingPlugin.prototype._updateHeader = function (settings, firstRowIndex, l
1214
1293
  if(needCal) {
1215
1294
  currentGroup = dataSource.getGroup(rowId); // Slow
1216
1295
  curGroupLevel = currentGroup.getGroupLevel();
1296
+ } else if(!currentGroup) {
1297
+ currentGroup = dataSource.getGroup(rowId); // Slow
1217
1298
  }
1218
1299
 
1219
- var grp = rowsForContentHeader[rowId];
1220
- if (grp || nonGroupListener) {
1300
+ if (contentHeaderGroup || nonGroupListener) {
1221
1301
  arg.dataSource = dataSource;
1222
1302
  arg.footerIndex = null;
1223
1303
  arg.groupId = null;
1224
1304
 
1225
- if (grp) {
1226
- arg.collapsed = grp.isCollapsed();
1227
- rowPainter.applyContentAsHeaderStyle(arg);
1305
+ if (contentHeaderGroup) {
1306
+ arg.collapsed = contentHeaderGroup.isCollapsed();
1228
1307
  }
1229
1308
 
1230
1309
  if (nonGroupListener) {
1231
1310
  arg.rowData = this._rowGetter(dataSource.getRowData(rowId));
1232
1311
  }
1233
1312
  }
1234
- if (grp) { // In contentHeader mode indent in contentHeader will same the parent header when group level 2
1313
+ if (contentHeaderGroup) { // In contentHeader mode indent in contentHeader will same the parent header when group level 2
1235
1314
  indentOffset = -2;
1236
1315
  } else {
1237
1316
  // In contentHeader mode with 1 level the content indent more than contentHeader 1
@@ -1243,7 +1322,7 @@ RowGroupingPlugin.prototype._updateHeader = function (settings, firstRowIndex, l
1243
1322
 
1244
1323
  arg.groupLevel = curGroupLevel;
1245
1324
 
1246
- var rowLevel;
1325
+ var rowLevel = 0;
1247
1326
  var nonGroupRow = this._autoGroupHiding && currentGroup.getGroupValue() == null && curGroupLevel === 1 && !this._contentAsHeader;
1248
1327
  arg.nonGroupRow = nonGroupRow;
1249
1328
 
@@ -1253,15 +1332,20 @@ RowGroupingPlugin.prototype._updateHeader = function (settings, firstRowIndex, l
1253
1332
  rowLevel = curGroupLevel - 1;
1254
1333
  } else { // content
1255
1334
  rowLevel = curGroupLevel + indentOffset; // content have indent more than header 1
1256
- if(rowLevel < 0) {
1257
- rowLevel = 0;
1258
- }
1259
1335
  }
1260
1336
 
1261
- var indentSize = this._indentSize[rowLevel];
1262
- if (indentSize == null) {
1263
- var len = this._indentSize.length;
1264
- indentSize = this._indentSize[len - 1];
1337
+ var indentSize = 0;
1338
+ if(this._indentSizes) {
1339
+ indentSize = this._indentSizes[0];
1340
+ if(rowLevel > 0) {
1341
+ var indentLimit = this._indentSizes.length;
1342
+ indentSize = rowLevel < indentLimit ? this._indentSizes[rowLevel] : this._indentSizes[indentLimit - 1];
1343
+ }
1344
+ } else if(rowLevel > 0) {
1345
+ indentSize = 8 + rowLevel * 4; // 8 is default cell padding
1346
+ if(!groupView) {
1347
+ indentSize += this._arrowSize;
1348
+ }
1265
1349
  }
1266
1350
  if (maxColWidth > -1 && maxColWidth < indentSize) {
1267
1351
  indentSize = maxColWidth;
@@ -1269,10 +1353,26 @@ RowGroupingPlugin.prototype._updateHeader = function (settings, firstRowIndex, l
1269
1353
 
1270
1354
  arg.indentSize = indentSize;
1271
1355
 
1356
+ if (this._groupColors) {
1357
+ // TODO: Need better method to find the first level parent's group id
1358
+ var rootGroup = currentGroup ? currentGroup : dataSource.getGroup(rowId); // Slow
1359
+ if (curGroupLevel > 1) {
1360
+ for (var i = curGroupLevel; i > 1; i--) {
1361
+ rootGroup = rootGroup.getDataSource();
1362
+ }
1363
+ }
1364
+ var groupId = rootGroup.getGroupId();
1365
+ arg.colorTagClass = this._groupColors[groupId];
1366
+ }
1367
+
1272
1368
  if (groupView) {
1273
1369
  rowPainter.applyHeaderStyle(arg);
1274
1370
  this._dispatch(footerRow ? "groupFooterBinding" : "groupHeaderBinding", arg);
1275
1371
  } else {
1372
+ rowPainter.removeHeaderStyle(section, headerColumn, r);
1373
+ if (contentHeaderGroup) {
1374
+ rowPainter.applyContentAsHeaderStyle(arg);
1375
+ }
1276
1376
  rowPainter.applyRowStyle(arg);
1277
1377
  this._dispatch("nonGroupBinding", arg);
1278
1378
  }
@@ -1294,7 +1394,7 @@ RowGroupingPlugin.prototype._getRowsForContentAsHeader = function () {
1294
1394
  for (var grpId in allGroups) {
1295
1395
  var grp = allGroups[grpId];
1296
1396
  if (!grp.hasGroup()) { // Deepest level group
1297
- var firstRowId = grp.getAllRowIds()[0]; // Prepare first row in group for contentAsHeader mode to use.
1397
+ var firstRowId = grp.getAllRowIds(true)[0]; // Prepare first row in group for contentAsHeader mode to use.
1298
1398
  if (firstRowId) {
1299
1399
  result[firstRowId] = grp;
1300
1400
  }
@@ -1,8 +1,10 @@
1
- import { Ext } from '../../tr-grid-util/es6/Ext.js';
2
- import { EventDispatcher } from '../../tr-grid-util/es6/EventDispatcher.js';
3
- import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
4
- import { isMac as isMacFn } from '../../tr-grid-util/es6/Util.js';
1
+ import { Ext } from "../../tr-grid-util/es6/Ext.js";
2
+ import { EventDispatcher } from "../../tr-grid-util/es6/EventDispatcher.js";
3
+ import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
4
+ import { isMac as isMacFn } from "../../tr-grid-util/es6/Util.js";
5
5
  import { isIE, prepareTSVContent } from "../../tr-grid-util/es6/Util.js";
6
+ import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
7
+ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
6
8
 
7
9
  declare namespace RowSelectionPlugin {
8
10
 
@@ -11,7 +13,9 @@ declare namespace RowSelectionPlugin {
11
13
  selectionChanged?: ((...params: any[]) => any),
12
14
  beforeSelection?: ((...params: any[]) => any),
13
15
  basedOnContent?: boolean,
14
- selectionField?: string
16
+ selectionField?: string,
17
+ menuClicked?: ((...params: any[]) => any),
18
+ menuPosition?: string
15
19
  };
16
20
 
17
21
  }
@@ -42,13 +46,13 @@ declare class RowSelectionPlugin extends GridPlugin {
42
46
 
43
47
  public getRowAnchor(sectRef?: any): number;
44
48
 
45
- public getFirstSelectedIndex(sectRef?: any): number|null;
49
+ public getFirstSelectedIndex(sectRef?: any): number|null|null;
46
50
 
47
- public getLastSelectedIndex(sectRef?: any): number|null;
51
+ public getLastSelectedIndex(sectRef?: any): number|null|null;
48
52
 
49
- public getSelectedRows(sectRef?: any): (number)[];
53
+ public getSelectedRows(sectRef?: any): (number)[]|null;
50
54
 
51
- public getSelectedRowIds(sectRef?: any): (string)[];
55
+ public getSelectedRowIds(sectRef?: any): (string)[]|null;
52
56
 
53
57
  public getSelectedRowCount(sectRef?: any): number;
54
58