@ks89/angular-modal-gallery 9.1.0-beta.1 → 10.0.0-rc.1

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 (55) hide show
  1. package/CHANGELOG.md +49 -10
  2. package/CONTRIBUTING.md +3 -3
  3. package/LICENSE +1 -1
  4. package/README.md +19 -33
  5. package/esm2020/lib/components/accessible.component.mjs +3 -3
  6. package/esm2020/lib/components/carousel/carousel-previews/carousel-previews.component.mjs +5 -5
  7. package/esm2020/lib/components/carousel/carousel.component.mjs +10 -10
  8. package/esm2020/lib/components/current-image/current-image.component.mjs +10 -10
  9. package/esm2020/lib/components/current-image/loading-spinner/loading-spinner.component.mjs +4 -4
  10. package/esm2020/lib/components/dots/dots.component.mjs +3 -3
  11. package/esm2020/lib/components/modal-gallery/modal-gallery.component.mjs +6 -6
  12. package/esm2020/lib/components/modal-gallery/modal-gallery.service.mjs +3 -3
  13. package/esm2020/lib/components/plain-gallery/plain-gallery.component.mjs +9 -9
  14. package/esm2020/lib/components/previews/previews.component.mjs +72 -137
  15. package/esm2020/lib/components/upper-buttons/upper-buttons.component.mjs +3 -3
  16. package/esm2020/lib/directives/a-tag-bg-image.directive.mjs +3 -3
  17. package/esm2020/lib/directives/click-outside.directive.mjs +3 -3
  18. package/esm2020/lib/directives/description.directive.mjs +3 -3
  19. package/esm2020/lib/directives/direction.directive.mjs +3 -3
  20. package/esm2020/lib/directives/fallback-image.directive.mjs +3 -3
  21. package/esm2020/lib/directives/keyboard-navigation.directive.mjs +3 -3
  22. package/esm2020/lib/directives/margin.directive.mjs +3 -3
  23. package/esm2020/lib/directives/max-size.directive.mjs +3 -3
  24. package/esm2020/lib/directives/size.directive.mjs +3 -3
  25. package/esm2020/lib/directives/wrap.directive.mjs +3 -3
  26. package/esm2020/lib/modal-gallery.module.mjs +9 -9
  27. package/esm2020/lib/services/config.service.mjs +3 -3
  28. package/esm2020/lib/services/id-validator.service.mjs +3 -3
  29. package/esm2020/lib/services/keyboard.service.mjs +3 -3
  30. package/fesm2015/ks89-angular-modal-gallery.mjs +257 -318
  31. package/fesm2015/ks89-angular-modal-gallery.mjs.map +1 -1
  32. package/fesm2020/ks89-angular-modal-gallery.mjs +254 -318
  33. package/fesm2020/ks89-angular-modal-gallery.mjs.map +1 -1
  34. package/{ks89-angular-modal-gallery.d.ts → index.d.ts} +0 -0
  35. package/lib/components/accessible.component.d.ts +1 -1
  36. package/lib/components/carousel/carousel-previews/carousel-previews.component.d.ts +1 -1
  37. package/lib/components/carousel/carousel.component.d.ts +1 -1
  38. package/lib/components/current-image/current-image.component.d.ts +1 -1
  39. package/lib/components/current-image/loading-spinner/loading-spinner.component.d.ts +1 -1
  40. package/lib/components/dots/dots.component.d.ts +1 -1
  41. package/lib/components/modal-gallery/modal-gallery.component.d.ts +1 -1
  42. package/lib/components/plain-gallery/plain-gallery.component.d.ts +1 -1
  43. package/lib/components/previews/previews.component.d.ts +13 -21
  44. package/lib/components/upper-buttons/upper-buttons.component.d.ts +1 -1
  45. package/lib/directives/a-tag-bg-image.directive.d.ts +1 -1
  46. package/lib/directives/click-outside.directive.d.ts +1 -1
  47. package/lib/directives/description.directive.d.ts +1 -1
  48. package/lib/directives/direction.directive.d.ts +1 -1
  49. package/lib/directives/fallback-image.directive.d.ts +1 -1
  50. package/lib/directives/keyboard-navigation.directive.d.ts +1 -1
  51. package/lib/directives/margin.directive.d.ts +1 -1
  52. package/lib/directives/max-size.directive.d.ts +1 -1
  53. package/lib/directives/size.directive.d.ts +1 -1
  54. package/lib/directives/wrap.directive.d.ts +1 -1
  55. package/package.json +9 -9
