@ks89/angular-modal-gallery 9.0.1 → 9.1.0-beta.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 +2 -1
- package/esm2020/lib/components/modal-gallery/modal-gallery.component.mjs +4 -3
- package/esm2020/lib/components/previews/previews.component.mjs +8 -3
- package/esm2020/lib/model/modal-gallery-config.interface.mjs +1 -1
- package/fesm2015/ks89-angular-modal-gallery.mjs +10 -4
- package/fesm2015/ks89-angular-modal-gallery.mjs.map +1 -1
- package/fesm2020/ks89-angular-modal-gallery.mjs +10 -4
- package/fesm2020/ks89-angular-modal-gallery.mjs.map +1 -1
- package/lib/components/modal-gallery/modal-gallery.component.d.ts +5 -1
- package/lib/components/previews/previews.component.d.ts +9 -2
- package/lib/model/modal-gallery-config.interface.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
3
|
import { ImageModalEvent } from '../../model/image.class';
|
|
4
4
|
import { ConfigService } from '../../services/config.service';
|
|
@@ -76,6 +76,10 @@ export declare class ModalGalleryComponent implements OnInit, OnDestroy {
|
|
|
76
76
|
* Array of `InternalLibImage` representing the model of this library with all images, thumbs and so on.
|
|
77
77
|
*/
|
|
78
78
|
images: InternalLibImage[];
|
|
79
|
+
/**
|
|
80
|
+
* Optional template reference to use to render previews.
|
|
81
|
+
*/
|
|
82
|
+
customPreviewsTemplate?: TemplateRef<HTMLElement>;
|
|
79
83
|
/**
|
|
80
84
|
* `Image` that is visible right now.
|
|
81
85
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import { AccessibleComponent } from '../accessible.component';
|
|
3
3
|
import { AccessibilityConfig } from '../../model/accessibility.interface';
|
|
4
4
|
import { Image, ImageEvent } from '../../model/image.class';
|
|
@@ -28,6 +28,13 @@ export declare class PreviewsComponent extends AccessibleComponent implements On
|
|
|
28
28
|
* thumbs and so on.
|
|
29
29
|
*/
|
|
30
30
|
images: InternalLibImage[] | undefined;
|
|
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>;
|
|
31
38
|
/**
|
|
32
39
|
* Output to emit the clicked preview. The payload contains the `ImageEvent` associated to the clicked preview.
|
|
33
40
|
*/
|
|
@@ -152,5 +159,5 @@ export declare class PreviewsComponent extends AccessibleComponent implements On
|
|
|
152
159
|
*/
|
|
153
160
|
private updatePreviews;
|
|
154
161
|
static ɵfac: i0.ɵɵFactoryDeclaration<PreviewsComponent, never>;
|
|
155
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PreviewsComponent, "ks-previews", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; }, { "clickPreview": "clickPreview"; }, never, never>;
|
|
162
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PreviewsComponent, "ks-previews", never, { "id": "id"; "currentImage": "currentImage"; "images": "images"; "customTemplate": "customTemplate"; }, { "clickPreview": "clickPreview"; }, never, never>;
|
|
156
163
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
1
2
|
import { Image } from './image.class';
|
|
2
3
|
import { ModalLibConfig } from './lib-config.interface';
|
|
3
4
|
export interface ModalGalleryConfig {
|
|
@@ -5,4 +6,11 @@ export interface ModalGalleryConfig {
|
|
|
5
6
|
images: Image[];
|
|
6
7
|
currentImage: Image;
|
|
7
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>;
|
|
8
16
|
}
|