@refinitiv-ui/efx-grid 6.0.41 → 6.0.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +1 -0
  2. package/lib/column-format-dialog/lib/column-format-dialog.js +3 -24
  3. package/lib/column-format-dialog/lib/preview-table.d.ts +1 -1
  4. package/lib/column-format-dialog/lib/preview-table.js +15 -27
  5. package/lib/core/dist/core.js +843 -871
  6. package/lib/core/dist/core.min.js +1 -1
  7. package/lib/core/es6/grid/Core.d.ts +4 -0
  8. package/lib/core/es6/grid/Core.js +67 -2
  9. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +3 -2
  10. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +32 -26
  11. package/lib/core/es6/grid/util/util.js +25 -9
  12. package/lib/formatters/es6/CoralButtonFormatter.d.ts +2 -2
  13. package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +1 -1
  14. package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +4 -4
  15. package/lib/formatters/es6/CoralIconFormatter.d.ts +3 -3
  16. package/lib/formatters/es6/CoralInputFormatter.d.ts +1 -1
  17. package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +2 -2
  18. package/lib/formatters/es6/CoralSelectFormatter.d.ts +4 -4
  19. package/lib/formatters/es6/CoralToggleFormatter.d.ts +1 -1
  20. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +1 -1
  21. package/lib/formatters/es6/EFButtonFormatter.d.ts +2 -2
  22. package/lib/formatters/es6/EFCheckboxFormatter.d.ts +1 -1
  23. package/lib/formatters/es6/EFComboBoxFormatter.d.ts +4 -4
  24. package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +1 -1
  25. package/lib/formatters/es6/EFIconFormatter.d.ts +3 -3
  26. package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +1 -1
  27. package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +2 -2
  28. package/lib/formatters/es6/EFSelectFormatter.d.ts +4 -4
  29. package/lib/formatters/es6/EFTextFieldFormatter.d.ts +1 -1
  30. package/lib/formatters/es6/EFToggleFormatter.d.ts +1 -1
  31. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +1 -1
  32. package/lib/formatters/es6/FormatterBuilder.d.ts +6 -2
  33. package/lib/formatters/es6/FormatterBuilder.js +328 -178
  34. package/lib/formatters/es6/NumericInputFormatter.d.ts +1 -1
  35. package/lib/formatters/es6/PercentBarFormatter.d.ts +6 -6
  36. package/lib/formatters/es6/SimpleImageFormatter.d.ts +3 -3
  37. package/lib/formatters/es6/SimpleInputFormatter.d.ts +1 -1
  38. package/lib/formatters/es6/SimpleLinkFormatter.d.ts +3 -3
  39. package/lib/formatters/es6/SimpleTickerFormatter.d.ts +3 -3
  40. package/lib/formatters/es6/SimpleToggleFormatter.d.ts +3 -3
  41. package/lib/formatters/es6/TextFormatter.d.ts +1 -1
  42. package/lib/grid/index.js +1 -1
  43. package/lib/rt-grid/dist/rt-grid.js +213 -44
  44. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  45. package/lib/rt-grid/es6/Grid.d.ts +24 -1
  46. package/lib/rt-grid/es6/Grid.js +92 -4
  47. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +4 -0
  48. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +34 -19
  49. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +9 -3
  50. package/lib/tr-grid-column-stack/es6/ColumnStack.js +324 -388
  51. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +17 -17
  52. package/lib/tr-grid-filter-input/es6/FilterInput.js +146 -33
  53. package/lib/tr-grid-util/es6/DateTime.js +3 -3
  54. package/lib/tr-grid-util/es6/GridPlugin.js +1 -1
  55. package/lib/types/es6/ColumnGrouping.d.ts +4 -0
  56. package/lib/types/es6/ColumnStack.d.ts +9 -3
  57. package/lib/types/es6/CoralButtonFormatter.d.ts +2 -2
  58. package/lib/types/es6/CoralCheckboxFormatter.d.ts +1 -1
  59. package/lib/types/es6/CoralComboBoxFormatter.d.ts +4 -4
  60. package/lib/types/es6/CoralIconFormatter.d.ts +3 -3
  61. package/lib/types/es6/CoralInputFormatter.d.ts +1 -1
  62. package/lib/types/es6/CoralRadioButtonFormatter.d.ts +2 -2
  63. package/lib/types/es6/CoralSelectFormatter.d.ts +4 -4
  64. package/lib/types/es6/CoralToggleFormatter.d.ts +1 -1
  65. package/lib/types/es6/Core/grid/Core.d.ts +4 -0
  66. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +3 -2
  67. package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +1 -1
  68. package/lib/types/es6/EFButtonFormatter.d.ts +2 -2
  69. package/lib/types/es6/EFCheckboxFormatter.d.ts +1 -1
  70. package/lib/types/es6/EFComboBoxFormatter.d.ts +4 -4
  71. package/lib/types/es6/EFDateTimePickerFormatter.d.ts +1 -1
  72. package/lib/types/es6/EFIconFormatter.d.ts +3 -3
  73. package/lib/types/es6/EFNumberFieldFormatter.d.ts +1 -1
  74. package/lib/types/es6/EFRadioButtonFormatter.d.ts +2 -2
  75. package/lib/types/es6/EFSelectFormatter.d.ts +4 -4
  76. package/lib/types/es6/EFTextFieldFormatter.d.ts +1 -1
  77. package/lib/types/es6/EFToggleFormatter.d.ts +1 -1
  78. package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +1 -1
  79. package/lib/types/es6/FilterInput.d.ts +17 -17
  80. package/lib/types/es6/FormatterBuilder.d.ts +6 -2
  81. package/lib/types/es6/NumericInputFormatter.d.ts +1 -1
  82. package/lib/types/es6/PercentBarFormatter.d.ts +6 -6
  83. package/lib/types/es6/RealtimeGrid/Grid.d.ts +22 -0
  84. package/lib/types/es6/SimpleImageFormatter.d.ts +3 -3
  85. package/lib/types/es6/SimpleInputFormatter.d.ts +1 -1
  86. package/lib/types/es6/SimpleLinkFormatter.d.ts +3 -3
  87. package/lib/types/es6/SimpleTickerFormatter.d.ts +3 -3
  88. package/lib/types/es6/SimpleToggleFormatter.d.ts +3 -3
  89. package/lib/types/es6/TextFormatter.d.ts +1 -1
  90. package/lib/versions.json +6 -6
  91. package/package.json +1 -1
