@fluxhub/fluxhub-lib 1.0.239 → 1.0.241
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 +23 -39
- 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 +17 -0
- package/docs/components/image_preview.html +41 -65
- package/docs/coverage.html +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/esm2015/lib/controls/image-viewer/image-viewer.component.js +6 -2
- package/esm2015/lib/controls/image_preview.js +19 -43
- package/esm5/lib/controls/image-viewer/image-viewer.component.js +6 -2
- package/esm5/lib/controls/image_preview.js +21 -41
- package/fesm2015/fluxhub-fluxhub-lib.js +22 -42
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +24 -40
- 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 +1 -25
- 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,
|
|
37
|
+
import { Injectable, Component, Directive, Input, ElementRef, Inject, PLATFORM_ID, Output, EventEmitter, ViewChild, 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';
|
|
@@ -16027,6 +16027,7 @@ var ImageViewerComponent = /** @class */ (function () {
|
|
|
16027
16027
|
this.preview = false;
|
|
16028
16028
|
this.indexChange = new EventEmitter();
|
|
16029
16029
|
this.configChange = new EventEmitter();
|
|
16030
|
+
this.init = new EventEmitter();
|
|
16030
16031
|
this.fullScreenEvent = new EventEmitter();
|
|
16031
16032
|
this.style = { transform: '', msTransform: '', oTransform: '', webkitTransform: '' };
|
|
16032
16033
|
this.fullscreen = false;
|
|
@@ -16049,6 +16050,7 @@ var ImageViewerComponent = /** @class */ (function () {
|
|
|
16049
16050
|
var merged = this.mergeConfig(DEFAULT_CONFIG, this.moduleConfig);
|
|
16050
16051
|
this.config = this.mergeConfig(merged, this.config);
|
|
16051
16052
|
this.triggerConfigBinding();
|
|
16053
|
+
this.init.emit();
|
|
16052
16054
|
};
|
|
16053
16055
|
/**
|
|
16054
16056
|
* @param {?} event
|
|
@@ -16196,7 +16198,6 @@ var ImageViewerComponent = /** @class */ (function () {
|
|
|
16196
16198
|
this.fullscreen = !this.fullscreen;
|
|
16197
16199
|
if (this.fullscreen) {
|
|
16198
16200
|
this.fullScreenEvent.emit();
|
|
16199
|
-
this.preview = false;
|
|
16200
16201
|
}
|
|
16201
16202
|
if (!this.fullscreen) {
|
|
16202
16203
|
this.reset();
|
|
@@ -16319,6 +16320,7 @@ var ImageViewerComponent = /** @class */ (function () {
|
|
|
16319
16320
|
config: [{ type: Input }],
|
|
16320
16321
|
indexChange: [{ type: Output }],
|
|
16321
16322
|
configChange: [{ type: Output }],
|
|
16323
|
+
init: [{ type: Output }],
|
|
16322
16324
|
fullScreenEvent: [{ type: Output }],
|
|
16323
16325
|
nextImage: [{ type: HostListener, args: ['window:keyup.ArrowRight', ['$event'],] }],
|
|
16324
16326
|
prevImage: [{ type: HostListener, args: ['window:keyup.ArrowLeft', ['$event'],] }],
|
|
@@ -16370,38 +16372,6 @@ var image_preview = /** @class */ (function () {
|
|
|
16370
16372
|
};
|
|
16371
16373
|
this.u = null;
|
|
16372
16374
|
this.already_open = false;
|
|
16373
|
-
this.config_photo = {
|
|
16374
|
-
btnClass: 'default',
|
|
16375
|
-
// The CSS class(es) that will apply to the buttons
|
|
16376
|
-
zoomFactor: 0.1,
|
|
16377
|
-
// The amount that the scale will be increased by
|
|
16378
|
-
containerBackgroundColor: '#ccc',
|
|
16379
|
-
// The color to use for the background. This can provided in hex, or rgb(a).
|
|
16380
|
-
wheelZoom: true,
|
|
16381
|
-
// If true, the mouse wheel can be used to zoom in
|
|
16382
|
-
allowFullscreen: false,
|
|
16383
|
-
// If true, the fullscreen button will be shown, allowing the user to entr fullscreen mode
|
|
16384
|
-
allowKeyboardNavigation: true,
|
|
16385
|
-
// If true, the left / right arrow keys can be used for navigation
|
|
16386
|
-
btnIcons: {
|
|
16387
|
-
// The icon classes that will apply to the buttons. By default, font-awesome is used.
|
|
16388
|
-
zoomIn: 'fa fa-plus',
|
|
16389
|
-
zoomOut: 'fa fa-minus',
|
|
16390
|
-
rotateClockwise: 'fa fa-repeat',
|
|
16391
|
-
rotateCounterClockwise: 'fa fa-undo',
|
|
16392
|
-
next: 'fa fa-arrow-right',
|
|
16393
|
-
prev: 'fa fa-arrow-left',
|
|
16394
|
-
fullscreen: 'fa fa-arrows-alt',
|
|
16395
|
-
},
|
|
16396
|
-
btnShow: {
|
|
16397
|
-
zoomIn: false,
|
|
16398
|
-
zoomOut: false,
|
|
16399
|
-
rotateClockwise: false,
|
|
16400
|
-
rotateCounterClockwise: false,
|
|
16401
|
-
next: false,
|
|
16402
|
-
prev: false
|
|
16403
|
-
}
|
|
16404
|
-
};
|
|
16405
16375
|
this.config_photo_big = {
|
|
16406
16376
|
btnClass: 'default',
|
|
16407
16377
|
// The CSS class(es) that will apply to the buttons
|
|
@@ -16442,8 +16412,10 @@ var image_preview = /** @class */ (function () {
|
|
|
16442
16412
|
* @return {?}
|
|
16443
16413
|
*/
|
|
16444
16414
|
function () {
|
|
16415
|
+
console.log('togglwe up');
|
|
16445
16416
|
this.photo_c.src = [];
|
|
16446
16417
|
this.photo_c.src.push(this.u.image_original[0]);
|
|
16418
|
+
this.photo_c.preview = false;
|
|
16447
16419
|
this.config = this.config_photo_big;
|
|
16448
16420
|
//this.photo_c.toggleFullscreen()
|
|
16449
16421
|
this.already_open = true;
|
|
@@ -16457,7 +16429,7 @@ var image_preview = /** @class */ (function () {
|
|
|
16457
16429
|
function () {
|
|
16458
16430
|
if (this.u != null)
|
|
16459
16431
|
if (this.u.image_thumbnail != null)
|
|
16460
|
-
if (this.u.image_thumbnail.length > 0 && this.preview
|
|
16432
|
+
if (this.u.image_thumbnail.length > 0 && this.photo_c.preview)
|
|
16461
16433
|
this.toggle_up();
|
|
16462
16434
|
};
|
|
16463
16435
|
/**
|
|
@@ -16496,16 +16468,28 @@ var image_preview = /** @class */ (function () {
|
|
|
16496
16468
|
* @return {?}
|
|
16497
16469
|
*/
|
|
16498
16470
|
function () {
|
|
16499
|
-
this.
|
|
16500
|
-
|
|
16471
|
+
this.init();
|
|
16472
|
+
};
|
|
16473
|
+
/**
|
|
16474
|
+
* @return {?}
|
|
16475
|
+
*/
|
|
16476
|
+
image_preview.prototype.init = /**
|
|
16477
|
+
* @return {?}
|
|
16478
|
+
*/
|
|
16479
|
+
function () {
|
|
16480
|
+
this._preview_c = false;
|
|
16481
|
+
if (this.u != null)
|
|
16501
16482
|
if (this.u.image_thumbnail != null)
|
|
16502
|
-
if (this.u.image_thumbnail
|
|
16503
|
-
this.
|
|
16483
|
+
if (this.u.image_thumbnail.length > 0)
|
|
16484
|
+
if (this.u.image_thumbnail[0] != this.u.image_original[0])
|
|
16485
|
+
this._preview_c = true;
|
|
16486
|
+
if (this.photo_c != null)
|
|
16487
|
+
this.photo_c.preview = this._preview_c;
|
|
16504
16488
|
};
|
|
16505
16489
|
image_preview.decorators = [
|
|
16506
16490
|
{ type: Component, args: [{
|
|
16507
16491
|
selector: 'image_preview',
|
|
16508
|
-
template: "\n \n
|
|
16492
|
+
template: "\n \n<fh-image-viewer (init)=\"init()\" (fullScreenEvent)=\"fullScreenEvent()\" [config]=\"config_photo_big\" #photo_c [src]=\"u.image_thumbnail\" index=\"0\"></fh-image-viewer>\n \n\n",
|
|
16509
16493
|
styles: ["\n\n "]
|
|
16510
16494
|
}] }
|
|
16511
16495
|
];
|