@nova-ui/bits 12.0.42 → 12.0.43
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/nova-ui-bits.umd.js +28 -1
- package/bundles/nova-ui-bits.umd.js.map +1 -1
- package/esm2015/lib/tooltip/tooltip.directive.js +25 -2
- package/fesm2015/nova-ui-bits.js +24 -1
- package/fesm2015/nova-ui-bits.js.map +1 -1
- package/lib/tooltip/tooltip.directive.d.ts +9 -0
- package/nova-ui-bits.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -7960,6 +7960,7 @@
|
|
|
7960
7960
|
this.overlayPositionService = overlayPositionService;
|
|
7961
7961
|
this._position = "top";
|
|
7962
7962
|
this._disabled = false;
|
|
7963
|
+
this._ellipsis = false;
|
|
7963
7964
|
this._message = "";
|
|
7964
7965
|
this._manualListeners = new Map();
|
|
7965
7966
|
/** Emits when the component is destroyed. */
|
|
@@ -8015,6 +8016,17 @@
|
|
|
8015
8016
|
enumerable: false,
|
|
8016
8017
|
configurable: true
|
|
8017
8018
|
});
|
|
8019
|
+
Object.defineProperty(TooltipDirective.prototype, "ellipsis", {
|
|
8020
|
+
/** Determines whether the tooltip should be displayed when the content is overflowing. By default is `false`. */
|
|
8021
|
+
get: function () {
|
|
8022
|
+
return this._ellipsis;
|
|
8023
|
+
},
|
|
8024
|
+
set: function (value) {
|
|
8025
|
+
this._ellipsis = coercion.coerceBooleanProperty(value);
|
|
8026
|
+
},
|
|
8027
|
+
enumerable: false,
|
|
8028
|
+
configurable: true
|
|
8029
|
+
});
|
|
8018
8030
|
Object.defineProperty(TooltipDirective.prototype, "message", {
|
|
8019
8031
|
/** The message to be displayed in the tooltip */
|
|
8020
8032
|
get: function () {
|
|
@@ -8079,6 +8091,14 @@
|
|
|
8079
8091
|
(_a = this._tooltipInstance) === null || _a === void 0 ? void 0 : _a.show();
|
|
8080
8092
|
}
|
|
8081
8093
|
};
|
|
8094
|
+
/**
|
|
8095
|
+
* Checks if the content is overflowing.
|
|
8096
|
+
* The content is considered overflowing if its scroll width is greater than its client width plus 1.
|
|
8097
|
+
*/
|
|
8098
|
+
TooltipDirective.prototype.isOverflowing = function () {
|
|
8099
|
+
return (this._elementRef.nativeElement.scrollWidth >
|
|
8100
|
+
this._elementRef.nativeElement.clientWidth + 1);
|
|
8101
|
+
};
|
|
8082
8102
|
/** Hides the tooltip */
|
|
8083
8103
|
TooltipDirective.prototype.hide = function () {
|
|
8084
8104
|
var _this = this;
|
|
@@ -8129,7 +8149,13 @@
|
|
|
8129
8149
|
}
|
|
8130
8150
|
};
|
|
8131
8151
|
TooltipDirective.prototype.canShowTooltip = function () {
|
|
8132
|
-
|
|
8152
|
+
var canShow = !(this.disabled ||
|
|
8153
|
+
!this.message ||
|
|
8154
|
+
this._isTooltipVisible());
|
|
8155
|
+
if (this.ellipsis) {
|
|
8156
|
+
return canShow && this.isOverflowing();
|
|
8157
|
+
}
|
|
8158
|
+
return canShow;
|
|
8133
8159
|
};
|
|
8134
8160
|
return TooltipDirective;
|
|
8135
8161
|
}());
|
|
@@ -8157,6 +8183,7 @@
|
|
|
8157
8183
|
TooltipDirective.propDecorators = {
|
|
8158
8184
|
position: [{ type: i0.Input, args: ["tooltipPlacement",] }],
|
|
8159
8185
|
disabled: [{ type: i0.Input, args: ["nuiTooltipDisabled",] }],
|
|
8186
|
+
ellipsis: [{ type: i0.Input, args: ["nuiTooltipEllipsis",] }],
|
|
8160
8187
|
message: [{ type: i0.Input, args: ["nuiTooltip",] }]
|
|
8161
8188
|
};
|
|
8162
8189
|
|