@@ -4,7 +4,7 @@ declare class SimpleInputFormatter {
4
4
 
5
5
  constructor(options?: any);
6
6
 
7
- public static create(options?: (FormatterBuilder.Options|any)): any;
7
+ public static create(options?: (FormatterBuilder.Options|any)|null): any;
8
8
 
9
9
  }
10
10
 
@@ -3,8 +3,8 @@ import FormatterBuilder from "./FormatterBuilder.js";
3
3
  declare namespace SimpleLinkFormatter {
4
4
 
5
5
  type Options = {
6
- label?: string,
7
- urlField?: string
6
+ label?: string|null,
7
+ urlField?: string|null
8
8
  };
9
9
 
10
10
  }
@@ -13,7 +13,7 @@ declare class SimpleLinkFormatter {
13
13
 
14
14
  constructor(options?: any);
15
15
 
16
- public static create(options?: (FormatterBuilder.Options|SimpleLinkFormatter.Options|any)): any;
16
+ public static create(options?: (FormatterBuilder.Options|SimpleLinkFormatter.Options|any)|null): any;
17
17
 
18
18
  }
19
19
 
@@ -5,8 +5,8 @@ import ElfUtil from "../../tr-grid-util/es6/ElfUtil.js";
5
5
  declare namespace SimpleTickerFormatter {
6
6
 
7
7
  type Options = {
8
- positiveColor?: string,
9
- negativeColor?: string
8
+ positiveColor?: string|null,
9
+ negativeColor?: string|null
10
10
  };
11
11
 
12
12
  }
@@ -15,7 +15,7 @@ declare class SimpleTickerFormatter {
15
15
 
16
16
  constructor(options?: any);
17
17
 
18
- public static create(options?: (FormatterBuilder.Options|SimpleTickerFormatter.Options|any)): any;
18
+ public static create(options?: (FormatterBuilder.Options|SimpleTickerFormatter.Options|any)|null): any;
19
19
 
20
20
  }
