@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
50 lines (49 loc) • 2.12 kB
TypeScript
import { ESLDefaultCarouselRenderer } from './esl-carousel.default.renderer';
import type { ESLCarouselActionParams } from '../core/esl-carousel.types';
/**
* {@link ESLDefaultCarouselRenderer} extension to render slides as a multi-row grid.
* Only 2 rows layout available for now.
* Supports vertical-carousel mode, touch-move, slide siblings rendering.
*
* Provides and relies on the slide width provided with CSS custom property from renderer itself.
* (CSS Grid-based layout does not allow to provide a slide width in CSS relatively based on the container width)
*/
export declare class ESLGridCarouselRenderer extends ESLDefaultCarouselRenderer {
static is: string;
static classes: string[];
/** Slide count per carousel dimension */
readonly ROWS: number;
/** Multiplier for the index move on the slide move */
protected get INDEX_MOVE_MULTIPLIER(): number;
/** Count of fake slides to fill the last "row" or incomplete carousel state */
get fakeSlidesCount(): number;
/**
* @returns fake slides collection
* @see ESLGridCarouselRenderer.fakeSlidesCount
*/
get $fakeSlides(): HTMLElement[];
/** All slides including {@link ESLGridCarouselRenderer.$fakeSlides} slides created in grid mode */
get $slides(): HTMLElement[];
/** creates fake slide element */
buildFakeSlide(): HTMLElement;
/**
* Processes binding of defined renderer to the carousel {@link ESLCarousel}.
* Prepare to renderer animation.
*/
onBind(): void;
/**
* Processes unbinding of defined renderer from the carousel {@link ESLCarousel}.
* Clear animation.
*/
onUnbind(): void;
/**
* Normalize actual active index to the first slide in the current dimension ('row')
*/
protected normalizeIndex(index: number, params?: ESLCarouselActionParams): number;
/**
* @returns count of slides to be rendered (reserved) before the first slide does not include fake slides
*/
protected getReserveCount(back?: boolean): number;
/** Sets min size for slides */
protected resize(): void;
}