ng-tailwind 2.24.326 → 2.24.329

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.
@@ -1708,7 +1708,7 @@
1708
1708
  NgtHelperComponent.decorators = [
1709
1709
  { type: core.Component, args: [{
1710
1710
  selector: 'ngt-helper',
1711
- template: "<ngt-dropdown class=\"flex w-full hover:opacity-100\" [closeOnClick]=\"true\" [autoXReverse]='true' #dropdownRef>\n <div class=\"flex px-2 text-s rounded-full {{ iconColor ?? 'text-green-500'}}\" style=\"cursor: help;\"\n host>\n <ngt-svg *ngIf=\"icon\" [src]=\"icon\" style=\"cursor: help;\"></ngt-svg>\n\n <div *ngIf=\"!icon\" style=\"cursor: help;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path class=\"fill-current\"\n d=\"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z\" />\n </svg>\n </div>\n\n <p *ngIf=\"helpText\" class=\"cursor-pointer {{helpTextColor}}\" style=\"margin-left: 2px\">{{helpText}}</p>\n </div>\n\n <div class=\"bg-gray-100 text-sm rounded-lg hover:opacity-100 text-gray-800 max-w-xs shadow-lg {{ ngtStyle.compile(['text', 'fontCase']) }}\"\n [class.-mb-4]='dropdownRef.isYPositionReversed' container>\n <div\n class=\"{{ ngtStyle.compile(['color.bg', 'color.text']) }} rounded-t-lg hover:opacity-100 font-semibold border-b border-dashed border-gray-400 text-center px-6 py-1\">\n {{ helpTitle || ngtTranslateService.ngtStandardHelperTitle }}\n </div>\n <div class=\"px-2 py-1 text-center hover:opacity-100\">\n <ng-content></ng-content>\n </div>\n </div>\n</ngt-dropdown>\n",
1711
+ template: "<ngt-dropdown class=\"flex w-full hover:opacity-100\" [closeOnClick]=\"true\" [autoXReverse]='true' #dropdownRef>\n <div class=\"flex px-2 text-s rounded-full {{ iconColor ?? 'text-green-500'}}\" style=\"cursor: help;\"\n host>\n <ngt-svg *ngIf=\"icon\" [src]=\"icon\" style=\"cursor: help;\"></ngt-svg>\n\n <div *ngIf=\"!icon\" style=\"cursor: help;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path class=\"fill-current\"\n d=\"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z\" />\n </svg>\n </div>\n\n <p *ngIf=\"helpText\" class=\"cursor-pointer {{helpTextColor}}\" style=\"margin-left: 2px\">{{helpText}}</p>\n </div>\n\n <div class=\"bg-gray-100 text-sm rounded-lg hover:opacity-100 text-gray-800 max-w-xs shadow-lg {{ ngtStyle.compile(['text', 'fontCase']) }}\"\n [class.-mb-4]='dropdownRef.isYPositionReversed' container>\n <div\n class=\"{{ ngtStyle.compile(['color.bg', 'color.text']) }} flex justify-center rounded-t-lg hover:opacity-100 font-semibold border-b border-dashed border-gray-400 text-center px-6 py-1\">\n <ngt-svg *ngIf=\"iconTitle\" [src]=\"iconTitle\" style=\"margin-right: 3px\"></ngt-svg>\n {{ helpTitle || ngtTranslateService.ngtStandardHelperTitle }}\n </div>\n <div class=\"px-2 py-1 text-center hover:opacity-100\">\n <ng-content></ng-content>\n </div>\n </div>\n</ngt-dropdown>\n",
1712
1712
  encapsulation: core.ViewEncapsulation.None
1713
1713
  },] }
1714
1714
  ];
@@ -1723,7 +1723,8 @@
1723
1723
  helpText: [{ type: core.Input }],
1724
1724
  icon: [{ type: core.Input }],
1725
1725
  helpTitle: [{ type: core.Input }],
1726
- iconColor: [{ type: core.Input }]
1726
+ iconColor: [{ type: core.Input }],
1727
+ iconTitle: [{ type: core.Input }]
1727
1728
  };
1728
1729
 
