import * as i0 from '@angular/core'; import { OnChanges, ElementRef, TemplateRef, SimpleChanges, OnInit, QueryList, EventEmitter } from '@angular/core'; import { Direction } from '@angular/cdk/bidi'; import { ControlValueAccessor } from '@angular/forms'; import { NzTSType, NgStyleInterface } from 'ng-zorro-antd/core/types'; import { NzTooltipDirective } from 'ng-zorro-antd/tooltip'; /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ type NzMark = string | NzMarkObj; interface NzMarkObj { style?: object; label: string; } declare class NzMarks { [key: string]: NzMark; } /** * Processed steps that would be passed to sub components. */ interface NzExtendedMark { value: number; offset: number; config: NzMark; } /** * Marks that would be rendered. */ interface NzDisplayedMark extends NzExtendedMark { active: boolean; label: string; style?: object; } /** * Steps that would be rendered. */ interface NzDisplayedStep extends NzExtendedMark { active: boolean; style?: object; } type NzSliderShowTooltip = 'always' | 'never' | 'default'; type NzSliderValue = number[] | number; interface NzSliderHandler { offset: number | null; value: number | null; active: boolean; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzSliderHandleComponent implements OnChanges { private cdr; handleEl?: ElementRef; tooltip?: NzTooltipDirective; vertical?: boolean; reverse?: boolean; offset?: number; value?: number; tooltipVisible: NzSliderShowTooltip; tooltipPlacement?: string; tooltipFormatter?: null | ((value: number) => string) | TemplateRef; active: boolean; dir: Direction; dragging?: boolean; tooltipTitle?: NzTSType; style: NgStyleInterface; ngOnChanges(changes: SimpleChanges): void; enterHandle: () => void; leaveHandle: () => void; focus(): void; private toggleTooltip; private updateTooltipTitle; private updateTooltipPosition; private updateStyle; private getHorizontalStylePosition; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_vertical: unknown; static ngAcceptInputType_reverse: unknown; static ngAcceptInputType_offset: unknown; static ngAcceptInputType_value: unknown; static ngAcceptInputType_active: unknown; } declare class NzSliderComponent implements ControlValueAccessor, OnInit, OnChanges { slider: ElementRef; private destroyRef; private cdr; private platform; private directionality; handlerComponents: QueryList; nzDisabled: boolean; nzDots: boolean; nzIncluded: boolean; nzRange: boolean; nzVertical: boolean; nzReverse: boolean; nzDefaultValue?: NzSliderValue; nzMarks: NzMarks | null; nzMax: number; nzMin: number; nzStep: number; nzTooltipVisible: NzSliderShowTooltip; nzTooltipPlacement: string; nzTipFormatter?: null | ((value: number) => string) | TemplateRef; readonly nzOnAfterChange: EventEmitter; value: NzSliderValue | null; cacheSliderStart: number | null; cacheSliderLength: number | null; activeValueIndex: number | undefined; track: { offset: null | number; length: null | number; }; handles: NzSliderHandler[]; marksArray: NzExtendedMark[] | null; bounds: { lower: NzSliderValue | null; upper: NzSliderValue | null; }; dir: Direction; readonly dragging: i0.WritableSignal; private dragStart$?; private dragMove$?; private dragEnd$?; private dragStart_?; private dragMove_?; private dragEnd_?; private isNzDisableFirstChange; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; writeValue(val: NzSliderValue | null): void; onValueChange(_value: NzSliderValue): void; onTouched(): void; registerOnChange(fn: (value: NzSliderValue) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; /** * Event handler is only triggered when a slider handler is focused. */ onKeyDown(e: KeyboardEvent): void; onHandleFocusIn(index: number): void; private setValue; private getValue; /** * Clone & sort current value and convert them to offsets, then return the new one. */ private getValueToOffset; /** * Find the closest value to be activated. */ private setActiveValueIndex; private setActiveValue; /** * Update track and handles' position and length. */ private updateTrackAndHandles; private onDragStart; private onDragMove; private getLogicalValue; private onDragEnd; /** * Create user interactions handles. */ private bindDraggingHandlers; private subscribeDrag; private unsubscribeDrag; private toggleDragMoving; private toggleDragDisabled; private findClosestValue; private valueToOffset; private getSliderStartPosition; private getSliderLength; /** * Cache DOM layout/reflow operations for performance (may not necessary?) */ private cacheSliderProperty; private formatValue; /** * Show one handle's tooltip and hide others'. */ private showHandleTooltip; private hideAllHandleTooltip; private generateMarkItems; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_nzDisabled: unknown; static ngAcceptInputType_nzDots: unknown; static ngAcceptInputType_nzIncluded: unknown; static ngAcceptInputType_nzRange: unknown; static ngAcceptInputType_nzVertical: unknown; static ngAcceptInputType_nzReverse: unknown; static ngAcceptInputType_nzMax: unknown; static ngAcceptInputType_nzMin: unknown; static ngAcceptInputType_nzStep: unknown; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ interface NzSliderTrackStyle { bottom?: string | null; height?: string | null; left?: string | null; right?: string | null; width?: string | null; visibility?: string; } declare class NzSliderTrackComponent implements OnChanges { offset: number; reverse: boolean; dir: Direction; length: number; vertical: boolean; included: boolean; style: NzSliderTrackStyle; ngOnChanges(): void; private getHorizontalStylePosition; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_offset: unknown; static ngAcceptInputType_reverse: unknown; static ngAcceptInputType_length: unknown; static ngAcceptInputType_vertical: unknown; static ngAcceptInputType_included: unknown; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzSliderStepComponent implements OnChanges { lowerBound: number | null; upperBound: number | null; marksArray: NzExtendedMark[]; min: number; max: number; vertical: boolean; included: boolean; reverse: boolean; steps: NzDisplayedStep[]; ngOnChanges(changes: SimpleChanges): void; private buildSteps; private togglePointActive; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_min: unknown; static ngAcceptInputType_max: unknown; static ngAcceptInputType_vertical: unknown; static ngAcceptInputType_included: unknown; static ngAcceptInputType_reverse: unknown; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzSliderMarksComponent implements OnChanges { lowerBound: number | null; upperBound: number | null; marksArray: NzExtendedMark[]; min: number; max: number; vertical: boolean; included: boolean; reverse: boolean; marks: NzDisplayedMark[]; ngOnChanges(changes: SimpleChanges): void; private buildMarks; private getMarkStyles; private togglePointActive; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_min: unknown; static ngAcceptInputType_max: unknown; static ngAcceptInputType_vertical: unknown; static ngAcceptInputType_included: unknown; static ngAcceptInputType_reverse: unknown; } declare class NzSliderModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { NzMarks, NzSliderComponent, NzSliderModule, NzSliderHandleComponent as ɵNzSliderHandleComponent, NzSliderMarksComponent as ɵNzSliderMarksComponent, NzSliderStepComponent as ɵNzSliderStepComponent, NzSliderTrackComponent as ɵNzSliderTrackComponent }; export type { NzDisplayedMark, NzDisplayedStep, NzExtendedMark, NzMark, NzMarkObj, NzSliderHandler, NzSliderShowTooltip, NzSliderTrackStyle, NzSliderValue };