@klippa/ngx-enhancy-forms 14.19.2 → 14.19.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.
@@ -2369,14 +2369,22 @@ 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
- if (el.nativeElement.offsetWidth >= el.nativeElement.scrollWidth) {
2379
- return;
2379
+ if (stringIsSetAndFilled(this.tooltipText)) {
2380
+ if (this.tooltipText === el.nativeElement.innerText) {
2381
+ return;
2382
+ }
2383
+ }
2384
+ else {
2385
+ if (el.nativeElement.offsetWidth >= el.nativeElement.scrollWidth) {
2386
+ return;
2387
+ }
2380
2388
  }
2381
2389
  if (getComputedStyle(el.nativeElement).position === 'static') {
2382
2390
  el.nativeElement.style.position = 'relative';
@@ -2396,7 +2404,7 @@ class WithTooltipDirective {
2396
2404
  this.div.style.padding = '0.3rem 0.5rem';
2397
2405
  this.div.style.boxSizing = 'border-box';
2398
2406
  this.div.style.borderRadius = '3px';
2399
- this.div.textContent = el.nativeElement.innerText;
2407
+ this.div.textContent = textToDisplay;
2400
2408
  el.nativeElement.prepend(this.div);
2401
2409
  this.triangle = document.createElement('div');
2402
2410
  this.triangle.style.zIndex = '1';
@@ -2440,7 +2448,7 @@ class WithTooltipDirective {
2440
2448
  }
2441
2449
  }
2442
2450
  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 });
2451
+ WithTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: WithTooltipDirective, selector: "[klpWithTooltip]", inputs: { klpWithTooltip: "klpWithTooltip", tooltipText: "tooltipText" }, ngImport: i0 });
2444
2452
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WithTooltipDirective, decorators: [{
2445
2453
  type: Directive,
2446
2454
  args: [{
@@ -2448,6 +2456,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
2448
2456
  }]
2449
2457
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { klpWithTooltip: [{
2450
2458
  type: Input
2459
+ }], tooltipText: [{
2460
+ type: Input
2451
2461
  }] } });
2452
2462
 
2453
2463
  class NgxEnhancyFormsModule {