@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
|
@@ -15631,7 +15631,7 @@
|
|
|
15631
15631
|
});
|
|
15632
15632
|
DatoGridControllerComponent.prototype.ngOnDestroy = function () {
|
|
15633
15633
|
this.contentInit.complete();
|
|
15634
|
-
this.
|
|
15634
|
+
this.clearTooltip();
|
|
15635
15635
|
this.rowHoverComponent && this.rowHoverComponent.destroy();
|
|
15636
15636
|
this.rowHoverComponent = null;
|
|
15637
15637
|
};
|
|
@@ -15861,40 +15861,51 @@
|
|
|
15861
15861
|
});
|
|
15862
15862
|
this.addOnHoverElement();
|
|
15863
15863
|
}
|
|
15864
|
-
agGrid.cellMouseOver
|
|
15865
|
-
.
|
|
15866
|
-
|
|
15867
|
-
|
|
15868
|
-
|
|
15869
|
-
|
|
15870
|
-
lastHoveredCell =
|
|
15864
|
+
agGrid.cellMouseOver.pipe(ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (event) {
|
|
15865
|
+
var node = event.node, column = event.column;
|
|
15866
|
+
if (lastHoveredCell === node.id + "-" + column.getColId()) {
|
|
15867
|
+
clearTimeout(_this.cellMouseOutTimer);
|
|
15868
|
+
return;
|
|
15869
|
+
}
|
|
15870
|
+
lastHoveredCell = node.id + "-" + column.getColId();
|
|
15871
15871
|
_this.showTooltip(event);
|
|
15872
15872
|
var row = event.event.target.parentElement;
|
|
15873
|
-
if (onHoverEnabled && (
|
|
15873
|
+
if (onHoverEnabled && (node.group === false || isNil(node.group)) && _this.lastHoveredRow !== row) {
|
|
15874
15874
|
var previousNode = _this.lastHoveredRow;
|
|
15875
15875
|
_this.lastHoveredRow = row;
|
|
15876
15876
|
_this.toggleRowHoverClass([previousNode, _this.lastHoveredRow]);
|
|
15877
15877
|
_this.setOnHoverState(true, event);
|
|
15878
15878
|
}
|
|
15879
15879
|
});
|
|
15880
|
-
var onTooltipOut = rxjs.merge(rxjs.fromEvent(bodyViewport, 'scroll'), rxjs.fromEvent(this.agGridEl, 'mouseleave')
|
|
15881
|
-
onTooltipOut
|
|
15880
|
+
var onTooltipOut = rxjs.merge(rxjs.fromEvent(bodyViewport, 'scroll'), rxjs.fromEvent(this.agGridEl, 'mouseleave'));
|
|
15881
|
+
onTooltipOut.pipe(ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function () {
|
|
15882
|
+
lastHoveredCell = null;
|
|
15883
|
+
_this.clearTooltip();
|
|
15884
|
+
});
|
|
15885
|
+
agGrid.cellMouseOut
|
|
15882
15886
|
.pipe(operators.filter(function () { return !isNil(_this.tooltip); }), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15883
15887
|
.subscribe(function () {
|
|
15884
|
-
_this.clearTooltip();
|
|
15888
|
+
_this.cellMouseOutTimer = window.setTimeout(function () { return _this.clearTooltip(); });
|
|
15885
15889
|
});
|
|
15886
15890
|
};
|
|
15887
15891
|
/**
|
|
15888
15892
|
* Dispose the tooltip
|
|
15889
15893
|
*/
|
|
15890
15894
|
DatoGridControllerComponent.prototype.clearTooltip = function () {
|
|
15891
|
-
this.tooltip.dispose();
|
|
15895
|
+
this.tooltip && this.tooltip.dispose();
|
|
15892
15896
|
this.tooltip = null;
|
|
15893
15897
|
};
|
|
15894
15898
|
DatoGridControllerComponent.prototype.showTooltip = function (event) {
|
|
15895
15899
|
var cell = event.event.target;
|
|
15900
|
+
if (cell.tagName === 'SPAN' && cell.scrollWidth === 0) {
|
|
15901
|
+
cell = cell.parentElement;
|
|
15902
|
+
}
|
|
15903
|
+
if (event.colDef.editable) {
|
|
15904
|
+
cell = cell.querySelector('.value-wrapper') || cell;
|
|
15905
|
+
}
|
|
15896
15906
|
var textOverflow = cell.offsetWidth < cell.scrollWidth;
|
|
15897
15907
|
if (textOverflow) {
|
|
15908
|
+
clearTimeout(this.cellMouseOutTimer);
|
|
15898
15909
|
var params = { cell: cell, value: cell.innerText };
|
|
15899
15910
|
isNil(this.tooltip) ? this.createAndShowTooltip(params) : this.updateTooltip(params);
|
|
15900
15911
|
}
|