@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
45 lines (44 loc) • 1.62 kB
TypeScript
import { ESLWheelEvent } from '../../../esl-event-listener/core';
import { ESLCarouselPlugin } from '../esl-carousel.plugin';
export interface ESLCarouselWheelConfig {
/** Prefix to request next/prev navigation */
type: 'slide' | 'group' | 'move' | 'none';
/** CSS selector to ignore wheel event from */
ignore: string;
/**
* Restricts wheel direction.
* Values:
* - 'auto' - depends on the carousel orientation (default)
* - 'x' - horizontal only
* - 'y' - vertical only
*/
direction: string;
/** Prevent default action for wheel event */
preventDefault: boolean;
}
/**
* {@link ESLCarousel} wheel control plugin mixin
* Switch slides by mouse wheel
*
* @author Alexey Stsefanovich (ala'n)
*/
export declare class ESLCarouselWheelMixin extends ESLCarouselPlugin<ESLCarouselWheelConfig> {
static is: string;
static readonly DEFAULT_CONFIG_KEY = "type";
static readonly DEFAULT_CONFIG: ESLCarouselWheelConfig;
/** @returns true if the plugin should track vertical wheel */
protected get isVertical(): boolean;
/** Resubscribes according new config */
protected onConfigChange(): void;
/** @returns true if the plugin should track passed event */
protected isEventIgnored(e: WheelEvent): boolean;
/** Handles auxiliary events to pause/resume timer */
protected _onLongWheel(e: ESLWheelEvent): void;
/** Handles auxiliary events to move the carousel */
protected _onWheel(e: WheelEvent): void;
}
declare global {
export interface ESLCarouselNS {
Wheel: typeof ESLCarouselWheelMixin;
}
}