@fluxhub/fluxhub-lib 1.0.237 → 1.0.239

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.
@@ -13680,7 +13680,8 @@
13680
13680
  */
13681
13681
  var image_preview = /** @class */ (function () {
13682
13682
  function image_preview() {
13683
- this._preview = true;
13683
+ this._preview = false;
13684
+ this._preview_c = false;
13684
13685
  this.config = {
13685
13686
  btnClass: 'default',
13686
13687
  // The CSS class(es) that will apply to the buttons
@@ -13790,7 +13791,7 @@
13790
13791
  this.photo_c.src = [];
13791
13792
  this.photo_c.src.push(this.u.image_original[0]);
13792
13793
  this.config = this.config_photo_big;
13793
- this.photo_c.toggleFullscreen();
13794
+ //this.photo_c.toggleFullscreen()
13794
13795
  this.already_open = true;
13795
13796
  };
13796
13797
  /**
@@ -13825,10 +13826,8 @@
13825
13826
  * @param {?} preview
13826
13827
  * @return {?}
13827
13828
  */ function (preview) {
13828
- if (!preview)
13829
- this.config = this.config_photo_big;
13830
- else
13831
- this.config = this.config_photo;
13829
+ // this.config=this.config_photo_big;
13830
+ //else this.config=this.config_photo;
13832
13831
  this._preview = preview;
13833
13832
  },
13834
13833
  enumerable: true,
@@ -13841,12 +13840,16 @@
13841
13840
  * @return {?}
13842
13841
  */
13843
13842
  function () {
13844
- this.config = this.config_photo;
13843
+ this.config = this.config_photo_big;
13844
+ if (!this.u)
13845
+ if (this.u.image_thumbnail != null)
13846
+ if (this.u.image_thumbnail != this.u.image_original)
13847
+ this._preview_c = true;
13845
13848
  };
13846
13849
  image_preview.decorators = [
13847
13850
  { type: i0.Component, args: [{
13848
13851
  selector: 'image_preview',
13849
- template: "\n \n\n <div style=\"max-width:460px\"><fh-image-viewer (fullScreenEvent)=\"fullScreenEvent()\" [(ngModel)]=\"config\" *ngIf=\"u?.image_thumbnail?.length>0\" #photo_c (customEvent)=\"handleEvent($event)\" [src]=\"u.image_thumbnail\" index=\"0\"></fh-image-viewer>\n \n </div>\n",
13852
+ template: "\n \n\n <div style=\"max-width:460px\"><fh-image-viewer [(preview)]=\"_preview_c\" (fullScreenEvent)=\"fullScreenEvent()\" [(ngModel)]=\"config\" *ngIf=\"u?.image_thumbnail?.length>0\" #photo_c (customEvent)=\"handleEvent($event)\" [src]=\"u.image_thumbnail\" index=\"0\"></fh-image-viewer>\n \n </div>\n",
13850
13853
  styles: ["\n\n "]
13851
13854
  }] }
13852
13855
  ];
@@ -13892,6 +13895,7 @@
13892
13895
  function ImageViewerComponent(moduleConfig) {
13893
13896
  this.moduleConfig = moduleConfig;
13894
13897
  this.index = 0;
13898
+ this.preview = false;
13895
13899
  this.indexChange = new i0.EventEmitter();
13896
13900
  this.configChange = new i0.EventEmitter();
13897
13901
  this.fullScreenEvent = new i0.EventEmitter();
@@ -14061,8 +14065,10 @@
14061
14065
  */
14062
14066
  function () {
14063
14067
  this.fullscreen = !this.fullscreen;
14064
- if (this.fullscreen)
14068
+ if (this.fullscreen) {
14065
14069
  this.fullScreenEvent.emit();
14070
+ this.preview = false;
14071
+ }
14066
14072
  if (!this.fullscreen) {
14067
14073
  this.reset();
14068
14074
  }
@@ -14169,7 +14175,7 @@
14169
14175
  ImageViewerComponent.decorators = [
14170
14176
  { type: i0.Component, args: [{
14171
14177
  selector: 'fh-image-viewer',
14172
- template: "<div [ngxToggleFullscreen]=\"fullscreen\" class=\"img-container\" [style.backgroundColor]=\"config.containerBackgroundColor\"\n (wheel)=\"scrollZoom($event)\" (dragover)=\"onDragOver($event)\">\n <img [src]=\"src[index]\" [ngStyle]=\"style\" alt=\"Image not found...\" (dragstart)=\"onDragStart($event)\" (load)=\"onLoad()\" (loadstart)=\"onLoadStart()\"/>\n <!-- Div below will be used to hide the 'ghost' image when dragging -->\n <div></div>\n <div class=\"spinner-container\" *ngIf=\"loading\">\n <div class=\"spinner\"></div>\n </div>\n\n <button type=\"button\" [class]=\"config.btnClass\" *ngIf=\"config.btnShow.rotateCounterClockwise\" (click)=\"rotateCounterClockwise()\">\n <span [class]=\"config.btnIcons.rotateCounterClockwise\"></span>\n </button>\n <button type=\"button\" [class]=\"config.btnClass\" *ngIf=\"config.btnShow.rotateClockwise\" (click)=\"rotateClockwise()\">\n <span [class]=\"config.btnIcons.rotateClockwise\"></span>\n </button>\n\n <button type=\"button\" [class]=\"config.btnClass\" *ngIf=\"config.btnShow.zoomOut\" (click)=\"zoomOut()\">\n <span [class]=\"config.btnIcons.zoomOut\"></span>\n </button>\n <button type=\"button\" [class]=\"config.btnClass\" *ngIf=\"config.btnShow.zoomIn\" (click)=\"zoomIn()\">\n <span [class]=\"config.btnIcons.zoomIn\"></span>\n </button>\n\n\n\n <button type=\"button\" id=\"ngx-fs-btn\" [class]=\"config.btnClass\" (click)=\"toggleFullscreen()\" *ngIf=\"config.allowFullscreen\">\n <span [class]=\"config.btnIcons.fullscreen\"></span>\n </button>\n\n <div class=\"nav-button-container\" *ngIf=\"src.length > 1\">\n <button type=\"button\" [class]=\"config.btnClass\" (click)=\"prevImage($event)\" [disabled]=\"index === 0\">\n <span [class]=\"config.btnIcons.prev\"></span>\n </button>\n <button type=\"button\" [class]=\"config.btnClass\" (click)=\"nextImage($event)\" [disabled]=\"index === src.length - 1\">\n <span [class]=\"config.btnIcons.next\"></span>\n </button>\n </div>\n</div>\n",
14178
+ template: "<div [ngxToggleFullscreen]=\"fullscreen\" class=\"img-container\" [style.backgroundColor]=\"config.containerBackgroundColor\"\n (wheel)=\"scrollZoom($event)\" (dragover)=\"onDragOver($event)\">\n <img [src]=\"src[index]\" [ngStyle]=\"style\" alt=\"Image not found...\" (dragstart)=\"onDragStart($event)\" (load)=\"onLoad()\" (loadstart)=\"onLoadStart()\"/>\n <!-- Div below will be used to hide the 'ghost' image when dragging -->\n <div></div>\n <div class=\"spinner-container\" *ngIf=\"loading\">\n <div class=\"spinner\"></div>\n </div>\n\n <button type=\"button\" [class]=\"config.btnClass\" *ngIf=\"config.btnShow.rotateCounterClockwise && !preview\" (click)=\"rotateCounterClockwise()\">\n <span [class]=\"config.btnIcons.rotateCounterClockwise\"></span>\n </button>\n <button type=\"button\" [class]=\"config.btnClass\" *ngIf=\"config.btnShow.rotateClockwise && !preview\" (click)=\"rotateClockwise()\">\n <span [class]=\"config.btnIcons.rotateClockwise\"></span>\n </button>\n\n <button type=\"button\" [class]=\"config.btnClass\" *ngIf=\"config.btnShow.zoomOut && !preview\" (click)=\"zoomOut()\">\n <span [class]=\"config.btnIcons.zoomOut\"></span>\n </button>\n <button type=\"button\" [class]=\"config.btnClass\" *ngIf=\"config.btnShow.zoomIn && !preview\" (click)=\"zoomIn()\">\n <span [class]=\"config.btnIcons.zoomIn\"></span>\n </button>\n\n\n\n <button type=\"button\" id=\"ngx-fs-btn\" [class]=\"config.btnClass\" (click)=\"toggleFullscreen()\" *ngIf=\"config.allowFullscreen\">\n <span [class]=\"config.btnIcons.fullscreen\"></span>\n </button>\n\n <div class=\"nav-button-container\" *ngIf=\"src.length > 1\">\n <button type=\"button\" [class]=\"config.btnClass\" (click)=\"prevImage($event)\" [disabled]=\"index === 0\">\n <span [class]=\"config.btnIcons.prev\"></span>\n </button>\n <button type=\"button\" [class]=\"config.btnClass\" (click)=\"nextImage($event)\" [disabled]=\"index === src.length - 1\">\n <span [class]=\"config.btnIcons.next\"></span>\n </button>\n </div>\n</div>\n",
14173
14179
  styles: [".img-container{height:100%;width:100%;overflow:hidden;position:relative}.img-container img{z-index:2;margin:0 auto;display:block;max-width:100%;max-height:100%}.img-container button{z-index:99;position:absolute;right:15px}.img-container button:not(:disabled){cursor:pointer}.img-container>button:nth-of-type(1):not(#ngx-fs-btn){bottom:15px}.img-container>button:nth-of-type(2):not(#ngx-fs-btn){bottom:65px}.img-container>button:nth-of-type(3):not(#ngx-fs-btn){bottom:115px}.img-container>button:nth-of-type(4):not(#ngx-fs-btn){bottom:165px}.img-container>button:nth-of-type(5):not(#ngx-fs-btn){bottom:215px}.img-container>button:nth-of-type(6):not(#ngx-fs-btn){bottom:265px}.img-container>button:nth-of-type(7):not(#ngx-fs-btn){bottom:315px}#ngx-fs-btn{top:15px}button.default{height:40px;width:40px;border:1px solid #555;border-radius:50%;background-color:#fff;opacity:.7;transition:opacity .2s}button.default:hover{opacity:1}button.default:disabled{opacity:.25}.nav-button-container>button{position:relative;right:0;margin:0 10px}.nav-button-container{text-align:center;position:absolute;z-index:98;bottom:10px;left:0;right:0}.spinner-container{position:absolute;left:0;right:0;top:0;bottom:0;width:60px;height:60px;margin:auto;padding:10px;background-color:rgba(0,0,0,.4);border-radius:25%}.spinner{border-width:7px;border-style:solid;border-color:#ccc #ccc #222;border-radius:50%;height:100%;width:100%;box-sizing:border-box;-webkit-animation:2s linear infinite rotation;animation:2s linear infinite rotation}@keyframes rotation{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(359deg)}}@-webkit-keyframes rotation{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(359deg)}}"]
14174
14180
  }] }
14175
14181
  ];
@@ -14182,6 +14188,7 @@
14182
14188
  ImageViewerComponent.propDecorators = {
14183
14189
  src: [{ type: i0.Input }],
14184
14190
  index: [{ type: i0.Input }],
14191
+ preview: [{ type: i0.Input }],
14185
14192
  config: [{ type: i0.Input }],
14186
14193
  indexChange: [{ type: i0.Output }],
14187
14194
  configChange: [{ type: i0.Output }],