@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
@@ -1,5 +1,6 @@
1
1
  import { nestedObjectToArray, rgb2Hex } from "./Util.js";
2
2
  import { Deferred } from "./Deferred.js";
3
+ import { ElementObserver } from "./ElementObserver.js";
3
4
 
4
5
  /** Dialog supporting language (selection dialog, formater dialog and filter dialog)
5
6
  * @type {!Object.<string, boolean>}
@@ -63,6 +64,26 @@ ElfUtil._dummyIcon = null;
63
64
  * @private
64
65
  */
65
66
  ElfUtil._iconLoaded = false;
67
+ /** @type {string|null}
68
+ * @private
69
+ */
70
+ ElfUtil._profileName = null;
71
+ /** @type {Array}
72
+ * @private
73
+ */
74
+ ElfUtil._callbacks = [];
75
+ /** @type {boolean}
76
+ * @private
77
+ */
78
+ ElfUtil._observed = false;
79
+ /** @type {boolean}
80
+ * @private
81
+ */
82
+ ElfUtil._pendingResolve = false;
83
+ /** @type {boolean}
84
+ * @private
85
+ */
86
+ ElfUtil._themeLoaded = false;
66
87
 
67
88
  /** @type {Object.<string, Object>}
68
89
  * @private
@@ -211,6 +232,32 @@ ElfUtil.getThemeName = function (optElem) {
211
232
  return ElfUtil._themeName;
212
233
  };
213
234
 
235
+ /** This method is using for unit test
236
+ * @public
237
+ * @ignore
238
+ * @function
239
+ * @param {string} themeName
240
+ */
241
+ ElfUtil.setThemeName = function (themeName) {
242
+ ElfUtil._themeName = themeName;
243
+ };
244
+
245
+ /** @public
246
+ * @function
247
+ * @return {boolean}
248
+ */
249
+ ElfUtil.isThemeLoaded = function () {
250
+ return ElfUtil._themeLoaded;
251
+ };
252
+
253
+ /** @public
254
+ * @function
255
+ * @return {Object}
256
+ */
257
+ ElfUtil.getColors = function() {
258
+ return ElfUtil.themeColors;
259
+ };
260
+
214
261
  /** Check the current ELF theme is Halo theme
215
262
  * @public
216
263
  * @function
@@ -334,57 +381,165 @@ ElfUtil.getCssVariables = function (obj, optElem) {
334
381
  return obj || null;
335
382
  };
336
383
 
384
+ /** @public
385
+ * @param {Object} rtk
386
+ */
387
+ ElfUtil.setRTK = function(rtk) {
388
+ if(rtk != null) {
389
+ ElfUtil._rtk = rtk;
390
+ }
391
+ };
392
+
393
+ /** Get current profile name set on the root html element (document.documentElement)
394
+ * @public
395
+ * @return {string} Current profile name
396
+ */
397
+ ElfUtil.getMovementColorProfile = function() {
398
+ return document.documentElement.getAttribute("movement-color-profile");
399
+ };
400
+
401
+ /** @private
402
+ * @param {Function} cb
403
+ */
404
+ ElfUtil._addThemeChangedCallback = function(cb) {
405
+ var callbacks = ElfUtil._callbacks;
406
+ if(callbacks.indexOf(cb) < 0) {
407
+ callbacks.push(cb);
408
+ }
409
+ };
410
+
411
+ /** @public
412
+ * @return {Promise<Object>} A promise of object of theme colors
413
+ */
414
+ ElfUtil.reloadThemeColors = function() {
415
+ if (ElfUtil._deferred && ElfUtil._deferred.isFulfilled()) {
416
+ ElfUtil._profileName = "";
417
+ ElfUtil._themeLoaded = false;
418
+ ElfUtil.themeReady = null;
419
+ return ElfUtil.getThemeColors();
420
+ } else {
421
+ return ElfUtil.themeReady;
422
+ }
423
+ };
424
+
337
425
  /** Gets current theme colors from the document and returns a promise. <br>
338
- * WANRING: This method sets movement color profile to html tag automatically, if JET.Settings exists. <br>
426
+ * WANRING: This method sets movement color profile to html tag automatically, if JET.Settings exists or RTK.Settings is available. <br>
339
427
  * To re-request/reset theme colors, set ElfUtil.themeReady variable to null
340
428
  * @public
429
+ * @param {Function=} themeChangedCb
341
430
  * @return {Promise<Object>} A promise of object of theme colors
342
431
  */
