ng-tailwind 2.24.328 → 2.24.331

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.
@@ -6726,6 +6726,8 @@
6726
6726
  }
6727
6727
  else if (!selectableElement.isSelected && this.isSelectedElement(selectableElement)) {
6728
6728
  this.selectedElements = this.selectedElements.filter(function (selectedElement) { return selectedElement.uuid !== selectableElement.uuid; });
6729
+ ;
6730
+ this.onNativeChange(selectableElement);
6729
6731
  if (this.displayOnlySelected && !this.selectedElements.length) {
6730
6732
  this.displayOnlySelected = false;
6731
6733
  }
@@ -6937,10 +6939,7 @@
6937
6939
 
6938
6940
  var NgtDropzoneFileViewerComponent = /** @class */ (function () {
6939
6941
  function NgtDropzoneFileViewerComponent() {
6940
- this.url = '';
6941
- this.fileName = '';
6942
6942
  this.onClose = new core.EventEmitter();
6943
- this.canShowViewer = false;
6944
6943
  }
6945
6944
  NgtDropzoneFileViewerComponent.prototype.keyEvent = function (event) {
6946
6945
  var _this = this;
@@ -6952,7 +6951,9 @@
6952
6951
  }
6953
6952
  };
6954
6953
  NgtDropzoneFileViewerComponent.prototype.init = function () {
6954
+ this.loading = true;
6955
6955
  this.canShowViewer = true;
6956
+ this.initReloadInterval();
6956
6957
  };
6957
6958
  NgtDropzoneFileViewerComponent.prototype.close = function () {
6958
6959
  this.canShowViewer = false;
@@ -6965,17 +6966,32 @@
6965
6966
  file.setAttribute("download", this.fileName);
6966
6967
  file.click();
6967
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
+ _this.loading = false;
6980
+ }
6981
+ });
6982
+ }, 1000);
6983
+ };
6968
6984
  return NgtDropzoneFileViewerComponent;
6969
6985
  }());
6970
6986
  NgtDropzoneFileViewerComponent.decorators = [
6971
6987
  { type: core.Component, args: [{
6972
6988
  selector: 'ngt-dropzone-file-viewer',
6973
- template: "<div style=\"width:100%; height: 100%;\">\n <div style=\"width:100%; height: 100%;\">\n <div class=\"w-full py-5 pr-10\">\n <div class=\"w-full flex justify-end text-2xl\">\n <div class=\"cursor-pointer\" (click)=\"downloadFile()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\">\n <path fill=\"#fff\" d=\"M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z\" />\n </svg>\n </div>\n &nbsp;&nbsp;&nbsp;\n <div class=\"cursor-pointer\" (click)=\"close()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"#fff\"\n d=\"M24 2.42l-2.42 -2.42 -9.58 9.58 -9.58 -9.58 -2.42 2.42 9.58 9.58 -9.58 9.58 2.42 2.42 9.58 -9.58 9.58 9.58 2.42 -2.42 -9.58 -9.58 9.58 -9.58z\" />\n </svg>\n </div>\n\n </div>\n <div class=\"w-full justify-center text-center text-2xl font-mono text-white\">\n {{ fileName }}\n </div>\n </div>\n <div class=\"px-10\" style=\"width:100%; height: 83%;\" *ngIf=\"canShowViewer\">\n <ngx-doc-viewer class=\"h-full w-full\" [url]=\"url\">\n </ngx-doc-viewer>\n </div>\n </div>\n</div>",
6974
- styles: [":host{background:rgba(0,0,0,.5);color:#fff;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:10000000}"]
6989
+ template: "<div style=\"width:100%; height: 100%;\">\n <div style=\"width:100%; height: 100%;\">\n <div class=\"w-full py-5 pr-10\">\n <div class=\"w-full flex justify-end text-2xl\">\n <div class=\"cursor-pointer\" (click)=\"downloadFile()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\">\n <path fill=\"#fff\" d=\"M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z\" />\n </svg>\n </div>\n &nbsp;&nbsp;&nbsp;\n <div class=\"cursor-pointer\" (click)=\"close()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"#fff\"\n d=\"M24 2.42l-2.42 -2.42 -9.58 9.58 -9.58 -9.58 -2.42 2.42 9.58 9.58 -9.58 9.58 2.42 2.42 9.58 -9.58 9.58 9.58 2.42 -2.42 -9.58 -9.58 9.58 -9.58z\" />\n </svg>\n </div>\n\n </div>\n <div class=\"w-full justify-center text-center text-2xl font-mono text-white\">\n {{ fileName }}\n </div>\n </div>\n <div class=\"px-10\" style=\"width:100%; height: 83%;\" *ngIf=\"canShowViewer\">\n <ngx-doc-viewer class=\"h-full w-full\" [url]=\"url\">\n </ngx-doc-viewer>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"loading\" class=\"flex fixed inset-0 justify-center items-center w-full h-full cursor-wait z-50\">\n <div class=\"div-loader\"></div>\n</div>",
6990
+ styles: [":host{background:rgba(0,0,0,.5);color:#fff;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:10000000}.div-loader{width:5rem;height:5rem;border:5px solid #89c43f38;border-top-color:#89c43f;border-radius:50%;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}"]
6975
6991
  },] }
6976
6992
  ];
6977
- NgtDropzoneFileViewerComponent.ctorParameters = function () { return []; };
6978
6993
  NgtDropzoneFileViewerComponent.propDecorators = {
6994
+ ngxDocViewer: [{ type: core.ViewChild, args: [ngxDocViewer.NgxDocViewerComponent,] }],
6979
6995
  url: [{ type: core.Input }],
6980
6996
  fileName: [{ type: core.Input }],
6981
6997
  onClose: [{ type: core.Output }],