@ks89/angular-modal-gallery 11.1.0 → 11.1.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.
- package/CHANGELOG.md +7 -0
- package/README.md +6 -15
- package/esm2022/lib/components/modal-gallery/attach-to-overlay.service.mjs +43 -0
- package/esm2022/lib/components/modal-gallery/modal-gallery.service.mjs +12 -31
- package/esm2022/lib/modal-gallery.module.mjs +23 -3
- package/fesm2022/ks89-angular-modal-gallery.mjs +3386 -3348
- package/fesm2022/ks89-angular-modal-gallery.mjs.map +1 -1
- package/lib/components/components.d.ts +1 -1
- package/lib/components/modal-gallery/attach-to-overlay.service.d.ts +20 -0
- package/lib/components/modal-gallery/modal-gallery.service.d.ts +23 -12
- package/package.json +1 -1
|
@@ -12,4 +12,4 @@ import { ModalGalleryComponent } from './modal-gallery/modal-gallery.component';
|
|
|
12
12
|
/**
|
|
13
13
|
* Array of all components.
|
|
14
14
|
*/
|
|
15
|
-
export declare const COMPONENTS: (typeof AccessibleComponent | typeof
|
|
15
|
+
export declare const COMPONENTS: (typeof AccessibleComponent | typeof CarouselComponent | typeof CarouselPreviewsComponent | typeof UpperButtonsComponent | typeof DotsComponent | typeof PreviewsComponent | typeof CurrentImageComponent | typeof LoadingSpinnerComponent | typeof PlainGalleryComponent | typeof ModalGalleryComponent)[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { ModalGalleryService } from './modal-gallery.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AttachToOverlayService {
|
|
5
|
+
private injector;
|
|
6
|
+
private modalGalleryService;
|
|
7
|
+
constructor(injector: Injector, modalGalleryService: ModalGalleryService);
|
|
8
|
+
/**
|
|
9
|
+
* To be called by a provider with the APP_INITIALIZER token.
|
|
10
|
+
*/
|
|
11
|
+
initialize(): void;
|
|
12
|
+
/**
|
|
13
|
+
* Private method to attach ModalGalleryComponent to the overlay.
|
|
14
|
+
* @param payload {@link AttachToOverlayPayload} with all necessary information
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
private attachToOverlay;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttachToOverlayService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AttachToOverlayService>;
|
|
20
|
+
}
|
|
@@ -1,19 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
|
|
3
3
|
import { ModalGalleryRef } from './modal-gallery-ref';
|
|
4
4
|
import { Image, ImageModalEvent } from '../../model/image.class';
|
|
5
5
|
import { ConfigService } from '../../services/config.service';
|
|
6
6
|
import { ButtonEvent } from '../../model/buttons-config.interface';
|
|
7
7
|
import { ModalGalleryConfig } from '../../model/modal-gallery-config.interface';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Payload to be emitted via {@link triggerAttachToOverlay} to enable {@link AttachToOverlayService}
|
|
11
|
+
* to attach the {@link ModalGalleryComponent} to the overlay
|
|
12
|
+
*/
|
|
13
|
+
export interface AttachToOverlayPayload {
|
|
14
|
+
/**
|
|
15
|
+
* Overlay object created using Angular CDK APIs
|
|
16
|
+
*/
|
|
17
|
+
overlayRef: OverlayRef;
|
|
18
|
+
/**
|
|
19
|
+
* Dialog data to be injected into the {@link ModalGalleryComponent}
|
|
20
|
+
* contains: id, array of images, current image and optionally the configuration object
|
|
21
|
+
*/
|
|
22
|
+
config: ModalGalleryConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Object to control the dialog instance
|
|
25
|
+
*/
|
|
26
|
+
dialogRef: ModalGalleryRef;
|
|
27
|
+
}
|
|
9
28
|
export declare class ModalGalleryService {
|
|
10
|
-
private injector;
|
|
11
29
|
private overlay;
|
|
12
30
|
private configService;
|
|
13
31
|
private updateImages;
|
|
14
32
|
updateImages$: import("rxjs").Observable<Image[]>;
|
|
15
33
|
private dialogRef;
|
|
16
|
-
|
|
34
|
+
triggerAttachToOverlay: EventEmitter<AttachToOverlayPayload>;
|
|
35
|
+
constructor(overlay: Overlay, configService: ConfigService);
|
|
17
36
|
/**
|
|
18
37
|
* Method to open modal gallery passing the configuration
|
|
19
38
|
* @param config ModalGalleryConfig that contains: id, array of images, current image and optionally the configuration object
|
|
@@ -71,14 +90,6 @@ export declare class ModalGalleryService {
|
|
|
71
90
|
* @private
|
|
72
91
|
*/
|
|
73
92
|
private createOverlay;
|
|
74
|
-
/**
|
|
75
|
-
* Private method to attach ModalGalleryComponent to the overlay.
|
|
76
|
-
* @param overlayRef OverlayRef is the Overlay object created using Angular CDK APIs
|
|
77
|
-
* @param config ModalGalleryConfig that contains: id, array of images, current image and optionally the configuration object
|
|
78
|
-
* @param dialogRef ModalGalleryRef is the object to control the dialog instance
|
|
79
|
-
* @private
|
|
80
|
-
*/
|
|
81
|
-
private attachDialogContainer;
|
|
82
93
|
/**
|
|
83
94
|
* Private method to create an OverlayConfig instance
|
|
84
95
|
* @private
|