@refinitiv-ui/efx-grid 6.0.119 → 6.0.121
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/lib/column-dragging/es6/ColumnDragging.js +7 -4
- package/lib/core/dist/core.js +104 -10
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataView.js +7 -5
- package/lib/core/es6/grid/Core.js +3 -3
- package/lib/core/es6/grid/components/Cell.d.ts +2 -0
- package/lib/core/es6/grid/components/Cell.js +89 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +1 -1
- package/lib/core/es6/grid/components/HScrollbar.js +5 -2
- package/lib/filter-dialog/themes/base-checkbox.less +1 -1
- package/lib/filter-dialog/themes/base.less +8 -3
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +240 -104
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.js +7 -0
- package/lib/rt-grid/es6/Grid.js +108 -81
- package/lib/rt-grid/es6/RowDefinition.d.ts +1 -1
- package/lib/rt-grid/es6/RowDefinition.js +28 -17
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +18 -15
- package/lib/tr-grid-checkbox/es6/Checkbox.js +4 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +6 -1
- package/lib/tr-grid-filter-input/es6/FilterInput.js +1 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +0 -2
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +82 -77
- package/lib/tr-grid-row-selection/es6/RowSelection.js +155 -35
- package/lib/types/es6/Core/grid/components/Cell.d.ts +2 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +1 -1
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +1 -1
- package/lib/types/es6/RowDragging.d.ts +0 -2
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/versions.json +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
@@ -56,6 +56,6 @@ See list of APIs, demo and more usage guide by visiting [EFX Grid document](http
|
|
56
56
|
|
57
57
|
# License
|
58
58
|
|
59
|
-
You can check out the full license [here](https://refinitiv.github.io/efx-grid
|
59
|
+
You can check out the full license [here](https://refinitiv.github.io/efx-grid/#/license)
|
60
60
|
|
61
61
|
However, Halo theme shall only be used within Refinitiv products or services due to license of the font "Proxima Nova Fin".
|
@@ -531,21 +531,24 @@ ColumnDraggingPlugin.prototype._onMouseUp = function (e) {
|
|
531
531
|
};
|
532
532
|
|
533
533
|
/** @private
|
534
|
-
* @return {number} 0 does not allow dragging, 1 allows single dragging, and 2 allows multiple dragging
|
534
|
+
* @return {number} 0 does not allow dragging, 1 allows single dragging, and 2 allows multiple dragging with row selection =.
|
535
535
|
*/
|
536
536
|
ColumnDraggingPlugin.prototype._getDraggingStyle = function() {
|
537
537
|
let colSelExt = this._getPlugin("ColumnSelectionPlugin");
|
538
|
-
|
539
|
-
if(!cgp) {
|
538
|
+
if(!colSelExt) {
|
540
539
|
return 1;
|
541
540
|
}
|
541
|
+
let cgp = this._getPlugin("ColumnGroupingPlugin");
|
542
542
|
let selectedCols = colSelExt.getSelectedColumns();
|
543
543
|
let dragOutSel = selectedCols.indexOf(this._startColumn) === -1;
|
544
|
-
if(dragOutSel) { //
|
544
|
+
if(dragOutSel) { // drag outside selected col, drag only 1 row
|
545
545
|
return 1;
|
546
546
|
}
|
547
547
|
let selectedColCount = selectedCols.length;
|
548
548
|
if(selectedColCount > 1) { // Multiple column drag
|
549
|
+
if(!cgp) {
|
550
|
+
return 2;
|
551
|
+
}
|
549
552
|
let currentGroup, prevGroup;
|
550
553
|
for (let i = 0; i < selectedColCount; i++) {
|
551
554
|
let colIndex = selectedCols[i];
|
package/lib/core/dist/core.js
CHANGED
@@ -1686,6 +1686,10 @@ Cell.prototype._floatingPanel = null;
|
|
1686
1686
|
* @type {CellFloatingPanel}
|
1687
1687
|
*/
|
1688
1688
|
Cell.prototype._frontIcon = null;
|
1689
|
+
/** @type {Object}
|
1690
|
+
* @private
|
1691
|
+
*/
|
1692
|
+
Cell.prototype._tooltipInfo = null;
|
1689
1693
|
|
1690
1694
|
//#region ElementWrapper
|
1691
1695
|
/** {@link ElementWrapper#getContent}
|
@@ -2278,6 +2282,91 @@ Cell.prototype.getClientWidth = function () {
|
|
2278
2282
|
Cell.prototype.getClientHeight = function () {
|
2279
2283
|
return (this._element) ? this._element.clientHeight : this.getHeight();
|
2280
2284
|
};
|
2285
|
+
|
2286
|
+
/** To remove the tooltip, pass str as an empty string. To allow cell calculation for the correct tooltip, set str to null.
|
2287
|
+
* @public
|
2288
|
+
* @param {string|null} str
|
2289
|
+
*/
|
2290
|
+
Cell.prototype.setTooltip = function(str) {
|
2291
|
+
this.setTooltipInfo("userTooltip", str);
|
2292
|
+
this.updateTooltip();
|
2293
|
+
};
|
2294
|
+
/** @public
|
2295
|
+
* @ignore
|
2296
|
+
* @param {string} type
|
2297
|
+
* @param {*=} tooltip
|
2298
|
+
*/
|
2299
|
+
Cell.prototype.setTooltipInfo = function(type, tooltip) {
|
2300
|
+
let tooltipInfo = this._tooltipInfo;
|
2301
|
+
if(!tooltipInfo) {
|
2302
|
+
tooltipInfo = this._tooltipInfo = {};
|
2303
|
+
}
|
2304
|
+
|
2305
|
+
tooltipInfo[type] = tooltip;
|
2306
|
+
};
|
2307
|
+
/** @public
|
2308
|
+
* @ignore
|
2309
|
+
*/
|
2310
|
+
Cell.prototype.updateTooltip = function() {
|
2311
|
+
let tooltipInfo = this._tooltipInfo;
|
2312
|
+
if(!tooltipInfo) {
|
2313
|
+
return;
|
2314
|
+
}
|
2315
|
+
|
2316
|
+
let defaultTooltip = "";
|
2317
|
+
let customizedTooltip = null;
|
2318
|
+
|
2319
|
+
// Clipped text tooltip takes precedence over default group header and column tooltip
|
2320
|
+
if(tooltipInfo["clippedText"]) { // boolean
|
2321
|
+
defaultTooltip = customizedTooltip = tooltipInfo["clippedTextTooltip"];
|
2322
|
+
}
|
2323
|
+
|
2324
|
+
if(tooltipInfo["groupHeaderTooltip"] == null) {
|
2325
|
+
if(tooltipInfo["columnDefault"] !== false) {
|
2326
|
+
if(tooltipInfo["columnDefault"] != null) { // true, "", string
|
2327
|
+
customizedTooltip = tooltipInfo["columnTooltip"];
|
2328
|
+
} else { // null
|
2329
|
+
defaultTooltip = tooltipInfo["columnTooltip"];
|
2330
|
+
}
|
2331
|
+
}
|
2332
|
+
} else { // Group header tooltip takes precedence over column tooltip
|
2333
|
+
if(tooltipInfo["groupHeaderDefault"] !== false) {
|
2334
|
+
if(tooltipInfo["groupHeaderDefault"] != null) {
|
2335
|
+
customizedTooltip = tooltipInfo["groupHeaderTooltip"];
|
2336
|
+
} else {
|
2337
|
+
defaultTooltip = tooltipInfo["groupHeaderTooltip"];
|
2338
|
+
}
|
2339
|
+
}
|
2340
|
+
}
|
2341
|
+
|
2342
|
+
// User tooltip take the highest precedence
|
2343
|
+
if(tooltipInfo["userTooltip"] != null) { // "", string
|
2344
|
+
customizedTooltip = tooltipInfo["userTooltip"];
|
2345
|
+
}
|
2346
|
+
|
2347
|
+
if(customizedTooltip == null) {
|
2348
|
+
customizedTooltip = defaultTooltip;
|
2349
|
+
}
|
2350
|
+
|
2351
|
+
if(customizedTooltip) {
|
2352
|
+
if(this.getAttribute("title") !== customizedTooltip) {
|
2353
|
+
this.setAttribute("title", customizedTooltip);
|
2354
|
+
}
|
2355
|
+
} else if(this.getAttribute("title") != null) {
|
2356
|
+
this.removeAttribute("title");
|
2357
|
+
}
|
2358
|
+
};
|
2359
|
+
/** @public
|
2360
|
+
* @ignore
|
2361
|
+
* @param {string} type
|
2362
|
+
* @return {*}
|
2363
|
+
*/
|
2364
|
+
Cell.prototype.getTooltipInfo = function(type) {
|
2365
|
+
if(this._tooltipInfo) {
|
2366
|
+
return this._tooltipInfo[type];
|
2367
|
+
}
|
2368
|
+
return null;
|
2369
|
+
};
|
2281
2370
|
//#region Internal Public Methods
|
2282
2371
|
|
2283
2372
|
//#region Private Methods
|
@@ -7505,7 +7594,8 @@ HScrollbar.prototype.setScrollContent = function (grid, sections, startColIndex,
|
|
7505
7594
|
column = /** @type{Column} */(section.getColumn(c));
|
7506
7595
|
column.setScrollState(paneElem, null, false);
|
7507
7596
|
}
|
7508
|
-
|
7597
|
+
let scrollHost = section.getColumnHost();
|
7598
|
+
pane.setParent(scrollHost);
|
7509
7599
|
let columns = [];
|
7510
7600
|
let content = [];
|
7511
7601
|
for (c = startColIndex; c < endColIndex; ++c) {
|
@@ -7522,9 +7612,11 @@ HScrollbar.prototype.setScrollContent = function (grid, sections, startColIndex,
|
|
7522
7612
|
|
7523
7613
|
let rs = section.getReservedSpace();
|
7524
7614
|
if(rs) {
|
7525
|
-
if(!this._pinnedRightColumnCount) {
|
7615
|
+
if(this.isActive() && !this._pinnedRightColumnCount) {
|
7526
7616
|
paneSlider.addContent(rs);
|
7527
7617
|
content.push(rs);
|
7618
|
+
} else {
|
7619
|
+
scrollHost.appendChild(rs);
|
7528
7620
|
}
|
7529
7621
|
section._updateRightSpaceStyle();
|
7530
7622
|
}
|
@@ -21427,7 +21519,7 @@ DataView.prototype._updateRowIds = function(opt_rowIds) {
|
|
21427
21519
|
|
21428
21520
|
this._excludedRids = {};
|
21429
21521
|
let exclusionCount = 0;
|
21430
|
-
exclusionCount += DataView.
|
21522
|
+
exclusionCount += DataView._copyValidObjectKeys(this._excludedRids, this._hiddenRids);
|
21431
21523
|
|
21432
21524
|
// Segment separators should not be filtered out (hidden)
|
21433
21525
|
let segments = this._dt._getSegmentSeparators();
|
@@ -21447,7 +21539,7 @@ DataView.prototype._updateRowIds = function(opt_rowIds) {
|
|
21447
21539
|
}
|
21448
21540
|
this._collapsedRids = segments.getCollapsedRows();
|
21449
21541
|
// Children of collapsed segments must be filtered out (hidden)
|
21450
|
-
exclusionCount += DataView.
|
21542
|
+
exclusionCount += DataView._copyValidObjectKeys(this._excludedRids, this._collapsedRids);
|
21451
21543
|
}
|
21452
21544
|
|
21453
21545
|
if(this._groupLevel > 0 && !opt_rowIds) { // WARNING: The line below is quite slow
|
@@ -21977,13 +22069,15 @@ DataView._removeArrayItems = function(ary, items) {
|
|
21977
22069
|
* @param {Object} masterObj
|
21978
22070
|
* @returns {number}
|
21979
22071
|
*/
|
21980
|
-
DataView.
|
22072
|
+
DataView._copyValidObjectKeys = function(baseObj, masterObj) {
|
21981
22073
|
if(masterObj) {
|
21982
22074
|
let count = 0;
|
21983
22075
|
|
21984
22076
|
for(let key in masterObj) {
|
21985
|
-
|
21986
|
-
|
22077
|
+
if(masterObj[key]) {
|
22078
|
+
baseObj[key] = 1;
|
22079
|
+
++count; // WARNING: duplicated key can be counted more than once
|
22080
|
+
}
|
21987
22081
|
}
|
21988
22082
|
return count;
|
21989
22083
|
}
|
@@ -25877,7 +25971,7 @@ Core_Core.prototype._hasPendingRowChange = false;
|
|
25877
25971
|
* @return {string}
|
25878
25972
|
*/
|
25879
25973
|
Core_Core.getVersion = function () {
|
25880
|
-
return "5.1.
|
25974
|
+
return "5.1.123";
|
25881
25975
|
};
|
25882
25976
|
/** {@link ElementWrapper#dispose}
|
25883
25977
|
* @override
|
@@ -28955,7 +29049,7 @@ Core_Core.prototype.getYScrollVal = function (sectionRef, rowIndex, topOfView) {
|
|
28955
29049
|
scrollIndex = rowIndex;
|
28956
29050
|
} else {
|
28957
29051
|
if(rowIndex < firstFullRow) { // Scroll up
|
28958
|
-
scrollIndex = rowIndex -
|
29052
|
+
scrollIndex = rowIndex - 2; // Have some spaces at the top for more appealing visual
|
28959
29053
|
if(scrollIndex < 0) {
|
28960
29054
|
scrollIndex = 0;
|
28961
29055
|
}
|
@@ -28963,7 +29057,7 @@ Core_Core.prototype.getYScrollVal = function (sectionRef, rowIndex, topOfView) {
|
|
28963
29057
|
let lastFullRow = viewInfo.lastFullRow;
|
28964
29058
|
if (rowIndex > lastFullRow) {
|
28965
29059
|
let viewIndexSize = lastFullRow - firstFullRow;
|
28966
|
-
scrollIndex = rowIndex - viewIndexSize +
|
29060
|
+
scrollIndex = rowIndex - viewIndexSize + 2;
|
28967
29061
|
if(scrollIndex < 0) {
|
28968
29062
|
scrollIndex = 0;
|
28969
29063
|
}
|