@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
|
@@ -33,7 +33,7 @@ import { DragulaService, DragulaModule } from 'ng2-dragula';
|
|
|
33
33
|
import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_LOCALE, MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatPaginatorModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSortModule, MatSlideToggleModule, MatSnackBarModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatFormFieldModule, MatExpansionModule, MatStepperModule, MatDialogModule, MatNativeDateModule } from '@angular/material';
|
|
34
34
|
import { enabled, request, exit } from 'screenfull';
|
|
35
35
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
36
|
-
import { Injectable, Component, Directive, Input, ElementRef, Inject, PLATFORM_ID, Output, EventEmitter,
|
|
36
|
+
import { Injectable, Component, Directive, Input, ElementRef, Inject, PLATFORM_ID, ViewChild, Output, EventEmitter, forwardRef, Optional, HostListener, Pipe, ViewContainerRef, defineInjectable, inject, NgModule } from '@angular/core';
|
|
37
37
|
import { Http } from '@angular/http';
|
|
38
38
|
import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
|
|
39
39
|
import { ToastrService } from 'ngx-toastr';
|
|
@@ -15440,6 +15440,7 @@ class ImageViewerComponent {
|
|
|
15440
15440
|
this.preview = false;
|
|
15441
15441
|
this.indexChange = new EventEmitter();
|
|
15442
15442
|
this.configChange = new EventEmitter();
|
|
15443
|
+
this.init = new EventEmitter();
|
|
15443
15444
|
this.fullScreenEvent = new EventEmitter();
|
|
15444
15445
|
this.style = { transform: '', msTransform: '', oTransform: '', webkitTransform: '' };
|
|
15445
15446
|
this.fullscreen = false;
|
|
@@ -15459,6 +15460,7 @@ class ImageViewerComponent {
|
|
|
15459
15460
|
const merged = this.mergeConfig(DEFAULT_CONFIG, this.moduleConfig);
|
|
15460
15461
|
this.config = this.mergeConfig(merged, this.config);
|
|
15461
15462
|
this.triggerConfigBinding();
|
|
15463
|
+
this.init.emit();
|
|
15462
15464
|
}
|
|
15463
15465
|
/**
|
|
15464
15466
|
* @param {?} event
|
|
@@ -15565,7 +15567,6 @@ class ImageViewerComponent {
|
|
|
15565
15567
|
this.fullscreen = !this.fullscreen;
|
|
15566
15568
|
if (this.fullscreen) {
|
|
15567
15569
|
this.fullScreenEvent.emit();
|
|
15568
|
-
this.preview = false;
|
|
15569
15570
|
}
|
|
15570
15571
|
if (!this.fullscreen) {
|
|
15571
15572
|
this.reset();
|
|
@@ -15659,6 +15660,7 @@ ImageViewerComponent.propDecorators = {
|
|
|
15659
15660
|
config: [{ type: Input }],
|
|
15660
15661
|
indexChange: [{ type: Output }],
|
|
15661
15662
|
configChange: [{ type: Output }],
|
|
15663
|
+
init: [{ type: Output }],
|
|
15662
15664
|
fullScreenEvent: [{ type: Output }],
|
|
15663
15665
|
nextImage: [{ type: HostListener, args: ['window:keyup.ArrowRight', ['$event'],] }],
|
|
15664
15666
|
prevImage: [{ type: HostListener, args: ['window:keyup.ArrowLeft', ['$event'],] }],
|
|
@@ -15708,38 +15710,6 @@ class image_preview {
|
|
|
15708
15710
|
};
|
|
15709
15711
|
this.u = null;
|
|
15710
15712
|
this.already_open = false;
|
|
15711
|
-
this.config_photo = {
|
|
15712
|
-
btnClass: 'default',
|
|
15713
|
-
// The CSS class(es) that will apply to the buttons
|
|
15714
|
-
zoomFactor: 0.1,
|
|
15715
|
-
// The amount that the scale will be increased by
|
|
15716
|
-
containerBackgroundColor: '#ccc',
|
|
15717
|
-
// The color to use for the background. This can provided in hex, or rgb(a).
|
|
15718
|
-
wheelZoom: true,
|
|
15719
|
-
// If true, the mouse wheel can be used to zoom in
|
|
15720
|
-
allowFullscreen: false,
|
|
15721
|
-
// If true, the fullscreen button will be shown, allowing the user to entr fullscreen mode
|
|
15722
|
-
allowKeyboardNavigation: true,
|
|
15723
|
-
// If true, the left / right arrow keys can be used for navigation
|
|
15724
|
-
btnIcons: {
|
|
15725
|
-
// The icon classes that will apply to the buttons. By default, font-awesome is used.
|
|
15726
|
-
zoomIn: 'fa fa-plus',
|
|
15727
|
-
zoomOut: 'fa fa-minus',
|
|
15728
|
-
rotateClockwise: 'fa fa-repeat',
|
|
15729
|
-
rotateCounterClockwise: 'fa fa-undo',
|
|
15730
|
-
next: 'fa fa-arrow-right',
|
|
15731
|
-
prev: 'fa fa-arrow-left',
|
|
15732
|
-
fullscreen: 'fa fa-arrows-alt',
|
|
15733
|
-
},
|
|
15734
|
-
btnShow: {
|
|
15735
|
-
zoomIn: false,
|
|
15736
|
-
zoomOut: false,
|
|
15737
|
-
rotateClockwise: false,
|
|
15738
|
-
rotateCounterClockwise: false,
|
|
15739
|
-
next: false,
|
|
15740
|
-
prev: false
|
|
15741
|
-
}
|
|
15742
|
-
};
|
|
15743
15713
|
this.config_photo_big = {
|
|
15744
15714
|
btnClass: 'default',
|
|
15745
15715
|
// The CSS class(es) that will apply to the buttons
|
|
@@ -15777,8 +15747,10 @@ class image_preview {
|
|
|
15777
15747
|
* @return {?}
|
|
15778
15748
|
*/
|
|
15779
15749
|
toggle_up() {
|
|
15750
|
+
console.log('togglwe up');
|
|
15780
15751
|
this.photo_c.src = [];
|
|
15781
15752
|
this.photo_c.src.push(this.u.image_original[0]);
|
|
15753
|
+
this.photo_c.preview = false;
|
|
15782
15754
|
this.config = this.config_photo_big;
|
|
15783
15755
|
//this.photo_c.toggleFullscreen()
|
|
15784
15756
|
this.already_open = true;
|
|
@@ -15789,7 +15761,7 @@ class image_preview {
|
|
|
15789
15761
|
fullScreenEvent() {
|
|
15790
15762
|
if (this.u != null)
|
|
15791
15763
|
if (this.u.image_thumbnail != null)
|
|
15792
|
-
if (this.u.image_thumbnail.length > 0 && this.preview
|
|
15764
|
+
if (this.u.image_thumbnail.length > 0 && this.photo_c.preview)
|
|
15793
15765
|
this.toggle_up();
|
|
15794
15766
|
}
|
|
15795
15767
|
/**
|
|
@@ -15817,11 +15789,20 @@ class image_preview {
|
|
|
15817
15789
|
* @return {?}
|
|
15818
15790
|
*/
|
|
15819
15791
|
ngOnInit() {
|
|
15820
|
-
this.
|
|
15821
|
-
|
|
15792
|
+
this.init();
|
|
15793
|
+
}
|
|
15794
|
+
/**
|
|
15795
|
+
* @return {?}
|
|
15796
|
+
*/
|
|
15797
|
+
init() {
|
|
15798
|
+
this._preview_c = false;
|
|
15799
|
+
if (this.u != null)
|
|
15822
15800
|
if (this.u.image_thumbnail != null)
|
|
15823
|
-
if (this.u.image_thumbnail
|
|
15824
|
-
this.
|
|
15801
|
+
if (this.u.image_thumbnail.length > 0)
|
|
15802
|
+
if (this.u.image_thumbnail[0] != this.u.image_original[0])
|
|
15803
|
+
this._preview_c = true;
|
|
15804
|
+
if (this.photo_c != null)
|
|
15805
|
+
this.photo_c.preview = this._preview_c;
|
|
15825
15806
|
}
|
|
15826
15807
|
}
|
|
15827
15808
|
image_preview.decorators = [
|
|
@@ -15829,10 +15810,9 @@ image_preview.decorators = [
|
|
|
15829
15810
|
selector: 'image_preview',
|
|
15830
15811
|
template: `
|
|
15831
15812
|
|
|
15832
|
-
|
|
15833
|
-
<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>
|
|
15813
|
+
<fh-image-viewer (init)="init()" (fullScreenEvent)="fullScreenEvent()" [config]="config_photo_big" #photo_c [src]="u.image_thumbnail" index="0"></fh-image-viewer>
|
|
15834
15814
|
|
|
15835
|
-
|
|
15815
|
+
|
|
15836
15816
|
`,
|
|
15837
15817
|
styles: [`
|
|
15838
15818
|
|