@refinitiv-ui/efx-grid 6.0.69 → 6.0.71

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/lib/column-selection-dialog/lib/column-selection-dialog.js +19 -7
  2. package/lib/core/dist/core.js +38 -3
  3. package/lib/core/dist/core.min.js +1 -1
  4. package/lib/core/es6/grid/Core.d.ts +2 -0
  5. package/lib/core/es6/grid/Core.js +30 -2
  6. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +8 -1
  7. package/lib/filter-dialog/lib/filter-dialog.js +90 -51
  8. package/lib/grid/index.js +1 -1
  9. package/lib/rt-grid/dist/rt-grid.js +52 -17
  10. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  11. package/lib/rt-grid/es6/Grid.d.ts +5 -2
  12. package/lib/rt-grid/es6/Grid.js +22 -15
  13. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +7 -27
  14. package/lib/tr-grid-column-stack/es6/ColumnStack.js +7 -1
  15. package/lib/tr-grid-filter-input/es6/FilterInput.js +9 -3
  16. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +3 -2
  17. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +65 -18
  18. package/lib/tr-grid-printer/es6/CellWriter.d.ts +5 -5
  19. package/lib/tr-grid-printer/es6/CellWriter.js +6 -6
  20. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +7 -6
  21. package/lib/tr-grid-printer/es6/GridPrinter.js +4 -2
  22. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +1 -1
  23. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +1 -1
  24. package/lib/tr-grid-row-dragging/es6/RowDragging.js +65 -0
  25. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +1 -3
  26. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +235 -114
  27. package/lib/tr-grid-row-selection/es6/RowSelection.js +14 -32
  28. package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +2 -2
  29. package/lib/tr-grid-titlewrap/es6/TitleWrap.js +1 -1
  30. package/lib/tr-grid-util/es6/GridPlugin.js +52 -0
  31. package/lib/types/es6/Core/grid/Core.d.ts +2 -0
  32. package/lib/types/es6/InCellEditing.d.ts +3 -2
  33. package/lib/types/es6/RealtimeGrid/Grid.d.ts +5 -2
  34. package/lib/types/es6/RowFiltering.d.ts +1 -3
  35. package/lib/types/es6/TitleWrap.d.ts +2 -2
  36. package/lib/versions.json +14 -14
  37. package/package.json +1 -1