File without changes
@@ -46,5 +46,5 @@ export declare class AccessibleComponent {
46
46
  */
47
47
  private handleMouseNavigationEvent;
48
48
  static ɵfac: i0.ɵɵFactoryDeclaration<AccessibleComponent, never>;
49
- static ɵcmp: i0.ɵɵComponentDeclaration<AccessibleComponent, "ks-accessible", never, {}, {}, never, never>;
49
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccessibleComponent, "ks-accessible", never, {}, {}, never, never, false>;
50
50
  }
@@ -191,5 +191,5 @@ export declare class CarouselPreviewsComponent extends AccessibleComponent imple
191
191
  */
192
192
  private isPreventSliding;
193
193
  static ɵfac: i0.ɵɵFactoryDeclaration<CarouselPreviewsComponent, never>;
194
- static ɵcmp: i0.ɵɵComponentDeclaration<CarouselPreviewsComponent, "ks-carousel-previews", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; }, { "clickPreview": "clickPreview"; }, never, never>;
194
+ static ɵcmp: i0.ɵɵComponentDeclaration<CarouselPreviewsComponent, "ks-carousel-previews", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; }, { "clickPreview": "clickPreview"; }, never, never, false>;
195
195
  }
@@ -275,5 +275,5 @@ export declare class CarouselComponent extends AccessibleComponent implements On
275
275
  */
276
276
  private isPreventSliding;
277
277
  static ɵfac: i0.ɵɵFactoryDeclaration<CarouselComponent, never>;
278
- static ɵcmp: i0.ɵɵComponentDeclaration<CarouselComponent, "ks-carousel", never, { "id": "id"; "images": "images"; "config": "config"; }, { "clickImage": "clickImage"; "changeImage": "changeImage"; "firstImage": "firstImage"; "lastImage": "lastImage"; }, never, ["*"]>;
278
+ static ɵcmp: i0.ɵɵComponentDeclaration<CarouselComponent, "ks-carousel", never, { "id": "id"; "images": "images"; "config": "config"; }, { "clickImage": "clickImage"; "changeImage": "changeImage"; "firstImage": "firstImage"; "lastImage": "lastImage"; }, never, ["*"], false>;
279
279
  }
@@ -282,5 +282,5 @@ export declare class CurrentImageComponent extends AccessibleComponent implement
282
282
  */
283
283
  private updateIndexes;
284
284
  static ɵfac: i0.ɵɵFactoryDeclaration<CurrentImageComponent, never>;
285
- static ɵcmp: i0.ɵɵComponentDeclaration<CurrentImageComponent, "ks-current-image", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; "isOpen": "isOpen"; }, { "loadImage": "loadImage"; "changeImage": "changeImage"; "closeGallery": "closeGallery"; }, never, never>;
285
+ static ɵcmp: i0.ɵɵComponentDeclaration<CurrentImageComponent, "ks-current-image", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; "isOpen": "isOpen"; }, { "loadImage": "loadImage"; "changeImage": "changeImage"; "closeGallery": "closeGallery"; }, never, never, false>;
286
286
  }
@@ -51,5 +51,5 @@ export declare class LoadingSpinnerComponent {
51
51
  */
52
52
  loadingExplosingSquares: LoadingType;
53
53
  static ɵfac: i0.ɵɵFactoryDeclaration<LoadingSpinnerComponent, never>;
54
- static ɵcmp: i0.ɵɵComponentDeclaration<LoadingSpinnerComponent, "ks-loading-spinner", never, { "loadingConfig": "loadingConfig"; "accessibilityConfig": "accessibilityConfig"; }, {}, never, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoadingSpinnerComponent, "ks-loading-spinner", never, { "loadingConfig": "loadingConfig"; "accessibilityConfig": "accessibilityConfig"; }, {}, never, never, false>;
55
55
  }
@@ -77,5 +77,5 @@ export declare class DotsComponent extends AccessibleComponent implements OnInit
77
77
  */
78
78
  trackById(index: number, item: Image): number;
79
79
  static ɵfac: i0.ɵɵFactoryDeclaration<DotsComponent, never>;
80
- static ɵcmp: i0.ɵɵComponentDeclaration<DotsComponent, "ks-dots", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; "dotsConfig": "dotsConfig"; }, { "clickDot": "clickDot"; }, never, never>;
80
+ static ɵcmp: i0.ɵɵComponentDeclaration<DotsComponent, "ks-dots", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; "dotsConfig": "dotsConfig"; }, { "clickDot": "clickDot"; }, never, never, false>;
81
81
  }
