@refinitiv-ui/efx-grid 6.0.2 → 6.0.5

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 (203) 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 +146 -5
  8. package/lib/core/dist/core.css +1 -1
  9. package/lib/core/dist/core.js +468 -1092
  10. package/lib/core/dist/core.min.js +1 -1
  11. package/lib/core/es6/data/ColumnStats.d.ts +2 -2
  12. package/lib/core/es6/data/DataCache.d.ts +4 -4
  13. package/lib/core/es6/data/DataTable.d.ts +5 -5
  14. package/lib/core/es6/data/DataTable.js +33 -11
  15. package/lib/core/es6/data/DataView.d.ts +12 -18
  16. package/lib/core/es6/data/DataView.js +0 -4
  17. package/lib/core/es6/data/Segment.d.ts +2 -0
  18. package/lib/core/es6/data/Segment.js +7 -0
  19. package/lib/core/es6/data/SegmentCollection.d.ts +3 -3
  20. package/lib/core/es6/data/WrappedView.d.ts +13 -13
  21. package/lib/core/es6/data/WrappedView.js +6 -6
  22. package/lib/core/es6/grid/Core.d.ts +31 -27
  23. package/lib/core/es6/grid/Core.js +47 -11
  24. package/lib/core/es6/grid/ILayoutGrid.d.ts +15 -15
  25. package/lib/core/es6/grid/LayoutGrid.js +54 -26
  26. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +71 -0
  27. package/lib/core/es6/grid/components/Cell.d.ts +4 -4
  28. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +1 -1
  29. package/lib/core/es6/grid/components/CellSpans.d.ts +8 -8
  30. package/lib/core/es6/grid/components/Column.d.ts +1 -1
  31. package/lib/core/es6/grid/components/ElementWrapper.d.ts +6 -6
  32. package/lib/core/es6/grid/components/Scrollbar.d.ts +3 -1
  33. package/lib/core/es6/grid/components/Scrollbar.js +13 -0
  34. package/lib/core/es6/grid/components/StretchedCells.js +2 -2
  35. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  36. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +147 -81
  37. package/lib/core/es6/grid/util/Conflator.d.ts +2 -2
  38. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +3 -3
  39. package/lib/core/es6/grid/util/HttpRequest.d.ts +2 -2
  40. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +1 -1
  41. package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
  42. package/lib/core/es6/grid/util/SectionSettings.d.ts +5 -5
  43. package/lib/core/es6/grid/util/SectionSettings.js +5 -0
  44. package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
  45. package/lib/core/es6/grid/util/TrackLayout.d.ts +7 -3
  46. package/lib/core/es6/grid/util/TrackLayout.js +27 -0
  47. package/lib/core/es6/grid/util/util.d.ts +2 -2
  48. package/lib/core/es6/index.d.ts +1 -5
  49. package/lib/core/es6/index.js +1 -7
  50. package/lib/core/es6/tr-grid-theme.js +1 -1
  51. package/lib/filter-dialog/lib/checkbox-list.d.ts +13 -1
  52. package/lib/filter-dialog/lib/filter-dialog.d.ts +14 -1
  53. package/lib/filter-dialog/lib/filter-dialog.js +86 -26
  54. package/lib/filter-dialog/themes/base-checkbox.less +8 -1
  55. package/lib/filter-dialog/themes/base.less +69 -1
  56. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
  57. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
  58. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
  59. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
  60. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
  61. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
  62. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
  63. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
  64. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
  65. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
  66. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
  67. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
  68. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
  69. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
  70. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
  71. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
  72. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
  73. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
  74. package/lib/grid/lib/efx-grid.d.ts +25 -10
  75. package/lib/grid/lib/efx-grid.js +22 -56
  76. package/lib/grid/themes/base.less +1 -1
  77. package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
  78. package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
  79. package/lib/grid/themes/halo/efx-grid.less +33 -39
  80. package/lib/grid/themes/halo/light/efx-grid.js +1 -1
  81. package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
  82. package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
  83. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
  84. package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
  85. package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
  86. package/lib/index.d.ts +2 -0
  87. package/lib/index.js +2 -0
  88. package/lib/row-segmenting/es6/RowSegmenting.d.ts +7 -2
  89. package/lib/row-segmenting/es6/RowSegmenting.js +98 -11
  90. package/lib/rt-grid/dist/rt-grid.js +1244 -1249
  91. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  92. package/lib/rt-grid/es6/ColumnDefinition.d.ts +5 -3
  93. package/lib/rt-grid/es6/ColumnDefinition.js +17 -108
  94. package/lib/rt-grid/es6/DataConnector.d.ts +3 -3
  95. package/lib/rt-grid/es6/Grid.d.ts +24 -9
  96. package/lib/rt-grid/es6/Grid.js +285 -103
  97. package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
  98. package/lib/rt-grid/es6/RowDefSorter.js +137 -0
  99. package/lib/rt-grid/es6/RowDefinition.d.ts +9 -7
  100. package/lib/rt-grid/es6/RowDefinition.js +6 -0
  101. package/lib/rt-grid/es6/SnapshotFiller.d.ts +6 -1
  102. package/lib/rt-grid/es6/SnapshotFiller.js +144 -15
  103. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +4 -3
  104. package/lib/tr-grid-checkbox/es6/Checkbox.js +51 -21
  105. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +46 -9
  106. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +8 -4
  107. package/lib/tr-grid-column-stack/es6/ColumnStack.js +240 -125
  108. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +4 -3
  109. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +28 -13
  110. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +8 -5
  111. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +106 -3
  112. package/lib/tr-grid-percent-bar/es6/PercentBar.js +1 -1
  113. package/lib/tr-grid-printer/es6/CellWriter.d.ts +3 -3
  114. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +1 -1
  115. package/lib/tr-grid-printer/es6/GridPrinter.js +26 -13
  116. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +2 -2
  117. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +3 -3
  118. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +3 -4
  119. package/lib/tr-grid-row-dragging/es6/RowDragging.js +86 -195
  120. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +7 -2
  121. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +97 -7
  122. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +8 -8
  123. package/lib/tr-grid-row-selection/es6/RowSelection.js +55 -31
  124. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
  125. package/lib/tr-grid-textformatting/es6/TextFormatting.js +12 -0
  126. package/lib/tr-grid-util/es6/CellPainter.js +1 -1
  127. package/lib/tr-grid-util/es6/DragUI.d.ts +16 -0
  128. package/lib/tr-grid-util/es6/DragUI.js +214 -0
  129. package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -0
  130. package/lib/tr-grid-util/es6/ElementObserver.js +32 -2
  131. package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -1
  132. package/lib/tr-grid-util/es6/ElfUtil.js +131 -28
  133. package/lib/tr-grid-util/es6/ExpanderIcon.js +2 -2
  134. package/lib/tr-grid-util/es6/FieldFormatter.js +7 -5
  135. package/lib/tr-grid-util/es6/GridPlugin.js +8 -4
  136. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +8 -0
  137. package/lib/tr-grid-util/es6/MultiTableManager.js +164 -57
  138. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +2 -0
  139. package/lib/tr-grid-util/es6/NumberFormatter.js +64 -19
  140. package/lib/tr-grid-util/es6/RowPainter.js +57 -19
  141. package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
  142. package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
  143. package/lib/types/es6/Checkbox.d.ts +4 -3
  144. package/lib/types/es6/ColumnStack.d.ts +8 -4
  145. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +3 -2
  146. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +2 -1
  147. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +20 -18
  148. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +2 -1
  149. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +3 -2
  150. package/lib/types/es6/CompositeGrid/Plugin.d.ts +28 -0
  151. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
  152. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +5 -4
  153. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +2 -1
  154. package/lib/types/es6/CompositeGrid/index.d.ts +9 -9
  155. package/lib/types/es6/ConditionalColoring.d.ts +4 -3
  156. package/lib/types/es6/Core/data/ColumnStats.d.ts +2 -2
  157. package/lib/types/es6/Core/data/DataCache.d.ts +4 -4
  158. package/lib/types/es6/Core/data/DataTable.d.ts +5 -5
  159. package/lib/types/es6/Core/data/DataView.d.ts +12 -18
  160. package/lib/types/es6/Core/data/Segment.d.ts +2 -0
  161. package/lib/types/es6/Core/data/SegmentCollection.d.ts +3 -3
  162. package/lib/types/es6/Core/data/WrappedView.d.ts +13 -13
  163. package/lib/types/es6/Core/grid/Core.d.ts +31 -27
  164. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +15 -15
  165. package/lib/types/es6/Core/grid/components/Cell.d.ts +4 -4
  166. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +1 -1
  167. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +8 -8
  168. package/lib/types/es6/Core/grid/components/Column.d.ts +1 -1
  169. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +6 -6
  170. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +3 -1
  171. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  172. package/lib/types/es6/Core/grid/util/Conflator.d.ts +2 -2
  173. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +3 -3
  174. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +2 -2
  175. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +1 -1
  176. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
  177. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +5 -5
  178. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
  179. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +7 -3
  180. package/lib/types/es6/Core/grid/util/util.d.ts +2 -2
  181. package/lib/types/es6/Core/index.d.ts +1 -5
  182. package/lib/types/es6/ExtensionOptions.d.ts +2 -0
  183. package/lib/types/es6/InCellEditing.d.ts +8 -5
  184. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +5 -3
  185. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +3 -3
  186. package/lib/types/es6/RealtimeGrid/Grid.d.ts +24 -9
  187. package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
  188. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +9 -7
  189. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +6 -1
  190. package/lib/types/es6/RowDragging.d.ts +3 -4
  191. package/lib/types/es6/RowGrouping.d.ts +7 -2
  192. package/lib/types/es6/RowSegmenting.d.ts +7 -2
  193. package/lib/types/es6/RowSelection.d.ts +8 -8
  194. package/lib/types/es6/TextFormatting.d.ts +1 -1
  195. package/lib/types/es6/index.d.ts +1 -0
  196. package/lib/versions.json +17 -16
  197. package/package.json +1 -1
  198. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  199. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +0 -615
  200. package/lib/core/es6/grid/plugins/Plugin.d.ts +0 -28
  201. package/lib/core/es6/grid/plugins/Plugin.js +0 -272
  202. package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  203. package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +0 -28
