@datorama/core 23.0.4-rc.2 → 23.0.4-rc.4
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 +24 -13
- 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 +26 -12
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +25 -14
- package/esm5/lib/icon/icon.types.js +1 -1
- package/fesm2015/datorama-core.js +25 -11
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +24 -13
- 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,51 @@ 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')
|
|
15682
|
-
onTooltipOut
|
|
15681
|
+
var onTooltipOut = merge$1(fromEvent(bodyViewport, 'scroll'), fromEvent(this.agGridEl, 'mouseleave'));
|
|
15682
|
+
onTooltipOut.pipe(untilDestroyed(this)).subscribe(function () {
|
|
15683
|
+
lastHoveredCell = null;
|
|
15684
|
+
_this.clearTooltip();
|
|
15685
|
+
});
|
|
15686
|
+
agGrid.cellMouseOut
|
|
15683
15687
|
.pipe(filter$1(function () { return !isNil(_this.tooltip); }), untilDestroyed(this))
|
|
15684
15688
|
.subscribe(function () {
|
|
15685
|
-
_this.clearTooltip();
|
|
15689
|
+
_this.cellMouseOutTimer = window.setTimeout(function () { return _this.clearTooltip(); });
|
|
15686
15690
|
});
|
|
15687
15691
|
};
|
|
15688
15692
|
/**
|
|
15689
15693
|
* Dispose the tooltip
|
|
15690
15694
|
*/
|
|
15691
15695
|
DatoGridControllerComponent.prototype.clearTooltip = function () {
|
|
15692
|
-
this.tooltip.dispose();
|
|
15696
|
+
this.tooltip && this.tooltip.dispose();
|
|
15693
15697
|
this.tooltip = null;
|
|
15694
15698
|
};
|
|
15695
15699
|
DatoGridControllerComponent.prototype.showTooltip = function (event) {
|
|
15696
15700
|
var cell = event.event.target;
|
|
15701
|
+
if (cell.tagName === 'SPAN' && cell.scrollWidth === 0) {
|
|
15702
|
+
cell = cell.parentElement;
|
|
15703
|
+
}
|
|
15704
|
+
if (event.colDef.editable) {
|
|
15705
|
+
cell = cell.querySelector('.value-wrapper') || cell;
|
|
15706
|
+
}
|
|
15697
15707
|
var textOverflow = cell.offsetWidth < cell.scrollWidth;
|
|
15698
15708
|
if (textOverflow) {
|
|
15709
|
+
clearTimeout(this.cellMouseOutTimer);
|
|
15699
15710
|
var params = { cell: cell, value: cell.innerText };
|
|
15700
15711
|
isNil(this.tooltip) ? this.createAndShowTooltip(params) : this.updateTooltip(params);
|
|
15701
15712
|
}
|