@ks89/angular-modal-gallery 13.0.0 → 14.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/CONTRIBUTING.md +3 -3
  3. package/LICENSE +1 -1
  4. package/README.md +8 -6
  5. package/fesm2022/ks89-angular-modal-gallery.mjs +833 -922
  6. package/fesm2022/ks89-angular-modal-gallery.mjs.map +1 -1
  7. package/index.d.ts +2528 -3
  8. package/package.json +8 -8
  9. package/lib/components/accessibility-default.d.ts +0 -5
  10. package/lib/components/accessible.component.d.ts +0 -50
  11. package/lib/components/carousel/carousel-previews/carousel-previews.component.d.ts +0 -195
  12. package/lib/components/carousel/carousel.component.d.ts +0 -276
  13. package/lib/components/components.d.ts +0 -15
  14. package/lib/components/current-image/current-image.component.d.ts +0 -282
  15. package/lib/components/current-image/loading-spinner/loading-spinner.component.d.ts +0 -55
  16. package/lib/components/dots/dots.component.d.ts +0 -81
  17. package/lib/components/modal-gallery/attach-to-overlay.service.d.ts +0 -20
  18. package/lib/components/modal-gallery/modal-gallery-ref.d.ts +0 -64
  19. package/lib/components/modal-gallery/modal-gallery.component.d.ts +0 -246
  20. package/lib/components/modal-gallery/modal-gallery.service.d.ts +0 -100
  21. package/lib/components/modal-gallery/modal-gallery.tokens.d.ts +0 -3
  22. package/lib/components/plain-gallery/plain-gallery.component.d.ts +0 -135
  23. package/lib/components/previews/previews.component.d.ts +0 -155
  24. package/lib/components/upper-buttons/upper-buttons-default.d.ts +0 -29
  25. package/lib/components/upper-buttons/upper-buttons.component.d.ts +0 -132
  26. package/lib/directives/a-tag-bg-image.directive.d.ts +0 -38
  27. package/lib/directives/click-outside.directive.d.ts +0 -24
  28. package/lib/directives/description.directive.d.ts +0 -33
  29. package/lib/directives/direction.directive.d.ts +0 -36
  30. package/lib/directives/directives.d.ts +0 -15
  31. package/lib/directives/fallback-image.directive.d.ts +0 -16
  32. package/lib/directives/keyboard-navigation.directive.d.ts +0 -24
  33. package/lib/directives/margin.directive.d.ts +0 -44
  34. package/lib/directives/max-size.directive.d.ts +0 -33
  35. package/lib/directives/size.directive.d.ts +0 -33
  36. package/lib/directives/swipe.directive.d.ts +0 -35
  37. package/lib/directives/wrap.directive.d.ts +0 -36
  38. package/lib/modal-gallery.module.d.ts +0 -32
  39. package/lib/model/accessibility.interface.d.ts +0 -40
  40. package/lib/model/action.enum.d.ts +0 -11
  41. package/lib/model/buttons-config.interface.d.ts +0 -57
  42. package/lib/model/carousel-config.interface.d.ts +0 -11
  43. package/lib/model/carousel-image-config.interface.d.ts +0 -8
  44. package/lib/model/carousel-preview-config.interface.d.ts +0 -22
  45. package/lib/model/current-image-config.interface.d.ts +0 -12
  46. package/lib/model/description.interface.d.ts +0 -39
  47. package/lib/model/dots-config.interface.d.ts +0 -6
  48. package/lib/model/image-internal.class.d.ts +0 -9
  49. package/lib/model/image.class.d.ts +0 -64
  50. package/lib/model/interaction-event.interface.d.ts +0 -6
  51. package/lib/model/keyboard-config.interface.d.ts +0 -8
  52. package/lib/model/keyboard.enum.d.ts +0 -13
  53. package/lib/model/lib-config.interface.d.ts +0 -39
  54. package/lib/model/loading-config.interface.d.ts +0 -19
  55. package/lib/model/max-size.interface.d.ts +0 -8
  56. package/lib/model/modal-gallery-config.interface.d.ts +0 -16
  57. package/lib/model/plain-gallery-config.interface.d.ts +0 -57
  58. package/lib/model/play-config.interface.d.ts +0 -8
  59. package/lib/model/preview-config.interface.d.ts +0 -12
  60. package/lib/model/size.interface.d.ts +0 -8
  61. package/lib/model/slide-config.interface.d.ts +0 -17
  62. package/lib/services/config.service.d.ts +0 -39
  63. package/lib/services/id-validator.service.d.ts +0 -25
  64. package/lib/utils/image.util.d.ts +0 -10
  65. package/lib/utils/user-input.util.d.ts +0 -80
  66. package/public-api.d.ts +0 -36
