@refinitiv-ui/efx-grid 6.0.92 → 6.0.93

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,7 @@
1
1
  import { Ext } from "../../tr-grid-util/es6/Ext.js";
2
- import { cloneObject } from "../../tr-grid-util/es6/Util.js";
3
2
  import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
4
3
  import { GroupDefinitions } from "../../tr-grid-util/es6/GroupDefinitions.js";
5
- import { injectCss, prettifyCss, deepEqual } from "../../tr-grid-util/es6/Util.js";
4
+ import { cloneObject, injectCss, prettifyCss, deepEqual } from "../../tr-grid-util/es6/Util.js";
6
5
 
7
6
  declare namespace ColumnGroupingPlugin {
8
7
 
@@ -1,8 +1,7 @@
1
1
  import { Ext } from "../../tr-grid-util/es6/Ext.js";
2
- import { cloneObject } from "../../tr-grid-util/es6/Util.js";
3
2
  import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
4
3
  import { GroupDefinitions } from "../../tr-grid-util/es6/GroupDefinitions.js";
5
- import { injectCss, prettifyCss, deepEqual } from "../../tr-grid-util/es6/Util.js";
4
+ import { cloneObject, injectCss, prettifyCss, deepEqual } from "../../tr-grid-util/es6/Util.js";
6
5
 
7
6
  /** @typedef {Array<ColumnGroupingPlugin~GroupDefinition>} ColumnGroupingPlugin~Options
8
7
  * @description This options can be specified by `columnGrouping` property of the main grid's options or extension options.
@@ -173,8 +172,8 @@ ColumnGroupingPlugin._cloneObject = function (obj) {
173
172
  */
174
173
  ColumnGroupingPlugin._flattenGroupDefs = function (groupDefs) {
175
174
  var grpCount = groupDefs ? groupDefs.length : 0;
176
- for (var i = 0; i < grpCount; i++) {
177
- ColumnGroupingPlugin._recursivelyFlatten(groupDefs[i], groupDefs);
175
+ for (var _i = 0; _i < grpCount; _i++) {
176
+ ColumnGroupingPlugin._recursivelyFlatten(groupDefs[_i], groupDefs);
178
177
  }
179
178
  };
180
179
  /** Flatten group definition structure by using group ID instead of nested group definitions.
@@ -187,13 +186,13 @@ ColumnGroupingPlugin._recursivelyFlatten = function (groupDef, groupDefs) {
187
186
  if (groupDef && groupDef.children) {
188
187
  var children = groupDef.children;
189
188
  var member, groupId;
190
- for (var i = 0; i < children.length; i++) {
191
- member = children[i];
189
+ for (var _i2 = 0; _i2 < children.length; _i2++) {
190
+ member = children[_i2];
192
191
  if (typeof member !== "string") {
193
192
  // member is nested group definition
194
193
  groupId = member.id;
195
194
  if (groupId) {
196
- children[i] = groupId; // Use group ID instead of nested group definition
195
+ children[_i2] = groupId; // Use group ID instead of nested group definition
197
196
  if (groupDefs.indexOf(member) < 0) {
198
197
  groupDefs.push(member);
199
198
  }
@@ -431,8 +430,8 @@ ColumnGroupingPlugin.prototype._migrateLegacyStructure = function (groupDefs, co
431
430
  */
432
431
  ColumnGroupingPlugin.prototype._freezeColumn = function (frozenColIndex, numRightColumn) {
433
432
  var hosts = this._hosts;
434
- for (var i = 0; i < hosts.length; i++) {
435
- hosts[i].freezeColumn(frozenColIndex, numRightColumn);
433
+ for (var _i3 = 0; _i3 < hosts.length; _i3++) {
434
+ hosts[_i3].freezeColumn(frozenColIndex, numRightColumn);
436
435
  }
437
436
  };
438
437
  /** @private
@@ -561,8 +560,8 @@ ColumnGroupingPlugin.prototype._setGroupPinning = function (groupDef, side) {
561
560
  groupDef.rightPinned = true;
562
561
  }
563
562
  var children = groupDef["children"];
564
- for (var i = 0; i < children.length; i++) {
565
- var child = children[i];
563
+ for (var _i4 = 0; _i4 < children.length; _i4++) {
564
+ var child = children[_i4];
566
565
  var group = this._visibleGroupMap[child];
567
566
  if (group) {
568
567
  this._setGroupPinning(group, side);
@@ -726,8 +725,8 @@ ColumnGroupingPlugin.prototype._applyNearestGrouping = function (colIndex) {
726
725
  }
727
726
  }
728
727
  if (groupLeftCount && groupRightCount) {
729
- for (var i = 0; i < groupLeftCount; i++) {
730
- var groupLeftId = groupLeftIds[i];
728
+ for (var _i5 = 0; _i5 < groupLeftCount; _i5++) {
729
+ var groupLeftId = groupLeftIds[_i5];
731
730
  var sharedParentIdx = groupRightIds.indexOf(groupLeftId);
732
731
  if (sharedParentIdx >= 0) {
733
732
  this._groupDefs.addGroupChild(groupRightIds[sharedParentIdx], colId);
@@ -808,8 +807,8 @@ ColumnGroupingPlugin.prototype.renderGroups = function () {
808
807
  this._groupHeaderTimerId = 0;
809
808
  var hostCount = this._hosts.length;
810
809
  var groupMap = this._visibleGroupMap;
811
- for (var i = 0; i < hostCount; ++i) {
812
- var section = this._hosts[i].getSection("title");
810
+ for (var _i6 = 0; _i6 < hostCount; ++_i6) {
811
+ var section = this._hosts[_i6].getSection("title");
813
812
  if (!section) {
814
813
  continue;
815
814
  }
@@ -825,11 +824,11 @@ ColumnGroupingPlugin.prototype.renderGroups = function () {
825
824
  */
826
825
  ColumnGroupingPlugin.prototype.getMutualGroupId = function (colRefs) {
827
826
  var colCount = colRefs.length;
828
- for (var i = 0; i < colCount; i++) {
829
- if (typeof colRefs[i] === "string") {
830
- colRefs[i] = this.getColumnIndex(colRefs[i]);
827
+ for (var _i7 = 0; _i7 < colCount; _i7++) {
828
+ if (typeof colRefs[_i7] === "string") {
829
+ colRefs[_i7] = this.getColumnIndex(colRefs[_i7]);
831
830
  }
832
- var colIndex = colRefs[i];
831
+ var colIndex = colRefs[_i7];
833
832
  var groupIds = this.getGroupIds(colIndex);
834
833
  if (!groupIds) {
835
834
  // If at least 1 column is not part of a group, there is no need to find the groupId.
@@ -862,8 +861,8 @@ ColumnGroupingPlugin.prototype._renderGroup = function (groupDef, section) {
862
861
  var isAllSelected = false;
863
862
  if (this._selectedColMap) {
864
863
  isAllSelected = true;
865
- for (var i = 0; i < colIds.length; i++) {
866
- if (!this._selectedColMap[colIds[i]]) {
864
+ for (var _i8 = 0; _i8 < colIds.length; _i8++) {
865
+ if (!this._selectedColMap[colIds[_i8]]) {
867
866
  isAllSelected = false;
868
867
  break;
869
868
  }
@@ -931,12 +930,13 @@ ColumnGroupingPlugin.prototype._applyTimeSeries = function (e) {
931
930
  var children = [];
932
931
  var timeSeriesId, timeSeriesName;
933
932
  var tsgChild = {};
934
- for (var i = 0; i < addingEvents.length; i++) {
933
+ for (var _i9 = 0; _i9 < addingEvents.length; _i9++) {
935
934
  // WARNING: addingEvents column can be difference group
936
- var addingEvent = addingEvents[i];
935
+ var addingEvent = addingEvents[_i9];
937
936
  timeSeriesName = addingEvent.context.timeSeriesName;
938
937
  timeSeriesId = addingEvent.context.timeSeriesId;
939
- var childIndex, childId;
938
+ var childIndex = void 0,
939
+ childId = void 0;
940
940
  if (!tsgChild[timeSeriesId]) {
941
941
  tsgChild[timeSeriesId] = {
942
942
  name: timeSeriesName,
@@ -1244,8 +1244,8 @@ ColumnGroupingPlugin.prototype.setGroupName = function (groupId, groupName) {
1244
1244
  if (groupDef) {
1245
1245
  groupDef.name = groupName;
1246
1246
  var hostCount = this._hosts.length;
1247
- for (var i = 0; i < hostCount; ++i) {
1248
- var section = this._hosts[i].getSection("title");
1247
+ for (var _i10 = 0; _i10 < hostCount; ++_i10) {
1248
+ var section = this._hosts[_i10].getSection("title");
1249
1249
  if (!section) {
1250
1250
  continue;
1251
1251
  }
@@ -1267,8 +1267,8 @@ ColumnGroupingPlugin.prototype._getAvaliableChildren = function (groupId) {
1267
1267
  var validCols = host.getValidColumnList(chdr);
1268
1268
  validChildren = validCols.map(ColumnGroupingPlugin.getObjectId);
1269
1269
  var groupMap = this._groupDefs.getGroupMap();
1270
- for (var i = 0; i < childCount; i++) {
1271
- var childId = chdr[i];
1270
+ for (var _i11 = 0; _i11 < childCount; _i11++) {
1271
+ var childId = chdr[_i11];
1272
1272
  if (groupMap[childId]) {
1273
1273
  validChildren.push(childId);
1274
1274
  }
@@ -1446,8 +1446,8 @@ ColumnGroupingPlugin.prototype.moveColumnIntoGroup = function (colRef, to, group
1446
1446
 
1447
1447
  // Calculate left and right bound of the group, which column can be moved to.
1448
1448
  // destination should be between the bound, and it should not be placed between columns in child group
1449
- for (var i = 0; i < groupDef.children.length; i++) {
1450
- var notAllowIndices = this.getChildColumnIndices(groupDef.children[i]);
1449
+ for (var _i12 = 0; _i12 < groupDef.children.length; _i12++) {
1450
+ var notAllowIndices = this.getChildColumnIndices(groupDef.children[_i12]);
1451
1451
  if (notAllowIndices && notAllowIndices.length) {
1452
1452
  var leftLimit = notAllowIndices[0];
1453
1453
  var rightLimit = notAllowIndices[notAllowIndices.length - 1];
@@ -1617,8 +1617,8 @@ ColumnGroupingPlugin.prototype.getValidDestinationIndex = function (id, destCol)
1617
1617
 
1618
1618
  // handle group/column should not insert between group
1619
1619
  var groupChildren = this.getGroupChildren(parentGroupDef["id"]);
1620
- for (var i = 0; i < groupChildren.length; i++) {
1621
- var childId = groupChildren[i];
1620
+ for (var _i13 = 0; _i13 < groupChildren.length; _i13++) {
1621
+ var childId = groupChildren[_i13];
1622
1622
  var childGroupIndices = this.getChildColumnIndices(childId);
1623
1623
  if (childGroupIndices && childGroupIndices.length) {
1624
1624
  startIndex = childGroupIndices[0];
@@ -1664,8 +1664,8 @@ ColumnGroupingPlugin.prototype.moveGroup = function (id, destCol) {
1664
1664
  groupDef = this._groupDefs.getGroup(id);
1665
1665
  if (groupDef) {
1666
1666
  var indices = this.getChildColumnIndices(groupDef["id"]);
1667
- for (var i = 0; i < indices.length; i++) {
1668
- var index = indices[i];
1667
+ for (var _i14 = 0; _i14 < indices.length; _i14++) {
1668
+ var index = indices[_i14];
1669
1669
  var colId = this.getColumnId(index);
1670
1670
  members.push(colId);
1671
1671
  }
@@ -1790,8 +1790,8 @@ ColumnGroupingPlugin.prototype.selectGroupHeaders = function (colIndices) {
1790
1790
  var count = colIndices.length;
1791
1791
  if (host && count) {
1792
1792
  var colIds = [];
1793
- for (var i = 0; i < count; i++) {
1794
- colIds.push(host.getColumnId(colIndices[i]));
1793
+ for (var _i15 = 0; _i15 < count; _i15++) {
1794
+ colIds.push(host.getColumnId(colIndices[_i15]));
1795
1795
  }
1796
1796
  var colMap = host.createColumnMap(colIds);
1797
1797
  if (colMap) {