1729
1730
  function uuid() {
@@ -1766,6 +1767,8 @@
1766
1767
  this.name = uuid();
1767
1768
  this.isYPositionReversed = false;
1768
1769
  this.isXPositionReversed = false;
1770
+ this.isBindingYPosition = true;
1771
+ this.isBindingXPosition = true;
1769
1772
  this.subscriptions = [];
1770
1773
  if (this.ngtDropdownContainer) {
1771
1774
  this.subscriptions.push(this.ngtDropdownContainer.onActiveDropdownChange.subscribe(function (activeDropdown) {
@@ -1835,25 +1838,27 @@
1835
1838
  if (this.isOpen) {
1836
1839
  this.bindContainerXPosition();
1837
1840
  this.isXPositionReversed = !(this.containerXPosition > document.documentElement.clientWidth);
1838
- return this.isXPositionReversed;
1841
+ return !this.isBindingXPosition && this.isXPositionReversed;
1839
1842
  }
1840
1843
  };
1841
1844
  NgtDropdownComponent.prototype.shouldReverseYPosition = function () {
1842
1845
  if (!this.autoYReverse || this.reverseYPosition !== undefined) {
1843
1846
  return this.reverseYPosition;
1844
1847
  }
1845
- this.bindContainerYPosition();
1846
1848
  if (this.isOpen) {
1849
+ this.bindContainerYPosition();
1847
1850
  this.isYPositionReversed = this.containerYPosition > (document.documentElement.clientHeight * 0.9);
1848
- return this.isYPositionReversed;
1851
+ return !this.isBindingYPosition && this.isYPositionReversed;
1849
1852
  }
1850
1853
  };
1851
1854
  NgtDropdownComponent.prototype.bindContainerXPosition = function () {
1852
1855
  var _this = this;
1853
1856
  if (!this.containerXPosition && this.containerRef.nativeElement.offsetWidth) {
1857
+ this.isBindingXPosition = true;
1854
1858
  setTimeout(function () {
1855
1859
  _this.containerXPosition = _this.containerRef.nativeElement.getBoundingClientRect().x
1856
1860
  + _this.containerRef.nativeElement.offsetWidth;
1861
+ _this.isBindingXPosition = false;
1857
1862
  });
1858
1863
  }
1859
1864
  };
@@ -1861,9 +1866,11 @@
1861
1866
  var _this = this;
1862
1867
  var _a;
1863
1868
  if (!this.containerYPosition && ((_a = this.containerRef) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetHeight)) {
1869
+ this.isBindingYPosition = true;
1864
1870
  setTimeout(function () {
1865
1871
  _this.containerYPosition = _this.containerRef.nativeElement.getBoundingClientRect().y
1866
1872
  + _this.containerRef.nativeElement.offsetHeight;
1873
+ _this.isBindingYPosition = false;
1867
1874
  });
1868
1875
  }
1869
1876
  };
@@ -6946,6 +6953,7 @@
6946
6953
  };
6947
6954
  NgtDropzoneFileViewerComponent.prototype.init = function () {
6948
6955
  this.canShowViewer = true;
6956
+ this.initReloadInterval();
6949
6957
  };
6950
6958
  NgtDropzoneFileViewerComponent.prototype.close = function () {
6951
6959
  this.canShowViewer = false;
@@ -6958,6 +6966,20 @@
6958
6966
  file.setAttribute("download", this.fileName);
6959
6967
  file.click();
6960
6968
  };
6969
+ NgtDropzoneFileViewerComponent.prototype.initReloadInterval = function () {
6970
+ var _this = this;
6971
+ var reloadInterval = setInterval(function () {
6972
+ var _a;
6973
+ (_a = _this.ngxDocViewer) === null || _a === void 0 ? void 0 : _a.iframes.forEach(function (iframe) {
6974
+ if (iframe.nativeElement.contentDocument) {
6975
+ _this.ngxDocViewer.reloadIFrame(iframe.nativeElement);
6976
+ }
6977
+ else {
6978
+ clearInterval(reloadInterval);
6979
+ }
6980
+ });
6981
+ }, 1000);
6982
+ };
6961
6983
  return NgtDropzoneFileViewerComponent;
6962
6984
  }());
6963
6985
  NgtDropzoneFileViewerComponent.decorators = [
@@ -6967,8 +6989,8 @@
6967
6989
  styles: [":host{background:rgba(0,0,0,.5);color:#fff;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:10000000}"]
6968
6990
  },] }
6969
6991
  ];
6970
- NgtDropzoneFileViewerComponent.ctorParameters = function () { return []; };
6971
6992
  NgtDropzoneFileViewerComponent.propDecorators = {
6993
+ ngxDocViewer: [{ type: core.ViewChild, args: [ngxDocViewer.NgxDocViewerComponent,] }],
6972
6994
  url: [{ type: core.Input }],
6973
6995
  fileName: [{ type: core.Input }],
6974
6996
  onClose: [{ type: core.Output }],