@ks89/angular-modal-gallery 13.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.
- package/CHANGELOG.md +26 -0
- package/CONTRIBUTING.md +3 -3
- package/LICENSE +1 -1
- package/README.md +8 -6
- package/fesm2022/ks89-angular-modal-gallery.mjs +833 -922
- package/fesm2022/ks89-angular-modal-gallery.mjs.map +1 -1
- package/index.d.ts +2528 -3
- package/package.json +8 -8
- package/lib/components/accessibility-default.d.ts +0 -5
- package/lib/components/accessible.component.d.ts +0 -50
- package/lib/components/carousel/carousel-previews/carousel-previews.component.d.ts +0 -195
- package/lib/components/carousel/carousel.component.d.ts +0 -276
- package/lib/components/components.d.ts +0 -15
- package/lib/components/current-image/current-image.component.d.ts +0 -282
- package/lib/components/current-image/loading-spinner/loading-spinner.component.d.ts +0 -55
- package/lib/components/dots/dots.component.d.ts +0 -81
- package/lib/components/modal-gallery/attach-to-overlay.service.d.ts +0 -20
- package/lib/components/modal-gallery/modal-gallery-ref.d.ts +0 -64
- package/lib/components/modal-gallery/modal-gallery.component.d.ts +0 -246
- package/lib/components/modal-gallery/modal-gallery.service.d.ts +0 -100
- package/lib/components/modal-gallery/modal-gallery.tokens.d.ts +0 -3
- package/lib/components/plain-gallery/plain-gallery.component.d.ts +0 -135
- package/lib/components/previews/previews.component.d.ts +0 -155
- package/lib/components/upper-buttons/upper-buttons-default.d.ts +0 -29
- package/lib/components/upper-buttons/upper-buttons.component.d.ts +0 -132
- package/lib/directives/a-tag-bg-image.directive.d.ts +0 -38
- package/lib/directives/click-outside.directive.d.ts +0 -24
- package/lib/directives/description.directive.d.ts +0 -33
- package/lib/directives/direction.directive.d.ts +0 -36
- package/lib/directives/directives.d.ts +0 -15
- package/lib/directives/fallback-image.directive.d.ts +0 -16
- package/lib/directives/keyboard-navigation.directive.d.ts +0 -24
- package/lib/directives/margin.directive.d.ts +0 -44
- package/lib/directives/max-size.directive.d.ts +0 -33
- package/lib/directives/size.directive.d.ts +0 -33
- package/lib/directives/swipe.directive.d.ts +0 -35
- package/lib/directives/wrap.directive.d.ts +0 -36
- package/lib/modal-gallery.module.d.ts +0 -32
- package/lib/model/accessibility.interface.d.ts +0 -40
- package/lib/model/action.enum.d.ts +0 -11
- package/lib/model/buttons-config.interface.d.ts +0 -57
- package/lib/model/carousel-config.interface.d.ts +0 -11
- package/lib/model/carousel-image-config.interface.d.ts +0 -8
- package/lib/model/carousel-preview-config.interface.d.ts +0 -22
- package/lib/model/current-image-config.interface.d.ts +0 -12
- package/lib/model/description.interface.d.ts +0 -39
- package/lib/model/dots-config.interface.d.ts +0 -6
- package/lib/model/image-internal.class.d.ts +0 -9
- package/lib/model/image.class.d.ts +0 -64
- package/lib/model/interaction-event.interface.d.ts +0 -6
- package/lib/model/keyboard-config.interface.d.ts +0 -8
- package/lib/model/keyboard.enum.d.ts +0 -13
- package/lib/model/lib-config.interface.d.ts +0 -39
- package/lib/model/loading-config.interface.d.ts +0 -19
- package/lib/model/max-size.interface.d.ts +0 -8
- package/lib/model/modal-gallery-config.interface.d.ts +0 -16
- package/lib/model/plain-gallery-config.interface.d.ts +0 -57
- package/lib/model/play-config.interface.d.ts +0 -8
- package/lib/model/preview-config.interface.d.ts +0 -12
- package/lib/model/size.interface.d.ts +0 -8
- package/lib/model/slide-config.interface.d.ts +0 -17
- package/lib/services/config.service.d.ts +0 -39
- package/lib/services/id-validator.service.d.ts +0 -25
- package/lib/utils/image.util.d.ts +0 -10
- package/lib/utils/user-input.util.d.ts +0 -80
- package/public-api.d.ts +0 -36
|
@@ -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,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,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,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,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,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,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
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Image } from '../model/image.class';
|
|
2
|
-
/**
|
|
3
|
-
* Utility function to get the index of the input `image` from `arrayOfImages`
|
|
4
|
-
* @param image Image to get the index. The image 'id' must be a number >= 0
|
|
5
|
-
* @param arrayOfImages Image[] to search the image within it
|
|
6
|
-
* @returns number the index of the image. -1 if not found.
|
|
7
|
-
* @throws an Error if either image or arrayOfImages are not valid,
|
|
8
|
-
* or if the input image doesn't contain an 'id', or the 'id' is < 0
|
|
9
|
-
*/
|
|
10
|
-
export declare function getIndex(image: Image, arrayOfImages: Image[]): number;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Key of the keyboard's key `enter`
|
|
3
|
-
*/
|
|
4
|
-
export declare const ENTER_KEY: string;
|
|
5
|
-
/**
|
|
6
|
-
* Code of the keyboard's key `enter`
|
|
7
|
-
*/
|
|
8
|
-
export declare const ENTER_CODE: string;
|
|
9
|
-
/**
|
|
10
|
-
* Key of the keyboard's key `esc`
|
|
11
|
-
*/
|
|
12
|
-
export declare const ESC_KEY: string;
|
|
13
|
-
/**
|
|
14
|
-
* Code of the keyboard's key `esc`
|
|
15
|
-
*/
|
|
16
|
-
export declare const ESC_CODE: string;
|
|
17
|
-
/**
|
|
18
|
-
* Key of the keyboard's key 'right arrow'
|
|
19
|
-
*/
|
|
20
|
-
export declare const RIGHT_ARROW_KEY: string;
|
|
21
|
-
/**
|
|
22
|
-
* Code of the keyboard's key 'right arrow'
|
|
23
|
-
*/
|
|
24
|
-
export declare const RIGHT_ARROW_CODE: string;
|
|
25
|
-
/**
|
|
26
|
-
* Key of the keyboard's key 'left arrow'
|
|
27
|
-
*/
|
|
28
|
-
export declare const LEFT_ARROW_KEY: string;
|
|
29
|
-
/**
|
|
30
|
-
* Code of the keyboard's key 'left arrow'
|
|
31
|
-
*/
|
|
32
|
-
export declare const LEFT_ARROW_CODE: string;
|
|
33
|
-
/**
|
|
34
|
-
* Key of the keyboard's key 'left arrow'
|
|
35
|
-
*/
|
|
36
|
-
export declare const UP_ARROW_KEY: string;
|
|
37
|
-
/**
|
|
38
|
-
* Code of the keyboard's key 'left arrow'
|
|
39
|
-
*/
|
|
40
|
-
export declare const UP_ARROW_CODE: string;
|
|
41
|
-
/**
|
|
42
|
-
* Key of the keyboard's key 'left arrow'
|
|
43
|
-
*/
|
|
44
|
-
export declare const DOWN_ARROW_KEY: string;
|
|
45
|
-
/**
|
|
46
|
-
* Code of the keyboard's key 'left arrow'
|
|
47
|
-
*/
|
|
48
|
-
export declare const DOWN_ARROW_CODE: string;
|
|
49
|
-
/**
|
|
50
|
-
* Key of the keyboard's key `space`
|
|
51
|
-
*/
|
|
52
|
-
export declare const SPACE_KEY: string;
|
|
53
|
-
/**
|
|
54
|
-
* Code of the keyboard's key `space`
|
|
55
|
-
*/
|
|
56
|
-
export declare const SPACE_CODE: string;
|
|
57
|
-
/**
|
|
58
|
-
* Const to represent the right direction
|
|
59
|
-
*/
|
|
60
|
-
export declare const DIRECTION_RIGHT: string;
|
|
61
|
-
/**
|
|
62
|
-
* Const to represent the left direction
|
|
63
|
-
*/
|
|
64
|
-
export declare const DIRECTION_LEFT: string;
|
|
65
|
-
/**
|
|
66
|
-
* Keycode of the main mouse button
|
|
67
|
-
*/
|
|
68
|
-
export declare const MOUSE_MAIN_BUTTON_CLICK = 0;
|
|
69
|
-
/**
|
|
70
|
-
* Const NEXT
|
|
71
|
-
*/
|
|
72
|
-
export declare const NEXT = 1;
|
|
73
|
-
/**
|
|
74
|
-
* Const PREV
|
|
75
|
-
*/
|
|
76
|
-
export declare const PREV = -1;
|
|
77
|
-
/**
|
|
78
|
-
* Const NOTHING to represents a situation when it isn't both NEXT and PREV
|
|
79
|
-
*/
|
|
80
|
-
export declare const NOTHING = 0;
|
package/public-api.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Index file to export all interfaces, enums, classes and so on.
|
|
3
|
-
* This file represents the public apis.
|
|
4
|
-
*/
|
|
5
|
-
export { GalleryModule } from './lib/modal-gallery.module';
|
|
6
|
-
export { Action } from './lib/model/action.enum';
|
|
7
|
-
export { Image, ImageEvent, ImageModalEvent } from './lib/model/image.class';
|
|
8
|
-
export type { PlainImage, ModalImage } from './lib/model/image.class';
|
|
9
|
-
export { DescriptionStrategy } from './lib/model/description.interface';
|
|
10
|
-
export type { Description } from './lib/model/description.interface';
|
|
11
|
-
export type { KeyboardConfig } from './lib/model/keyboard-config.interface';
|
|
12
|
-
export type { DotsConfig } from './lib/model/dots-config.interface';
|
|
13
|
-
export type { PreviewConfig } from './lib/model/preview-config.interface';
|
|
14
|
-
export type { AccessibilityConfig } from './lib/model/accessibility.interface';
|
|
15
|
-
export type { BreakpointsConfig, CarouselPreviewConfig } from './lib/model/carousel-preview-config.interface';
|
|
16
|
-
export type { CarouselConfig } from './lib/model/carousel-config.interface';
|
|
17
|
-
export type { PlayConfig } from './lib/model/play-config.interface';
|
|
18
|
-
export type { CarouselImageConfig } from './lib/model/carousel-image-config.interface';
|
|
19
|
-
export type { Size } from './lib/model/size.interface';
|
|
20
|
-
export { ButtonsStrategy, ButtonType } from './lib/model/buttons-config.interface';
|
|
21
|
-
export type { ButtonsConfig, ButtonEvent } from './lib/model/buttons-config.interface';
|
|
22
|
-
export type { ModalLibConfig, PlainLibConfig, CarouselLibConfig } from './lib/model/lib-config.interface';
|
|
23
|
-
export type { ModalGalleryConfig } from './lib/model/modal-gallery-config.interface';
|
|
24
|
-
export type { CurrentImageConfig } from './lib/model/current-image-config.interface';
|
|
25
|
-
export { LoadingType } from './lib/model/loading-config.interface';
|
|
26
|
-
export type { LoadingConfig } from './lib/model/loading-config.interface';
|
|
27
|
-
export type { InteractionEvent } from './lib/model/interaction-event.interface';
|
|
28
|
-
export { KS_DEFAULT_ACCESSIBILITY_CONFIG } from './lib/components/accessibility-default';
|
|
29
|
-
export { KS_DEFAULT_BTN_FULL_SCREEN, KS_DEFAULT_BTN_CLOSE, KS_DEFAULT_BTN_DELETE, KS_DEFAULT_BTN_DOWNLOAD, KS_DEFAULT_BTN_EXTURL, KS_DEFAULT_SIZE } from './lib/components/upper-buttons/upper-buttons-default';
|
|
30
|
-
export { LineLayout, GridLayout, PlainGalleryStrategy } from './lib/model/plain-gallery-config.interface';
|
|
31
|
-
export type { PlainGalleryConfig, PlainGalleryLayout, BreakConfig } from './lib/model/plain-gallery-config.interface';
|
|
32
|
-
export { ModalGalleryComponent } from './lib/components/modal-gallery/modal-gallery.component';
|
|
33
|
-
export { PlainGalleryComponent } from './lib/components/plain-gallery/plain-gallery.component';
|
|
34
|
-
export { CarouselComponent } from './lib/components/carousel/carousel.component';
|
|
35
|
-
export { ModalGalleryService } from './lib/components/modal-gallery/modal-gallery.service';
|
|
36
|
-
export { ModalGalleryRef } from './lib/components/modal-gallery/modal-gallery-ref';
|