@udilhan/ngx-photo-gallery 1.5.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 (33) hide show
  1. package/README.md +110 -0
  2. package/esm2020/lib/components/lightbox/lightbox.component.mjs +15 -0
  3. package/esm2020/lib/directives/photo-gallery-group.directive.mjs +165 -0
  4. package/esm2020/lib/directives/photo-gallery.directive.mjs +43 -0
  5. package/esm2020/lib/interfaces/config.mjs +3 -0
  6. package/esm2020/lib/interfaces/photoswipe.mjs +2 -0
  7. package/esm2020/lib/photo-gallery.module.mjs +32 -0
  8. package/esm2020/lib/services/lightbox.service.mjs +38 -0
  9. package/esm2020/public-api.mjs +7 -0
  10. package/esm2020/twogate-ngx-photo-gallery.mjs +5 -0
  11. package/fesm2015/twogate-ngx-photo-gallery.mjs +294 -0
  12. package/fesm2015/twogate-ngx-photo-gallery.mjs.map +1 -0
  13. package/fesm2020/twogate-ngx-photo-gallery.mjs +291 -0
  14. package/fesm2020/twogate-ngx-photo-gallery.mjs.map +1 -0
  15. package/index.d.ts +6 -0
  16. package/lib/components/lightbox/lightbox.component.d.ts +9 -0
  17. package/lib/components/lightbox/lightbox.component.d.ts.map +1 -0
  18. package/lib/directives/photo-gallery-group.directive.d.ts +42 -0
  19. package/lib/directives/photo-gallery-group.directive.d.ts.map +1 -0
  20. package/lib/directives/photo-gallery.directive.d.ts +18 -0
  21. package/lib/directives/photo-gallery.directive.d.ts.map +1 -0
  22. package/lib/interfaces/config.d.ts +5 -0
  23. package/lib/interfaces/config.d.ts.map +1 -0
  24. package/lib/interfaces/photoswipe.d.ts +79 -0
  25. package/lib/interfaces/photoswipe.d.ts.map +1 -0
  26. package/lib/photo-gallery.module.d.ts +13 -0
  27. package/lib/photo-gallery.module.d.ts.map +1 -0
  28. package/lib/services/lightbox.service.d.ts +19 -0
  29. package/lib/services/lightbox.service.d.ts.map +1 -0
  30. package/package.json +47 -0
  31. package/public-api.d.ts +4 -0
  32. package/public-api.d.ts.map +1 -0
  33. package/twogate-ngx-photo-gallery.d.ts.map +1 -0