@@ -34,6 +34,7 @@ var ColumnSelectionPlugin = function ColumnSelectionPlugin(options) {
34
34
  t._onMouseDown = t._onMouseDown.bind(t);
35
35
  t._onKeyDown = t._onKeyDown.bind(t);
36
36
  t._onColumnRemoved = t._onColumnRemoved.bind(t);
37
+ t._onColumnAdded = t._onColumnAdded.bind(t);
37
38
  t._onReselection = t._onReselection.bind(t);
38
39
  t._onThemeLoaded = t._onThemeLoaded.bind(t);
39
40
  t._onColumnPositionChanged = t._onColumnPositionChanged.bind(t);
@@ -93,7 +94,12 @@ ColumnSelectionPlugin.prototype._timerMenuId = 0;
93
94
  * @private
94
95
  */
95
96
 
96
- ColumnSelectionPlugin.prototype._pendingSelection = -1;
97
+ ColumnSelectionPlugin.prototype._pendingSelectionOnAdded = -1;
98
+ /** @type {Function}
99
+ * @private
100
+ */
101
+
102
+ ColumnSelectionPlugin.prototype._pendingSelectionOnRemoved = -1;
97
103
  /** @type {Function}
98
104
  * @private
99
105
  */
@@ -142,6 +148,7 @@ ColumnSelectionPlugin.prototype.initialize = function (host, options) {
142
148
  host.listen("mousedown", this._onMouseDown);
143
149
  host.listen("keydown", this._onKeyDown);
144
150
  host.listen("columnRemoved", this._onColumnRemoved);
151
+ host.listen("columnAdded", this._onColumnAdded);
145
152
  host.listen("columnPositionChanged", this._onColumnPositionChanged);
146
153
  this.config(options);
147
154
 
@@ -204,6 +211,7 @@ ColumnSelectionPlugin.prototype.unload = function (host) {
204
211
  host.unlisten("mousedown", this._onMouseDown);
205
212
  host.unlisten("keydown", this._onKeyDown);
206
213
  host.unlisten("columnRemoved", this._onColumnRemoved);
214
+ host.unlisten("columnAdded", this._onColumnAdded);
207
215
  host.unlisten("columnPositionChanged", this._onColumnPositionChanged);
208
216
 
209
217
  this._hosts.splice(at, 1);
@@ -458,7 +466,9 @@ ColumnSelectionPlugin.prototype.setSelectedColumn = function (colIndex, opt_sele
458
466
  }
459
467
 
460
468
  this._hasSelection = selection ? true : null;
461
- this._pendingSelection = -1; // New selection happens before resolving the pending selection
469
+ this._pendingSelectionOnAdded = -1; // New selection happens before resolving the pending selection
470
+
471
+ this._pendingSelectionOnRemoved = -1; // New selection happens before resolving the pending selection
462
472
 
463
473
  var len = this._hosts.length;
464
474
 
@@ -867,7 +877,13 @@ ColumnSelectionPlugin.prototype._onKeyDown = function (e) {
867
877
 
868
878
 
869
879
  ColumnSelectionPlugin.prototype._onColumnRemoved = function (e) {
880
+ var colIndex = e.colIndex;
881
+
870
882
  if (this._timerId) {
883
+ if (this._pendingSelectionOnAdded > 0 && colIndex < this._pendingSelectionOnAdded) {
884
+ this._pendingSelectionOnAdded = this._pendingSelectionOnAdded - 1;
885
+ }
886
+
871
887
  return;
872
888
  } // Since column and its selection state has been removed, we have to keep track of the first selection across multiple calls
873
889
 
@@ -879,19 +895,17 @@ ColumnSelectionPlugin.prototype._onColumnRemoved = function (e) {
879
895
  // The last selection has been removed
880
896
  this._hasSelection = false;
881
897
 
882
- if (this._pendingSelection < 0) {
883
- var colIndex = e.colIndex;
884
-
898
+ if (this._pendingSelectionOnRemoved < 0) {
885
899
  if (colIndex >= this.getColumnCount()) {
886
900
  colIndex = this.getColumnCount() - 1;
887
901
  }
888
902
 
889
- this._pendingSelection = colIndex;
903
+ this._pendingSelectionOnRemoved = colIndex;
890
904
  }
891
905
 
892
906
  this._timerId = setTimeout(this._onReselection, 10);
893
907
  } else {
894
- this._pendingSelection = firstSel;
908
+ this._pendingSelectionOnRemoved = firstSel;
895
909
  }
896
910
  }
897
911
  };
@@ -900,10 +914,33 @@ ColumnSelectionPlugin.prototype._onColumnRemoved = function (e) {
900
914
  */
901
915
 
902
916
 
917
+ ColumnSelectionPlugin.prototype._onColumnAdded = function (e) {
918
+ if (this._timerId) {
919
+ this._pendingSelectionOnAdded = e.colIndex;
920
+ return;
921
+ }
922
+
923
+ if (this._hasSelection) {
924
+ this.clearAllSelections();
925
+
926
+ if (this._pendingSelectionOnAdded < 0) {
927
+ this._pendingSelectionOnAdded = e.colIndex;
928
+ }
929
+
930
+ this._timerId = setTimeout(this._onReselection, 10);
931
+ }
932
+ };
933
+ /** @private
934
+ * @param {Object} e
935
+ */
936
+
937
+
903
938
  ColumnSelectionPlugin.prototype._onReselection = function (e) {
904
939
  this._timerId = 0;
905
- this.setSelectedColumn(this._pendingSelection, true);
906
- this._pendingSelection = -1;
940
+ var pendingSelection = this._pendingSelectionOnAdded > -1 ? this._pendingSelectionOnAdded : this._pendingSelectionOnRemoved;
941
+ this.setSelectedColumn(pendingSelection, true);
942
+ this._pendingSelectionOnAdded = -1;
943
+ this._pendingSelectionOnRemoved = -1;
907
944
 
908
945
  if (!this._activeGrid) {
909
946
  this._activeGrid = this._hosts[0];
@@ -9,6 +9,10 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
9
9
 
10
10
  declare namespace ColumnStackPlugin {
11
11
 
12
+ type Options = {
13
+ fields: (string)[]
14
+ };
15
+
12
16
  type ColumnOptions = {
13
17
  stackId?: string,
14
18
  stack?: (string|StackOptions)
@@ -34,11 +38,11 @@ declare class ColumnStackPlugin extends GridPlugin {
34
38
 
35
39
  public getConfigObject(gridOptions?: any): any;
36
40
 
37
- public getMemberIndices(colIndex: number): (number)[];
41
+ public getMemberIndices(colIndex: number): (number)[]|null;
38
42
 
39
- public collapseGroup(colIndex: number, collapsed?: boolean): (number)[];
43
+ public collapseGroup(colIndex: number, collapsed?: boolean): (number)[]|null;
40
44
 
41
- public expandGroup(colIndex: number): (number)[];
45
+ public expandGroup(colIndex: number): (number)[]|null;
42
46
 
43
47
  public isColumnStackable(colIndices: (number)[]): boolean;
44
48
 
@@ -60,7 +64,7 @@ declare class ColumnStackPlugin extends GridPlugin {
60
64
 
61
65
  public getStackId(colIndex: number): string;
62
66
 
63
- public stackColumns(colIndices?: (number)[], stackId?: string, options?: any): boolean;
67
+ public stackColumns(colRefs?: (number|string)[], stackId?: string, options?: any): boolean;
64
68
 
65
69
  public setStack(colRefs: (number|string)[]): boolean;
66
70