ng-tailwind 2.30.356 → 2.30.357

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.
@@ -1765,6 +1765,7 @@
1765
1765
  this.autoYReverse = true;
1766
1766
  this.openMethod = exports.NgtDropdownOpenMethod.HOVER;
1767
1767
  this.onToggle = new core.EventEmitter();
1768
+ this.onHostClick = new core.EventEmitter();
1768
1769
  this.name = uuid();
1769
1770
  this.isYPositionReversed = false;
1770
1771
  this.isXPositionReversed = false;
@@ -1797,8 +1798,11 @@
1797
1798
  };
1798
1799
  NgtDropdownComponent.prototype.close = function () {
1799
1800
  var _this = this;
1801
+ if (this.closeTimeoutInstance) {
1802
+ clearTimeout(this.closeTimeoutInstance);
1803
+ }
1800
1804
  if (this.closeTimeout) {
1801
- setTimeout(function () { return _this.hideContainer(); }, this.closeTimeout);
1805
+ this.closeTimeoutInstance = setTimeout(function () { return _this.hideContainer(); }, this.closeTimeout);
1802
1806
  return;
1803
1807
  }
1804
1808
  this.hideContainer();
@@ -1822,6 +1826,8 @@
1822
1826
  }
1823
1827
  };
1824
1828
  NgtDropdownComponent.prototype.onClick = function (event) {
1829
+ var _a;
1830
+ (_a = this.onHostClick) === null || _a === void 0 ? void 0 : _a.emit();
1825
1831
  if (this.openMethod == exports.NgtDropdownOpenMethod.CLICK) {
1826
1832
  event.preventDefault();
1827
1833
  event.stopPropagation();
@@ -1930,7 +1936,8 @@
1930
1936
  closeOnClick: [{ type: core.Input }],
1931
1937
  closeTimeout: [{ type: core.Input }],
1932
1938
  openMethod: [{ type: core.Input }],
1933
- onToggle: [{ type: core.Output }]
1939
+ onToggle: [{ type: core.Output }],
1940
+ onHostClick: [{ type: core.Output }]
1934
1941
  };
1935
1942
  exports.NgtDropdownOpenMethod = void 0;
1936
1943
  (function (NgtDropdownOpenMethod) {
@@ -7700,6 +7707,7 @@
7700
7707
  this.ngtTranslateService = ngtTranslateService;
7701
7708
  this.injector = injector;
7702
7709
  this.openMethod = exports.NgtPopoverOpenMethod.HOVER;
7710
+ this.onClick = new core.EventEmitter();
7703
7711
  this.stylesToCompile = ['h', 'w', 'px', 'py', 'shadow', 'text', 'border', 'color.border', 'color.bg', 'color.text'];
7704
7712
  if (this.ngtStylizableDirective) {
7705
7713
  this.ngtStyle = this.ngtStylizableDirective.getNgtStylizableService();
@@ -7716,12 +7724,22 @@
7716
7724
  }
7717
7725
  });
7718
7726
  }
7727
+ NgtPopoverComponent.prototype.fireClickEvent = function () {
7728
+ var _this = this;
7729
+ this.onClick.emit();
7730
+ setTimeout(function () {
7731
+ var event = new MouseEvent('click', { bubbles: true });
7732
+ event.preventDefault();
7733
+ event.stopPropagation();
7734
+ _this.hostDiv.nativeElement.dispatchEvent(event);
7735
+ }, 50);
7736
+ };
7719
7737
  return NgtPopoverComponent;
7720
7738
  }());
7721
7739
  NgtPopoverComponent.decorators = [
7722
7740
  { type: core.Component, args: [{
7723
7741
  selector: 'ngt-popover',
7724
- template: "<ngt-dropdown class=\"flex w-full hover:opacity-100\" [closeOnClick]=\"closeOnClick\" [openMethod]=\"openMethod\"\n [autoXReverse]=\"false\" [autoYReverse]=\"false\" [reverseYPosition]=\"!placeOnBottom\" [closeTimeout]=\"closeTimeout\"\n #dropdownRef>\n <div host>\n <ng-content></ng-content>\n </div>\n\n <div class=\"bg-gray-100 px-2 text-sm rounded-lg hover:opacity-100 text-gray-800 shadow-lg\"\n [class.-mb-4]='dropdownRef.isYPositionReversed' [ngClass]=\"ngtStyle.compile(stylesToCompile)\"\n container>\n\n <ng-content select=\"[popover-content]\"></ng-content>\n </div>\n</ngt-dropdown>\n"
7742
+ template: "<ngt-dropdown class=\"flex w-full hover:opacity-100\" [closeOnClick]=\"closeOnClick\" [openMethod]=\"openMethod\"\n [autoYReverse]=\"false\" [reverseXPosition]=\"true\" [reverseYPosition]=\"!placeOnBottom\" [closeTimeout]=\"closeTimeout\"\n (onHostClick)=\"fireClickEvent()\" #dropdownRef>\n <div #hostDiv host>\n <ng-content></ng-content>\n </div>\n\n <div class=\"bg-gray-100 px-2 text-sm rounded-lg hover:opacity-100 text-gray-800 shadow-lg -mb-4\"\n [ngClass]=\"ngtStyle.compile(stylesToCompile)\" container>\n\n <ng-content select=\"[popover-content]\"></ng-content>\n </div>\n</ngt-dropdown>\n"
7725
7743
  },] }
7726
7744
  ];
7727
7745
  NgtPopoverComponent.ctorParameters = function () { return [
@@ -7731,10 +7749,12 @@
7731
7749
  ]; };
7732
7750
  NgtPopoverComponent.propDecorators = {
7733
7751
  dropdownRef: [{ type: core.ViewChild, args: ['dropdownRef', { static: true },] }],
7752
+ hostDiv: [{ type: core.ViewChild, args: ['hostDiv',] }],
7734
7753
  closeTimeout: [{ type: core.Input }],
7735
7754
  openMethod: [{ type: core.Input }],
7736
7755
  closeOnClick: [{ type: core.Input }],
7737
- placeOnBottom: [{ type: core.Input }]
7756
+ placeOnBottom: [{ type: core.Input }],
7757
+ onClick: [{ type: core.Output }]
7738
7758
  };
7739
7759
  exports.NgtPopoverOpenMethod = void 0;
7740
7760
  (function (NgtPopoverOpenMethod) {