343
- ElfUtil.getThemeColors = function() {
432
+ ElfUtil.getThemeColors = function(themeChangedCb) {
433
+ if(typeof themeChangedCb === "function") {
434
+ ElfUtil._addThemeChangedCallback(themeChangedCb);
435
+ }
436
+
344
437
  if(ElfUtil.themeReady) {
345
438
  return ElfUtil.themeReady;
346
439
  }
440
+
347
441
  var d = ElfUtil._deferred = new Deferred();
348
442
  ElfUtil.themeReady = d.promise;
349
443
 
350
- var jet = window ? window.JET : null;
351
- if(jet && jet.Settings) {
352
- try {
353
- jet.Settings.read(ElfUtil._onColorProfile, {
354
- providerName: "Configuration",
355
- settingName: "RDE_USER_CURRENT_TICK_COLOR"
356
- });
357
- } catch (err) {
358
- d.reject("Cannot read JET's settings");
444
+ var profileName = ElfUtil.getMovementColorProfile();
445
+ if(profileName) {
446
+ if(profileName !== ElfUtil._profileName) {
447
+ setTimeout(ElfUtil._profileNameRetrieved, 100); // TODO: Find a proper way to ensure that theme is ready
448
+ } else {
449
+ ElfUtil._deferred.resolve(ElfUtil.themeColors);
359
450
  }
360
451
  } else {
361
- setTimeout(ElfUtil._retrieveThemeColors, 100); // TODO: Find a proper way to ensure that theme is ready
452
+ var options = {
453
+ providerName: "Configuration",
454
+ settingName: "RDE_USER_CURRENT_TICK_COLOR"
455
+ };
456
+
457
+ var jet = window ? window.JET : null;
458
+ ElfUtil._themeLoaded = false;
459
+ if(ElfUtil._rtk && ElfUtil._rtk.Settings) {
460
+ ElfUtil._rtk.Settings.getAsync(options)
461
+ .then(ElfUtil._loadingProfileSuccess)
462
+ .catch(ElfUtil._loadingProfileFailure);
463
+ } else if(jet && jet.Settings) {
464
+ try {
465
+ jet.Settings.read(ElfUtil._loadingProfileSuccess, options);
466
+ } catch (err) {
467
+ ElfUtil._loadingProfileFailure();
468
+ }
469
+ } else {
470
+ setTimeout(ElfUtil._profileNameRetrieved, 100); // TODO: Find a proper way to ensure that theme is ready
471
+ }
362
472
  }
473
+
363
474
  return d.promise;
364
475
  };
365
476
 
366
- /** Get user's color profile from JET and set it to html tag (document.documentElement)
477
+ /** @private
478
+ * @param {string} profileName
479
+ */
480
+ var movementColorProfileChanged = function(profileName) {
481
+ if(profileName !== ElfUtil._profileName) {
482
+ ElfUtil._retrieveThemeColors(profileName);
483
+
484
+ if(ElfUtil._pendingResolve) {
485
+ ElfUtil._pendingResolve = false;
486
+ ElfUtil._deferred.resolve(ElfUtil.themeColors);
487
+ }
488
+
489
+ var callbacks = ElfUtil._callbacks;
490
+ for (var i = 0; i < callbacks.length; i++) {
491
+ callbacks[i]();
492
+ }
493
+ }
494
+ };
495
+
496
+ /** Get user's color profile from JET or RTK and set it to html tag (document.documentElement)
367
497
  * @private
368
- * @param {string} colorProfile Returned from JET.Settings
498
+ * @param {string} profileName Returned from JET.Settings or RTK.Settings
369
499
  */
370
- ElfUtil._onColorProfile = function (colorProfile) {
371
- if(colorProfile) {
372
- document.documentElement.setAttribute("movement-color-profile", colorProfile.toLowerCase());
500
+ ElfUtil._loadingProfileSuccess = function(profileName) {
501
+ if(profileName) {
502
+ document.documentElement.setAttribute("movement-color-profile", profileName.toLowerCase());
503
+ }
504
+
505
+ if(ElfUtil._observed) { // Let attribute listener does the job
506
+ ElfUtil._pendingResolve = true;
507
+ } else {
508
+ ElfUtil._profileNameRetrieved(profileName);
373
509
  }
510
+ };
511
+
512
+ /** @private
513
+ */
514
+ ElfUtil._loadingProfileFailure = function() {
374
515
  ElfUtil._retrieveThemeColors();
516
+ if(!ElfUtil._observed) {
517
+ ElfUtil._observed = true;
518
+ ElementObserver.addAttributeListener(document.documentElement, movementColorProfileChanged, "movement-color-profile");
519
+ }
520
+ ElfUtil._deferred.reject("Failed to get movement color profile from settings.");
375
521
  };
376
- /** Get current profile name set on the root html element (document.documentElement)
377
- * @public
378
- * @return {string} Current profile name
522
+
523
+ /** @private
379
524
  */
380
- ElfUtil.getMovementColorProfile = function() {
381
- return document.documentElement.getAttribute("movement-color-profile");
525
+ ElfUtil._profileNameRetrieved = function() {
526
+ var profileName = ElfUtil.getMovementColorProfile();
527
+ ElfUtil._retrieveThemeColors(profileName);
528
+ if(!ElfUtil._observed) {
529
+ ElfUtil._observed = true;
530
+ ElementObserver.addAttributeListener(document.documentElement, movementColorProfileChanged, "movement-color-profile");
531
+ }
532
+ ElfUtil._deferred.resolve(ElfUtil.themeColors);
382
533
  };
383
534
 
384
535
  /** Get theme colors from document
385
536
  * @private
537
+ * @param {string} profileName Movement color profile name
386
538
  */
387
- ElfUtil._retrieveThemeColors = function() {
539
+ ElfUtil._retrieveThemeColors = function(profileName) {
540
+ ElfUtil._themeLoaded = true;
541
+ ElfUtil._profileName = profileName;
542
+
388
543
  var colors = ElfUtil.themeColors = ElfUtil.getCssVariables({
389
544
  "primary": "--color-scheme-primary", // Usually used in headers, and selection
390
545
  "secondary": "--color-scheme-secondary",
@@ -449,10 +604,7 @@ ElfUtil._retrieveThemeColors = function() {
449
604
  colors["baseGrid"] = colors["tableBg"];
450
605
  colors["baseText"] = colors["tableText"];
451
606
  colors["trackColor"] = colors["primary"] || ElfUtil._defaultColors["trackColor"];
452
-
453
- ElfUtil._deferred.resolve(colors);
454
607
  };
455
608
 
456
-
457
609
  export default ElfUtil;
458
610
  export { ElfUtil };
@@ -4,23 +4,23 @@ declare class EventDispatcher {
4
4
 
5
5
  constructor();
6
6
 
7
- public addEventListener(type: string, handler: ((...params: any[]) => any)): void;
7
+ public addEventListener(type: string, handler: ((...params: any[]) => any)|null): void;
8
8
 
9
- public removeEventListener(type: string, handler: ((...params: any[]) => any)): void;
9
+ public removeEventListener(type: string, handler: ((...params: any[]) => any)|null): void;
10
10
 
11
11
  public removeAllEventListeners(): void;
12
12
 
13
13
  public hasListener(type: string): boolean;
14
14
 
15
- public getListener(type: string, idx?: number): ((...params: any[]) => any)|null;
15
+ public getListener(type: string, idx?: number|null): ((...params: any[]) => any)|null;
16
16
 
17
17
  public addListener(obj: any, type: string): void;
18
18
 
19
- public static preventDefault(e: Event): void;
19
+ public static preventDefault(e: Event|null): void;
20
20
 
21
21
  }
22
22
 
23
- declare function preventDefault(e: Event): void;
23
+ declare function preventDefault(e: Event|null): void;
24
24
 
25
25
  export default EventDispatcher;
26
26
  export {EventDispatcher, preventDefault};
@@ -9,7 +9,7 @@ declare class ExpanderIcon extends ElementWrapper {
9
9
 
10
10
  public static loadExpanderStyles(): void;
11
11
 
12
- public static injectExpanderStyles(elem: Element): void;
12
+ public static injectExpanderStyles(elem: Element|null): void;
13
13
 
14
14
  public expand(): void;
15
15
 
@@ -19,7 +19,7 @@ declare class ExpanderIcon extends ElementWrapper {
19
19
 
20
20
  public isCollapsed(): boolean;
21
21
 
22
- public toggle(collapsed?: boolean): void;
22
+ public toggle(collapsed?: boolean|null): void;
23
23
 
24
24
  }
25
25
 
@@ -94,7 +94,7 @@ ExpanderIcon.loadExpanderStyles = function() {
94
94
  if(themeName) {
95
95
  ExpanderIcon._onThemeLoaded(); // synchronous
96
96
  } else {
97
- ElfUtil.getThemeColors().then(ExpanderIcon._onThemeLoaded); // asynchronous
97
+ ElfUtil.getThemeColors().then(ExpanderIcon._onThemeLoaded).catch(ExpanderIcon._onThemeLoaded); // asynchronous
98
98
  }
99
99
  }
100
100
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  declare namespace Ext {
4
4
 
5
- function inherits(childCtor: ((...params: any[]) => any), parentCtor: ((...params: any[]) => any)): void;
5
+ function inherits(childCtor: ((...params: any[]) => any)|null, parentCtor: ((...params: any[]) => any)|null): void;
6
6
 
7
7
  }
8
8
 
@@ -4,22 +4,22 @@ import { DateTime } from "./DateTime.js";
4
4
  declare namespace FieldFormatter {
5
5
 
6
6
  type Options = {
7
- formatType?: string,
7
+ formatType?: string|null,
8
8
  type: string,
9
- field?: string,
10
- fieldDataType?: string,
11
- dateTimeFormat?: string,
12
- useUTCTime?: boolean,
13
- idnSource?: string
9
+ field?: string|null,
10
+ fieldDataType?: string|null,
11
+ dateTimeFormat?: string|null,
12
+ useUTCTime?: boolean|null,
13
+ idnSource?: string|null
14
14
  };
15
15
 
16
16
  }
17
17
 
18
18
  declare class FieldFormatter {
19
19
 
20
- constructor(options?: FieldFormatter.Options);
20
+ constructor(options?: FieldFormatter.Options|null);
21
21
 
22
- public init(options?: FieldFormatter.Options): void;
22
+ public init(options?: FieldFormatter.Options|null): void;
23
23
 
24
24
  public getOptions(options?: any): any;
25
25
 
@@ -29,13 +29,13 @@ declare class FieldFormatter {
29
29
 
30
30
  public setFormatType(type: string): void;
31
31
 
32
- public setField(field: string, combinedField?: string, formattedField?: string): void;
32
+ public setField(field: string, combinedField?: string|null, formattedField?: string|null): void;
33
33
 
34
- public setDateTimeMeta(format: string, gmtTimeZone?: boolean, inputSource?: string, lang?: string): void;
34
+ public setDateTimeMeta(format: string, gmtTimeZone?: boolean|null, inputSource?: string|null, lang?: string|null): void;
35
35
 
36
- public setDateFormatter(func: ((...params: any[]) => any)): void;
36
+ public setDateFormatter(func: ((...params: any[]) => any)|null): void;
37
37
 
38
- public setNumberFormatter(formatter: ((...params: any[]) => any)|NumberFormatter): void;
38
+ public setNumberFormatter(formatter: ((...params: any[]) => any)|NumberFormatter|null): void;
39
39
 
40
40
  public format(data: any): string;
41
41
 
@@ -8,7 +8,7 @@ import { DateTime } from "./DateTime.js";
8
8
  * @property {string=} field
9
9
  * @property {string=} fieldDataType Deprecated. Alias to formatType
10
10
  * @property {string=} dateTimeFormat
11
- * @property {boolean=} useUTCTime=false
11
+ * @property {boolean=} useUTCTime=true If disable, time will be shown in local time format
12
12
  * @property {string=} idnSource
13
13
  */
14
14
 
@@ -6,43 +6,43 @@ declare namespace FilterBuilder {
6
6
 
7
7
  type Options = {
8
8
  field: string,
9
- formatter?: ((...params: any[]) => any),
10
- formattedField?: string
9
+ formatter?: ((...params: any[]) => any)|null,
10
+ formattedField?: string|null
11
11
  };
12
12
 
13
- type Condition = any[];
13
+ type Condition = any[]|null;
14
14
 
15
- type Conditions = (FilterBuilder.Condition)[];
15
+ type Conditions = (FilterBuilder.Condition)[]|null;
16
16
 
17
17
  }
18
18
 
19
19
  declare class FilterBuilder {
20
20
 
21
- constructor(options?: FilterBuilder.Options);
21
+ constructor(options?: FilterBuilder.Options|null);
22
22
 
23
23
  public reset(): void;
24
24
 
25
- public init(options?: FilterBuilder.Options): void;
25
+ public init(options?: FilterBuilder.Options|null): void;
26
26
 
27
- public setFieldDefinition(fieldName: string, formatter?: ((...params: any[]) => any), formattedField?: string): void;
27
+ public setFieldDefinition(fieldName: string, formatter?: ((...params: any[]) => any)|null, formattedField?: string|null): void;
28
28
 
29
- public setDataAccessors(rawDataAccessor?: ((...params: any[]) => any), formattedDataAccessor?: ((...params: any[]) => any)): void;
29
+ public setDataAccessors(rawDataAccessor?: ((...params: any[]) => any)|null, formattedDataAccessor?: ((...params: any[]) => any)|null): void;
30
30
 
31
- public addCondition(oper: string, value: string|number, connector?: string): boolean;
31
+ public addCondition(oper: string, value: string|number|null, connector?: string|null, useUTCTime?: boolean|null): boolean;
32
32
 
33
- public addConditions(conditions: FilterBuilder.Conditions): number;
33
+ public addConditions(conditions: FilterBuilder.Conditions|null): number;
34
34
 
35
35
  public getConditions(): FilterBuilder.Conditions|null;
36
36
 
37
37
  public buildFilter(): ((...params: any[]) => any)|null;
38
38
 
39
- public buildMonitorFilter(filterStr: string, field: string, formatter?: ((...params: any[]) => any), formattedField?: string): ((...params: any[]) => any)|null;
39
+ public buildMonitorFilter(filterStr: string, field: string, formatter?: ((...params: any[]) => any)|null, formattedField?: string|null): ((...params: any[]) => any)|null;
40
40
 
41
- public parse(condition: any, field?: string, formatter?: ((...params: any[]) => any), formattedField?: string, rawDataAccessor?: ((...params: any[]) => any), formattedDataAccessor?: ((...params: any[]) => any)): ((...params: any[]) => any)|null;
41
+ public parse(condition: any, field?: string|null, formatter?: ((...params: any[]) => any)|null, formattedField?: string|null, rawDataAccessor?: ((...params: any[]) => any)|null, formattedDataAccessor?: ((...params: any[]) => any)|null): ((...params: any[]) => any)|null;
42
42
 
43
43
  }
44
44
 
45
- declare function buildFilterFromObjectMap(obj: any, field: string, rawDataAccessor?: ((...params: any[]) => any)): ((...params: any[]) => any)|null;
45
+ declare function buildFilterFromObjectMap(obj: any, field: string, rawDataAccessor?: ((...params: any[]) => any)|null): ((...params: any[]) => any)|null;
46
46
 
47
47
  export default FilterBuilder;
48
48
  export { FilterBuilder, buildFilterFromObjectMap };
@@ -169,9 +169,10 @@ FilterBuilder.prototype.setDataAccessors = function(rawDataAccessor, formattedDa
169
169
  * @param {string} oper Operator id (e.g., "GT", "CONT", "EQ")
170
170
  * @param {string|number} value
171
171
  * @param {string=} connector Possible values are "OR" and "AND"
172
+ * @param {boolean=} useUTCTime If false use local time for filtering
172
173
  * @return {boolean} Return true, if the new condition is added
173
174
  */
174
- FilterBuilder.prototype.addCondition = function (oper, value, connector) {
175
+ FilterBuilder.prototype.addCondition = function (oper, value, connector, useUTCTime) {
175
176
  oper = oper ? oper.toUpperCase() : "";
176
177
  var opDef = FilterOperators[oper];
177
178
  if (!opDef) {
@@ -190,7 +191,8 @@ FilterBuilder.prototype.addCondition = function (oper, value, connector) {
190
191
  this._conditions.push({
191
192
  operatorId: oper,
192
193
  value: value,
193
- connector: connector || ""
194
+ connector: connector || "",
195
+ useUTCTime: useUTCTime
194
196
  });
195
197
 
196
198
  return true;
@@ -206,7 +208,7 @@ FilterBuilder.prototype.addConditions = function (conditions) {
206
208
  for(var i = 0; i < len; ++i) {
207
209
  var condition = conditions[i];
208
210
  if(Array.isArray(condition)) {
209
- if(this.addCondition(condition[0], condition[1], condition[2])) {
211
+ if(this.addCondition(condition[0], condition[1], condition[2], condition[3])) {
210
212
  ++count;
211
213
  }
212
214
  }
@@ -312,11 +314,6 @@ FilterBuilder.prototype.buildFilter = function() {
312
314
  filterStr.push("var ts = 0;");
313
315
  filterStr.push("if(!val || val != val || !val.getTime) {");
314
316
  filterStr.push(" return false;");
315
- filterStr.push("} else {");
316
- filterStr.push(" ts = val.getTime();");
317
- filterStr.push(" if(ts !== ts) {");
318
- filterStr.push(" return false;");
319
- filterStr.push(" }");
320
317
  filterStr.push("}");
321
318
  }
322
319
 
@@ -366,6 +363,16 @@ FilterBuilder.prototype.buildFilter = function() {
366
363
  } else if(opDef.type === "date") {
367
364
  if(DateTime.isValidDate(inputVal)) {
368
365
  var varName;
366
+ if(!cond.useUTCTime){
367
+ filterStr.push("ts = new Date(val.getFullYear(),val.getMonth(),val.getDate())");
368
+ } else {
369
+ filterStr.push("ts = new Date(Date.UTC(val.getUTCFullYear(),val.getUTCMonth(),val.getUTCDate()))");
370
+ }
371
+ filterStr.push("ts = ts.getTime()");
372
+ filterStr.push("if(ts !== ts) {");
373
+ filterStr.push(" return false;");
374
+ filterStr.push("}");
375
+
369
376
  if(cond.operatorId === "DT") {
370
377
  varName = "ts" + (i + 1);
371
378
  inputVal = inputVal.getTime();
@@ -11,28 +11,28 @@ declare namespace FilterOperators {
11
11
  };
12
12
 
13
13
  type Operators = {
14
- EQ: FilterOperators.Operator,
15
- NEQ: FilterOperators.Operator,
16
- NUMEQ: FilterOperators.Operator,
17
- NUMNEQ: FilterOperators.Operator,
18
- GT: FilterOperators.Operator,
19
- GTE: FilterOperators.Operator,
20
- LT: FilterOperators.Operator,
21
- LTE: FilterOperators.Operator,
22
- BEGIN: FilterOperators.Operator,
23
- NBEGIN: FilterOperators.Operator,
24
- END: FilterOperators.Operator,
25
- NEND: FilterOperators.Operator,
26
- CONT: FilterOperators.Operator,
27
- NCONT: FilterOperators.Operator,
28
- EQ_BLANK: FilterOperators.Operator,
29
- EQ_NBLANK: FilterOperators.Operator,
30
- DT: FilterOperators.Operator,
31
- DTA: FilterOperators.Operator,
32
- DTB: FilterOperators.Operator,
33
- TXTEQ: FilterOperators.Operator,
34
- BLANK: FilterOperators.Operator,
35
- NBLANK: FilterOperators.Operator
14
+ EQ: FilterOperators.Operator|null,
15
+ NEQ: FilterOperators.Operator|null,
16
+ NUMEQ: FilterOperators.Operator|null,
17
+ NUMNEQ: FilterOperators.Operator|null,
18
+ GT: FilterOperators.Operator|null,
19
+ GTE: FilterOperators.Operator|null,
20
+ LT: FilterOperators.Operator|null,
21
+ LTE: FilterOperators.Operator|null,
22
+ BEGIN: FilterOperators.Operator|null,
23
+ NBEGIN: FilterOperators.Operator|null,
24
+ END: FilterOperators.Operator|null,
25
+ NEND: FilterOperators.Operator|null,
26
+ CONT: FilterOperators.Operator|null,
27
+ NCONT: FilterOperators.Operator|null,
28
+ EQ_BLANK: FilterOperators.Operator|null,
29
+ EQ_NBLANK: FilterOperators.Operator|null,
30
+ DT: FilterOperators.Operator|null,
31
+ DTA: FilterOperators.Operator|null,
32
+ DTB: FilterOperators.Operator|null,
33
+ TXTEQ: FilterOperators.Operator|null,
34
+ BLANK: FilterOperators.Operator|null,
35
+ NBLANK: FilterOperators.Operator|null
36
36
  };
37
37
 
38
38
  }
@@ -153,21 +153,21 @@ var FilterOperators = {
153
153
  type: "date",
154
154
  positive: 1,
155
155
  caseSensitive: 1,
156
- formula: "Math.floor(ts / 86400000) === Math.floor(input / 86400000)"
156
+ formula: "ts === input"
157
157
  },
158
158
  DTA: {
159
159
  name: "Date is After",
160
160
  type: "date",
161
161
  positive: 1,
162
162
  caseSensitive: 1,
163
- formula: "Math.floor(ts / 86400000) > Math.floor(input / 86400000)"
163
+ formula: "ts > input"
164
164
  },
165
165
  DTB: {
166
166
  name: "Date is Before",
167
167
  type: "date",
168
168
  positive: 1,
169
169
  caseSensitive: 1,
170
- formula: "Math.floor(ts / 86400000) < Math.floor(input / 86400000)"
170
+ formula: "ts < input"
171
171
  }
172
172
  };
173
173
 
@@ -6,11 +6,11 @@ declare class GridPlugin extends EventDispatcher {
6
6
 
7
7
  constructor();
8
8
 
9
- public listen(type: string, handler: ((...params: any[]) => any)): void;
9
+ public listen(type: string, handler: ((...params: any[]) => any)|null): void;
10
10
 
11
- public unlisten(type: string, handler: ((...params: any[]) => any)): void;
11
+ public unlisten(type: string, handler: ((...params: any[]) => any)|null): void;
12
12
 
13
- public afterInit(elem?: Element, model?: any, grid?: any): void;
13
+ public afterInit(elem?: Element|null, model?: any, grid?: any): void;
14
14
 
15
15
  public hasMultiTableSupport(): boolean;
16
16
 
@@ -20,19 +20,19 @@ declare class GridPlugin extends EventDispatcher {
20
20
 
21
21
  public unload(host?: any): void;
22
22
 
23
- public getRelativeGrid(e: Event|Element|any): any|null;
23
+ public getRelativeGrid(e: Event|Element|any): any;
24
24
 
25
25
  public setGridWrapper(gridType: string, wrapperInstance: any): void;
26
26
 
27
- public getGridApi(coreRef?: (number|any)): any;
27
+ public getGridApi(coreRef?: (number|any)|null): any;
28
28
 
29
- public getColumnName(colRef: number|string): string;
29
+ public getColumnName(colRef: number|string|null): string;
30
30
 
31
- public getColumnIndex(colId: number|string): number;
31
+ public getColumnIndex(colId: number|string|null): number;
32
32
 
33
- public getColumnIndices(colRefs: (number|string)[]): (number)[]|null;
33
+ public getColumnIndices(colRefs: (number|string)[]|null): (number)[]|null;
34
34
 
35
- public getColumnId(colIndex: number|string): string;
35
+ public getColumnId(colIndex: number|string|null): string;
36
36
 
37
37
  public getColumnCount(): number;
38
38
 
@@ -42,7 +42,7 @@ declare class GridPlugin extends EventDispatcher {
42
42
 
43
43
  declare function gridAPI(gridType: string, wrapperInstance: any): void;
44
44
 
45
- declare function exportExtension(winObj: Window|any, plugin: GridPlugin): void;
45
+ declare function exportExtension(winObj: Window|any|null, plugin: GridPlugin|null): void;
46
46
 
47
47
  declare function defaultDataGetter(field: string, dvRowData: any): any;
48
48
 
@@ -581,6 +581,26 @@ GridPlugin.prototype._setRowData = function(dv, rowIndex, rowData) {
581
581
  dv.setRowDataAt(rowIndex, rowData);
582
582
  }
583
583
  };
584
+
585
+ /** @protected
586
+ * @ignore
587
+ * @param {tr.DataView} dv
588
+ * @param {number} rowIndex
589
+ * @param {string} field
590
+ * @param {*} value
591
+ */
592
+ GridPlugin.prototype._setStaticData = function(dv, rowIndex, field, value) {
593
+ if(this._realTimeGrid) {
594
+ var dvRowData = dv.getRowDataAt(rowIndex);
595
+ if(dvRowData) {
596
+ dvRowData["ROW_DEF"].setStaticData(field, value);
597
+ }
598
+ } else {
599
+ // TODO: composite grid should be has staticValues when get configObject, wait for request feature
600
+ dv.setDataAt(rowIndex, field, value);
601
+ }
602
+ };
603
+
584
604
  /** Set data in a column manner. This is faster than repeatedly calling this._setData
585
605
  * @protected
586
606
  * @ignore