@klippa/ngx-enhancy-forms 14.22.0 → 14.22.2

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.
@@ -2425,8 +2425,9 @@ const colors = {
2425
2425
  black: { noAlpha: 'rgb(40, 40, 40)', withAlpha: 'rgba(40, 40, 40, 0.1254901961)' },
2426
2426
  };
2427
2427
  class WithTooltipDirective {
2428
- constructor(el) {
2428
+ constructor(el, appRef) {
2429
2429
  this.el = el;
2430
+ this.appRef = appRef;
2430
2431
  this.klpWithTooltip = 'orange';
2431
2432
  el.nativeElement.addEventListener('mouseenter', () => {
2432
2433
  let textToDisplay;
@@ -2474,6 +2475,7 @@ class WithTooltipDirective {
2474
2475
  this.div.textContent = textToDisplay;
2475
2476
  }
2476
2477
  else if (this.templateInstance) {
2478
+ this.div.style.maxWidth = 'none';
2477
2479
  this.div.style.visibility = 'hidden';
2478
2480
  this.div.appendChild(this.templateInstance);
2479
2481
  setTimeout(() => {
@@ -2536,18 +2538,19 @@ class WithTooltipDirective {
2536
2538
  ngOnChanges(simpleChanges) {
2537
2539
  if (simpleChanges.tooltipTemplate?.currentValue) {
2538
2540
  const viewRef = this.tooltipTemplate.createEmbeddedView(null);
2541
+ this.appRef.attachView(viewRef);
2539
2542
  this.templateInstance = viewRef.rootNodes[0];
2540
2543
  }
2541
2544
  }
2542
2545
  }
2543
- WithTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WithTooltipDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2546
+ WithTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WithTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Directive });
2544
2547
  WithTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: WithTooltipDirective, selector: "[klpWithTooltip]", inputs: { klpWithTooltip: "klpWithTooltip", tooltipText: "tooltipText", tooltipTemplate: "tooltipTemplate" }, usesOnChanges: true, ngImport: i0 });
2545
2548
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WithTooltipDirective, decorators: [{
2546
2549
  type: Directive,
2547
2550
  args: [{
2548
2551
  selector: '[klpWithTooltip]'
2549
2552
  }]
2550
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { klpWithTooltip: [{
2553
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ApplicationRef }]; }, propDecorators: { klpWithTooltip: [{
2551
2554
  type: Input
2552
2555
  }], tooltipText: [{
2553
2556
  type: Input