ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
1 lines • 69.1 kB
Source Map (JSON)
{"version":3,"file":"ng-zorro-antd-carousel.mjs","sources":["../../components/carousel/carousel-content.directive.ts","../../components/carousel/strategies/base-strategy.ts","../../components/carousel/strategies/opacity-strategy.ts","../../components/carousel/strategies/transform-strategy.ts","../../components/carousel/typings.ts","../../components/carousel/carousel.component.ts","../../components/carousel/carousel.module.ts","../../components/carousel/strategies/experimental/transform-no-loop-strategy.ts","../../components/carousel/strategies/experimental/flip-strategy.ts","../../components/carousel/public-api.ts","../../components/carousel/ng-zorro-antd-carousel.ts"],"sourcesContent":["/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, ElementRef, Renderer2 } from '@angular/core';\n\n@Directive({\n selector: '[nz-carousel-content]',\n exportAs: 'nzCarouselContent',\n host: {\n class: 'slick-slide'\n },\n standalone: true\n})\nexport class NzCarouselContentDirective {\n readonly el: HTMLElement;\n\n set isActive(value: boolean) {\n this._active = value;\n if (this.isActive) {\n this.renderer.addClass(this.el, 'slick-active');\n } else {\n this.renderer.removeClass(this.el, 'slick-active');\n }\n }\n\n get isActive(): boolean {\n return this._active;\n }\n\n private _active = false;\n\n constructor(\n elementRef: ElementRef,\n private renderer: Renderer2\n ) {\n this.el = elementRef.nativeElement;\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Platform } from '@angular/cdk/platform';\nimport { ChangeDetectorRef, QueryList, Renderer2 } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzCarouselContentDirective } from '../carousel-content.directive';\nimport { FromToInterface, NzCarouselComponentAsSource, PointerVector } from '../typings';\n\nexport abstract class NzCarouselBaseStrategy<T = NzSafeAny> {\n // Properties that strategies may want to use.\n protected carouselComponent: NzCarouselComponentAsSource | null;\n protected contents!: NzCarouselContentDirective[];\n protected slickListEl!: HTMLElement;\n protected slickTrackEl!: HTMLElement;\n protected length!: number;\n protected unitWidth!: number;\n protected unitHeight!: number;\n\n protected get maxIndex(): number {\n return this.length - 1;\n }\n\n protected get firstEl(): HTMLElement {\n return this.contents[0].el;\n }\n\n protected get lastEl(): HTMLElement {\n return this.contents[this.maxIndex].el;\n }\n\n constructor(\n carouselComponent: NzCarouselComponentAsSource,\n protected cdr: ChangeDetectorRef,\n protected renderer: Renderer2,\n protected platform: Platform,\n protected options?: T\n ) {\n this.carouselComponent = carouselComponent;\n }\n\n /**\n * Initialize dragging sequences.\n *\n * @param contents\n */\n withCarouselContents(contents: QueryList<NzCarouselContentDirective> | null): void {\n const carousel = this.carouselComponent!;\n this.slickListEl = carousel.slickListEl;\n this.slickTrackEl = carousel.slickTrackEl;\n this.contents = contents?.toArray() || [];\n this.length = this.contents.length;\n\n if (this.platform.isBrowser) {\n const rect = carousel.el.getBoundingClientRect();\n this.unitWidth = rect.width;\n this.unitHeight = rect.height;\n } else {\n // Since we cannot call getBoundingClientRect in server, we just hide all items except for the first one.\n contents?.forEach((content, index) => {\n if (index === 0) {\n this.renderer.setStyle(content.el, 'width', '100%');\n } else {\n this.renderer.setStyle(content.el, 'display', 'none');\n }\n });\n }\n }\n\n /**\n * Trigger transition.\n */\n abstract switch(_f: number, _t: number): Observable<void>;\n\n /**\n * When user drag the carousel component.\n *\n * @optional\n */\n dragging(_vector: PointerVector): void {}\n\n /**\n * Destroy a scroll strategy.\n */\n dispose(): void {}\n\n protected getFromToInBoundary(f: number, t: number): FromToInterface {\n const length = this.maxIndex + 1;\n return { from: (f + length) % length, to: (t + length) % length };\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { QueryList } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { NzCarouselContentDirective } from '../carousel-content.directive';\nimport { NzCarouselBaseStrategy } from './base-strategy';\n\nexport class NzCarouselOpacityStrategy extends NzCarouselBaseStrategy {\n override withCarouselContents(contents: QueryList<NzCarouselContentDirective> | null): void {\n super.withCarouselContents(contents);\n\n if (this.contents) {\n this.slickTrackEl.style.width = `${this.length * this.unitWidth}px`;\n\n this.contents.forEach((content: NzCarouselContentDirective, i: number) => {\n this.renderer.setStyle(content.el, 'opacity', this.carouselComponent!.activeIndex === i ? '1' : '0');\n this.renderer.setStyle(content.el, 'position', 'relative');\n this.renderer.setStyle(content.el, 'width', `${this.unitWidth}px`);\n this.renderer.setStyle(content.el, 'left', `${-this.unitWidth * i}px`);\n this.renderer.setStyle(content.el, 'transition', ['opacity 500ms ease 0s', 'visibility 500ms ease 0s']);\n });\n }\n }\n\n switch(_f: number, _t: number): Observable<void> {\n const { to: t } = this.getFromToInBoundary(_f, _t);\n const complete$ = new Subject<void>();\n\n this.contents.forEach((content: NzCarouselContentDirective, i: number) => {\n this.renderer.setStyle(content.el, 'opacity', t === i ? '1' : '0');\n });\n\n setTimeout(() => {\n complete$.next();\n complete$.complete();\n }, this.carouselComponent!.nzTransitionSpeed);\n\n return complete$;\n }\n\n override dispose(): void {\n this.contents.forEach((content: NzCarouselContentDirective) => {\n this.renderer.setStyle(content.el, 'transition', null);\n this.renderer.setStyle(content.el, 'opacity', null);\n this.renderer.setStyle(content.el, 'width', null);\n this.renderer.setStyle(content.el, 'left', null);\n });\n\n super.dispose();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Platform } from '@angular/cdk/platform';\nimport { ChangeDetectorRef, QueryList, Renderer2 } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { NzCarouselContentDirective } from '../carousel-content.directive';\nimport { NzCarouselComponentAsSource, PointerVector } from '../typings';\nimport { NzCarouselBaseStrategy } from './base-strategy';\n\ninterface NzCarouselTransformStrategyOptions {\n direction: 'left' | 'right';\n}\n\nexport class NzCarouselTransformStrategy extends NzCarouselBaseStrategy<NzCarouselTransformStrategyOptions> {\n private isDragging = false;\n private isTransitioning = false;\n\n private get vertical(): boolean {\n return this.carouselComponent!.vertical;\n }\n\n constructor(\n carouselComponent: NzCarouselComponentAsSource,\n cdr: ChangeDetectorRef,\n renderer: Renderer2,\n platform: Platform,\n options?: NzCarouselTransformStrategyOptions\n ) {\n super(carouselComponent, cdr, renderer, platform, options);\n }\n\n override dispose(): void {\n super.dispose();\n this.renderer.setStyle(this.slickTrackEl, 'transform', null);\n }\n\n override withCarouselContents(contents: QueryList<NzCarouselContentDirective> | null): void {\n super.withCarouselContents(contents);\n\n const carousel = this.carouselComponent!;\n const activeIndex = carousel.activeIndex;\n\n // We only do when we are in browser.\n if (this.platform.isBrowser && this.contents.length) {\n this.renderer.setStyle(this.slickListEl, 'height', `${this.unitHeight}px`);\n\n if (this.vertical) {\n this.renderer.setStyle(this.slickTrackEl, 'width', `${this.unitWidth}px`);\n this.renderer.setStyle(this.slickTrackEl, 'height', `${this.length * this.unitHeight}px`);\n this.renderer.setStyle(\n this.slickTrackEl,\n 'transform',\n `translate3d(0, ${-activeIndex * this.unitHeight}px, 0)`\n );\n } else {\n this.renderer.setStyle(this.slickTrackEl, 'height', `${this.unitHeight}px`);\n this.renderer.setStyle(this.slickTrackEl, 'width', `${this.length * this.unitWidth}px`);\n this.renderer.setStyle(this.slickTrackEl, 'transform', `translate3d(${-activeIndex * this.unitWidth}px, 0, 0)`);\n }\n\n this.contents.forEach((content: NzCarouselContentDirective) => {\n this.renderer.setStyle(content.el, 'position', 'relative');\n this.renderer.setStyle(content.el, 'width', `${this.unitWidth}px`);\n this.renderer.setStyle(content.el, 'height', `${this.unitHeight}px`);\n });\n }\n }\n\n switch(_f: number, _t: number): Observable<void> {\n const { to: t } = this.getFromToInBoundary(_f, _t);\n const complete$ = new Subject<void>();\n\n this.renderer.setStyle(\n this.slickTrackEl,\n 'transition',\n `transform ${this.carouselComponent!.nzTransitionSpeed}ms ease`\n );\n\n if (this.vertical) {\n this.verticalTransform(_f, _t);\n } else {\n this.horizontalTransform(_f, _t);\n }\n\n this.isTransitioning = true;\n this.isDragging = false;\n\n // TODO: use transitionEnd event instead of setTimeout\n setTimeout(() => {\n this.renderer.setStyle(this.slickTrackEl, 'transition', null);\n this.contents.forEach((content: NzCarouselContentDirective) => {\n this.renderer.setStyle(content.el, this.vertical ? 'top' : 'left', null);\n });\n\n if (this.vertical) {\n this.renderer.setStyle(this.slickTrackEl, 'transform', `translate3d(0, ${-t * this.unitHeight}px, 0)`);\n } else {\n this.renderer.setStyle(this.slickTrackEl, 'transform', `translate3d(${-t * this.unitWidth}px, 0, 0)`);\n }\n\n this.isTransitioning = false;\n\n complete$.next();\n complete$.complete();\n }, this.carouselComponent!.nzTransitionSpeed);\n\n return complete$.asObservable();\n }\n\n override dragging(_vector: PointerVector): void {\n if (this.isTransitioning) {\n return;\n }\n\n const activeIndex = this.carouselComponent!.activeIndex;\n\n if (this.carouselComponent!.vertical) {\n if (!this.isDragging && this.length > 2) {\n if (activeIndex === this.maxIndex) {\n this.prepareVerticalContext(true);\n } else if (activeIndex === 0) {\n this.prepareVerticalContext(false);\n }\n }\n this.renderer.setStyle(\n this.slickTrackEl,\n 'transform',\n `translate3d(0, ${-activeIndex * this.unitHeight + _vector.x}px, 0)`\n );\n } else {\n if (!this.isDragging && this.length > 2) {\n if (activeIndex === this.maxIndex) {\n this.prepareHorizontalContext(true);\n } else if (activeIndex === 0) {\n this.prepareHorizontalContext(false);\n }\n }\n this.renderer.setStyle(\n this.slickTrackEl,\n 'transform',\n `translate3d(${-activeIndex * this.unitWidth + _vector.x}px, 0, 0)`\n );\n }\n\n this.isDragging = true;\n }\n\n private verticalTransform(_f: number, _t: number): void {\n const { from: f, to: t } = this.getFromToInBoundary(_f, _t);\n const needToAdjust = this.length > 2 && _t !== t;\n\n if (needToAdjust) {\n this.prepareVerticalContext(t < f);\n this.renderer.setStyle(this.slickTrackEl, 'transform', `translate3d(0, ${-_t * this.unitHeight}px, 0)`);\n } else {\n this.renderer.setStyle(this.slickTrackEl, 'transform', `translate3d(0, ${-t * this.unitHeight}px, 0`);\n }\n }\n\n private horizontalTransform(_f: number, _t: number): void {\n const { from: f, to: t } = this.getFromToInBoundary(_f, _t);\n const needToAdjust = this.length > 2 && _t !== t;\n\n if (needToAdjust) {\n this.prepareHorizontalContext(t < f);\n this.renderer.setStyle(this.slickTrackEl, 'transform', `translate3d(${-_t * this.unitWidth}px, 0, 0)`);\n } else {\n this.renderer.setStyle(this.slickTrackEl, 'transform', `translate3d(${-t * this.unitWidth}px, 0, 0`);\n }\n }\n\n private prepareVerticalContext(lastToFirst: boolean): void {\n if (lastToFirst) {\n this.renderer.setStyle(this.firstEl, 'top', `${this.length * this.unitHeight}px`);\n this.renderer.setStyle(this.lastEl, 'top', null);\n } else {\n this.renderer.setStyle(this.firstEl, 'top', null);\n this.renderer.setStyle(this.lastEl, 'top', `${-this.unitHeight * this.length}px`);\n }\n }\n\n private prepareHorizontalContext(lastToFirst: boolean): void {\n if (lastToFirst) {\n this.renderer.setStyle(this.firstEl, 'left', `${this.length * this.unitWidth}px`);\n this.renderer.setStyle(this.lastEl, 'left', null);\n } else {\n this.renderer.setStyle(this.firstEl, 'left', null);\n this.renderer.setStyle(this.lastEl, 'left', `${-this.unitWidth * this.length}px`);\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Direction } from '@angular/cdk/bidi';\nimport { InjectionToken, NgZone, QueryList } from '@angular/core';\n\nimport { NzCarouselContentDirective } from './carousel-content.directive';\nimport { NzCarouselBaseStrategy } from './strategies/base-strategy';\n\nexport type NzCarouselEffects = 'fade' | 'scrollx' | string;\nexport type NzCarouselDotPosition = 'top' | 'bottom' | 'left' | 'right' | string;\n\nexport interface NzCarouselComponentAsSource {\n carouselContents: QueryList<NzCarouselContentDirective>;\n el: HTMLElement;\n nzTransitionSpeed: number;\n vertical: boolean;\n slickListEl: HTMLElement;\n slickTrackEl: HTMLElement;\n activeIndex: number;\n dir: Direction;\n ngZone: NgZone;\n}\n\nexport interface NzCarouselStrategyRegistryItem {\n name: string;\n strategy: NzCarouselBaseStrategy;\n}\n\nexport const NZ_CAROUSEL_CUSTOM_STRATEGIES = new InjectionToken<NzCarouselStrategyRegistryItem[]>(\n 'nz-carousel-custom-strategies'\n);\n\nexport interface PointerVector {\n x: number;\n y: number;\n}\n\nexport interface FromToInterface {\n from: number;\n to: number;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Direction, Directionality } from '@angular/cdk/bidi';\nimport { LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';\nimport { Platform } from '@angular/cdk/platform';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n Renderer2,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n numberAttribute\n} from '@angular/core';\nimport { Subject, fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';\n\nimport { NzResizeObserver } from 'ng-zorro-antd/cdk/resize-observer';\nimport { NzConfigKey, NzConfigService, WithConfig } from 'ng-zorro-antd/core/config';\nimport { NzDragService, NzResizeService } from 'ng-zorro-antd/core/services';\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzCarouselContentDirective } from './carousel-content.directive';\nimport { NzCarouselBaseStrategy } from './strategies/base-strategy';\nimport { NzCarouselOpacityStrategy } from './strategies/opacity-strategy';\nimport { NzCarouselTransformStrategy } from './strategies/transform-strategy';\nimport {\n FromToInterface,\n NZ_CAROUSEL_CUSTOM_STRATEGIES,\n NzCarouselDotPosition,\n NzCarouselEffects,\n PointerVector\n} from './typings';\n\nconst NZ_CONFIG_MODULE_NAME: NzConfigKey = 'carousel';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'nz-carousel',\n exportAs: 'nzCarousel',\n preserveWhitespaces: false,\n template: `\n <div\n class=\"slick-initialized slick-slider\"\n [class.slick-vertical]=\"nzDotPosition === 'left' || nzDotPosition === 'right'\"\n >\n <div\n #slickList\n class=\"slick-list\"\n tabindex=\"-1\"\n (mousedown)=\"pointerDown($event)\"\n (touchstart)=\"pointerDown($event)\"\n >\n <!-- Render carousel items. -->\n <div class=\"slick-track\" #slickTrack>\n <ng-content></ng-content>\n </div>\n </div>\n <!-- Render dots. -->\n @if (nzDots) {\n <ul\n class=\"slick-dots\"\n [class.slick-dots-top]=\"nzDotPosition === 'top'\"\n [class.slick-dots-bottom]=\"nzDotPosition === 'bottom'\"\n [class.slick-dots-left]=\"nzDotPosition === 'left'\"\n [class.slick-dots-right]=\"nzDotPosition === 'right'\"\n >\n @for (content of carouselContents; track content) {\n <li [class.slick-active]=\"$index === activeIndex\" (click)=\"onLiClick($index)\">\n <ng-template\n [ngTemplateOutlet]=\"nzDotRender || renderDotTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: $index }\"\n ></ng-template>\n </li>\n }\n </ul>\n }\n </div>\n\n <ng-template #renderDotTemplate let-index>\n <button>{{ index + 1 }}</button>\n </ng-template>\n `,\n host: {\n class: 'ant-carousel',\n '[class.ant-carousel-vertical]': 'vertical',\n '[class.ant-carousel-rtl]': `dir === 'rtl'`\n },\n imports: [NgTemplateOutlet],\n standalone: true\n})\nexport class NzCarouselComponent implements AfterContentInit, AfterViewInit, OnDestroy, OnChanges, OnInit {\n readonly _nzModuleName: NzConfigKey = NZ_CONFIG_MODULE_NAME;\n\n @ContentChildren(NzCarouselContentDirective) carouselContents!: QueryList<NzCarouselContentDirective>;\n\n @ViewChild('slickList', { static: true }) slickList!: ElementRef<HTMLElement>;\n @ViewChild('slickTrack', { static: true }) slickTrack!: ElementRef<HTMLElement>;\n\n @Input() nzDotRender?: TemplateRef<{ $implicit: number }>;\n @Input() @WithConfig() nzEffect: NzCarouselEffects = 'scrollx';\n @Input({ transform: booleanAttribute }) @WithConfig() nzEnableSwipe: boolean = true;\n @Input({ transform: booleanAttribute }) @WithConfig() nzDots: boolean = true;\n @Input({ transform: booleanAttribute }) @WithConfig() nzAutoPlay: boolean = false;\n @Input({ transform: numberAttribute }) @WithConfig() nzAutoPlaySpeed: number = 3000;\n @Input({ transform: numberAttribute }) nzTransitionSpeed = 500;\n @Input() @WithConfig() nzLoop: boolean = true;\n\n /**\n * this property is passed directly to an NzCarouselBaseStrategy\n */\n @Input() nzStrategyOptions: NzSafeAny = undefined;\n\n @Input()\n // @ts-ignore\n @WithConfig()\n set nzDotPosition(value: NzCarouselDotPosition) {\n this._dotPosition = value;\n if (value === 'left' || value === 'right') {\n this.vertical = true;\n } else {\n this.vertical = false;\n }\n }\n\n get nzDotPosition(): NzCarouselDotPosition {\n return this._dotPosition;\n }\n\n private _dotPosition: NzCarouselDotPosition = 'bottom';\n\n @Output() readonly nzBeforeChange = new EventEmitter<FromToInterface>();\n @Output() readonly nzAfterChange = new EventEmitter<number>();\n\n activeIndex = 0;\n el: HTMLElement;\n slickListEl!: HTMLElement;\n slickTrackEl!: HTMLElement;\n strategy?: NzCarouselBaseStrategy;\n vertical = false;\n transitionInProgress?: ReturnType<typeof setTimeout>;\n dir: Direction = 'ltr';\n\n private destroy$ = new Subject<void>();\n private gestureRect: ClientRect | null = null;\n private pointerDelta: PointerVector | null = null;\n private isTransiting = false;\n private isDragging = false;\n private directionality = inject(Directionality);\n private customStrategies = inject(NZ_CAROUSEL_CUSTOM_STRATEGIES, { optional: true });\n\n constructor(\n elementRef: ElementRef,\n public readonly nzConfigService: NzConfigService,\n public readonly ngZone: NgZone,\n private readonly renderer: Renderer2,\n private readonly cdr: ChangeDetectorRef,\n private readonly platform: Platform,\n private readonly resizeService: NzResizeService,\n private readonly nzDragService: NzDragService,\n private nzResizeObserver: NzResizeObserver\n ) {\n this.nzDotPosition = 'bottom';\n this.el = elementRef.nativeElement;\n }\n ngOnInit(): void {\n this.slickListEl = this.slickList!.nativeElement;\n this.slickTrackEl = this.slickTrack!.nativeElement;\n\n this.dir = this.directionality.value;\n\n this.directionality.change.pipe(takeUntil(this.destroy$)).subscribe((direction: Direction) => {\n this.dir = direction;\n this.markContentActive(this.activeIndex);\n this.cdr.detectChanges();\n });\n\n this.ngZone.runOutsideAngular(() => {\n fromEvent<KeyboardEvent>(this.slickListEl, 'keydown')\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => {\n const { keyCode } = event;\n\n if (keyCode !== LEFT_ARROW && keyCode !== RIGHT_ARROW) {\n return;\n }\n\n event.preventDefault();\n\n this.ngZone.run(() => {\n if (keyCode === LEFT_ARROW) {\n this.pre();\n } else {\n this.next();\n }\n this.cdr.markForCheck();\n });\n });\n });\n\n this.nzResizeObserver\n .observe(this.el)\n .pipe(debounceTime(100), distinctUntilChanged(), takeUntil(this.destroy$))\n .subscribe(() => {\n this.layout();\n });\n }\n\n ngAfterContentInit(): void {\n this.markContentActive(0);\n }\n\n ngAfterViewInit(): void {\n this.carouselContents.changes.subscribe(() => {\n this.markContentActive(0);\n this.layout();\n });\n\n this.resizeService\n .subscribe()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.layout();\n });\n\n this.switchStrategy();\n this.markContentActive(0);\n this.layout();\n\n // If embedded in an entry component, it may do initial render at an inappropriate time.\n // ngZone.onStable won't do this trick\n // TODO: need to change this.\n Promise.resolve().then(() => {\n this.layout();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { nzEffect, nzDotPosition } = changes;\n\n if (nzEffect && !nzEffect.isFirstChange()) {\n this.switchStrategy();\n this.markContentActive(0);\n this.layout();\n }\n\n if (nzDotPosition && !nzDotPosition.isFirstChange()) {\n this.switchStrategy();\n this.markContentActive(0);\n this.layout();\n }\n\n if (!this.nzAutoPlay || !this.nzAutoPlaySpeed) {\n this.clearScheduledTransition();\n } else {\n this.scheduleNextTransition();\n }\n }\n\n ngOnDestroy(): void {\n this.clearScheduledTransition();\n if (this.strategy) {\n this.strategy.dispose();\n }\n\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n onLiClick = (index: number): void => {\n if (this.dir === 'rtl') {\n this.goTo(this.carouselContents.length - 1 - index);\n } else {\n this.goTo(index);\n }\n };\n\n next(): void {\n this.goTo(this.activeIndex + 1);\n }\n\n pre(): void {\n this.goTo(this.activeIndex - 1);\n }\n\n goTo(index: number): void {\n if (\n this.carouselContents &&\n this.carouselContents.length &&\n !this.isTransiting &&\n (this.nzLoop || (index >= 0 && index < this.carouselContents.length))\n ) {\n const length = this.carouselContents.length;\n const from = this.activeIndex;\n const to = (index + length) % length;\n this.isTransiting = true;\n this.nzBeforeChange.emit({ from, to });\n this.strategy!.switch(this.activeIndex, index).subscribe(() => {\n this.scheduleNextTransition();\n this.nzAfterChange.emit(to);\n this.isTransiting = false;\n });\n this.markContentActive(to);\n this.cdr.markForCheck();\n }\n }\n\n private switchStrategy(): void {\n if (this.strategy) {\n this.strategy.dispose();\n }\n\n // Load custom strategies first.\n const customStrategy = this.customStrategies ? this.customStrategies.find(s => s.name === this.nzEffect) : null;\n if (customStrategy) {\n this.strategy = new (customStrategy.strategy as NzSafeAny)(this, this.cdr, this.renderer, this.platform);\n return;\n }\n\n this.strategy =\n this.nzEffect === 'scrollx'\n ? new NzCarouselTransformStrategy(this, this.cdr, this.renderer, this.platform)\n : new NzCarouselOpacityStrategy(this, this.cdr, this.renderer, this.platform);\n }\n\n private scheduleNextTransition(): void {\n this.clearScheduledTransition();\n if (this.nzAutoPlay && this.nzAutoPlaySpeed > 0 && this.platform.isBrowser) {\n this.transitionInProgress = setTimeout(() => {\n this.goTo(this.activeIndex + 1);\n }, this.nzAutoPlaySpeed);\n }\n }\n\n private clearScheduledTransition(): void {\n if (this.transitionInProgress) {\n clearTimeout(this.transitionInProgress);\n this.transitionInProgress = undefined;\n }\n }\n\n private markContentActive(index: number): void {\n this.activeIndex = index;\n\n if (this.carouselContents) {\n this.carouselContents.forEach((slide, i) => {\n if (this.dir === 'rtl') {\n slide.isActive = index === this.carouselContents.length - 1 - i;\n } else {\n slide.isActive = index === i;\n }\n });\n }\n\n this.cdr.markForCheck();\n }\n\n /**\n * Drag carousel.\n */\n pointerDown = (event: TouchEvent | MouseEvent): void => {\n if (!this.isDragging && !this.isTransiting && this.nzEnableSwipe) {\n this.clearScheduledTransition();\n this.gestureRect = this.slickListEl.getBoundingClientRect();\n\n this.nzDragService.requestDraggingSequence(event).subscribe(\n delta => {\n this.pointerDelta = delta;\n this.isDragging = true;\n this.strategy?.dragging(this.pointerDelta);\n },\n () => {},\n () => {\n if (this.nzEnableSwipe && this.isDragging) {\n const xDelta = this.pointerDelta ? this.pointerDelta.x : 0;\n\n // Switch to another slide if delta is bigger than third of the width.\n if (\n Math.abs(xDelta) > this.gestureRect!.width / 3 &&\n (this.nzLoop ||\n (xDelta <= 0 && this.activeIndex + 1 < this.carouselContents.length) ||\n (xDelta > 0 && this.activeIndex > 0))\n ) {\n this.goTo(xDelta > 0 ? this.activeIndex - 1 : this.activeIndex + 1);\n } else {\n this.goTo(this.activeIndex);\n }\n\n this.gestureRect = null;\n this.pointerDelta = null;\n }\n\n this.isDragging = false;\n }\n );\n }\n };\n\n layout(): void {\n if (this.strategy) {\n this.strategy.withCarouselContents(this.carouselContents);\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { NzCarouselContentDirective } from './carousel-content.directive';\nimport { NzCarouselComponent } from './carousel.component';\n\n@NgModule({\n imports: [NzCarouselComponent, NzCarouselContentDirective],\n exports: [NzCarouselComponent, NzCarouselContentDirective]\n})\nexport class NzCarouselModule {}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Platform } from '@angular/cdk/platform';\nimport { ChangeDetectorRef, QueryList, Renderer2 } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { NzCarouselContentDirective } from '../../carousel-content.directive';\nimport { NzCarouselComponentAsSource, PointerVector } from '../../typings';\nimport { NzCarouselBaseStrategy } from '../base-strategy';\n\ninterface NzCarouselTransformOnLoopStrategyOptions {\n direction: 'left' | 'right';\n}\n\n/**\n * this strategy is very much like NzCarouselTransformStrategy, but it doesn't loop between the first and the last one\n */\nexport class NzCarouselTransformNoLoopStrategy extends NzCarouselBaseStrategy<NzCarouselTransformOnLoopStrategyOptions> {\n private isTransitioning = false;\n\n private get vertical(): boolean {\n return this.carouselComponent!.vertical;\n }\n\n constructor(\n carouselComponent: NzCarouselComponentAsSource,\n cdr: ChangeDetectorRef,\n renderer: Renderer2,\n platform: Platform,\n options?: NzCarouselTransformOnLoopStrategyOptions\n ) {\n super(carouselComponent, cdr, renderer, platform, options);\n }\n\n override dispose(): void {\n this.renderer.setStyle(this.slickTrackEl, 'transform', null);\n\n super.dispose();\n }\n\n override withCarouselContents(contents: QueryList<NzCarouselContentDirective> | null): void {\n super.withCarouselContents(contents);\n\n const carousel = this.carouselComponent!;\n const activeIndex = carousel.activeIndex;\n\n if (this.platform.isBrowser && this.contents.length) {\n this.renderer.setStyle(this.slickListEl, 'height', `${this.unitHeight}px`);\n\n if (this.platform.isBrowser && this.contents.length) {\n this.renderer.setStyle(this.slickListEl, 'height', `${this.unitHeight}px`);\n\n if (this.vertical) {\n this.renderer.setStyle(this.slickTrackEl, 'width', `${this.unitWidth}px`);\n this.renderer.setStyle(this.slickTrackEl, 'height', `${this.length * this.unitHeight}px`);\n this.renderer.setStyle(\n this.slickTrackEl,\n 'transform',\n `translate3d(0, ${-activeIndex * this.unitHeight}px, 0)`\n );\n } else {\n this.renderer.setStyle(this.slickTrackEl, 'height', `${this.unitHeight}px`);\n this.renderer.setStyle(this.slickTrackEl, 'width', `${this.length * this.unitWidth}px`);\n this.renderer.setStyle(\n this.slickTrackEl,\n 'transform',\n `translate3d(${-activeIndex * this.unitWidth}px, 0, 0)`\n );\n }\n\n this.contents.forEach((content: NzCarouselContentDirective) => {\n this.renderer.setStyle(content.el, 'position', 'relative');\n this.renderer.setStyle(content.el, 'width', `${this.unitWidth}px`);\n this.renderer.setStyle(content.el, 'height', `${this.unitHeight}px`);\n });\n }\n }\n }\n\n switch(_f: number, _t: number): Observable<void> {\n const to = (_t + this.length) % this.length;\n const transitionSpeed = this.carouselComponent!.nzTransitionSpeed;\n const complete$ = new Subject<void>();\n\n this.renderer.setStyle(this.slickTrackEl, 'transition', `transform ${transitionSpeed}ms ease`);\n\n if (this.vertical) {\n this.renderer.setStyle(this.slickTrackEl, 'transform', `translate3d(0, ${-to * this.unitHeight}px, 0)`);\n } else {\n this.renderer.setStyle(this.slickTrackEl, 'transform', `translate3d(${-to * this.unitWidth}px, 0, 0)`);\n }\n\n this.isTransitioning = true;\n\n setTimeout(() => {\n // this strategy don't need to do a following adjust\n this.isTransitioning = false;\n\n complete$.next();\n complete$.complete();\n }, transitionSpeed);\n\n return complete$.asObservable();\n }\n\n override dragging(vector: PointerVector): void {\n if (this.isTransitioning) {\n return;\n }\n\n const activeIndex = this.carouselComponent!.activeIndex;\n\n if (this.vertical) {\n this.renderer.setStyle(\n this.slickTrackEl,\n 'transform',\n `translate3d(0, ${-activeIndex * this.unitHeight + vector.x}px, 0)`\n );\n } else {\n this.renderer.setStyle(\n this.slickTrackEl,\n 'transform',\n `translate3d(${-activeIndex * this.unitWidth + vector.x}px, 0, 0)`\n );\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { QueryList } from '@angular/core';\nimport { Observable, Subject, timer } from 'rxjs';\n\nimport { NzCarouselContentDirective } from '../../carousel-content.directive';\nimport { NzCarouselBaseStrategy } from '../base-strategy';\n\nexport class NzCarouselFlipStrategy extends NzCarouselBaseStrategy {\n override withCarouselContents(contents: QueryList<NzCarouselContentDirective> | null): void {\n super.withCarouselContents(contents);\n\n if (this.contents) {\n this.renderer.setStyle(this.slickListEl, 'width', `${this.unitWidth}px`);\n this.renderer.setStyle(this.slickTrackEl, 'width', `${this.length * this.unitWidth}px`);\n\n this.contents.forEach((content: NzCarouselContentDirective, i: number) => {\n const cur = this.carouselComponent!.activeIndex === i;\n\n this.renderer.setStyle(content.el, 'transform', cur ? 'rotateY(0deg)' : 'rotateY(180deg)');\n this.renderer.setStyle(content.el, 'position', 'relative');\n this.renderer.setStyle(content.el, 'width', `${this.unitWidth}px`);\n this.renderer.setStyle(content.el, 'left', `${-this.unitWidth * i}px`);\n this.renderer.setStyle(content.el, 'transform-style', 'preserve-3d');\n this.renderer.setStyle(content.el, 'backface-visibility', 'hidden');\n });\n\n const { carouselComponent } = this;\n carouselComponent!.ngZone.runOutsideAngular(() => {\n timer(carouselComponent!.nzTransitionSpeed).subscribe(() => {\n this.contents.forEach(c => this.renderer.setStyle(c.el, 'transition', ['transform 500ms ease 0s']));\n });\n });\n }\n }\n\n switch(rawF: number, rawT: number): Observable<void> {\n const { from, to } = this.getFromToInBoundary(rawF, rawT);\n const complete$ = new Subject<void>();\n const speed = this.carouselComponent!.nzTransitionSpeed;\n\n timer(speed).subscribe(() => {\n complete$.next();\n complete$.complete();\n });\n\n if (rawF === rawT) {\n return complete$;\n }\n\n this.contents.forEach((content: NzCarouselContentDirective, i: number) => {\n if (i === from) {\n this.renderer.setStyle(content.el, 'transform', 'rotateY(180deg)');\n } else if (i === to) {\n this.renderer.setStyle(content.el, 'transform', 'rotateY(0deg)');\n }\n });\n\n return complete$.asObservable();\n }\n\n override dispose(): void {\n this.contents.forEach((content: NzCarouselContentDirective) => {\n this.renderer.setStyle(content.el, 'transition', null);\n this.renderer.setStyle(content.el, 'transform', null);\n this.renderer.setStyle(content.el, 'width', null);\n this.renderer.setStyle(content.el, 'left', null);\n this.renderer.setStyle(content.el, 'transform-style', null);\n this.renderer.setStyle(content.el, 'backface-visibility', null);\n });\n\n super.dispose();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nexport * from './carousel.module';\nexport * from './carousel.component';\nexport * from './carousel-content.directive';\nexport * from './typings';\n\nexport * from './strategies/base-strategy';\nexport { NzCarouselOpacityStrategy } from './strategies/opacity-strategy';\nexport { NzCarouselTransformStrategy } from './strategies/transform-strategy';\nexport { NzCarouselTransformNoLoopStrategy } from './strategies/experimental/transform-no-loop-strategy';\nexport { NzCarouselFlipStrategy } from './strategies/experimental/flip-strategy';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;AAGG;MAYU,0BAA0B,CAAA;IAGrC,IAAI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;AACrB,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SACjD;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SACpD;KACF;AAED,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IA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