@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
@@ -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 };
@@ -33,6 +33,8 @@ import VirtualizedLayoutGrid from "./VirtualizedLayoutGrid.js";
33
33
  */
34
34
  /** @event Core#beforeContentBinding */
35
35
  /** @event Core#postSectionDataBinding */
36
+ /** @event Core#firstRendered */
37
+ /** @event Core#afterContentBinding */
36
38
  /** @event Core#rowHighlighted */
37
39
 
38
40
  /** @event Core#rowAdded
@@ -203,6 +205,8 @@ var Core = function (opt_initializer) {
203
205
  "beforeContentBinding",
204
206
  "preSectionDataBinding",
205
207
  "postSectionDataBinding",
208
+ "firstRendered",
209
+ "afterContentBinding",
206
210
  "rowExpansionBinding",
207
211
  "rowHighlighted",
208
212
  "preForcedUpdate",
@@ -555,6 +559,10 @@ Core.prototype._groupDefs = null;
555
559
  * @private
556
560
  */
557
561
  Core.prototype._batches = null;
562
+ /** @type {boolean}
563
+ * @private
564
+ */
565
+ Core.prototype._firstRendered = false;
558
566
  //#region Public Methods
559
567
 
560
568
  /**
@@ -562,7 +570,7 @@ Core.prototype._batches = null;
562
570
  * @return {string}
563
571
  */
564
572
  Core.getVersion = function () {
565
- return "5.1.77";
573
+ return "5.1.80";
566
574
  };
567
575
  /** {@link ElementWrapper#dispose}
568
576
  * @override
@@ -1370,6 +1378,7 @@ Core.prototype.getColumnCount = function () {
1370
1378
  * @fires Core#preSectionDataBinding
1371
1379
  * @fires Core#columnDataBinding
1372
1380
  * @fires Core#postSectionDataBinding
1381
+ * @fires Core#afterContentBinding
1373
1382
  */