@@ -1,132 +0,0 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { AccessibleComponent } from '../accessible.component';
3
- import { Action } from '../../model/action.enum';
4
- import { Image } from '../../model/image.class';
5
- import { ButtonConfig, ButtonEvent, ButtonsConfig } from '../../model/buttons-config.interface';
6
- import { ConfigService } from '../../services/config.service';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * Internal representation of `ButtonConfig` with an optional `id` field, used by trackId to improve performances.
10
- */
11
- export interface InternalButtonConfig extends ButtonConfig {
12
- id?: number;
13
- }
14
- /**
15
- * Component with all upper buttons.
16
- * Also it emits click events as outputs.
17
- */
18
- export declare class UpperButtonsComponent extends AccessibleComponent implements OnInit {
19
- private configService;
20
- /**
21
- * Unique id (>=0) of the current instance of this library. This is required when you are using
22
- * the service to call modal gallery.
23
- */
24
- id: number;
25
- /**
26
- * Object of type `Image` that represent the visible image.
27
- */
28
- currentImage: Image;
29
- /**
30
- * Output to emit clicks on refresh button. The payload contains a `ButtonEvent`.
31
- */
32
- refresh: EventEmitter<ButtonEvent>;
33
- /**
34
- * Output to emit clicks on delete button. The payload contains a `ButtonEvent`.
35
- */
36
- delete: EventEmitter<ButtonEvent>;
37
- /**
38
- * Output to emit clicks on navigate button. The payload contains a `ButtonEvent`.
39
- */
40
- navigate: EventEmitter<ButtonEvent>;
41
- /**
42
- * Output to emit clicks on download button. The payload contains a `ButtonEvent`.
43
- */
44
- download: EventEmitter<ButtonEvent>;
45
- /**
46
- * Output to emit clicks on close button. The payload contains a `ButtonEvent`.
47
- */
48
- closeButton: EventEmitter<ButtonEvent>;
49
- /**
50
- * Output to emit clicks on full-screen button. The payload contains a `ButtonEvent`.
51
- */
52
- fullscreen: EventEmitter<ButtonEvent>;
53
- /**
54
- * Output to emit clicks on all custom buttons. The payload contains a `ButtonEvent`.
55
- */
56
- customEmit: EventEmitter<ButtonEvent>;
57
- /**
58
- * Object of type `ButtonsConfig` to init UpperButtonsComponent's features.
59
- * For instance, it contains an array of buttons.
60
- */
61
- buttonsConfig: ButtonsConfig | undefined;
62
- /**
63
- * Array of `InternalButtonConfig` exposed to the template. This field is initialized
64
- * applying transformations, default values and so on to the input of the same type.
65
- */
66
- buttons: InternalButtonConfig[] | undefined;
67
- /**
68
- * Default buttons array for standard configuration
69
- */
70
- private defaultButtonsDefault;
71
- /**
72
- * Default buttons array for simple configuration
73
- */
74
- private simpleButtonsDefault;
75
- /**
76
- * Default buttons array for advanced configuration
77
- */
78
- private advancedButtonsDefault;
79
- /**
80
- * Default buttons array for full configuration
81
- */
82
- private fullButtonsDefault;
83
- constructor(configService: ConfigService);
84
- /**
85
- * Method ´ngOnInit´ to build `configButtons` applying a default value and also to
86
- * init the `buttons` array.
87
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
88
- * In particular, it's called only one time!!!
89
- */
90
- ngOnInit(): void;
91
- /**
92
- * Method called by events from both keyboard and mouse on a button.
93
- * This will call a private method to trigger an output with the right payload.
94
- * @param InternalButtonConfig button that called this method
95
- * @param KeyboardEvent | MouseEvent event payload
96
- * @param Action action that triggered the source event or `Action.CLICK` if not specified
97
- * @throws an error if the button type is unknown
98
- */
99
- onEvent(button: InternalButtonConfig, event: KeyboardEvent | MouseEvent, action?: Action): void;
100
- /**
101
- * Method used in the template to track ids in ngFor.
102
- * @param number index of the array
103
- * @param Image item of the array
104
- * @returns number the id of the item or undefined if the item is not valid
105
- */
106
- trackById(index: number, item: InternalButtonConfig): number | undefined;
107
- /**
108
- * Private method to emit an event using the specified output as an `EventEmitter`.
109
- * @param EventEmitter<ButtonEvent> emitter is the output to emit the `ButtonEvent`
110
- * @param KeyboardEvent | MouseEvent event is the source that triggered this method
111
- * @param ButtonEvent dataToEmit payload to emit
112
- */
113
- private triggerOnMouseAndKeyboard;
114
- /**
115
- * Private method to add ids to the array of buttons.
116
- * It adds ids in a reverse way, to be sure that the last button will always have id = 0.
117
- * This is really useful in unit testing to be sure that close button always have id = 0, download 1 and so on...
118
- * It's totally transparent to the user.
119
- * @param ButtonConfig[] buttons config array
120
- * @returns ButtonConfig[] the input array with incremental numeric ids
121
- */
122
- private addButtonIds;
123
- /**
124
- * Private method to validate custom buttons received as input.
125
- * @param ButtonConfig[] buttons config array. [] by default.
126
- * @returns ButtonConfig[] the same input buttons config array
127
- * @throws an error is exists a button with an unknown type
128
- */
129
- private validateCustomButtons;
130
- static ɵfac: i0.ɵɵFactoryDeclaration<UpperButtonsComponent, never>;
131
- static ɵcmp: i0.ɵɵComponentDeclaration<UpperButtonsComponent, "ks-upper-buttons", never, { "id": { "alias": "id"; "required": false; }; "currentImage": { "alias": "currentImage"; "required": false; }; }, { "refresh": "refresh"; "delete": "delete"; "navigate": "navigate"; "download": "download"; "closeButton": "closeButton"; "fullscreen": "fullscreen"; "customEmit": "customEmit"; }, never, never, false, never>;
132
- }
@@ -1,38 +0,0 @@
1
- import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core';
2
- import { Image } from '../model/image.class';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive to add an image to an `<a>` tag with some additional custom properties.
6
- */
7
- export declare class ATagBgImageDirective implements OnInit, OnChanges {
8
- private renderer;
9
- private el;
10
- /**
11
- * Object of type `Image` that represents the image to add to the `<a>` tag.
12
- */
13
- image: Image | undefined;
14
- /**
15
- * Additional style to customize the background attribute.
16
- * Empty string by default.
17
- */
18
- style: string | undefined;
19
- constructor(renderer: Renderer2, el: ElementRef);
20
- /**
21
- * Method ´ngOnInit´ to apply the style of this directive.
22
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
23
- * In particular, it's called only one time!!!
24
- */
25
- ngOnInit(): void;
26
- /**
27
- * Method ´ngOnChanges´ to apply the style of this directive.
28
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
29
- * In particular, it's called when any data-bound property of a directive changes!!!
30
- */
31
- ngOnChanges(): void;
32
- /**
33
- * Private method to add an image as background of an `<a>` tag.
34
- */
35
- private applyStyle;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<ATagBgImageDirective, never>;
37
- static ɵdir: i0.ɵɵDirectiveDeclaration<ATagBgImageDirective, "[ksATagBgImage]", never, { "image": { "alias": "image"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, {}, never, never, false, never>;
38
- }
@@ -1,24 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Directive to close the modal gallery clicking on the semi-transparent background.
5
- * In fact, it listens for a click on all elements that aren't 'inside' and it emits
6
- * an event using `@Output clickOutside`.
7
- */
8
- export declare class ClickOutsideDirective {
9
- /**
10
- * Boolean to enable this directive.
11
- */
12
- clickOutsideEnable: boolean | undefined;
13
- /**
14
- * Output to emit an event if the clicked element class doesn't contain 'inside' or it is 'hidden'. The payload is a boolean.
15
- */
16
- clickOutside: EventEmitter<boolean>;
17
- /**
18
- * Method called by Angular itself every click thanks to `@HostListener`.
19
- * @param event MouseEvent
20
- */
21
- onClick(event: MouseEvent): void;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<ClickOutsideDirective, never>;
23
- static ɵdir: i0.ɵɵDirectiveDeclaration<ClickOutsideDirective, "[ksClickOutside]", never, { "clickOutsideEnable": { "alias": "clickOutsideEnable"; "required": false; }; }, { "clickOutside": "clickOutside"; }, never, never, false, never>;
24
- }
@@ -1,33 +0,0 @@
1
- import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core';
2
- import { Description } from '../model/description.interface';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive to customize the description.
6
- */
7
- export declare class DescriptionDirective implements OnInit, OnChanges {
8
- private renderer;
9
- private el;
10
- /**
11
- * Object of type `Description` to resize the element.
12
- */
13
- description: Description | undefined;
14
- constructor(renderer: Renderer2, el: ElementRef);
15
- /**
16
- * Method ´ngOnInit´ to apply the style of this directive.
17
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
18
- * In particular, it's called only one time!!!
19
- */
20
- ngOnInit(): void;
21
- /**
22
- * Method ´ngOnChanges´ to apply the style of this directive.
23
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
24
- * In particular, it's called when any data-bound property of a directive changes!!!
25
- */
26
- ngOnChanges(): void;
27
- /**
28
- * Private method to change description's style.
29
- */
30
- private applyStyle;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<DescriptionDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<DescriptionDirective, "[ksDescription]", never, { "description": { "alias": "description"; "required": false; }; }, {}, never, never, false, never>;
33
- }
@@ -1,36 +0,0 @@
1
- import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Directive to change the flex-direction of an element, based on two inputs (`direction` and `justify`).
5
- */
6
- export declare class DirectionDirective implements OnInit, OnChanges {
7
- private renderer;
8
- private el;
9
- /**
10
- * String input to set the css flex-direction of an element.
11
- */
12
- direction: string | undefined;
13
- /**
14
- * String input to set the css justify-content of an element.
15
- */
16
- justify: string | undefined;
17
- constructor(renderer: Renderer2, el: ElementRef);
18
- /**
19
- * Method ´ngOnInit´ to apply the style of this directive.
20
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
21
- * In particular, it's called only one time!!!
22
- */
23
- ngOnInit(): void;
24
- /**
25
- * Method ´ngOnChanges´ to apply the style of this directive.
26
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
27
- * In particular, it's called when any data-bound property of a directive changes!!!
28
- */
29
- ngOnChanges(): void;
30
- /**
31
- * Private method to change both direction and justify of an element.
32
- */
33
- private applyStyle;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<DirectionDirective, never>;
35
- static ɵdir: i0.ɵɵDirectiveDeclaration<DirectionDirective, "[ksDirection]", never, { "direction": { "alias": "direction"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; }, {}, never, never, false, never>;
36
- }
@@ -1,15 +0,0 @@
1
- import { ClickOutsideDirective } from './click-outside.directive';
2
- import { SizeDirective } from './size.directive';
3
- import { KeyboardNavigationDirective } from './keyboard-navigation.directive';
4
- import { WrapDirective } from './wrap.directive';
5
- import { DirectionDirective } from './direction.directive';
6
- import { ATagBgImageDirective } from './a-tag-bg-image.directive';
7
- import { DescriptionDirective } from './description.directive';
8
- import { MarginDirective } from './margin.directive';
9
- import { MaxSizeDirective } from './max-size.directive';
10
- import { FallbackImageDirective } from './fallback-image.directive';
11
- import { SwipeDirective } from './swipe.directive';
12
- /**
13
- * Array of all directives.
14
- */
15
- export declare const DIRECTIVES: (typeof ClickOutsideDirective | typeof SizeDirective | typeof KeyboardNavigationDirective | typeof WrapDirective | typeof DirectionDirective | typeof ATagBgImageDirective | typeof DescriptionDirective | typeof MarginDirective | typeof MaxSizeDirective | typeof FallbackImageDirective | typeof SwipeDirective)[];
@@ -1,16 +0,0 @@
1
- import { ElementRef, EventEmitter, Renderer2 } from '@angular/core';
2
- import { SafeResourceUrl } from '@angular/platform-browser';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive to add fallback image if the original one is not reachable.
6
- */
7
- export declare class FallbackImageDirective {
8
- private renderer;
9
- private el;
10
- fallbackImg: string | SafeResourceUrl | undefined;
11
- fallbackApplied: EventEmitter<boolean>;
12
- constructor(renderer: Renderer2, el: ElementRef);
13
- onError(): void;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<FallbackImageDirective, never>;
15
- static ɵdir: i0.ɵɵDirectiveDeclaration<FallbackImageDirective, "[ksFallbackImage]", never, { "fallbackImg": { "alias": "fallbackImg"; "required": false; }; }, { "fallbackApplied": "fallbackApplied"; }, never, never, false, never>;
16
- }
@@ -1,24 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Directive to manage keyboard navigation.
5
- */
6
- export declare class KeyboardNavigationDirective {
7
- /**
8
- * Boolean input to skip keyboard navigation.
9
- */
10
- isOpen: boolean | undefined;
11
- /**
12
- * Output to emit keyboard `code` of the pressed key (keydown).
13
- */
14
- keyboardNavigation: EventEmitter<string>;
15
- /**
16
- * Listener to catch keyboard's events and call the right method based on the key.
17
- * For instance, pressing esc, this will call `closeGallery(Action.KEYBOARD)` and so on.
18
- * If you passed a valid `keyboardConfig` esc, right and left buttons will be customized based on your data.
19
- * @param e KeyboardEvent caught by the listener.
20
- */
21
- onKeyDown(e: KeyboardEvent): void;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<KeyboardNavigationDirective, never>;
23
- static ɵdir: i0.ɵɵDirectiveDeclaration<KeyboardNavigationDirective, "[ksKeyboardNavigation]", never, { "isOpen": { "alias": "isOpen"; "required": false; }; }, { "keyboardNavigation": "keyboardNavigation"; }, never, never, false, never>;
24
- }
@@ -1,44 +0,0 @@
1
- import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Directive to change margins of an element.
5
- */
6
- export declare class MarginDirective implements OnInit, OnChanges {
7
- private renderer;
8
- private el;
9
- /**
10
- * String to set the margin of an element.
11
- */
12
- marginLeft: string | undefined;
13
- /**
14
- * String to set the margin of an element.
15
- */
16
- marginRight: string | undefined;
17
- /**
18
- * String to set the margin of an element.
19
- */
20
- marginTop: string | undefined;
21
- /**
22
- * String to set the margin of an element.
23
- */
24
- marginBottom: string | undefined;
25
- constructor(renderer: Renderer2, el: ElementRef);
26
- /**
27
- * Method ´ngOnInit´ to apply the style of this directive.
28
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
29
- * In particular, it's called only one time!!!
30
- */
31
- ngOnInit(): void;
32
- /**
33
- * Method ´ngOnChanges´ to apply the style of this directive.
34
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
35
- * In particular, it's called when any data-bound property of a directive changes!!!
36
- */
37
- ngOnChanges(): void;
38
- /**
39
- * Private method to change both width and height of an element.
40
- */
41
- private applyStyle;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<MarginDirective, never>;
43
- static ɵdir: i0.ɵɵDirectiveDeclaration<MarginDirective, "[ksMargin]", never, { "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; }, {}, never, never, false, never>;
44
- }
@@ -1,33 +0,0 @@
1
- import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core';
2
- import { MaxSize } from '../model/max-size.interface';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive to change the max size of an element.
6
- */
7
- export declare class MaxSizeDirective implements OnInit, OnChanges {
8
- private renderer;
9
- private el;
10
- /**
11
- * Object of type `MaxSize` to resize the element.
12
- */
13
- maxSizeConfig: MaxSize | undefined;
14
- constructor(renderer: Renderer2, el: ElementRef);
15
- /**
16
- * Method ´ngOnInit´ to apply the style of this directive.
17
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
18
- * In particular, it's called only one time!!!
19
- */
20
- ngOnInit(): void;
21
- /**
22
- * Method ´ngOnChanges´ to apply the style of this directive.
23
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
24
- * In particular, it's called when any data-bound property of a directive changes!!!
25
- */
26
- ngOnChanges(): void;
27
- /**
28
- * Private method to change both max-width and max-height of an element.
29
- */
30
- private applyStyle;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<MaxSizeDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<MaxSizeDirective, "[ksMaxSize]", never, { "maxSizeConfig": { "alias": "maxSizeConfig"; "required": false; }; }, {}, never, never, false, never>;
33
- }
@@ -1,33 +0,0 @@
1
- import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core';
2
- import { Size } from '../model/size.interface';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive to change the size of an element.
6
- */
7
- export declare class SizeDirective implements OnInit, OnChanges {
8
- private renderer;
9
- private el;
10
- /**
11
- * Object of type `Size` to resize the element.
12
- */
13
- sizeConfig: Size | undefined;
14
- constructor(renderer: Renderer2, el: ElementRef);
15
- /**
16
- * Method ´ngOnInit´ to apply the style of this directive.
17
- * This is an Angular lifecycle hook, so its called automatically by Angular itself.
18
- * In particular, it's called only one time!!!
19
- */
20
- ngOnInit(): void;
21
- /**
22
- * Method ´ngOnChanges´ to apply the style of this directive.
23
- * This is an Angular lifecycle hook, so its called automatically by Angular itself.
24
- * In particular, it's called when any data-bound property of a directive changes!!!
25
- */
26
- ngOnChanges(): void;
27
- /**
28
- * Private method to change both width and height of an element.
29
- */
30
- private applyStyle;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<SizeDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<SizeDirective, "[ksSize]", never, { "sizeConfig": { "alias": "sizeConfig"; "required": false; }; }, {}, never, never, false, never>;
33
- }
@@ -1,35 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Directive to manage swipe events on touch devices.
5
- */
6
- export declare class SwipeDirective {
7
- defaultTouch: {
8
- x: number;
9
- y: number;
10
- time: number;
11
- };
12
- /**
13
- * Output to emit swipe left event. Payload is empty.
14
- */
15
- swipeLeft: EventEmitter<void>;
16
- /**
17
- * Output to emit swipe right event. Payload is empty.
18
- */
19
- swipeRight: EventEmitter<void>;
20
- /**
21
- * Output to emit swipe up event. Payload is empty.
22
- */
23
- swipeUp: EventEmitter<void>;
24
- /**
25
- * Output to emit swipe down event. Payload is empty.
26
- */
27
- swipeDown: EventEmitter<void>;
28
- /**
29
- * Method called by Angular itself every click thanks to `@HostListener`.
30
- * @param event TouchEvent payload received on touch
31
- */
32
- handleTouch(event: TouchEvent): void;
33
- static ɵfac: i0.ɵɵFactoryDeclaration<SwipeDirective, never>;
34
- static ɵdir: i0.ɵɵDirectiveDeclaration<SwipeDirective, "[ksSwipe]", never, {}, { "swipeLeft": "swipeLeft"; "swipeRight": "swipeRight"; "swipeUp": "swipeUp"; "swipeDown": "swipeDown"; }, never, never, false, never>;
35
- }
@@ -1,36 +0,0 @@
1
- import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Directive to change the flex-wrap css property of an element.
5
- */
6
- export declare class WrapDirective implements OnInit, OnChanges {
7
- private renderer;
8
- private el;
9
- /**
10
- * Boolean input that it's true to add 'flex-wrap: wrap', 'flex-wrap: nowrap' otherwise.
11
- */
12
- wrap: boolean | undefined;
13
- /**
14
- * String input to force the width of the element to be able to see wrapping.
15
- */
16
- width: string | undefined;
17
- constructor(renderer: Renderer2, el: ElementRef);
18
- /**
19
- * Method ´ngOnInit´ to apply the style of this directive.
20
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
21
- * In particular, it's called only one time!!!
22
- */
23
- ngOnInit(): void;
24
- /**
25
- * Method ´ngOnChanges´ to apply the style of this directive.
26
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
27
- * In particular, it's called when any data-bound property of a directive changes!!!
28
- */
29
- ngOnChanges(): void;
30
- /**
31
- * Private method to change both width and flex-wrap css properties.
32
- */
33
- private applyStyle;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<WrapDirective, never>;
35
- static ɵdir: i0.ɵɵDirectiveDeclaration<WrapDirective, "[ksWrap]", never, { "wrap": { "alias": "wrap"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, {}, never, never, false, never>;
36
- }
@@ -1,32 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./components/plain-gallery/plain-gallery.component";
3
- import * as i2 from "./components/carousel/carousel.component";
4
- import * as i3 from "./components/carousel/carousel-previews/carousel-previews.component";
5
- import * as i4 from "./components/upper-buttons/upper-buttons.component";
6
- import * as i5 from "./components/dots/dots.component";
7
- import * as i6 from "./components/previews/previews.component";
8
- import * as i7 from "./components/current-image/current-image.component";
9
- import * as i8 from "./components/current-image/loading-spinner/loading-spinner.component";
10
- import * as i9 from "./components/accessible.component";
11
- import * as i10 from "./components/modal-gallery/modal-gallery.component";
12
- import * as i11 from "./directives/click-outside.directive";
13
- import * as i12 from "./directives/size.directive";
14
- import * as i13 from "./directives/keyboard-navigation.directive";
15
- import * as i14 from "./directives/wrap.directive";
16
- import * as i15 from "./directives/direction.directive";
17
- import * as i16 from "./directives/a-tag-bg-image.directive";
18
- import * as i17 from "./directives/description.directive";
19
- import * as i18 from "./directives/margin.directive";
20
- import * as i19 from "./directives/max-size.directive";
21
- import * as i20 from "./directives/fallback-image.directive";
22
- import * as i21 from "./directives/swipe.directive";
23
- import * as i22 from "@angular/common";
24
- import * as i23 from "@angular/cdk/overlay";
25
- /**
26
- * Module to import it in the root module of your application.
27
- */
28
- export declare class GalleryModule {
29
- static ɵfac: i0.ɵɵFactoryDeclaration<GalleryModule, never>;
30
- static ɵmod: i0.ɵɵNgModuleDeclaration<GalleryModule, [typeof i1.PlainGalleryComponent, typeof i2.CarouselComponent, typeof i3.CarouselPreviewsComponent, typeof i4.UpperButtonsComponent, typeof i5.DotsComponent, typeof i6.PreviewsComponent, typeof i7.CurrentImageComponent, typeof i8.LoadingSpinnerComponent, typeof i9.AccessibleComponent, typeof i10.ModalGalleryComponent, typeof i11.ClickOutsideDirective, typeof i12.SizeDirective, typeof i13.KeyboardNavigationDirective, typeof i14.WrapDirective, typeof i15.DirectionDirective, typeof i16.ATagBgImageDirective, typeof i17.DescriptionDirective, typeof i18.MarginDirective, typeof i19.MaxSizeDirective, typeof i20.FallbackImageDirective, typeof i21.SwipeDirective], [typeof i22.CommonModule, typeof i23.OverlayModule], [typeof i1.PlainGalleryComponent, typeof i2.CarouselComponent]>;
31
- static ɵinj: i0.ɵɵInjectorDeclaration<GalleryModule>;
32
- }
@@ -1,40 +0,0 @@
1
- /**
2
- * Interface `Accessibility` to config titles, alt texts, aria labels and so on
3
- */
4
- export interface AccessibilityConfig {
5
- backgroundAriaLabel: string;
6
- backgroundTitle: string;
7
- plainGalleryContentAriaLabel: string;
8
- plainGalleryContentTitle: string;
9
- modalGalleryContentAriaLabel: string;
10
- modalGalleryContentTitle: string;
11
- loadingSpinnerAriaLabel: string;
12
- loadingSpinnerTitle: string;
13
- mainContainerAriaLabel: string;
14
- mainContainerTitle: string;
15
- mainPrevImageAriaLabel: string;
16
- mainPrevImageTitle: string;
17
- mainNextImageAriaLabel: string;
18
- mainNextImageTitle: string;
19
- dotsContainerAriaLabel: string;
20
- dotsContainerTitle: string;
21
- dotAriaLabel: string;
22
- previewsContainerAriaLabel: string;
23
- previewsContainerTitle: string;
24
- previewScrollPrevAriaLabel: string;
25
- previewScrollPrevTitle: string;
26
- previewScrollNextAriaLabel: string;
27
- previewScrollNextTitle: string;
28
- carouselContainerAriaLabel: string;
29
- carouselContainerTitle: string;
30
- carouselPrevImageAriaLabel: string;
31
- carouselPrevImageTitle: string;
32
- carouselNextImageAriaLabel: string;
33
- carouselNextImageTitle: string;
34
- carouselPreviewsContainerAriaLabel: string;
35
- carouselPreviewsContainerTitle: string;
36
- carouselPreviewScrollPrevAriaLabel: string;
37
- carouselPreviewScrollPrevTitle: string;
38
- carouselPreviewScrollNextAriaLabel: string;
39
- carouselPreviewScrollNextTitle: string;
40
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Enum `Action` with a list of possible actions, based on the source of the action.
3
- */
4
- export declare enum Action {
5
- NORMAL = 0,// default value
6
- CLICK = 1,// mouse click
7
- KEYBOARD = 2,
8
- SWIPE = 3,
9
- LOAD = 4,
10
- AUTOPLAY = 5
11
- }
@@ -1,57 +0,0 @@
1
- import { Action } from './action.enum';
2
- import { InternalLibImage } from './image-internal.class';
3
- import { Size } from './size.interface';
4
- /**
5
- * Interface `ButtonsConfig` to add buttons, show/hide their, and to add the strategy.
6
- */
7
- export interface ButtonsConfig {
8
- visible: boolean;
9
- strategy: ButtonsStrategy;
10
- buttons?: ButtonConfig[];
11
- }
12
- /**
13
- * Interface `ButtonConfig` to configure a single button.
14
- */
15
- export interface ButtonConfig {
16
- className?: string;
17
- size?: Size;
18
- fontSize?: string;
19
- type: ButtonType;
20
- title?: string;
21
- ariaLabel?: string;
22
- extUrlInNewTab?: boolean;
23
- }
24
- /**
25
- * Interface `ButtonEvent` to represent the event payload when a button is clicked.
26
- */
27
- export interface ButtonEvent {
28
- button: ButtonConfig;
29
- image: InternalLibImage | null;
30
- action: Action;
31
- galleryId: number;
32
- }
33
- /**
34
- * Enum `ButtonsStrategy` to configure the logic of a button.
35
- */
36
- export declare enum ButtonsStrategy {
37
- DEFAULT = 1,
38
- SIMPLE = 2,
39
- ADVANCED = 3,
40
- FULL = 4,
41
- CUSTOM = 5
42
- }
43
- /**
44
- * Enum `ButtonType` is the type of a button.
45
- */
46
- export declare enum ButtonType {
47
- DELETE = 1,
48
- EXTURL = 2,
49
- DOWNLOAD = 3,
50
- CLOSE = 4,
51
- CUSTOM = 5,
52
- FULLSCREEN = 6
53
- }
54
- /**
55
- * Array of admitted types of buttons.
56
- */
57
- export declare const WHITELIST_BUTTON_TYPES: ButtonType[];