import * as i0 from '@angular/core'; import { AfterViewInit, OnDestroy, QueryList, EventEmitter, ElementRef, ChangeDetectorRef, NgZone } from '@angular/core'; import { FocusMonitor } from '@angular/cdk/a11y'; import { Directionality } from '@angular/cdk/bidi'; import { NumberInput, BooleanInput } from '@angular/cdk/coercion'; import { ControlValueAccessor } from '@angular/forms'; import * as i1 from '@angular/common'; declare class NxSliderAppendixDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } interface TickItem { gapSize: number; hideTick: boolean; isLongTick: boolean; } declare class NxSliderComponent implements ControlValueAccessor, AfterViewInit, OnDestroy { private readonly elementRef; private readonly _cdr; private readonly _ngZone; private readonly _dir; private readonly _focusMonitor; private _dragSubscriptions; private _decimalPlaces; private _thumbLabel; /** * How often to show ticks. Relative to the step so that a tick always appears on a step. * Ex: Tick interval of 4 with a step of 3 will draw a tick every 4 steps (every 12 values). */ set tickInterval(value: NumberInput); get tickInterval(): number; private _tickInterval; ticks: TickItem[]; private _handleElement; _appendixChildren: QueryList; _labelPosition: string; /** Sets the id of the slider. */ set id(value: string); get id(): string; private _id; /** Sets the tabindex of the slider. */ set tabindex(value: NumberInput); get tabindex(): number; private _tabIndex; /** Sets the minimum value (Default: 0). */ set min(value: NumberInput); get min(): number; private _min; /** Sets the maximum value (Default: 100). */ set max(value: NumberInput); get max(): number; private _max; /** Sets the step size by which the value of the slider can be increased or decreased (Default: 1). */ set step(value: NumberInput); get step(): number; private _step; /** Sets the label which is displayed on top of the slider. */ set label(value: string); get label(): string; private _label; /** Whether the input to the control of the slider should be disabled. */ set disabled(value: BooleanInput); get disabled(): boolean; private _disabled; /** Whether the max value is to the right (false) or left (true).*/ set inverted(value: BooleanInput); get inverted(): boolean; private _inverted; /** Whether to display the thumb label on top of the slider.*/ set thumbLabel(value: BooleanInput); get thumbLabel(): boolean; /** Sets the current value of the slider. */ set value(value: NumberInput); get value(): number; private _value; /** Whether the negative set of styles is applied (Default: 'false').*/ set negative(value: BooleanInput); get negative(): boolean; private _negative; /** Hides the min/max labels (Default: 'false'). */ set hideLabels(value: BooleanInput); get hideLabels(): boolean; private _hideLabels; /** Sets the array of value which will render as long tick (Default: Middle value if present). */ set longTicks(value: number[]); get longTicks(): number[]; private _longTicks; /** An event is dispatched on each value change. */ readonly valueChange: EventEmitter; /** Sets the customization function for the value which is displayed above the slider handle (Default:(value) => value). ). */ valueFormatter: (value: any) => any; /** Sets the customization function for the label on the min-side of the slider (Default:(value) => value). */ labelMinFormatter: (value: any) => any; /** Sets the customization function for the label on the max-side of the slider (Default:(value) => value). */ labelMaxFormatter: (value: any) => any; private _onChange; private _onTouched; constructor(elementRef: ElementRef, _cdr: ChangeDetectorRef, _ngZone: NgZone, _dir: Directionality | null, _focusMonitor: FocusMonitor); ngAfterViewInit(): void; ngOnDestroy(): void; writeValue(value: number): void; registerOnChange(fn: (value: any) => void): void; registerOnTouched(fn: any): void; setDisabledState(disabled: boolean): void; _isMinimum(): boolean; /** * Checks if the value is in the boundaries of min/max and if it is a multiple of `step. */ _isValidStep(): boolean; /** * We have to look at two cases: * * - current value is a valid multitude of the step size - then we can safely add or subtract the step. * * - the value is not a valid multitude. This could be the max value or the value bound via value - then * we look for the next closest value upwards or downwards decimal.js provides a nice utility function for this. */ _changeValue(valueDiff: number): void; _setValue(newValue: number): void; get _percentageValue(): number; _sliderClick(event: MouseEvent): void; _focus(): void; /** * Prevent text selection when dragging the handle. */ _selectStart(): boolean; _handleKeypress(event: KeyboardEvent): void; /** * This is called on mousedown or touchstart. */ _dragStart(): void; _formatValue(value: number): string; _formatLabelLeft(): string; _formatLabelRight(): string; _formatLabelMin(): any; _formatLabelMax(): any; _focusHandleElement(): void; private _updateLabelPosition; private _getValueFromPosition; private _roundToDecimal; private _handleDragMove; private _handleDragStop; private _reset; private _getPositionFromEvent; private getTicks; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxSliderModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { NxSliderAppendixDirective, NxSliderComponent, NxSliderModule };