@ks89/angular-modal-gallery 8.0.0-beta.5 → 9.0.0
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/CHANGELOG.md +153 -0
- package/CONTRIBUTING.md +20 -38
- package/LICENSE +1 -1
- package/README.md +36 -42
- package/esm2020/ks89-angular-modal-gallery.mjs +5 -0
- package/esm2020/lib/components/accessibility-default.mjs +41 -0
- package/esm2020/lib/components/accessible.component.mjs +130 -0
- package/esm2020/lib/components/carousel/carousel-previews/carousel-previews.component.mjs +462 -0
- package/esm2020/lib/components/carousel/carousel.component.mjs +747 -0
- package/esm2020/lib/components/components.mjs +50 -0
- package/esm2020/lib/components/current-image/current-image.component.mjs +616 -0
- package/esm2020/lib/components/current-image/loading-spinner/loading-spinner.component.mjs +80 -0
- package/esm2020/lib/components/dots/dots.component.mjs +127 -0
- package/esm2020/lib/components/modal-gallery/modal-gallery-ref.mjs +103 -0
- package/esm2020/lib/components/modal-gallery/modal-gallery.component.mjs +523 -0
- package/esm2020/lib/components/modal-gallery/modal-gallery.service.mjs +187 -0
- package/esm2020/lib/components/modal-gallery/modal-gallery.tokens.mjs +26 -0
- package/esm2020/lib/components/plain-gallery/plain-gallery.component.mjs +249 -0
- package/esm2020/lib/components/previews/previews.component.mjs +332 -0
- package/esm2020/lib/components/upper-buttons/upper-buttons-default.mjs +76 -0
- package/esm2020/lib/components/upper-buttons/upper-buttons.component.mjs +249 -0
- package/esm2020/lib/directives/a-tag-bg-image.directive.mjs +78 -0
- package/esm2020/lib/directives/click-outside.directive.mjs +91 -0
- package/esm2020/lib/directives/description.directive.mjs +98 -0
- package/esm2020/lib/directives/direction.directive.mjs +73 -0
- package/esm2020/lib/directives/directives.mjs +49 -0
- package/esm2020/lib/directives/fallback-image.directive.mjs +59 -0
- package/esm2020/lib/directives/keyboard-navigation.directive.mjs +58 -0
- package/esm2020/lib/directives/margin.directive.mjs +84 -0
- package/esm2020/lib/directives/max-size.directive.mjs +75 -0
- package/esm2020/lib/directives/size.directive.mjs +76 -0
- package/{esm2015/lib/directives/size.directive.js → esm2020/lib/directives/wrap.directive.mjs} +23 -22
- package/esm2020/lib/modal-gallery.module.mjs +94 -0
- package/esm2020/lib/model/accessibility.interface.mjs +25 -0
- package/esm2020/lib/model/action.enum.mjs +36 -0
- package/esm2020/lib/model/buttons-config.interface.mjs +62 -0
- package/esm2020/lib/model/carousel-config.interface.mjs +25 -0
- package/esm2020/lib/model/carousel-image-config.interface.mjs +25 -0
- package/esm2020/lib/model/carousel-preview-config.interface.mjs +25 -0
- package/{esm2015/lib/model/keyboard-service-config.interface.js → esm2020/lib/model/current-image-config.interface.mjs} +2 -2
- package/esm2020/lib/model/description.interface.mjs +33 -0
- package/{esm2015/lib/model/preview-config.interface.js → esm2020/lib/model/dots-config.interface.mjs} +2 -2
- package/esm2020/lib/model/image-internal.class.mjs +35 -0
- package/esm2020/lib/model/image.class.mjs +54 -0
- package/esm2020/lib/model/interaction-event.interface.mjs +2 -0
- package/esm2020/lib/model/keyboard-config.interface.mjs +25 -0
- package/esm2020/lib/model/keyboard-service-config.interface.mjs +25 -0
- package/esm2020/lib/model/keyboard.enum.mjs +35 -0
- package/esm2020/lib/model/lib-config.interface.mjs +25 -0
- package/esm2020/lib/model/loading-config.interface.mjs +37 -0
- package/{esm2015/lib/model/dots-config.interface.js → esm2020/lib/model/max-size.interface.mjs} +2 -2
- package/{esm2015/lib/model/carousel-preview-config.interface.js → esm2020/lib/model/modal-gallery-config.interface.mjs} +2 -2
- package/esm2020/lib/model/plain-gallery-config.interface.mjs +55 -0
- package/{esm2015/lib/model/image-internal.class.js → esm2020/lib/model/play-config.interface.mjs} +3 -13
- package/esm2020/lib/model/preview-config.interface.mjs +25 -0
- package/esm2020/lib/model/size.interface.mjs +25 -0
- package/{esm2015/lib/model/carousel-config.interface.js → esm2020/lib/model/slide-config.interface.mjs} +2 -2
- package/esm2020/lib/services/config.service.mjs +396 -0
- package/esm2020/lib/services/id-validator.service.mjs +71 -0
- package/esm2020/lib/services/keyboard.service.mjs +111 -0
- package/esm2020/lib/utils/image.util.mjs +48 -0
- package/esm2020/lib/utils/user-input.util.mjs +104 -0
- package/esm2020/public-api.mjs +42 -0
- package/fesm2015/ks89-angular-modal-gallery.mjs +5782 -0
- package/fesm2015/ks89-angular-modal-gallery.mjs.map +1 -0
- package/{fesm2015/ks89-angular-modal-gallery.js → fesm2020/ks89-angular-modal-gallery.mjs} +3046 -2947
- package/fesm2020/ks89-angular-modal-gallery.mjs.map +1 -0
- package/ks89-angular-modal-gallery.d.ts +1 -24
- package/lib/components/accessible.component.d.ts +5 -2
- package/lib/components/carousel/carousel-previews/carousel-previews.component.d.ts +7 -11
- package/lib/components/carousel/carousel.component.d.ts +28 -67
- package/lib/components/current-image/current-image.component.d.ts +10 -4
- package/lib/components/current-image/loading-spinner/loading-spinner.component.d.ts +3 -0
- package/lib/components/dots/dots.component.d.ts +7 -0
- package/lib/components/modal-gallery/modal-gallery-ref.d.ts +35 -0
- package/lib/components/modal-gallery/modal-gallery.component.d.ts +58 -50
- package/lib/components/modal-gallery/modal-gallery.service.d.ts +60 -1
- package/lib/components/plain-gallery/plain-gallery.component.d.ts +18 -9
- package/lib/components/previews/previews.component.d.ts +9 -0
- package/lib/components/upper-buttons/upper-buttons.component.d.ts +8 -1
- package/lib/directives/a-tag-bg-image.directive.d.ts +3 -0
- package/lib/directives/click-outside.directive.d.ts +3 -0
- package/lib/directives/description.directive.d.ts +3 -0
- package/lib/directives/direction.directive.d.ts +3 -0
- package/lib/directives/fallback-image.directive.d.ts +6 -0
- package/lib/directives/keyboard-navigation.directive.d.ts +4 -1
- package/lib/directives/margin.directive.d.ts +3 -0
- package/lib/directives/max-size.directive.d.ts +3 -0
- package/lib/directives/size.directive.d.ts +5 -2
- package/lib/directives/wrap.directive.d.ts +4 -1
- package/lib/modal-gallery.module.d.ts +28 -0
- package/lib/model/carousel-config.interface.d.ts +0 -1
- package/lib/model/keyboard-config.interface.d.ts +4 -4
- package/lib/model/keyboard.enum.d.ts +11 -8
- package/lib/model/lib-config.interface.d.ts +20 -7
- package/lib/model/modal-gallery-config.interface.d.ts +2 -2
- package/lib/model/plain-gallery-config.interface.d.ts +1 -9
- package/lib/services/config.service.d.ts +3 -0
- package/lib/services/id-validator.service.d.ts +5 -1
- package/lib/services/keyboard.service.d.ts +5 -2
- package/lib/utils/user-input.util.d.ts +35 -26
- package/package.json +28 -16
- package/public-api.d.ts +2 -2
- package/bundles/ks89-angular-modal-gallery.umd.js +0 -5906
- package/bundles/ks89-angular-modal-gallery.umd.js.map +0 -1
- package/bundles/ks89-angular-modal-gallery.umd.min.js +0 -16
- package/bundles/ks89-angular-modal-gallery.umd.min.js.map +0 -1
- package/esm2015/ks89-angular-modal-gallery.js +0 -29
- package/esm2015/lib/components/accessibility-default.js +0 -41
- package/esm2015/lib/components/accessible.component.js +0 -127
- package/esm2015/lib/components/carousel/carousel-previews/carousel-previews.component.js +0 -466
- package/esm2015/lib/components/carousel/carousel.component.js +0 -772
- package/esm2015/lib/components/components.js +0 -50
- package/esm2015/lib/components/current-image/current-image.component.js +0 -590
- package/esm2015/lib/components/current-image/loading-spinner/loading-spinner.component.js +0 -80
- package/esm2015/lib/components/dots/dots.component.js +0 -127
- package/esm2015/lib/components/modal-gallery/modal-gallery-ref.js +0 -45
- package/esm2015/lib/components/modal-gallery/modal-gallery.component.js +0 -534
- package/esm2015/lib/components/modal-gallery/modal-gallery.service.js +0 -135
- package/esm2015/lib/components/modal-gallery/modal-gallery.tokens.js +0 -3
- package/esm2015/lib/components/plain-gallery/plain-gallery.component.js +0 -243
- package/esm2015/lib/components/previews/previews.component.js +0 -331
- package/esm2015/lib/components/upper-buttons/upper-buttons-default.js +0 -76
- package/esm2015/lib/components/upper-buttons/upper-buttons.component.js +0 -256
- package/esm2015/lib/directives/a-tag-bg-image.directive.js +0 -78
- package/esm2015/lib/directives/click-outside.directive.js +0 -85
- package/esm2015/lib/directives/description.directive.js +0 -99
- package/esm2015/lib/directives/direction.directive.js +0 -73
- package/esm2015/lib/directives/directives.js +0 -49
- package/esm2015/lib/directives/fallback-image.directive.js +0 -54
- package/esm2015/lib/directives/keyboard-navigation.directive.js +0 -52
- package/esm2015/lib/directives/margin.directive.js +0 -82
- package/esm2015/lib/directives/max-size.directive.js +0 -76
- package/esm2015/lib/directives/wrap.directive.js +0 -74
- package/esm2015/lib/modal-gallery.module.js +0 -64
- package/esm2015/lib/model/accessibility.interface.js +0 -25
- package/esm2015/lib/model/action.enum.js +0 -36
- package/esm2015/lib/model/buttons-config.interface.js +0 -66
- package/esm2015/lib/model/carousel-image-config.interface.js +0 -25
- package/esm2015/lib/model/current-image-config.interface.js +0 -25
- package/esm2015/lib/model/description.interface.js +0 -33
- package/esm2015/lib/model/image.class.js +0 -54
- package/esm2015/lib/model/interaction-event.interface.js +0 -2
- package/esm2015/lib/model/keyboard-config.interface.js +0 -25
- package/esm2015/lib/model/keyboard.enum.js +0 -35
- package/esm2015/lib/model/lib-config.interface.js +0 -25
- package/esm2015/lib/model/loading-config.interface.js +0 -37
- package/esm2015/lib/model/max-size.interface.js +0 -25
- package/esm2015/lib/model/modal-gallery-config.interface.js +0 -25
- package/esm2015/lib/model/plain-gallery-config.interface.js +0 -64
- package/esm2015/lib/model/play-config.interface.js +0 -25
- package/esm2015/lib/model/size.interface.js +0 -25
- package/esm2015/lib/model/slide-config.interface.js +0 -25
- package/esm2015/lib/services/config.service.js +0 -392
- package/esm2015/lib/services/id-validator.service.js +0 -71
- package/esm2015/lib/services/keyboard.service.js +0 -108
- package/esm2015/lib/utils/image.util.js +0 -48
- package/esm2015/lib/utils/user-input.util.js +0 -95
- package/esm2015/public-api.js +0 -46
- package/fesm2015/ks89-angular-modal-gallery.js.map +0 -1
- package/ks89-angular-modal-gallery.metadata.json +0 -1
|
@@ -1,28 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
|
+
/// <amd-module name="@ks89/angular-modal-gallery" />
|
|
4
5
|
export * from './public-api';
|
|
5
|
-
export { AccessibleComponent as ɵc } from './lib/components/accessible.component';
|
|
6
|
-
export { CarouselPreviewsComponent as ɵe } from './lib/components/carousel/carousel-previews/carousel-previews.component';
|
|
7
|
-
export { COMPONENTS as ɵb } from './lib/components/components';
|
|
8
|
-
export { CurrentImageComponent as ɵi } from './lib/components/current-image/current-image.component';
|
|
9
|
-
export { LoadingSpinnerComponent as ɵj } from './lib/components/current-image/loading-spinner/loading-spinner.component';
|
|
10
|
-
export { DotsComponent as ɵg } from './lib/components/dots/dots.component';
|
|
11
|
-
export { DIALOG_DATA as ɵk } from './lib/components/modal-gallery/modal-gallery.tokens';
|
|
12
|
-
export { PreviewsComponent as ɵh } from './lib/components/previews/previews.component';
|
|
13
|
-
export { UpperButtonsComponent as ɵf } from './lib/components/upper-buttons/upper-buttons.component';
|
|
14
|
-
export { ATagBgImageDirective as ɵt } from './lib/directives/a-tag-bg-image.directive';
|
|
15
|
-
export { ClickOutsideDirective as ɵo } from './lib/directives/click-outside.directive';
|
|
16
|
-
export { DescriptionDirective as ɵu } from './lib/directives/description.directive';
|
|
17
|
-
export { DirectionDirective as ɵs } from './lib/directives/direction.directive';
|
|
18
|
-
export { DIRECTIVES as ɵn } from './lib/directives/directives';
|
|
19
|
-
export { FallbackImageDirective as ɵx } from './lib/directives/fallback-image.directive';
|
|
20
|
-
export { KeyboardNavigationDirective as ɵq } from './lib/directives/keyboard-navigation.directive';
|
|
21
|
-
export { MarginDirective as ɵv } from './lib/directives/margin.directive';
|
|
22
|
-
export { MaxSizeDirective as ɵw } from './lib/directives/max-size.directive';
|
|
23
|
-
export { SizeDirective as ɵp } from './lib/directives/size.directive';
|
|
24
|
-
export { WrapDirective as ɵr } from './lib/directives/wrap.directive';
|
|
25
|
-
export { KsHammerGestureConfig as ɵa } from './lib/modal-gallery.module';
|
|
26
|
-
export { ConfigService as ɵd } from './lib/services/config.service';
|
|
27
|
-
export { IdValidatorService as ɵm } from './lib/services/id-validator.service';
|
|
28
|
-
export { KeyboardService as ɵl } from './lib/services/keyboard.service';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
2
|
/**
|
|
2
3
|
* Provides some useful methods to add accessibility features to subclasses.
|
|
3
4
|
* In particular, it exposes a method to handle navigation event with both Keyboard and Mouse
|
|
@@ -14,13 +15,13 @@ export declare class AccessibleComponent {
|
|
|
14
15
|
handleNavigationEvent(direction: string, event: KeyboardEvent | MouseEvent): number;
|
|
15
16
|
/**
|
|
16
17
|
* Method to handle events over an image, for instance a keypress with the Keyboard or a Mouse click.
|
|
17
|
-
* @param KeyboardEvent | MouseEvent
|
|
18
|
+
* @param event KeyboardEvent | MouseEvent payload
|
|
18
19
|
* @returns number 1 for NEXT and 0 for NOTHING
|
|
19
20
|
*/
|
|
20
21
|
handleImageEvent(event: KeyboardEvent | MouseEvent): number;
|
|
21
22
|
/**
|
|
22
23
|
* Private method to handle keyboard events over an image.
|
|
23
|
-
* @param KeyboardEvent
|
|
24
|
+
* @param event KeyboardEvent payload
|
|
24
25
|
* @returns number 1 for NEXT and 0 for NOTHING
|
|
25
26
|
*/
|
|
26
27
|
private handleImageKeyboardEvent;
|
|
@@ -44,4 +45,6 @@ export declare class AccessibleComponent {
|
|
|
44
45
|
* @returns number -1 for PREV, 1 for NEXT and 0 for NOTHING
|
|
45
46
|
*/
|
|
46
47
|
private handleMouseNavigationEvent;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AccessibleComponent, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AccessibleComponent, "ks-accessible", never, {}, {}, never, never>;
|
|
47
50
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { DomSanitizer, SafeStyle } from '@angular/platform-browser';
|
|
2
|
+
import { DomSanitizer, SafeResourceUrl, SafeStyle } from '@angular/platform-browser';
|
|
3
3
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
4
4
|
import { AccessibleComponent } from '../../accessible.component';
|
|
5
5
|
import { AccessibilityConfig } from '../../../model/accessibility.interface';
|
|
@@ -9,6 +9,7 @@ import { CarouselPreviewConfig } from '../../../model/carousel-preview-config.in
|
|
|
9
9
|
import { CarouselConfig } from '../../../model/carousel-config.interface';
|
|
10
10
|
import { Action } from '../../../model/action.enum';
|
|
11
11
|
import { ConfigService } from '../../../services/config.service';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
12
13
|
/**
|
|
13
14
|
* Component with image previews for carousel
|
|
14
15
|
*/
|
|
@@ -150,18 +151,11 @@ export declare class CarouselPreviewsComponent extends AccessibleComponent imple
|
|
|
150
151
|
/**
|
|
151
152
|
* Method used in template to sanitize an url when you need legacyIE11Mode.
|
|
152
153
|
* In this way you can set an url as background of a div.
|
|
153
|
-
* @param unsafeStyle is a string
|
|
154
|
-
* @param unsafeStyleFallback is a string
|
|
154
|
+
* @param unsafeStyle is a string or a SafeResourceUrl that represents the url to sanitize.
|
|
155
|
+
* @param unsafeStyleFallback is a string or a SafeResourceUrl that represents the fallback url to sanitize.
|
|
155
156
|
* @returns a SafeStyle object that can be used in template without problems.
|
|
156
157
|
*/
|
|
157
|
-
sanitizeUrlBgStyle(unsafeStyle: string, unsafeStyleFallback: string): SafeStyle;
|
|
158
|
-
/**
|
|
159
|
-
* Method to get the background-size value when IE11LegacyMode is enabled.
|
|
160
|
-
* This prevent weired behaviour on IE11 when previews are really small, but original images (.png/.jgp/...) are big.
|
|
161
|
-
* Using 'cover' it's not enough, because it's causing empty background in some cases.
|
|
162
|
-
* After some experiments, I decided to use the double of the height and auto as width.
|
|
163
|
-
*/
|
|
164
|
-
getIE11LegacyBgSize(): string;
|
|
158
|
+
sanitizeUrlBgStyle(unsafeStyle: string | SafeResourceUrl, unsafeStyleFallback: string | SafeResourceUrl): SafeStyle;
|
|
165
159
|
/**
|
|
166
160
|
* Method to cleanup resources. In fact, it cleans breakpointSubscription.
|
|
167
161
|
* This is an Angular's lifecycle hook that is called when this component is destroyed.
|
|
@@ -196,4 +190,6 @@ export declare class CarouselPreviewsComponent extends AccessibleComponent imple
|
|
|
196
190
|
* @returns boolean if true block sliding, otherwise not
|
|
197
191
|
*/
|
|
198
192
|
private isPreventSliding;
|
|
193
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CarouselPreviewsComponent, never>;
|
|
194
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CarouselPreviewsComponent, "ks-carousel-previews", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; }, { "clickPreview": "clickPreview"; }, never, never>;
|
|
199
195
|
}
|
|
@@ -4,13 +4,12 @@ import { AccessibilityConfig } from '../../model/accessibility.interface';
|
|
|
4
4
|
import { Image, ImageEvent } from '../../model/image.class';
|
|
5
5
|
import { Action } from '../../model/action.enum';
|
|
6
6
|
import { DotsConfig } from '../../model/dots-config.interface';
|
|
7
|
-
import { PlayConfig } from '../../model/play-config.interface';
|
|
8
7
|
import { CarouselConfig } from '../../model/carousel-config.interface';
|
|
9
8
|
import { CarouselImageConfig } from '../../model/carousel-image-config.interface';
|
|
10
|
-
import { DomSanitizer, SafeStyle } from '@angular/platform-browser';
|
|
11
|
-
import { CarouselPreviewConfig } from '../../model/carousel-preview-config.interface';
|
|
12
9
|
import { ConfigService } from '../../services/config.service';
|
|
13
10
|
import { ModalGalleryService } from '../modal-gallery/modal-gallery.service';
|
|
11
|
+
import { CarouselLibConfig } from '../../model/lib-config.interface';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
14
13
|
/**
|
|
15
14
|
* Component with configurable inline/plain carousel.
|
|
16
15
|
*/
|
|
@@ -20,7 +19,6 @@ export declare class CarouselComponent extends AccessibleComponent implements On
|
|
|
20
19
|
private modalGalleryService;
|
|
21
20
|
private configService;
|
|
22
21
|
private ref;
|
|
23
|
-
private sanitizer;
|
|
24
22
|
/**
|
|
25
23
|
* Attribute to set ariaLabel of the host component
|
|
26
24
|
*/
|
|
@@ -36,47 +34,17 @@ export declare class CarouselComponent extends AccessibleComponent implements On
|
|
|
36
34
|
*/
|
|
37
35
|
images: Image[];
|
|
38
36
|
/**
|
|
39
|
-
*
|
|
40
|
-
* For instance, it contains parameters to change the style, how it navigates and so on.
|
|
41
|
-
*/
|
|
42
|
-
carouselConfig: CarouselConfig | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* Object of type `PlayConfig` to init CarouselComponent's features about auto-play.
|
|
45
|
-
* For instance, it contains parameters to enable/disable autoPlay, interval and so on.
|
|
46
|
-
*/
|
|
47
|
-
playConfig: PlayConfig | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Interface to configure current image in carousel.
|
|
50
|
-
* For instance you can change the description.
|
|
51
|
-
*/
|
|
52
|
-
carouselImageConfig: CarouselImageConfig | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* Object of type `CarouselPreviewConfig` to init PreviewsComponent's features.
|
|
55
|
-
* For instance, it contains a param to show/hide previews, change sizes and so on.
|
|
56
|
-
*/
|
|
57
|
-
previewConfig: CarouselPreviewConfig | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Object of type `DotsConfig` to init DotsComponent's features.
|
|
60
|
-
* For instance, it contains a param to show/hide this component.
|
|
61
|
-
*/
|
|
62
|
-
dotsConfig: DotsConfig | undefined;
|
|
63
|
-
/**
|
|
64
|
-
* boolean to enable/disable infinite sliding. Enabled by default.
|
|
65
|
-
*/
|
|
66
|
-
infinite: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* TODO add description
|
|
37
|
+
* CarouselLibConfig object to configure carousel.
|
|
69
38
|
*/
|
|
70
|
-
|
|
39
|
+
config: CarouselLibConfig | undefined;
|
|
71
40
|
/**
|
|
72
|
-
*
|
|
73
|
-
* For instance, it contains titles, alt texts, aria-labels and so on.
|
|
41
|
+
* Output to emit an event when an image is clicked.
|
|
74
42
|
*/
|
|
75
|
-
|
|
43
|
+
clickImage: EventEmitter<number>;
|
|
76
44
|
/**
|
|
77
|
-
* Output to emit an event when
|
|
45
|
+
* Output to emit an event when current image is changed.
|
|
78
46
|
*/
|
|
79
|
-
|
|
47
|
+
changeImage: EventEmitter<ImageEvent>;
|
|
80
48
|
/**
|
|
81
49
|
* Output to emit an event when the current image is the first one.
|
|
82
50
|
*/
|
|
@@ -86,29 +54,28 @@ export declare class CarouselComponent extends AccessibleComponent implements On
|
|
|
86
54
|
*/
|
|
87
55
|
lastImage: EventEmitter<ImageEvent>;
|
|
88
56
|
/**
|
|
89
|
-
* Object
|
|
90
|
-
|
|
91
|
-
configCarousel: CarouselConfig | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Object use in template
|
|
57
|
+
* Object of type `CarouselConfig` to init CarouselComponent's features.
|
|
58
|
+
* For instance, it contains parameters to change the style, how it navigates and so on.
|
|
94
59
|
*/
|
|
95
|
-
|
|
60
|
+
carouselConfig: CarouselConfig | undefined;
|
|
96
61
|
/**
|
|
97
|
-
* Object
|
|
62
|
+
* Object of type `DotsConfig` to init DotsComponent's features.
|
|
63
|
+
* For instance, it contains a param to show/hide this component.
|
|
98
64
|
*/
|
|
99
|
-
|
|
65
|
+
carouselDotsConfig: DotsConfig | undefined;
|
|
100
66
|
/**
|
|
101
|
-
* Object
|
|
67
|
+
* Object of type `AccessibilityConfig` to init custom accessibility features.
|
|
68
|
+
* For instance, it contains titles, alt texts, aria-labels and so on.
|
|
102
69
|
*/
|
|
103
|
-
|
|
70
|
+
accessibilityConfig: AccessibilityConfig | undefined;
|
|
104
71
|
/**
|
|
105
|
-
* Object
|
|
72
|
+
* Object of type `CarouselImageConfig` to configure the current image of the carousel.
|
|
106
73
|
*/
|
|
107
|
-
|
|
74
|
+
carouselImageConfig: CarouselImageConfig | undefined;
|
|
108
75
|
/**
|
|
109
|
-
*
|
|
76
|
+
* Enable/disable infinite sliding.
|
|
110
77
|
*/
|
|
111
|
-
|
|
78
|
+
carouselSlideInfinite: boolean | undefined;
|
|
112
79
|
/**
|
|
113
80
|
* Enum of type `Action` that represents a mouse click on a button.
|
|
114
81
|
* Declared here to be used inside the template.
|
|
@@ -161,18 +128,10 @@ export declare class CarouselComponent extends AccessibleComponent implements On
|
|
|
161
128
|
* Listener to navigate carousel images with keyboard (right).
|
|
162
129
|
*/
|
|
163
130
|
onKeyDownLRight(): void;
|
|
164
|
-
constructor(platformId: any, ngZone: NgZone, modalGalleryService: ModalGalleryService, configService: ConfigService, ref: ChangeDetectorRef
|
|
165
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
131
|
+
constructor(platformId: any, ngZone: NgZone, modalGalleryService: ModalGalleryService, configService: ConfigService, ref: ChangeDetectorRef);
|
|
166
132
|
ngOnInit(): void;
|
|
133
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
167
134
|
ngAfterContentInit(): void;
|
|
168
|
-
/**
|
|
169
|
-
* Method used in template to sanitize an url when you need legacyIE11Mode.
|
|
170
|
-
* In this way you can set an url as background of a div.
|
|
171
|
-
* @param unsafeStyle is a string and represents the url to sanitize.
|
|
172
|
-
* @param unsafeStyleFallback is a string and represents the fallback url to sanitize.
|
|
173
|
-
* @returns a SafeStyle object that can be used in template without problems.
|
|
174
|
-
*/
|
|
175
|
-
sanitizeUrlBgStyle(unsafeStyle: string, unsafeStyleFallback: string): SafeStyle;
|
|
176
135
|
/**
|
|
177
136
|
* Method called when a dot is clicked and used to update the current image.
|
|
178
137
|
* @param number index of the clicked dot
|
|
@@ -184,7 +143,7 @@ export declare class CarouselComponent extends AccessibleComponent implements On
|
|
|
184
143
|
* @param KeyboardEvent | MouseEvent event payload
|
|
185
144
|
* @param Action action that triggered the event or `Action.NORMAL` if not provided
|
|
186
145
|
*/
|
|
187
|
-
onNavigationEvent(direction: string, event: KeyboardEvent, action?: Action): void;
|
|
146
|
+
onNavigationEvent(direction: string, event: KeyboardEvent | MouseEvent, action?: Action): void;
|
|
188
147
|
/**
|
|
189
148
|
* Method triggered when you click on the current image.
|
|
190
149
|
* Also, if modalGalleryEnable is true, you can open the modal-gallery.
|
|
@@ -307,12 +266,14 @@ export declare class CarouselComponent extends AccessibleComponent implements On
|
|
|
307
266
|
private emitBoundaryEvent;
|
|
308
267
|
/**
|
|
309
268
|
* Private method to check if next/prev actions should be blocked.
|
|
310
|
-
* It checks if
|
|
269
|
+
* It checks if carouselSlideInfinite === false and if the image index is equals to the input parameter.
|
|
311
270
|
* If yes, it returns true to say that sliding should be blocked, otherwise not.
|
|
312
271
|
* @param number boundaryIndex that could be either the beginning index (0) or the last index
|
|
313
272
|
* of images (this.images.length - 1).
|
|
314
|
-
* @returns boolean true if
|
|
273
|
+
* @returns boolean true if carouselSlideInfinite === false and the current index is
|
|
315
274
|
* either the first or the last one.
|
|
316
275
|
*/
|
|
317
276
|
private isPreventSliding;
|
|
277
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CarouselComponent, never>;
|
|
278
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CarouselComponent, "ks-carousel", never, { "id": "id"; "images": "images"; "config": "config"; }, { "clickImage": "clickImage"; "changeImage": "changeImage"; "firstImage": "firstImage"; "lastImage": "lastImage"; }, never, ["*"]>;
|
|
318
279
|
}
|
|
@@ -8,6 +8,7 @@ import { KeyboardConfig } from '../../model/keyboard-config.interface';
|
|
|
8
8
|
import { SlideConfig } from '../../model/slide-config.interface';
|
|
9
9
|
import { CurrentImageConfig } from '../../model/current-image-config.interface';
|
|
10
10
|
import { ConfigService } from '../../services/config.service';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
11
12
|
/**
|
|
12
13
|
* Interface to describe the Load Event, used to
|
|
13
14
|
* emit an event when the image is finally loaded and the spinner has gone.
|
|
@@ -23,7 +24,7 @@ export interface ImageLoadEvent {
|
|
|
23
24
|
export declare class CurrentImageComponent extends AccessibleComponent implements OnInit, OnChanges, AfterContentInit, OnDestroy {
|
|
24
25
|
private platformId;
|
|
25
26
|
private ngZone;
|
|
26
|
-
|
|
27
|
+
ref: ChangeDetectorRef;
|
|
27
28
|
private configService;
|
|
28
29
|
/**
|
|
29
30
|
* Unique id (>=0) of the current instance of this library. This is useful when you are using
|
|
@@ -138,13 +139,16 @@ export declare class CurrentImageComponent extends AccessibleComponent implement
|
|
|
138
139
|
* In particular, it's called when any data-bound property of a directive changes!!!
|
|
139
140
|
*/
|
|
140
141
|
ngOnChanges(changes: SimpleChanges): void;
|
|
142
|
+
/**
|
|
143
|
+
* This is an Angular's lifecycle hook, so its called automatically by Angular itself.
|
|
144
|
+
*/
|
|
141
145
|
ngAfterContentInit(): void;
|
|
142
146
|
/**
|
|
143
|
-
* Method to handle keypress based on the `keyboardConfig` input. It gets the
|
|
147
|
+
* Method to handle keypress based on the `keyboardConfig` input. It gets the code of
|
|
144
148
|
* the key that triggered the keypress event to navigate between images or to close the modal gallery.
|
|
145
|
-
* @param
|
|
149
|
+
* @param code string of the key that triggered the keypress event
|
|
146
150
|
*/
|
|
147
|
-
onKeyPress(
|
|
151
|
+
onKeyPress(code: string): void;
|
|
148
152
|
/**
|
|
149
153
|
* Method to get the image description based on input params.
|
|
150
154
|
* If you provide a full description this will be the visible description, otherwise,
|
|
@@ -277,4 +281,6 @@ export declare class CurrentImageComponent extends AccessibleComponent implement
|
|
|
277
281
|
* Private method to call handleBoundaries when ngOnChanges is called.
|
|
278
282
|
*/
|
|
279
283
|
private updateIndexes;
|
|
284
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CurrentImageComponent, never>;
|
|
285
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CurrentImageComponent, "ks-current-image", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; "isOpen": "isOpen"; }, { "loadImage": "loadImage"; "changeImage": "changeImage"; "closeGallery": "closeGallery"; }, never, never>;
|
|
280
286
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AccessibilityConfig } from '../../../model/accessibility.interface';
|
|
2
2
|
import { LoadingConfig, LoadingType } from '../../../model/loading-config.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* Component with the loading spinner
|
|
5
6
|
*/
|
|
@@ -49,4 +50,6 @@ export declare class LoadingSpinnerComponent {
|
|
|
49
50
|
* Declared here to be used inside the template.
|
|
50
51
|
*/
|
|
51
52
|
loadingExplosingSquares: LoadingType;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingSpinnerComponent, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingSpinnerComponent, "ks-loading-spinner", never, { "loadingConfig": "loadingConfig"; "accessibilityConfig": "accessibilityConfig"; }, {}, never, never>;
|
|
52
55
|
}
|
|
@@ -5,11 +5,16 @@ import { Image } from '../../model/image.class';
|
|
|
5
5
|
import { InternalLibImage } from '../../model/image-internal.class';
|
|
6
6
|
import { DotsConfig } from '../../model/dots-config.interface';
|
|
7
7
|
import { ConfigService } from '../../services/config.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* Component with clickable dots (small circles) to navigate between images inside the modal gallery.
|
|
10
11
|
*/
|
|
11
12
|
export declare class DotsComponent extends AccessibleComponent implements OnInit, OnChanges {
|
|
12
13
|
private configService;
|
|
14
|
+
/**
|
|
15
|
+
* Unique id (>=0) of the current instance of this library. This is required when you are using
|
|
16
|
+
* the service to call modal gallery.
|
|
17
|
+
*/
|
|
13
18
|
id: number | undefined;
|
|
14
19
|
/**
|
|
15
20
|
* Object of type `InternalLibImage` that represent the visible image.
|
|
@@ -71,4 +76,6 @@ export declare class DotsComponent extends AccessibleComponent implements OnInit
|
|
|
71
76
|
* @returns number the id of the item
|
|
72
77
|
*/
|
|
73
78
|
trackById(index: number, item: Image): number;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DotsComponent, never>;
|
|
80
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DotsComponent, "ks-dots", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; "dotsConfig": "dotsConfig"; }, { "clickDot": "clickDot"; }, never, never>;
|
|
74
81
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
2
2
|
import { ImageModalEvent } from '../../model/image.class';
|
|
3
3
|
import { ButtonEvent } from '../../model/buttons-config.interface';
|
|
4
|
+
/**
|
|
5
|
+
* Class that represents the modal dialog instance.
|
|
6
|
+
* It is returned by the open method.
|
|
7
|
+
*/
|
|
4
8
|
export declare class ModalGalleryRef {
|
|
5
9
|
private overlayRef;
|
|
6
10
|
private close;
|
|
@@ -18,12 +22,43 @@ export declare class ModalGalleryRef {
|
|
|
18
22
|
private buttonAfterHook;
|
|
19
23
|
buttonAfterHook$: import("rxjs").Observable<ButtonEvent>;
|
|
20
24
|
constructor(overlayRef: OverlayRef);
|
|
25
|
+
/**
|
|
26
|
+
* Close modal dialog, disposing the Overlay.
|
|
27
|
+
*/
|
|
21
28
|
closeModal(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Method to emit close event.
|
|
31
|
+
* @param event ImageModalEvent event payload
|
|
32
|
+
*/
|
|
22
33
|
emitClose(event: ImageModalEvent): void;
|
|
34
|
+
/**
|
|
35
|
+
* Method to emit show event.
|
|
36
|
+
* @param event ImageModalEvent event payload
|
|
37
|
+
*/
|
|
23
38
|
emitShow(event: ImageModalEvent): void;
|
|
39
|
+
/**
|
|
40
|
+
* Method to emit firstImage event.
|
|
41
|
+
* @param event ImageModalEvent event payload
|
|
42
|
+
*/
|
|
24
43
|
emitFirstImage(event: ImageModalEvent): void;
|
|
44
|
+
/**
|
|
45
|
+
* Method to emit lastImage event.
|
|
46
|
+
* @param event ImageModalEvent event payload
|
|
47
|
+
*/
|
|
25
48
|
emitLastImage(event: ImageModalEvent): void;
|
|
49
|
+
/**
|
|
50
|
+
* Method to emit hasData event.
|
|
51
|
+
* @param event ImageModalEvent event payload
|
|
52
|
+
*/
|
|
26
53
|
emitHasData(event: ImageModalEvent): void;
|
|
54
|
+
/**
|
|
55
|
+
* Method to emit buttonBeforeHook event.
|
|
56
|
+
* @param event ImageModalEvent event payload
|
|
57
|
+
*/
|
|
27
58
|
emitButtonBeforeHook(event: ButtonEvent): void;
|
|
59
|
+
/**
|
|
60
|
+
* Method to emit buttonAfterHook event.
|
|
61
|
+
* @param event ImageModalEvent event payload
|
|
62
|
+
*/
|
|
28
63
|
emitButtonAfterHook(event: ButtonEvent): void;
|
|
29
64
|
}
|
|
@@ -17,6 +17,7 @@ import { PlainGalleryConfig } from '../../model/plain-gallery-config.interface';
|
|
|
17
17
|
import { ModalGalleryService } from './modal-gallery.service';
|
|
18
18
|
import { LibConfig } from '../../model/lib-config.interface';
|
|
19
19
|
import { ModalGalleryConfig } from '../../model/modal-gallery-config.interface';
|
|
20
|
+
import * as i0 from "@angular/core";
|
|
20
21
|
export declare class ModalGalleryComponent implements OnInit, OnDestroy {
|
|
21
22
|
private dialogContent;
|
|
22
23
|
private modalGalleryService;
|
|
@@ -84,7 +85,7 @@ export declare class ModalGalleryComponent implements OnInit, OnDestroy {
|
|
|
84
85
|
*/
|
|
85
86
|
showGallery: boolean;
|
|
86
87
|
/**
|
|
87
|
-
*
|
|
88
|
+
* Object to configure this component.
|
|
88
89
|
*/
|
|
89
90
|
libConfig: LibConfig | undefined;
|
|
90
91
|
private updateImagesSubscription;
|
|
@@ -103,138 +104,145 @@ export declare class ModalGalleryComponent implements OnInit, OnDestroy {
|
|
|
103
104
|
ngOnInit(): void;
|
|
104
105
|
/**
|
|
105
106
|
* Method called by custom upper buttons.
|
|
106
|
-
* @param event ButtonEvent payload
|
|
107
|
+
* @param event ButtonEvent event payload
|
|
107
108
|
*/
|
|
108
109
|
onCustomEmit(event: ButtonEvent): void;
|
|
109
110
|
/**
|
|
110
111
|
* Method called by the full-screen upper button.
|
|
111
|
-
* @param ButtonEvent event payload
|
|
112
|
+
* @param event ButtonEvent event payload
|
|
112
113
|
*/
|
|
113
114
|
onFullScreen(event: ButtonEvent): void;
|
|
114
115
|
/**
|
|
115
116
|
* Method called by the delete upper button.
|
|
116
|
-
* @param ButtonEvent event payload
|
|
117
|
+
* @param event ButtonEvent event payload
|
|
117
118
|
*/
|
|
118
119
|
onDelete(event: ButtonEvent): void;
|
|
119
120
|
/**
|
|
120
121
|
* Method called by the navigate upper button.
|
|
121
|
-
* @param ButtonEvent event payload
|
|
122
|
+
* @param event ButtonEvent event payload
|
|
122
123
|
*/
|
|
123
124
|
onNavigate(event: ButtonEvent): void;
|
|
125
|
+
/**
|
|
126
|
+
* This method is defined to be spied and replaced in unit testing with a fake method call.
|
|
127
|
+
* It must be public to be able to use jasmine spyOn method.
|
|
128
|
+
* @param newHref string new url
|
|
129
|
+
*/
|
|
130
|
+
updateLocationHref(newHref: string): void;
|
|
124
131
|
/**
|
|
125
132
|
* Method called by the download upper button.
|
|
126
|
-
* @param ButtonEvent event payload
|
|
133
|
+
* @param event ButtonEvent event payload
|
|
127
134
|
*/
|
|
128
135
|
onDownload(event: ButtonEvent): void;
|
|
129
136
|
/**
|
|
130
137
|
* Method called by the close upper button.
|
|
131
|
-
* @param ButtonEvent event payload
|
|
132
|
-
* @param Action
|
|
138
|
+
* @param event ButtonEvent event payload
|
|
139
|
+
* @param action Action that triggered the close method. `Action.NORMAL` by default
|
|
133
140
|
*/
|
|
134
|
-
|
|
141
|
+
onCloseGalleryButton(event: ButtonEvent, action?: Action): void;
|
|
135
142
|
/**
|
|
136
|
-
* Method
|
|
137
|
-
*
|
|
138
|
-
* @param Action
|
|
139
|
-
* @param boolean isCalledByService is true if called by gallery.service, otherwise false
|
|
143
|
+
* Method called by CurrentImageComponent and triggered via KeyboardService.
|
|
144
|
+
* @param event ImageModalEvent event payload
|
|
145
|
+
* @param action Action that triggered the close method. `Action.NORMAL` by default
|
|
140
146
|
*/
|
|
141
|
-
|
|
147
|
+
onCloseGallery(event: ImageModalEvent, action?: Action): void;
|
|
142
148
|
/**
|
|
143
|
-
* Method to
|
|
144
|
-
* the
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* will be destroyed or when the gallery is closed invoking the `closeGallery` method.
|
|
148
|
-
* @param number index of the image to show
|
|
149
|
+
* Method to close the modal gallery specifying the action.
|
|
150
|
+
* It also reset the `keyboardService` to prevent multiple listeners.
|
|
151
|
+
* @param action Action action type. `Action.NORMAL` by default
|
|
152
|
+
* @param clickOutside boolean that is true if called clicking on the modal background. False by default.
|
|
149
153
|
*/
|
|
150
|
-
|
|
154
|
+
closeGallery(action?: Action, clickOutside?: boolean): void;
|
|
151
155
|
/**
|
|
152
156
|
* Method called when the image changes and used to update the `currentImage` object.
|
|
153
|
-
* @param ImageModalEvent event payload
|
|
157
|
+
* @param event ImageModalEvent event payload
|
|
154
158
|
*/
|
|
155
159
|
onChangeCurrentImage(event: ImageModalEvent): void;
|
|
156
160
|
/**
|
|
157
161
|
* Method called when you click 'outside' (i.e. on the semi-transparent background)
|
|
158
162
|
* to close the modal gallery if `enableCloseOutside` is true.
|
|
159
|
-
* @param boolean
|
|
163
|
+
* @param event boolean that is true to close the modal gallery, false otherwise
|
|
160
164
|
*/
|
|
161
165
|
onClickOutside(event: boolean): void;
|
|
162
166
|
/**
|
|
163
167
|
* Method called when an image is loaded and the loading spinner has gone.
|
|
164
168
|
* It sets the previouslyLoaded flag inside the Image to hide loading spinner when displayed again.
|
|
165
|
-
* @param ImageLoadEvent event payload
|
|
169
|
+
* @param event ImageLoadEvent event payload
|
|
166
170
|
*/
|
|
167
171
|
onImageLoad(event: ImageLoadEvent): void;
|
|
168
172
|
/**
|
|
169
173
|
* Method called when a dot is clicked and used to update the current image.
|
|
170
|
-
* @param number index of the clicked dot
|
|
174
|
+
* @param index number index of the clicked dot
|
|
171
175
|
*/
|
|
172
176
|
onClickDot(index: number): void;
|
|
173
177
|
/**
|
|
174
178
|
* Method called when an image preview is clicked and used to update the current image.
|
|
175
|
-
* @param
|
|
179
|
+
* @param event ImageModalEvent preview image
|
|
176
180
|
*/
|
|
177
181
|
onClickPreview(event: ImageModalEvent): void;
|
|
178
|
-
/**
|
|
179
|
-
* Method to download the current image, only if `downloadable` is true.
|
|
180
|
-
* It contains also a logic to enable downloading features also for IE11.
|
|
181
|
-
*/
|
|
182
|
-
downloadImage(): void;
|
|
183
182
|
/**
|
|
184
183
|
* Method to cleanup resources. In fact, this will reset keyboard's service.
|
|
185
184
|
* This is an Angular's lifecycle hook that is called when this component is destroyed.
|
|
186
185
|
*/
|
|
187
186
|
ngOnDestroy(): void;
|
|
187
|
+
/**
|
|
188
|
+
* Method to show the modal gallery displaying the currentImage.
|
|
189
|
+
* It will also register a new `keyboardService` to catch keyboard's events to download the current
|
|
190
|
+
* image with keyboard's shortcuts. This service, will be removed either when modal gallery component
|
|
191
|
+
* will be destroyed or when the gallery is closed invoking the `closeGallery` method.
|
|
192
|
+
* @private
|
|
193
|
+
*/
|
|
194
|
+
private registerKeyboardService;
|
|
195
|
+
/**
|
|
196
|
+
* Method to download the current image, only if `downloadable` is true.
|
|
197
|
+
* @private
|
|
198
|
+
*/
|
|
199
|
+
private downloadImage;
|
|
188
200
|
/**
|
|
189
201
|
* Method to convert a base64 to a Blob
|
|
190
202
|
* @param base64Data string with base64 data
|
|
191
203
|
* @param contentType string with the MIME type
|
|
204
|
+
* @return Blob converted from the input base64Data
|
|
205
|
+
* @private
|
|
192
206
|
*/
|
|
193
207
|
private base64toBlob;
|
|
194
208
|
/**
|
|
195
|
-
* Private method to download the current image for all browsers
|
|
209
|
+
* Private method to download the current image for all browsers.
|
|
210
|
+
* @private
|
|
196
211
|
*/
|
|
197
212
|
private downloadImageAllBrowsers;
|
|
198
|
-
/**
|
|
199
|
-
* Private method to download the current image only for IE11 using
|
|
200
|
-
* custom javascript's methods available only on IE.
|
|
201
|
-
*/
|
|
202
|
-
private downloadImageOnlyIEorEdge;
|
|
203
213
|
/**
|
|
204
214
|
* Private method to get the `ButtonEvent` to emit, merging the input `ButtonEvent`
|
|
205
215
|
* with the current image.
|
|
206
|
-
* @param ButtonEvent event payload to return
|
|
216
|
+
* @param event ButtonEvent event payload to return
|
|
207
217
|
* @returns ButtonEvent event payload with the current image included
|
|
218
|
+
* @private
|
|
208
219
|
*/
|
|
209
220
|
private getButtonEventToEmit;
|
|
210
221
|
/**
|
|
211
222
|
* Private method to get the file name from an input path.
|
|
212
223
|
* This is used either to get the image's name from its path or from the Image itself,
|
|
213
224
|
* if specified as 'downloadFileName' by the user.
|
|
214
|
-
* @param Image image to extract its file name
|
|
225
|
+
* @param image Image image to extract its file name
|
|
215
226
|
* @param isBase64 boolean to set if the image is a base64 file or not. False by default.
|
|
216
227
|
* @param base64Extension string to force the extension of the base64 image. Empty string by default.
|
|
217
228
|
* @returns string string file name of the input image.
|
|
229
|
+
* @private
|
|
218
230
|
*/
|
|
219
231
|
private getFileName;
|
|
220
232
|
/**
|
|
221
233
|
* Private method to initialize `images` as array of `Image`s.
|
|
222
|
-
* Also, it will emit
|
|
234
|
+
* Also, it will emit ImageModalEvent to say that images are loaded.
|
|
235
|
+
* @private
|
|
223
236
|
*/
|
|
224
237
|
private initImages;
|
|
225
238
|
/**
|
|
226
239
|
* Private method to emit events when either the last or the first image are visible.
|
|
227
|
-
* @param action Enum of type Action that represents the source of the event that changed the
|
|
240
|
+
* @param action Action Enum of type Action that represents the source of the event that changed the
|
|
228
241
|
* current image to the first one or the last one.
|
|
229
|
-
* @param indexToCheck is the index number of the image (the first or the last one).
|
|
242
|
+
* @param indexToCheck number is the index number of the image (the first or the last one).
|
|
243
|
+
* @private
|
|
230
244
|
*/
|
|
231
245
|
private emitBoundaryEvent;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
* Microsoft browsers or not (i.e. it detects both IE11 and Edge)
|
|
235
|
-
* supporting also Server-Side Rendering.
|
|
236
|
-
* Inspired by https://msdn.microsoft.com/it-it/library/hh779016(v=vs.85).aspx
|
|
237
|
-
* @returns any the result
|
|
238
|
-
*/
|
|
239
|
-
private isIEorEdge;
|
|
246
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalGalleryComponent, never>;
|
|
247
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalGalleryComponent, "ks-modal-gallery", never, {}, {}, never, never>;
|
|
240
248
|
}
|