@@ -633,16 +633,21 @@ RowSelectionPlugin.prototype._onClick = function (e) {
633
633
  * @param {Object=} mouseEvt
634
634
  */
635
635
  RowSelectionPlugin.prototype.selectByMouse = function (rowIndex, mouseEvt) {
636
- if(!mouseEvt) {
637
- mouseEvt = {};
638
- }
639
- if(rowIndex >= 0) {
640
- var grid = this._activeGrid || this._hosts[0];
641
- var cell = grid ? grid.getCell("content", 0, rowIndex) : null;
642
- mouseEvt.target = cell ? cell.getElement() : null;
643
- }
644
- this._onMouseDown(mouseEvt);
636
+ var eventObj = this._mockMouseEvent(0, rowIndex, mouseEvt);
637
+ this._onMouseDown(eventObj);
638
+ };
639
+
640
+ /** @public
641
+ * @description Select a specified row as if it were modified by a keyboard input. This is for testing purpose.
642
+ * @ignore
643
+ * @param {number|string} keyCode Use key code number or "up", "down" string
644
+ * @param {Object=} keyboardEvt
645
+ */
646
+ RowSelectionPlugin.prototype.selectByKey = function (keyCode, keyboardEvt) {
647
+ var eventObj = this._mockKeyboardEvent(keyCode, keyboardEvt);
648
+ this._onKeyDown(eventObj);
645
649
  };
650
+
646
651
  /** @private
647
652
  * @description Left click will cause single row selection <br>
648
653
  * Shift + left click will cause range selection <br>
@@ -783,29 +788,6 @@ RowSelectionPlugin.prototype._clearPendingClickIndex = function (host) {
783
788
  host && host.unlisten("mousemove", this._onMouseMove);
784
789
  };
785
790
 
786
- /** @public
787
- * @description Select a specified row as if it were modified by a keyboard input. This is for testing purpose.
788
- * @ignore
789
- * @param {number} keyCode Use -1 for arrow up. Use 1 for arrow down
790
- * @param {Object=} keyboardEvt
791
- */
792
- RowSelectionPlugin.prototype.selectByKey = function (keyCode, keyboardEvt) {
793
- if(!keyboardEvt) {
794
- keyboardEvt = {};
795
- }
796
- if(keyCode) {
797
- if(keyCode === 1) {
798
- keyboardEvt.keyCode = 40;
799
- } else if(keyCode === -1) {
800
- keyboardEvt.keyCode = 38;
801
- } else if(typeof keyCode === "number"){
802
- keyboardEvt.keyCode = keyCode;
803
- }
804
- }
805
- keyboardEvt.preventDefault = function(){};
806
- keyboardEvt.stopPropagation = function(){};
807
- this._onKeyDown(keyboardEvt);
808
- };
809
791
  /** @private
810
792
  * @param {KeyboardEvent} e
811
793
  */
@@ -15,9 +15,9 @@ declare class TitleWrapPlugin extends GridPlugin {
15
15
 
16
16
  public getConfigObject(gridOptions?: any): any;
17
17
 
18
- public _adjustRowHeightRefByHost(host: any, sectionRef: any, from?: number, to?: number): boolean;
18
+ public _adjustRowHeightRefByHost(host: any, sectionRef: any, from?: number|null, to?: number|null): boolean;
19
19
 
20
- public adjustRowHeight(sectionRef: any, from?: number, to?: number): boolean;
20
+ public adjustRowHeight(sectionRef: any, from?: number|null, to?: number|null): boolean;
21
21
 
22
22
  public adjustRowHeightAt(sectionRef: any, rowIndex: number): boolean;
23
23
 
@@ -155,7 +155,7 @@ TitleWrapPlugin.prototype.getConfigObject = function (gridOptions) {
155
155
 
156
156
  TitleWrapPlugin.prototype._requestRecalculation = function () {
157
157
  if (!this._timerId) {
158
- this._timerId = setTimeout(this._onRecalculation, 10);
158
+ this._timerId = setTimeout(this._onRecalculation, 50);
159
159
  }
160
160
  };
161
161
  /** @private */
@@ -764,6 +764,58 @@ GridPlugin.prototype._activateColumnRenderer = function(colIndex, id, renderer)
764
764
  }
765
765
  };
766
766
 
767
+ /** @private
768
+ * @param {number=} colIndex
769
+ * @param {number=} rowIndex
770
+ * @param {Object=} context
771
+ * @return {!Object}
772
+ */
773
+ GridPlugin.prototype._mockMouseEvent = function(colIndex, rowIndex, context) {
774
+ if (colIndex == null) {
775
+ colIndex = 0;
776
+ }
777
+
778
+ if (rowIndex == null) {
779
+ rowIndex = 0;
780
+ }
781
+
782
+ var evt = context ? context : {};
783
+
784
+ if (colIndex >= 0 && rowIndex >= 0) {
785
+ var grid = this._activeGrid || this._hosts[0];
786
+ var cell = grid ? grid.getCell(evt.sectionType || "content", colIndex, rowIndex) : null;
787
+ evt.target = cell ? cell.getElement() : null;
788
+ }
789
+
790
+ return evt;
791
+ };
792
+
793
+ var keyMap = {
794
+ "left": 37,
795
+ "right": 39,
796
+ "up": 38,
797
+ "down": 40,
798
+ "tab": 9
799
+ };
800
+
801
+ /** @private
802
+ * @param {number|string} keyCode
803
+ * @param {Object=} context
804
+ * @return {!Object}
805
+ */
806
+ GridPlugin.prototype._mockKeyboardEvent = function(keyCode, context) {
807
+ var evt = context ? context : {};
808
+ evt.preventDefault = function(){};
809
+ evt.stopPropagation = function(){};
810
+
811
+ if (typeof keyCode === "string") {
812
+ keyCode = keyCode.toLowerCase();
813
+ keyCode = keyMap[keyCode];
814
+ }
815
+ evt.keyCode = keyCode;
816
+
817
+ return evt;
818
+ };
767
819
  /** Export the plugin to the given object by attaching it to tr and tr.grid namespaces
768
820
  * @public
769
821
  * @function
@@ -447,5 +447,7 @@ declare function path(obj: ElementWrapper|Element|Event|MouseEvent, context?: an
447
447
 
448
448
  declare function cellElement(): ElementWrapper;
449
449
 
450
+ declare function toR(): void;
451
+
450
452
  export default Core;
451
453
  export { Core };
@@ -18,7 +18,7 @@ declare namespace InCellEditingPlugin {
18
18
  popupElement?: Element|null,
19
19
  doubleClick?: boolean|null,
20
20
  tabToMove?: boolean|null,
21
- contentSource?: boolean|null,
21
+ contentSource?: string|null,
22
22
  inlineStyling?: boolean|null,
23
23
  disablingScroll?: boolean|null,
24
24
  uiBlocking?: boolean|null,
@@ -30,7 +30,8 @@ declare namespace InCellEditingPlugin {
30
30
  beforeRowCommit?: ((...params: any[]) => any)|null,
31
31
  rowEditorClosed?: ((...params: any[]) => any)|null,
32
32
  autoSuggest?: Element|null,
33
- closingOnScroll?: boolean|null
33
+ closingOnScroll?: boolean|null,
34
+ autoHiding?: boolean|null
34
35
  };
35
36
 
36
37
  type Cache = {
@@ -75,7 +75,6 @@ declare namespace Grid {
75
75
  contentRightPadding?: number|null,
76
76
  contentBottomPadding?: number|null,
77
77
  dataConflationRate?: number|null,
78
- dataComposed?: ((...params: any[]) => any)|null,
79
78
  autoDateConversion?: boolean|null,
80
79
  textSelect?: boolean|null,
81
80
  lang?: string|null,
@@ -86,7 +85,11 @@ declare namespace Grid {
86
85
  timeSeriesExpansion?: boolean|null,
87
86
  childDataField?: string|null,
88
87
  topSection?: boolean|null,
89
- sorting?: SortableTitlePlugin.Options|null
88
+ sorting?: SortableTitlePlugin.Options|null,
89
+ dataComposed?: ((...params: any[]) => any)|null,
90
+ beforeContentBinding?: ((...params: any[]) => any)|null,
91
+ firstRendered?: ((...params: any[]) => any)|null,
92
+ afterContentBinding?: ((...params: any[]) => any)|null
90
93
  };
91
94
 
92
95
  type RowReference = number|string|RowDefinition|null;
@@ -113,8 +113,6 @@ declare class RowFilteringPlugin extends GridPlugin {
113
113
 
114
114
  public getColumnFilterStates(): any[];
115
115
 
116
- public getUniqueValues(field: string, formatter?: ((...params: any[]) => any)|null, fmtField?: string|null, rawDataAccessor?: ((...params: any[]) => any)|null, formattedDataAccessor?: ((...params: any[]) => any)|null): any;
117
-
118
116
  public openDialog(colIndex: number, runtimeDialogOptions?: RowFilteringPlugin.FilterDialogOptions|null): void;
119
117
 
120
118
  public enableEmptySegmentFiltering(enabled?: boolean|null): void;
@@ -123,7 +121,7 @@ declare class RowFilteringPlugin extends GridPlugin {
123
121
 
124
122
  }
125
123
 
126
- declare function field(colIndex: number, exp: RowFilteringPlugin.Expression|null, ctx?: (any|string)|null): boolean;
124
+ declare function colSettings(colIndex: number, exp: RowFilteringPlugin.Expression|null, ctx?: (any|string)|null): boolean;
127
125
 
128
126
  declare function crf(enabled?: boolean|null): void;
129
127
 
@@ -15,9 +15,9 @@ declare class TitleWrapPlugin extends GridPlugin {
15
15
 
16
16
  public getConfigObject(gridOptions?: any): any;
17
17
 
18
- public _adjustRowHeightRefByHost(host: any, sectionRef: any, from?: number, to?: number): boolean;
18
+ public _adjustRowHeightRefByHost(host: any, sectionRef: any, from?: number|null, to?: number|null): boolean;
19
19
 
20
- public adjustRowHeight(sectionRef: any, from?: number, to?: number): boolean;
20
+ public adjustRowHeight(sectionRef: any, from?: number|null, to?: number|null): boolean;
21
21
 
22
22
  public adjustRowHeightAt(sectionRef: any, rowIndex: number): boolean;
23
23
 
package/lib/versions.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "tr-grid-util": "1.3.132",
3
- "tr-grid-printer": "1.0.16",
2
+ "tr-grid-util": "1.3.133",
3
+ "tr-grid-printer": "1.0.17",
4
4
  "@grid/column-dragging": "1.0.14",
5
- "@grid/row-segmenting": "1.0.28",
5
+ "@grid/row-segmenting": "1.0.29",
6
6
  "@grid/statistics-row": "1.0.15",
7
7
  "@grid/zoom": "1.0.11",
8
8
  "tr-grid-auto-tooltip": "1.1.6",
@@ -12,26 +12,26 @@
12
12
  "tr-grid-column-formatting": "0.9.35",
13
13
  "tr-grid-column-grouping": "1.0.57",
14
14
  "tr-grid-column-resizing": "1.0.28",
15
- "tr-grid-column-selection": "1.0.30",
16
- "tr-grid-column-stack": "1.0.72",
15
+ "tr-grid-column-selection": "1.0.31",
16
+ "tr-grid-column-stack": "1.0.73",
17
17
  "tr-grid-conditional-coloring": "1.0.66",
18
18
  "tr-grid-content-wrap": "1.0.20",
19
19
  "tr-grid-contextmenu": "1.0.40",
20
- "tr-grid-filter-input": "0.9.33",
20
+ "tr-grid-filter-input": "0.9.35",
21
21
  "tr-grid-heat-map": "1.0.29",
22
- "tr-grid-in-cell-editing": "1.0.80",
22
+ "tr-grid-in-cell-editing": "1.0.81",
23
23
  "tr-grid-pagination": "1.0.24",
24
24
  "tr-grid-percent-bar": "1.0.22",
25
25
  "tr-grid-range-bar": "2.0.5",
26
- "tr-grid-row-dragging": "1.0.29",
27
- "tr-grid-row-filtering": "1.0.61",
26
+ "tr-grid-row-dragging": "1.0.31",
27
+ "tr-grid-row-filtering": "1.0.63",
28
28
  "tr-grid-row-grouping": "1.0.82",
29
- "tr-grid-row-selection": "1.0.24",
30
- "tr-grid-rowcoloring": "1.0.24",
29
+ "tr-grid-row-selection": "1.0.25",
30
+ "tr-grid-rowcoloring": "1.0.25",
31
31
  "tr-grid-textformatting": "1.0.46",
32
- "tr-grid-titlewrap": "1.0.19",
32
+ "tr-grid-titlewrap": "1.0.20",
33
33
  "@grid/formatters": "1.0.50",
34
- "@grid/column-selection-dialog": "4.0.53",
35
- "@grid/filter-dialog": "4.0.57",
34
+ "@grid/column-selection-dialog": "4.0.54",
35
+ "@grid/filter-dialog": "4.0.59",
36
36
  "@grid/column-format-dialog": "4.0.44"
37
37
  }
package/package.json CHANGED
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "version": "6.0.69"
69
+ "version": "6.0.71"
70
70
  }