@refinitiv-ui/efx-grid 6.0.119 → 6.0.120
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +97 -6
- 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 +1 -1
- package/lib/core/es6/grid/components/Cell.d.ts +2 -0
- package/lib/core/es6/grid/components/Cell.js +89 -0
- package/lib/filter-dialog/themes/base-checkbox.less +1 -1
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.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 +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 +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 +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 +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 +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +210 -87
- 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 +106 -81
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +18 -15
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +6 -1
- 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/RowDragging.d.ts +0 -2
- package/lib/versions.json +5 -5
- package/package.json +1 -1
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
|
@@ -21427,7 +21516,7 @@ DataView.prototype._updateRowIds = function(opt_rowIds) {
|
|
21427
21516
|
|
21428
21517
|
this._excludedRids = {};
|
21429
21518
|
let exclusionCount = 0;
|
21430
|
-
exclusionCount += DataView.
|
21519
|
+
exclusionCount += DataView._copyValidObjectKeys(this._excludedRids, this._hiddenRids);
|
21431
21520
|
|
21432
21521
|
// Segment separators should not be filtered out (hidden)
|
21433
21522
|
let segments = this._dt._getSegmentSeparators();
|
@@ -21447,7 +21536,7 @@ DataView.prototype._updateRowIds = function(opt_rowIds) {
|
|
21447
21536
|
}
|
21448
21537
|
this._collapsedRids = segments.getCollapsedRows();
|
21449
21538
|
// Children of collapsed segments must be filtered out (hidden)
|
21450
|
-
exclusionCount += DataView.
|
21539
|
+
exclusionCount += DataView._copyValidObjectKeys(this._excludedRids, this._collapsedRids);
|
21451
21540
|
}
|
21452
21541
|
|
21453
21542
|
if(this._groupLevel > 0 && !opt_rowIds) { // WARNING: The line below is quite slow
|
@@ -21977,13 +22066,15 @@ DataView._removeArrayItems = function(ary, items) {
|
|
21977
22066
|
* @param {Object} masterObj
|
21978
22067
|
* @returns {number}
|
21979
22068
|
*/
|
21980
|
-
DataView.
|
22069
|
+
DataView._copyValidObjectKeys = function(baseObj, masterObj) {
|
21981
22070
|
if(masterObj) {
|
21982
22071
|
let count = 0;
|
21983
22072
|
|
21984
22073
|
for(let key in masterObj) {
|
21985
|
-
|
21986
|
-
|
22074
|
+
if(masterObj[key]) {
|
22075
|
+
baseObj[key] = 1;
|
22076
|
+
++count; // WARNING: duplicated key can be counted more than once
|
22077
|
+
}
|
21987
22078
|
}
|
21988
22079
|
return count;
|
21989
22080
|
}
|
@@ -25877,7 +25968,7 @@ Core_Core.prototype._hasPendingRowChange = false;
|
|
25877
25968
|
* @return {string}
|
25878
25969
|
*/
|
25879
25970
|
Core_Core.getVersion = function () {
|
25880
|
-
return "5.1.
|
25971
|
+
return "5.1.121";
|
25881
25972
|
};
|
25882
25973
|
/** {@link ElementWrapper#dispose}
|
25883
25974
|
* @override
|