UNPKG

slider-carousel

Version:

Angular component of the carousel, using the slider as a transition. This is a simple, clean and light alternative. It also does not need dependencies.

95 lines (94 loc) 2.62 kB
import { OnInit, OnDestroy, OnChanges, Renderer2, AfterViewChecked } from '@angular/core'; import { DomSanitizer, SafeUrl, SafeStyle } from '@angular/platform-browser'; import { Helper } from './helper'; export declare class SliderCarouselComponent implements OnInit, OnChanges, OnDestroy, AfterViewChecked { private sanitizer; private renderer; private helper; class: boolean; private sectionEl; private imageListEl; private innerImagesEl; images: { lg: string; md?: string; sm?: string; }[] | string[]; preview: boolean; height: string; width: string; maxWidth: string; autoSize: boolean; safeImages: { lg: { url: SafeUrl | string; style: SafeStyle | string; pure: string; }; md: { url: SafeUrl | string; style: SafeStyle | string; pure: string; }; sm: { url: SafeUrl | string; style: SafeStyle | string; pure: string; }; }[]; initialized: boolean; currentImageIndex: number; lastDirectionIsRight: boolean; private timerSroll; containerWidth: number; private destroyed; windowResizing: boolean; private previewRef; private listeners; get currentImage(): { lg: { url: string | SafeUrl; style: string | SafeStyle; pure: string; }; md: { url: string | SafeUrl; style: string | SafeStyle; pure: string; }; sm: { url: string | SafeUrl; style: string | SafeStyle; pure: string; }; }; get currentIsFisrt(): boolean; get currentIsLast(): boolean; get isDragging(): boolean; drag: { state: string; startOffset: number; currentOffset: number; startLeft: number; currentLeft: number; }; constructor(sanitizer: DomSanitizer, renderer: Renderer2, helper: Helper); ngOnInit(): void; ngOnChanges(): void; private prepare; ngAfterViewChecked(): void; private checkImages; private initSlideDragWatching; private stopSlideDragWatching; previewImage(image: any): void; selectImage(imageIndex: number, event: any): void; goPrevImage(salt?: number): void; goNextImage(salt?: number): void; private scrollingToElement; onKeydown(event: any): void; onWindowResize(): void; private onStartDrag; private onDragging; private onEndDrag; ngOnDestroy(): void; }