@@ -248,5 +248,5 @@ export declare class ModalGalleryComponent implements OnInit, OnDestroy {
248
248
  */
249
249
  private emitBoundaryEvent;
250
250
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalGalleryComponent, never>;
251
- static ɵcmp: i0.ɵɵComponentDeclaration<ModalGalleryComponent, "ks-modal-gallery", never, {}, {}, never, never>;
251
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalGalleryComponent, "ks-modal-gallery", never, {}, {}, never, never, false>;
252
252
  }
@@ -131,5 +131,5 @@ export declare class PlainGalleryComponent extends AccessibleComponent implement
131
131
  */
132
132
  private initImageGrid;
133
133
  static ɵfac: i0.ɵɵFactoryDeclaration<PlainGalleryComponent, never>;
134
- static ɵcmp: i0.ɵɵComponentDeclaration<PlainGalleryComponent, "ks-plain-gallery", never, { "id": "id"; "images": "images"; "config": "config"; }, { "clickImage": "clickImage"; }, never, never>;
134
+ static ɵcmp: i0.ɵɵComponentDeclaration<PlainGalleryComponent, "ks-plain-gallery", never, { "id": "id"; "images": "images"; "config": "config"; }, { "clickImage": "clickImage"; }, never, never, false>;
135
135
  }
@@ -69,11 +69,11 @@ export declare class PreviewsComponent extends AccessibleComponent implements On
69
69
  */
70
70
  previews: InternalLibImage[];
71
71
  /**
72
- * Start index of the input images used to display previews.
72
+ * Start index (included) of the input images used to display previews.
73
73
  */
74
74
  start: number;
75
75
  /**
76
- * End index of the input images used to display previews.
76
+ * End index (excluded) of the input images used to display previews.
77
77
  */
78
78
  end: number;
79
79
  defaultPreviewSize: Size;
@@ -121,6 +121,16 @@ export declare class PreviewsComponent extends AccessibleComponent implements On
121
121
  * @returns number the id of the item
122
122
  */
123
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;
124
134
  /**
125
135
  * Private method to init previews based on the currentImage and the full array of images.
126
136
  * The current image in mandatory to show always the current preview (as highlighted).
@@ -128,14 +138,6 @@ export declare class PreviewsComponent extends AccessibleComponent implements On
128
138
  * @param InternalLibImage[] images is the array of all images.
129
139
  */
130
140
  private initPreviews;
131
- /**
132
- * Private method to init both `start` and `end` to the beginning.
133
- */
134
- private setBeginningIndexesPreviews;
135
- /**
136
- * Private method to init both `start` and `end` to the end.
137
- */
138
- private setEndIndexesPreviews;
139
141
  /**
140
142
  * Private method to update both `start` and `end` based on the currentImage.
141
143
  */
@@ -148,16 +150,6 @@ export declare class PreviewsComponent extends AccessibleComponent implements On
148
150
  * Private method to update the visible previews navigating to the left (previous).
149
151
  */
150
152
  private previous;
151
- /**
152
- * Private method to block/permit sliding between previews.
153
- * @param number boundaryIndex is the first or the last index of `images` input array
154
- * @returns boolean if true block sliding, otherwise not
155
- */
156
- private isPreventSliding;
157
- /**
158
- * Private method to handle navigation changing the previews array and other variables.
159
- */
160
- private updatePreviews;
161
153
  static ɵfac: i0.ɵɵFactoryDeclaration<PreviewsComponent, never>;
162
- static ɵcmp: i0.ɵɵComponentDeclaration<PreviewsComponent, "ks-previews", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; "customTemplate": "customTemplate"; }, { "clickPreview": "clickPreview"; }, never, never>;
154
+ static ɵcmp: i0.ɵɵComponentDeclaration<PreviewsComponent, "ks-previews", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; "customTemplate": "customTemplate"; }, { "clickPreview": "clickPreview"; }, never, never, false>;
163
155
  }
@@ -128,5 +128,5 @@ export declare class UpperButtonsComponent extends AccessibleComponent implement
128
128
  */
129
129
  private validateCustomButtons;
130
130
  static ɵfac: i0.ɵɵFactoryDeclaration<UpperButtonsComponent, never>;
