@agorapulse/ui-components 13.1.10 → 13.2.0
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/agorapulse-ui-components-13.2.0.tgz +0 -0
- package/esm2020/src/lib/tooltip-neo/tooltip-neo.directive.mjs +17 -14
- package/fesm2015/agorapulse-ui-components.mjs +16 -13
- package/fesm2015/agorapulse-ui-components.mjs.map +1 -1
- package/fesm2020/agorapulse-ui-components.mjs +16 -13
- package/fesm2020/agorapulse-ui-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/tooltip-neo/tooltip-neo.directive.d.ts +6 -5
- package/agorapulse-ui-components-13.1.10.tgz +0 -0
|
@@ -1136,18 +1136,6 @@ class TooltipNeoDirective {
|
|
|
1136
1136
|
static enableTooltip(content, contentType, display) {
|
|
1137
1137
|
return !!content && !!contentType && !!display;
|
|
1138
1138
|
}
|
|
1139
|
-
/**
|
|
1140
|
-
* To fix issue on inbox virtual scroller, it's a manual cleaner at DOM level
|
|
1141
|
-
* @private
|
|
1142
|
-
*/
|
|
1143
|
-
static cleanUpPersistentTooltip() {
|
|
1144
|
-
const tooltips = document.getElementsByTagName('ap-tooltip-neo');
|
|
1145
|
-
if (tooltips) {
|
|
1146
|
-
Array.from(tooltips).forEach(tooltip => {
|
|
1147
|
-
tooltip.parentElement.parentElement.remove();
|
|
1148
|
-
});
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
1139
|
ngOnChanges(changes) {
|
|
1152
1140
|
if ((changes?.apTooltipNeo?.currentValue?.display || changes?.apTooltipNeo?.currentValue?.position) && this.mouseEntered) {
|
|
1153
1141
|
this.setSettings();
|
|
@@ -1162,6 +1150,21 @@ class TooltipNeoDirective {
|
|
|
1162
1150
|
this.destroy$.next();
|
|
1163
1151
|
this.destroy$.complete();
|
|
1164
1152
|
}
|
|
1153
|
+
/**
|
|
1154
|
+
* To fix issue on inbox virtual scroller, it's a manual cleaner at DOM level
|
|
1155
|
+
* It checks the route and also the DOM element where it's called
|
|
1156
|
+
* @private
|
|
1157
|
+
*/
|
|
1158
|
+
cleanUpPersistentTooltip() {
|
|
1159
|
+
if (window.location.href.includes('inbox') && this.elementRef.nativeElement.parentElement.className.includes('item-button-actions')) {
|
|
1160
|
+
const tooltips = document.getElementsByTagName('ap-tooltip-neo');
|
|
1161
|
+
if (tooltips) {
|
|
1162
|
+
Array.from(tooltips).forEach(tooltip => {
|
|
1163
|
+
tooltip.parentElement.parentElement.remove();
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1165
1168
|
setSettings() {
|
|
1166
1169
|
if (typeof this.apTooltipNeo === 'object') {
|
|
1167
1170
|
const { content, backgroundColor = '#ffffff', borderColor, contentType = 'text', display = true, displayArrow = true, maxWidth = 'full', position = 'top', title = '' } = this.apTooltipNeo;
|
|
@@ -1194,7 +1197,7 @@ class TooltipNeoDirective {
|
|
|
1194
1197
|
if (bool) {
|
|
1195
1198
|
this.elementRefMouseLeave$ = fromEvent(this.elementRef.nativeElement, 'mouseleave')
|
|
1196
1199
|
.subscribe(() => this.dispose());
|
|
1197
|
-
|
|
1200
|
+
this.cleanUpPersistentTooltip();
|
|
1198
1201
|
const positionStrategy = this.overlayPositionBuilder
|
|
1199
1202
|
.flexibleConnectedTo(this.elementRef)
|
|
1200
1203
|
.withPositions([tooltipNeoPositions[this.params.position]]);
|