1374
1383
  Core.prototype.setColumnCount = function(num) {
1375
1384
  var colCount = this._layoutX.getLaneCount();
@@ -1398,6 +1407,7 @@ Core.prototype.setColumnCount = function(num) {
1398
1407
  * @fires Core#preSectionDataBinding
1399
1408
  * @fires Core#columnDataBinding
1400
1409
  * @fires Core#postSectionDataBinding
1410
+ * @fires Core#afterContentBinding
1401
1411
  */
1402
1412
  Core.prototype.insertColumn = function (index, jsonObj) {
1403
1413
  var prevCount = this.getColumnCount();
@@ -2013,6 +2023,7 @@ Core.prototype._deserializeColumn = function (index, jsonObj) {
2013
2023
  * @fires Core#preSectionDataBinding
2014
2024
  * @fires Core#columnDataBinding
2015
2025
  * @fires Core#postSectionDataBinding
2026
+ * @fires Core#afterContentBinding
2016
2027
  */
2017
2028
  Core.prototype.addRow = function (opt_num) {
2018
2029
  if (opt_num == null) { opt_num = 1; }
@@ -3817,6 +3828,7 @@ Core.prototype.synchronizeHScrollbar = function (subGrid) {
3817
3828
  * @fires Core#preSectionDataBinding
3818
3829
  * @fires Core#columnDataBinding
3819
3830
  * @fires Core#postSectionDataBinding
3831
+ * @fires Core#afterContentBinding
3820
3832
  */
3821
3833
  Core.prototype.updateRowData = function (sectionRef, fromRowIndex, lastRowIndex, userParam) {
3822
3834
  var ss = this.getSectionSettings(sectionRef || "content");
@@ -4951,7 +4963,9 @@ Core.prototype._onSectionDataChanged = function (e) {
4951
4963
  rowDataCollection = dataView.getMultipleRowData(rids, fromR, toR);
4952
4964
  e["dataRows"] = rowDataCollection;
4953
4965
  }
4954
- if(e["sectionType"] === "content"){
4966
+
4967
+ var isContentSection = e["sectionType"] === "content";
4968
+ if(isContentSection){
4955
4969
  this._dispatch("beforeContentBinding", e);
4956
4970
  }
4957
4971
  this._dispatch("preSectionDataBinding", e);
@@ -4985,10 +4999,24 @@ Core.prototype._onSectionDataChanged = function (e) {
4985
4999
  this._dispatch("postSectionDataBinding", e);
4986
5000
  this._dispatchRowExpansionBinding(e);
4987
5001
 
5002
+ if(isContentSection){
5003
+ if(!this._firstRendered) {
5004
+ this._dispatch("firstRendered", e);
5005
+ this._firstRendered = true;
5006
+ }
5007
+ this._dispatch("afterContentBinding", e);
5008
+ }
4988
5009
  section._startBindingSession(false);
4989
5010
  this._dispatchingDataChanged = false;
4990
5011
  };
4991
5012
 
5013
+ /** @public
5014
+ * @ignore
5015
+ */
5016
+ Core.prototype.resetInternalState = function() {
5017
+ this._firstRendered = false;
5018
+ };
5019
+
4992
5020
  /** @private
4993
5021
  * @param {VScrollbar|HScrollbar} scrollbar
4994
5022
  * @returns {boolean}
@@ -775,7 +775,14 @@ VirtualizedLayoutGrid.prototype.getFirstIndexInView = function () {
775
775
 
776
776
  /** @inheritDoc */
777
777
  VirtualizedLayoutGrid.prototype.getLastIndexInView = function () {
778
- return this._firstIndex + this._getInnerRowCount() - 1;
778
+ var li = this._firstIndex + this._getInnerRowCount() - 1;
779
+ var core = this._grid._getContext();
780
+ var dv = core.getDataSource();
781
+ var actualLastIndex = dv ? dv.getRowCount() - 1 : -1;
782
+ if (li > actualLastIndex) { //Avoid incorrect index because the delay of row count synchronization after filtering
783
+ return actualLastIndex;
784
+ }
785
+ return li;
779
786
  };
780
787
 
781
788
  /** @inheritDoc */
@@ -137,7 +137,7 @@ class FilterDialog extends BasicElement {
137
137
  constructor() {
138
138
  super();
139
139
 
140
- this._updateDialogHeight = this._updateDialogHeight.bind(this);
140
+ this._onWindowResized = this._onWindowResized.bind(this);
141
141
  this._afterDialogOpened = this._afterDialogOpened.bind(this);
142
142
 
143
143
  this.lang = "en";
@@ -155,7 +155,7 @@ class FilterDialog extends BasicElement {
155
155
  "autoRepositioning": false,
156
156
  "uiBlocking": true
157
157
  });
158
- this._dialogHeightTimerId = 0;
158
+ this._winResizedTimer = 0;
159
159
  ElementObserver.addLanguageListener(this);
160
160
  }
161
161
 
@@ -417,7 +417,9 @@ class FilterDialog extends BasicElement {
417
417
  if (changedProps.has("isShown")) {
418
418
  if (this.isShown) {
419
419
  this._updateUIState(); // should updateUIState everytime popup being show
420
- this._popup.show(); // Update position
420
+ if(this._popup.isHidden()) { // If popup is not already in doc, append it
421
+ this._popup.show(); // Popup position will also be modified
422
+ }
421
423
  setTimeout(this._afterDialogOpened, 0); //use setTimeout to make sure everything is rendered before focus
422
424
  } else { // This is to handle the case where isShown is directly modified from the dialog. We need to synchronize the states
423
425
  this._popup.hide();
@@ -429,13 +431,16 @@ class FilterDialog extends BasicElement {
429
431
  * @private
430
432
  */
431
433
  _afterDialogOpened() {
432
- if(this.isShown) {
433
- this._cancelBtn.focus(); // Keep focus on cancel button when open dialog
434
- this._updateDialogHeight(true);
435
- if(!this._firstRendered) {
436
- this._firstRendered = true;
437
- this._popup.show(); // Update position
438
- }
434
+ if(!this.isShown) {
435
+ return;
436
+ }
437
+
438
+ this._cancelBtn.focus(); // Keep focus on cancel button when open dialog
439
+ this._updateDialogHeight(); // position of the popup element will always be updated
440
+
441
+ var popupElem = this._popup.getElement();
442
+ if(popupElem) {// After all changes, ensure that visibility is reset back
443
+ popupElem.style.visibility = "";
439
444
  }
440
445
  }
441
446
 
@@ -451,8 +456,11 @@ class FilterDialog extends BasicElement {
451
456
  * @public
452
457
  */
453
458
  show() {
459
+ var popupElem = this._popup.getElement();
460
+ if(popupElem) {// To prevent blinking due to size and position change
461
+ popupElem.style.visibility = "hidden";
462
+ }
454
463
  this._popup.appendChild(this); // To force first time initialization, focus is already included in updated()
455
-
456
464
  this._popup.show();
457
465
  }
458
466
 
@@ -474,9 +482,9 @@ class FilterDialog extends BasicElement {
474
482
  */
475
483
  _onPopupHidden() {
476
484
  this.isShown = false; // For backward compatability
477
- if (this._dialogHeightTimerId) {
478
- clearTimeout(this._dialogHeightTimerId);
479
- this._dialogHeightTimerId = 0;
485
+ if (this._winResizedTimer) {
486
+ clearTimeout(this._winResizedTimer);
487
+ this._winResizedTimer = 0;
480
488
  }
481
489
  }
482
490
 
@@ -484,10 +492,18 @@ class FilterDialog extends BasicElement {
484
492
  * @private
485
493
  */
486
494
  _onWindowResize() {
487
- if(!this._dialogHeightTimerId && this.isShown){
488
- this._dialogHeightTimerId = setTimeout(this._updateDialogHeight, 500);
495
+ if(!this._winResizedTimer && this.isShown){
496
+ this._winResizedTimer = setTimeout(this._onWindowResized, 400);
489
497
  }
490
498
  }
499
+ /**
500
+ * @private
501
+ */
502
+ _onWindowResized() {
503
+ this._winResizedTimer = 0;
504
+ this._updateDialogHeight();
505
+ }
506
+
491
507
 
492
508
  /**
493
509
  * @public
@@ -563,21 +579,42 @@ class FilterDialog extends BasicElement {
563
579
  e.preventDefault();
564
580
  e.stopPropagation();
565
581
  this._updateFilterModeSelectionUI();
566
- this._updateDialogHeight(true);
582
+ this._updateDialogHeight();
567
583
  }
568
584
 
585
+ /**
586
+ * @private
587
+ * @param {string} oper
588
+ * @param {*} val
589
+ * @returns {boolean}
590
+ */
591
+ _isValidCondition(oper, val) {
592
+ if(oper) {
593
+ if(val || val === 0) {
594
+ return true;
595
+ }
596
+ }
597
+ return false;
598
+ }
569
599
  /**
570
600
  * @private
571
601
  * @param {object} e - event
572
602
  */
573
603
  _onDoneBtnClick(e) {
574
- let context;
604
+ let eventArg = {
605
+ bubbles: false,
606
+ detail: {
607
+ fieldDataType: this.fieldDataType
608
+ }
609
+ };
575
610
  if (this._isAdvancedFilterMode()) {
576
611
  // Retrieve filter conditions from UI;
577
612
  let oper1, oper2, val1, val2, connector;
578
613
  var dateTimeType = toDateTimeType(this.fieldDataType);
579
614
  var fdt = dateTimeType ? dateTimeType : this.fieldDataType.toLowerCase();
615
+ var useUTCTime = false;
580
616
  if (fdt === DATE_TIME) {
617
+ useUTCTime = this.useUTCTime;
581
618
  oper1 = this._dateTimeComboBoxes[0].value;
582
619
  val1 = this._dateTimePickers[0].value;
583
620
  if(val1) {
@@ -624,29 +661,32 @@ class FilterDialog extends BasicElement {
624
661
  }
625
662
  }
626
663
  }
664
+ var ary2D = [];
665
+
666
+ if(this._isValidCondition(oper1, val1)) {
667
+ ary2D.push([oper1, val1]);
668
+ }
627
669
 
628
- context = {
629
- bubbles: false,
630
- detail: {
631
- conditions: [
632
- [oper1, val1, connector, fdt == DATE_TIME ? this.useUTCTime : null],
633
- [oper2, val2, null, fdt == DATE_TIME ? this.useUTCTime : null]
634
- ],
635
- fieldDataType: this.fieldDataType
670
+ if(this._isValidCondition(oper2, val2)) {
671
+ if(ary2D.length) {
672
+ ary2D[0][2] = connector;
636
673
  }
637
- };
674
+ ary2D.push([oper2, val2]);
675
+ }
676
+
677
+ if(useUTCTime) {
678
+ ary2D.forEach(function(itm) {
679
+ item[3] = true;
680
+ });
681
+ }
682
+
683
+ eventArg.detail.conditions = ary2D;
638
684
  } else {
639
- context = {
640
- bubbles: false,
641
- detail: {
642
- value: this._dataSelector.getSelectedItems(),
643
- fieldDataType: this.fieldDataType
644
- }
645
- };
685
+ eventArg.detail.value = this._dataSelector.getSelectedItems();
646
686
  }
647
687
 
648
- this.dispatchEvent(new CustomEvent("filterChanged", context));
649
- this.dispatchEvent(new CustomEvent("confirm", context));
688
+ this.dispatchEvent(new CustomEvent("filterChanged", eventArg));
689
+ this.dispatchEvent(new CustomEvent("confirm", eventArg));
650
690
  this.hide();
651
691
  }
652
692
 
@@ -808,40 +848,39 @@ class FilterDialog extends BasicElement {
808
848
  }
809
849
  }
810
850
  }
811
- /**
812
- * @private
813
- * @param {boolean=} afterOpened
851
+ /** @private
852
+ * @returns {boolean}
814
853
  */
815
- _updateDialogHeight(afterOpened) {
816
- if(!afterOpened) {
817
- this._dialogHeightTimerId = 0;
818
- }
819
-
820
- this._popup.updatePosition(false); // update position without fallback
854
+ _updateDialogHeight() {
821
855
  this._rootContainer.classList.remove("compact");
822
856
  this._rootContainer.style.height = "";
857
+ this._popup.updatePosition(false); // update position without fallback
823
858
 
824
859
  const position = Dom.getRelativePosition(this, document.body);
825
860
  const dialogHeight = this.offsetHeight;
826
- const windowHeight = window.innerHeight;
861
+ const windowHeight = window.innerHeight - 5; // Add some buffer
827
862
  const dialogCoverage = position.y + dialogHeight;
828
863
  const heightDiff = dialogCoverage - windowHeight;
829
- const isAdvancedFilter = this._isAdvancedFilterMode();
830
- const minHeight = isAdvancedFilter ? 262 : 216;
831
- const compactThreshold = 409;
832
864
 
833
- if( heightDiff > 0 ){
865
+ var heightChange = false;
866
+ if(heightDiff > 0) {
867
+ heightChange = true;
868
+ const isAdvancedFilter = this._isAdvancedFilterMode();
869
+ const minHeight = isAdvancedFilter ? 262 : 216;
834
870
  let newHeight = dialogHeight - heightDiff;
835
871
  if(newHeight < minHeight || isAdvancedFilter){
836
872
  newHeight = minHeight;
837
873
  }
838
874
  this._rootContainer.style.height = newHeight + "px";
839
875
 
876
+ const compactThreshold = 409;
840
877
  if(newHeight < compactThreshold){
841
878
  this._rootContainer.classList.add("compact");
842
879
  }
843
880
  }
844
- this._popup.updatePosition();
881
+
882
+ this._popup.updatePosition(); // This must be called to apply fallback or height change
883
+ return heightChange;
845
884
  }
846
885
  /**
847
886
  * @private
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.69" };
3
+ window.EFX_GRID = { version: "6.0.71" };
@@ -35691,6 +35691,8 @@ VirtualizedLayoutGrid._proto = VirtualizedLayoutGrid.prototype;
35691
35691
  */
35692
35692
  /** @event Core#beforeContentBinding */
35693
35693
  /** @event Core#postSectionDataBinding */
35694
+ /** @event Core#firstRendered */
35695
+ /** @event Core#afterContentBinding */
35694
35696
  /** @event Core#rowHighlighted */
35695
35697
 
35696
35698
  /** @event Core#rowAdded
@@ -35861,6 +35863,8 @@ var Core = function (opt_initializer) {
35861
35863
  "beforeContentBinding",
35862
35864
  "preSectionDataBinding",
35863
35865
  "postSectionDataBinding",
35866
+ "firstRendered",
35867
+ "afterContentBinding",
35864
35868
  "rowExpansionBinding",
35865
35869
  "rowHighlighted",
35866
35870
  "preForcedUpdate",
@@ -36213,6 +36217,10 @@ Core.prototype._groupDefs = null;
36213
36217
  * @private
36214
36218
  */
36215
36219
  Core.prototype._batches = null;
36220
+ /** @type {boolean}
36221
+ * @private
36222
+ */
36223
+ Core.prototype._firstRendered = false;
36216
36224
  //#region Public Methods
36217
36225
 
36218
36226
  /**
@@ -36220,7 +36228,7 @@ Core.prototype._batches = null;
36220
36228
  * @return {string}
36221
36229
  */
36222
36230
  Core.getVersion = function () {
36223
- return "5.1.77";
36231
+ return "5.1.78";
36224
36232
  };
36225
36233
  /** {@link ElementWrapper#dispose}
36226
36234
  * @override
@@ -37028,6 +37036,7 @@ Core.prototype.getColumnCount = function () {
37028
37036
  * @fires Core#preSectionDataBinding
37029
37037
  * @fires Core#columnDataBinding
37030
37038
  * @fires Core#postSectionDataBinding
37039
+ * @fires Core#afterContentBinding
37031
37040
  */
37032
37041
  Core.prototype.setColumnCount = function(num) {
37033
37042
  var colCount = this._layoutX.getLaneCount();
@@ -37056,6 +37065,7 @@ Core.prototype.setColumnCount = function(num) {
37056
37065
  * @fires Core#preSectionDataBinding
37057
37066
  * @fires Core#columnDataBinding
37058
37067
  * @fires Core#postSectionDataBinding
37068
+ * @fires Core#afterContentBinding
37059
37069
  */
37060
37070
  Core.prototype.insertColumn = function (index, jsonObj) {
37061
37071
  var prevCount = this.getColumnCount();
@@ -37671,6 +37681,7 @@ Core.prototype._deserializeColumn = function (index, jsonObj) {
37671
37681
  * @fires Core#preSectionDataBinding
37672
37682
  * @fires Core#columnDataBinding
37673
37683
  * @fires Core#postSectionDataBinding
37684
+ * @fires Core#afterContentBinding
37674
37685
  */
37675
37686
  Core.prototype.addRow = function (opt_num) {
37676
37687
  if (opt_num == null) { opt_num = 1; }
@@ -39475,6 +39486,7 @@ Core.prototype.synchronizeHScrollbar = function (subGrid) {
39475
39486
  * @fires Core#preSectionDataBinding
39476
39487
  * @fires Core#columnDataBinding
39477
39488
  * @fires Core#postSectionDataBinding
39489
+ * @fires Core#afterContentBinding
39478
39490
  */
39479
39491
  Core.prototype.updateRowData = function (sectionRef, fromRowIndex, lastRowIndex, userParam) {
39480
39492
  var ss = this.getSectionSettings(sectionRef || "content");
@@ -40609,7 +40621,9 @@ Core.prototype._onSectionDataChanged = function (e) {
40609
40621
  rowDataCollection = dataView.getMultipleRowData(rids, fromR, toR);
40610
40622
  e["dataRows"] = rowDataCollection;
40611
40623
  }
40612
- if(e["sectionType"] === "content"){
40624
+
40625
+ var isContentSection = e["sectionType"] === "content";
40626
+ if(isContentSection){
40613
40627
  this._dispatch("beforeContentBinding", e);
40614
40628
  }
40615
40629
  this._dispatch("preSectionDataBinding", e);
@@ -40643,10 +40657,24 @@ Core.prototype._onSectionDataChanged = function (e) {
40643
40657
  this._dispatch("postSectionDataBinding", e);
40644
40658
  this._dispatchRowExpansionBinding(e);
40645
40659
 
40660
+ if(isContentSection){
40661
+ if(!this._firstRendered) {
40662
+ this._dispatch("firstRendered", e);
40663
+ this._firstRendered = true;
40664
+ }
40665
+ this._dispatch("afterContentBinding", e);
40666
+ }
40646
40667
  section._startBindingSession(false);
40647
40668
  this._dispatchingDataChanged = false;
40648
40669
  };
40649
40670
 
40671
+ /** @public
40672
+ * @ignore
40673
+ */
40674
+ Core.prototype.resetInternalState = function() {
40675
+ this._firstRendered = false;
40676
+ };
40677
+
40650
40678
  /** @private
40651
40679
  * @param {VScrollbar|HScrollbar} scrollbar
40652
40680
  * @returns {boolean}
@@ -44332,7 +44360,6 @@ SortableTitlePlugin._proto = SortableTitlePlugin.prototype;
44332
44360
  * @property {number=} contentRightPadding=0 Padding that is added next to the right most column. The padding is still a part of scrollable content.
44333
44361
  * @property {number=} contentBottomPadding=0 Padding that is added below the last section. The padding is still a part of scrollable content.
44334
44362
  * @property {number=} dataConflationRate=0 set delay for data to avoid to much sorting operation when data changed
44335
- * @property {Function=} dataComposed Handler for dataComposed event
44336
44363
  * @property {boolean=} autoDateConversion=false If enabled, date-time field with numeric value will be automatically converted to native date object.
44337
44364
  * @property {boolean=} textSelect=false If enabled, user can select content text by using mouse drag.
44338
44365
  * @property {string=} lang laguage for config localization date time, if null the default language is "en"
@@ -44344,6 +44371,10 @@ SortableTitlePlugin._proto = SortableTitlePlugin.prototype;
44344
44371
  * @property {string=} childDataField=CHILD_VALUES The given field will be used to store children's static data, such as row color assignment.
44345
44372
  * @property {boolean=} topSection=true If disabled, title section will not be rendered
44346
44373
  * @property {SortableTitlePlugin~Options=} sorting Options for sorting
44374
+ * @property {Function=} dataComposed Handler for dataComposed event
44375
+ * @property {Function=} beforeContentBinding Handler for beforeContentBinding event
44376
+ * @property {Function=} firstRendered Handler for firstRendered event
44377
+ * @property {Function=} afterContentBinding Handler for afterContentBinding event
44347
44378
  */
44348
44379
 
44349
44380
  /** @typedef {number|string|RowDefinition} Grid~RowReference
@@ -44414,6 +44445,16 @@ SortableTitlePlugin._proto = SortableTitlePlugin.prototype;
44414
44445
  * @description Trigger before content binding.
44415
44446
  */
44416
44447
 
44448
+ /** @event Grid#firstRendered
44449
+ * @property {Object} e Event of firstRendered
44450
+ * @description This event is triggered when the content is rendered for the first time.
44451
+ */
44452
+
44453
+ /** @event Grid#afterContentBinding
44454
+ * @property {Object} e Event of afterContentBinding
44455
+ * @description Trigger after content binding.
44456
+ */
44457
+
44417
44458
  /** @event Grid#beforeRowRemoved
44418
44459
  * @description Fired only when a row will be removed through Grid's API and before occurring of the actual removal
44419
44460
  */
@@ -44568,7 +44609,6 @@ var Grid = function(placeholder, config) {
44568
44609
  t.updateColumnTitle = t.updateColumnTitle.bind(t);
44569
44610
  t._populateTimeSeriesChildren = t._populateTimeSeriesChildren.bind(t);
44570
44611
 
44571
- t._onBeforeContentBinding = t._onBeforeContentBinding.bind(t);
44572
44612
  t._onPostSectionDataBinding = t._onPostSectionDataBinding.bind(t);
44573
44613
  t._asyncClearDataUpdates = t._asyncClearDataUpdates.bind(t);
44574
44614
  t._clearDataUpdates = t._clearDataUpdates.bind(t);
@@ -44661,9 +44701,11 @@ var Grid = function(placeholder, config) {
44661
44701
  t._grid.loadPlugin(t._stp, config);
44662
44702
  }
44663
44703
 
44664
- t._grid.listen("beforeContentBinding", t._onBeforeContentBinding);
44704
+ t._grid.listen("beforeContentBinding", t._dispatch.bind(t, "beforeContentBinding"));
44665
44705
  t._grid.listen("preSectionRender", t._onColumnHeaderBinding);
44666
44706
  t._grid.listen("postSectionDataBinding", t._onPostSectionDataBinding);
44707
+ t._grid.listen("firstRendered", t._dispatch.bind(t, "firstRendered"));
44708
+ t._grid.listen("afterContentBinding", t._dispatch.bind(t, "afterContentBinding"));
44667
44709
 
44668
44710
  t._grid.enableRowHighlighting(true);
44669
44711
 
@@ -45071,6 +45113,7 @@ Grid.prototype.initialize = function(gridOption) {
45071
45113
  var t = this; // For minimizing file size
45072
45114
  t._initializing = true;
45073
45115
  var grid = t._grid; // core grid
45116
+ grid.resetInternalState();
45074
45117
  gridOption = grid.normalizeConfig(gridOption);
45075
45118
 
45076
45119
  var exts = gridOption["plugins"] || gridOption["extensions"];
@@ -45177,10 +45220,10 @@ Grid.prototype.initialize = function(gridOption) {
45177
45220
  t.listen("rowExpansionBinding", rowExpansionBinding);
45178
45221
  }
45179
45222
 
45180
- var dataComposedHandler = gridOption["dataComposed"];
45181
- if(typeof dataComposedHandler === "function") {
45182
- t.listen("dataComposed", dataComposedHandler);
45183
- }
45223
+ this.addListener(gridOption, "dataComposed");
45224
+ this.addListener(gridOption, "beforeContentBinding");
45225
+ this.addListener(gridOption, "firstRendered");
45226
+ this.addListener(gridOption, "afterContentBinding");
45184
45227
 
45185
45228
  if(gridOption["autoDateConversion"]) {
45186
45229
  t._autoDateConversion = true;
@@ -46836,7 +46879,6 @@ Grid.prototype.removeAllRows = function() {
46836
46879
 
46837
46880
  // TODO: This logic should also be in the core grid
46838
46881
  this._grid.getVScrollbar().setScrollTop(0);
46839
- this._grid.getHScrollbar().setScrollLeft(0);
46840
46882
  };
46841
46883
  /** WARNING: This does not remove data stored in the data cache
46842
46884
  * @private
@@ -47794,13 +47836,6 @@ Grid.prototype._mainSorter = function (rowDefA, rowDefB, order) {
47794
47836
  return this._columnSorter(rowDefA, rowDefB, order);
47795
47837
  };
47796
47838
 
47797
- /** @private
47798
- * @param {Object} e
47799
- */
47800
- Grid.prototype._onBeforeContentBinding = function(e) {
47801
- this._dispatch("beforeContentBinding", e);
47802
- };
47803
-
47804
47839
  /** @private
47805
47840
  * @param {Object} e
47806
47841
  */