ng-zorro-antd-mobile
Version:
An enterprise-class mobile UI components based on Ant Design and Angular
655 lines (648 loc) • 29.8 kB
JavaScript
import * as i0 from '@angular/core';
import { Component, ViewEncapsulation, HostBinding, Input, EventEmitter, ContentChildren, Output, HostListener, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import { getEventTarget } from 'ng-zorro-antd-mobile/core';
class CarouselSlideComponent {
constructor() {
this.container = true;
this.height = 'auto';
this.overflow = 'hidden';
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselSlideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: CarouselSlideComponent, selector: "CarouselSlide, nzm-carousel-slide", host: { properties: { "class.am-carousel-container": "this.container", "style.width.px": "this.width", "style.height": "this.height", "style.left.px": "this.left", "style.top.px": "this.top", "style.margin": "this.margin", "style.overflow": "this.overflow" } }, ngImport: i0, template: "<ng-content></ng-content>\n", encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselSlideComponent, decorators: [{
type: Component,
args: [{ selector: 'CarouselSlide, nzm-carousel-slide', encapsulation: ViewEncapsulation.None, template: "<ng-content></ng-content>\n" }]
}], propDecorators: { container: [{
type: HostBinding,
args: ['class.am-carousel-container']
}], width: [{
type: HostBinding,
args: ['style.width.px']
}], height: [{
type: HostBinding,
args: ['style.height']
}], left: [{
type: HostBinding,
args: ['style.left.px']
}], top: [{
type: HostBinding,
args: ['style.top.px']
}], margin: [{
type: HostBinding,
args: ['style.margin']
}], overflow: [{
type: HostBinding,
args: ['style.overflow']
}] } });
class DotIndicatorComponent {
constructor() {
this.items = [];
this._page = 0;
this._pageCount = 0;
this.dotStyle = {};
this.dotActiveStyle = {};
this.dotColor = 'white';
this.dotIndicator = true;
}
set page(p) {
this._page = p;
this.updateSelected();
}
set pageCount(p) {
this._pageCount = p || 0;
this.updateItems();
}
updateItems() {
this.items = new Array(this._pageCount);
for (let i = 0; i < this._pageCount; i++) {
this.items[i] = { active: i == this._page };
}
}
updateSelected() {
if (this.items.length != this._pageCount) {
return this.updateItems();
}
if (this.items.length == 0) {
return;
}
for (let i = 0; i < this._pageCount; i++) {
this.items[i].active = false;
}
this.items[this._page].active = true;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DotIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: DotIndicatorComponent, selector: "DotIndicator, nzm-dot-indicator", inputs: { page: "page", pageCount: "pageCount", dotStyle: "dotStyle", dotActiveStyle: "dotActiveStyle", dotColor: "dotColor" }, host: { properties: { "class.dot-indicator": "this.dotIndicator" } }, ngImport: i0, template: "<div class=\"am-carousel-wrap\">\n <div *ngFor=\"let item of items\" class=\"am-carousel-wrap-dot\" [class.am-carousel-wrap-dot-active]=\"item.active\">\n <span [ngStyle]=\"item.active ? dotActiveStyle : dotStyle\"></span>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DotIndicatorComponent, decorators: [{
type: Component,
args: [{ selector: 'DotIndicator, nzm-dot-indicator', encapsulation: ViewEncapsulation.None, template: "<div class=\"am-carousel-wrap\">\n <div *ngFor=\"let item of items\" class=\"am-carousel-wrap-dot\" [class.am-carousel-wrap-dot-active]=\"item.active\">\n <span [ngStyle]=\"item.active ? dotActiveStyle : dotStyle\"></span>\n </div>\n</div>\n" }]
}], propDecorators: { page: [{
type: Input
}], pageCount: [{
type: Input
}], dotStyle: [{
type: Input
}], dotActiveStyle: [{
type: Input
}], dotColor: [{
type: Input
}], dotIndicator: [{
type: HostBinding,
args: ['class.dot-indicator']
}] } });
class CarouselComponent {
get selectedIndex() {
return this._selectedIndex;
}
set selectedIndex(value) {
if (typeof value === 'undefined') {
value = 0;
}
this._selectedIndex = Math.abs(value);
if (this._nodeArr.length > 0) {
this.carousel(1);
}
}
panstart(event) {
event.stopPropagation();
event.preventDefault();
if (!this._dragging) {
return;
}
this.stopTimer();
this._isMouseDown = true;
this.touchObject = {
startX: getEventTarget(event).pageX,
startY: getEventTarget(event).pageY,
direction: this.touchObject.direction
};
}
panmove(event) {
event.stopPropagation();
event.preventDefault();
if (!this._dragging || !this._isMouseDown) {
return;
}
const { direction } = this.swipeDirection(this.touchObject.startX, getEventTarget(event).pageX, this.touchObject.startY, getEventTarget(event).pageY);
if (direction === 0) {
return;
}
const length = this.vertical
? Math.abs(getEventTarget(event).pageY - this.touchObject.startY)
: Math.abs(getEventTarget(event).pageX - this.touchObject.startX);
const offset = -this.touchObject.direction * length - this.currentSelectedIndex * this._rationWidth;
this.touchObject = {
startX: this.touchObject.startX,
startY: this.touchObject.startY,
endX: getEventTarget(event).pageX,
endY: getEventTarget(event).pageY,
length,
direction,
offset
};
if (direction !== 0) {
this.setSlideStyles(this.currentSelectedIndex, this.touchObject.direction);
}
this.getListStyles(offset);
}
panend(event) {
event.stopPropagation();
event.preventDefault();
if (!this._dragging || !this._isMouseDown || !this.touchObject.length || this.touchObject.length === undefined) {
this._isMouseDown = false;
return;
}
this._isMouseDown = false;
if (this.touchObject.length > this.swipeSpeed) {
this.carousel(this.touchObject.direction);
}
else {
this.getListStyles(this.touchObject.direction * this.touchObject.length + this.touchObject.offset);
this.style['transition'] = this._transition;
}
setTimeout(() => {
this.startTimer();
}, this.speed);
}
cancel() {
setTimeout(() => {
this.startTimer();
}, this.speed);
}
resize() {
if (this._resizeTimer) {
clearTimeout(this._resizeTimer);
}
this._resizeTimer = setTimeout(() => {
this.ngAfterViewInit();
clearTimeout(this._resizeTimer);
}, 200);
}
constructor(_ele) {
this._ele = _ele;
this.style = {
height: 'auto',
width: '100%',
transform: 'translate3d(0px, 0px, 0px)',
margin: ''
};
this.lastIndex = 0;
this.currentSelectedIndex = 0;
this._nodeArr = [];
this._isMouseDown = false;
this._rationWidth = 0;
this._currentSlideWidth = 0;
this._currentSlideHeight = 0;
this._transition = '';
this._spaceWidth = 0;
this._dragging = true;
this._selectedIndex = 0;
this.speed = 500;
this.dots = true;
this.vertical = false;
this.autoplay = false;
this.autoplayInterval = 3000;
this.infinite = false;
this.dotStyle = {};
this.dotActiveStyle = {};
this.frameOverflow = 'hidden';
this.cellSpacing = 0;
this.slideWidth = 1;
this.swipeSpeed = 12;
this.dragging = true;
this.afterChange = new EventEmitter();
this.beforeChange = new EventEmitter();
this.carouselWrapper = true;
this.carouselwrap = true;
}
initCarouselSize() {
const nativeElement = this._ele.nativeElement;
this.slideHeight = nativeElement.querySelector('carouselslide').clientHeight;
this._currentSlideHeight = this.slideHeight * this.slideWidth;
this._currentSlideWidth = nativeElement.clientWidth;
this._rationWidth = this.vertical ? this._currentSlideHeight : this._currentSlideWidth * this.slideWidth;
this._spaceWidth = ((this.vertical ? this.slideHeight : this._currentSlideWidth) - this._rationWidth) / 2;
}
carouselInit(items) {
this.infinite = this.infinite || true;
this._nodeArr = items['_results'];
const shouldDragging = this._nodeArr.length > 1;
this._dragging = this.dragging && shouldDragging ? true : false;
if (this._nodeArr.length > 1) {
this.lastIndex = this._nodeArr.length - 1;
setTimeout(() => {
this._nodeArr.forEach((v, index) => {
v.width = this.vertical ? 'auto' : this._rationWidth - this.cellSpacing;
v.left = this.vertical ? 0 : index === this.lastIndex ? -this._rationWidth : index * this._rationWidth;
v.top = this.vertical ? (index === this.lastIndex ? -this._rationWidth : index * this._rationWidth) : 0;
v.margin = this.vertical ? `${this.cellSpacing / 2}px auto` : `auto ${this.cellSpacing / 2}px`;
});
this.startTimer();
}, 0);
}
else if (this._nodeArr.length === 1) {
setTimeout(() => {
this._nodeArr.forEach(v => {
v.width = this.vertical ? 'auto' : this._rationWidth - this.cellSpacing;
v.left = 0;
v.top = 0;
v.margin = `auto ${this.cellSpacing / 2}px`;
});
this.stopTimer();
}, 0);
}
}
startTimer() {
if (!this.autoplay) {
return;
}
this.stopTimer();
this._timer = this.autoplayInterval
? setInterval(() => {
if (document.getElementsByTagName('carousel').length === 0) {
return;
}
this.carousel(1);
}, this.autoplayInterval)
: 0;
}
stopTimer() {
clearInterval(this._timer);
}
carousel(moveDirection) {
if (this.vertical) {
if (moveDirection === 1) {
this.moveUp();
}
else if (moveDirection === -1) {
this.moveDown();
}
}
else {
if (moveDirection === 1) {
this.moveLeft();
}
else if (moveDirection === -1) {
this.moveRight();
}
}
this.style['transition'] = this._transition;
}
moveUp() {
this.gotoCarousel(this.getAfterNode(false));
}
moveDown() {
this.gotoCarousel(this.getAfterNode(true));
}
moveLeft() {
this.gotoCarousel(this.getAfterNode(false));
}
moveRight() {
this.gotoCarousel(this.getAfterNode(true));
}
getAfterNode(pre) {
let nextIndex;
if (pre) {
if (this.currentSelectedIndex <= 0) {
this.getListStyles(this._rationWidth);
setTimeout(() => {
this._nodeArr.forEach((v, tempIndex) => {
if (tempIndex === 0) {
v.left = this.vertical ? 0 : this._nodeArr.length * this._rationWidth;
v.top = this.vertical ? this._nodeArr.length * this._rationWidth : 0;
}
else {
v.left = this.vertical ? 0 : tempIndex * this._rationWidth;
v.top = this.vertical ? tempIndex * this._rationWidth : 0;
}
});
this.getListStyles(-this._rationWidth * (this.items.length - 1));
}, this.speed);
nextIndex = !this.infinite ? null : this.lastIndex;
this.beforeChange.emit({ from: this.currentSelectedIndex, to: nextIndex });
return nextIndex;
}
nextIndex = this.currentSelectedIndex - 1;
this.getListStyles(nextIndex * this._rationWidth * this.touchObject.direction);
this._nodeArr.forEach((v, tempIndex) => {
if (0 === tempIndex && nextIndex === this._nodeArr.length - 2) {
v.left = 0;
v.top = 0;
}
});
this.beforeChange.emit({ from: this.currentSelectedIndex, to: nextIndex });
return nextIndex;
}
else {
if (this.currentSelectedIndex >= this.lastIndex) {
this.setSlideStyles(this.currentSelectedIndex, 1);
this.getListStyles(-(this.lastIndex + 1) * this._rationWidth);
nextIndex = !this.infinite ? null : 0;
this.beforeChange.emit({ from: this.currentSelectedIndex, to: nextIndex });
return nextIndex;
}
nextIndex = this.currentSelectedIndex + 1;
this.setSlideStyles(this.currentSelectedIndex, 1);
this.getListStyles(-nextIndex * this._rationWidth);
this.beforeChange.emit({ from: this.currentSelectedIndex, to: nextIndex });
return nextIndex;
}
}
caculateDirectionLeftCurrentIndex() {
const previousIndex = this.currentSelectedIndex;
this.currentSelectedIndex = (previousIndex + 1) % this.items.length;
}
caculateDirectionRightCurrentIndex() {
if (this.currentSelectedIndex === 0) {
this.currentSelectedIndex = this.items.length;
}
const previousIndex = this.currentSelectedIndex;
this.currentSelectedIndex = (previousIndex - 1) % this.items.length;
}
gotoCarousel(afterIndex) {
if (afterIndex === null) {
return;
}
this.getCurrentIndex();
if (afterIndex === 0) {
setTimeout(() => {
this._nodeArr.forEach((v, index) => {
if (this._nodeArr.length > 1 && index === this._nodeArr.length - 1) {
v.left = this.vertical ? 0 : -this._rationWidth;
v.top = this.vertical ? -this._rationWidth : 0;
}
else {
v.left = this.vertical ? 0 : index * this._rationWidth;
v.top = this.vertical ? index * this._rationWidth : 0;
}
});
if (this._nodeArr.length > 1) {
this.startTimer();
}
this.getListStyles(0);
}, this.speed);
}
this.currentSelectedIndex = afterIndex;
this.afterChange.emit(this.currentSelectedIndex);
}
getCurrentIndex() {
if (this.touchObject.direction === 1) {
this.caculateDirectionLeftCurrentIndex();
}
else {
this.caculateDirectionRightCurrentIndex();
}
}
setSlideStyles(index, direction, xDist = 0) {
if (direction === 1) {
this._nodeArr.forEach((v, tempIndex) => {
if (index < this._nodeArr.length && index - 1 === tempIndex) {
if (xDist === 0 || xDist > this._spaceWidth) {
v.left = this.vertical ? 0 : (this._nodeArr.length + tempIndex) * this._rationWidth;
v.top = this.vertical ? (this._nodeArr.length + tempIndex) * this._rationWidth : 0;
}
}
else if (this._nodeArr.length - 1 === tempIndex && index !== 2) {
if (xDist === 0 || xDist > this._spaceWidth) {
v.left = this.vertical ? 0 : (this._nodeArr.length - 1) * this._rationWidth;
v.top = this.vertical ? (this._nodeArr.length - 1) * this._rationWidth : 0;
}
}
else if (index === this._nodeArr.length - 1 && tempIndex === 1 && this.autoplay) {
v.left = this.vertical ? 0 : (this._nodeArr.length + tempIndex) * this._rationWidth;
v.top = this.vertical ? tempIndex * this._rationWidth : 0;
}
else if (index === this._nodeArr.length - 1 && tempIndex === 0 && !this.autoplay) {
v.left = this.vertical ? 0 : (this._nodeArr.length + tempIndex) * this._rationWidth;
v.top = this.vertical ? tempIndex * this._rationWidth : 0;
}
});
}
else if (direction === -1) {
this._nodeArr.forEach((v, tempIndex) => {
if (index === 0 && this._nodeArr.length - 1 === tempIndex) {
v.left = this.vertical ? 0 : direction * this._rationWidth;
v.top = this.vertical ? direction * this._rationWidth : 0;
}
else if (index === this._nodeArr.length - 2 && index + 1 === tempIndex) {
v.left = this.vertical ? 0 : direction * this._rationWidth;
v.top = this.vertical ? direction * this._rationWidth : 0;
}
else if (index === 1 && 0 === tempIndex) {
v.left = this.vertical ? 0 : direction * this._rationWidth * tempIndex;
v.top = this.vertical ? direction * this._rationWidth : 0;
}
else if (index > 1) {
v.left = this.vertical ? 0 : tempIndex * this._rationWidth;
v.top = this.vertical ? tempIndex * this._rationWidth : 0;
}
});
}
}
getListStyles(offset = 0) {
const positionOffset = offset +
(this.vertical
? (this.slideHeight - this._currentSlideHeight) / 2
: (this._currentSlideWidth - this._rationWidth) / 2) -
this.cellSpacing;
this.style = {
height: this._currentSlideHeight + 'px',
width: '100%',
transform: this.vertical
? `translate3d(0px, ${positionOffset}px, 0px)`
: `translate3d(${positionOffset}px, 0px, 0px)`,
margin: this.vertical ? `${(this.cellSpacing / 2) * -1}px 0px` : `0px ${(this.cellSpacing / 2) * -1}px`
};
}
swipeDirection(x1, x2, y1, y2) {
const xDist = x1 - x2;
const yDist = y1 - y2;
const r = Math.atan2(yDist, xDist);
let swipeAngle = Math.round((r * 180) / Math.PI);
if (swipeAngle < 0) {
swipeAngle = 360 - Math.abs(swipeAngle);
}
if (swipeAngle <= 45 && swipeAngle >= 0) {
return {
direction: 1,
xDist: xDist
};
}
if (swipeAngle <= 360 && swipeAngle >= 315) {
return {
direction: 1,
xDist: xDist
};
}
if (swipeAngle >= 135 && swipeAngle <= 225) {
return {
direction: -1,
xDist: xDist
};
}
if (this.vertical === true) {
if (swipeAngle >= 35 + 33 && swipeAngle <= 135) {
return {
direction: 1,
xDist: xDist
};
}
else {
return {
direction: -1,
xDist: xDist
};
}
}
return {
direction: 0,
xDist: xDist
};
}
get page() {
return this.dots ? this.currentSelectedIndex : 0;
}
get pageCount() {
return this.dots ? this.items.length : 0;
}
get dotindicatorStatus() {
return this.dots ? this.items.length > 1 : this.dots;
}
ngAfterViewInit() {
this.touchObject = { direction: 1 };
this._transition = `transform ${this.speed / 1000}s`;
this.items.changes.subscribe(items => {
this.carouselInit(items);
});
this.initCarouselSize();
if (!this._resizeTimer) {
this.selectedIndex = this.items.length - 1 < this.selectedIndex ? 0 : this.selectedIndex;
setTimeout(() => {
this.currentSelectedIndex = this.selectedIndex;
}, 0);
}
const selectedIndex = this._resizeTimer ? this.currentSelectedIndex : this.selectedIndex;
const index = this.items.length > 1 ? (this.items.length - 1 === selectedIndex ? -1 : selectedIndex) : 0;
this.getListStyles(-index * this._rationWidth);
this.carouselInit(this.items);
const nativeElement = this._ele.nativeElement;
const targetNode = nativeElement.querySelector('carouselslide');
const config = { attributes: true, childList: true, subtree: true };
const callback = mutationsList => {
for (const mutation of mutationsList) {
if (mutation.type == 'attributes') {
if (this.slideHeight !== nativeElement.querySelector('carouselslide').clientHeight) {
this.initCarouselSize();
this.getListStyles(-index * this._rationWidth);
this.carouselInit(this.items);
}
}
}
};
if (this._observer) {
this._observer.disconnect();
}
this._observer = new MutationObserver(callback);
this._observer.observe(targetNode, config);
}
ngOnDestroy() {
this._observer.disconnect();
this._observer = null;
this.stopTimer();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: CarouselComponent, selector: "Carousel, nzm-carousel", inputs: { speed: "speed", dots: "dots", vertical: "vertical", autoplay: "autoplay", autoplayInterval: "autoplayInterval", infinite: "infinite", dotStyle: "dotStyle", dotActiveStyle: "dotActiveStyle", frameOverflow: "frameOverflow", cellSpacing: "cellSpacing", slideWidth: "slideWidth", swipeSpeed: "swipeSpeed", dragging: "dragging", selectedIndex: "selectedIndex" }, outputs: { afterChange: "afterChange", beforeChange: "beforeChange" }, host: { listeners: { "mousedown": "panstart($event)", "touchstart": "panstart($event)", "mousemove": "panmove($event)", "touchmove": "panmove($event)", "mouseleave": "panend($event)", "mouseup": "panend($event)", "touchend": "panend($event)", "touchcancel": "cancel()", "window:resize": "resize()" }, properties: { "class.am-carousel": "this.carouselWrapper", "class.carousel": "this.carouselwrap" } }, queries: [{ propertyName: "items", predicate: CarouselSlideComponent }], ngImport: i0, template: "<div class=\"slider-frame\" [ngStyle]=\"{ overflow: frameOverflow }\">\n <ul class=\"slider-list\" [ngStyle]=\"style\">\n <ng-content></ng-content>\n </ul>\n</div>\n<DotIndicator\n *ngIf=\"dotindicatorStatus\"\n class=\"am-carousel-wrap-dot\"\n [page]=\"page\"\n [dotStyle]=\"dotStyle\"\n [pageCount]=\"pageCount\"\n [dotActiveStyle]=\"dotActiveStyle\"\n></DotIndicator>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: DotIndicatorComponent, selector: "DotIndicator, nzm-dot-indicator", inputs: ["page", "pageCount", "dotStyle", "dotActiveStyle", "dotColor"] }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselComponent, decorators: [{
type: Component,
args: [{ selector: 'Carousel, nzm-carousel', encapsulation: ViewEncapsulation.None, template: "<div class=\"slider-frame\" [ngStyle]=\"{ overflow: frameOverflow }\">\n <ul class=\"slider-list\" [ngStyle]=\"style\">\n <ng-content></ng-content>\n </ul>\n</div>\n<DotIndicator\n *ngIf=\"dotindicatorStatus\"\n class=\"am-carousel-wrap-dot\"\n [page]=\"page\"\n [dotStyle]=\"dotStyle\"\n [pageCount]=\"pageCount\"\n [dotActiveStyle]=\"dotActiveStyle\"\n></DotIndicator>\n" }]
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { items: [{
type: ContentChildren,
args: [CarouselSlideComponent]
}], speed: [{
type: Input
}], dots: [{
type: Input
}], vertical: [{
type: Input
}], autoplay: [{
type: Input
}], autoplayInterval: [{
type: Input
}], infinite: [{
type: Input
}], dotStyle: [{
type: Input
}], dotActiveStyle: [{
type: Input
}], frameOverflow: [{
type: Input
}], cellSpacing: [{
type: Input
}], slideWidth: [{
type: Input
}], swipeSpeed: [{
type: Input
}], dragging: [{
type: Input
}], selectedIndex: [{
type: Input
}], afterChange: [{
type: Output
}], beforeChange: [{
type: Output
}], carouselWrapper: [{
type: HostBinding,
args: ['class.am-carousel']
}], carouselwrap: [{
type: HostBinding,
args: ['class.carousel']
}], panstart: [{
type: HostListener,
args: ['mousedown', ['$event']]
}, {
type: HostListener,
args: ['touchstart', ['$event']]
}], panmove: [{
type: HostListener,
args: ['mousemove', ['$event']]
}, {
type: HostListener,
args: ['touchmove', ['$event']]
}], panend: [{
type: HostListener,
args: ['mouseleave', ['$event']]
}, {
type: HostListener,
args: ['mouseup', ['$event']]
}, {
type: HostListener,
args: ['touchend', ['$event']]
}], cancel: [{
type: HostListener,
args: ['touchcancel']
}], resize: [{
type: HostListener,
args: ['window:resize']
}] } });
class CarouselModule {
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: CarouselModule, declarations: [CarouselComponent, CarouselSlideComponent, DotIndicatorComponent], imports: [CommonModule], exports: [CarouselComponent, CarouselSlideComponent, DotIndicatorComponent] }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselModule, imports: [CommonModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: CarouselModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule],
declarations: [CarouselComponent, CarouselSlideComponent, DotIndicatorComponent],
exports: [CarouselComponent, CarouselSlideComponent, DotIndicatorComponent]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { CarouselComponent, CarouselModule, CarouselSlideComponent, DotIndicatorComponent };
//# sourceMappingURL=ng-zorro-antd-mobile-carousel.mjs.map