@datorama/core 23.0.4-rc.2 → 23.0.4-rc.3
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/bundles/datorama-core.umd.js +20 -11
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +1 -1
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +22 -10
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +21 -12
- package/esm5/lib/icon/icon.types.js +1 -1
- package/fesm2015/datorama-core.js +21 -9
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +20 -11
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +1 -0
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -15432,7 +15432,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15432
15432
|
});
|
|
15433
15433
|
DatoGridControllerComponent.prototype.ngOnDestroy = function () {
|
|
15434
15434
|
this.contentInit.complete();
|
|
15435
|
-
this.
|
|
15435
|
+
this.clearTooltip();
|
|
15436
15436
|
this.rowHoverComponent && this.rowHoverComponent.destroy();
|
|
15437
15437
|
this.rowHoverComponent = null;
|
|
15438
15438
|
};
|
|
@@ -15662,40 +15662,49 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15662
15662
|
});
|
|
15663
15663
|
this.addOnHoverElement();
|
|
15664
15664
|
}
|
|
15665
|
-
agGrid.cellMouseOver
|
|
15666
|
-
.
|
|
15667
|
-
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
lastHoveredCell =
|
|
15665
|
+
agGrid.cellMouseOver.pipe(untilDestroyed(this)).subscribe(function (event) {
|
|
15666
|
+
var node = event.node, column = event.column;
|
|
15667
|
+
if (lastHoveredCell === node.id + "-" + column.getColId()) {
|
|
15668
|
+
clearTimeout(_this.cellMouseOutTimer);
|
|
15669
|
+
return;
|
|
15670
|
+
}
|
|
15671
|
+
lastHoveredCell = node.id + "-" + column.getColId();
|
|
15672
15672
|
_this.showTooltip(event);
|
|
15673
15673
|
var row = event.event.target.parentElement;
|
|
15674
|
-
if (onHoverEnabled && (
|
|
15674
|
+
if (onHoverEnabled && (node.group === false || isNil(node.group)) && _this.lastHoveredRow !== row) {
|
|
15675
15675
|
var previousNode = _this.lastHoveredRow;
|
|
15676
15676
|
_this.lastHoveredRow = row;
|
|
15677
15677
|
_this.toggleRowHoverClass([previousNode, _this.lastHoveredRow]);
|
|
15678
15678
|
_this.setOnHoverState(true, event);
|
|
15679
15679
|
}
|
|
15680
15680
|
});
|
|
15681
|
-
var onTooltipOut = merge$1(fromEvent(bodyViewport, 'scroll'), fromEvent(this.agGridEl, 'mouseleave')
|
|
15681
|
+
var onTooltipOut = merge$1(fromEvent(bodyViewport, 'scroll'), fromEvent(this.agGridEl, 'mouseleave'));
|
|
15682
15682
|
onTooltipOut
|
|
15683
15683
|
.pipe(filter$1(function () { return !isNil(_this.tooltip); }), untilDestroyed(this))
|
|
15684
15684
|
.subscribe(function () {
|
|
15685
15685
|
_this.clearTooltip();
|
|
15686
15686
|
});
|
|
15687
|
+
agGrid.cellMouseOut
|
|
15688
|
+
.pipe(filter$1(function () { return !isNil(_this.tooltip); }), untilDestroyed(this))
|
|
15689
|
+
.subscribe(function () {
|
|
15690
|
+
_this.cellMouseOutTimer = window.setTimeout(function () { return _this.clearTooltip(); });
|
|
15691
|
+
});
|
|
15687
15692
|
};
|
|
15688
15693
|
/**
|
|
15689
15694
|
* Dispose the tooltip
|
|
15690
15695
|
*/
|
|
15691
15696
|
DatoGridControllerComponent.prototype.clearTooltip = function () {
|
|
15692
|
-
this.tooltip.dispose();
|
|
15697
|
+
this.tooltip && this.tooltip.dispose();
|
|
15693
15698
|
this.tooltip = null;
|
|
15694
15699
|
};
|
|
15695
15700
|
DatoGridControllerComponent.prototype.showTooltip = function (event) {
|
|
15696
15701
|
var cell = event.event.target;
|
|
15702
|
+
if (cell.tagName === 'SPAN' && cell.scrollWidth === 0) {
|
|
15703
|
+
cell = cell.parentElement;
|
|
15704
|
+
}
|
|
15697
15705
|
var textOverflow = cell.offsetWidth < cell.scrollWidth;
|
|
15698
15706
|
if (textOverflow) {
|
|
15707
|
+
clearTimeout(this.cellMouseOutTimer);
|
|
15699
15708
|
var params = { cell: cell, value: cell.innerText };
|
|
15700
15709
|
isNil(this.tooltip) ? this.createAndShowTooltip(params) : this.updateTooltip(params);
|
|
15701
15710
|
}
|