ng-tailwind 4.2.21 → 4.2.23

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.
@@ -7684,15 +7684,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
7684
7684
 
7685
7685
  class NgtPopoverTooltipComponent {
7686
7686
  constructor() {
7687
+ this.onMouseHoverEvent = new EventEmitter();
7688
+ this.onMouseLeaveEvent = new EventEmitter();
7687
7689
  this.position = NgtPopoverPosition.DEFAULT;
7688
7690
  this.positionClasses = {
7689
7691
  [NgtPopoverPosition.TOP]: '-mt-10',
7690
7692
  [NgtPopoverPosition.BOTTOM]: '-mb-10',
7691
7693
  };
7692
7694
  }
7695
+ onMouseLeave() {
7696
+ this.onMouseLeaveEvent.emit();
7697
+ }
7698
+ onMouseEnter() {
7699
+ this.onMouseHoverEvent.emit();
7700
+ }
7693
7701
  }
7694
7702
  NgtPopoverTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtPopoverTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7695
- NgtPopoverTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: NgtPopoverTooltipComponent, selector: "ngt-popover-tooltip", ngImport: i0, template: "<div class=\"bg-white rounded-lg shadow-2xl border border-gray-200 absolute max-w-7xl\"\n [ngClass]=\"positionClasses[position]\" [style.left.px]=\"positionX\" [style.top.px]=\"positionY\"\n style=\"z-index: 999999 !important; width: max-content !important;\"\n (click)=\"$event.stopPropagation()\" @enterAnimation>\n\n <div *ngIf=\"!popoverTemplate; else showTemplate\" class=\"px-2 py-1 text-gray-700 whitespace-nowrap\">\n {{ popover }}\n </div>\n\n <ng-template #showTemplate>\n <ng-container [ngTemplateOutlet]=\"popoverTemplate\"></ng-container>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
7703
+ NgtPopoverTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: NgtPopoverTooltipComponent, selector: "ngt-popover-tooltip", outputs: { onMouseHoverEvent: "onMouseHoverEvent", onMouseLeaveEvent: "onMouseLeaveEvent" }, host: { listeners: { "mouseleave": "onMouseLeave()", "mouseenter": "onMouseEnter()" } }, ngImport: i0, template: "<div class=\"bg-white rounded-lg shadow-2xl border border-gray-200 absolute max-w-7xl\"\n [ngClass]=\"positionClasses[position]\" [style.left.px]=\"positionX\" [style.top.px]=\"positionY\"\n style=\"z-index: 999999 !important; width: max-content !important;\"\n (click)=\"$event.stopPropagation()\" @enterAnimation>\n\n <div *ngIf=\"!popoverTemplate; else showTemplate\" class=\"px-2 py-1 text-gray-700 whitespace-nowrap\">\n {{ popover }}\n </div>\n\n <ng-template #showTemplate>\n <ng-container [ngTemplateOutlet]=\"popoverTemplate\"></ng-container>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
7696
7704
  trigger('enterAnimation', [
7697
7705
  state('void', style({ transform: 'translateY(-20px)', opacity: 0 })),
7698
7706
  transition(':enter', [
@@ -7710,7 +7718,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
7710
7718
  ])
7711
7719
  ]),
7712
7720
  ], template: "<div class=\"bg-white rounded-lg shadow-2xl border border-gray-200 absolute max-w-7xl\"\n [ngClass]=\"positionClasses[position]\" [style.left.px]=\"positionX\" [style.top.px]=\"positionY\"\n style=\"z-index: 999999 !important; width: max-content !important;\"\n (click)=\"$event.stopPropagation()\" @enterAnimation>\n\n <div *ngIf=\"!popoverTemplate; else showTemplate\" class=\"px-2 py-1 text-gray-700 whitespace-nowrap\">\n {{ popover }}\n </div>\n\n <ng-template #showTemplate>\n <ng-container [ngTemplateOutlet]=\"popoverTemplate\"></ng-container>\n </ng-template>\n</div>\n" }]
7713
- }] });
7721
+ }], propDecorators: { onMouseHoverEvent: [{
7722
+ type: Output
7723
+ }], onMouseLeaveEvent: [{
7724
+ type: Output
7725
+ }], onMouseLeave: [{
7726
+ type: HostListener,
7727
+ args: ['mouseleave']
7728
+ }], onMouseEnter: [{
7729
+ type: HostListener,
7730
+ args: ['mouseenter']
7731
+ }] } });
7714
7732
  var NgtPopoverPosition;