21
21
 
@@ -4,8 +4,8 @@ import ElfUtil from "../../tr-grid-util/es6/ElfUtil.js";
4
4
  declare namespace SimpleToggleFormatter {
5
5
 
6
6
  type Options = {
7
- element1?: (string|Element),
8
- element2?: (string|Element)
7
+ element1?: (string|Element)|null,
8
+ element2?: (string|Element)|null
9
9
  };
10
10
 
11
11
  }
@@ -14,7 +14,7 @@ declare class SimpleToggleFormatter {
14
14
 
15
15
  constructor(options?: any);
16
16
 
17
- public static create(options?: (FormatterBuilder.Options|SimpleToggleFormatter.Options|any)): any;
17
+ public static create(options?: (FormatterBuilder.Options|SimpleToggleFormatter.Options|any)|null): any;
18
18
 
19
19
  }
20
20
 
@@ -4,7 +4,7 @@ declare class TextFormatter {
4
4
 
5
5
  constructor(options?: any);
6
6
 
7
- public static create(options?: (FormatterBuilder.Options|any)): any;
7
+ public static create(options?: (FormatterBuilder.Options|any)|null): any;
8
8
 
9
9
  }
10
10
 
package/lib/grid/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import {Grid} from "./lib/efx-grid.js";
2
2
  export {Grid}