131
- static ɵcmp: i0.ɵɵComponentDeclaration<UpperButtonsComponent, "ks-upper-buttons", never, { "id": "id"; "currentImage": "currentImage"; }, { "refresh": "refresh"; "delete": "delete"; "navigate": "navigate"; "download": "download"; "closeButton": "closeButton"; "fullscreen": "fullscreen"; "customEmit": "customEmit"; }, never, never>;
131
+ static ɵcmp: i0.ɵɵComponentDeclaration<UpperButtonsComponent, "ks-upper-buttons", never, { "id": "id"; "currentImage": "currentImage"; }, { "refresh": "refresh"; "delete": "delete"; "navigate": "navigate"; "download": "download"; "closeButton": "closeButton"; "fullscreen": "fullscreen"; "customEmit": "customEmit"; }, never, never, false>;
132
132
  }
@@ -34,5 +34,5 @@ export declare class ATagBgImageDirective implements OnInit, OnChanges {
34
34
  */
35
35
  private applyStyle;
36
36
  static ɵfac: i0.ɵɵFactoryDeclaration<ATagBgImageDirective, never>;
37
- static ɵdir: i0.ɵɵDirectiveDeclaration<ATagBgImageDirective, "[ksATagBgImage]", never, { "image": "image"; "style": "style"; }, {}, never>;
37
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ATagBgImageDirective, "[ksATagBgImage]", never, { "image": "image"; "style": "style"; }, {}, never, never, false>;
38
38
  }
@@ -20,5 +20,5 @@ export declare class ClickOutsideDirective {
20
20
  */
21
21
  onClick(event: MouseEvent): void;
22
22
  static ɵfac: i0.ɵɵFactoryDeclaration<ClickOutsideDirective, never>;
23
- static ɵdir: i0.ɵɵDirectiveDeclaration<ClickOutsideDirective, "[ksClickOutside]", never, { "clickOutsideEnable": "clickOutsideEnable"; }, { "clickOutside": "clickOutside"; }, never>;
23
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ClickOutsideDirective, "[ksClickOutside]", never, { "clickOutsideEnable": "clickOutsideEnable"; }, { "clickOutside": "clickOutside"; }, never, never, false>;
24
24
  }
@@ -29,5 +29,5 @@ export declare class DescriptionDirective implements OnInit, OnChanges {
29
29
  */
30
30
  private applyStyle;
31
31
  static ɵfac: i0.ɵɵFactoryDeclaration<DescriptionDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<DescriptionDirective, "[ksDescription]", never, { "description": "description"; }, {}, never>;
32
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DescriptionDirective, "[ksDescription]", never, { "description": "description"; }, {}, never, never, false>;
33
33
  }
@@ -32,5 +32,5 @@ export declare class DirectionDirective implements OnInit, OnChanges {
32
32
  */
33
33
  private applyStyle;
34
34
  static ɵfac: i0.ɵɵFactoryDeclaration<DirectionDirective, never>;
35
- static ɵdir: i0.ɵɵDirectiveDeclaration<DirectionDirective, "[ksDirection]", never, { "direction": "direction"; "justify": "justify"; }, {}, never>;
35
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DirectionDirective, "[ksDirection]", never, { "direction": "direction"; "justify": "justify"; }, {}, never, never, false>;
36
36
  }
@@ -12,5 +12,5 @@ export declare class FallbackImageDirective {
12
12
  constructor(renderer: Renderer2, el: ElementRef);
13
13
  onError(): void;
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<FallbackImageDirective, never>;
15
- static ɵdir: i0.ɵɵDirectiveDeclaration<FallbackImageDirective, "[ksFallbackImage]", never, { "fallbackImg": "fallbackImg"; }, { "fallbackApplied": "fallbackApplied"; }, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FallbackImageDirective, "[ksFallbackImage]", never, { "fallbackImg": "fallbackImg"; }, { "fallbackApplied": "fallbackApplied"; }, never, never, false>;
16
16
  }
@@ -11,5 +11,5 @@ export declare class KeyboardNavigationDirective {
11
11
  */
12
12
  onKeyDown(e: KeyboardEvent): void;
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<KeyboardNavigationDirective, never>;
14
- static ɵdir: i0.ɵɵDirectiveDeclaration<KeyboardNavigationDirective, "[ksKeyboardNavigation]", never, { "isOpen": "isOpen"; }, { "keyboardNavigation": "keyboardNavigation"; }, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KeyboardNavigationDirective, "[ksKeyboardNavigation]", never, { "isOpen": "isOpen"; }, { "keyboardNavigation": "keyboardNavigation"; }, never, never, false>;
15
15
  }
