@refinitiv-ui/efx-grid 6.0.4 → 6.0.6

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 (277) hide show
  1. package/lib/column-dragging/es6/ColumnDragging.d.ts +13 -11
  2. package/lib/column-dragging/es6/ColumnDragging.js +21 -15
  3. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +1 -1
  4. package/lib/column-format-dialog/lib/column-format-dialog.js +3 -4
  5. package/lib/column-format-dialog/lib/preview-table.js +3 -4
  6. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +2 -2
  7. package/lib/column-selection-dialog/lib/column-selection-dialog.js +23 -7
  8. package/lib/core/dist/core.css +1 -1
  9. package/lib/core/dist/core.js +392 -230
  10. package/lib/core/dist/core.min.js +1 -1
  11. package/lib/core/es6/data/ColumnStats.d.ts +3 -3
  12. package/lib/core/es6/data/DataCache.d.ts +9 -9
  13. package/lib/core/es6/data/DataTable.d.ts +28 -28
  14. package/lib/core/es6/data/DataTable.js +33 -10
  15. package/lib/core/es6/data/DataView.d.ts +62 -62
  16. package/lib/core/es6/data/DataView.js +42 -22
  17. package/lib/core/es6/data/Segment.d.ts +4 -4
  18. package/lib/core/es6/data/SegmentCollection.d.ts +7 -7
  19. package/lib/core/es6/data/WrappedView.d.ts +62 -62
  20. package/lib/core/es6/grid/Core.d.ts +97 -95
  21. package/lib/core/es6/grid/Core.js +180 -26
  22. package/lib/core/es6/grid/ILayoutGrid.d.ts +20 -20
  23. package/lib/core/es6/grid/ILayoutGrid.js +2 -1
  24. package/lib/core/es6/grid/LayoutGrid.d.ts +2 -2
  25. package/lib/core/es6/grid/LayoutGrid.js +18 -10
  26. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +2 -2
  27. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +14 -3
  28. package/lib/core/es6/grid/components/Cell.d.ts +6 -6
  29. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +2 -2
  30. package/lib/core/es6/grid/components/CellSpans.d.ts +2 -2
  31. package/lib/core/es6/grid/components/Column.d.ts +2 -2
  32. package/lib/core/es6/grid/components/ElementWrapper.d.ts +19 -19
  33. package/lib/core/es6/grid/components/Scrollbar.d.ts +11 -9
  34. package/lib/core/es6/grid/components/Scrollbar.js +13 -0
  35. package/lib/core/es6/grid/components/StretchedCells.js +12 -2
  36. package/lib/core/es6/grid/event/EventDispatcher.d.ts +3 -3
  37. package/lib/core/es6/grid/event/EventListeners.d.ts +5 -5
  38. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +45 -44
  39. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +62 -65
  40. package/lib/core/es6/grid/util/Conflator.d.ts +4 -4
  41. package/lib/core/es6/grid/util/HttpRequest.d.ts +3 -3
  42. package/lib/core/es6/grid/util/PercentBar.d.ts +8 -8
  43. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +8 -8
  44. package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
  45. package/lib/core/es6/grid/util/RangeBar.js +1 -1
  46. package/lib/core/es6/grid/util/Reverter.d.ts +1 -1
  47. package/lib/core/es6/grid/util/SectionSettings.d.ts +13 -13
  48. package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
  49. package/lib/core/es6/grid/util/TrackLayout.d.ts +9 -9
  50. package/lib/core/es6/grid/util/Virtualizer.d.ts +3 -3
  51. package/lib/core/es6/grid/util/util.d.ts +6 -4
  52. package/lib/core/es6/grid/util/util.js +16 -91
  53. package/lib/core/es6/tr-grid-theme.js +1 -1
  54. package/lib/filter-dialog/lib/checkbox-list.d.ts +1 -1
  55. package/lib/filter-dialog/lib/filter-dialog.d.ts +1 -1
  56. package/lib/filter-dialog/lib/filter-dialog.js +27 -9
  57. package/lib/filter-dialog/themes/base-checkbox.less +0 -1
  58. package/lib/filter-dialog/themes/base.less +1 -1
  59. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
  60. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
  61. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
  62. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
  63. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
  64. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
  65. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
  66. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
  67. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
  68. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
  69. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
  70. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
  71. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
  72. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
  73. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
  74. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
  75. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
  76. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
  77. package/lib/grid/index.js +1 -1
  78. package/lib/grid/lib/efx-grid.js +7 -44
  79. package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
  80. package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
  81. package/lib/grid/themes/halo/efx-grid.less +5 -5
  82. package/lib/grid/themes/halo/light/efx-grid.js +1 -1
  83. package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
  84. package/lib/row-segmenting/es6/RowSegmenting.d.ts +30 -24
  85. package/lib/row-segmenting/es6/RowSegmenting.js +122 -21
  86. package/lib/rt-grid/dist/rt-grid.js +1354 -435
  87. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  88. package/lib/rt-grid/es6/ColumnDefinition.d.ts +46 -42
  89. package/lib/rt-grid/es6/ColumnDefinition.js +31 -1
  90. package/lib/rt-grid/es6/DataConnector.d.ts +6 -4
  91. package/lib/rt-grid/es6/DataConnector.js +8 -0
  92. package/lib/rt-grid/es6/FieldDefinition.d.ts +2 -2
  93. package/lib/rt-grid/es6/FieldDefinition.js +12 -5
  94. package/lib/rt-grid/es6/Grid.d.ts +106 -91
  95. package/lib/rt-grid/es6/Grid.js +151 -106
  96. package/lib/rt-grid/es6/ReferenceCounter.d.ts +5 -5
  97. package/lib/rt-grid/es6/RowDefSorter.d.ts +2 -2
  98. package/lib/rt-grid/es6/RowDefinition.d.ts +22 -22
  99. package/lib/rt-grid/es6/RowDefinition.js +12 -5
  100. package/lib/rt-grid/es6/SnapshotFiller.d.ts +5 -2
  101. package/lib/rt-grid/es6/SnapshotFiller.js +121 -15
  102. package/lib/rt-grid/es6/StyleLoader.d.ts +1 -1
  103. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +11 -11
  104. package/lib/tr-grid-cell-selection/es6/CellSelection.js +20 -35
  105. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +18 -16
  106. package/lib/tr-grid-checkbox/es6/Checkbox.js +1 -0
  107. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +29 -27
  108. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +1 -0
  109. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +28 -14
  110. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +556 -11
  111. package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +2 -2
  112. package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1 -0
  113. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +2 -3
  114. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +15 -13
  115. package/lib/tr-grid-column-stack/es6/ColumnStack.js +96 -72
  116. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +14 -4
  117. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +314 -114
  118. package/lib/tr-grid-content-wrap/es6/ContentWrap.js +1 -6
  119. package/lib/tr-grid-contextmenu/es6/ContextMenu.js +3 -3
  120. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +2 -2
  121. package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +2 -2
  122. package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +2 -1
  123. package/lib/tr-grid-heat-map/es6/HeatMap.js +6 -9
  124. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +5 -2
  125. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +311 -71
  126. package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +1 -1
  127. package/lib/tr-grid-percent-bar/es6/PercentBar.js +8 -11
  128. package/lib/tr-grid-printer/es6/SectionWriter.js +8 -0
  129. package/lib/tr-grid-range-bar/es6/RangeBar.js +3 -10
  130. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +6 -0
  131. package/lib/tr-grid-row-dragging/es6/RowDragging.js +56 -23
  132. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +4 -3
  133. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +57 -13
  134. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1 -1
  135. package/lib/tr-grid-row-selection/es6/RowSelection.js +16 -13
  136. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +0 -2
  137. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +1 -40
  138. package/lib/tr-grid-util/es6/CellPainter.d.ts +30 -30
  139. package/lib/tr-grid-util/es6/CellPainter.js +9 -8
  140. package/lib/tr-grid-util/es6/Conflator.d.ts +4 -4
  141. package/lib/tr-grid-util/es6/CoralItems.d.ts +1 -1
  142. package/lib/tr-grid-util/es6/DateTime.d.ts +10 -10
  143. package/lib/tr-grid-util/es6/Deferred.d.ts +3 -1
  144. package/lib/tr-grid-util/es6/Deferred.js +11 -1
  145. package/lib/tr-grid-util/es6/Delay.d.ts +2 -2
  146. package/lib/tr-grid-util/es6/Dom.d.ts +10 -10
  147. package/lib/tr-grid-util/es6/Dom.js +14 -10
  148. package/lib/tr-grid-util/es6/DragUI.js +5 -2
  149. package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -2
  150. package/lib/tr-grid-util/es6/ElementObserver.js +6 -3
  151. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +4 -4
  152. package/lib/tr-grid-util/es6/ElfDate.d.ts +5 -5
  153. package/lib/tr-grid-util/es6/ElfDate.js +1 -0
  154. package/lib/tr-grid-util/es6/ElfUtil.d.ts +13 -4
  155. package/lib/tr-grid-util/es6/ElfUtil.js +178 -26
  156. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +5 -5
  157. package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +2 -2
  158. package/lib/tr-grid-util/es6/ExpanderIcon.js +1 -1
  159. package/lib/tr-grid-util/es6/Ext.d.ts +1 -1
  160. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +12 -12
  161. package/lib/tr-grid-util/es6/FieldFormatter.js +1 -1
  162. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +13 -13
  163. package/lib/tr-grid-util/es6/FilterBuilder.js +15 -8
  164. package/lib/tr-grid-util/es6/FilterOperators.d.ts +22 -22
  165. package/lib/tr-grid-util/es6/FilterOperators.js +3 -3
  166. package/lib/tr-grid-util/es6/GridPlugin.d.ts +10 -10
  167. package/lib/tr-grid-util/es6/GridPlugin.js +20 -0
  168. package/lib/tr-grid-util/es6/Icon.d.ts +3 -3
  169. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +8 -8
  170. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +6 -6
  171. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +19 -19
  172. package/lib/tr-grid-util/es6/NumberFormatter.js +1 -1
  173. package/lib/tr-grid-util/es6/PercentBar.d.ts +19 -19
  174. package/lib/tr-grid-util/es6/Perf.d.ts +4 -4
  175. package/lib/tr-grid-util/es6/Popup.d.ts +36 -33
  176. package/lib/tr-grid-util/es6/Popup.js +19 -1
  177. package/lib/tr-grid-util/es6/RangeBar.d.ts +5 -5
  178. package/lib/tr-grid-util/es6/RequestQueue.d.ts +4 -4
  179. package/lib/tr-grid-util/es6/RowPainter.d.ts +37 -4
  180. package/lib/tr-grid-util/es6/RowPainter.js +199 -76
  181. package/lib/tr-grid-util/es6/SubTable.d.ts +14 -14
  182. package/lib/tr-grid-util/es6/Table.d.ts +25 -25
  183. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +1 -1
  184. package/lib/tr-grid-util/es6/Timer.d.ts +1 -1
  185. package/lib/tr-grid-util/es6/TouchProxy.d.ts +9 -9
  186. package/lib/tr-grid-util/es6/Util.d.ts +12 -12
  187. package/lib/tr-grid-util/es6/formula/ADCService.d.ts +1 -1
  188. package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +1 -1
  189. package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +1 -1
  190. package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +1 -1
  191. package/lib/tr-grid-util/es6/formula/Engine.d.ts +9 -9
  192. package/lib/tr-grid-util/es6/formula/Formula.d.ts +4 -4
  193. package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +1 -1
  194. package/lib/tr-grid-util/es6/formula/Realtime.d.ts +3 -3
  195. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +1 -1
  196. package/lib/tr-grid-util/es6/formula/TSIService.d.ts +1 -1
  197. package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +1 -1
  198. package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +1 -1
  199. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +1 -1
  200. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +34 -34
  201. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +1 -1
  202. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +4 -4
  203. package/lib/tr-grid-util/es6/jet/MockJET.js +12 -4
  204. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +9 -9
  205. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +17 -9
  206. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +84 -24
  207. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +42 -2
  208. package/lib/tr-grid-util/es6/jet/MockRTK.js +55 -16
  209. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +2 -2
  210. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +99 -1
  211. package/lib/types/es6/Checkbox.d.ts +18 -16
  212. package/lib/types/es6/ColumnFormatting.d.ts +29 -27
  213. package/lib/types/es6/ColumnGrouping.d.ts +28 -14
  214. package/lib/types/es6/ColumnResizing.d.ts +2 -2
  215. package/lib/types/es6/ColumnStack.d.ts +15 -13
  216. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +4 -2
  217. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +0 -1
  218. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +1 -1
  219. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +1 -1
  220. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +1 -5
  221. package/lib/types/es6/CompositeGrid/Plugin.d.ts +3 -1
  222. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
  223. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +2 -1
  224. package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +1 -1
  225. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +0 -1
  226. package/lib/types/es6/ConditionalColoring.d.ts +14 -4
  227. package/lib/types/es6/Core/data/ColumnStats.d.ts +3 -3
  228. package/lib/types/es6/Core/data/DataCache.d.ts +9 -9
  229. package/lib/types/es6/Core/data/DataTable.d.ts +28 -28
  230. package/lib/types/es6/Core/data/DataView.d.ts +62 -62
  231. package/lib/types/es6/Core/data/Segment.d.ts +4 -4
  232. package/lib/types/es6/Core/data/SegmentCollection.d.ts +7 -7
  233. package/lib/types/es6/Core/data/WrappedView.d.ts +62 -62
  234. package/lib/types/es6/Core/grid/Core.d.ts +97 -95
  235. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +20 -20
  236. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +2 -2
  237. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +2 -2
  238. package/lib/types/es6/Core/grid/components/Cell.d.ts +6 -6
  239. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +2 -2
  240. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +2 -2
  241. package/lib/types/es6/Core/grid/components/Column.d.ts +2 -2
  242. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +19 -19
  243. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +11 -9
  244. package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +3 -3
  245. package/lib/types/es6/Core/grid/event/EventListeners.d.ts +5 -5
  246. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +45 -44
  247. package/lib/types/es6/Core/grid/util/Conflator.d.ts +4 -4
  248. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +3 -3
  249. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +8 -8
  250. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +8 -8
  251. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
  252. package/lib/types/es6/Core/grid/util/Reverter.d.ts +1 -1
  253. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +13 -13
  254. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
  255. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +9 -9
  256. package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +3 -3
  257. package/lib/types/es6/Core/grid/util/util.d.ts +6 -4
  258. package/lib/types/es6/HeatMap.d.ts +2 -1
  259. package/lib/types/es6/InCellEditing.d.ts +5 -2
  260. package/lib/types/es6/MenuEventAPI.d.ts +2 -2
  261. package/lib/types/es6/MenuItem.d.ts +2 -2
  262. package/lib/types/es6/PercentBar.d.ts +1 -1
  263. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +46 -42
  264. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +6 -4
  265. package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +2 -2
  266. package/lib/types/es6/RealtimeGrid/Grid.d.ts +104 -89
  267. package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +5 -5
  268. package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +2 -2
  269. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +22 -22
  270. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +5 -2
  271. package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +1 -1
  272. package/lib/types/es6/RowColoring.d.ts +0 -2
  273. package/lib/types/es6/RowDragging.d.ts +6 -0
  274. package/lib/types/es6/RowFiltering.d.ts +4 -3
  275. package/lib/types/es6/RowSegmenting.d.ts +30 -24
  276. package/lib/versions.json +26 -26
  277. package/package.json +2 -2
