@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
@@ -8,9 +8,9 @@ declare namespace Dom {
8
8
 
9
9
  function text(textContent?: string, className?: string): Element;
10
10
 
11
- function appendChild(parentElem: Element, children: Node|any[]): Element;
11
+ function appendChild(parentElem: Element, children: Node|any[]): Element|null;
12
12
 
13
- function buildTree(parentElem: Element, children: Node|any[]): Element;
13
+ function buildTree(parentElem: Element, children: Node|any[]): Element|null;
14
14
 
15
15
  function setContent(elem: Element, val: any): void;
16
16
 
@@ -22,9 +22,9 @@ declare namespace Dom {
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;
25
+ function closestElement(elem: Element|Node|undefined, classStr: string): Element|null;
26
26
 
27
- function closestTagName(elem: Element|Node|undefined, tn: string): Element;
27
+ function closestTagName(elem: Element|Node|undefined, tn: string): Element|null;
28
28
 
29
29
  }
30
30
 
@@ -0,0 +1,16 @@
1
+ import { injectCss, prettifyCss } from "./Util.js";
2
+ import Dom from "./Dom.js";
3
+ import ElfUtil from "./ElfUtil.js";
4
+
5
+ declare class DragUI {
6
+
7
+ constructor(options: any);
8
+
9
+ public static applyThemeColor(grid: any): void;
10
+
11
+ public onThemeLoaded(colors: any): void;
12
+
13
+ }
14
+
15
+ export default DragUI;
16
+ export {DragUI};
@@ -0,0 +1,214 @@
1
+ import { injectCss, prettifyCss } from "./Util.js";
2
+ import Dom from "./Dom.js";
3
+ import ElfUtil from "./ElfUtil.js";
4
+
5
+ /**
6
+ * @constructor
7
+ * @param {Object} options
8
+ */
9
+ var DragUI = function(options) {
10
+ this._dragBox = options.dragBox;
11
+ this._dragBoxIcon = options.dragBoxIcon;
12
+
13
+ };
14
+
15
+ /** @type {string}
16
+ * @private
17
+ */
18
+ DragUI._styles = ""; // Static variable
19
+ /** @type {Element}
20
+ * @private
21
+ */
22
+ DragUI.prototype._guideline = null;
23
+ /** @type {Element}
24
+ * @private
25
+ */
26
+ DragUI.prototype._dragBox = null;
27
+ /** @type {Element}
28
+ * @private
29
+ */
30
+ DragUI.prototype._dragBoxIcon = null;
31
+ /** Core grid instance
32
+ * @type {Object}
33
+ * @private
34
+ */
35
+ DragUI.prototype._grid = null;
36
+
37
+ /** @public
38
+ * @param {Object} grid core grid instance
39
+ */
40
+ DragUI.applyThemeColor = function(grid) {
41
+ // This call after onThemeLoaded from extensions initialize
42
+
43
+ if(!grid || grid._dragUIStyles) {
44
+ return;
45
+ }
46
+
47
+ if(DragUI._styles) {
48
+ grid._dragUIStyles = true; // Prevent loading the same style twice
49
+ injectCss(DragUI._styles, grid.getElement());
50
+ } else {
51
+ // TODO : Handle if can not load DragUI._styles try to set new DragUI._styles
52
+ // Warning: This process have to use ElfUtil.getThemeColors() that async process for Backward compatability.
53
+ // When use async process, then it can be load theme multiple times.
54
+
55
+ }
56
+ };
57
+
58
+ /** @public
59
+ * @param {Object} colors
60
+ */
61
+ DragUI.prototype.onThemeLoaded = function(colors) {
62
+ if(!DragUI._styles) {
63
+ var styles = [ // Main Styles without theme
64
+ ".tr-row-guideline", [ // Backward compatability of row dragging
65
+ "position: absolute;",
66
+ "left: 0;",
67
+ "top: 0;",
68
+ "pointer-events: none;",
69
+ "text-align: center;",
70
+ "border-top-width: 3px;",
71
+ "border-top-style: solid;"
72
+ ],
73
+ ".guideline", [
74
+ "position: absolute;",
75
+ "left: 0;",
76
+ "top: 0;",
77
+ "pointer-events: none;",
78
+ "text-align: center;",
79
+ "border-top-style: solid;",
80
+ "width: 3px;",
81
+ "border-top-color: var(--grid-title-icon-color);",
82
+ "color: var(--grid-title-icon-color);",
83
+ "background-color: var(--grid-title-icon-color);"
84
+ ],
85
+ ".drag-box", [
86
+ "position: absolute;",
87
+ "left: 0;",
88
+ "top: 0;",
89
+ "pointer-events: none;",
90
+ "background-color: var(--grid-dragbox-bgcolor);",
91
+ "border: solid 1px var(--grid-title-sort-icon-color);",
92
+ "width: 134px;",
93
+ "height: 29px;",
94
+ "line-height: 29px;",
95
+ "white-space: nowrap;",
96
+ "overflow-x: clip;",
97
+ "text-overflow: ellipsis;",
98
+ "padding: 0 7px 0 7px;",
99
+ "box-shadow: 0 0 8px var(--grid-dragbox-bordercolor);"
100
+ ],
101
+ ".drag-box-disabled", [
102
+ "width: 100px;",
103
+ "left: 0;",
104
+ "top: 0;",
105
+ "position: absolute;"
106
+ ],
107
+ ".drag-box-icon", [
108
+ "top: -4px;",
109
+ "left: 12px;",
110
+ "padding: 2px;",
111
+ "border-radius: 100%;",
112
+ "font-size: 11px;",
113
+ "position: absolute;"
114
+ ],
115
+ ".drag-box-icon[icon='void']", [
116
+ "background-color:var(--grid-void-icon-bgcolor);",
117
+ "color:var(--grid-void-icon-color);"
118
+ ],
119
+ ".drag-box-icon[icon='add']", [
120
+ "background-color:var(--grid-insertion-icon-bgcolor);",
121
+ "color:var(--grid-insertion-icon-color);"
122
+ ],
123
+ ":host", [
124
+ "--grid-dragbox-bgcolor: #ffffff;", // If the value cannot be found, default to halo-light
125
+ "--grid-insertion-icon-bgcolor: #39c46e;",
126
+ "--grid-insertion-icon-color: #1A1A1A;",
127
+ "--grid-void-icon-bgcolor: #F5475B;",
128
+ "--grid-void-icon-color: #FFFFFF;"
129
+ ],
130
+ ".mouse-dragging .cell:hover", [ // for change mouse cursor when hover header while dragging
131
+ "cursor: grabbing !important;"
132
+ ],
133
+ ":host .column .cell.drag-indicator", [
134
+ "border: var(--grid-drag-indicator);" // defualt is "none"
135
+ ],
136
+ ".tr-dragging, .tr-dragging *", [
137
+ "-webkit-touch-callout: none;",
138
+ ".user-select(none);"
139
+ ]
140
+ ];
141
+ var guidelineColor = "#ff9933";
142
+ var ElfVersion = ElfUtil.getElfVersion();
143
+ if(colors.primary) {
144
+ guidelineColor = colors.primary;
145
+ }
146
+ guidelineColor += ";";
147
+
148
+ styles.push(".tr-row-guideline", [
149
+ "border-top-color: " + guidelineColor,
150
+ "color: " + guidelineColor
151
+ ]);
152
+
153
+ if(ElfVersion < 3) { // Backward compatability
154
+ styles.push(".pearl .tr-row-guideline, *[theme=pearl] .tr-row-guideline", [
155
+ "border-top-color: #ee7600;",
156
+ "color: #ee7600;",
157
+ "background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));"
158
+ ]);
159
+ }
160
+ DragUI._styles = prettifyCss(styles);
161
+ }
162
+ };
163
+
164
+ /** @private
165
+ * @param {!Element|Event|MouseEvent} e
166
+ * @param {Object} grid
167
+ * @returns {boolean}=true means dragBox can be drop
168
+ */
169
+ DragUI.prototype.renderDragBox = function (e, grid) {
170
+ if(!grid) {
171
+ return false;
172
+ }
173
+
174
+ var gridElem = grid.getElement();
175
+ var gridParent = grid.getParent().parentNode;
176
+ var pn = this._dragBox.parentNode;
177
+ if(!pn) {
178
+ gridParent.appendChild(this._dragBox);
179
+ }
180
+
181
+ var iconParent = this._dragBoxIcon.parentNode;
182
+
183
+ var dragBoxIcon = e.dragBoxIcon || this._dragBox.dragBoxIcon;
184
+ this._dragBoxIcon.style.visibility = "visible";
185
+ var drop = true;
186
+ if(dragBoxIcon === "insertion") {
187
+ drop = false;
188
+ this._dragBoxIcon.icon = "add";
189
+ if(!iconParent) {
190
+ this._dragBox.appendChild(this._dragBoxIcon);
191
+ }
192
+ } else if (dragBoxIcon === "not-allowed" || dragBoxIcon === "no-drop" || dragBoxIcon === "void" ) {
193
+ drop = false;
194
+ this._dragBoxIcon.icon = "void";
195
+ if(!iconParent) {
196
+ this._dragBox.appendChild(this._dragBoxIcon);
197
+ }
198
+ } else {
199
+ Dom.removeParent(this._dragBoxIcon);
200
+ }
201
+
202
+ var gridRect = gridElem.getBoundingClientRect();
203
+
204
+ var x = e.clientX - gridRect.left;
205
+ var y = e.pageY - gridRect.top;
206
+
207
+ // space for mouse cursor
208
+ this._dragBox.style.left = x - 5 + "px";
209
+ this._dragBox.style.top = y + 8 + "px";
210
+ return drop;
211
+ };
212
+
213
+ export default DragUI;
214
+ export {DragUI};
@@ -4,6 +4,8 @@ declare namespace ElementObserver {
4
4
 
5
5
  function addLanguageListener(element: Element): void;
6
6
 
7
+ function addAttributeListener(element: Element, listener: ((...params: any[]) => any), attributeName?: string): void;
8
+
7
9
  }
8
10
 
9
11
  export default ElementObserver;
@@ -13,6 +13,23 @@ var _onLanguageMutated = function (elem, mutation) {
13
13
  }
14
14
  };
