import * as i0 from '@angular/core'; import { QueryList, NgZone, InjectionToken, ChangeDetectorRef, Renderer2, AfterContentInit, AfterViewInit, OnChanges, OnInit, ElementRef, TemplateRef, EventEmitter, SimpleChanges } from '@angular/core'; import { Direction } from '@angular/cdk/bidi'; import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config'; import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { Platform } from '@angular/cdk/platform'; import { Observable } from 'rxjs'; declare class NzCarouselContentDirective { private renderer; readonly el: HTMLElement; set isActive(value: boolean); get isActive(): boolean; private _active; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 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 NzCarouselEffects = 'fade' | 'scrollx' | string; type NzCarouselDotPosition = 'top' | 'bottom' | 'left' | 'right' | string; interface NzCarouselComponentAsSource { carouselContents: QueryList; el: HTMLElement; nzTransitionSpeed: number; vertical: boolean; slickListEl: HTMLElement; slickTrackEl: HTMLElement; activeIndex: number; dir: Direction; ngZone: NgZone; } interface NzCarouselStrategyRegistryItem { name: string; strategy: NzCarouselBaseStrategy; } declare const NZ_CAROUSEL_CUSTOM_STRATEGIES: InjectionToken; interface PointerVector { x: number; y: number; } interface FromToInterface { from: number; to: number; } /** * 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 abstract class NzCarouselBaseStrategy { protected cdr: ChangeDetectorRef; protected renderer: Renderer2; protected platform: Platform; protected options?: T | undefined; protected carouselComponent: NzCarouselComponentAsSource | null; protected contents: NzCarouselContentDirective[]; protected slickListEl: HTMLElement; protected slickTrackEl: HTMLElement; protected length: number; protected unitWidth: number; protected unitHeight: number; protected get maxIndex(): number; protected get firstEl(): HTMLElement; protected get lastEl(): HTMLElement; constructor(carouselComponent: NzCarouselComponentAsSource, cdr: ChangeDetectorRef, renderer: Renderer2, platform: Platform, options?: T | undefined); /** * Initialize dragging sequences. * * @param contents */ withCarouselContents(contents: QueryList | null): void; /** * Trigger transition. */ abstract switch(_f: number, _t: number): Observable; /** * When user drag the carousel component. * * @optional */ dragging(_vector: PointerVector): void; /** * Destroy a scroll strategy. */ dispose(): void; protected getFromToInBoundary(f: number, t: number): FromToInterface; } /** * 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 NzCarouselComponent implements AfterContentInit, AfterViewInit, OnChanges, OnInit { readonly _nzModuleName: NzConfigKey; readonly nzConfigService: NzConfigService; readonly ngZone: NgZone; private readonly renderer; private readonly cdr; private readonly platform; private readonly resizeService; private readonly nzDragService; private nzResizeObserver; private destroyRef; carouselContents: QueryList; slickList: ElementRef; slickTrack: ElementRef; nzDotRender?: TemplateRef<{ $implicit: number; }>; nzEffect: NzCarouselEffects; nzEnableSwipe: boolean; nzDots: boolean; nzAutoPlay: boolean; nzAutoPlaySpeed: number; nzTransitionSpeed: number; nzLoop: boolean; /** * this property is passed directly to an NzCarouselBaseStrategy */ nzStrategyOptions: NzSafeAny; set nzDotPosition(value: NzCarouselDotPosition); get nzDotPosition(): NzCarouselDotPosition; private _dotPosition; readonly nzBeforeChange: EventEmitter; readonly nzAfterChange: EventEmitter; activeIndex: number; el: HTMLElement; slickListEl: HTMLElement; slickTrackEl: HTMLElement; strategy?: NzCarouselBaseStrategy; vertical: boolean; transitionInProgress?: ReturnType; dir: Direction; private gestureRect; private pointerDelta; private isTransiting; private isDragging; private directionality; private customStrategies; constructor(); ngOnInit(): void; ngAfterContentInit(): void; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; next(): void; pre(): void; goTo(index: number): void; private switchStrategy; private scheduleNextTransition; private clearScheduledTransition; private markContentActive; /** * Drag carousel. */ pointerDown: (event: TouchEvent | MouseEvent) => void; layout(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_nzEnableSwipe: unknown; static ngAcceptInputType_nzDots: unknown; static ngAcceptInputType_nzAutoPlay: unknown; static ngAcceptInputType_nzAutoPlaySpeed: unknown; static ngAcceptInputType_nzTransitionSpeed: unknown; } declare class NzCarouselModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * 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 NzCarouselOpacityStrategy extends NzCarouselBaseStrategy { withCarouselContents(contents: QueryList | null): void; switch(_f: number, _t: number): Observable; dispose(): void; } /** * 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 NzCarouselTransformStrategyOptions { direction: 'left' | 'right'; } declare class NzCarouselTransformStrategy extends NzCarouselBaseStrategy { private isDragging; private isTransitioning; private get vertical(); constructor(carouselComponent: NzCarouselComponentAsSource, cdr: ChangeDetectorRef, renderer: Renderer2, platform: Platform, options?: NzCarouselTransformStrategyOptions); dispose(): void; withCarouselContents(contents: QueryList | null): void; switch(_f: number, _t: number): Observable; dragging(_vector: PointerVector): void; private verticalTransform; private horizontalTransform; private prepareVerticalContext; private prepareHorizontalContext; } /** * 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 NzCarouselTransformOnLoopStrategyOptions { direction: 'left' | 'right'; } /** * this strategy is very much like NzCarouselTransformStrategy, but it doesn't loop between the first and the last one */ declare class NzCarouselTransformNoLoopStrategy extends NzCarouselBaseStrategy { private isTransitioning; private get vertical(); constructor(carouselComponent: NzCarouselComponentAsSource, cdr: ChangeDetectorRef, renderer: Renderer2, platform: Platform, options?: NzCarouselTransformOnLoopStrategyOptions); dispose(): void; withCarouselContents(contents: QueryList | null): void; switch(_f: number, _t: number): Observable; dragging(vector: PointerVector): void; } /** * 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 NzCarouselFlipStrategy extends NzCarouselBaseStrategy { withCarouselContents(contents: QueryList | null): void; switch(rawF: number, rawT: number): Observable; dispose(): void; } export { NZ_CAROUSEL_CUSTOM_STRATEGIES, NzCarouselBaseStrategy, NzCarouselComponent, NzCarouselContentDirective, NzCarouselFlipStrategy, NzCarouselModule, NzCarouselOpacityStrategy, NzCarouselTransformNoLoopStrategy, NzCarouselTransformStrategy }; export type { FromToInterface, NzCarouselComponentAsSource, NzCarouselDotPosition, NzCarouselEffects, NzCarouselStrategyRegistryItem, PointerVector };