Socket
Socket
Sign inDemoInstall

ngx-cdk-lightbox

Package Overview
Dependencies
11
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 13.0.0 to 14.0.0

index.d.ts

6

components/ngx-cdk-lightbox.component.d.ts
import { OnDestroy } from '@angular/core';
import { Observable } from 'rxjs';
import { LightboxOverlayRef, GalleryDataInterface } from './../ref/lightboxOverlay.ref';
import { GalleryDisplayObjectType, GalleryConfigInterface, GalleryImageInterface, GalleryVideoInterface } from './../interfaces/gallery.interface';
import { LightboxOverlayRef, GalleryDataInterface } from '../ref/lightboxOverlay.ref';
import { GalleryDisplayObjectType, GalleryConfigInterface, GalleryImageInterface, GalleryVideoInterface } from '../interfaces/gallery.interface';
import * as i0 from "@angular/core";

@@ -52,3 +52,3 @@ export declare class NgxCdkLightboxComponent implements OnDestroy {

static ɵfac: i0.ɵɵFactoryDeclaration<NgxCdkLightboxComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxCdkLightboxComponent, "lib-ngx-cdk-lightbox", never, {}, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxCdkLightboxComponent, "lib-ngx-cdk-lightbox", never, {}, {}, never, never, false>;
}

@@ -9,4 +9,4 @@ import * as i0 from "@angular/core";

