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

80 lines (79 loc) 3.02 kB
export declare class Carousel { private readonly carousel; private readonly maxWidthCarousel; slideToShow: number; slideWidth: number; readonly slideMaxWidth: number; readonly gap: number; private readonly responsive; private readonly loop; slides: NodeListOf<HTMLDivElement>; originalSlideWidth: number; slideWidthWithGap: number; numberDots: import("@angular/core").WritableSignal<number>; maxScrollableContent: import("@angular/core").WritableSignal<number>; arrayNumberDots: import("@angular/core").WritableSignal<number[]>; slidesContainer: HTMLDivElement; totalSlides: number; initialSlideToShow: number; paddingCarousel: number; carouselWidth: number; widthSlideContainer: number; arrayOfSlides: HTMLDivElement[]; constructor(carousel: HTMLDivElement, maxWidthCarousel: number | undefined, slideToShow: number, slideWidth: number, slideMaxWidth: number, gap: number, responsive: boolean, loop: boolean); get carouselElement(): HTMLDivElement; init(): void; /** * Set the slide width and max width * NB: In responsive mode, width is automatically adapted through the setAutoColumnSlideContainer() method. * */ setWidthSlides(): void; /** * Update carousel properties * Occurs at start and at resizing. */ updateProperties(): void; /** * Update slide to show (responsive mode) * Computes the number of slide fitting */ updateSlideToShowResponsive(): void; /** * Determine slide to show * Useful to compute the slide displayed on screen and for the slider class. * In not responsive mode, the maximum slides to show is determined by the maximum available space and the width of the slide set by the user. */ determineSlideToShow(slideFitting: number): void; /** * Update slide to show (not responsive mode) * Computes the number of slide fitting. The number of slides to be shown are determined by the number of slides fitting within its container. */ updateSlideToShowNotResponsive(): void; getPaddingCarousel(): number; setMaxWidthCarousel(): void; /** * Set the with of a slide, responsive mode * There are [n cards - 1] gaps (3 cards, 2 gaps) */ setAutoColumnSlideContainer(): void; /** * Define the slide container width * Make non visible gaps of non visible cards scrollable and is used to compute the maxScrollableContent (strechingEffect) */ setWidthSlideContainer(): void; selectSlides(): NodeListOf<HTMLDivElement>; slidesToArray(): HTMLDivElement[]; selectSlidesContainer(): HTMLDivElement; /** * Set number of dots * If infinite mode, one more window than normal mode. */ setNumberDots(): number; /** * Get the max scrollable content * Useful for the streching effect (not infinite mode), end of the slides */ getMaxScroll(): number; setDraggableImgToFalse(): void; }