15
15
 
16
+ /** @private
17
+ * @param {Function} listener
18
+ * @param {string=} attributeName
19
+ * @param {MutationRecord} mutation
20
+ */
21
+ var _onAttributeMutated = function (listener, attributeName, mutation) {
22
+ if (mutation.type === "attributes") {
23
+ if (attributeName != null) {
24
+ if (mutation.attributeName === attributeName) {
25
+ listener(mutation);
26
+ }
27
+ } else {
28
+ listener(mutation);
29
+ }
30
+ }
31
+ };
32
+
16
33
  /** @private
17
34
  * @return {string}
18
35
  */
@@ -71,7 +88,7 @@ ElementObserver._addListener = function(elem, fn) {
71
88
  };
72
89
 
73
90
  /** @public Add a listener to a html lang attribute
74
- * @param {Element} element A target element to listen to
91
+ * @param {Element} element An element within the DOM tree to watch for changes
75
92
  */
76
93
  ElementObserver.addLanguageListener = function(element) {
77
94
  if (!element) { return; }
@@ -81,6 +98,16 @@ ElementObserver.addLanguageListener = function(element) {
81
98
  ElementObserver._addObserver(document.documentElement, _onLanguageMutated.bind(null, element));
82
99
  };
83
100
 
101
+ /** @public Add a listener to a html attribute
102
+ * @param {Element} element An element within the DOM tree to watch for changes
103
+ * @param {Function} listener A function which will be called on each attribute change
104
+ * @param {string=} attributeName If not specified, listener will be called on every attribute change
105
+ */
106
+ ElementObserver.addAttributeListener = function(element, listener, attributeName) {
107
+ if (!element || !listener) { return; }
108
+ ElementObserver._addObserver(element, _onAttributeMutated.bind(null, listener, attributeName));
109
+ };
110
+
84
111
  /**
85
112
  * @type {MutationObserver}
86
113
  * @private
@@ -5,7 +5,7 @@ declare class ElementWrapper extends EventDispatcher {
5
5
 
6
6
  constructor();
7
7
 
8
- public getElement(): Element;
8
+ public getElement(): Element|null;
9
9
 
10
10
  public setParent(parent: Node|ElementWrapper): void;
11
11
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  declare namespace ElfDate {
4
4
 
5
- function from(val: any): Date;
5
+ function from(val: any): Date|null;
6
6
 
7
7
  function isValid(d: Date): boolean;
8
8
 
@@ -12,13 +12,13 @@ declare namespace ElfDate {
12
12
 
13
13
  function setDate(edtp: Element, val: any): void;
14
14
 
15
- function getDate(edtp: Element): Date;
15
+ function getDate(edtp: Element): 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)[];
21
+ function extractDate(d: Date): (number)[]|null;
22
22
 
23
23
  }
24
24
 
@@ -3,9 +3,9 @@ import { Deferred } from "./Deferred.js";
3
3
 
4
4
  declare namespace ElfUtil {
5
5
 
6
- const themeReady: Promise<any>;
6
+ const themeReady: Promise<any>|null;
7
7
 
8
- const themeColors: { [key: string]: string };
8
+ const themeColors: { [key: string]: string }|null;
9
9
 
10
10
  function getElfVersion(): number;
11
11
 
@@ -21,9 +21,9 @@ declare namespace ElfUtil {
21
21
 
22
22
  function getIconList(): (string)[];
23
23
 
24
- function prepareIconPreloading(): (string)[];
24
+ function prepareIconPreloading(): (string)[]|null;
25
25
 
26
- function getThemeColors(): Promise<any>;
26
+ function getThemeColors(): Promise<any>|null;
27
27
 
28
28
  function getMovementColorProfile(): string;
29
29
 
@@ -78,7 +78,7 @@ ElfUtil._icons = {
78
78
  "sortable": "sort-up-down"
79
79
  },
80
80
  "columnStack": {
81
- "stack": "list",
81
+ "stack": "map-layers",
82
82
  "expand": "right",
83
83
  "collapse": "left"
84
84
  }
@@ -12,7 +12,7 @@ declare class EventDispatcher {
12
12
 
13
13
  public hasListener(type: string): boolean;
14
14
 
15
- public getListener(type: string, idx?: number): ((...params: any[]) => any);
15
+ public getListener(type: string, idx?: number): ((...params: any[]) => any)|null;
16
16
 
17
17
  public addListener(obj: any, type: string): void;
18
18
 
@@ -39,10 +39,10 @@ ExpanderIcon._iconName = ""; // static variable
39
39
  * @private
40
40
  */
41
41
  ExpanderIcon._styles = prettifyCss([
42
- ".tr-grid .expander-disabled .expander", [
42
+ ".tr-grid.expander-disabled .expander", [
43
43
  "cursor: default;"
44
44
  ],
45
- ".tr-grid .folder-disabled .column .cell.folder", [
45
+ ".tr-grid.folder-disabled .cell.folder", [
46
46
  "cursor: default;"
47
47
  ],
48
48
  ".tr-grid .expander", [
@@ -25,7 +25,7 @@ declare class FieldFormatter {
25
25
 
26
26
  public getField(): string;
27
27
 
28
- public clone(): FieldFormatter;
28
+ public clone(): FieldFormatter|null;
29
29
 
30
30
  public setFormatType(type: string): void;
31
31
 
@@ -167,7 +167,7 @@ FieldFormatter.prototype.init = function(options) { // deserialize
167
167
  var utc = options["useUTCTime"];
168
168
  if(utc != null || dtf != null) {
169
169
  this.setDateTimeMeta(
170
- dtf || "MM/DD/YYYY",
170
+ dtf,
171
171
  utc,
172
172
  (options["idnSource"]) ? "idn" : "" // IDN Source will send time in second instead of millisecond.
173
173
  );
@@ -188,8 +188,10 @@ FieldFormatter.prototype.getOptions = function(options) { // serialize
188
188
 
189
189
  options["field"] = this._field;
190
190
  options["formatType"] = this._userFormatType ? this._userFormatType : this._formatType; // WARNING: Beware of case sensitivity
191
- options["dateTimeFormat"] = this._dateTimeFormat;
192
- options["useUTCTime"] = (this._timeZone == "GMT");
191
+ if(toDateTimeType(options["formatType"]) == DATE_TIME){
192
+ options["dateTimeFormat"] = this._dateTimeFormat;
193
+ options["useUTCTime"] = (this._timeZone == "GMT");
194
+ }
193
195
  return options;
194
196
  };
195
197
  /** @public
@@ -244,7 +246,7 @@ FieldFormatter.prototype.setField = function(field, combinedField, formattedFiel
244
246
  * @param {string=} lang
245
247
  */
246
248
  FieldFormatter.prototype.setDateTimeMeta = function(format, gmtTimeZone, inputSource, lang) {
247
- this._dateTimeFormat = format;
249
+ this._dateTimeFormat = format || "";
248
250
  this._timeZone = (gmtTimeZone !== false) ? "GMT" : "LOCAL";
249
251
  this._idnSource = (inputSource && inputSource.toLowerCase() == "idn") ? "idn" : "";
250
252
  DateTime.setLocale(lang);
@@ -385,7 +387,7 @@ FieldFormatter.prototype._formatDateTime = function(val, rowData) {
385
387
  }
386
388
  val = new Date(sec * 1000); // Convert real-time raw data (second) to millisecond
387
389
  }
388
- return this._df(val, this._dateTimeFormat, this._timeZone);
390
+ return this._df(val, this._dateTimeFormat || "MM/DD/YYYY", this._timeZone);
389
391
  };
390
392
  /** @private
391
393
  * @param {number|string|Date} val
@@ -32,17 +32,17 @@ declare class FilterBuilder {
32
32
 
33
33
  public addConditions(conditions: FilterBuilder.Conditions): number;
34
34
 
35
- public getConditions(): FilterBuilder.Conditions;
35
+ public getConditions(): FilterBuilder.Conditions|null;
36
36
 
37
- public buildFilter(): ((...params: any[]) => any);
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);
39
+ public buildMonitorFilter(filterStr: string, field: string, formatter?: ((...params: any[]) => any), formattedField?: string): ((...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);
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;
42
42
 
43
43
  }
44
44
 
45
- declare function buildFilterFromObjectMap(obj: any, field: string, rawDataAccessor?: ((...params: any[]) => any)): ((...params: any[]) => any);
45
+ declare function buildFilterFromObjectMap(obj: any, field: string, rawDataAccessor?: ((...params: any[]) => any)): ((...params: any[]) => any)|null;
46
46
 
47
47
  export default FilterBuilder;
48
48
  export { FilterBuilder, buildFilterFromObjectMap };
@@ -20,7 +20,7 @@ declare class GridPlugin extends EventDispatcher {
20
20
 
21
21
  public unload(host?: any): void;
22
22
 
23
- public getRelativeGrid(e: Event|Element|any): any;
23
+ public getRelativeGrid(e: Event|Element|any): any|null;
24
24
 
25
25
  public setGridWrapper(gridType: string, wrapperInstance: any): void;
26
26
 
@@ -30,13 +30,13 @@ declare class GridPlugin extends EventDispatcher {
30
30
 
31
31
  public getColumnIndex(colId: number|string): number;
32
32
 
33
- public getColumnIndices(colRefs: (number|string)[]): (number)[];
33
+ public getColumnIndices(colRefs: (number|string)[]): (number)[]|null;
34
34
 
35
35
  public getColumnId(colIndex: number|string): string;
36
36
 
37
37
  public getColumnCount(): number;
38
38
 
39
- public static requestPlugin(ref: any, pluginRef: any, configObj?: any, compositeGrid?: any, realTimeGrid?: any): Promise<any>;
39
+ public static requestPlugin(ref: any, pluginRef: any, configObj?: any, compositeGrid?: any, realTimeGrid?: any): Promise<any>|null;
40
40
 
41
41
  }
42
42
 
@@ -262,13 +262,17 @@ GridPlugin.prototype.getColumnIndex = function (colId) {
262
262
  GridPlugin.prototype.getColumnIndices = function (colRefs) {
263
263
  if(this._compositeGrid) {
264
264
  var allFields = this._compositeGrid.getColumnFields();
265
+ var columnCount = this._compositeGrid.getColumnCount();
265
266
  var columnIndices = [];
267
+ var colRef;
266
268
  for (var i = 0; i < colRefs.length; i++) {
267
-
268
- if(typeof colRefs[i] === 'number') { // When user pass index
269
- columnIndices.push(colRefs[i]);
269
+ colRef = colRefs[i];
270
+ if(typeof colRef === 'number') { // When user pass index
271
+ if(colRef >= 0 && colRef < columnCount) {
272
+ columnIndices.push(colRef);
273
+ }
270
274
  } else {
271
- var columnIndex = allFields.indexOf(colRefs[i]); // Looping check column index of colRefs field
275
+ var columnIndex = allFields.indexOf(colRef); // Looping check column index of colRefs field
272
276
  if(columnIndex !== -1) {
273
277
  columnIndices.push(columnIndex);
274
278
  }
@@ -22,7 +22,7 @@ declare class MouseDownTrait extends EventDispatcher {
22
22
 
23
23
  public enable(opt_bool?: boolean): void;
24
24
 
25
- public getElement(): Element;
25
+ public getElement(): Element|null;
26
26
 
27
27
  public setElement(elem?: Element): void;
28
28
 
@@ -8,7 +8,7 @@ declare class MultiTableManager {
8
8
 
9
9
  constructor(gridElem: Element);
10
10
 
11
- public static synchronizeVScrollbar(vScrollbarHost: Element, hScrollbarHost: Element, gridElems: (Element)[]): Promise<any[]>;
11
+ public static synchronizeVScrollbar(vScrollbarHost: Element, hScrollbarHost: Element, gridElems: (Element)[]): Promise<any[]>|null;
12
12
 
13
13
  public setGridConfig(configObj?: any): void;
14
14
 
@@ -18,7 +18,9 @@ declare class MultiTableManager {
18
18
 
19
19
  public setTableCount(num: number): void;
20
20
 
21
- public getTable(at?: number): Element;
21
+ public wrapTable(rowCount: number): void;
22
+
23
+ public getTable(at?: number): Element|null;
22
24
 
23
25
  public insertRow(rowOption?: any, at?: number): void;
24
26
 
@@ -26,6 +28,12 @@ declare class MultiTableManager {
26
28
 
27
29
  public getRowCount(): number;
28
30
 
31
+ public insertColumn(columnOption: any, idx?: number): void;
32
+
33
+ public removeColumn(colRef: any): void;
34
+
35
+ public getColumnCount(): number;
36
+
29
37
  }
30
38
 
31
39
  export default MultiTableManager;