7715
7733
  (function (NgtPopoverPosition) {
7716
7734
  NgtPopoverPosition["DEFAULT"] = "TOP";
@@ -7850,6 +7868,8 @@ class NgtPopoverDirective {
7850
7868
  this.setupPopoverComponent();
7851
7869
  }
7852
7870
  destroy() {
7871
+ this.toolTipMouseHoverSubscription?.unsubscribe();
7872
+ this.toolTipMouseLeaveSubscription?.unsubscribe();
7853
7873
  this.componentRef?.destroy();
7854
7874
  this.componentRef = null;
7855
7875
  }
@@ -7865,8 +7885,21 @@ class NgtPopoverDirective {
7865
7885
  this.componentRef.instance.popover = this.ngtPopoverContent;
7866
7886
  this.componentRef.instance.popoverTemplate = this.ngtPopoverTemplate;
7867
7887
  this.componentRef.instance.position = this.ngtPopoverPosition;
7888
+ this.bindSubscriptions();
7868
7889
  document.body.appendChild(this.componentRef.location.nativeElement);
7869
7890
  }
7891
+ bindSubscriptions() {
7892
+ this.toolTipMouseHoverSubscription = this.componentRef.instance
7893
+ .onMouseHoverEvent
7894
+ .subscribe(() => {
7895
+ if (this.dismissTimeoutInstance) {
7896
+ clearTimeout(this.dismissTimeoutInstance);
7897
+ }
7898
+ });
7899
+ this.toolTipMouseLeaveSubscription = this.componentRef.instance
7900
+ .onMouseLeaveEvent
7901
+ .subscribe(() => this.onMouseLeave());
7902
+ }
7870
7903
  }
7871
7904
  NgtPopoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtPopoverDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
7872
7905
  NgtPopoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: NgtPopoverDirective, selector: "[ngt-popover]", inputs: { ngtPopoverContent: "ngtPopoverContent", ngtPopoverTemplate: "ngtPopoverTemplate", ngtPopoverPosition: "ngtPopoverPosition", dismissDelay: "dismissDelay", showDelay: "showDelay", closeOnClick: "closeOnClick", openMethod: "openMethod" }, host: { listeners: { "click": "onClick()", "document:click": "onDocumentClick($event.target)", "mouseleave": "onMouseLeave()", "mouseenter": "onMouseEnter()" } }, ngImport: i0 });
@@ -7958,6 +7991,7 @@ class NgtContextMenuDirective {
7958
7991
  this.viewContainerRef = viewContainerRef;
7959
7992
  this.changeDetector = changeDetector;
7960
7993
  this.onNgtContextMenuClick = new EventEmitter();
7994
+ this.onOpenNgtContextMenu = new EventEmitter();
7961
7995
  this.componentRef = null;
7962
7996
  }
7963
7997
  onContextMenu(event) {
@@ -7989,6 +8023,7 @@ class NgtContextMenuDirective {
7989
8023
  this.componentRef.instance.menuTemplate = this.ngtContextMenuTemplate;
7990
8024
  this.bindSubscriptions();
7991
8025
  document.body.appendChild(this.componentRef.location.nativeElement);
8026
+ this.onOpenNgtContextMenu.emit(this.componentRef.instance);
7992
8027
  }
7993
8028
  bindSubscriptions() {
7994
8029
  this.menuItemClickSubscription = this.componentRef.instance
@@ -8009,7 +8044,7 @@ class NgtContextMenuDirective {
8009
8044
  }
8010
8045
  }
8011
8046
  NgtContextMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtContextMenuDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
8012
- NgtContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: NgtContextMenuDirective, selector: "[ngt-contextmenu]", inputs: { ngtContextMenuOptions: "ngtContextMenuOptions", ngtContextMenuTemplate: "ngtContextMenuTemplate" }, outputs: { onNgtContextMenuClick: "onNgtContextMenuClick" }, host: { listeners: { "contextmenu": "onContextMenu($event)", "document:contextmenu": "onDocumentContextMenuClick($event)", "document:click": "onDocumentClick()", "click": "onClick()" } }, ngImport: i0 });
8047
+ NgtContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: NgtContextMenuDirective, selector: "[ngt-contextmenu]", inputs: { ngtContextMenuOptions: "ngtContextMenuOptions", ngtContextMenuTemplate: "ngtContextMenuTemplate" }, outputs: { onNgtContextMenuClick: "onNgtContextMenuClick", onOpenNgtContextMenu: "onOpenNgtContextMenu" }, host: { listeners: { "contextmenu": "onContextMenu($event)", "document:contextmenu": "onDocumentContextMenuClick($event)", "document:click": "onDocumentClick()", "click": "onClick()" } }, ngImport: i0 });
8013
8048
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtContextMenuDirective, decorators: [{
8014
8049
  type: Directive,
8015
8050
  args: [{
@@ -8017,6 +8052,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
8017
8052
  }]
8018
8053
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { onNgtContextMenuClick: [{
8019
8054
  type: Output
8055
+ }], onOpenNgtContextMenu: [{
8056
+ type: Output
8020
8057
  }], ngtContextMenuOptions: [{
8021
8058
  type: Input
8022
8059
  }], ngtContextMenuTemplate: [{