@ks89/angular-modal-gallery 12.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 (125) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/CONTRIBUTING.md +8 -11
  3. package/LICENSE +1 -1
  4. package/README.md +10 -6
  5. package/fesm2022/ks89-angular-modal-gallery.mjs +832 -909
  6. package/fesm2022/ks89-angular-modal-gallery.mjs.map +1 -1
  7. package/index.d.ts +2528 -3
  8. package/package.json +8 -10
  9. package/esm2022/ks89-angular-modal-gallery.mjs +0 -5
  10. package/esm2022/lib/components/accessibility-default.mjs +0 -41
  11. package/esm2022/lib/components/accessible.component.mjs +0 -130
  12. package/esm2022/lib/components/carousel/carousel-previews/carousel-previews.component.mjs +0 -456
  13. package/esm2022/lib/components/carousel/carousel.component.mjs +0 -738
  14. package/esm2022/lib/components/components.mjs +0 -50
  15. package/esm2022/lib/components/current-image/current-image.component.mjs +0 -607
  16. package/esm2022/lib/components/current-image/loading-spinner/loading-spinner.component.mjs +0 -80
  17. package/esm2022/lib/components/dots/dots.component.mjs +0 -124
  18. package/esm2022/lib/components/modal-gallery/attach-to-overlay.service.mjs +0 -42
  19. package/esm2022/lib/components/modal-gallery/modal-gallery-ref.mjs +0 -103
  20. package/esm2022/lib/components/modal-gallery/modal-gallery.component.mjs +0 -499
  21. package/esm2022/lib/components/modal-gallery/modal-gallery.service.mjs +0 -168
  22. package/esm2022/lib/components/modal-gallery/modal-gallery.tokens.mjs +0 -26
  23. package/esm2022/lib/components/plain-gallery/plain-gallery.component.mjs +0 -249
  24. package/esm2022/lib/components/previews/previews.component.mjs +0 -263
  25. package/esm2022/lib/components/upper-buttons/upper-buttons-default.mjs +0 -76
  26. package/esm2022/lib/components/upper-buttons/upper-buttons.component.mjs +0 -243
  27. package/esm2022/lib/directives/a-tag-bg-image.directive.mjs +0 -78
  28. package/esm2022/lib/directives/click-outside.directive.mjs +0 -91
  29. package/esm2022/lib/directives/description.directive.mjs +0 -98
  30. package/esm2022/lib/directives/direction.directive.mjs +0 -73
  31. package/esm2022/lib/directives/directives.mjs +0 -51
  32. package/esm2022/lib/directives/fallback-image.directive.mjs +0 -59
  33. package/esm2022/lib/directives/keyboard-navigation.directive.mjs +0 -64
  34. package/esm2022/lib/directives/margin.directive.mjs +0 -84
  35. package/esm2022/lib/directives/max-size.directive.mjs +0 -75
  36. package/esm2022/lib/directives/size.directive.mjs +0 -76
  37. package/esm2022/lib/directives/swipe.directive.mjs +0 -116
  38. package/esm2022/lib/directives/wrap.directive.mjs +0 -74
  39. package/esm2022/lib/modal-gallery.module.mjs +0 -88
  40. package/esm2022/lib/model/accessibility.interface.mjs +0 -25
  41. package/esm2022/lib/model/action.enum.mjs +0 -36
  42. package/esm2022/lib/model/buttons-config.interface.mjs +0 -62
  43. package/esm2022/lib/model/carousel-config.interface.mjs +0 -25
  44. package/esm2022/lib/model/carousel-image-config.interface.mjs +0 -25
  45. package/esm2022/lib/model/carousel-preview-config.interface.mjs +0 -25
  46. package/esm2022/lib/model/current-image-config.interface.mjs +0 -25
  47. package/esm2022/lib/model/description.interface.mjs +0 -33
  48. package/esm2022/lib/model/dots-config.interface.mjs +0 -25
  49. package/esm2022/lib/model/image-internal.class.mjs +0 -35
  50. package/esm2022/lib/model/image.class.mjs +0 -56
  51. package/esm2022/lib/model/interaction-event.interface.mjs +0 -2
  52. package/esm2022/lib/model/keyboard-config.interface.mjs +0 -25
  53. package/esm2022/lib/model/keyboard.enum.mjs +0 -35
  54. package/esm2022/lib/model/lib-config.interface.mjs +0 -25
  55. package/esm2022/lib/model/loading-config.interface.mjs +0 -37
  56. package/esm2022/lib/model/max-size.interface.mjs +0 -25
  57. package/esm2022/lib/model/modal-gallery-config.interface.mjs +0 -25
  58. package/esm2022/lib/model/plain-gallery-config.interface.mjs +0 -55
  59. package/esm2022/lib/model/play-config.interface.mjs +0 -25
  60. package/esm2022/lib/model/preview-config.interface.mjs +0 -25
  61. package/esm2022/lib/model/size.interface.mjs +0 -25
  62. package/esm2022/lib/model/slide-config.interface.mjs +0 -25
  63. package/esm2022/lib/services/config.service.mjs +0 -388
  64. package/esm2022/lib/services/id-validator.service.mjs +0 -71
  65. package/esm2022/lib/utils/image.util.mjs +0 -48
  66. package/esm2022/lib/utils/user-input.util.mjs +0 -104
  67. package/esm2022/public-api.mjs +0 -42
  68. package/lib/components/accessibility-default.d.ts +0 -5
  69. package/lib/components/accessible.component.d.ts +0 -50
  70. package/lib/components/carousel/carousel-previews/carousel-previews.component.d.ts +0 -195
  71. package/lib/components/carousel/carousel.component.d.ts +0 -276
  72. package/lib/components/components.d.ts +0 -15
  73. package/lib/components/current-image/current-image.component.d.ts +0 -282
  74. package/lib/components/current-image/loading-spinner/loading-spinner.component.d.ts +0 -55
  75. package/lib/components/dots/dots.component.d.ts +0 -81
  76. package/lib/components/modal-gallery/attach-to-overlay.service.d.ts +0 -20
  77. package/lib/components/modal-gallery/modal-gallery-ref.d.ts +0 -64
  78. package/lib/components/modal-gallery/modal-gallery.component.d.ts +0 -246
  79. package/lib/components/modal-gallery/modal-gallery.service.d.ts +0 -100
  80. package/lib/components/modal-gallery/modal-gallery.tokens.d.ts +0 -3
  81. package/lib/components/plain-gallery/plain-gallery.component.d.ts +0 -135
  82. package/lib/components/previews/previews.component.d.ts +0 -155
  83. package/lib/components/upper-buttons/upper-buttons-default.d.ts +0 -29
  84. package/lib/components/upper-buttons/upper-buttons.component.d.ts +0 -132
  85. package/lib/directives/a-tag-bg-image.directive.d.ts +0 -38
  86. package/lib/directives/click-outside.directive.d.ts +0 -24
  87. package/lib/directives/description.directive.d.ts +0 -33
  88. package/lib/directives/direction.directive.d.ts +0 -36
  89. package/lib/directives/directives.d.ts +0 -15
  90. package/lib/directives/fallback-image.directive.d.ts +0 -16
  91. package/lib/directives/keyboard-navigation.directive.d.ts +0 -24
  92. package/lib/directives/margin.directive.d.ts +0 -44
  93. package/lib/directives/max-size.directive.d.ts +0 -33
  94. package/lib/directives/size.directive.d.ts +0 -33
  95. package/lib/directives/swipe.directive.d.ts +0 -35
  96. package/lib/directives/wrap.directive.d.ts +0 -36
  97. package/lib/modal-gallery.module.d.ts +0 -32
  98. package/lib/model/accessibility.interface.d.ts +0 -40
  99. package/lib/model/action.enum.d.ts +0 -11
  100. package/lib/model/buttons-config.interface.d.ts +0 -57
  101. package/lib/model/carousel-config.interface.d.ts +0 -11
  102. package/lib/model/carousel-image-config.interface.d.ts +0 -8
  103. package/lib/model/carousel-preview-config.interface.d.ts +0 -22
  104. package/lib/model/current-image-config.interface.d.ts +0 -12
  105. package/lib/model/description.interface.d.ts +0 -39
  106. package/lib/model/dots-config.interface.d.ts +0 -6
  107. package/lib/model/image-internal.class.d.ts +0 -9
  108. package/lib/model/image.class.d.ts +0 -64
  109. package/lib/model/interaction-event.interface.d.ts +0 -6
  110. package/lib/model/keyboard-config.interface.d.ts +0 -8
  111. package/lib/model/keyboard.enum.d.ts +0 -13
  112. package/lib/model/lib-config.interface.d.ts +0 -39
  113. package/lib/model/loading-config.interface.d.ts +0 -19
  114. package/lib/model/max-size.interface.d.ts +0 -8
  115. package/lib/model/modal-gallery-config.interface.d.ts +0 -16
  116. package/lib/model/plain-gallery-config.interface.d.ts +0 -57
  117. package/lib/model/play-config.interface.d.ts +0 -8
  118. package/lib/model/preview-config.interface.d.ts +0 -12
  119. package/lib/model/size.interface.d.ts +0 -8
  120. package/lib/model/slide-config.interface.d.ts +0 -17
  121. package/lib/services/config.service.d.ts +0 -39
  122. package/lib/services/id-validator.service.d.ts +0 -25
  123. package/lib/utils/image.util.d.ts +0 -10
  124. package/lib/utils/user-input.util.d.ts +0 -80
  125. package/public-api.d.ts +0 -31
