import { InjectionToken, ChangeDetectorRef, WritableSignal } from '@angular/core'; import { RealsoftSliderThumb } from './slider-input'; export declare enum RealsoftThumb { START = 1, END = 2 } export declare enum RealsoftTickMark { ACTIVE = 0, INACTIVE = 1 } export declare const REALSOFT_SLIDER: InjectionToken<{}>; export declare const REALSOFT_SLIDER_THUMB: InjectionToken<{}>; export declare const REALSOFT_SLIDER_RANGE_THUMB: InjectionToken<{}>; export declare const REALSOFT_SLIDER_VISUAL_THUMB: InjectionToken<{}>; export interface RealsoftSliderDragEvent { source: RealsoftSliderThumb; parent: RealsoftSliderInterface; value: number; } export declare class RealsoftSliderChange { source: RealsoftSliderThumb; parent: RealsoftSliderInterface; value: number; } export interface RealsoftSliderInterface { /** Whether the given pointer event occurred within the bounds of the slider pointer's DOM Rect. */ _isCursorOnSliderThumb(event: PointerEvent, rect: DOMRect): boolean; /** Gets the slider thumb input of the given thumb position. */ _getInput(thumbPosition: RealsoftThumb): RealsoftSliderThumbInterface | RealsoftSliderRangeThumbInterface | undefined; /** Gets the slider thumb HTML input element of the given thumb position. */ _getThumb(thumbPosition: RealsoftThumb): RealsoftSliderVisualThumbInterface; /** The minimum value that the slider can have. */ min: number; /** The maximum value that the slider can have. */ max: number; /** The amount that slider values can increment or decrement by. */ step: number; /** Whether the slider is disabled. */ disabled: boolean; /** Whether the slider is a range slider. */ _isRange: boolean; /** Whether the slider is rtl. */ _isRtl: boolean; /** The stored width of the host element's bounding client rect. */ _cachedWidth: number; /** The stored width of the host element's bounding client rect. */ _cachedLeft: number; /** * The padding of the native slider input. This is added in order to make the region where the * thumb ripple extends past the end of the slider track clickable. */ _inputPadding: number; /** The radius of the visual slider's ripple. */ _rippleRadius: number; /** Whether animations have been disabled. */ _noopAnimations: boolean; /** Whether or not the slider should use animations. */ _hasAnimation: boolean; /** Triggers UI updates that are needed after a slider input value has changed. */ _onValueChange: (source: RealsoftSliderThumbInterface) => void; /** Triggers UI updates that are needed after the slider thumb position has changed. */ _onTranslateXChange: (source: RealsoftSliderThumbInterface) => void; /** Updates the stored slider dimensions using the current bounding client rect. */ _updateDimensions: () => void; /** Updates the scale on the active portion of the track. */ _updateTrackUI: (source: RealsoftSliderThumbInterface) => void; /** Used to set the transition duration for thumb and track animations. */ _setTransition: (withAnimation: boolean) => void; _changeDetectorRef: ChangeDetectorRef; } export interface RealsoftSliderThumbInterface { /** The minimum value that the slider can have. */ min: number; /** The maximum value that the slider can have. */ max: number; /** The amount that slider values can increment or decrement by. */ step: number; /** The current value of this slider input. */ value: number; /** The current translateX in px of the slider visual thumb. */ translateX: number; /** Indicates whether this thumb is the start or end thumb. */ thumbPosition: RealsoftThumb; /** Similar to percentage but calcualted using translateX relative to the total track width. */ fillPercentage: number; /** Whether the slider is disabled. */ disabled: boolean; /** The host native HTML input element. */ _hostElement: HTMLInputElement; /** Whether the input is currently focused (either by tab or after clicking). */ _isFocused: boolean; /** The aria-valuetext string representation of the input's value. */ _valuetext: WritableSignal; _skipUIUpdate: boolean; /** Handles the initialization of properties for the slider input. */ initProps: () => void; /** Handles UI initialization controlled by this slider input. */ initUI: () => void; /** Calculates the visual thumb's translateX based on the slider input's current value. */ _calcTranslateXByValue: () => number; /** Updates the visual thumb based on the slider input's current value. */ _updateThumbUIByValue: () => void; /** * Sets the slider input to disproportionate dimensions to allow for touch * events to be captured on touch devices. */ _updateWidthInactive: () => void; /** * Used to set the slider width to the correct * dimensions while the user is dragging. */ _updateWidthActive: () => void; } export interface RealsoftSliderRangeThumbInterface extends RealsoftSliderThumbInterface { /** Whether this slider corresponds to the input on the left hand side. */ _isLeftThumb: boolean; /** * Gets the sibling MatSliderRangeThumb. * Returns undefined if it is too early in Angular's life cycle. */ getSibling: () => RealsoftSliderRangeThumbInterface | undefined; /** Used to cache whether this slider input corresponds to the visual left thumb. */ _setIsLeftThumb: () => void; /** Updates the input styles to control whether it is pinned to the start or end of the mat-slider. */ _updateStaticStyles: () => void; /** Updates the min and max properties of this slider input according to it's sibling. */ _updateMinMax: () => void; } export interface RealsoftSliderVisualThumbInterface { /** Whether the slider thumb is currently being pressed. */ _isActive: boolean; /** The host native HTML input element. */ _hostElement: HTMLElement; /** Shows the value indicator ui. */ _showValueIndicator: () => void; /** Hides the value indicator ui. */ _hideValueIndicator: () => void; }