@klippa/ngx-enhancy-forms 14.19.2 → 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.
@@ -2369,10 +2369,11 @@ 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 (el.nativeElement.innerText.trim().length < 1) {
2376
+ if (textToDisplay.length < 1) {
2376
2377
  return;
2377
2378
  }
2378
2379
  if (el.nativeElement.offsetWidth >= el.nativeElement.scrollWidth) {
@@ -2396,7 +2397,7 @@ class WithTooltipDirective {
2396
2397
  this.div.style.padding = '0.3rem 0.5rem';
2397
2398
  this.div.style.boxSizing = 'border-box';
2398
2399
  this.div.style.borderRadius = '3px';
2399
- this.div.textContent = el.nativeElement.innerText;
2400
+ this.div.textContent = textToDisplay;
2400
2401
  el.nativeElement.prepend(this.div);
2401
2402
  this.triangle = document.createElement('div');
2402
2403
  this.triangle.style.zIndex = '1';
@@ -2440,7 +2441,7 @@ class WithTooltipDirective {
2440
2441
  }
2441
2442
  }
2442
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 });
2443
- 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 });
2444
2445
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WithTooltipDirective, decorators: [{
2445
2446
  type: Directive,
2446
2447
  args: [{
@@ -2448,6 +2449,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
2448
2449
  }]
2449
2450
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { klpWithTooltip: [{
2450
2451
  type: Input
2452
+ }], tooltipText: [{
2453
+ type: Input
2451
2454
  }] } });
2452
2455
 
2453
2456
  class NgxEnhancyFormsModule {