@klippa/ngx-enhancy-forms 14.19.1 → 14.19.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/esm2020/lib/withTooltip.component.mjs +7 -5
- package/fesm2015/klippa-ngx-enhancy-forms.mjs +6 -4
- package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/fesm2020/klippa-ngx-enhancy-forms.mjs +6 -4
- package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/lib/withTooltip.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -2369,13 +2369,13 @@ class WithTooltipDirective {
|
|
|
2369
2369
|
constructor(el) {
|
|
2370
2370
|
this.klpWithTooltip = 'orange';
|
|
2371
2371
|
el.nativeElement.addEventListener('mouseenter', () => {
|
|
2372
|
+
const textToDisplay = this.tooltipText || el.nativeElement.innerText.trim();
|
|
2372
2373
|
if (!stringIsSetAndFilled(this.klpWithTooltip)) {
|
|
2373
2374
|
return;
|
|
2374
2375
|
}
|
|
2375
|
-
if (
|
|
2376
|
+
if (textToDisplay.length < 1) {
|
|
2376
2377
|
return;
|
|
2377
2378
|
}
|
|
2378
|
-
console.log(el.nativeElement.offsetWidth, el.nativeElement.scrollWidth);
|
|
2379
2379
|
if (el.nativeElement.offsetWidth >= el.nativeElement.scrollWidth) {
|
|
2380
2380
|
return;
|
|
2381
2381
|
}
|
|
@@ -2397,7 +2397,7 @@ class WithTooltipDirective {
|
|
|
2397
2397
|
this.div.style.padding = '0.3rem 0.5rem';
|
|
2398
2398
|
this.div.style.boxSizing = 'border-box';
|
|
2399
2399
|
this.div.style.borderRadius = '3px';
|
|
2400
|
-
this.div.textContent =
|
|
2400
|
+
this.div.textContent = textToDisplay;
|
|
2401
2401
|
el.nativeElement.prepend(this.div);
|
|
2402
2402
|
this.triangle = document.createElement('div');
|
|
2403
2403
|
this.triangle.style.zIndex = '1';
|
|
@@ -2441,7 +2441,7 @@ class WithTooltipDirective {
|
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
2443
|
WithTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WithTooltipDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2444
|
-
WithTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: WithTooltipDirective, selector: "[klpWithTooltip]", inputs: { klpWithTooltip: "klpWithTooltip" }, ngImport: i0 });
|
|
2444
|
+
WithTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: WithTooltipDirective, selector: "[klpWithTooltip]", inputs: { klpWithTooltip: "klpWithTooltip", tooltipText: "tooltipText" }, ngImport: i0 });
|
|
2445
2445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WithTooltipDirective, decorators: [{
|
|
2446
2446
|
type: Directive,
|
|
2447
2447
|
args: [{
|
|
@@ -2449,6 +2449,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
2449
2449
|
}]
|
|
2450
2450
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { klpWithTooltip: [{
|
|
2451
2451
|
type: Input
|
|
2452
|
+
}], tooltipText: [{
|
|
2453
|
+
type: Input
|
|
2452
2454
|
}] } });
|
|
2453
2455
|
|
|
2454
2456
|
class NgxEnhancyFormsModule {
|