@refinitiv-ui/efx-grid 6.0.63 → 6.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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.63" };
3
+ window.EFX_GRID = { version: "6.0.65" };
@@ -136,7 +136,6 @@ RowSegmentingPlugin.prototype.initialize = function (host, options) {
136
136
  }
137
137
 
138
138
  ExpanderIcon.loadExpanderStyles();
139
- ExpanderIcon.injectExpanderStyles(host.getElement());
140
139
 
141
140
  this._hosts.push(host);
142
141
  host.listen("preSectionDataBinding", this._onPreSectionDataBinding);
@@ -178,12 +177,13 @@ RowSegmentingPlugin.prototype._refreshSegmentSeparator = function () {
178
177
  }
179
178
  var dv = this._getDataView();
180
179
  if(dv) {
181
- var rowIds = dv.getAllRowIds();
180
+ var dt = dv.getDataSource();
181
+ var rowIds = dt.getAllRowIds();
182
182
  var rowCount = rowIds.length;
183
183
  var separatorMapping = {};
184
184
  for (var i = 0; i < rowCount; i++) {
185
185
  var rowId = rowIds[i];
186
- var rowData = this._rowGetter(dv.getRowData(rowId));
186
+ var rowData = this._rowGetter(dt.getRowData(rowId));
187
187
  var segmentId = rowData[this._segmentIdField];
188
188
  // TODO: supports collapsed and expanded for save/restore
189
189
 
@@ -129,10 +129,12 @@ var ColumnStackPlugin = function () {
129
129
  this._onStackButtonClicked = this._onStackButtonClicked.bind(this);
130
130
  this._updateUI = this._updateUI.bind(this);
131
131
  this._toColumnId = this._toColumnId.bind(this);
132
+ this._requestFilterRefresh = this._requestFilterRefresh.bind(this);
132
133
 
133
134
  this._hosts = [];
134
135
  this._groupDefs = new GroupDefinitions();
135
136
 
137
+ this._filterConflator = new Conflator(50, this._requestFilterRefresh);
136
138
  this._conflator = new Conflator(50, this._updateUI);
137
139
  };
138
140
 
@@ -275,6 +277,7 @@ ColumnStackPlugin.prototype.unload = function (host) {
275
277
 
276
278
  if(this._hosts.length <= 0) {
277
279
  this._conflator.reset();
280
+ this._filterConflator.reset();
278
281
  this._groupDefs.removeAllGroups();
279
282
  }
280
283
  this._dispose();
@@ -537,9 +540,24 @@ ColumnStackPlugin.prototype._hideStackedColumns = function(stack, colRefs, activ
537
540
  */
538
541
  ColumnStackPlugin.prototype._setColumnVisibility = function(colIndex, shown) {
539
542
  if(colIndex >= 0) {
543
+ var dirty = false;
540
544
  for(var g = this._hosts.length; --g >= 0;) {
541
- this._hosts[g].setColumnVisibility(colIndex, shown, 2);
545
+ dirty |= this._hosts[g].setColumnVisibility(colIndex, shown, 2);
542
546
  }
547
+
548
+ if(dirty){
549
+ this._requestFilterRefresh();
550
+ }
551
+ }
552
+ };
553
+ /** @private */
554
+ ColumnStackPlugin.prototype._requestFilterRefresh = function() {
555
+ if(this._filterConflator.conflate()) {
556
+ return;
557
+ }
558
+ var rfp = this._getPlugin("RowFilteringPlugin");
559
+ if(rfp && rfp["refresh"]) {
560
+ rfp["refresh"]();
543
561
  }
544
562
  };
545
563
  /** @private
@@ -1042,10 +1060,6 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options) {
1042
1060
 
1043
1061
  this._groupDefs.setGroup(sid, stack);
1044
1062
 
1045
- var cfp = this._getPlugin("ColumnFilterPlugin");
1046
- if(cfp) {
1047
- cfp["refresh"]();
1048
- }
1049
1063
  this._updateUI(); // asyncronuos
1050
1064
  return true;
1051
1065
  };
@@ -1205,10 +1219,6 @@ ColumnStackPlugin.prototype.unstackColumns = function(colIndices) {
1205
1219
  }
1206
1220
  }
1207
1221
  if(dirty) {
1208
- var cfp = this._getPlugin("ColumnFilterPlugin");
1209
- if(cfp) {
1210
- cfp["refresh"]();
1211
- }
1212
1222
  this._updateUI(); // asyncronuos
1213
1223
  }
1214
1224
 
@@ -1345,10 +1355,6 @@ ColumnStackPlugin.prototype._setActiveColumn = function(stack, newActiveColumn)
1345
1355
  csp.dispatchSelectionChanged();
1346
1356
  }
1347
1357
  }
1348
- var cfp = this._getPlugin("ColumnFilterPlugin");
1349
- if(cfp) {
1350
- cfp["refresh"]();
1351
- }
1352
1358
  return true;
1353
1359
  };
1354
1360
 
@@ -1301,38 +1301,23 @@ RowFilteringPlugin.prototype._setTimerForUpdatingIcons = function () {
1301
1301
 
1302
1302
  RowFilteringPlugin.prototype.refresh = function () {
1303
1303
  this._dvTimerId = 0;
1304
+ this._activeColFilters = this._columnFilters; //check cstp
1304
1305
 
1305
- var cstkp = this._getPlugin("ColumnStackingPlugin");
1306
+ var cstkp = this._getPlugin("ColumnStackPlugin");
1306
1307
 
1307
- this._activeColFilters = this._columnFilters;
1308
-
1309
- if (cstkp && this._activeColFilters.length) {
1308
+ if (cstkp) {
1310
1309
  var colIndex, cfo;
1310
+ var host = this._hosts[0];
1311
1311
 
1312
1312
  var colCount = this._getColumnCount();
1313
1313
 
1314
- var hasInactiveColumn = false;
1314
+ this._activeColFilters = [];
1315
1315
 
1316
1316
  for (colIndex = 0; colIndex < colCount; ++colIndex) {
1317
1317
  cfo = this._getColumnFilterOption(colIndex);
1318
1318
 
1319
- if (cfo) {
1320
- if (cstkp.isInactiveStackedColumn(colIndex)) {
1321
- hasInactiveColumn = true;
1322
- break;
1323
- }
1324
- }
1325
- }
1326
-
1327
- if (hasInactiveColumn) {
1328
- this._activeColFilters = [];
1329
-
1330
- for (colIndex = 0; colIndex < colCount; ++colIndex) {
1331
- cfo = this._getColumnFilterOption(colIndex);
1332
-
1333
- if (cfo && !cstkp.isInactiveStackedColumn(colIndex)) {
1334
- this._activeColFilters.push(cfo);
1335
- }
1319
+ if (cfo && host.getColumnVisibility(colIndex, 2)) {
1320
+ this._activeColFilters.push(cfo);
1336
1321
  }
1337
1322
  }
1338
1323
  }
@@ -399,7 +399,6 @@ RowGroupingPlugin.prototype.initialize = function (host, options) {
399
399
  this._hosts.push(host);
400
400
 
401
401
  ExpanderIcon.loadExpanderStyles();
402
- ExpanderIcon.injectExpanderStyles(host.getElement());
403
402
 
404
403
  host.unloadPlugin("CollapsibleHeaderPlugin");
405
404
  host.listen("columnMoved", this._onColumnIndexChanged);
@@ -1,5 +1,4 @@
1
1
  import { Ext } from "./Ext.js";
2
- import { injectCss, prettifyCss } from "./Util.js";
3
2
  import { ElementWrapper } from "./ElementWrapper.js";
4
3
  import { ElfUtil } from "./ElfUtil.js";
5
4
 
@@ -9,8 +8,6 @@ declare class ExpanderIcon extends ElementWrapper {
9
8
 
10
9
  public static loadExpanderStyles(): void;
11
10
 
12
- public static injectExpanderStyles(elem: Element|null): void;
13
-
14
11
  public expand(): void;
15
12
 
16
13
  public collapse(): void;
@@ -1,9 +1,7 @@
1
1
  import { Ext } from "./Ext.js";
2
- import { injectCss, prettifyCss } from "./Util.js";
3
2
  import { ElementWrapper } from "./ElementWrapper.js";
4
3
  import { ElfUtil } from "./ElfUtil.js";
5
4
 
6
-
7
5
  /**
8
6
  * @constructor
9
7
  * @extends {ElementWrapper}
@@ -33,44 +31,6 @@ Ext.inherits(ExpanderIcon, ElementWrapper);
33
31
  */
34
32
  ExpanderIcon._iconName = ""; // static variable
35
33
 
36
- /** @description .expander is the actual arrow <br>
37
- * .folder is an element hosting .expander arrow
38
- * @type {string}
39
- * @private
40
- */
41
- ExpanderIcon._styles = prettifyCss([
42
- ".tr-grid.expander-disabled .expander", [
43
- "cursor: default;"
44
- ],
45
- ".tr-grid.folder-disabled .cell.folder", [
46
- "cursor: default;"
47
- ],
48
- ".tr-grid .expander", [
49
- "cursor: pointer;",
50
- "display: inline-block;" // For transformation
51
- ],
52
- ".tr-grid .folder .expander:before", [
53
- "content: none !important;" // Prevent deprecated styling
54
- ],
55
- ".tr-grid .fallback-arrow", [
56
- "vertical-align: middle;",
57
- "font-size: 7px;",
58
- "line-height: 1;",
59
- "display: inline-block;", // For transformation
60
- "transform: scaleX(1.5);",
61
- "font-family: Arial;"
62
- ],
63
- ".tr-grid .expander.closed", [
64
- "transform: translate(0px, -1px) rotate(-90deg);"
65
- ],
66
- ".tr-grid .cell.closed .expander", [
67
- "transform: translate(0px, -1px) rotate(-90deg);"
68
- ],
69
- ".tr-grid .tr-lg .cell.folder.content-header", [ // Used for header row in contentAsHeader mode, espectially with solar theme
70
- "background-color: inherit;"
71
- ]
72
- ]);
73
-
74
34
  /** @private
75
35
  * @param {Event} e
76
36
  */
@@ -98,15 +58,6 @@ ExpanderIcon.loadExpanderStyles = function() {
98
58
  }
99
59
  }
100
60
  };
101
- /** @public
102
- * @param {Element} elem
103
- */
104
- ExpanderIcon.injectExpanderStyles = function(elem) {
105
- if(elem && elem.nodeType === 1 && !elem._expanderStyles) {
106
- elem._expanderStyles = true; // Prevent loading the same style twice
107
- injectCss(ExpanderIcon._styles, elem);
108
- }
109
- };
110
61
 
111
62
  /** @private
112
63
  * @param {Object} cell
@@ -120,6 +120,36 @@ RowPainter._styles = prettifyCss([
120
120
  "--grid-expanded-tag-bg-color: #4D4D4D;",
121
121
  "--grid-row-menu-icon-color: #CCCCCC;",
122
122
  "--grid-row-menu-icon-hover-color: #FFFFFF;"
123
+ ],
124
+ ".tr-grid.expander-disabled .expander", [
125
+ "cursor: default;"
126
+ ],
127
+ ".tr-grid.folder-disabled .cell.folder", [
128
+ "cursor: default;"
129
+ ],
130
+ ".tr-grid .expander", [
131
+ "cursor: pointer;",
132
+ "display: inline-block;" // For transformation
133
+ ],
134
+ ".tr-grid .folder .expander:before", [
135
+ "content: none !important;" // Prevent deprecated styling
136
+ ],
137
+ ".tr-grid .fallback-arrow", [
138
+ "vertical-align: middle;",
139
+ "font-size: 7px;",
140
+ "line-height: 1;",
141
+ "display: inline-block;", // For transformation
142
+ "transform: scaleX(1.5);",
143
+ "font-family: Arial;"
144
+ ],
145
+ ".tr-grid .expander.closed", [
146
+ "transform: translate(0px, -1px) rotate(-90deg);"
147
+ ],
148
+ ".tr-grid .cell.closed .expander", [
149
+ "transform: translate(0px, -1px) rotate(-90deg);"
150
+ ],
151
+ ".tr-grid .tr-lg .cell.folder.content-header", [ // Used for header row in contentAsHeader mode, espectially with solar theme
152
+ "background-color: inherit;"
123
153
  ]
124
154
  ]);
125
155
 
@@ -1,6 +1,7 @@
1
1
  import {Ext} from "../../tr-grid-util/es6/Ext.js";
2
2
  import {GridPlugin} from "../../tr-grid-util/es6/GridPlugin.js";
3
3
  import {FilterBuilder} from "../../tr-grid-util/es6/FilterBuilder.js";
4
+ import {FilterOperators} from "../../tr-grid-util/es6/FilterOperators.js";
4
5
  import {ElfUtil} from "../../tr-grid-util/es6/ElfUtil.js";
5
6
  import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
6
7
 
package/lib/versions.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "tr-grid-util": "1.3.129",
2
+ "tr-grid-util": "1.3.130",
3
3
  "tr-grid-printer": "1.0.16",
4
4
  "@grid/column-dragging": "1.0.14",
5
- "@grid/row-segmenting": "1.0.26",
5
+ "@grid/row-segmenting": "1.0.28",
6
6
  "@grid/statistics-row": "1.0.15",
7
7
  "@grid/zoom": "1.0.11",
8
8
  "tr-grid-auto-tooltip": "1.1.6",
@@ -13,7 +13,7 @@
13
13
  "tr-grid-column-grouping": "1.0.55",
14
14
  "tr-grid-column-resizing": "1.0.28",
15
15
  "tr-grid-column-selection": "1.0.29",
16
- "tr-grid-column-stack": "1.0.70",
16
+ "tr-grid-column-stack": "1.0.71",
17
17
  "tr-grid-conditional-coloring": "1.0.62",
18
18
  "tr-grid-content-wrap": "1.0.20",
19
19
  "tr-grid-contextmenu": "1.0.39",
@@ -24,8 +24,8 @@
24
24
  "tr-grid-percent-bar": "1.0.22",
25
25
  "tr-grid-range-bar": "2.0.5",
26
26
  "tr-grid-row-dragging": "1.0.29",
27
- "tr-grid-row-filtering": "1.0.59",
28
- "tr-grid-row-grouping": "1.0.81",
27
+ "tr-grid-row-filtering": "1.0.60",
28
+ "tr-grid-row-grouping": "1.0.82",
29
29
  "tr-grid-row-selection": "1.0.23",
30
30
  "tr-grid-rowcoloring": "1.0.24",
31
31
  "tr-grid-textformatting": "1.0.46",
package/package.json CHANGED
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "version": "6.0.63"
69
+ "version": "6.0.65"
70
70
  }