@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
@@ -5,31 +5,31 @@ import { ElfUtil } from "./ElfUtil.js";
5
5
  declare namespace CellPainter {
6
6
 
7
7
  type Expression = {
8
- name?: string,
8
+ name?: string|null,
9
9
  text: string,
10
- values?: any[]
10
+ values?: any[]|null
11
11
  };
12
12
 
13
13
  type Condition = {
14
14
  field: string,
15
- expression: CellPainter.Expression|string,
16
- backgroundColor?: string,
17
- color?: string,
18
- fontSize?: string,
19
- fontWeight?: string,
20
- fontStyle?: string,
21
- textAlign?: string,
22
- textDecoration?: string
15
+ expression: CellPainter.Expression|string|null,
16
+ backgroundColor?: string|null,
17
+ color?: string|null,
18
+ fontSize?: string|null,
19
+ fontWeight?: string|null,
20
+ fontStyle?: string|null,
21
+ textAlign?: string|null,
22
+ textDecoration?: string|null
23
23
  };
24
24
 
25
25
  type ThemeColors = {
26
- baseGrid?: string,
27
- baseText?: string,
28
- up?: string,
29
- down?: string,
30
- level?: string,
31
- tickUp?: string,
32
- tickDown?: string
26
+ baseGrid?: string|null,
27
+ baseText?: string|null,
28
+ up?: string|null,
29
+ down?: string|null,
30
+ level?: string|null,
31
+ tickUp?: string|null,
32
+ tickDown?: string|null
33
33
  };
34
34
 
35
35
  enum ColoringTypes {
@@ -46,7 +46,7 @@ declare class CellPainter {
46
46
 
47
47
  public static readonly themeReady: Promise<any>|null;
48
48
 
49
- public static parse(expression: string|((...params: any[]) => any)): ((...params: any[]) => any)|null;
49
+ public static parse(expression: string|((...params: any[]) => any)|null): ((...params: any[]) => any)|null;
50
50
 
51
51
  public dispose(): void;
52
52
 
@@ -68,15 +68,15 @@ declare class CellPainter {
68
68
 
69
69
  public getColoringType(): CellPainter.ColoringTypes|null;
70
70
 
71
- public setConditions(conditions: (CellPainter.Condition)[]): void;
71
+ public setConditions(conditions: (CellPainter.Condition)[]|null): void;
72
72
 
73
73
  public setColumnStats(columnStats: any): void;
74
74
 
75
75
  public getColumnStats(): any;
76
76
 
77
- public addHeatmap(field: string, midPoint: number, upColor: string, downColor: string, baseColor: string, opt_textMode?: (string|boolean)): any;
77
+ public addHeatmap(field: string, midPoint: number, upColor: string, downColor: string, baseColor: string, opt_textMode?: (string|boolean)|null): any;
78
78
 
79
- public addHeatmapWithTheme(field: string, midPoint: number, opt_textMode?: (string|boolean)): any;
79
+ public addHeatmapWithTheme(field: string, midPoint: number, opt_textMode?: (string|boolean)|null): any;
80
80
 
81
81
  public addColorText(field: string, upColor: string, downColor: string, levelColor: string): any;
82
82
 
@@ -86,23 +86,23 @@ declare class CellPainter {
86
86
 
87
87
  public addTickColorTextWithTheme(): any;
88
88
 
89
- public addTickBlink(upColor: string, downColor: string, levelColor: string, opt_border?: (string|boolean)): any;
89
+ public addTickBlink(upColor: string, downColor: string, levelColor: string, opt_border?: (string|boolean)|null): any;
90
90
 
91
- public addTickBlinkWithTheme(opt_border?: (string|boolean)): any;
91
+ public addTickBlinkWithTheme(opt_border?: (string|boolean)|null): any;
92
92
 
93
- public addBlink(field: string, upColor: string, downColor: string, levelColor: string, opt_border?: (string|boolean)): any;
93
+ public addBlink(field: string, upColor: string, downColor: string, levelColor: string, opt_border?: (string|boolean)|null): any;
94
94
 
95
- public addBlinkWithTheme(field: string, opt_border?: (string|boolean)): any;
95
+ public addBlinkWithTheme(field: string, opt_border?: (string|boolean)|null): any;
96
96
 
97
- public renderForPrinting(cell: Element, rowData: any, min: number, max: number): void;
97
+ public renderForPrinting(cell: Element|null, rowData: any, min: number, max: number): void;
98
98
 
99
99
  public static blendColor(baseColor: string, maxColor: string, ratio: number): (number)[]|null;
100
100
 
101
101
  public static rgb2Hex(rgbCode: string): string;
102
102
 
103
- public static num2Hex(triplet: (number)[]): string;
103
+ public static num2Hex(triplet: (number)[]|null): string;
104
104
 
105
- public static num2Rgb(triplet: (number)[]): string;
105
+ public static num2Rgb(triplet: (number)[]|null): string;
106
106
 
107
107
  public static hex2Num(hex: string): (number)[]|null;
108
108
 
@@ -114,7 +114,7 @@ declare class CellPainter {
114
114
 
115
115
  public static reloadThemeColors(): Promise<any>|null;
116
116
 
117
- public static getOppositeColor(hexCode: string|(number)[]): string;
117
+ public static getOppositeColor(hexCode: string|(number)[]|null): string;
118
118
 
119
119
  public render(cell: any, rowData: any, min: number, max: number, changedCols?: any): void;
120
120
 
@@ -128,7 +128,7 @@ declare class CellPainter {
128
128
 
129
129
  public verifyBlinking(cell: any, rowData: any): void;
130
130
 
131
- public disableLevelColor(disabled?: boolean): void;
131
+ public disableLevelColor(disabled?: boolean|null): void;
132
132
 
133
133
  }
134
134
 
@@ -235,7 +235,7 @@ CellPainter.prototype.clearHeatMap = function() {
235
235
 
236
236
  /** @public */
237
237
  CellPainter.prototype.applyThemeColor = function() {
238
- var colors = ElfUtil.themeColors;
238
+ var colors = ElfUtil.getColors();
239
239
  var cond = this._conditions[0]; // Heatmap, color text condition must be the first
240
240
  if(cond) {
241
241
  if(this._coloringType === CellPainter.ColoringTypes.HEATMAP) { // Heatmap uses grid color to blend the result color
@@ -822,16 +822,13 @@ CellPainter.themeChanged = function() {};
822
822
  CellPainter.setThemeColors = function() {};
823
823
  /** @private
824
824
  * @function
825
- * @param {Object} colors
826
- * @return {Object} colors
827
825
  */
828
- CellPainter._onThemeChanged = function(colors) {
826
+ CellPainter._onThemeChanged = function() {
829
827
  // Apply newly changed theme to all the painters
830
828
  var painters = CellPainter._painters;
831
829
  for(var i = painters.length; --i >= 0;) {
832
830
  painters[i].applyThemeColor(); // Re-apply theme color
833
831
  }
834
- return colors;
835
832
  };
836
833
  /** Load theme colors and change colors for all instances of CellPainter
837
834
  * @public
@@ -840,7 +837,9 @@ CellPainter._onThemeChanged = function(colors) {
840
837
  */
841
838
  CellPainter.loadThemeColors = function() {
842
839
  if(!CellPainter.themeReady) {
843
- CellPainter.themeReady = ElfUtil.getThemeColors().then(CellPainter._onThemeChanged);
840
+ CellPainter.themeReady = ElfUtil.getThemeColors(CellPainter._onThemeChanged)
841
+ .then(CellPainter._onThemeChanged)
842
+ .catch(CellPainter._onThemeChanged);
844
843
  }
845
844
  return CellPainter.themeReady;
846
845
  };
@@ -851,8 +850,10 @@ CellPainter.loadThemeColors = function() {
851
850
  * @return {Promise<Object>}
852
851
  */
853
852
  CellPainter.reloadThemeColors = function () {
854
- CellPainter.themeReady = ElfUtil.themeReady = null;
855
- return CellPainter.loadThemeColors();
853
+ CellPainter.themeReady = ElfUtil.reloadThemeColors()
854
+ .then(CellPainter._onThemeChanged)
855
+ .catch(CellPainter._onThemeChanged);
856
+ return CellPainter.themeReady;
856
857
  };
857
858
 
858
859
  /** @public
@@ -2,7 +2,7 @@
2
2
 
3
3
  declare class Conflator {
4
4
 
5
- constructor(func?: (((...params: any[]) => any)|number), ms?: (number|((...params: any[]) => any)), thisObj?: any);
5
+ constructor(func?: (((...params: any[]) => any)|number)|null, ms?: (number|((...params: any[]) => any))|null, thisObj?: any);
6
6
 
7
7
  public reset(): any[]|null;
8
8
 
@@ -16,17 +16,17 @@ declare class Conflator {
16
16
 
17
17
  public getData(): any[];
18
18
 
19
- public setFunction(func: ((...params: any[]) => any), thisObj?: any): void;
19
+ public setFunction(func: ((...params: any[]) => any)|null, thisObj?: any): void;
20
20
 
21
21
  public setConflatingTime(ms: number): void;
22
22
 
23
23
  public getConflatingTime(): number;
24
24
 
25
- public disable(opt_disabled?: boolean): void;
25
+ public disable(opt_disabled?: boolean|null): void;
26
26
 
27
27
  public isEnabled(): boolean;
28
28
 
29
- public enable(opt_enabled?: boolean): void;
29
+ public enable(opt_enabled?: boolean|null): void;
30
30
 
31
31
  }
32
32
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  declare namespace CoralItems {
4
4
 
5
- function create(userItems: any[]): (any)[]|null;
5
+ function create(userItems: any[]|null): (any)[]|null;
6
6
 
7
7
  }
8
8
 
@@ -3,17 +3,17 @@ import ElfUtil from './ElfUtil.js';
3
3
 
4
4
  declare namespace DateTime {
5
5
 
6
- function setDateTimePattern(format?: string): void;
6
+ function setDateTimePattern(format?: string|null): void;
7
7
 
8
- function setLocale(lang?: string): void;
8
+ function setLocale(lang?: string|null): void;
9
9
 
10
- function format(dateTimeNumber: number|string|Date, dateTimeFormat?: string, timezone?: string): string;
10
+ function format(dateTimeNumber: number|string|Date|null, dateTimeFormat?: string|null, timezone?: string|null): string;
11
11
 
12
- function formatDateObject(date: Date, dateTimeFormat?: string): string;
12
+ function formatDateObject(date: Date|null, dateTimeFormat?: string|null): string;
13
13
 
14
- function isValidDate(dateObj: Date): boolean;
14
+ function isValidDate(dateObj: Date|null): boolean;
15
15
 
16
- function isInvalidDate(dateObj: Date): boolean;
16
+ function isInvalidDate(dateObj: Date|null): boolean;
17
17
 
18
18
  function fromDateNumber(dateNumber: number): Date;
19
19
 
@@ -21,13 +21,13 @@ declare namespace DateTime {
21
21
 
22
22
  function timeNumberToMs(dateNumber: number): number;
23
23
 
24
- function toDateObject(dateInput: string|number): any;
24
+ function toDateObject(dateInput: string|number|null): any;
25
25
 
26
- function toDateNumber(dateObj: Date): number;
26
+ function toDateNumber(dateObj: Date|null): number;
27
27
 
28
- function toTimeNumber(dateObj: Date): number;
28
+ function toTimeNumber(dateObj: Date|null): number;
29
29
 
30
- function toYYYYMMDD(dateObj: Date): string;
30
+ function toYYYYMMDD(dateObj: Date|null): string;
31
31
 
32
32
  }
33
33
 
@@ -2,12 +2,14 @@
2
2
 
3
3
  declare class Deferred {
4
4
 
5
- constructor(resolveHandler?: ((...params: any[]) => any), rejectHandler?: ((...params: any[]) => any), ctx?: any);
5
+ constructor(resolveHandler?: ((...params: any[]) => any)|null, rejectHandler?: ((...params: any[]) => any)|null, ctx?: any);
6
6
 
7
7
  public resolve(result?: any): void;
8
8
 
9
9
  public reject(result?: any): void;
10
10
 
11
+ public isFulfilled(): boolean;
12
+
11
13
  }
12
14
 
13
15
  export default Deferred;
@@ -54,7 +54,10 @@ Deferred.prototype._rejectHandler = null;
54
54
  * @private
55
55
  */
56
56
  Deferred.prototype._ctx = null;
57
-
57
+ /** @type {boolean}
58
+ * @private
59
+ */
60
+ Deferred.prototype._fulfilled = false;
58
61
 
59
62
  /** @public
60
63
  * @param {*=} result
@@ -86,10 +89,17 @@ Deferred.prototype.reject = function(result) {
86
89
  this._finally();
87
90
  }
88
91
  };
92
+ /** @public
93
+ * @return {boolean}
94
+ */
95
+ Deferred.prototype.isFulfilled = function() {
96
+ return this._fulfilled;
97
+ };
89
98
 
90
99
  /** @private */
91
100
  Deferred.prototype._finally = function() {
92
101
  // Release all references to avoid memory leak
102
+ this._fulfilled = true;
93
103
  this._ctx = this._resolveHandler = this._rejectHandler = null;
94
104
  this._resolve = this._reject = null;
95
105
  };
@@ -2,11 +2,11 @@
2
2
 
3
3
  declare class Delay {
4
4
 
5
- constructor(ms?: number, ctx?: any);
5
+ constructor(ms?: number|null, ctx?: any);
6
6
 
7
7
  public static readonly promise: Promise<any>;
8
8
 
9
- public static for(ms?: number, ctx?: any): Delay|null;
9
+ public static for(ms?: number|null, ctx?: any): Delay|null;
10
10
 
11
11
  public resolve(): void;
12
12
 
@@ -2,29 +2,29 @@
2
2
 
3
3
  declare namespace Dom {
4
4
 
5
- function create(tagName: string, className?: string): Element;
5
+ function create(tagName: string, className?: string|null): Element;
6
6
 
7
- function div(className?: string): Element;
7
+ function div(className?: string|null): Element;
8
8
 
9
- function text(textContent?: string, className?: string): Element;
9
+ function text(textContent?: string|null, className?: string|null): Element;
10
10
 
11
- function appendChild(parentElem: Element, children: Node|any[]): Element|null;
11
+ function appendChild(parentElem: Element|null, children: Node|any[]|null): Element|null;
12
12
 
13
- function buildTree(parentElem: Element, children: Node|any[]): Element|null;
13
+ function buildTree(parentElem: Element|null, children: Node|any[]|null): Element|null;
14
14
 
15
- function setContent(elem: Element, val: any): void;
15
+ function setContent(elem: Element|null, val: any): void;
16
16
 
17
- function preventDefault(e: Event): void;
17
+ function preventDefault(e: Event|null): void;
18
18
 
19
- function stopPropagation(e: Event): void;
19
+ function stopPropagation(e: Event|null): void;
20
20
 
21
21
  function getClientPosition(target: Element|Event|MouseEvent, retObj?: any): any;
22
22
 
23
23
  function getRelativePosition(A: Element|Event|MouseEvent, B: Element|Event|MouseEvent, retObj?: any): any;
24
24
 
25
- function closestElement(elem: Element|Node|undefined, classStr: string): Element|null;
25
+ function closestElement(elem: Element|Node|undefined|null, classStr: string): Element|null;
26
26
 
27
- function closestTagName(elem: Element|Node|undefined, tn: string): Element|null;
27
+ function closestTagName(elem: Element|Node|undefined|null, tn: string): Element|null;
28
28
 
29
29
  }
30
30
 
@@ -307,7 +307,7 @@ Dom.getRelativePosition = function(A, B, retObj) {
307
307
  retObj["y"] -= bp["y"];
308
308
  return /**@type {!Object} */(retObj);
309
309
  };
310
- /** Return closest ancestor element or the element itself with specified class string. Otherwise return null
310
+ /** The method returns closest ancestor element or the element itself with specified class string. Otherwise, it returns null
311
311
  * @public
312
312
  * @function
313
313
  * @param {Element|Node|undefined} elem
@@ -316,15 +316,17 @@ Dom.getRelativePosition = function(A, B, retObj) {
316
316
  */
317
317
  Dom.closestElement = function(elem, classStr) {
318
318
  var n = elem;
319
- while(n && n.classList) {
320
- if(n.classList.contains(classStr)) {
321
- return /** @type{Element} */(n);
319
+ while (n) {
320
+ if(n.classList) { // DocumentFragment does not have classList property
321
+ if (n.classList.contains(classStr)) {
322
+ return /** @type{Element} */(n);
323
+ }
322
324
  }
323
- n = n.parentNode;
325
+ n = n.parentNode || n.host; // ShadowRoot has host, but not parentNode
324
326
  }
325
327
  return null;
326
328
  };
327
- /** Return closest ancestor element or the element itself with the specified tagName. Otherwise return null
329
+ /** The method returns closest ancestor element or the element itself with the specified tagName. Otherwise, it returns null
328
330
  * @public
329
331
  * @function
330
332
  * @param {Element|Node|undefined} elem
@@ -333,11 +335,13 @@ Dom.closestElement = function(elem, classStr) {
333
335
  */
334
336
  Dom.closestTagName = function(elem, tn) {
335
337
  var n = elem;
336
- while(n && n.tagName) {
337
- if(n.tagName == tn) {
338
- return /** @type{Element} */(n);
338
+ while(n) {
339
+ if(n.tagName) {
340
+ if(n.tagName == tn) {
341
+ return /** @type{Element} */(n);
342
+ }
339
343
  }
340
- n = n.parentNode;
344
+ n = n.parentNode || n.host; // ShadowRoot has host, but not parentNode
341
345
  }
342
346
  return null;
343
347
  };
@@ -130,8 +130,11 @@ DragUI.prototype.onThemeLoaded = function(colors) {
130
130
  ".mouse-dragging .cell:hover", [ // for change mouse cursor when hover header while dragging
131
131
  "cursor: grabbing !important;"
132
132
  ],
133
- ":host .column .cell.drag-indicator", [
134
- "border: var(--grid-drag-indicator);" // defualt is "none"
133
+ ".tr-grid .column .cell.drag-indicator", [ // --grid-drag-indicator defualt is "none"
134
+ "border-top: var(--grid-drag-indicator) !important;",
135
+ "border-right: var(--grid-drag-indicator);",
136
+ "border-bottom: var(--grid-drag-indicator);",
137
+ "border-left: var(--grid-drag-indicator);"
135
138
  ],
136
139
  ".tr-dragging, .tr-dragging *", [
137
140
  "-webkit-touch-callout: none;",
@@ -2,9 +2,9 @@
2
2
 
3
3
  declare namespace ElementObserver {
4
4
 
5
- function addLanguageListener(element: Element): void;
5
+ function addLanguageListener(element: Element|null): void;
6
6
 
7
- function addAttributeListener(element: Element, listener: ((...params: any[]) => any), attributeName?: string): void;
7
+ function addAttributeListener(element: Element|null, listener: ((...params: any[]) => any)|null, attributeName?: string|null): void;
8
8
 
9
9
  }
10
10
 
@@ -22,10 +22,10 @@ var _onAttributeMutated = function (listener, attributeName, mutation) {
22
22
  if (mutation.type === "attributes") {
23
23
  if (attributeName != null) {
24
24
  if (mutation.attributeName === attributeName) {
25
- listener(mutation);
25
+ listener(mutation.target.getAttribute(attributeName));
26
26
  }
27
27
  } else {
28
- listener(mutation);
28
+ listener(mutation.target);
29
29
  }
30
30
  }
31
31
  };
@@ -78,9 +78,12 @@ ElementObserver._addListener = function(elem, fn) {
78
78
  }
79
79
  if (!elem._observeId) {
80
80
  var id = ElementObserver._getNewId();
81
- listeners[id] = [];
82
81
  elem._observeId = id;
83
82
  }
83
+ if (!listeners[elem._observeId]) { // Always check to support the using of separated ElfUtil module in testing page
84
+ listeners[elem._observeId] = [];
85
+ }
86
+
84
87
  var listener = listeners[elem._observeId];
85
88
  if (listener.indexOf(fn) < 0) {
86
89
  listener.push(fn);
@@ -7,15 +7,15 @@ declare class ElementWrapper extends EventDispatcher {
7
7
 
8
8
  public getElement(): Element|null;
9
9
 
10
- public setParent(parent: Node|ElementWrapper): void;
10
+ public setParent(parent: Node|ElementWrapper|null): void;
11
11
 
12
12
  public getBoundingClientRect(): any;
13
13
 
14
- public getMousePosition(e: Event, retObj?: any): any;
14
+ public getMousePosition(e: Event|null, retObj?: any): any;
15
15
 
16
- public addEventListener(type: string, listener: ((...params: any[]) => any)): void;
16
+ public addEventListener(type: string, listener: ((...params: any[]) => any)|null): void;
17
17
 
18
- public removeEventListener(type: string, listener: ((...params: any[]) => any)): void;
18
+ public removeEventListener(type: string, listener: ((...params: any[]) => any)|null): void;
19
19
 
20
20
  }
21
21
 
@@ -4,21 +4,21 @@ declare namespace ElfDate {
4
4
 
5
5
  function from(val: any): Date|null;
6
6
 
7
- function isValid(d: Date): boolean;
7
+ function isValid(d: Date|null): boolean;
8
8
 
9
9
  function prefixSingleDigit(n: number): string;
10
10
 
11
- function toYMD(d: string|Date): string;
11
+ function toYMD(d: string|Date|null): string;
12
12
 
13
- function setDate(edtp: Element, val: any): void;
13
+ function setDate(edtp: Element|null, val: any): void;
14
14
 
15
- function getDate(edtp: Element): Date|null;
15
+ function getDate(edtp: Element|null): Date|null;
16
16
 
17
17
  function compare(valA: any, valB: any): number;
18
18
 
19
19
  function equal(valA: any, valB: any): boolean;
20
20
 
21
- function extractDate(d: Date): (number)[]|null;
21
+ function extractDate(d: Date|null): (number)[]|null;
22
22
 
23
23
  }
24
24
 
@@ -9,6 +9,7 @@ var ElfDate = {};
9
9
  * @example
10
10
  * ElfDate.from(1000); // Thu Jan 01 1970 07:00:01 GMT+0700 (Indochina Time)
11
11
  * ElfDate.from("2000/12/2"); // Sat Dec 02 2000 00:00:00 GMT+0700 (Indochina Time)
12
+ * ElfDate.from("2000-12-02"); // Sat Dec 02 2000 07:00:00 GMT+0700 (Indochina Time)
12
13
  * ElfDate.from("2000-12-2"); // Sat Dec 02 2000 00:00:00 GMT+0700 (Indochina Time)
13
14
  * ElfDate.from([2000, 11, 2]);// Sat Dec 02 2000 07:00:00 GMT+0700 (Indochina Time)
14
15
  * ElfDate.from("2/12/2000"); // Sat Feb 12 2000 00:00:00 GMT+0700 (Indochina Time)
@@ -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
  declare namespace ElfUtil {
5
6
 
@@ -13,20 +14,28 @@ declare namespace ElfUtil {
13
14
 
14
15
  function hasTheme(themeName: string): boolean;
15
16
 
16
- function getThemeName(optElem?: Element): string;
17
+ function getThemeName(optElem?: Element|null): string;
17
18
 
18
- function isHaloTheme(themeName?: string): boolean;
19
+ function isThemeLoaded(): boolean;
19
20
 
20
- function injectIcons(configObj: any, optElem?: Element): void;
21
+ function getColors(): any;
22
+
23
+ function isHaloTheme(themeName?: string|null): boolean;
24
+
25
+ function injectIcons(configObj: any, optElem?: Element|null): void;
21
26
 
22
27
  function getIconList(): (string)[];
23
28
 
24
29
  function prepareIconPreloading(): (string)[]|null;
25
30
 
26
- function getThemeColors(): Promise<any>|null;
31
+ function setRTK(rtk: any): void;
27
32
 
28
33
  function getMovementColorProfile(): string;
29
34
 
35
+ function reloadThemeColors(): Promise<any>|null;
36
+
37
+ function getThemeColors(themeChangedCb?: ((...params: any[]) => any)|null): Promise<any>|null;
38
+
30
39
  }
31
40
 
32
41
  export default ElfUtil;