@@ -0,0 +1,5 @@
1
+ import { GalleryOptions } from './photoswipe';
2
+ export declare abstract class PhotoGalleryConfig {
3
+ defaultOptions?: GalleryOptions;
4
+ }
5
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../projects/core/src/lib/interfaces/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,8BAAsB,kBAAkB;IACtC,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC"}
@@ -0,0 +1,79 @@
1
+ export interface GalleryImage {
2
+ id: string;
3
+ src: string;
4
+ title?: string;
5
+ w: number;
6
+ h: number;
7
+ doGetSlideDimensions?: boolean;
8
+ }
9
+ export interface GalleryItem {
10
+ id: string;
11
+ element: HTMLElement;
12
+ image: GalleryImage;
13
+ }
14
+ export interface GalleryShareButton {
15
+ id: string;
16
+ label: string;
17
+ url: string;
18
+ download?: boolean;
19
+ }
20
+ export interface GalleryOptions {
21
+ index?: number;
22
+ getThumbBoundsFn?: (index: number) => {
23
+ x: number;
24
+ y: number;
25
+ w: number;
26
+ };
27
+ showHideOpacity?: boolean;
28
+ showAnimationDuration?: number;
29
+ hideAnimationDuration?: number;
30
+ bgOpacity?: number;
31
+ spacing?: number;
32
+ allowPanToNext?: boolean;
33
+ maxSpreadZoom?: number;
34
+ getDoubleTapZoom?: (isMouseClick: boolean, item: any) => number;
35
+ loop?: boolean;
36
+ pinchToClose?: boolean;
37
+ closeOnScroll?: boolean;
38
+ closeOnVerticalDrag?: boolean;
39
+ mouseUsed?: boolean;
40
+ escKey?: boolean;
41
+ arrowKeys?: boolean;
42
+ history?: boolean;
43
+ galleryUID?: number;
44
+ galleryPIDs?: boolean;
45
+ errorMsg?: string;
46
+ preload?: number[];
47
+ mainClass?: string;
48
+ getNumItemsFn?: () => any;
49
+ focus?: boolean;
50
+ isClickableElement?: (el: any) => boolean;
51
+ modal?: boolean;
52
+ barsSize?: {
53
+ top: number;
54
+ bottom?: 'auto';
55
+ };
56
+ timeToIdle?: number;
57
+ timeToIdleOutside?: number;
58
+ loadingIndicatorDelay?: number;
59
+ addCaptionHTMLFn?: (item: any, captionEl: any, isFake: boolean) => boolean;
60
+ closeEl?: boolean;
61
+ captionEl?: boolean;
62
+ fullscreenEl?: boolean;
63
+ zoomEl?: boolean;
64
+ shareEl?: boolean;
65
+ counterEl?: boolean;
66
+ arrowEl?: boolean;
67
+ preloaderEl?: boolean;
68
+ tapToClose?: boolean;
69
+ tapToToggleControls?: boolean;
70
+ clickToCloseNonZoomable?: boolean;
71
+ closeElClasses?: string[];
72
+ indexIndicatorSep?: string;
73
+ shareButtons?: GalleryShareButton[];
74
+ getImageURLForShare?: (shareButtonData: GalleryShareButton[]) => string;
75
+ getPageURLForShare?: (shareButtonData: GalleryShareButton[]) => string;
76
+ getTextForShare?: (shareButtonData: GalleryShareButton[]) => string;
77
+ parseShareButtonOut?: (shareButtonData: GalleryShareButton[], shareButtonOut: string) => string;
78
+ }
79
+ //# sourceMappingURL=photoswipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"photoswipe.d.ts","sourceRoot":"","sources":["../../../../projects/core/src/lib/interfaces/photoswipe.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE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AAmB,CAAC,EAAE,CAAC,eAAe,EAAE,kBAAkB,EAAE,EAAE,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;CACjG"}
@@ -0,0 +1,13 @@
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { PhotoGalleryConfig } from './interfaces/config';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./components/lightbox/lightbox.component";
5
+ import * as i2 from "./directives/photo-gallery.directive";
6
+ import * as i3 from "./directives/photo-gallery-group.directive";
7
+ export declare class PhotoGalleryModule {
8
+ static forRoot(config: PhotoGalleryConfig): ModuleWithProviders<PhotoGalleryModule>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<PhotoGalleryModule, never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PhotoGalleryModule, [typeof i1.LightboxComponent, typeof i2.PhotoGalleryDirective, typeof i3.PhotoGalleryGroupDirective], never, [typeof i2.PhotoGalleryDirective, typeof i3.PhotoGalleryGroupDirective]>;
11
+ static ɵinj: i0.ɵɵInjectorDeclaration<PhotoGalleryModule>;
12
+ }
13
+ //# sourceMappingURL=photo-gallery.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"photo-gallery.module.d.ts","sourceRoot":"","sources":["../../../projects/core/src/lib/photo-gallery.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAY,MAAM,eAAe,CAAC;AAK9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;;;;;AAEzD,qBAMa,kBAAkB;IAC7B,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,kBAAkB,GAAG,mBAAmB,CAAC,kBAAkB,CAAC;yCADxE,kBAAkB;0CAAlB,kBAAkB;0CAAlB,kBAAkB;CAY9B"}
@@ -0,0 +1,19 @@
1
+ import { ApplicationRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LightboxService {
4
+ private applicationRef;
5
+ private lightbox;
6
+ private lightboxElement;
7
+ constructor(applicationRef: ApplicationRef);
8
+ create(): void;
9
+ destroy(): void;
10
+ /**
11
+ * Returns the lightbox element.
12
+ * This method is called after the lightbox is created.
13
+ * @returns HTMLElement
14
+ */
15
+ getLightboxElement(): HTMLElement;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<LightboxService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<LightboxService>;
18
+ }
19
+ //# sourceMappingURL=lightbox.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lightbox.service.d.ts","sourceRoot":"","sources":["../../../../projects/core/src/lib/services/lightbox.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,cAAc,EAAmB,MAAM,eAAe,CAAC;;AAItG,qBACa,eAAe;IAId,OAAO,CAAC,cAAc;IAHlC,OAAO,CAAC,QAAQ,CAAyC;IACzD,OAAO,CAAC,eAAe,CAAoB;gBAEvB,cAAc,EAAE,cAAc;IAKlD,MAAM;IAWN,OAAO;IAQP;;;;OAIG;IACH,kBAAkB,IAAI,WAAW;yCAjCtB,eAAe;6CAAf,eAAe;CAoC3B"}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@udilhan/ngx-photo-gallery",
3
+ "version": "1.5.1",
4
+ "license": "MIT",
5
+ "repository": "https://github.com/UDilhan/ngx-photo-gallery",
6
+ "keywords": [
7
+ "angular",
8
+ "ng",
9
+ "gallery",
10
+ "lightbox",
11
+ "photo",
12
+ "image",
13
+ "touch",
14
+ "swipe",
15
+ "zoom"
16
+ ],
17
+ "peerDependencies": {
18
+ "@angular/common": "^18",
19
+ "@angular/core": "^18"
20
+ },
21
+ "dependencies": {
22
+ "photoswipe": "^4.1.3",
23
+ "tslib": "^2.0.0"
24
+ },
25
+ "module": "fesm2015/twogate-ngx-photo-gallery.mjs",
26
+ "es2020": "fesm2020/twogate-ngx-photo-gallery.mjs",
27
+ "esm2020": "esm2020/twogate-ngx-photo-gallery.mjs",
28
+ "fesm2020": "fesm2020/twogate-ngx-photo-gallery.mjs",
29
+ "fesm2015": "fesm2015/twogate-ngx-photo-gallery.mjs",
30
+ "typings": "index.d.ts",
31
+ "exports": {
32
+ "./package.json": {
33
+ "default": "./package.json"
34
+ },
35
+ ".": {
36
+ "types": "./index.d.ts",
37
+ "esm2020": "./esm2020/twogate-ngx-photo-gallery.mjs",
38
+ "es2020": "./fesm2020/twogate-ngx-photo-gallery.mjs",
39
+ "es2015": "./fesm2015/twogate-ngx-photo-gallery.mjs",
40
+ "node": "./fesm2015/twogate-ngx-photo-gallery.mjs",
41
+ "default": "./fesm2020/twogate-ngx-photo-gallery.mjs"
42
+ }
43
+ },
44
+ "sideEffects": false,
45
+ "author": "Dilhan Ulutas",
46
+ "description": "Fork with video support for PhotoSwipe"
47
+ }
@@ -0,0 +1,4 @@
1
+ export * from './lib/photo-gallery.module';
2
+ export * from './lib/directives/photo-gallery-group.directive';
3
+ export * from './lib/directives/photo-gallery.directive';
4
+ //# sourceMappingURL=public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../projects/core/src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,4BAA4B,CAAC;AAE3C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0CAA0C,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twogate-ngx-photo-gallery.d.ts","sourceRoot":"","sources":["../../projects/core/src/twogate-ngx-photo-gallery.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}