3
- window.EFX_GRID = { version: "6.0.41" };
3
+ window.EFX_GRID = { version: "6.0.43" };
@@ -4189,9 +4189,9 @@ DateTime.toDateObject = function(dateInput) {
4189
4189
  */
4190
4190
  DateTime.toDateNumber = function(dateObj) {
4191
4191
  return DateTime._millisecondToDateNumber(Date.UTC(
4192
- dateObj.getFullYear(),
4193
- dateObj.getMonth(),
4194
- dateObj.getDate()
4192
+ dateObj.getUTCFullYear(),
4193
+ dateObj.getUTCMonth(),
4194
+ dateObj.getUTCDate()
4195
4195
  ));
4196
4196
  };
4197
4197
  /** Convert the JavaScript date object to the time number in a range between 0 and 1. WARNING: This discards date and millisecond from the given date object.
@@ -7753,23 +7753,46 @@ Engine._proto = Engine.prototype;
7753
7753
  * @namespace
7754
7754
  */
7755
7755
  var util_Util = {};
7756
+
7757
+ // TODO: move to tr-grid-util
7758
+
7756
7759
  /** @const
7757
7760
  * @type {boolean}
7758
7761
  */
7759
- util_Util.isIE = util_Util.isIE || (function () {
7762
+ util_Util.isIE = (function () {
7760
7763
  var ua = window.navigator.userAgent;
7761
7764
  return (ua.indexOf('MSIE ') > 0) || (ua.indexOf('Trident/') > 0) || (ua.indexOf('Edge/') > 0);
7762
7765
  }());
7763
7766
  /** @const
7764
7767
  * @type {boolean}
7765
7768
  */
7766
- util_Util.isTouchDevice = util_Util.isTouchDevice || (function () {
7769
+ util_Util.isTouchDevice = (function () {
7767
7770
  if ((navigator["maxTouchPoints"] && navigator["maxTouchPoints"] < 256) ||
7768
7771
  (navigator["msMaxTouchPoints"] && navigator["msMaxTouchPoints"] < 256)) {
7769
7772
  return true;
7770
7773
  }
7771
7774
  return false;
7772
7775
  }());
7776
+ /** @const
7777
+ * @type {boolean}
7778
+ */
7779
+ util_Util.isSafari = (function () {
7780
+ var rejectedExpression = /Chrome|Android|CriOS|FxiOS|EdgiOS/i;
7781
+ var safariExpression = /Safari/i;
7782
+ var agent = navigator.userAgent;
7783
+ if (rejectedExpression.test(agent)) {
7784
+ return false;
7785
+ }
7786
+ return safariExpression.test(agent);
7787
+ }());
7788
+
7789
+ /** @public
7790
+ * @type {boolean}
7791
+ */
7792
+ util_Util.isMobile = (function () {
7793
+ return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
7794
+ }());
7795
+
7773
7796
  /** Retrieve an element from Novakit control or any object that has "getElement" method.
7774
7797
  * @public
7775
7798
  * @ignore
@@ -8115,13 +8138,6 @@ util_Util._preventDefault = function (e) {
8115
8138
  e.stopPropagation();
8116
8139
  };
8117
8140
 
8118
- /** @public
8119
- * @type {boolean}
8120
- */
8121
- util_Util.isMobile = util_Util.isMobile || (function () {
8122
- return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
8123
- }());
8124
-
8125
8141
  /* harmony default export */ var util = (util_Util);
8126
8142
 
8127
8143
 
@@ -35410,6 +35426,7 @@ var Core = function (opt_initializer) {
35410
35426
 
35411
35427
  _t._onMouseMove = _t._onMouseMove.bind(_t);
35412
35428
  _t._onRowHightlighted = _t._onRowHightlighted.bind(_t);
35429
+ _t._onGridClicked = _t._onGridClicked.bind(_t);
35413
35430
 
35414
35431
  _t._onWindowResize = _t._onWindowResize.bind(_t);
35415
35432
  _t._onSectionDataChanged = _t._onSectionDataChanged.bind(_t);
@@ -35495,11 +35512,16 @@ var Core = function (opt_initializer) {
35495
35512
  _t._hscrollbar.setOtherScrollbar(_t._vscrollbar);
35496
35513
  _t._vscrollbar.setOtherScrollbar(_t._hscrollbar);
35497
35514
 
35498
- if (util.isMobile) {
35515
+ if (util.isMobile || util.isTouchDevice) {
35499
35516
  _t._element.addEventListener("touchmove", this._onMouseMove, false);
35500
35517
  } else {
35501
35518
  _t._element.addEventListener("mousemove", this._onMouseMove, false);
35502
35519
  }
35520
+
35521
+ if(util.isSafari){
35522
+ _t._element.addEventListener("click", this._onGridClicked);
35523
+ }
35524
+
35503
35525
  window.addEventListener("resize", _t._onWindowResize, false); // Should be unlistened after destroyed
35504
35526
  _t._rowVirtualizer.listen("indexChanged", _t._onRowInViewChanged);
35505
35527
  _t._colVirtualizer.listen("indexChanged", _t._onColInViewChanged);
@@ -35884,7 +35906,7 @@ Core.prototype._batches = null;
35884
35906
  * @return {string}
35885
35907
  */
35886
35908
  Core.getVersion = function () {
35887
- return "5.1.59";
35909
+ return "5.1.63";
35888
35910
  };
35889
35911
  /** {@link ElementWrapper#dispose}
35890
35912
  * @override
@@ -39739,6 +39761,53 @@ Core.prototype.getColumnGroupChildIds = function (groupId) {
39739
39761
  return null;
39740
39762
  };
39741
39763
 
39764
+ /** @public
39765
+ * @description Get a list of objects with column id and column index in sorted order
39766
+ * @param {Array.<string>} colIds
39767
+ * @param {Object=} columnMap
39768
+ * @return {!Array.<string>} Return column array with corresponding order to UI
39769
+ * @example
39770
+ * core.getValidColumnList(["c1","c2","c5"]); // Get list of valid columns
39771
+ * core.getValidColumnList(["c1","c2","c5"],{ "c2":true, "c5":true }); // Get list of valid columns from specific mapping
39772
+ */
39773
+ Core.prototype.getValidColumnList = function (colIds, columnMap) {
39774
+ var colList = [];
39775
+ if(!colIds){
39776
+ return colList;
39777
+ }
39778
+ if(!columnMap){
39779
+ columnMap = this.createColumnMap(colIds);
39780
+ }
39781
+ var colCount = this.getColumnCount();
39782
+ for(var c = 0; c < colCount; ++c) {
39783
+ var id = this._getColumnDef(c)["id"];
39784
+ if(columnMap[id] != null){
39785
+ colList.push({"index": c, "id": id});
39786
+ }
39787
+ }
39788
+ return colList;
39789
+ };
39790
+
39791
+ /** @public
39792
+ * @description Create mapping object from an array of strings
39793
+ * @param {Array.<string>=} colIds
39794
+ * @return {!Object} Column mapping object
39795
+ */
39796
+ Core.prototype.createColumnMap = function (colIds) {
39797
+ if(!colIds){
39798
+ colIds = this.getColumnIds();
39799
+ }
39800
+ var mappingObj = {};
39801
+ var count = colIds.length;
39802
+ for(var i = 0; i < count; i++){
39803
+ var colId = colIds[i];
39804
+ if(colId){
39805
+ mappingObj[colId] = true;
39806
+ }
39807
+ }
39808
+ return mappingObj;
39809
+ };
39810
+
39742
39811
  /** @public
39743
39812
  * @param {string} batchType
39744
39813
  * @return {boolean}
@@ -40578,6 +40647,18 @@ Core.prototype._onMouseMove = function () {
40578
40647
  this._vscrollbar.flash();
40579
40648
  this._hscrollbar.flash();
40580
40649
  };
40650
+ /** @private */
40651
+ Core.prototype._onGridClicked = function () {
40652
+ // research for dragging
40653
+ var selection = window.getSelection();
40654
+ if(selection.toString()){
40655
+ return;
40656
+ }
40657
+ var activeElem = document.activeElement;
40658
+ if(!this._element.contains(activeElem)){
40659
+ this.focus();
40660
+ }
40661
+ };
40581
40662
 
40582
40663
  /** @private
40583
40664
  * @param {Object} e
@@ -42057,8 +42138,9 @@ es6_Ext.inherits(SortableTitlePlugin, event_EventDispatcher);
42057
42138
 
42058
42139
  /** The sorting object which will be used for initialSort config.
42059
42140
  * @typedef {Object} SortableTitlePlugin~InitialSort
42060
- * @property {number} colIndex Index of the column
42061
- * @property {string} field field of the column
42141
+ * @property {number=} colIndex Index of the column
42142
+ * @property {string=} colId column id of the column
42143
+ * @property {string=} field field of the column
42062
42144
  * @property {SortableTitlePlugin~SortOrder=} sortOrder=null Set to "d" for descending order and "a" for ascending order
42063
42145
  * @property {SortableTitlePlugin~SortOrder=} order Alias of sortOrder
42064
42146
  */
@@ -42716,6 +42798,7 @@ SortableTitlePlugin.prototype.getSortedColumns = function () {
42716
42798
  var state = this._sortStates[i];
42717
42799
  arr[i] = {
42718
42800
  "colIndex": colIndex,
42801
+ "colId": this._getColumnId(colIndex),
42719
42802
  "field": state["field"] || "",
42720
42803
  "sortOrder": state["sortOrder"] || "n"
42721
42804
  };
@@ -42757,7 +42840,7 @@ SortableTitlePlugin.prototype.sortColumns = function (sortOptions, opt_arg) {
42757
42840
  var opt = sortOptions[i];
42758
42841
  var colRef = opt["colIndex"];
42759
42842
  if(colRef < 0 || colRef == null) {
42760
- colRef = opt["field"];
42843
+ colRef = opt["colId"] || opt["field"];
42761
42844
  }
42762
42845
  var state = this._prepareSorting(
42763
42846
  colRef,
@@ -43344,19 +43427,9 @@ SortableTitlePlugin.prototype._prepareSorting = function (colRef, sortOrder) {
43344
43427
  return null;
43345
43428
  }
43346
43429
 
43347
- var colIndex = -1;
43348
- var field = "";
43349
- var priority = -1;
43350
- if(typeof colRef === "number") {
43351
- colIndex = colRef;
43352
- field = this.getColumnSortingField(colIndex);
43353
- priority = this.getSortPriority(colIndex);
43354
- } else if(typeof colRef === "string") {
43355
- field = colRef;
43356
- colIndex = this._getColumnIndexByField(field);
43357
- var fields = this.getColumnSortingFields();
43358
- priority = fields.indexOf(field);
43359
- }
43430
+ var colIndex = this._getColumnIndex(colRef);
43431
+ var priority = this.getSortPriority(colIndex);
43432
+ var field = this.getColumnSortingField(colIndex);
43360
43433
 
43361
43434
  var curState = (priority >= 0) ? this._sortStates[priority] : null;
43362
43435
  var curOrder = curState ? curState["sortOrder"] : "n";
@@ -43740,21 +43813,29 @@ SortableTitlePlugin.prototype._getColumnIndexByOptions = function (sortOptions)
43740
43813
  return -1;
43741
43814
  };
43742
43815
  /** @private
43743
- * @param {string} field
43816
+ * @param {string|number} colRef
43744
43817
  * @return {number}
43745
43818
  */
43746
- SortableTitlePlugin.prototype._getColumnIndexByField = function (field) {
43747
- if(field) {
43748
- var host = this._hosts[0];
43749
- var colCount = host ? host.getColumnCount() : 0;
43750
- for (var c = 0; c < colCount; ++c) {
43751
- if(field === this.getColumnSortingField(c)) {
43752
- return c;
43753
- }
43754
- }
43819
+ SortableTitlePlugin.prototype._getColumnIndex = function (colRef) {
43820
+ var host = this._hosts[0];
43821
+ if(host && colRef != null) {
43822
+ return host.getColumnIndex(colRef);
43755
43823
  }
43756
43824
  return -1;
43757
43825
  };
43826
+
43827
+ /** @private
43828
+ * @param {string|number} colRef
43829
+ * @return {string} column id or empty string for not found
43830
+ */
43831
+ SortableTitlePlugin.prototype._getColumnId = function (colRef) {
43832
+ var host = this._hosts[0];
43833
+ if(host && colRef != null) {
43834
+ return host.getColumnId(colRef);
43835
+ }
43836
+ return "";
43837
+ };
43838
+
43758
43839
  /** @private
43759
43840
  * @param {number} colIndex
43760
43841
  * @return {Object}
@@ -43913,6 +43994,7 @@ SortableTitlePlugin._proto = SortableTitlePlugin.prototype;
43913
43994
  * @property {boolean=} timeSeriesExpansion=true If disabled, the time series field will be treated as a normal field and not expanded.
43914
43995
  * @property {string=} childDataField=CHILD_VALUES The given field will be used to store children's static data, such as row color assignment.
43915
43996
  * @property {boolean=} topSection=true If disabled, title section will not be rendered
43997
+ * @property {SortableTitlePlugin~Options=} sorting Options for sorting
43916
43998
  */
43917
43999
 
43918
44000
  /** @typedef {number|string|RowDefinition} Grid~RowReference
@@ -43966,21 +44048,17 @@ SortableTitlePlugin._proto = SortableTitlePlugin.prototype;
43966
44048
  * @description Fired after ADC data or response received from the server
43967
44049
  * @property {Array.<Array>} data Data part of the server response
43968
44050
  */
43969
-
43970
44051
  /** @event Grid#pageIndexChanged
43971
44052
  * @description Fired after page index in the data view is changed during the active pagination mode
43972
44053
  */
43973
-
43974
44054
  /** @event Grid#pageCountChanged
43975
44055
  * @description Fired after page count in the data view is changed during the active pagination mode
43976
44056
  */
43977
-
43978
44057
  /** @event Grid#dataComposed
43979
44058
  * @description Trigger before dataChanged. Perform any data update during the event will NOT cause more dataChanged events
43980
44059
  * @property {Grid} grid
43981
44060
  * @property {RowDefinition} rowDef
43982
44061
  */
43983
-
43984
44062
  /** @event Grid#beforeRowRemoved
43985
44063
  * @description Fired only when a row will be removed through Grid's API and before occurring of the actual removal
43986
44064
  */
@@ -47747,6 +47825,7 @@ Grid.prototype._logData = function(rowDefs, options) {
47747
47825
 
47748
47826
  console.table(tbl); // eslint-disable-line
47749
47827
  };
47828
+
47750
47829
  /** @public
47751
47830
  * @description Replace existing row with a new row. Row ID would be changed, after row is replaced.
47752
47831
  * @param {Grid~RowReference} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
@@ -47770,6 +47849,96 @@ Grid.prototype.replaceRow = function(rowRef, rowOption) {
47770
47849
  }
47771
47850
  };
47772
47851
 
47852
+ /** Scroll the view to the specified column. If the column is already in the view, nothing happens. If the column is outside of the view, the view will be moved to the column with some additional offsets
47853
+ * @public
47854
+ * @param {number} colIndex
47855
+ * @param {boolean=} leftOfView Default is false. If true, the specified column will be put at the leftmost of the view (no offset)
47856
+ * @returns {boolean} Return true, if there is any change
47857
+ */
47858
+ Grid.prototype.scrollToColumn = function (colIndex, leftOfView) {
47859
+ return this._grid.scrollToColumn(colIndex, leftOfView);
47860
+ };
47861
+ /** Scroll the view to the specified row. If the row is already in the view, nothing happens. If the row is outside of the view, the view will be moved to the row with some additional offsets
47862
+ * @public
47863
+ * @param {number} rowIndex
47864
+ * @param {boolean=} topOfView=false If true, the specified row will be put at the top of the view (no offset)
47865
+ */
47866
+ Grid.prototype.scrollToRow = function (rowIndex, topOfView) {
47867
+ this._grid.scrollToRow("content", rowIndex, topOfView);
47868
+ };
47869
+
47870
+ /** Get scroll value in pixel from the horizontal scrollbar
47871
+ * @public
47872
+ * @returns {number} pixels
47873
+ */
47874
+ Grid.prototype.getScrollLeft = function () {
47875
+ return this._grid.getScrollLeft();
47876
+ };
47877
+ /** Get scroll value in pixel from the vertical scrollbar
47878
+ * @public
47879
+ * @returns {number} pixels
47880
+ */
47881
+ Grid.prototype.getScrollTop = function () {
47882
+ return this._grid.getScrollTop();
47883
+ };
47884
+
47885
+ /** Set scroll value to the horizontal scrollbar. This will move the scrollbar to specific position
47886
+ * @public
47887
+ * @param {number} pixels
47888
+ * @see {@link Grid.scrollRight}
47889
+ */
47890
+ Grid.prototype.setScrollLeft = function (pixels) {
47891
+ this._grid.setScrollLeft(pixels);
47892
+ };
47893
+ /** Set scroll value to the vertical scrollbar. This will move the scrollbar to specific position
47894
+ * @public
47895
+ * @param {number} pixels
47896
+ * @see {@link Grid.scrollDown}
47897
+ */
47898
+ Grid.prototype.setScrollTop = function (pixels) {
47899
+ this._grid.setScrollTop(pixels);
47900
+ };
47901
+
47902
+ /** Scroll the view to the right by the specified value. Use negative value to scroll the view to the left
47903
+ * @public
47904
+ * @param {number} pixels
47905
+ * @see {@link Grid.setScrollLeft}
47906
+ */
47907
+ Grid.prototype.scrollRight = function (pixels) {
47908
+ this._grid.scrollRight(pixels);
47909
+ };
47910
+ /** Scroll the view down by the specified value. Use negative value to scroll the view to the top
47911
+ * @public
47912
+ * @param {number} pixels
47913
+ * @see {@link Grid.setScrollTop}
47914
+ */
47915
+ Grid.prototype.scrollDown = function (pixels) {
47916
+ this._grid.scrollDown(pixels);
47917
+ };
47918
+
47919
+ /** Get width of scrollable area from the horizontal scrollbar. This is useful for determining the end of scrollbar
47920
+ * @public
47921
+ * @returns {number}
47922
+ */
47923
+ Grid.prototype.getScrollWidth = function () {
47924
+ return this._grid.getScrollWidth();
47925
+ };
47926
+ /** Get height of scrollable area from the vertical scrollbar. This is useful for determining the end of scrollbar
47927
+ * @public
47928
+ * @returns {number}
47929
+ */
47930
+ Grid.prototype.getScrollHeight = function () {
47931
+ return this._grid.getScrollHeight();
47932
+ };
47933
+
47934
+ /** Get information about current grid's view and the vertical scrollbar
47935
+ * @public
47936
+ * @returns {Object} Returns null, if vertical scrollbar does not exists
47937
+ */
47938
+ Grid.prototype.getVScrollView = function () {
47939
+ return this._grid.getVScrollView();
47940
+ };
47941
+
47773
47942
 
47774
47943
  /* harmony default export */ var js_Grid = (Grid);
47775
47944