@refinitiv-ui/efx-grid 6.0.26 → 6.0.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,7 +42,11 @@ declare class RangeBarPlugin extends GridPlugin {
42
42
 
43
43
  public getTooltipText(colRef: number|string|null, rowRef: number|string|null): string;
44
44
 
45
+ public isRangeBarColumn(colIndex: number): boolean;
46
+
45
47
  }
46
48
 
49
+ declare function colCount(colIndex: number): boolean;
50
+
47
51
  export default RangeBarPlugin;
48
52
  export { RangeBarPlugin, RangeBarPlugin as RangeBar, RangeBarPlugin as RangeBarExtension };
@@ -486,6 +486,14 @@ RangeBarPlugin.prototype._onPostSectionBinding = function (e) {
486
486
  }
487
487
  };
488
488
 
489
+ /** @public
490
+ * @param {number} colIndex
491
+ * @return {boolean}
492
+ */
493
+ RangeBarPlugin.prototype.isRangeBarColumn = function (colIndex) {
494
+ return this._getColumnOption(colIndex, "rangeBar") ? true : false;
495
+ };
496
+
489
497
  /** @private
490
498
  * @param {Object} e
491
499
  */
@@ -44,9 +44,13 @@ declare class GroupDefinitions {
44
44
 
45
45
  public setGroup(groupId: string, groupDef?: (string)[]|any|null): string;
46
46
 
47
+ public hasGroupChild(parentId: string, childId: string): boolean;
48
+
47
49
  public addGroupChild(parentId: string, childId: string): boolean;
48
50
 
49
- public removeGroupChild(childId: string): boolean;
51
+ public removeGroupChild(parentId: string, childId?: string|null): boolean;
52
+
53
+ public unsetParent(childId: string): boolean;
50
54
 
51
55
  public removeAllChildren(groupId: string): boolean;
52
56
 
@@ -356,7 +356,7 @@ GroupDefinitions.prototype.removeGroup = function (groupId) {
356
356
  var curDef = this._groupMap[groupId];
357
357
  if(curDef) {
358
358
  this.removeAllChildren(groupId);
359
- this.removeGroupChild(groupId);
359
+ this.unsetParent(groupId);
360
360
  delete this._groupMap[groupId];
361
361
 
362
362
  return true;
@@ -415,12 +415,26 @@ GroupDefinitions.prototype._ungroupChildren = function(children) {
415
415
  if (Array.isArray(children)) {
416
416
  var len = children.length;
417
417
  for(var i = 0; i < len; ++i) {
418
- this.removeGroupChild(children[i]);
418
+ this.unsetParent(children[i]);
419
419
  }
420
420
  }
421
421
  };
422
422
 
423
-
423
+ /** @public
424
+ * @param {string} parentId Group id
425
+ * @param {string} childId
426
+ * @return {boolean}
427
+ */
428
+ GroupDefinitions.prototype.hasGroupChild = function (parentId, childId) {
429
+ var groupDef = this._groupMap[parentId];
430
+ if(childId && groupDef) {
431
+ var chdr = groupDef.children;
432
+ if(chdr) {
433
+ return chdr.indexOf(childId) >= 0;
434
+ }
435
+ }
436
+ return false;
437
+ };
424
438
  /** @public
425
439
  * @param {string} parentId Group id
426
440
  * @param {string} childId
@@ -432,7 +446,7 @@ GroupDefinitions.prototype.addGroupChild = function (parentId, childId) {
432
446
  if(childId && groupDef) {
433
447
  var chdr = groupDef.children;
434
448
  if(chdr && chdr.indexOf(childId) < 0) {
435
- this.removeGroupChild(childId); // Remove previous parent
449
+ this.unsetParent(childId); // Remove previous parent
436
450
  // Add new child to group structures
437
451
  this._childToParent[childId] = parentId;
438
452
  var childDef = this._groupMap[childId];
@@ -445,12 +459,27 @@ GroupDefinitions.prototype.addGroupChild = function (parentId, childId) {
445
459
  }
446
460
  return false;
447
461
  };
462
+ /** Remove the given child from the specified parent. If childId is not given, unsetParent will be used on parentId instead of childId.
463
+ * @public
464
+ * @param {string} parentId Group id
465
+ * @param {string=} childId
466
+ * @return {boolean}
467
+ */
468
+ GroupDefinitions.prototype.removeGroupChild = function (parentId, childId) {
469
+ if(childId == null) {
470
+ return this.unsetParent(parentId);
471
+ }
472
+ if(this.hasGroupChild(parentId, childId)) {
473
+ return this.unsetParent(childId);
474
+ }
475
+ return false;
476
+ };
448
477
  /** Remove the given child from its own parent (i.e., unset Parent of the given child).
449
478
  * @public
450
479
  * @param {string} childId
451
480
  * @return {boolean}
452
481
  */
453
- GroupDefinitions.prototype.removeGroupChild = function (childId) {
482
+ GroupDefinitions.prototype.unsetParent = function (childId) {
454
483
  var parentId = this._childToParent[childId];
455
484
  if(!parentId) {
456
485
  return false;
@@ -69,12 +69,22 @@ declare class ColumnGroupingPlugin extends GridPlugin {
69
69
 
70
70
  public moveColumnIntoGroup(colRef: number|string|null, to: number, groupId: string): void;
71
71
 
72
- public setColumnParent(colRef: number|string|null, groupId: string): void;
72
+ public setColumnParent(colRef: number|string|null, groupId: string): boolean;
73
+
74
+ public addGroupChild(parentId: string, childRef: number|string|null): boolean;
75
+
76
+ public removeGroupChild(parentId: string, childRef: number|string|null): boolean;
77
+
78
+ public unsetParent(childRef: number|string|null): boolean;
73
79
 
74
80
  public getValidDestinationIndex(id: string, destCol: number|string|null): number;
75
81
 
76
82
  public moveGroup(id: string, destCol: number|string|null): void;
77
83
 
84
+ public reorderColumns(colList: (number|string)[]|null, destCol: number|string|null): boolean;
85
+
86
+ public moveColumnById(srcCol: number|string|null, destCol?: number|string|null): boolean;
87
+
78
88
  }
79
89
 
80
90
  export default ColumnGroupingPlugin;
@@ -12,7 +12,8 @@ declare namespace ColumnStackPlugin {
12
12
  type Options = {
13
13
  fields: (string)[]|null,
14
14
  stacks: (ColumnStackPlugin.StackDefinition)[]|null,
15
- autoStacking?: boolean|null
15
+ autoStacking?: boolean|null,
16
+ clicked?: ((...params: any[]) => any)|null
16
17
  };
17
18
 
18
19
  type ColumnOptions = {
@@ -90,6 +91,8 @@ declare class ColumnStackPlugin extends GridPlugin {
90
91
 
91
92
  public unstackColumns(colIndices?: (number)[]|null): boolean;
92
93
 
94
+ public removeStack(stackId: string): boolean;
95
+
93
96
  public removeAllStacks(enableUpdateUI?: boolean|null): boolean;
94
97
 
95
98
  public swapColumn(colRef: number|Event|null, swappingIndex: number): boolean;
@@ -116,6 +119,16 @@ declare class ColumnStackPlugin extends GridPlugin {
116
119
 
117
120
  public getActiveColumnField(stackId: string): string;
118
121
 
122
+ public addStackChild(stackId: string, colRef: number|string|null): void;
123
+
124
+ public removeStackChild(stackId: string, colRef: number|string|null): void;
125
+
126
+ public unsetParent(colRef: number|string|null): void;
127
+
128
+ public reorderColumns(colList: (number|string)[]|null, destCol?: (number|string)|null): boolean;
129
+
130
+ public moveColumnById(srcCol: number|string|null, destCol?: (number|string)|null): boolean;
131
+
119
132
  }
120
133
 
121
134
  export default ColumnStackPlugin;
package/lib/versions.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "tr-grid-util": "1.3.84",
2
+ "tr-grid-util": "1.3.85",
3
3
  "@grid/column-dragging": "1.0.11",
4
4
  "@grid/row-segmenting": "1.0.22",
5
5
  "@grid/statistics-row": "1.0.13",
@@ -9,10 +9,10 @@
9
9
  "tr-grid-checkbox": "1.0.60",
10
10
  "tr-grid-column-fitter": "1.0.39",
11
11
  "tr-grid-column-formatting": "0.9.34",
12
- "tr-grid-column-grouping": "1.0.44",
12
+ "tr-grid-column-grouping": "1.0.45",
13
13
  "tr-grid-column-resizing": "1.0.28",
14
14
  "tr-grid-column-selection": "1.0.26",
15
- "tr-grid-column-stack": "1.0.50",
15
+ "tr-grid-column-stack": "1.0.51",
16
16
  "tr-grid-conditional-coloring": "1.0.57",
17
17
  "tr-grid-content-wrap": "1.0.19",
18
18
  "tr-grid-contextmenu": "1.0.38",
@@ -22,7 +22,7 @@
22
22
  "tr-grid-pagination": "1.0.24",
23
23
  "tr-grid-percent-bar": "1.0.22",
24
24
  "tr-grid-printer": "1.0.16",
25
- "tr-grid-range-bar": "2.0.2",
25
+ "tr-grid-range-bar": "2.0.3",
26
26
  "tr-grid-row-dragging": "1.0.24",
27
27
  "tr-grid-row-filtering": "1.0.55",
28
28
  "tr-grid-row-grouping": "1.0.80",
package/package.json CHANGED
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "version": "6.0.26"
65
+ "version": "6.0.27"
66
66
  }