@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
@@ -14,7 +14,7 @@ declare class ColumnStats {
14
14
 
15
15
  public setColumnDataGetter(func: ((...params: any[]) => any)): void;
16
16
 
17
- public getColumnDataGetter(): ((...params: any[]) => any);
17
+ public getColumnDataGetter(): ((...params: any[]) => any)|null;
18
18
 
19
19
  public getSum(): number;
20
20
 
@@ -32,7 +32,7 @@ declare class ColumnStats {
32
32
 
33
33
  public getMidRange(): number;
34
34
 
35
- public getCachedColumnData(): (number)[];
35
+ public getCachedColumnData(): (number)[]|null;
36
36
 
37
37
  public markDirty(): boolean;
38
38
 
@@ -29,9 +29,9 @@ declare class DataCache extends EventDispatcher {
29
29
 
30
30
  public getData(rid: string, cid: string): any;
31
31
 
32
- public getAllRics(): { [key: string]: any };
32
+ public getAllRics(): { [key: string]: any }|null;
33
33
 
34
- public getAllRowIds(): (string)[];
34
+ public getAllRowIds(): (string)[]|null;
35
35
 
36
36
  public hasRowId(rid: string): boolean;
37
37
 
@@ -57,7 +57,7 @@ declare class DataCache extends EventDispatcher {
57
57
 
58
58
  public resetStaticFields(): void;
59
59
 
60
- public getStaticFields(): { [key: string]: number };
60
+ public getStaticFields(): { [key: string]: number }|null;
61
61
 
62
62
  public dump(options?: any): (any)[];
63
63
 
@@ -65,7 +65,7 @@ declare class DataCache extends EventDispatcher {
65
65
 
66
66
  public setDataCloudSettings(userId: string, productId: string, url: string, opt_lang?: string): void;
67
67
 
68
- public getDataCloudFields(): (string)[];
68
+ public getDataCloudFields(): (string)[]|null;
69
69
 
70
70
  public addDataCloudFields(fields: (string)[]|string): boolean;
71
71
 
@@ -51,9 +51,9 @@ declare class DataTable extends DataCache {
51
51
 
52
52
  public removeAllRows(suppressEvent?: boolean): void;
53
53
 
54
- public moveRow(fromIndex: (number)[]|number, toIndex: number, suppressEvent?: boolean): (string)[]|string;
54
+ public moveRow(fromIndex: (number)[]|number, toIndex: number, suppressEvent?: boolean): (string)[]|string|null;
55
55
 
56
- public moveRows(startIndex: number|string, toIndex: number|string, opt_count?: number, suppressEvent?: boolean): (string)[];
56
+ public moveRows(startIndex: number|string, toIndex: number|string, opt_count?: number, suppressEvent?: boolean): (string)[]|null;
57
57
 
58
58
  public swapRow(fromIndex: number, toIndex: number): void;
59
59
 
@@ -85,7 +85,7 @@ declare class DataTable extends DataCache {
85
85
 
86
86
  public getSegmentParentRowId(rid: string): string;
87
87
 
88
- public getSegmentValues(rids?: (string)[]): (number)[];
88
+ public getSegmentValues(rids?: (string)[]): (number)[]|null;
89
89
 
90
90
  public fillSegment(segmentId: string): void;
91
91
 
@@ -101,9 +101,9 @@ declare class DataTable extends DataCache {
101
101
 
102
102
  public removeAllSegmentChildren(): boolean;
103
103
 
104
- public getSegmentIds(): (string)[];
104
+ public getSegmentIds(): (string)[]|null;
105
105
 
106
- public getSegmentChildIds(segmentId: string): (string)[];
106
+ public getSegmentChildIds(segmentId: string): (string)[]|null;
107
107
 
108
108
  public sortSegments(compare: ((...params: any[]) => any)): void;
109
109
 
@@ -841,7 +841,7 @@ DataTable.prototype.setColumnSortingLogic = function(cid, func) {
841
841
  * @example
842
842
  * var prevState = dt.freeze();
843
843
  * for(var i = 0; i < 100; ++i) {
844
- * dt.insertRow({}); // no event is fired
844
+ * dt.insertRow(); // no event is fired
845
845
  * }
846
846
  * dt.freeze(prevState); // Restore previous freeze states
847
847
  */
@@ -878,6 +878,7 @@ DataTable.prototype.isFrozen = function() {
878
878
  */
879
879
  DataTable.prototype.setSegmentSeparator = function(rid, enabled) {
880
880
  var change = false;
881
+ var memberCount = 0;
881
882
  if(typeof rid === "string") {
882
883
  if(enabled !== false) {
883
884
  if(!this._segments) {
@@ -887,16 +888,20 @@ DataTable.prototype.setSegmentSeparator = function(rid, enabled) {
887
888
  change = true;
888
889
  }
889
890
  } else if(this._segments) {
890
- if(this._segments.removeSegment(rid)) {
891
- change = true;
892
- if(!this._segments.getSegmentCount()) {
893
- this._segments = null;
891
+ var segment = this._segments.getSegment(rid);
892
+ if(segment) {
893
+ memberCount = segment.getChildCount();
894
+ if(this._segments.removeSegment(rid)) {
895
+ change = true;
896
+ if(!this._segments.getSegmentCount()) {
897
+ this._segments = null;
898
+ }
894
899
  }
895
900
  }
896
901
  }
897
902
  }
898
903
  if(change && this._needFiring()) {
899
- if(this._autoFillSegments()) {
904
+ if(this._autoFillSegments() || memberCount) {
900
905
  this.dispatchGlobalChange();
901
906
  } else {
902
907
  var rowData = this._rows[rid] || null;
@@ -1008,13 +1013,14 @@ DataTable.prototype._autoFillSegments = function() {
1008
1013
  }
1009
1014
  return false;
1010
1015
  };
1011
- /** Remove existing segment children and fill the segments with all contnet rows before the next segment separator
1016
+ /** Remove existing segment children and fill the segments with all content rows before the next segment separator
1012
1017
  * @public
1013
1018
  * @param {string} segmentId Row id
1014
1019
  */
1015
1020
  DataTable.prototype.fillSegment = function(segmentId) {
1016
1021
  if(this._segments) {
1017
1022
  this._segments.fillSegment(segmentId, this._rids);
1023
+ this.dispatchGlobalChange();
1018
1024
  }
1019
1025
  };
1020
1026
  /** Remove all existing segment children in each segment and fill the segments with all contnet rows before the next segment separator
@@ -1023,7 +1029,11 @@ DataTable.prototype.fillSegment = function(segmentId) {
1023
1029
  */
1024
1030
  DataTable.prototype.fillSegments = function() {
1025
1031
  if(this._segments) {
1026
- return this._segments.fillSegments(this._rids);
1032
+ var dirty = this._segments.fillSegments(this._rids);
1033
+ if(dirty) {
1034
+ this.dispatchGlobalChange();
1035
+ }
1036
+ return dirty;
1027
1037
  }
1028
1038
  return false;
1029
1039
  };
@@ -1068,7 +1078,11 @@ DataTable.prototype.addSegmentChildren = function(segmentId, rids) {
1068
1078
  */
1069
1079
  DataTable.prototype.removeSegmentChild = function(segmentId, rid) {
1070
1080
  if(this._segments) {
1071
- return this._segments.removeSegmentChild(segmentId, rid);
1081
+ var dirty = this._segments.removeSegmentChild(segmentId, rid);
1082
+ if(dirty) {
1083
+ this.dispatchGlobalChange();
1084
+ }
1085
+ return dirty;
1072
1086
  }
1073
1087
  return false;
1074
1088
  };
@@ -1079,7 +1093,11 @@ DataTable.prototype.removeSegmentChild = function(segmentId, rid) {
1079
1093
  */
1080
1094
  DataTable.prototype.removeSegmentChildren = function(segmentId, rids) {
1081
1095
  if(this._segments) {
1082
- return this._segments.removeSegmentChildren(segmentId, rids);
1096
+ var dirty = this._segments.removeSegmentChildren(segmentId, rids);
1097
+ if(dirty) {
1098
+ this.dispatchGlobalChange();
1099
+ }
1100
+ return dirty;
1083
1101
  }
1084
1102
  return false;
1085
1103
  };
@@ -1088,7 +1106,11 @@ DataTable.prototype.removeSegmentChildren = function(segmentId, rids) {
1088
1106
  */
1089
1107
  DataTable.prototype.removeAllSegmentChildren = function() {
1090
1108
  if(this._segments) {
1091
- return this._segments.removeAllSegmentChildren();
1109
+ var dirty = this._segments.removeAllSegmentChildren();
1110
+ if (dirty) {
1111
+ this.dispatchGlobalChange();
1112
+ }
1113
+ return dirty;
1092
1114
  }
1093
1115
  return false;
1094
1116
  };
@@ -7,12 +7,6 @@ import EventDispatcher from "../grid/event/EventDispatcher.js";
7
7
  import Util from "../grid/util/util.js";
8
8
  import { Conflator } from "../../../tr-grid-util/es6/Conflator.js";
9
9
 
10
- declare namespace DataView {
11
-
12
- type IDataView = DataTable|WrappedView|DataView;
13
-
14
- }
15
-
16
10
  declare class DataView extends EventDispatcher {
17
11
 
18
12
  constructor(source?: DataTable|DataView);
@@ -63,13 +57,13 @@ declare class DataView extends EventDispatcher {
63
57
 
64
58
  public removeRows(rowRefs: (number|string)[]): void;
65
59
 
66
- public moveRow(fromRef: (number|string)[]|number|string, toRef: number|string): (string)[]|string;
60
+ public moveRow(fromRef: (number|string)[]|number|string, toRef: number|string): (string)[]|string|null;
67
61
 
68
62
  public swapRow(fromIndex: number, toIndex: number): void;
69
63
 
70
- public getDataTable(): DataTable;
64
+ public getDataTable(): DataTable|null;
71
65
 
72
- public getDataSource(): DataTable|DataView;
66
+ public getDataSource(): DataTable|DataView|null;
73
67
 
74
68
  public setDataSource(source?: (DataTable|DataView)): void;
75
69
 
@@ -153,13 +147,13 @@ declare class DataView extends EventDispatcher {
153
147
 
154
148
  public removeFooter(): void;
155
149
 
156
- public getGroupByRowId(rowId: string): DataView;
150
+ public getGroupByRowId(rowId: string): DataView|null;
157
151
 
158
- public getGroup(groupRef: number|string): DataView;
152
+ public getGroup(groupRef: number|string): DataView|null;
159
153
 
160
154
  public getAllGroups(out_ary?: any[]): (DataView)[];
161
155
 
162
- public getGroupList(): (string)[];
156
+ public getGroupList(): (string)[]|null;
163
157
 
164
158
  public getGroupId(): string;
165
159
 
@@ -173,9 +167,9 @@ declare class DataView extends EventDispatcher {
173
167
 
174
168
  public getGroupLevel(rowRef?: (number|string)): number;
175
169
 
176
- public enableColumnStats(cid: string, opt_enabled?: boolean, opt_refId?: string): ColumnStats;
170
+ public enableColumnStats(cid: string, opt_enabled?: boolean, opt_refId?: string): ColumnStats|null;
177
171
 
178
- public getColumnStats(cid: string): ColumnStats;
172
+ public getColumnStats(cid: string): ColumnStats|null;
179
173
 
180
174
  public hide(opt_hidden?: boolean): boolean;
181
175
 
@@ -207,7 +201,7 @@ declare class DataView extends EventDispatcher {
207
201
 
208
202
  public removeAllRowExpansions(): void;
209
203
 
210
- public getExpansionParents(from?: number, to?: number): (string)[];
204
+ public getExpansionParents(from?: number, to?: number): (string)[]|null;
211
205
 
212
206
  public isRowExpansion(rid: string): boolean;
213
207
 
@@ -263,15 +257,15 @@ declare class DataView extends EventDispatcher {
263
257
 
264
258
  public removeAllSegmentChildren(): boolean;
265
259
 
266
- public getSegmentIds(): (string)[];
260
+ public getSegmentIds(): (string)[]|null;
267
261
 
268
- public getSegmentChildIds(segmentRef: string|number): (string)[];
262
+ public getSegmentChildIds(segmentRef: string|number): (string)[]|null;
269
263
 
270
264
  public sortSegments(compare: ((...params: any[]) => any)): void;
271
265
 
272
266
  public getWrapSize(): number;
273
267
 
274
- public getWrappedViews(): (WrappedView)[];
268
+ public getWrappedViews(): (WrappedView)[]|null;
275
269
 
276
270
  public wrapView(wrapSize?: number): void;
277
271
 
@@ -7,10 +7,6 @@ import EventDispatcher from "../grid/event/EventDispatcher.js";
7
7
  import Util from "../grid/util/util.js";
8
8
  import { Conflator } from "../../../tr-grid-util/es6/Conflator.js";
9
9
 
10
- /** @typedef {DataTable|WrappedView|DataView} DataView~IDataView
11
- * @description DataView like classes
12
- */
13
-
14
10
  /** @event DataView#dataChanged
15
11
  * @description Trigger when data within the data view has been changed. Not only actual change in data, but also position change will trigger this event.
16
12
  * @property {boolean} globalChange Indicates a big change. User should expect all data has been change. With active sorting or filtering, this flag will always be true due to multiple changes in row position.
@@ -20,6 +20,8 @@ declare class Segment {
20
20
 
21
21
  public getChildIds(): (string)[];
22
22
 
23
+ public getChildCount(): number;
24
+
23
25
  public collapse(bool?: boolean): boolean;
24
26
 
25
27
  public expand(bool?: boolean): boolean;
@@ -131,6 +131,13 @@ Segment.prototype.removeAllChildren = function(objMap) {
131
131
  Segment.prototype.getChildIds = function() {
132
132
  return this._childCount ? Object.keys(this._children) : [];
133
133
  };
134
+ /** @public
135
+ * @return {number}
136
+ */
137
+ Segment.prototype.getChildCount = function() {
138
+ return this._childCount;
139
+ };
140
+
134
141
 
135
142
 
136
143
  /** @public
@@ -18,9 +18,9 @@ declare class SegmentCollection {
18
18
 
19
19
  public getSegmentCount(): number;
20
20
 
21
- public getSegment(rid: string): Segment;
21
+ public getSegment(rid: string): Segment|null;
22
22
 
23
- public getSegments(): { [key: string]: Segment };
23
+ public getSegments(): { [key: string]: Segment }|null;
24
24
 
25
25
  public getSegmentIds(): (string)[];
26
26
 
@@ -50,7 +50,7 @@ declare class SegmentCollection {
50
50
 
51
51
  public fillSegments(rids: (string)[]): boolean;
52
52
 
53
- public getSegmentValues(rids: (string)[]): (number)[];
53
+ public getSegmentValues(rids: (string)[]): (number)[]|null;
54
54
 
55
55
  }
56
56
 
@@ -63,11 +63,11 @@ declare class WrappedView extends EventDispatcher {
63
63
 
64
64
  public removeRows(rowRefs: (number|string)[]): void;
65
65
 
66
- public moveRow(fromRef: (number|string)[]|number|string, toRef: number|string): (string)[]|string;
66
+ public moveRow(fromRef: (number|string)[]|number|string, toRef: number|string): (string)[]|string|null;
67
67
 
68
- public getDataTable(): DataTable;
68
+ public getDataTable(): DataTable|null;
69
69
 
70
- public getDataSource(): DataView;
70
+ public getDataSource(): DataView|null;
71
71
 
72
72
  public setDataSource(source?: DataView): void;
73
73
 
@@ -151,13 +151,13 @@ declare class WrappedView extends EventDispatcher {
151
151
 
152
152
  public removeFooter(): void;
153
153
 
154
- public getGroupByRowId(rowId: string): DataView;
154
+ public getGroupByRowId(rowId: string): DataView|null;
155
155
 
156
- public getGroup(groupRef: number|string): DataView;
156
+ public getGroup(groupRef: number|string): DataView|null;
157
157
 
158
158
  public getAllGroups(out_ary?: any[]): (DataView)[];
159
159
 
160
- public getGroupList(): (string)[];
160
+ public getGroupList(): (string)[]|null;
161
161
 
162
162
  public getGroupId(): string;
163
163
 
@@ -171,9 +171,9 @@ declare class WrappedView extends EventDispatcher {
171
171
 
172
172
  public getGroupLevel(rowRef?: (number|string)): number;
173
173
 
174
- public enableColumnStats(cid: string, opt_enabled?: boolean, opt_refId?: string): ColumnStats;
174
+ public enableColumnStats(cid: string, opt_enabled?: boolean, opt_refId?: string): ColumnStats|null;
175
175
 
176
- public getColumnStats(cid: string): ColumnStats;
176
+ public getColumnStats(cid: string): ColumnStats|null;
177
177
 
178
178
  public hide(opt_hidden?: boolean): boolean;
179
179
 
@@ -205,7 +205,7 @@ declare class WrappedView extends EventDispatcher {
205
205
 
206
206
  public removeAllRowExpansions(): void;
207
207
 
208
- public getExpansionParents(from?: number, to?: number): (string)[];
208
+ public getExpansionParents(from?: number, to?: number): (string)[]|null;
209
209
 
210
210
  public isRowExpansion(rid: string): boolean;
211
211
 
@@ -261,15 +261,15 @@ declare class WrappedView extends EventDispatcher {
261
261
 
262
262
  public removeAllSegmentChildren(): boolean;
263
263
 
264
- public getSegmentIds(): (string)[];
264
+ public getSegmentIds(): (string)[]|null;
265
265
 
266
- public getSegmentChildIds(segmentRef: string|number): (string)[];
266
+ public getSegmentChildIds(segmentRef: string|number): (string)[]|null;
267
267
 
268
268
  public sortSegments(compare: ((...params: any[]) => any)): void;
269
269
 
270
270
  public getWrapSize(): number;
271
271
 
272
- public getWrappedViews(): (WrappedView)[];
272
+ public getWrappedViews(): (WrappedView)[]|null;
273
273
 
274
274
  public wrapView(wrapSize?: number): void;
275
275
 
@@ -281,7 +281,7 @@ declare class WrappedView extends EventDispatcher {
281
281
 
282
282
  }
283
283
 
284
- declare function fromRids(): DataTable;
284
+ declare function fromRids(): DataTable|null;
285
285
 
286
286
  declare function complexData(opt_options?: any): void;
287
287
 
@@ -958,7 +958,7 @@ WrappedView.prototype.addRowExpansion = function(rid, count) {
958
958
  * @param {string} rid Row Id
959
959
  */
960
960
  WrappedView.prototype.removeRowExpansion = function(rid) {
961
- this._dv.removeRowExpansion(rid, count);
961
+ this._dv.removeRowExpansion(rid);
962
962
  };
963
963
  /**
964
964
  * @public
@@ -1165,7 +1165,7 @@ WrappedView.prototype.setSegmentCollapsingLogic = function() {};
1165
1165
  */
1166
1166
  WrappedView.prototype.isSegmentCollapsed = function(rowRef) {
1167
1167
  var rid = this._toRowId(rowRef);
1168
- return this._dv.isSegmentCollapsed(rid, collapsed);
1168
+ return this._dv.isSegmentCollapsed(rid);
1169
1169
  };
1170
1170
  /** Remove existing segment children and fill the segments with all contnet rows before the next segment separator
1171
1171
  * @public
@@ -1198,8 +1198,8 @@ WrappedView.prototype.addSegmentChild = function(segmentRef, rowRef) {
1198
1198
  */
1199
1199
  WrappedView.prototype.addSegmentChildren = function(segmentRef, rowRefs) {
1200
1200
  var segmentId = this._toRowId(segmentRef);
1201
- var rowId = this._toRowId(rowRef);
1202
- return this._dv.addSegmentChildren(segmentId, rowId);
1201
+ var rowIds = this._toRowIds(rowRefs);
1202
+ return this._dv.addSegmentChildren(segmentId, rowIds);
1203
1203
  };
1204
1204
  /** @public
1205
1205
  * @param {string|number} segmentRef Row id or row index
@@ -1218,8 +1218,8 @@ WrappedView.prototype.removeSegmentChild = function(segmentRef, rowRef) {
1218
1218
  */
1219
1219
  WrappedView.prototype.removeSegmentChildren = function(segmentRef, rowRefs) {
1220
1220
  var segmentId = this._toRowId(segmentRef);
1221
- var rowId = this._toRowId(rowRef);
1222
- return this._dv.removeSegmentChildren(segmentId, rowId);
1221
+ var rowIds = this._toRowIds(rowRefs);
1222
+ return this._dv.removeSegmentChildren(segmentId, rowIds);
1223
1223
  };
1224
1224
  /** @public
1225
1225
  * @return {boolean} Return true if there is any change
@@ -68,23 +68,23 @@ declare class Core extends ElementWrapper {
68
68
 
69
69
  public getSectionCount(): number;
70
70
 
71
- public addSection(opt_type?: string, opt_sectionName?: string): ILayoutGrid|null;
71
+ public addSection(opt_type?: string, opt_sectionName?: string): ILayoutGrid|null|null;
72
72
 
73
- public addSectionAt(at: number, opt_type?: string, opt_sectionName?: string): ILayoutGrid|null;
73
+ public addSectionAt(at: number, opt_type?: string, opt_sectionName?: string): ILayoutGrid|null|null;
74
74
 
75
- public removeSection(sectionRef: Core.SectionReference): ILayoutGrid;
75
+ public removeSection(sectionRef: Core.SectionReference): ILayoutGrid|null;
76
76
 
77
- public removeSectionAt(at: number): ILayoutGrid;
77
+ public removeSectionAt(at: number): ILayoutGrid|null;
78
78
 
79
- public removeLastSection(): ILayoutGrid;
79
+ public removeLastSection(): ILayoutGrid|null;
80
80
 
81
81
  public removeAllSections(): void;
82
82
 
83
83
  public setBottomPaddingSection(paddingSize: boolean|number): void;
84
84
 
85
- public getSection(sectionRef: Core.SectionReference): ILayoutGrid;
85
+ public getSection(sectionRef: Core.SectionReference): ILayoutGrid|null;
86
86
 
87
- public getSectionSettings(sectionRef: Core.SectionReference): SectionSettings;
87
+ public getSectionSettings(sectionRef: Core.SectionReference): SectionSettings|null;
88
88
 
89
89
  public getAllSections(opt_type?: string): (ILayoutGrid)[];
90
90
 
@@ -94,23 +94,23 @@ declare class Core extends ElementWrapper {
94
94
 
95
95
  public getSectionTop(sectionRef: Core.SectionReference): number;
96
96
 
97
- public getPreviousSection(identifier?: (MouseEvent|Core.SectionReference), opt_type?: string): ILayoutGrid;
97
+ public getPreviousSection(identifier?: (MouseEvent|Core.SectionReference), opt_type?: string): ILayoutGrid|null;
98
98
 
99
- public getNextSection(identifier?: (MouseEvent|Core.SectionReference), opt_type?: string): ILayoutGrid;
99
+ public getNextSection(identifier?: (MouseEvent|Core.SectionReference), opt_type?: string): ILayoutGrid|null;
100
100
 
101
- public getLastSection(): ILayoutGrid;
101
+ public getLastSection(): ILayoutGrid|null;
102
102
 
103
- public getCell(sectionRef: Core.SectionReference, colIndex: number, rowIndex: number, opt_includeSpan?: boolean): ElementWrapper;
103
+ public getCell(sectionRef: Core.SectionReference, colIndex: number, rowIndex: number, opt_includeSpan?: boolean): ElementWrapper|null;
104
104
 
105
- public getCellInfo(cellRef: Core.CellReference): Core.MouseInfo;
105
+ public getCellInfo(cellRef: Core.CellReference): Core.MouseInfo|null;
106
106
 
107
- public getNextCellInRow(cellRef: Core.CellReference, step?: number): Core.MouseInfo;
107
+ public getNextCellInRow(cellRef: Core.CellReference, step?: number): Core.MouseInfo|null;
108
108
 
109
- public getPrevCellInRow(cellRef: Core.CellReference, step?: number): Core.MouseInfo;
109
+ public getPrevCellInRow(cellRef: Core.CellReference, step?: number): Core.MouseInfo|null;
110
110
 
111
- public getNextCell(cellRef: Core.CellReference): Core.MouseInfo;
111
+ public getNextCell(cellRef: Core.CellReference): Core.MouseInfo|null;
112
112
 
113
- public getPrevCell(cellRef: Core.CellReference): Core.MouseInfo;
113
+ public getPrevCell(cellRef: Core.CellReference): Core.MouseInfo|null;
114
114
 
115
115
  public getColumnCount(): number;
116
116
 
@@ -146,13 +146,13 @@ declare class Core extends ElementWrapper {
146
146
 
147
147
  public setDefaultRowHeight(val: number, opt_includeTitle?: boolean): void;
148
148
 
149
- public getDataSource(): DataView;
149
+ public getDataSource(): DataView|null;
150
150
 
151
151
  public setDataConflationRate(milliSecond: number): void;
152
152
 
153
153
  public getDataConflationRate(): number;
154
154
 
155
- public setDataSource(dataSource: DataTable|DataView): DataView;
155
+ public setDataSource(dataSource: DataTable|DataView): DataView|null;
156
156
 
157
157
  public getColumnRenderEvent(): void;
158
158
 
@@ -272,7 +272,7 @@ declare class Core extends ElementWrapper {
272
272
 
273
273
  public toggleHorizontalLines(forcedVal?: boolean): void;
274
274
 
275
- public getDataColumnMap(): (string)[];
275
+ public getDataColumnMap(): (string)[]|null;
276
276
 
277
277
  public setDataColumnMap(opt_dataMap?: (string)[]): void;
278
278
 
@@ -288,9 +288,9 @@ declare class Core extends ElementWrapper {
288
288
 
289
289
  public setColumnDataBindingHandler(c: number, func: any): void;
290
290
 
291
- public getColumnRenderingHandler(c: number): ((...params: any[]) => any);
291
+ public getColumnRenderingHandler(c: number): ((...params: any[]) => any)|null;
292
292
 
293
- public getColumnDataBindingHandler(c: number): ((...params: any[]) => any);
293
+ public getColumnDataBindingHandler(c: number): ((...params: any[]) => any)|null;
294
294
 
295
295
  public enableRowHighlighting(opt_enabled?: boolean): void;
296
296
 
@@ -314,7 +314,7 @@ declare class Core extends ElementWrapper {
314
314
 
315
315
  public getScrollWidth(): number;
316
316
 
317
- public getYScrollVal(sectionRef: Core.SectionReference, rowIndex: number, topOfView?: boolean): number|null;
317
+ public getYScrollVal(sectionRef: Core.SectionReference, rowIndex: number, topOfView?: boolean): number|null|null;
318
318
 
319
319
  public scrollToRow(sectionRef: Core.SectionReference, rowIndex: number, topOfView?: boolean): void;
320
320
 
@@ -328,6 +328,8 @@ declare class Core extends ElementWrapper {
328
328
 
329
329
  public getScrollHeight(): number;
330
330
 
331
+ public restoreScrollbars(): void;
332
+
331
333
  public getRowVirtualizer(): Virtualizer;
332
334
 
333
335
  public getColumnVirtualizer(): Virtualizer;
@@ -338,7 +340,7 @@ declare class Core extends ElementWrapper {
338
340
 
339
341
  public setRowScrollingStep(rowCount: number): void;
340
342
 
341
- public getVMouseWheelHandler(): ((...params: any[]) => any);
343
+ public getVMouseWheelHandler(): ((...params: any[]) => any)|null;
342
344
 
343
345
  public synchronizeVScrollbar(subGrid: Core): void;
344
346
 
@@ -348,11 +350,13 @@ declare class Core extends ElementWrapper {
348
350
 
349
351
  public requestRowRefresh(): void;
350
352
 
353
+ public _requestScrollbarUpdate(): void;
354
+
351
355
  public deactivateRendering(disabled?: boolean): void;
352
356
 
353
357
  public reserveRightSpace(size: number): boolean;
354
358
 
355
- public getHiddenInput(): Element;
359
+ public getHiddenInput(): Element|null;
356
360
 
357
361
  public focus(): void;
358
362
 
@@ -384,11 +388,11 @@ declare function num(opt_type?: string): (ILayoutGrid)[];
384
388
 
385
389
  declare function mPos(sectionRef: Core.SectionReference): number;
386
390
 
387
- declare function rowIndex(cellRef: Core.CellReference, step?: number): Core.MouseInfo;
391
+ declare function rowIndex(cellRef: Core.CellReference, step?: number): Core.MouseInfo|null;
388
392
 
389
- declare function rowIndex(cellRef: Core.CellReference): Core.MouseInfo;
393
+ declare function rowIndex(cellRef: Core.CellReference): Core.MouseInfo|null;
390
394
 
391
- declare function section(cellRef: Core.CellReference): Core.MouseInfo;
395
+ declare function section(cellRef: Core.CellReference): Core.MouseInfo|null;
392
396
 
393
397
  declare function section(): number;
394
398