@@ -1,155 +0,0 @@
1
- import { EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
2
- import { AccessibleComponent } from '../accessible.component';
3
- import { AccessibilityConfig } from '../../model/accessibility.interface';
4
- import { Image, ImageEvent } from '../../model/image.class';
5
- import { InternalLibImage } from '../../model/image-internal.class';
6
- import { PreviewConfig } from '../../model/preview-config.interface';
7
- import { SlideConfig } from '../../model/slide-config.interface';
8
- import { Action } from '../../model/action.enum';
9
- import { ConfigService } from '../../services/config.service';
10
- import { Size } from '../../model/size.interface';
11
- import * as i0 from "@angular/core";
12
- /**
13
- * Component with image previews
14
- */
15
- export declare class PreviewsComponent extends AccessibleComponent implements OnInit, OnChanges {
16
- private configService;
17
- /**
18
- * Unique id (>=0) of the current instance of this library. This is required when you are using
19
- * the service to call modal gallery.
20
- */
21
- id: number;
22
- /**
23
- * Object of type `InternalLibImage` that represent the visible image.
24
- */
25
- currentImage: InternalLibImage;
26
- /**
27
- * Array of `InternalLibImage` that represent the model of this library with all images,
28
- * thumbs and so on.
29
- */
30
- images: InternalLibImage[];
31
- /**
32
- * Optional template reference for the rendering of previews.
33
- * Template may access following context variables:
34
- * - preview: the `Image` object
35
- * - defaultTemplate: the template used by default to render the preview (in case the need is to wrap it)
36
- */
37
- customTemplate?: TemplateRef<HTMLElement>;
38
- /**
39
- * Output to emit the clicked preview. The payload contains the `ImageEvent` associated to the clicked preview.
40
- */
41
- clickPreview: EventEmitter<ImageEvent>;
42
- /**
43
- * Object of type `AccessibilityConfig` to init custom accessibility features.
44
- * For instance, it contains titles, alt texts, aria-labels and so on.
45
- */
46
- accessibilityConfig: AccessibilityConfig | undefined;
47
- /**
48
- * Object of type `SlideConfig` to get `infinite sliding`.
49
- */
50
- slideConfig: SlideConfig | undefined;
51
- /**
52
- * Object of type `PreviewConfig` to init PreviewsComponent's features.
53
- * For instance, it contains a param to show/hide this component, sizes.
54
- */
55
- previewConfig: PreviewConfig | undefined;
56
- /**
57
- * Enum of type `Action` that represents a mouse click on a button.
58
- * Declared here to be used inside the template.
59
- */
60
- clickAction: Action;
61
- /**
62
- * Enum of type `Action` that represents a keyboard action.
63
- * Declared here to be used inside the template.
64
- */
65
- keyboardAction: Action;
66
- /**
67
- * Array of `InternalLibImage` exposed to the template. This field is initialized
68
- * applying transformations, default values and so on to the input of the same type.
69
- */
70
- previews: InternalLibImage[];
71
- /**
72
- * Start index (included) of the input images used to display previews.
73
- */
74
- start: number;
75
- /**
76
- * End index (excluded) of the input images used to display previews.
77
- */
78
- end: number;
79
- defaultPreviewSize: Size;
80
- constructor(configService: ConfigService);
81
- /**
82
- * Method ´ngOnInit´ to build `configPreview` applying a default value and also to
83
- * init the `previews` array.
84
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
85
- * In particular, it's called only one time!!!
86
- */
87
- ngOnInit(): void;
88
- /**
89
- * Method to check if an image is active (i.e. a preview image).
90
- * @param InternalLibImage preview is an image to check if it's active or not
91
- * @returns boolean true if is active, false otherwise
92
- */
93
- isActive(preview: InternalLibImage): boolean;
94
- /**
95
- * Method ´ngOnChanges´ to update `previews` array.
96
- * Also, both `start` and `end` local variables will be updated accordingly.
97
- * This is an angular lifecycle hook, so its called automatically by Angular itself.
98
- * In particular, it's called when any data-bound property of a directive changes!!!
99
- */
100
- ngOnChanges(changes: SimpleChanges): void;
101
- /**
102
- * Method called by events from both keyboard and mouse on a preview.
103
- * This will trigger the `clickpreview` output with the input preview as its payload.
104
- * @param InternalLibImage preview that triggered this method
105
- * @param KeyboardEvent | MouseEvent event payload
106
- * @param Action action that triggered the source event or `Action.NORMAL` if not specified
107
- */
108
- onImageEvent(preview: InternalLibImage, event: KeyboardEvent | MouseEvent, action?: Action): void;
109
- /**
110
- * Method called by events from both keyboard and mouse on a navigation arrow.
111
- * It also emits an event to specify which arrow.
112
- * @param string direction of the navigation that can be either 'next' or 'prev'
113
- * @param KeyboardEvent | MouseEvent event payload
114
- * @param Action action that triggered the source event or `Action.NORMAL` if not specified
115
- */
116
- onNavigationEvent(direction: string, event: KeyboardEvent | MouseEvent, action?: Action): void;
117
- /**
118
- * Method used in the template to track ids in ngFor.
119
- * @param number index of the array
120
- * @param Image item of the array
121
- * @returns number the id of the item
122
- */
123
- trackById(index: number, item: Image): number;
124
- /**
125
- * Indicates if the previews 'left arrow' should be displayed or not.
126
- * @returns
127
- */
128
- displayLeftPreviewsArrow(): boolean;
129
- /**
130
- * Indicates if the previews 'right arrow' should be displayed or not.
131
- * @returns
132
- */
133
- displayRightPreviewsArrow(): boolean;
134
- /**
135
- * Private method to init previews based on the currentImage and the full array of images.
136
- * The current image in mandatory to show always the current preview (as highlighted).
137
- * @param InternalLibImage currentImage to decide how to show previews, because I always want to see the current image as highlighted
138
- * @param InternalLibImage[] images is the array of all images.
139
- */
140
- private initPreviews;
141
- /**
142
- * Private method to update both `start` and `end` based on the currentImage.
143
- */
144
- private setIndexesPreviews;
145
- /**
146
- * Private method to update the visible previews navigating to the right (next).
147
- */
148
- private next;
149
- /**
150
- * Private method to update the visible previews navigating to the left (previous).
151
- */
152
- private previous;
153
- static ɵfac: i0.ɵɵFactoryDeclaration<PreviewsComponent, never>;
154
- static ɵcmp: i0.ɵɵComponentDeclaration<PreviewsComponent, "ks-previews", never, { "id": { "alias": "id"; "required": false; }; "currentImage": { "alias": "currentImage"; "required": false; }; "images": { "alias": "images"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; }; }, { "clickPreview": "clickPreview"; }, never, never, false, never>;
155
- }
@@ -1,29 +0,0 @@
1
- import { ButtonConfig } from '../../model/buttons-config.interface';
2
- import { Size } from '../../model/size.interface';
3
- /**
4
- * Default button size object
5
- */
6
- export declare const KS_DEFAULT_SIZE: Size;
7
- /**
8
- * Default close button object
9
- */
10
- export declare const KS_DEFAULT_BTN_CLOSE: ButtonConfig;
11
- /**
12
- * Default download button object
13
- */
14
- export declare const KS_DEFAULT_BTN_DOWNLOAD: ButtonConfig;
15
- /**
16
- * Default exturl button object
17
- */
18
- export declare const KS_DEFAULT_BTN_EXTURL: ButtonConfig;
19
- /**
20
- * Default delete button object
21
- */
22
- export declare const KS_DEFAULT_BTN_DELETE: ButtonConfig;
23
- /**
24
- * Default full-screen button object
25
- */
26
- export declare const KS_DEFAULT_BTN_FULL_SCREEN: ButtonConfig;
27
- /**
28
- * Default rotate button object
29
- */
@@ -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
- }