@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
@@ -1948,12 +1948,19 @@ class ColumnSelectionDialog extends BasicElement {
1948
1948
  }
1949
1949
  var index = getItemIndex(this._allColumnList, item.value, 'value');
1950
1950
  coralItem.selected = true;
1951
-
1951
+ var stationaryCount = this._unmovableColumns;
1952
+ var highligtedRowCount = highligtedRows ? highligtedRows.length : 0;
1953
+ var highligtedIndex;
1952
1954
  var isInserted = false;
1953
1955
  if(separatorIndex !== -1 && index < separatorIndex){
1954
- for(j = 0; j < highligtedRows.length; j++){
1955
- if(highligtedRows[j] < visibleSeparatorIndex){
1956
- this._visibleColumnList.splice(highligtedRows[j], 0, coralItem);
1956
+ for(j = 0; j < highligtedRowCount; j++){
1957
+ highligtedIndex = highligtedRows[j];
1958
+ if(highligtedIndex < visibleSeparatorIndex){
1959
+ if(highligtedIndex < stationaryCount){
1960
+ this._visibleColumnList.splice(stationaryCount, 0, coralItem);
1961
+ } else {
1962
+ this._visibleColumnList.splice(highligtedIndex, 0, coralItem);
1963
+ }
1957
1964
  isInserted = true;
1958
1965
  break;
1959
1966
  }
@@ -1962,9 +1969,14 @@ class ColumnSelectionDialog extends BasicElement {
1962
1969
  this._visibleColumnList.splice(visibleSeparatorIndex, 0, coralItem);
1963
1970
  }
1964
1971
  } else {
1965
- for(j = 0; j < highligtedRows.length; j++){
1966
- if(highligtedRows[j] > visibleSeparatorIndex){
1967
- this._visibleColumnList.splice(highligtedRows[j], 0, coralItem);
1972
+ for(j = 0; j < highligtedRowCount; j++){
1973
+ highligtedIndex = highligtedRows[j];
1974
+ if(highligtedIndex > visibleSeparatorIndex){
1975
+ if(highligtedIndex < stationaryCount){
1976
+ this._visibleColumnList.splice(stationaryCount, 0, coralItem);
1977
+ } else {
1978
+ this._visibleColumnList.splice(highligtedIndex, 0, coralItem);
1979
+ }
1968
1980
  isInserted = true;
1969
1981
  break;
1970
1982
  }
@@ -24986,7 +24986,14 @@ VirtualizedLayoutGrid.prototype.getFirstIndexInView = function () {
24986
24986
 
24987
24987
  /** @inheritDoc */
24988
24988
  VirtualizedLayoutGrid.prototype.getLastIndexInView = function () {
24989
- return this._firstIndex + this._getInnerRowCount() - 1;
24989
+ var li = this._firstIndex + this._getInnerRowCount() - 1;
24990
+ var core = this._grid._getContext();
24991
+ var dv = core.getDataSource();
24992
+ var actualLastIndex = dv ? dv.getRowCount() - 1 : -1;
24993
+ if (li > actualLastIndex) { //Avoid incorrect index because the delay of row count synchronization after filtering
24994
+ return actualLastIndex;
24995
+ }
24996
+ return li;
24990
24997
  };
24991
24998
 
24992
24999
  /** @inheritDoc */
@@ -25565,6 +25572,8 @@ VirtualizedLayoutGrid._proto = VirtualizedLayoutGrid.prototype;
25565
25572
  */
25566
25573
  /** @event Core#beforeContentBinding */
25567
25574
  /** @event Core#postSectionDataBinding */
25575
+ /** @event Core#firstRendered */
25576
+ /** @event Core#afterContentBinding */
25568
25577
  /** @event Core#rowHighlighted */
25569
25578
 
25570
25579
  /** @event Core#rowAdded
@@ -25735,6 +25744,8 @@ var Core_Core = function (opt_initializer) {
25735
25744
  "beforeContentBinding",
25736
25745
  "preSectionDataBinding",
25737
25746
  "postSectionDataBinding",
25747
+ "firstRendered",
25748
+ "afterContentBinding",
25738
25749
  "rowExpansionBinding",
25739
25750
  "rowHighlighted",
25740
25751
  "preForcedUpdate",
@@ -26087,6 +26098,10 @@ Core_Core.prototype._groupDefs = null;
26087
26098
  * @private
26088
26099
  */
26089
26100
  Core_Core.prototype._batches = null;
26101
+ /** @type {boolean}
26102
+ * @private
26103
+ */
26104
+ Core_Core.prototype._firstRendered = false;
26090
26105
  //#region Public Methods
26091
26106
 
26092
26107
  /**
@@ -26094,7 +26109,7 @@ Core_Core.prototype._batches = null;
26094
26109
  * @return {string}
26095
26110
  */
26096
26111
  Core_Core.getVersion = function () {
26097
- return "5.1.77";
26112
+ return "5.1.80";
26098
26113
  };
26099
26114
  /** {@link ElementWrapper#dispose}
26100
26115
  * @override
@@ -26902,6 +26917,7 @@ Core_Core.prototype.getColumnCount = function () {
26902
26917
  * @fires Core#preSectionDataBinding
26903
26918
  * @fires Core#columnDataBinding
26904
26919
  * @fires Core#postSectionDataBinding
26920
+ * @fires Core#afterContentBinding
26905
26921
  */
26906
26922
  Core_Core.prototype.setColumnCount = function(num) {
26907
26923
  var colCount = this._layoutX.getLaneCount();
@@ -26930,6 +26946,7 @@ Core_Core.prototype.setColumnCount = function(num) {
26930
26946
  * @fires Core#preSectionDataBinding
26931
26947
  * @fires Core#columnDataBinding
26932
26948
  * @fires Core#postSectionDataBinding
26949
+ * @fires Core#afterContentBinding
26933
26950
  */
26934
26951
  Core_Core.prototype.insertColumn = function (index, jsonObj) {
26935
26952
  var prevCount = this.getColumnCount();
@@ -27545,6 +27562,7 @@ Core_Core.prototype._deserializeColumn = function (index, jsonObj) {
27545
27562
  * @fires Core#preSectionDataBinding
27546
27563
  * @fires Core#columnDataBinding
27547
27564
  * @fires Core#postSectionDataBinding
27565
+ * @fires Core#afterContentBinding
27548
27566
  */
27549
27567
  Core_Core.prototype.addRow = function (opt_num) {
27550
27568
  if (opt_num == null) { opt_num = 1; }
@@ -29349,6 +29367,7 @@ Core_Core.prototype.synchronizeHScrollbar = function (subGrid) {
29349
29367
  * @fires Core#preSectionDataBinding
29350
29368
  * @fires Core#columnDataBinding
29351
29369
  * @fires Core#postSectionDataBinding
29370
+ * @fires Core#afterContentBinding
29352
29371
  */
29353
29372
  Core_Core.prototype.updateRowData = function (sectionRef, fromRowIndex, lastRowIndex, userParam) {
29354
29373
  var ss = this.getSectionSettings(sectionRef || "content");
@@ -30483,7 +30502,9 @@ Core_Core.prototype._onSectionDataChanged = function (e) {
30483
30502
  rowDataCollection = dataView.getMultipleRowData(rids, fromR, toR);
30484
30503
  e["dataRows"] = rowDataCollection;
30485
30504
  }
30486
- if(e["sectionType"] === "content"){
30505
+
30506
+ var isContentSection = e["sectionType"] === "content";
30507
+ if(isContentSection){
30487
30508
  this._dispatch("beforeContentBinding", e);
30488
30509
  }
30489
30510
  this._dispatch("preSectionDataBinding", e);
@@ -30517,10 +30538,24 @@ Core_Core.prototype._onSectionDataChanged = function (e) {
30517
30538
  this._dispatch("postSectionDataBinding", e);
30518
30539
  this._dispatchRowExpansionBinding(e);
30519
30540
 
30541
+ if(isContentSection){
30542
+ if(!this._firstRendered) {
30543
+ this._dispatch("firstRendered", e);
30544
+ this._firstRendered = true;
30545
+ }
30546
+ this._dispatch("afterContentBinding", e);
30547
+ }
30520
30548
  section._startBindingSession(false);
30521
30549
  this._dispatchingDataChanged = false;
30522
30550
  };
30523
30551
 
30552
+ /** @public
30553
+ * @ignore
30554
+ */
30555
+ Core_Core.prototype.resetInternalState = function() {
30556
+ this._firstRendered = false;
30557
+ };
30558
+
30524
30559
  /** @private
30525
30560
  * @param {VScrollbar|HScrollbar} scrollbar
30526
30561
  * @returns {boolean}