@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,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[];
@@ -1,11 +0,0 @@
1
- /**
2
- * Interface `CarouselConfig` to change the style of the carousel and some additional features.
3
- */
4
- export interface CarouselConfig {
5
- maxWidth: string;
6
- maxHeight: string;
7
- showArrows: boolean;
8
- objectFit: string;
9
- keyboardEnable: boolean;
10
- modalGalleryEnable: boolean;
11
- }
@@ -1,8 +0,0 @@
1
- import { Description } from './description.interface';
2
- /**
3
- * Interface `CarouselImageConfig` to change current image behaviour in carousel.
4
- */
5
- export interface CarouselImageConfig {
6
- description?: Description;
7
- invertSwipe?: boolean;
8
- }
@@ -1,22 +0,0 @@
1
- /**
2
- * Interface `BreakpointsConfig` to configure responsive breakpoints as numbers to express pixels
3
- */
4
- export interface BreakpointsConfig {
5
- xSmall: number;
6
- small: number;
7
- medium: number;
8
- large: number;
9
- xLarge: number;
10
- }
11
- /**
12
- * Interface `CarouselPreviewConfig` to configure carousel's previews
13
- */
14
- export interface CarouselPreviewConfig {
15
- visible: boolean;
16
- number?: number;
17
- arrows?: boolean;
18
- clickable?: boolean;
19
- width?: string;
20
- maxHeight?: string;
21
- breakpoints?: BreakpointsConfig;
22
- }
@@ -1,12 +0,0 @@
1
- import { LoadingConfig } from './loading-config.interface';
2
- import { Description } from './description.interface';
3
- /**
4
- * Interface `CurrentImageConfig` to change current image behaviour in modal-gallery.
5
- */
6
- export interface CurrentImageConfig {
7
- navigateOnClick?: boolean;
8
- downloadable?: boolean;
9
- loadingConfig?: LoadingConfig;
10
- description?: Description;
11
- invertSwipe?: boolean;
12
- }
@@ -1,39 +0,0 @@
1
- /**
2
- * Interface `Description` to change the description, either with a full custom
3
- * description or with a small and simple customization.
4
- * Also, you could change margins, background style and so on.
5
- */
6
- export interface Description {
7
- strategy: DescriptionStrategy;
8
- customFullDescription?: string;
9
- imageText?: string;
10
- numberSeparator?: string;
11
- beforeTextDescription?: string;
12
- style?: DescriptionStyle;
13
- }
14
- /**
15
- * Enum `DescriptionStrategy` with keys and their relative key codes.
16
- */
17
- export declare enum DescriptionStrategy {
18
- ALWAYS_HIDDEN = 1,
19
- ALWAYS_VISIBLE = 2,
20
- HIDE_IF_EMPTY = 3
21
- }
22
- /**
23
- * Interface to change css properties.
24
- */
25
- export interface DescriptionStyle {
26
- bgColor?: string;
27
- textColor?: string;
28
- width?: string;
29
- height?: string;
30
- position?: string;
31
- top?: string;
32
- bottom?: string;
33
- left?: string;
34
- right?: string;
35
- marginTop?: string;
36
- marginBottom?: string;
37
- marginRight?: string;
38
- marginLeft?: string;
39
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Interface `DotsConfig` to show/hide dots.
3
- */
4
- export interface DotsConfig {
5
- visible: boolean;
6
- }
@@ -1,9 +0,0 @@
1
- import { Image, ModalImage, PlainImage } from './image.class';
2
- /**
3
- * Internal representation of an image adding other fields
4
- * to the public `Image` class.
5
- */
6
- export declare class InternalLibImage extends Image {
7
- previouslyLoaded: boolean;
8
- constructor(id: number, modal: ModalImage, plain?: PlainImage, previouslyLoaded?: boolean);
9
- }
@@ -1,64 +0,0 @@
1
- import { Action } from './action.enum';
2
- import { Size } from './size.interface';
3
- import { SafeResourceUrl } from '@angular/platform-browser';
4
- /**
5
- * Class `Image` that represents an image with both `modal` and `plain` configurations.
6
- * Both image `id` and `modal` are mandatory, instead `plain` is optional.
7
- */
8
- export declare class Image {
9
- id: number;
10
- loading: 'eager' | 'lazy';
11
- fetchpriority: 'high' | 'low' | 'auto';
12
- modal: ModalImage;
13
- plain?: PlainImage;
14
- constructor(id: number, modal: ModalImage, plain?: PlainImage, loading?: 'eager' | 'lazy', fetchpriority?: 'high' | 'low' | 'auto');
15
- }
16
- /**
17
- * Interface `ImageData` to configure an image, but it isn't used directly.
18
- * Please, refers to `PlainImage` or `ModalImage`.
19
- */
20
- export interface ImageData {
21
- img: string | SafeResourceUrl;
22
- description?: string;
23
- title?: string;
24
- alt?: string;
25
- ariaLabel?: string;
26
- fallbackImg?: string | SafeResourceUrl;
27
- }
28
- /**
29
- * Interface `ModalImage` to configure the modal image.
30
- */
31
- export interface ModalImage extends ImageData {
32
- extUrl?: string;
33
- downloadFileName?: string;
34
- sources?: Source[];
35
- }
36
- /**
37
- * Interface `PlainImage` to configure the plain image.
38
- */
39
- export interface PlainImage extends ImageData {
40
- size?: Size;
41
- }
42
- /**
43
- * Class `ImageEvent` that represents the event payload with the result and the triggered action.
44
- * It also contains the source id of the gallery that emitted this event
45
- */
46
- export declare class ImageEvent {
47
- galleryId: number;
48
- action: Action;
49
- result: number | boolean;
50
- constructor(galleryId: number, action: Action, result: number | boolean);
51
- }
52
- /**
53
- * Class `ImageModalEvent` that represents the event payload with galleryId, result and the triggered action.
54
- */
55
- export declare class ImageModalEvent extends ImageEvent {
56
- constructor(galleryId: number, action: Action, result: number | boolean);
57
- }
58
- /**
59
- * Interface `Source` to configure sources of picture element.
60
- */
61
- export interface Source {
62
- srcset: string;
63
- media: string;
64
- }
@@ -1,6 +0,0 @@
1
- import { Action } from './action.enum';
2
- export interface InteractionEvent {
3
- source: string;
4
- action: Action;
5
- payload: any;
6
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Interface `KeyboardConfig` to assign custom codes to ESC, RIGHT and LEFT keyboard's actions.
3
- */
4
- export interface KeyboardConfig {
5
- esc?: string;
6
- right?: string;
7
- left?: string;
8
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Enum `Keyboard` with keys and their relative codes.
3
- */
4
- import { DOWN_ARROW_CODE, ESC_CODE, LEFT_ARROW_CODE, RIGHT_ARROW_CODE, UP_ARROW_CODE } from '../utils/user-input.util';
5
- type Keyboard = Readonly<{
6
- ESC: typeof ESC_CODE;
7
- LEFT_ARROW: typeof LEFT_ARROW_CODE;
8
- RIGHT_ARROW: typeof RIGHT_ARROW_CODE;
9
- UP_ARROW: typeof UP_ARROW_CODE;
10
- DOWN_ARROW: typeof DOWN_ARROW_CODE;
11
- }>;
12
- export declare const Keyboard: Keyboard;
13
- export {};
@@ -1,39 +0,0 @@
1
- import { SlideConfig } from './slide-config.interface';
2
- import { AccessibilityConfig } from './accessibility.interface';
3
- import { PreviewConfig } from './preview-config.interface';
4
- import { ButtonsConfig } from './buttons-config.interface';
5
- import { DotsConfig } from './dots-config.interface';
6
- import { PlainGalleryConfig } from './plain-gallery-config.interface';
7
- import { CurrentImageConfig } from './current-image-config.interface';
8
- import { KeyboardConfig } from './keyboard-config.interface';
9
- import { CarouselConfig } from './carousel-config.interface';
10
- import { CarouselImageConfig } from './carousel-image-config.interface';
11
- import { CarouselPreviewConfig } from './carousel-preview-config.interface';
12
- import { PlayConfig } from './play-config.interface';
13
- export interface AccessibleLibConfig {
14
- accessibilityConfig?: AccessibilityConfig;
15
- }
16
- export interface CommonLibConfig {
17
- previewConfig?: PreviewConfig;
18
- dotsConfig?: DotsConfig;
19
- slideConfig?: SlideConfig;
20
- }
21
- export interface CarouselLibConfig extends CommonLibConfig, AccessibleLibConfig {
22
- carouselConfig?: CarouselConfig;
23
- carouselImageConfig?: CarouselImageConfig;
24
- carouselPreviewsConfig?: CarouselPreviewConfig;
25
- carouselPlayConfig?: PlayConfig;
26
- carouselDotsConfig?: DotsConfig;
27
- carouselSlideInfinite?: boolean;
28
- }
29
- export interface ModalLibConfig extends CommonLibConfig, AccessibleLibConfig {
30
- enableCloseOutside?: boolean;
31
- keyboardConfig?: KeyboardConfig;
32
- currentImageConfig?: CurrentImageConfig;
33
- buttonsConfig?: ButtonsConfig;
34
- }
35
- export interface PlainLibConfig extends AccessibleLibConfig {
36
- plainGalleryConfig?: PlainGalleryConfig;
37
- }
38
- export interface LibConfig extends ModalLibConfig, PlainLibConfig, CarouselLibConfig {
39
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * Interface `LoadingConfig` to configure loading icon.
3
- */
4
- export interface LoadingConfig {
5
- enable: boolean;
6
- type: LoadingType;
7
- }
8
- /**
9
- * Enum `LoadingType` with a list of possible types.
10
- */
11
- export declare enum LoadingType {
12
- STANDARD = 1,
13
- CIRCULAR = 2,
14
- BARS = 3,
15
- DOTS = 4,
16
- CUBE_FLIPPING = 5,
17
- CIRCLES = 6,
18
- EXPLOSING_SQUARES = 7
19
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Interface `MaxSize` to configure the size based on max-width and max-height.
3
- * They can be pixels, percentages.
4
- */
5
- export interface MaxSize {
6
- maxWidth?: string;
7
- maxHeight?: string;
8
- }
@@ -1,16 +0,0 @@
1
- import { TemplateRef } from '@angular/core';
2
- import { Image } from './image.class';
3
- import { ModalLibConfig } from './lib-config.interface';
4
- export interface ModalGalleryConfig {
5
- id: number;
6
- images: Image[];
7
- currentImage: Image;
8
- libConfig?: ModalLibConfig;
9
- /**
10
- * Optional template reference for the rendering of previews.
11
- * Template may access following context variables:
12
- * - "preview": the `Image` object of the preview
13
- * - "defaultTemplate": the template used by default to render the preview (in case the need is to augment it)
14
- */
15
- previewsTemplate?: TemplateRef<HTMLElement>;
16
- }
@@ -1,57 +0,0 @@
1
- import { Size } from './size.interface';
2
- /**
3
- * Interface `PlainGalleryConfig` to configure plain-gallery features.
4
- */
5
- export interface PlainGalleryConfig {
6
- strategy: PlainGalleryStrategy;
7
- layout: PlainGalleryLayout;
8
- advanced?: AdvancedConfig;
9
- }
10
- /**
11
- * Interface `PlainGalleryLayout` to configure the layout. This interface isn't used directly, instead
12
- * refers to either `LineLayout`, `GridLayout`.
13
- */
14
- export interface PlainGalleryLayout {
15
- }
16
- /**
17
- * Class `LineLayout` to configure a linear plain gallery.
18
- */
19
- export declare class LineLayout implements PlainGalleryLayout {
20
- breakConfig: BreakConfig;
21
- justify: string;
22
- size: Size;
23
- constructor(size: Size, breakConfig: BreakConfig, justify: string);
24
- }
25
- /**
26
- * Class `GridLayout` to configure a grid plain gallery.
27
- */
28
- export declare class GridLayout implements PlainGalleryLayout {
29
- breakConfig: BreakConfig;
30
- size: Size;
31
- constructor(size: Size, breakConfig: BreakConfig);
32
- }
33
- /**
34
- * Enum `PlainGalleryStrategy` to choose the behaviour of the plain gallery.
35
- */
36
- export declare enum PlainGalleryStrategy {
37
- ROW = 1,
38
- COLUMN = 2,
39
- GRID = 3,
40
- CUSTOM = 4
41
- }
42
- /**
43
- * Interface `BreakConfig` to limit the number of items of the plain gallery or to force it to fill other lines.
44
- */
45
- export interface BreakConfig {
46
- length: number;
47
- wrap: boolean;
48
- }
49
- /**
50
- * Interface `AdvancedConfig` to use `<a>` tags instead of `<img>`.
51
- * It also contains a string property to customize the css background property.
52
- * For more info check here https://www.w3schools.com/cssref/css3_pr_background.asp
53
- */
54
- export interface AdvancedConfig {
55
- aTags: boolean;
56
- additionalBackground: string;
57
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Interface `PlayConfig` to change the behaviour about auto-navigation for both modal gallery and carousel.
3
- */
4
- export interface PlayConfig {
5
- autoPlay: boolean;
6
- interval: number;
7
- pauseOnHover: boolean;
8
- }
@@ -1,12 +0,0 @@
1
- import { Size } from './size.interface';
2
- /**
3
- * Interface `PreviewConfig` to configure previews in modal gallery.
4
- */
5
- export interface PreviewConfig {
6
- visible: boolean;
7
- mobileVisible?: boolean;
8
- number?: number;
9
- arrows?: boolean;
10
- clickable?: boolean;
11
- size?: Size;
12
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Interface `Size` to configure the size based on width and height.
3
- * They can be pixels, percentages or also 'auto'.
4
- */
5
- export interface Size {
6
- width: string;
7
- height: string;
8
- }
@@ -1,17 +0,0 @@
1
- import { Size } from './size.interface';
2
- import { PlayConfig } from './play-config.interface';
3
- /**
4
- * Interface `SlideConfig` to configure sliding features of modal gallery.
5
- */
6
- export interface SlideConfig {
7
- infinite?: boolean;
8
- playConfig?: PlayConfig;
9
- sidePreviews?: SidePreviewsConfig;
10
- }
11
- /**
12
- * Interface `SidePreviewsConfig` to configure sliding features of previews in modal gallery.
13
- */
14
- export interface SidePreviewsConfig {
15
- show: boolean;
16
- size: Size;
17
- }
@@ -1,39 +0,0 @@
1
- import { SlideConfig } from '../model/slide-config.interface';
2
- import { PlayConfig } from '../model/play-config.interface';
3
- import { PreviewConfig } from '../model/preview-config.interface';
4
- import { Size } from '../model/size.interface';
5
- import { LineLayout, PlainGalleryConfig } from '../model/plain-gallery-config.interface';
6
- import { CurrentImageConfig } from '../model/current-image-config.interface';
7
- import { LoadingConfig } from '../model/loading-config.interface';
8
- import { Description, DescriptionStyle } from '../model/description.interface';
9
- import { CarouselConfig } from '../model/carousel-config.interface';
10
- import { CarouselImageConfig } from '../model/carousel-image-config.interface';
11
- import { BreakpointsConfig, CarouselPreviewConfig } from '../model/carousel-preview-config.interface';
12
- import { LibConfig } from '../model/lib-config.interface';
13
- import * as i0 from "@angular/core";
14
- export declare const DEFAULT_PREVIEW_SIZE: Size;
15
- export declare const DEFAULT_LAYOUT: LineLayout;
16
- export declare const DEFAULT_PLAIN_CONFIG: PlainGalleryConfig;
17
- export declare const DEFAULT_LOADING: LoadingConfig;
18
- export declare const DEFAULT_DESCRIPTION_STYLE: DescriptionStyle;
19
- export declare const DEFAULT_DESCRIPTION: Description;
20
- export declare const DEFAULT_CAROUSEL_DESCRIPTION: Description;
21
- export declare const DEFAULT_CURRENT_IMAGE_CONFIG: CurrentImageConfig;
22
- export declare const DEFAULT_CAROUSEL_IMAGE_CONFIG: CarouselImageConfig;
23
- export declare const DEFAULT_CURRENT_CAROUSEL_CONFIG: CarouselConfig;
24
- export declare const DEFAULT_CURRENT_CAROUSEL_PLAY: PlayConfig;
25
- export declare const DEFAULT_CAROUSEL_BREAKPOINTS: BreakpointsConfig;
26
- export declare const DEFAULT_CAROUSEL_PREVIEWS_CONFIG: CarouselPreviewConfig;
27
- export declare const DEFAULT_SLIDE_CONFIG: SlideConfig;
28
- export declare const DEFAULT_PREVIEW_CONFIG: PreviewConfig;
29
- /**
30
- * Service to handle library configuration in a unique place
31
- */
32
- export declare class ConfigService {
33
- configMap: Map<number, LibConfig>;
34
- getConfig(id: number): LibConfig | undefined;
35
- setConfig(id: number, obj: LibConfig | undefined): void;
36
- private initIfNotExists;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService, never>;
38
- static ɵprov: i0.ɵɵInjectableDeclaration<ConfigService>;
39
- }
@@ -1,25 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * Service to check if the provided id is unique
4
- */
5
- export declare class IdValidatorService {
6
- ids: Map<any, any>;
7
- /**
8
- * Method to check and reserve an id for the current instance of the library.
9
- * In this way, no other instances can use the same id.
10
- * @param galleryId number or undefined that represents the unique id of the gallery.
11
- * @return boolean true if success. false is never returned, instead an exception is thrown
12
- * @throws a error with a message if galleryId is neither unique, < 0 or an integer
13
- */
14
- checkAndAdd(galleryId: number | undefined): boolean;
15
- /**
16
- * Method to remove a reserved id. In this way you are able to use the id again for another instance of the library.
17
- * @param galleryId number or undefined that represents the unique id of the gallery.
18
- * @return boolean true if success. false is never returned, instead an exception is thrown*
19
- * @throws a error with a message if galleryId is neither integer or < 0
20
- * * this should be improved without return true, because it doesn't make sense! :(
21
- */
22
- remove(galleryId: number | undefined): boolean;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<IdValidatorService, never>;
24
- static ɵprov: i0.ɵɵInjectableDeclaration<IdValidatorService>;
25
- }