@@ -10,18 +10,18 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
10
10
  declare namespace ColumnStackPlugin {
11
11
 
12
12
  type Options = {
13
- fields: (string)[]
13
+ fields: (string)[]|null
14
14
  };
15
15
 
16
16
  type ColumnOptions = {
17
- stackId?: string,
18
- stack?: (string|StackOptions)
17
+ stackId?: string|null,
18
+ stack?: (string|StackOptions)|null
19
19
  };
20
20
 
21
21
  type StackOptions = {
22
22
  id: string,
23
- spreading?: boolean,
24
- collapsed?: boolean
23
+ spreading?: boolean|null,
24
+ collapsed?: boolean|null
25
25
  };
26
26
 
27
27
  }
@@ -40,13 +40,13 @@ declare class ColumnStackPlugin extends GridPlugin {
40
40
 
41
41
  public getMemberIndices(colIndex: number): (number)[]|null;
42
42
 
43
- public collapseGroup(colIndex: number, collapsed?: boolean): (number)[]|null;
43
+ public collapseGroup(colIndex: number, collapsed?: boolean|null): (number)[]|null;
44
44
 
45
45
  public expandGroup(colIndex: number): (number)[]|null;
46
46
 
47
- public isColumnStackable(colIndices: (number)[]): boolean;
47
+ public isColumnStackable(colIndices: (number)[]|null): boolean;
48
48
 
49
- public isColumnStacked(colIndices?: (number)[]): boolean;
49
+ public isColumnStacked(colIndices?: (number)[]|null): boolean;
50
50
 
51
51
  public isInactiveStackedColumn(colIndex: number): boolean;
52
52
 
@@ -58,21 +58,23 @@ declare class ColumnStackPlugin extends GridPlugin {
58
58
 
59
59
  public isColumnInCollection(colIndex: number): boolean;
60
60
 
61
+ public isInCollection(colIndex: number): boolean;
62
+
61
63
  public isColumnCollapsed(colIndex: number): boolean;
62
64
 
63
65
  public isColumnActive(colIndex: number): boolean;
64
66
 
65
67
  public getStackId(colIndex: number): string;
66
68
 
67
- public stackColumns(colRefs?: (number|string)[], stackId?: string, options?: any): boolean;
69
+ public stackColumns(colRefs?: (number|string)[]|null, stackId?: string|null, options?: any): boolean;
68
70
 
69
- public setStack(colRefs: (number|string)[]): boolean;
71
+ public setStack(colRefs?: (number|string)[]|null): boolean;
70
72
 
71
- public unstackColumns(colIndices?: (number)[]): boolean;
73
+ public unstackColumns(colIndices?: (number)[]|null): boolean;
72
74
 
73
- public removeAllStacks(enableUpdateUI?: boolean): boolean;
75
+ public removeAllStacks(enableUpdateUI?: boolean|null): boolean;
74
76
 
75
- public swapColumn(colRef: number|Event, swappingIndex: number): boolean;
77
+ public swapColumn(colRef: number|Event|null, swappingIndex: number): boolean;
76
78
 
77
79
  }
78
80
 
@@ -55,6 +55,11 @@ ColumnStackPlugin.prototype._pendingStacks;
55
55
  * @private
56
56
  */
57
57
  ColumnStackPlugin.prototype._columnStack = null;
58
+ /** @type {boolean}
59
+ * @private
60
+ */
61
+ ColumnStackPlugin.prototype._updating = false;
62
+
58
63
 
59
64
  /** @type {number}
60
65
  * @private
@@ -128,6 +133,7 @@ ColumnStackPlugin.prototype.unload = function (host) {
128
133
 
129
134
  if(this._hosts.length <= 0) {
130
135
  this._conflator.reset();
136
+ this._stacks = {};
131
137
  }
132
138
  this._dispose();
133
139
  };
@@ -396,84 +402,103 @@ ColumnStackPlugin.prototype._isIconAvailable = function() {
396
402
  (ElfUtil.hasTheme("elf-theme-solar") ||
397
403
  ElfUtil.hasTheme("elf-theme-luna"));
398
404
  };
405
+ /** @private
406
+ * @param {number} colIndex
407
+ * @param {Object} colData
408
+ */
409
+ ColumnStackPlugin.prototype._updateIcon = function(colIndex, colData) {
410
+ var stackRefs = (colData) ? colData.stackRefs : null;
411
+ var spreading = (colData) ? colData.spreading : false;
412
+ var gridCount = this._hosts.length;
413
+ for(var g = 0; g < gridCount; ++g) {
414
+ var host = this._hosts[g];
415
+ var tSect = host.getSection("title");
416
+ var rowCount = tSect.getRowCount();
417
+ var cell = tSect.getCell(colIndex, rowCount - 1, true);
418
+ if(!cell) { continue; }
419
+
420
+ var stackIcon = cell._stackIcon;
421
+ if(stackRefs) {
422
+ if(!stackIcon && this.isActiveStackedColumn(colIndex)) {
423
+ if(spreading) {
424
+ cell.addClass("grouping");
425
+ if(this._expandIconName) {
426
+ if(colData.collapsed) {
427
+ stackIcon = Icon.create(this._expandIconName);
428
+ } else {
429
+ stackIcon = Icon.create(this._collapseIconName);
430
+ }
431
+ } else {
432
+ if(colData.collapsed) {
433
+ stackIcon = Dom.text(">");
434
+ } else {
435
+ stackIcon = Dom.text("<");
436
+ }
437
+ }
438
+ } else {
439
+ cell.addClass("stacking");
440
+ if(this._stackIconName) {
441
+ stackIcon = Icon.create(this._stackIconName);
442
+ } else {
443
+ stackIcon = Dom.text("\u2261");
444
+ stackIcon.style.fontSize = "1.3em";
445
+ }
446
+ }
447
+ stackIcon.className = "stack-icon";
448
+ stackIcon.addEventListener("click", this._onStackButtonClicked, false);
449
+ stackIcon.addEventListener("dblclick", preventDefault, false);
450
+ stackIcon.addEventListener("mousedown", preventDefault, false);
451
+ stackIcon.addEventListener("keydown", preventDefault, false);
452
+
453
+ cell.insertFloatingIcon(stackIcon, 20);
454
+ cell._stackIcon = stackIcon;
455
+
456
+ this._dispatch("iconCreated", {"icon": stackIcon, "colIndex": colIndex, "grid": host, "cell": cell});
457
+ } else if(stackIcon && this.isInactiveStackedColumn(colIndex)) {
458
+ cell.removeFloatingIcon(cell._stackIcon);
459
+ cell._stackIcon = null;
460
+ }
461
+ } else if(stackIcon) {
462
+ cell.removeFloatingIcon(cell._stackIcon);
463
+ cell._stackIcon = null;
464
+
465
+ // Do not know the previous stacking mode so it needs to remove all the classes here.
466
+ cell.removeClass("grouping");
467
+ cell.removeClass("stacking");
468
+ }
469
+ }
470
+ };
399
471
  /** @private */
400
472
  ColumnStackPlugin.prototype._updateUI = function() {
473
+ if(this._updating) { // Avoid infinite loop
474
+ return;
475
+ }
401
476
  if(this._conflator.conflate()) {
402
477
  return;
403
478
  }
404
479
 
480
+ this._updating = true;
405
481
  var colCount = this._getColumnCount();
406
482
  var gridCount = this._hosts.length;
483
+ var colData, spreading;
407
484
  for(var c = 0; c < colCount; ++c) {
408
- var colData = this._getColumnStackOptions(c);
409
- var stackRefs = (colData) ? colData.stackRefs : null;
410
- var spreading = (colData) ? colData.spreading : false;
485
+ colData = this._getColumnStackOptions(c);
486
+ spreading = (colData) ? colData.spreading : false;
411
487
  for(var g = 0; g < gridCount; ++g) {
412
488
  var host = this._hosts[g];
413
489
  host.enableColumnClass(c, "grouped", spreading === true);
414
- var tSect = host.getSection("title");
415
- var rowCount = tSect.getRowCount();
416
- var cell = tSect.getCell(c, rowCount - 1, true);
417
- if(!cell) { continue; }
418
-
419
- var stackIcon = cell._stackIcon;
420
- if(stackRefs) {
421
- if(!stackIcon && this.isActiveStackedColumn(c)) {
422
- if(spreading) {
423
- cell.addClass("grouping");
424
- if(this._expandIconName) {
425
- if(colData.collapsed) {
426
- stackIcon = Icon.create(this._expandIconName);
427
- } else {
428
- stackIcon = Icon.create(this._collapseIconName);
429
- }
430
- } else {
431
- if(colData.collapsed) {
432
- stackIcon = Dom.text(">");
433
- } else {
434
- stackIcon = Dom.text("<");
435
- }
436
- }
437
- } else {
438
- cell.addClass("stacking");
439
- if(this._stackIconName) {
440
- stackIcon = Icon.create(this._stackIconName);
441
- } else {
442
- stackIcon = Dom.text("\u2261");
443
- stackIcon.style.fontSize = "1.3em";
444
- }
445
- }
446
- stackIcon.className = "stack-icon";
447
- stackIcon.addEventListener("click", this._onStackButtonClicked, false);
448
- stackIcon.addEventListener("dblclick", preventDefault, false);
449
- stackIcon.addEventListener("mousedown", preventDefault, false);
450
- stackIcon.addEventListener("keydown", preventDefault, false);
451
-
452
- cell.insertFloatingIcon(stackIcon, 20);
453
- cell._stackIcon = stackIcon;
454
-
455
- this._dispatch("iconCreated", {"icon": stackIcon, "colIndex": c, "grid": host, "cell": cell});
456
- } else if(stackIcon && this.isInactiveStackedColumn(c)) {
457
- cell.removeFloatingIcon(cell._stackIcon);
458
- cell._stackIcon = null;
459
- }
460
- } else if(stackIcon) {
461
- cell.removeFloatingIcon(cell._stackIcon);
462
- cell._stackIcon = null;
463
-
464
- // Do not know the previous stacking mode so it needs to remove all the classes here.
465
- cell.removeClass("grouping");
466
- cell.removeClass("stacking");
467
- }
468
490
  }
491
+
492
+ this._updateIcon(c, colData);
469
493
  if(colData) {
470
- if(spreading) {
494
+ if(colData.spreading) {
471
495
  this._collapseMember(c, colData.collapsed);
472
496
  } else {
473
497
  this._setColumnVisibility(c, this.isActiveStackedColumn(c)); // a little slow
474
498
  }
475
499
  }
476
500
  }
501
+ this._updating = false;
477
502
  };
478
503
  /** @private
479
504
  * @param {number} colIndex
@@ -692,7 +717,7 @@ ColumnStackPlugin.prototype.isColumnInCollection = function(colIndex) {
692
717
  };
693
718
  /** Alias of isColumnInCollection
694
719
  * @public
695
- * @type {function}
720
+ * @function
696
721
  * @param {number} colIndex
697
722
  * @return {boolean}
698
723
  */
@@ -826,12 +851,12 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options) {
826
851
  };
827
852
 
828
853
  /** @public
829
- * @description Remove all stacking from the grid and replace it with a new one.
830
- * The stacked fields are kept persistently in Grid.
831
- * While adding columns Grid will try to restore stacking
832
- * if there are at least 2 visible columns which are corresponding to the kept fields.
833
- * @param {Array.<number|string>} colRefs Names of fields or column indices
834
- * @return {boolean} true if the stack has been modified
854
+ * @description Replace all of the stacking in the Grid with a new one.
855
+ * Grid stores the stacked fields indefinitely.
856
+ * When adding columns, Grid will attempt to restore stacking
857
+ * if there are at least two visible columns that match to the retained fields.
858
+ * @param {Array.<number|string>=} colRefs Field names or column indices
859
+ * @return {boolean} If the stack has been updated, return true.
835
860
  */
836
861
  ColumnStackPlugin.prototype.setStack = function(colRefs) {
837
862
  // Keep state
@@ -1074,11 +1099,12 @@ ColumnStackPlugin.prototype.swapColumn = function(colRef, swappingIndex) {
1074
1099
  colData.stackRefs.unshift(newActiveColumn); // Move data to front
1075
1100
  var prevActiveColumnIndex = this._getColumnIndex(colData.activeColumn);
1076
1101
  var newActiveColumnIndex = this._getColumnIndex(newActiveColumn);
1077
- this._moveColumn(newActiveColumnIndex, prevActiveColumnIndex); // Move UI to front
1078
-
1079
- this._setColumnVisibility(prevActiveColumnIndex, false); // Hide current active column
1080
1102
  colData.activeColumn = newActiveColumn; // Change active column
1103
+
1081
1104
  this._setColumnVisibility(newActiveColumnIndex, true);
1105
+ this._setColumnVisibility(prevActiveColumnIndex, false); // Hide current active column
1106
+
1107
+ this._moveColumn(newActiveColumnIndex, prevActiveColumnIndex); // Move UI to front
1082
1108
 
1083
1109
  var csp = this._getPlugin("ColumnSelectionPlugin");
1084
1110
  if(csp && csp.isEnabled()) {
@@ -1089,10 +1115,8 @@ ColumnStackPlugin.prototype.swapColumn = function(colRef, swappingIndex) {
1089
1115
  cfp["refresh"]();
1090
1116
  }
1091
1117
 
1092
- this._updateUI();
1093
- // this._hosts.forEach(function(host){
1094
- // host.updateLayout();
1095
- // });
1118
+ colData = this._getColumnStackOptions(prevActiveColumnIndex);
1119
+ this._updateIcon(prevActiveColumnIndex, colData);
1096
1120
 
1097
1121
  return true;
1098
1122
  };
@@ -3,6 +3,7 @@ import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
3
3
  import { extendObject } from '../../tr-grid-util/es6/Util.js';
4
4
  import {CellPainter} from '../../tr-grid-util/es6/CellPainter.js';
5
5
  import {FilterBuilder} from '../../tr-grid-util/es6/FilterBuilder.js';
6
+ import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
6
7
 
7
8
  declare namespace ConditionalColoringPlugin {
8
9
 
@@ -14,6 +15,13 @@ declare namespace ConditionalColoringPlugin {
14
15
  field?: string
15
16
  };
16
17
 
18
+ type ConditionalColoringOptions = {
19
+ conditions?: (ConditionalColoringPlugin.Condition)[],
20
+ colorText?: (string|boolean),
21
+ tickColor?: (string|boolean),
22
+ field?: string
23
+ };
24
+
17
25
  type Condition = {
18
26
  expression?: (string|((...params: any[]) => any)),
19
27
  backgroundColor?: string,
@@ -46,15 +54,17 @@ declare class ConditionalColoringPlugin extends GridPlugin {
46
54
 
47
55
  public getConfigObject(gridOptions?: any): any;
48
56
 
57
+ public getColumnColoring(colIndex: number, options?: any): ConditionalColoringPlugin.ColumnOptions;
58
+
49
59
  public setColumnColoring(colIndex: number, columnOptions?: (ConditionalColoringPlugin.ColumnOptions|null)): void;
50
60
 
51
- public setColumnBlinking(colIndex: number, blinkingOptions?: (boolean|ConditionalColoringPlugin.Blinking), field?: string): void;
61
+ public setConditionalColoring(colIndex: number, coloringOptions?: (ConditionalColoringPlugin.ConditionalColoringOptions|null)): void;
52
62
 
53
- public getColumnColoring(colIndex: number, out_obj?: any): any;
63
+ public setColumnBlinking(colIndex: number, blinkingOptions?: (boolean|ConditionalColoringPlugin.Blinking), field?: string): void;
54
64
 
55
65
  public blinkRow(rowIndex: number, blinkSignal: number, host?: any): void;
56
66
 
57
- public getColumnPainter(colIndex: number): CellPainter;
67
+ public getColumnPainter(colIndex: number): CellPainter|null;
58
68
 
59
69
  public applyColor(colIndex: number, cell: any, rowData?: any): void;
60
70
 
@@ -62,7 +72,7 @@ declare class ConditionalColoringPlugin extends GridPlugin {
62
72
 
63
73
  public static setThemeColors(colors: { [key: string]: string }): void;
64
74
 
65
- public reloadThemeColors(): Promise<any>;
75
+ public reloadThemeColors(): Promise<any>|null;
66
76
 
67
77
  }
68
78