static ɵfac: i0.ɵɵFactoryDeclaration<NgxCdkLightboxModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxCdkLightboxModule, [typeof i1.NgxCdkLightboxComponent, typeof i2.SafeHtmlPipe], [typeof i3.CommonModule, typeof i4.MatProgressSpinnerModule], [typeof i1.NgxCdkLightboxComponent, typeof i5.OverlayModule]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxCdkLightboxModule, [typeof i1.NgxCdkLightboxComponent, typeof i2.SafeHtmlPipe], [typeof i3.CommonModule, typeof i4.MatProgressSpinnerModule, typeof i5.OverlayModule], [typeof i1.NgxCdkLightboxComponent, typeof i5.OverlayModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NgxCdkLightboxModule>;
}
{
"name": "ngx-cdk-lightbox",
"description": "Custom implementation of CDK to display image gallery in lightbox.",
"version": "13.0.0",
"version": "14.0.0",
"author": "miskith",

@@ -22,6 +22,6 @@ "license": "MIT",

"peerDependencies": {
"@angular/common": "^13.0.0",
"@angular/core": "^13.0.0",
"@angular/cdk": "^13.0.0",
"@angular/material": "^13.0.0"
"@angular/common": "^14.2.0",
"@angular/core": "^14.2.0",
"@angular/cdk": "^14.2.0",
"@angular/material": "^14.2.0"
},

@@ -36,3 +36,3 @@ "dependencies": {

"fesm2015": "fesm2015/ngx-cdk-lightbox.mjs",
"typings": "ngx-cdk-lightbox.d.ts",
"typings": "index.d.ts",
"exports": {

@@ -43,3 +43,3 @@ "./package.json": {

".": {
"types": "./ngx-cdk-lightbox.d.ts",
"types": "./index.d.ts",
"esm2020": "./esm2020/ngx-cdk-lightbox.mjs",

@@ -46,0 +46,0 @@ "es2020": "./fesm2020/ngx-cdk-lightbox.mjs",

@@ -5,7 +5,7 @@ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';

export declare class SafeHtmlPipe implements PipeTransform {
private sanitizer;
private readonly sanitizer;
constructor(sanitizer: DomSanitizer);
transform(html: string): SafeHtml;
static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml">;
static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", false>;
}

@@ -6,2 +6,3 @@ # ngx-cdk-lightbox

## Demo
https://www.davidmyska.com/ngx-cdk-lightbox/

@@ -14,6 +15,9 @@

**npm**
```shell
npm install ngx-cdk-lightbox --save
```
**yarn**
```shell

@@ -33,8 +37,5 @@ yarn add ngx-cdk-lightbox

@NgModule({
imports: [
...
NgxCdkLightboxModule,
],
imports: [...NgxCdkLightboxModule],
})
export class SomeModule { }
export class SomeModule {}
```

@@ -49,8 +50,7 @@

```typescript
type GalleryDisplayObjectType = GalleryImageInterface|GalleryVideoInterface;
type GalleryDisplayObjectType = GalleryImageInterface | GalleryVideoInterface;
```
```typescript
interface GalleryImageInterface
{
interface GalleryImageInterface {
type: 'image';

@@ -64,10 +64,9 @@ source: string;

```typescript
type videoResolutionsType = 240|360|480|720|1080|2160|4320;
type videoResolutionsType = 240 | 360 | 480 | 720 | 1080 | 2160 | 4320;
```
```typescript
export interface GalleryVideoInterface
{
type: 'video',
mp4Source: string|Partial<Record<videoResolutionsType, string>>;
export interface GalleryVideoInterface {
type: 'video';
mp4Source: string | Partial<Record<videoResolutionsType, string>>;
description?: string;

@@ -83,6 +82,5 @@ copyright?: string;

```typescript
interface GalleryConfigInterface
{
interface GalleryConfigInterface {
enableZoom?: boolean;
zoomSize?: number|'originalSize';
zoomSize?: number | 'originalSize';
enableImageClick?: boolean;

@@ -104,39 +102,40 @@ loopGallery?: boolean;

#### GalleryImageInterface
| key | value |
| ------------ | ------------ |
| type | 'image' |
| source | path to image |
| description | optional - description of image |
| copyright | optional - copyright info |
| key | value |
| ----------- | ------------------------------- |
| type | 'image' |
| source | path to image |
| description | optional - description of image |
| copyright | optional - copyright info |
#### GalleryVideoInterface
| key | value |
| ------------ | ------------ |
| type | 'video' |
| mp4Source | path to video source/sources |
| description | optional - description of video |
| copyright | optional - copyright info |
| resolution | width and height of video |
| key | value |
| ----------- | ------------------------------- |
| type | 'video' |
| mp4Source | path to video source/sources |
| description | optional - description of video |
| copyright | optional - copyright info |
| resolution | width and height of video |
#### GalleryConfigInterface
| key | type | default | value |
| ------------ | ------------ | ------------ | ------------ |
| enableZoom | boolean | false | display zoom on mouse hover over image |
| zoomSize | number, 'originalSize' | 'originalSize' | zoom size, number for zoom multiplication, originalSize for original image size |
| enableImageClick | boolean | true | enable click on image to navigate to next or previous image |
| loopGallery | boolean | true | loop gallery after last image or before first image |
| enableImageCounter | boolean | true | display current image counter |
| imageCounterText | string | 'IMAGE_INDEX photo of IMAGE_COUNT' | format for image counter |
| enableCloseIcon | boolean | true | display close icon |
| closeIcon | string | https://material.io/tools/icons/?icon=close&style=baseline | HTML string containing close icon |
| enableArrows | boolean | true | display next/prev icons |
| arrowRight | string | https://material.io/tools/icons/?icon=keyboard_arrow_right&style=baseline | HTML string containing right arrow |
| arrowLeft | string | https://material.io/tools/icons/?icon=keyboard_arrow_left&style=baseline | HTML string containing left arrow |
| enableImagePreloading | boolean | enable/disable image preloading |
| startingIndex | number | 0 | index of starting image |
| enableAnimations | boolean | true | enable/disable animations |
| ariaLabelNext | string | 'Next' | Aria label for next button |
| ariaLabelPrev | string | 'Previous' | Aria label for previous button |
| key | type | default | value |
| --------------------- | ---------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| enableZoom | boolean | false | display zoom on mouse hover over image |
| zoomSize | number, 'originalSize' | 'originalSize' | zoom size, number for zoom multiplication, originalSize for original image size |
| enableImageClick | boolean | true | enable click on image to navigate to next or previous image |
| loopGallery | boolean | true | loop gallery after last image or before first image |
| enableImageCounter | boolean | true | display current image counter |
| imageCounterText | string | 'IMAGE_INDEX photo of IMAGE_COUNT' | format for image counter |
| enableCloseIcon | boolean | true | display close icon |
| closeIcon | string | https://material.io/tools/icons/?icon=close&style=baseline | HTML string containing close icon |
| enableArrows | boolean | true | display next/prev icons |
| arrowRight | string | https://material.io/tools/icons/?icon=keyboard_arrow_right&style=baseline | HTML string containing right arrow |
| arrowLeft | string | https://material.io/tools/icons/?icon=keyboard_arrow_left&style=baseline | HTML string containing left arrow |
| enableImagePreloading | boolean | enable/disable image preloading |
| startingIndex | number | 0 | index of starting image |
| enableAnimations | boolean | true | enable/disable animations |
| ariaLabelNext | string | 'Next' | Aria label for next button |
| ariaLabelPrev | string | 'Previous' | Aria label for previous button |

@@ -151,8 +150,5 @@ ## Usage example

{
constructor(private lightboxService: NgxCdkLightboxService)
{
}
constructor(private readonly lightboxService: NgxCdkLightboxService) {}
public openLightbox():void
{
public openLightbox(): void {
this.lightboxService.open([

@@ -164,4 +160,2 @@ {source: 'assets/images/image1.jpg', copyright: 'unknown'},

});
return;
}

@@ -171,3 +165,2 @@ }

## ToDo

@@ -174,0 +167,0 @@

import { InjectionToken } from '@angular/core';
import { OverlayRef } from '@angular/cdk/overlay';
import { GalleryDisplayObjectType, GalleryConfigInterface } from './../interfaces/gallery.interface';
import { GalleryDisplayObjectType, GalleryConfigInterface } from '../interfaces/gallery.interface';
export interface GalleryDataInterface {

@@ -10,5 +10,5 @@ displayObjects: GalleryDisplayObjectType[];

export declare class LightboxOverlayRef {
private overlayRef;
private readonly overlayRef;
constructor(overlayRef: OverlayRef);
close(): void;
}
import { Injector } from '@angular/core';
import { Overlay } from '@angular/cdk/overlay';
import { GalleryConfigInterface, GalleryDisplayObjectType } from './../interfaces/gallery.interface';
import { GalleryConfigInterface, GalleryDisplayObjectType } from '../interfaces/gallery.interface';
import * as i0 from "@angular/core";
export declare class NgxCdkLightboxService {
private overlay;
private injector;
private readonly overlay;
private readonly injector;
private displayObjects;

@@ -9,0 +9,0 @@ private defaultConfig;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc