@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
@@ -1,8 +1,9 @@
1
1
  import { Ext } from "../../tr-grid-util/es6/Ext.js";
2
- import { cloneObject, injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
2
+ import { cloneObject } from "../../tr-grid-util/es6/Util.js";
3
3
  import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
4
4
  import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
5
5
  import Dom from "../../tr-grid-util/es6/Dom.js";
6
+ import { DragUI } from "../../tr-grid-util/es6/DragUI.js";
6
7
 
7
8
  /** @typedef {Object} RowDraggingPlugin~Options
8
9
  * @description Available options describing `rowDragging` object specified in grid's option
@@ -44,6 +45,15 @@ import Dom from "../../tr-grid-util/es6/Dom.js";
44
45
  * @type {Object}
45
46
  */
46
47
 
48
+
49
+ /** @private
50
+ * @param {Object} pos
51
+ * @return {boolean}
52
+ */
53
+ var _isInContentSection = function (pos) {
54
+ return (pos && pos["sectionType"] === "content") ? true : false;
55
+ };
56
+
47
57
  /** @constructor
48
58
  * @param {RowDraggingPlugin.Options=} options
49
59
  * @extends {GridPlugin}
@@ -58,7 +68,6 @@ var RowDraggingPlugin = function (options) {
58
68
  t._onMouseDown = t._onMouseDown.bind(t);
59
69
 
60
70
  t._onDragPulse = t._onDragPulse.bind(t);
61
- t._onContentScrolled = t._onContentScrolled.bind(t);
62
71
 
63
72
  t._onDragStart = t._onDragStart.bind(t);
64
73
  t._onMouseMove = t._onMouseMove.bind(t);
@@ -67,9 +76,15 @@ var RowDraggingPlugin = function (options) {
67
76
 
68
77
  t._hosts = [];
69
78
 
70
- t._guideline = document.createElement("svg"); // TODO: Change from svg to normal div
79
+ t._guideline = document.createElement("div"); // Test IE mouse event, guildline close mouse event
71
80
  t._guideline.className = "tr-row-guideline";
72
81
 
82
+ t._dragBox = document.createElement("div");
83
+ t._dragBox.className = "drag-box-disabled";
84
+
85
+ t._dragBoxIcon = document.createElement("ef-icon");
86
+ t._dragBoxIcon.className = "drag-box-icon";
87
+
73
88
  t.config({ "rowDragging": options });
74
89
  };
75
90
  Ext.inherits(RowDraggingPlugin, GridPlugin);
@@ -87,6 +102,14 @@ RowDraggingPlugin._stylePromise = null; // Static variable
87
102
  * @private
88
103
  */
89
104
  RowDraggingPlugin.prototype._guideline = null;
105
+ /** @type {Element}
106
+ * @private
107
+ */
108
+ RowDraggingPlugin.prototype._dragBox = null;
109
+ /** @type {Element}
110
+ * @private
111
+ */
112
+ RowDraggingPlugin.prototype._dragBoxIcon = null;
90
113
  /** For disabled UI
91
114
  * @type {boolean}
92
115
  * @private
@@ -163,10 +186,14 @@ RowDraggingPlugin.prototype._dataTransfer = true;
163
186
  * @private
164
187
  */
165
188
  RowDraggingPlugin.prototype._autoScroll = true;
166
-
189
+ /** @type {Object}
190
+ * @private
191
+ */
192
+ RowDraggingPlugin.prototype._dragUI = null;
167
193
 
168
194
  /** Prevent built-in config
169
195
  * @public
196
+ * @ignore
170
197
  * @param {string} optionName
171
198
  * @param {*} optionValue
172
199
  * @return {*}
@@ -208,15 +235,21 @@ RowDraggingPlugin.prototype.initialize = function (host, options) {
208
235
  host.setAttribute("draggable", "true");
209
236
  host.listen("dragstart", this.startDrag);
210
237
  }
211
- // host.listen("mouseover", this._onContentScrolled);
238
+
212
239
  host.listen("mousedown", this._onMouseDown);
213
240
  host.listen("touchstart", this._onMouseDown);
214
241
 
215
- if(RowDraggingPlugin._stylePromise) {
216
- RowDraggingPlugin._applyThemeColor(host);
242
+ this._dragUI = new DragUI({
243
+ dragBox: this._dragBox,
244
+ dragBoxIcon: this._dragBoxIcon
245
+ });
246
+
247
+ // Share dragging styles
248
+ if(DragUI.stylePromise) {
249
+ DragUI.applyThemeColor(host);
217
250
  } else {
218
- RowDraggingPlugin._stylePromise = ElfUtil.getThemeColors();
219
- RowDraggingPlugin._stylePromise.then(this._onThemeLoaded);
251
+ DragUI.stylePromise = ElfUtil.getThemeColors();
252
+ DragUI.stylePromise.then(this._onThemeLoaded);
220
253
  }
221
254
 
222
255
  // In case of lazy loading
@@ -231,7 +264,6 @@ RowDraggingPlugin.prototype.unload = function (host) {
231
264
 
232
265
  // host.removeAttribute("draggable");
233
266
  host.unlisten("dragstart", this.startDrag);
234
- // host.unlisten("mouseover", this._onContentScrolled);
235
267
  host.unlisten("mousedown", this._onMouseDown);
236
268
  host.unlisten("touchstart", this._onMouseDown);
237
269
 
@@ -246,56 +278,9 @@ RowDraggingPlugin.prototype.unload = function (host) {
246
278
  * @param {Object} colors
247
279
  */
248
280
  RowDraggingPlugin.prototype._onThemeLoaded = function(colors) {
249
- if(!RowDraggingPlugin._styles) {
250
- var styles = [ // Main Styles without theme
251
- ".tr-row-guideline", [
252
- "position: absolute;",
253
- "left: 0;",
254
- "top: 0;",
255
- "pointer-events: none;",
256
- "z-index: 1;",
257
- "text-align: center;",
258
- "border-top-width: 3px;",
259
- "border-top-style: solid;"
260
- ]
261
- ];
262
- var guidelineColor = "#ff9933";
263
- var ElfVersion = ElfUtil.getElfVersion();
264
- if(colors.primary) {
265
- guidelineColor = colors.primary;
266
- }
267
- guidelineColor += ";";
268
-
269
- styles.push(".tr-row-guideline", [
270
- "border-top-color: " + guidelineColor,
271
- "color: " + guidelineColor,
272
- "background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));"
273
- ]);
274
-
275
- if(ElfVersion < 3) { // Backward compatability
276
- styles.push(".pearl .tr-row-guideline, *[theme=pearl] .tr-row-guideline", [
277
- "border-top-color: #ee7600;",
278
- "color: #ee7600;",
279
- "background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));"
280
- ]);
281
- }
282
- RowDraggingPlugin._styles = prettifyCss(styles);
283
- }
284
-
281
+ this._dragUI.onThemeLoaded(colors); // TODO : onThemeLoaded should be static function like DragUI.applyThemeColor
285
282
  for(var i = this._hosts.length; --i >= 0;) {
286
- RowDraggingPlugin._applyThemeColor(this._hosts[i]);
287
- }
288
- };
289
- /** @private
290
- * @param {Object} grid core grid instance
291
- */
292
- RowDraggingPlugin._applyThemeColor = function(grid) {
293
- if(!grid || grid._rowDraggingStyles) {
294
- return;
295
- }
296
- if(RowDraggingPlugin._styles) {
297
- grid._rowDraggingStyles = true; // Prevent loading the same style twice
298
- injectCss(RowDraggingPlugin._styles, grid.getElement());
283
+ DragUI.applyThemeColor(this._hosts[i]);
299
284
  }
300
285
  };
301
286
 
@@ -312,6 +297,9 @@ RowDraggingPlugin.prototype.config = function (options) {
312
297
 
313
298
  if (typeof extOptions["dragBoxRenderer"] === "function") {
314
299
  this._dragBoxRenderer = extOptions["dragBoxRenderer"];
300
+ this._dragBox.className = "drag-box"; // set disable drag-box
301
+ } else {
302
+ this._dragBox.className = "drag-box-disabled"; // set disable drag-box
315
303
  }
316
304
 
317
305
  this._dragBoxEnabled = !!extOptions["dragBox"];
@@ -385,7 +373,7 @@ RowDraggingPlugin.prototype.startDrag = function (startRef) {
385
373
  pos = this._hitTest(target);
386
374
  }
387
375
 
388
- if (pos && pos["sectionType"] === "content") {
376
+ if (_isInContentSection(pos)) {
389
377
  this._clearCache();
390
378
  this._pos = pos;
391
379
  this._onDragStart(startRef);
@@ -491,7 +479,7 @@ RowDraggingPlugin.prototype._onDragStart = function (e) {
491
479
 
492
480
  if (this._dragBoxRenderer) { // For custom drag box rendering
493
481
  var arg = cloneObject(e); // TODO: Check if cloning is necessary
494
- arg.dragBox = this._guideline;
482
+ arg.dragBox = this._dragBox;
495
483
  arg.dataRow = this._getRowData(dv.getRowDataAt(rowIndex));
496
484
 
497
485
  if (this._legacyRowReorder) {
@@ -505,11 +493,8 @@ RowDraggingPlugin.prototype._onDragStart = function (e) {
505
493
  // TODO: Just update curser will not gonna work since cell is pointer-events: none;
506
494
  // we should do something to overwrite pointer-events first
507
495
  // then set cursor move will have an effect
508
- grid.getElement().style.cursor = "move";
496
+ grid.getElement().classList.add("mouse-dragging");
509
497
 
510
- // Initialize guideline
511
- this._guideline.style.lineHeight = this._guideline.style.height = "";
512
- this._updateGuideParent(); // Insert guideline to the document
513
498
  this._updateGuidePosition();
514
499
 
515
500
  if (this._autoScroll) {
@@ -546,12 +531,18 @@ RowDraggingPlugin.prototype._onMouseMove = function (e) {
546
531
 
547
532
  this._pos = this._hitTest(e); // A new object is created
548
533
 
549
- this._updateGuideParent();
534
+ this._updateGuidePosition(e);
535
+ this._pos.dragBox = this._dragBox; // assign dragBox for user determine valid target
550
536
 
551
537
  // Dispatch drag event to let user determine valid drop target using allowDrag (allowDrop) method
552
538
  this._dispatch("drag", this._pos);
553
-
554
- this._updateGuidePosition(e);
539
+ if(!this._disabled) {
540
+ e.dragBoxIcon = this._pos.dragBoxIcon; // access event object instread of element for prevent element persistence
541
+ var drop = this._dragUI.renderDragBox(e, this._startingGrid);
542
+ if(!drop) { // can not be drop or not allow to drop or insertion
543
+ this.cancelDrag();
544
+ }
545
+ }
555
546
  };
556
547
  /** @private
557
548
  * @param {Object} e
@@ -564,6 +555,7 @@ RowDraggingPlugin.prototype._onDragEnd = function (e) {
564
555
  Dom.preventDefault(e);
565
556
  }
566
557
  Dom.removeParent(this._guideline);
558
+ Dom.removeParent(this._dragBox);
567
559
 
568
560
  document.body.classList.remove("tr-dragging");
569
561
 
@@ -582,7 +574,7 @@ RowDraggingPlugin.prototype._onDragEnd = function (e) {
582
574
  }
583
575
 
584
576
  var srcGrid = this._startingGrid || this._hosts[0];
585
- srcGrid.getElement().style.cursor = "";
577
+ srcGrid.getElement().classList.remove("mouse-dragging");
586
578
 
587
579
  var destPos = this._pos; // This can be null
588
580
  if(!this._isDragCancelled()) {
@@ -591,7 +583,7 @@ RowDraggingPlugin.prototype._onDragEnd = function (e) {
591
583
  destPos["dropTarget"] = e ? e.target : null;
592
584
 
593
585
  if (!this.disabled) {
594
- if (this._dataTransfer && this._isInContentSection()) {
586
+ if (this._dataTransfer && _isInContentSection(this._pos)) {
595
587
  var destGrid = destPos["grid"] || srcGrid;
596
588
  var destRowIndex = destPos["rowIndex"];
597
589
 
@@ -620,11 +612,6 @@ RowDraggingPlugin.prototype._onDragEnd = function (e) {
620
612
  */
621
613
  RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGrid, destGrid, evtArg) {
622
614
  var destDv = destGrid.getDataSource();
623
- var destRowId = destDv.getRowId(destRowIndex);
624
-
625
- if(!destRowId) {
626
- return 0;
627
- }
628
615
 
629
616
  var srcRowIndices = null;
630
617
  var srcDv = srcGrid.getDataSource();
@@ -641,10 +628,16 @@ RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGr
641
628
  return 0;
642
629
  }
643
630
 
631
+
644
632
  var movedRowIds = null;
645
- if(srcGrid === destGrid) {
633
+ var destRowId = destDv.getRowId(destRowIndex);
634
+ if(srcGrid === destGrid) { // TODO: Support wrap mode
646
635
  movedRowIds = srcDv.moveRow(srcRowIndices, destRowIndex) || [];
647
636
  } else {
637
+ // TODO: Check if we support moving to last row for multi table
638
+ // if(!destRowId) {
639
+ // return 0;
640
+ // }
648
641
  movedRowIds = [];
649
642
  evtArg["destGrid"] = destGrid;
650
643
 
@@ -678,7 +671,7 @@ RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGr
678
671
  if(movedRowIds.length) {
679
672
  evtArg["originRowId"] = movedRowIds[0];
680
673
  evtArg["originRowIds"] = movedRowIds;
681
- evtArg["destinationRowId"] = destRowId;
674
+ evtArg["destinationRowId"] = destRowId; // Return empty string for the last row
682
675
 
683
676
  this._dispatch("dataMoved", evtArg);
684
677
  }
@@ -687,53 +680,54 @@ RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGr
687
680
  /** @private
688
681
  * @return {boolean}
689
682
  */
690
- RowDraggingPlugin.prototype._isInContentSection = function () {
691
- return (this._pos["sectionType"] === "content");
692
- };
693
- /** @private
694
- * @return {boolean}
695
- */
696
- RowDraggingPlugin.prototype._hasValidTarget = function () {
697
- return (this._pos && this._pos["invalidTarget"]) ? false : true;
698
- };
699
- /** @private
700
- * @return {boolean}
701
- */
702
683
  RowDraggingPlugin.prototype._isDragCancelled = function () {
703
684
  return (this._pos && this._pos["cancel"]) ? true : false;
704
685
  };
705
686
 
706
- /** @private */
707
- RowDraggingPlugin.prototype._updateGuideParent = function () {
708
- if (this._disabled) return;
709
-
710
- if (this._isInContentSection()) {
711
- var grid = this._pos["grid"] || null;
712
- var pn = this._pos["section"].getColumnHost(); // This is to hide out of view guideline
713
- if (pn !== this._guideline.parentNode) {
714
- this._guideline.style.width = grid.getWidth() + "px";
715
- pn.appendChild(this._guideline);
716
- }
717
- }
718
- };
719
-
720
687
  /** @private
721
- * @param {Event} e
688
+ * @param {Event=} e
722
689
  */
723
690
  RowDraggingPlugin.prototype._updateGuidePosition = function (e) {
724
- if (this._disabled) return;
725
-
726
- if (this._isInContentSection()) {
727
- if (this._hasValidTarget()) {
728
- var pos = Dom.getRelativePosition(this._pos["cellElement"], this._guideline.parentNode);
729
- this._guideline.style.top = (pos["y"] - 1) + "px";
730
- var height = (this._pos["section"].getRowHeight(
731
- this._pos["rowIndex"]
732
- ) - 3) + "px";
733
- this._guideline.style.lineHeight = this._guideline.style.height = height;
691
+ var pos = this._pos;
692
+ if (this._disabled || !pos || pos["invalidTarget"]) {
693
+ return;
694
+ }
695
+
696
+ if (_isInContentSection(pos)) {
697
+ var guideline = this._guideline;
698
+ // var grid = pos["grid"];
699
+ var section = pos["section"];
700
+ var pn = section.getColumnHost(); // This is to hide out of view guideline
701
+ if (pn !== guideline.parentNode) {
702
+ guideline.style.width = section.getWidth() + "px";
703
+ pn.appendChild(guideline);
734
704
  }
705
+
706
+ var cellElement = pos["cellElement"];
707
+ var relativePos = Dom.getRelativePosition(cellElement, pn);
708
+ var cellTop = relativePos["y"];
709
+ var rowIndex = pos["rowIndex"];
710
+ var offsetY = 0;
711
+
712
+ if(rowIndex) {
713
+ offsetY = -1; // Make guideline stay on top of the target cell
714
+ if(e) { // MouseEvent or TouchEvent
715
+ var lastRow = section.getRowCount() - 1;
716
+ if(rowIndex >= lastRow) { // bottommost row
717
+ var rowHeight = section.getRowHeight(lastRow);
718
+ relativePos = Dom.getRelativePosition(e, cellElement);
719
+ if(relativePos["y"] >= (rowHeight / 2) | 0) {
720
+ offsetY = rowHeight - 3; // TODO: Use actual guideline height for the offset
721
+ ++pos["rowIndex"];
722
+ }
723
+ }
724
+ }
725
+ } // else { Topmost row
726
+
727
+ guideline.style.top = (cellTop + offsetY) + "px";
735
728
  }
736
729
  };
730
+
737
731
  /** @private */
738
732
  RowDraggingPlugin.prototype._clearCache = function () {
739
733
  if (this._dragPulseId) {
@@ -774,19 +768,6 @@ RowDraggingPlugin.prototype._onDragPulse = function () {
774
768
  primaryHost.scrollDown(scrollVal);
775
769
  }
776
770
  };
777
- /** @private
778
- * @param {Event=} e
779
- */
780
- RowDraggingPlugin.prototype._onContentScrolled = function (e) {
781
- if (this._scrollingZone && this._dragging && this._pos["hit"]) {
782
- var grid = this._pos["grid"];
783
- if (grid.getElement() === e.currentTarget) {
784
- this._pos = this._hitTest(e);
785
- this._dispatch("drag", this._pos);
786
- this._updateGuidePosition();
787
- }
788
- }
789
- };
790
771
 
791
772
 
792
773
 
@@ -2,6 +2,7 @@ import {Ext} from '../../tr-grid-util/es6/Ext.js';
2
2
  import {GridPlugin} from '../../tr-grid-util/es6/GridPlugin.js';
3
3
  import {FilterBuilder} from '../../tr-grid-util/es6/FilterBuilder.js';
4
4
  import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
5
+ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
5
6
 
6
7
  declare namespace RowFilteringPlugin {
7
8
 
@@ -32,6 +33,7 @@ declare namespace RowFilteringPlugin {
32
33
 
33
34
  type Options = {
34
35
  disabledUI?: boolean,
36
+ iconActivation?: string,
35
37
  click?: ((...params: any[]) => any),
36
38
  clicked?: ((...params: any[]) => any),
37
39
  iconCreated?: ((...params: any[]) => any),
@@ -4,6 +4,7 @@ import { Ext } from '../../tr-grid-util/es6/Ext.js';
4
4
  import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
5
5
  import { FilterBuilder } from '../../tr-grid-util/es6/FilterBuilder.js';
6
6
  import { ElfUtil } from '../../tr-grid-util/es6/ElfUtil.js';
7
+ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
7
8
  /** @event RowFilteringPlugin#click
8
9
  * @description click event is dispatched when a user clicks the column filter icon.
9
10
  */
@@ -71,6 +72,7 @@ The expression can take various forms:<br>
71
72
  /** @typedef {Object} RowFilteringPlugin~Options
72
73
  * @description The options can be specified by `rowFiltering` property of the main grid's options
73
74
  * @property {boolean=} disabledUI=false If enabled, filter icon will not be created/shown.
75
+ * @property {string=} iconActivation=onActiveFilter Filter icon redering behavior, can be set to `always`,`onHover`,`onActiveFilter`,or `none`
74
76
  * @property {Function=} click=null Event handler dispatched when a user clicks the column filter icon.
75
77
  * @property {Function=} clicked=null Alias to `click` event handler
76
78
  * @property {Function=} iconCreated=null Event handler dispatched when a new column filter icon is created.
@@ -134,11 +136,6 @@ RowFilteringPlugin.prototype._nameMap; // Mapping name to filter function for re
134
136
  */
135
137
 
136
138
  RowFilteringPlugin.prototype._disabled = false;
137
- /** @type {boolean}
138
- * @private
139
- */
140
-
141
- RowFilteringPlugin.prototype._disabledUI = false;
142
139
  /** @type {Object.<string, boolean>}
143
140
  * @private
144
141
  */
@@ -165,6 +162,11 @@ RowFilteringPlugin.prototype._columnFilters;
165
162
  */
166
163
 
167
164
  RowFilteringPlugin.prototype._activeColFilters = null;
165
+ /** @type {string}
166
+ * @private
167
+ */
168
+
169
+ RowFilteringPlugin.prototype._iconActivation = "onActiveFilter";
168
170
  /** @type {number}
169
171
  * @private
170
172
  */
@@ -231,6 +233,15 @@ RowFilteringPlugin.prototype.initialize = function (host, options) {
231
233
 
232
234
  this._hosts.push(host);
233
235
 
236
+ if (!RowFilteringPlugin._styles) {
237
+ RowFilteringPlugin._styles = prettifyCss([".hovering-filter-icon .cell:not(.active-filter):hover .floating-panel .title-filter-icon", ["display: flex;"], ".hovering-filter-icon .cell:not(.active-filter) .floating-panel .title-filter-icon", ["display: none;"], ".floating-panel", ["position:relative;"], ".floating-panel .title-filter-icon", ["color: var(--grid-title-filter-icon-color,inherit);"], ".floating-panel .title-filter-icon:hover", ["color: var(--grid-title-filter-icon-hover-color,inherit);"], ".hovering-filter-icon .tiny-col .cell:hover, .tr-grid .tiny-col .cell.active-filter", ["padding-left:0px;"], ".tiny-col .cell .floating-panel .title-filter-icon:before", ["content: '.';", "position: absolute;", "margin-left: auto;", "margin-right: auto;", "left: 0;", "right: 0;", "top: -10px;", "font-size: 10px;", "font-family: monospace;", "color: var(--grid-title-dot-icon,inherit);", "text-align:center;"]]);
238
+ }
239
+
240
+ if (!host._rowFilteringStyles) {
241
+ host._rowFilteringStyles = true;
242
+ injectCss(RowFilteringPlugin._styles, host.getElement());
243
+ }
244
+
234
245
  host.unloadPlugin("ColumnFilterPlugin");
235
246
  host.listen("preSectionRender", this._onPreSectionRender);
236
247
  host.listen("postDataSourceChanged", this._requestFilterRefresh); // TODO: Check if this is necessary
@@ -275,7 +286,17 @@ RowFilteringPlugin.prototype.config = function (options) {
275
286
 
276
287
  if (rowFiltering) {
277
288
  if (rowFiltering["disabledUI"] || rowFiltering["uiDisabled"]) {
278
- this._disabledUI = true;
289
+ this._iconActivation = "none";
290
+ }
291
+
292
+ if (rowFiltering["iconActivation"]) {
293
+ this._iconActivation = rowFiltering["iconActivation"];
294
+
295
+ if (this._iconActivation === "onHover") {
296
+ this._hosts[0].enableClass("hovering-filter-icon", true);
297
+ } else {
298
+ this._hosts[0].enableClass("hovering-filter-icon", false);
299
+ }
279
300
  }
280
301
 
281
302
  if (rowFiltering["clicked"]) {
@@ -302,6 +323,8 @@ RowFilteringPlugin.prototype.config = function (options) {
302
323
 
303
324
  this._setColumnOptions(i, column);
304
325
  }
326
+
327
+ this.updateAllColumnIcons(); //Create icon at first time
305
328
  };
306
329
  /** @public
307
330
  * @param {Object=} gridOptions
@@ -352,7 +375,7 @@ RowFilteringPlugin.prototype.getConfigObject = function (gridOptions) {
352
375
  extOptions = obj.rowFiltering = {};
353
376
  }
354
377
 
355
- extOptions.disabledUI = this._disabledUI;
378
+ extOptions.iconActivation = this._iconActivation;
356
379
  return obj;
357
380
  };
358
381
  /** All filter logics in DataView will be temporarily removed until re-enabling. This is useful when trying to insert an item at the specified index. After re-enabling, both logics and icons will be restored.
@@ -604,12 +627,12 @@ RowFilteringPlugin.prototype.setColumnFilter = function (colIndex, exp, ctx) {
604
627
 
605
628
 
606
629
  RowFilteringPlugin.prototype._setColumnOptions = function (colIndex, columnOptions) {
607
- var fieldDataType = columnOptions["fieldDataType"]; // TODO: This should not be set here
630
+ var fieldDataType = columnOptions["fieldDataType"] || columnOptions["dataType"]; // TODO: This should not be set here, should retreive data type from Composite/Realtime Grid
608
631
 
609
632
  if (fieldDataType) {
610
633
  var colOptions = this._newExtColumnOptions(colIndex);
611
634
 
612
- colOptions.fieldDataType = fieldDataType; // TODO: This should not be set here
635
+ colOptions.fieldDataType = fieldDataType; // TODO: This should not be set here, should retreive data type from Composite/Realtime Grid
613
636
  }
614
637
 
615
638
  var exp = columnOptions["filter"];
@@ -1143,7 +1166,7 @@ RowFilteringPlugin.prototype._requestFilterRefresh = function () {
1143
1166
 
1144
1167
 
1145
1168
  RowFilteringPlugin.prototype._setTimerForUpdatingIcons = function () {
1146
- if (this._disabledUI) {
1169
+ if (this._iconActivation === "none") {
1147
1170
  return;
1148
1171
  }
1149
1172
 
@@ -1216,10 +1239,6 @@ RowFilteringPlugin.prototype.refresh = function () {
1216
1239
 
1217
1240
 
1218
1241
  RowFilteringPlugin.prototype._updateColumnIcon = function (colIndex) {
1219
- if (this._disabledUI) {
1220
- return;
1221
- }
1222
-
1223
1242
  var cfo = this._getColumnFilterOption(colIndex);
1224
1243
 
1225
1244
  var hasFilter = cfo ? cfo._filters.length : 0;
@@ -1244,9 +1263,11 @@ RowFilteringPlugin.prototype._updateColumnIcon = function (colIndex) {
1244
1263
  cell["updatePadding"]();
1245
1264
  }
1246
1265
 
1247
- if (!this._disabled && hasFilter) {
1266
+ var onActiveFilter = this._iconActivation !== "always" && this._iconActivation !== "onHover";
1267
+ var noFilterIcon = this._disabled || this._iconActivation === "none" || onActiveFilter && !hasFilter;
1268
+
1269
+ if (!noFilterIcon) {
1248
1270
  if (!cell._filterIcon) {
1249
- cell.addClass("filtering");
1250
1271
  var filterIcon;
1251
1272
 
1252
1273
  if (ElfUtil.hasComponent("ef-icon") >= 3) {
@@ -1257,6 +1278,8 @@ RowFilteringPlugin.prototype._updateColumnIcon = function (colIndex) {
1257
1278
  filterIcon.className = "filter-symbol icon-filter ef-icon";
1258
1279
  }
1259
1280
 
1281
+ filterIcon.classList.add("title-filter-icon"); // Icon reference
1282
+
1260
1283
  filterIcon.addEventListener("click", this._onIconClick, false);
1261
1284
 
1262
1285
  this._dispatch("iconCreated", {
@@ -1268,11 +1291,17 @@ RowFilteringPlugin.prototype._updateColumnIcon = function (colIndex) {
1268
1291
  cell.insertFloatingIcon(filterIcon, 10);
1269
1292
  cell._filterIcon = filterIcon;
1270
1293
  }
1294
+
1295
+ if (hasFilter || this._iconActivation == "always") {
1296
+ cell.enableClass("active-filter", true);
1297
+ } else {
1298
+ cell.enableClass("active-filter", false);
1299
+ }
1271
1300
  } else {
1272
1301
  if (cell._filterIcon) {
1273
1302
  cell.removeFloatingIcon(cell._filterIcon);
1274
1303
  cell._filterIcon = null;
1275
- cell.removeClass("filtering");
1304
+ cell.enableClass("active-filter", false);
1276
1305
  }
1277
1306
  }
1278
1307
  }
@@ -1614,38 +1643,64 @@ RowFilteringPlugin.prototype.openDialog = function (colIndex, options) {
1614
1643
  nodes: [],
1615
1644
  checked: selectedItems[formattedVal] ? true : false
1616
1645
  };
1617
- });
1646
+ }); //Setting up default default column options
1618
1647
 
1619
- var colOptions = this._getExtColumnOptions(colIndex);
1648
+ var colOptions = this._newExtColumnOptions(colIndex);
1620
1649
 
1621
1650
  var fdt = "";
1651
+ var sui = true;
1652
+ var fui = true;
1653
+ var lang = "";
1622
1654
 
1623
- if (colOptions && colOptions.fieldDataType) {
1624
- // TODO: Retrieve data type from Composite/Realtime Grid instead
1625
- fdt = colOptions.fieldDataType;
1655
+ if (colOptions) {
1656
+ if (colOptions.fieldDataType != null) {
1657
+ fdt = colOptions.fieldDataType; // TODO: Retrieve data type from Composite/Realtime Grid instead
1658
+ }
1659
+
1660
+ if (colOptions.sortUI != null) {
1661
+ sui = colOptions.sortUI;
1662
+ }
1663
+
1664
+ if (colOptions.filterUI != null) {
1665
+ fui = colOptions.filterUI;
1666
+ }
1667
+
1668
+ if (colOptions.lang != null) {
1669
+ lang = colOptions.lang;
1670
+ }
1626
1671
  }
1627
1672
 
1628
1673
  var dialogConfig = {
1629
- sortUI: true,
1630
- filterUI: true,
1631
- fieldDataType: fdt
1674
+ sortUI: sui,
1675
+ filterUI: fui,
1676
+ fieldDataType: fdt,
1677
+ lang: lang
1632
1678
  };
1633
1679
 
1634
1680
  if (options && _typeof(options) === "object") {
1635
- if (options.sortUI === false) {
1636
- dialogConfig.sortUI = options.sortUI;
1681
+ var fieldDataType = options["fieldDataType"];
1682
+ var sortUI = options["sortUI"];
1683
+ var filterUI = options["filterUI"];
1684
+ var optionLang = options["lang"];
1685
+
1686
+ if (sortUI === false) {
1687
+ dialogConfig.sortUI = sortUI;
1688
+ colOptions.sortUI = sortUI;
1637
1689
  }
1638
1690
 
1639
- if (options.filterUI === false) {
1640
- dialogConfig.filterUI = options.filterUI;
1691
+ if (filterUI === false) {
1692
+ dialogConfig.filterUI = filterUI;
1693
+ colOptions.filterUI = filterUI;
1641
1694
  }
1642
1695
 
1643
- if (options.fieldDataType != null) {
1644
- dialogConfig.fieldDataType = options.fieldDataType;
1696
+ if (fieldDataType != null) {
1697
+ dialogConfig.fieldDataType = fieldDataType;
1698
+ colOptions.fieldDataType = fieldDataType;
1645
1699
  }
1646
1700
 
1647
- if (options.lang != null) {
1648
- dialogConfig.lang = options.lang;
1701
+ if (optionLang != null) {
1702
+ dialogConfig.lang = optionLang;
1703
+ colOptions.lang = optionLang;
1649
1704
  }
1650
1705
  }
1651
1706