@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.
- package/bundles/fluxhub-fluxhub-lib.umd.js +17 -10
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/docs/components/ImageViewerComponent.html +19 -1
- package/docs/components/image_preview.html +76 -2
- package/docs/coverage.html +2 -2
- package/docs/js/search/search_index.js +2 -2
- package/esm2015/lib/controls/image-viewer/image-viewer.component.js +9 -3
- package/esm2015/lib/controls/image_preview.js +15 -13
- package/esm5/lib/controls/image-viewer/image-viewer.component.js +9 -3
- package/esm5/lib/controls/image_preview.js +15 -13
- package/fesm2015/fluxhub-fluxhub-lib.js +17 -10
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +18 -11
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/image-viewer/image-viewer.component.d.ts +1 -0
- package/lib/controls/image_preview.d.ts +2 -1
- package/package.json +1 -1
|
@@ -34,7 +34,7 @@ import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_LOCALE, MatAutocompleteM
|
|
|
34
34
|
import { __read, __assign, __extends } from 'tslib';
|
|
35
35
|
import { enabled, request, exit } from 'screenfull';
|
|
36
36
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
37
|
-
import { Injectable, Component, Directive, Input, ElementRef, Inject, PLATFORM_ID, Output, EventEmitter,
|
|
37
|
+
import { Injectable, Component, Directive, Input, ElementRef, Inject, PLATFORM_ID, ViewChild, Output, EventEmitter, forwardRef, Pipe, ViewContainerRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
|
|
38
38
|
import { Http } from '@angular/http';
|
|
39
39
|
import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
|
|
40
40
|
import { ToastrService } from 'ngx-toastr';
|
|
@@ -16024,6 +16024,7 @@ var ImageViewerComponent = /** @class */ (function () {
|
|
|
16024
16024
|
function ImageViewerComponent(moduleConfig) {
|
|
16025
16025
|
this.moduleConfig = moduleConfig;
|
|
16026
16026
|
this.index = 0;
|
|
16027
|
+
this.preview = false;
|
|
16027
16028
|
this.indexChange = new EventEmitter();
|
|
16028
16029
|
this.configChange = new EventEmitter();
|
|
16029
16030
|
this.fullScreenEvent = new EventEmitter();
|
|
@@ -16193,8 +16194,10 @@ var ImageViewerComponent = /** @class */ (function () {
|
|
|
16193
16194
|
*/
|
|
16194
16195
|
function () {
|
|
16195
16196
|
this.fullscreen = !this.fullscreen;
|
|
16196
|
-
if (this.fullscreen)
|
|
16197
|
+
if (this.fullscreen) {
|
|
16197
16198
|
this.fullScreenEvent.emit();
|
|
16199
|
+
this.preview = false;
|
|
16200
|
+
}
|
|
16198
16201
|
if (!this.fullscreen) {
|
|
16199
16202
|
this.reset();
|
|
16200
16203
|
}
|
|
@@ -16301,7 +16304,7 @@ var ImageViewerComponent = /** @class */ (function () {
|
|
|
16301
16304
|
ImageViewerComponent.decorators = [
|
|
16302
16305
|
{ type: Component, args: [{
|
|
16303
16306
|
selector: 'fh-image-viewer',
|
|
16304
|
-
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",
|
|
16307
|
+
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",
|
|
16305
16308
|
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)}}"]
|
|
16306
16309
|
}] }
|
|
16307
16310
|
];
|
|
@@ -16312,6 +16315,7 @@ var ImageViewerComponent = /** @class */ (function () {
|
|
|
16312
16315
|
ImageViewerComponent.propDecorators = {
|
|
16313
16316
|
src: [{ type: Input }],
|
|
16314
16317
|
index: [{ type: Input }],
|
|
16318
|
+
preview: [{ type: Input }],
|
|
16315
16319
|
config: [{ type: Input }],
|
|
16316
16320
|
indexChange: [{ type: Output }],
|
|
16317
16321
|
configChange: [{ type: Output }],
|
|
@@ -16330,7 +16334,8 @@ var ImageViewerComponent = /** @class */ (function () {
|
|
|
16330
16334
|
*/
|
|
16331
16335
|
var image_preview = /** @class */ (function () {
|
|
16332
16336
|
function image_preview() {
|
|
16333
|
-
this._preview =
|
|
16337
|
+
this._preview = false;
|
|
16338
|
+
this._preview_c = false;
|
|
16334
16339
|
this.config = {
|
|
16335
16340
|
btnClass: 'default',
|
|
16336
16341
|
// The CSS class(es) that will apply to the buttons
|
|
@@ -16440,7 +16445,7 @@ var image_preview = /** @class */ (function () {
|
|
|
16440
16445
|
this.photo_c.src = [];
|
|
16441
16446
|
this.photo_c.src.push(this.u.image_original[0]);
|
|
16442
16447
|
this.config = this.config_photo_big;
|
|
16443
|
-
this.photo_c.toggleFullscreen()
|
|
16448
|
+
//this.photo_c.toggleFullscreen()
|
|
16444
16449
|
this.already_open = true;
|
|
16445
16450
|
};
|
|
16446
16451
|
/**
|
|
@@ -16477,10 +16482,8 @@ var image_preview = /** @class */ (function () {
|
|
|
16477
16482
|
* @return {?}
|
|
16478
16483
|
*/
|
|
16479
16484
|
function (preview) {
|
|
16480
|
-
|
|
16481
|
-
|
|
16482
|
-
else
|
|
16483
|
-
this.config = this.config_photo;
|
|
16485
|
+
// this.config=this.config_photo_big;
|
|
16486
|
+
//else this.config=this.config_photo;
|
|
16484
16487
|
this._preview = preview;
|
|
16485
16488
|
},
|
|
16486
16489
|
enumerable: true,
|
|
@@ -16493,12 +16496,16 @@ var image_preview = /** @class */ (function () {
|
|
|
16493
16496
|
* @return {?}
|
|
16494
16497
|
*/
|
|
16495
16498
|
function () {
|
|
16496
|
-
this.config = this.
|
|
16499
|
+
this.config = this.config_photo_big;
|
|
16500
|
+
if (!this.u)
|
|
16501
|
+
if (this.u.image_thumbnail != null)
|
|
16502
|
+
if (this.u.image_thumbnail != this.u.image_original)
|
|
16503
|
+
this._preview_c = true;
|
|
16497
16504
|
};
|
|
16498
16505
|
image_preview.decorators = [
|
|
16499
16506
|
{ type: Component, args: [{
|
|
16500
16507
|
selector: 'image_preview',
|
|
16501
|
-
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",
|
|
16508
|
+
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",
|
|
16502
16509
|
styles: ["\n\n "]
|
|
16503
16510
|
}] }
|
|
16504
16511
|
];
|