@@ -40,5 +40,5 @@ export declare class MarginDirective implements OnInit, OnChanges {
40
40
  */
41
41
  private applyStyle;
42
42
  static ɵfac: i0.ɵɵFactoryDeclaration<MarginDirective, never>;
43
- static ɵdir: i0.ɵɵDirectiveDeclaration<MarginDirective, "[ksMargin]", never, { "marginLeft": "marginLeft"; "marginRight": "marginRight"; "marginTop": "marginTop"; "marginBottom": "marginBottom"; }, {}, never>;
43
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MarginDirective, "[ksMargin]", never, { "marginLeft": "marginLeft"; "marginRight": "marginRight"; "marginTop": "marginTop"; "marginBottom": "marginBottom"; }, {}, never, never, false>;
44
44
  }
@@ -29,5 +29,5 @@ export declare class MaxSizeDirective implements OnInit, OnChanges {
29
29
  */
30
30
  private applyStyle;
31
31
  static ɵfac: i0.ɵɵFactoryDeclaration<MaxSizeDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<MaxSizeDirective, "[ksMaxSize]", never, { "maxSizeConfig": "maxSizeConfig"; }, {}, never>;
32
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MaxSizeDirective, "[ksMaxSize]", never, { "maxSizeConfig": "maxSizeConfig"; }, {}, never, never, false>;
33
33
  }
@@ -29,5 +29,5 @@ export declare class SizeDirective implements OnInit, OnChanges {
29
29
  */
30
30
  private applyStyle;
31
31
  static ɵfac: i0.ɵɵFactoryDeclaration<SizeDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<SizeDirective, "[ksSize]", never, { "sizeConfig": "sizeConfig"; }, {}, never>;
32
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SizeDirective, "[ksSize]", never, { "sizeConfig": "sizeConfig"; }, {}, never, never, false>;
33
33
  }
@@ -32,5 +32,5 @@ export declare class WrapDirective implements OnInit, OnChanges {
32
32
  */
33
33
  private applyStyle;
34
34
  static ɵfac: i0.ɵɵFactoryDeclaration<WrapDirective, never>;
35
- static ɵdir: i0.ɵɵDirectiveDeclaration<WrapDirective, "[ksWrap]", never, { "wrap": "wrap"; "width": "width"; }, {}, never>;
35
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WrapDirective, "[ksWrap]", never, { "wrap": "wrap"; "width": "width"; }, {}, never, never, false>;
36
36
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@ks89/angular-modal-gallery",
3
- "version": "9.1.0-beta.1",
3
+ "version": "10.0.0-rc.1",
4
4
  "description": "Image gallery for Angular",
5
5
  "license": "MIT",
6
6
  "author": "Stefano Cappa",
7
7
  "engines": {
8
- "node": ">=16.3.0",
8
+ "node": ">=16.13.0",
9
9
  "npm": ">=7.16.0"
10
10
  },
11
11
  "homepage": "https://ks89.github.io/angular-modal-gallery-2021-v9.github.io/",
@@ -13,13 +13,13 @@
13
13
  "tslib": ">=2.3.0"
14
14
  },
15
15
  "peerDependencies": {
16
- "@angular/platform-browser": ">=13.0.0",
17
- "@angular/common": ">=13.0.0",
18
- "@angular/core": ">=13.0.0",
19
- "@angular/cdk": ">=13.0.0",
16
+ "@angular/platform-browser": ">=14.0.0",
17
+ "@angular/common": ">=14.0.0",
18
+ "@angular/core": ">=14.0.0",
19
+ "@angular/cdk": ">=14.0.0",
20
20
  "hammerjs": ">=2.0.8",
21
21
  "mousetrap": ">=1.6.5",
22
- "rxjs": ">=7.4.0"
22
+ "rxjs": ">=7.5.0"
23
23
  },
24
24
  "keywords": [
25
25
  "angular-modal-gallery",
@@ -59,13 +59,13 @@
59
59
  "esm2020": "esm2020/ks89-angular-modal-gallery.mjs",
60
60
  "fesm2020": "fesm2020/ks89-angular-modal-gallery.mjs",
61
61
  "fesm2015": "fesm2015/ks89-angular-modal-gallery.mjs",
62
- "typings": "ks89-angular-modal-gallery.d.ts",
62
+ "typings": "index.d.ts",
63
63
  "exports": {
64
64
  "./package.json": {
65
65
  "default": "./package.json"
66
66
  },
67
67
  ".": {
68
- "types": "./ks89-angular-modal-gallery.d.ts",
68
+ "types": "./index.d.ts",
69
69
  "esm2020": "./esm2020/ks89-angular-modal-gallery.mjs",
70
70
  "es2020": "./fesm2020/ks89-angular-modal-gallery.mjs",
71
71
  "es2015": "./fesm2015/ks89-angular-modal-gallery.mjs",