UNPKG

ngx-carousel-ease

Version:

ngx-carousel-ease is a versatile Angular library providing a feature-rich, simple, and performant carousel component. This library supports infinite and responsive mode, mouse and touch event. Attention has been put to accessibility, performance, and frie

103 lines (102 loc) 4.54 kB
import { ChangeDetectorRef } from '@angular/core'; import { Carousel } from './carousel'; import { CarouselService } from './carousel.service'; export declare class CommunSlider { readonly carousel: Carousel; readonly responsive: boolean; readonly slideToScroll: number; readonly LIMIT_AUTO_SLIDE: number; readonly strechingLimit: number; readonly autoSlide: boolean; readonly animationTimingFn: string; readonly animationTimingMs: number; readonly enableMouseDrag: boolean; readonly enableTouch: boolean; readonly autoPlay: boolean; readonly autoPlayInterval: number; readonly autoPlayAtStart: boolean; readonly playDirection: string; readonly autoplaySlideToScroll: number; carouselService: CarouselService; cd: ChangeDetectorRef; dragging: import("@angular/core").WritableSignal<boolean>; currentSlide: import("@angular/core").WritableSignal<number>; lastWindow: number; currentTranslation: import("@angular/core").WritableSignal<number>; previousTranslation: number; direction: 'right' | 'left'; startX: number; previousX: number; currentX: number; positionChange: number; prevLimit: number; nextLimit: number; slidesContainer: HTMLDivElement; arrayOfSlides: HTMLDivElement[]; totalAmountOfSlides: number; fullWidthInf: number; lastWindowTranslation: number; totalSlides: number; DOMLimitReached: boolean; visibleOffsetCardNotResponsive: number; invisibleOffsetCardNotResponsive: number; accumulatedSlide: number; currentCarouselID: number; autoInterval: number; playActive: import("@angular/core").WritableSignal<boolean>; playButtonDisabled: import("@angular/core").WritableSignal<boolean>; directionAutoPlay: (slides: number) => void; constructor(carousel: Carousel, responsive: boolean, slideToScroll: number, LIMIT_AUTO_SLIDE: number, strechingLimit: number, autoSlide: boolean, animationTimingFn: string, animationTimingMs: number, enableMouseDrag: boolean, enableTouch: boolean, autoPlay: boolean, autoPlayInterval: number, autoPlayAtStart: boolean, playDirection: string, autoplaySlideToScroll: number, carouselService: CarouselService, cd: ChangeDetectorRef); initProperties(): void; launchAutoPlay(): void; stopAutoPlay(): void; /** * Update properties of the slider * Fired at start and at resizing. */ updateProperties(): void; updateNotResponsive(): void; /** * Fired at drag start * Instantiate property of the starting drag point on the X axis. Used to compute the translation. * Disabling the transition while applying the transformation because of the attached animation. */ dragStart(event: MouseEvent | TouchEvent): void; /** * Checks if current event is allowed by user. * TouchEvent partially supported on Firefox (and working on Safari despite the MDN docs). */ currentEventIsDisabled(event: MouseEvent | TouchEvent): boolean; /** * Update the direction * Do not update the direction in case of the same previous position. */ setDirection(): void; /** * Update the last window translation * Useful to get the max translation at the end of the slides. * In not responsive mode, there is possibly a not fully displayed card (card offset). */ updateLastWindowTranslation(): void; /** * Decrease limit (movement to the left) * In infinite mode, take full width of a set if on the first slide as new slides are created to the left (a whole set offset). * Exception: if not responsive (card offset) and finite carousel, the next limit is at the maximum (the end of the carousel) */ decreaseLimits(slidesCreatedOnTheLeft?: boolean): void; /** * Increase limit on basis of previous computed limits (movement to the right) * Schema: || previous | current || next * Exception: if not responsive (card offset) and finite carousel, the next limit is at the maximum (the end of the carousel) */ increaseLimits(): void; /** * Change prev and next limit on basis of the provided slide number * Prev and next limit are always calculated as the following: * || <= prev | current || <= next */ changePrevAndNextLimits(slideNumber: number): void; fireSlideChangeEvent(slideHasChanged: boolean, slide: number): void; applyTransformation(transformation: number): void; applyTranslation(transformation: number): void; }