UNPKG

primeng

Version:

PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB

1 lines 71.6 kB
{"version":3,"file":"primeng-carousel.mjs","sources":["../../src/carousel/style/carouselstyle.ts","../../src/carousel/carousel.ts","../../src/carousel/primeng-carousel.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = ({ dt }) => `\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content-container {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: row;\n gap: ${dt('carousel.content.gap')};\n}\n\n.p-carousel-content:dir(rtl) {\n flex-direction: row-reverse;\n}\n\n.p-carousel-viewport {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-item-list {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-item-list:dir(rtl) {\n flex-direction: row-reverse;\n}\n\n.p-carousel-prev-button,\n.p-carousel-next-button {\n align-self: center;\n flex-shrink: 0;\n}\n\n.p-carousel-indicator-list {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n padding: ${dt('carousel.indicator.list.padding')};\n gap: ${dt('carousel.indicator.list.gap')};\n margin: 0;\n list-style: none;\n}\n\n.p-carousel-indicator-button {\n display: flex;\n align-items: center;\n justify-content: center;\n background: ${dt('carousel.indicator.background')};\n width: ${dt('carousel.indicator.width')};\n height: ${dt('carousel.indicator.height')};\n border: 0 none;\n transition: background ${dt('carousel.transition.duration')}, color ${dt('carousel.transition.duration')}, outline-color ${dt('carousel.transition.duration')}, box-shadow ${dt('carousel.transition.duration')};\n outline-color: transparent;\n border-radius: ${dt('carousel.indicator.border.radius')};\n padding: 0;\n margin: 0;\n user-select: none;\n cursor: pointer;\n}\n\n.p-carousel-indicator-button:focus-visible {\n box-shadow: ${dt('carousel.indicator.focus.ring.shadow')};\n outline: ${dt('carousel.indicator.focus.ring.width')} ${dt('carousel.indicator.focus.ring.style')} ${dt('carousel.indicator.focus.ring.color')};\n outline-offset: ${dt('carousel.indicator.focus.ring.offset')};\n}\n\n.p-carousel-indicator-button:hover {\n background: ${dt('carousel.indicator.hover.background')};\n}\n\n.p-carousel-indicator-active .p-carousel-indicator-button {\n background: ${dt('carousel.indicator.active.background')};\n}\n\n.p-carousel-vertical .p-carousel-content {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-item-list {\n flex-direction: column;\n height: 100%;\n}\n\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-carousel p-component',\n {\n 'p-carousel-vertical': instance.isVertical(),\n 'p-carousel-horizontal': !instance.isVertical()\n }\n ],\n header: 'p-carousel-header',\n contentContainer: 'p-carousel-content-container',\n content: 'p-carousel-content',\n pcPrevButton: ({ instance }) => [\n 'p-carousel-prev-button',\n {\n 'p-disabled': instance.backwardIsDisabled\n }\n ],\n viewport: 'p-carousel-viewport',\n itemList: 'p-carousel-item-list',\n itemClone: ({ index, value, totalShiftedItems, d_numVisible }) => [\n 'p-carousel-item p-carousel-item-clone',\n {\n 'p-carousel-item-active': totalShiftedItems * -1 === value.length + d_numVisible,\n 'p-carousel-item-start': index === 0,\n 'p-carousel-item-end': value.slice(-1 * d_numVisible).length - 1 === index\n }\n ],\n item: ({ instance, index }) => [\n 'p-carousel-item',\n {\n 'p-carousel-item-active': instance.firstIndex() <= index && instance.lastIndex() >= index,\n 'p-carousel-item-start': instance.firstIndex() === index,\n 'p-carousel-item-end': instance.lastIndex() === index\n }\n ],\n pcNextButton: ({ instance }) => [\n 'p-carousel-next-button',\n {\n 'p-disabled': instance.forwardIsDisabled\n }\n ],\n indicatorList: 'p-carousel-indicator-list',\n indicator: ({ instance, index }) => [\n 'p-carousel-indicator',\n {\n 'p-carousel-indicator-active': instance.d_page === index\n }\n ],\n indicatorButton: 'p-carousel-indicator-button',\n footer: 'p-carousel-footer'\n};\n\n@Injectable()\nexport class CarouselStyle extends BaseStyle {\n name = 'carousel';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * Carousel is a content slider featuring various customization options.\n *\n * [Live Demo](https://www.primeng.org/carousel/)\n *\n * @module carouselstyle\n *\n */\nexport enum CarouselClasses {\n /**\n * Class name of the root element\n */\n root = 'p-carousel',\n /**\n * Class name of the header element\n */\n header = 'p-carousel-header',\n /**\n * Class name of the content container element\n */\n contentContainer = 'p-carousel-content-container',\n /**\n * Class name of the content element\n */\n content = 'p-carousel-content',\n /**\n * Class name of the previous button element\n */\n pcPrevButton = 'p-carousel-prev-button',\n /**\n * Class name of the viewport element\n */\n viewport = 'p-carousel-viewport',\n /**\n * Class name of the item list element\n */\n itemList = 'p-carousel-item-list',\n /**\n * Class name of the item clone element\n */\n itemClone = 'p-carousel-item-clone',\n /**\n * Class name of the item element\n */\n item = 'p-carousel-item',\n /**\n * Class name of the next button element\n */\n pcNextButton = 'p-carousel-next-button',\n /**\n * Class name of the indicator list element\n */\n indicatorList = 'p-carousel-indicator-list',\n /**\n * Class name of the indicator element\n */\n indicator = 'p-carousel-indicator',\n /**\n * Class name of the indicator button element\n */\n indicatorButton = 'p-carousel-indicator-button',\n /**\n * Class name of the footer element\n */\n footer = 'p-carousel-footer'\n}\n\nexport interface CarouselStyle extends BaseStyle {}\n","import { CommonModule, isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n NgModule,\n NgZone,\n numberAttribute,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { find, findSingle, getAttribute, setAttribute, uuid } from '@primeuix/utils';\nimport { Footer, Header, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { ButtonModule, ButtonProps } from 'primeng/button';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon } from 'primeng/icons';\nimport { CarouselPageEvent, CarouselResponsiveOptions } from './carousel.interface';\nimport { CarouselStyle } from './style/carouselstyle';\n\n/**\n * Carousel is a content slider featuring various customization options.\n * @group Components\n */\n@Component({\n selector: 'p-carousel',\n standalone: true,\n imports: [CommonModule, ChevronRightIcon, ButtonModule, ChevronLeftIcon, ChevronDownIcon, ChevronUpIcon, SharedModule],\n template: `\n <div [attr.id]=\"id\" [ngClass]=\"{ 'p-carousel p-component': true, 'p-carousel-vertical': isVertical(), 'p-carousel-horizontal': !isVertical() }\" [ngStyle]=\"style\" [class]=\"styleClass\" role=\"region\">\n <div class=\"p-carousel-header\" *ngIf=\"headerFacet || headerTemplate\">\n <ng-content select=\"p-header\"></ng-content>\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </div>\n <div [class]=\"contentClass\" [ngClass]=\"'p-carousel-content-container'\">\n <div class=\"p-carousel-content\" [attr.aria-live]=\"allowAutoplay ? 'polite' : 'off'\">\n <p-button\n *ngIf=\"showNavigators\"\n [ngClass]=\"{ 'p-carousel-prev-button': true, 'p-disabled': isBackwardNavDisabled() }\"\n [disabled]=\"isBackwardNavDisabled()\"\n [attr.aria-label]=\"ariaPrevButtonLabel()\"\n (click)=\"navBackward($event)\"\n [text]=\"true\"\n [buttonProps]=\"prevButtonProps\"\n >\n <ng-template #icon>\n <ng-container *ngIf=\"!previousIconTemplate && !_previousIconTemplate && !prevButtonProps?.icon\">\n <ChevronLeftIcon *ngIf=\"!isVertical()\" [styleClass]=\"'carousel-prev-icon'\" />\n <ChevronUpIcon *ngIf=\"isVertical()\" [styleClass]=\"'carousel-prev-icon'\" />\n </ng-container>\n <span *ngIf=\"(previousIconTemplate || _previousIconTemplate) && !prevButtonProps?.icon\" class=\"p-carousel-prev-icon\">\n <ng-template *ngTemplateOutlet=\"previousIconTemplate || _previousIconTemplate\"></ng-template>\n </span>\n </ng-template>\n </p-button>\n <div class=\"p-carousel-viewport\" [ngStyle]=\"{ height: isVertical() ? verticalViewPortHeight : 'auto' }\" (touchend)=\"onTouchEnd($event)\" (touchstart)=\"onTouchStart($event)\" (touchmove)=\"onTouchMove($event)\">\n <div #itemsContainer class=\"p-carousel-item-list\" (transitionend)=\"onTransitionEnd()\">\n <div\n *ngFor=\"let item of clonedItemsForStarting; let index = index\"\n [ngClass]=\"{\n 'p-carousel-item p-carousel-item-clone': true,\n 'p-carousel-item-active': totalShiftedItems * -1 === value.length,\n 'p-carousel-item-start': 0 === index,\n 'p-carousel-item-end': clonedItemsForStarting.length - 1 === index\n }\"\n [attr.aria-hidden]=\"!(totalShiftedItems * -1 === value.length)\"\n [attr.aria-label]=\"ariaSlideNumber(index)\"\n [attr.aria-roledescription]=\"ariaSlideLabel()\"\n >\n <ng-container *ngTemplateOutlet=\"itemTemplate || _itemTemplate; context: { $implicit: item }\"></ng-container>\n </div>\n <div\n *ngFor=\"let item of value; let index = index\"\n [ngClass]=\"{\n 'p-carousel-item': true,\n 'p-carousel-item-active': firstIndex() <= index && lastIndex() >= index,\n 'p-carousel-item-start': firstIndex() === index,\n 'p-carousel-item-end': lastIndex() === index\n }\"\n [attr.aria-hidden]=\"!(firstIndex() <= index && lastIndex() >= index)\"\n [attr.aria-label]=\"ariaSlideNumber(index)\"\n [attr.aria-roledescription]=\"ariaSlideLabel()\"\n >\n <ng-container *ngTemplateOutlet=\"itemTemplate || _itemTemplate; context: { $implicit: item }\"></ng-container>\n </div>\n <div\n *ngFor=\"let item of clonedItemsForFinishing; let index = index\"\n [ngClass]=\"{\n 'p-carousel-item p-carousel-item-clone': true,\n 'p-carousel-item-active': totalShiftedItems * -1 === numVisible,\n 'p-carousel-item-start': 0 === index,\n 'p-carousel-item-end': clonedItemsForFinishing.length - 1 === index\n }\"\n >\n <ng-container *ngTemplateOutlet=\"itemTemplate || _itemTemplate; context: { $implicit: item }\"></ng-container>\n </div>\n </div>\n </div>\n <p-button\n type=\"button\"\n *ngIf=\"showNavigators\"\n [ngClass]=\"{ 'p-carousel-next-button': true, 'p-disabled': isForwardNavDisabled() }\"\n [disabled]=\"isForwardNavDisabled()\"\n (click)=\"navForward($event)\"\n [attr.aria-label]=\"ariaNextButtonLabel()\"\n [buttonProps]=\"nextButtonProps\"\n [text]=\"true\"\n >\n <ng-template #icon>\n <ng-container *ngIf=\"!nextIconTemplate && !_nextIconTemplate && !nextButtonProps?.icon\">\n <ChevronRightIcon *ngIf=\"!isVertical()\" [styleClass]=\"'carousel-next-icon'\" />\n <ChevronDownIcon *ngIf=\"isVertical()\" [styleClass]=\"'carousel-next-icon'\" />\n </ng-container>\n <span *ngIf=\"nextIconTemplate || (_nextIconTemplate && !nextButtonProps?.icon)\" class=\"next\">\n <ng-template *ngTemplateOutlet=\"nextIconTemplate || _nextIconTemplate\"></ng-template>\n </span>\n </ng-template>\n </p-button>\n </div>\n <ul #indicatorContent [ngClass]=\"'p-carousel-indicator-list'\" [class]=\"indicatorsContentClass\" [ngStyle]=\"indicatorsContentStyle\" *ngIf=\"showIndicators\" (keydown)=\"onIndicatorKeydown($event)\">\n <li *ngFor=\"let totalDot of totalDotsArray(); let i = index\" [ngClass]=\"{ 'p-carousel-indicator': true, 'p-carousel-indicator-active': _page === i }\" [attr.data-pc-section]=\"'indicator'\">\n <button\n type=\"button\"\n [ngClass]=\"'p-carousel-indicator-button'\"\n (click)=\"onDotClick($event, i)\"\n [class]=\"indicatorStyleClass\"\n [ngStyle]=\"indicatorStyle\"\n [attr.aria-label]=\"ariaPageLabel(i + 1)\"\n [attr.aria-current]=\"_page === i ? 'page' : undefined\"\n [tabindex]=\"_page === i ? 0 : -1\"\n ></button>\n </li>\n </ul>\n </div>\n <div class=\"p-carousel-footer\" *ngIf=\"footerFacet || footerTemplate || _footerTemplate\">\n <ng-content select=\"p-footer\"></ng-content>\n <ng-container *ngTemplateOutlet=\"footerTemplate || _footerTemplate\"></ng-container>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [CarouselStyle]\n})\nexport class Carousel extends BaseComponent implements AfterContentInit {\n /**\n * Index of the first item.\n * @defaultValue 0\n * @group Props\n */\n @Input() get page(): number {\n return this._page;\n }\n\n set page(val: number) {\n if (this.isCreated && val !== this._page) {\n if (this.autoplayInterval) {\n this.stopAutoplay();\n }\n\n if (val > this._page && val <= this.totalDots() - 1) {\n this.step(-1, val);\n } else if (val < this._page) {\n this.step(1, val);\n }\n }\n\n this._page = val;\n }\n\n /**\n * Number of items per page.\n * @defaultValue 1\n * @group Props\n */\n @Input() get numVisible(): number {\n return this._numVisible;\n }\n\n set numVisible(val: number) {\n this._numVisible = val;\n }\n\n /**\n * Number of items to scroll.\n * @defaultValue 1\n * @group Props\n */\n @Input() get numScroll(): number {\n return this._numVisible;\n }\n\n set numScroll(val: number) {\n this._numScroll = val;\n }\n\n /**\n * An array of options for responsive design.\n * @see {CarouselResponsiveOptions}\n * @group Props\n */\n @Input() responsiveOptions: CarouselResponsiveOptions[] | undefined;\n /**\n * Specifies the layout of the component.\n * @group Props\n */\n @Input() orientation: 'horizontal' | 'vertical' = 'horizontal';\n /**\n * Height of the viewport in vertical layout.\n * @group Props\n */\n @Input() verticalViewPortHeight: string = '300px';\n /**\n * Style class of main content.\n * @group Props\n */\n @Input() contentClass: string = '';\n /**\n * Style class of the indicator items.\n * @group Props\n */\n @Input() indicatorsContentClass: string = '';\n /**\n * Inline style of the indicator items.\n * @group Props\n */\n @Input() indicatorsContentStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the indicators.\n * @group Props\n */\n @Input() indicatorStyleClass: string = '';\n /**\n * Style of the indicators.\n * @group Props\n */\n @Input() indicatorStyle: { [klass: string]: any } | null | undefined;\n\n /**\n * An array of objects to display.\n * @defaultValue null\n * @group Props\n */\n @Input() get value(): any[] {\n return this._value as any[];\n }\n\n set value(val) {\n this._value = val;\n }\n\n /**\n * Defines if scrolling would be infinite.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) circular: boolean = false;\n /**\n * Whether to display indicator container.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) showIndicators: boolean = true;\n /**\n * Whether to display navigation buttons in container.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) showNavigators: boolean = true;\n /**\n * Time in milliseconds to scroll items automatically.\n * @group Props\n */\n @Input({ transform: numberAttribute }) autoplayInterval: number = 0;\n /**\n * Inline style of the component.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the viewport container.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Used to pass all properties of the ButtonProps to the Button component.\n * @group Props\n */\n @Input() prevButtonProps: ButtonProps = {\n severity: 'secondary',\n text: true,\n rounded: true\n };\n /**\n * Used to pass all properties of the ButtonProps to the Button component.\n * @group Props\n */\n @Input() nextButtonProps: ButtonProps = {\n severity: 'secondary',\n text: true,\n rounded: true\n };\n /**\n * Callback to invoke after scroll.\n * @param {CarouselPageEvent} event - Custom page event.\n * @group Emits\n */\n @Output() onPage: EventEmitter<CarouselPageEvent> = new EventEmitter<CarouselPageEvent>();\n\n @ViewChild('itemsContainer') itemsContainer: ElementRef | undefined;\n\n @ViewChild('indicatorContent') indicatorContent: ElementRef | undefined;\n\n @ContentChild(Header) headerFacet: QueryList<Header> | undefined;\n\n @ContentChild(Footer) footerFacet: QueryList<Footer> | undefined;\n\n _numVisible: number = 1;\n\n _numScroll: number = 1;\n\n _oldNumScroll: number = 0;\n\n prevState: any = {\n numScroll: 0,\n numVisible: 0,\n value: []\n };\n\n defaultNumScroll: number = 1;\n\n defaultNumVisible: number = 1;\n\n _page: number = 0;\n\n _value: any[] | null | undefined;\n\n carouselStyle: any;\n\n id: string | undefined;\n\n totalShiftedItems;\n\n isRemainingItemsAdded: boolean = false;\n\n animationTimeout: any;\n\n translateTimeout: any;\n\n remainingItems: number = 0;\n\n _items: any[] | undefined;\n\n startPos: any;\n\n documentResizeListener: any;\n\n clonedItemsForStarting: any[] | undefined;\n\n clonedItemsForFinishing: any[] | undefined;\n\n allowAutoplay: boolean | undefined;\n\n interval: any;\n\n isCreated: boolean | undefined;\n\n swipeThreshold: number = 20;\n\n /**\n * Template for carousel items.\n * @group Templates\n */\n @ContentChild('item', { descendants: false }) itemTemplate: TemplateRef<any> | undefined;\n\n /**\n * Template for the carousel header.\n * @group Templates\n */\n @ContentChild('header', { descendants: false }) headerTemplate: TemplateRef<any> | undefined;\n\n /**\n * Template for the carousel footer.\n * @group Templates\n */\n @ContentChild('footer', { descendants: false }) footerTemplate: TemplateRef<any> | undefined;\n\n /**\n * Template for the previous button icon.\n * @group Templates\n */\n @ContentChild('previousicon', { descendants: false }) previousIconTemplate: TemplateRef<any> | undefined;\n\n /**\n * Template for the next button icon.\n * @group Templates\n */\n @ContentChild('nexticon', { descendants: false }) nextIconTemplate: TemplateRef<any> | undefined;\n\n _itemTemplate: TemplateRef<any> | undefined;\n\n _headerTemplate: TemplateRef<any> | undefined;\n\n _footerTemplate: TemplateRef<any> | undefined;\n\n _previousIconTemplate: TemplateRef<any> | undefined;\n\n _nextIconTemplate: TemplateRef<any> | undefined;\n\n window: Window;\n\n _componentStyle = inject(CarouselStyle);\n\n constructor(\n public el: ElementRef,\n public zone: NgZone\n ) {\n super();\n this.totalShiftedItems = this.page * this.numScroll * -1;\n this.window = this.document.defaultView as Window;\n }\n\n ngOnChanges(simpleChange: SimpleChanges) {\n if (isPlatformBrowser(this.platformId)) {\n if (simpleChange.value) {\n if (this.circular && this._value) {\n this.setCloneItems();\n }\n }\n\n if (this.isCreated) {\n if (simpleChange.numVisible) {\n if (this.responsiveOptions) {\n this.defaultNumVisible = this.numVisible;\n }\n\n if (this.isCircular()) {\n this.setCloneItems();\n }\n\n this.createStyle();\n this.calculatePosition();\n }\n\n if (simpleChange.numScroll) {\n if (this.responsiveOptions) {\n this.defaultNumScroll = this.numScroll;\n }\n }\n }\n }\n this.cd.markForCheck();\n }\n\n @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n ngAfterContentInit() {\n this.id = uuid('pn_id_');\n if (isPlatformBrowser(this.platformId)) {\n this.allowAutoplay = !!this.autoplayInterval;\n\n if (this.circular) {\n this.setCloneItems();\n }\n\n if (this.responsiveOptions) {\n this.defaultNumScroll = this._numScroll;\n this.defaultNumVisible = this._numVisible;\n }\n\n this.createStyle();\n this.calculatePosition();\n\n if (this.responsiveOptions) {\n this.bindDocumentListeners();\n }\n }\n\n this.templates?.forEach((item) => {\n switch (item.getType()) {\n case 'item':\n this._itemTemplate = item.template;\n break;\n\n case 'header':\n this._headerTemplate = item.template;\n break;\n\n case 'footer':\n this._footerTemplate = item.template;\n break;\n\n case 'previousicon':\n this._previousIconTemplate = item.template;\n break;\n\n case 'nexticon':\n this._nextIconTemplate = item.template;\n break;\n\n default:\n this._itemTemplate = item.template;\n break;\n }\n });\n\n this.cd.detectChanges();\n }\n\n ngAfterContentChecked() {\n if (isPlatformBrowser(this.platformId)) {\n const isCircular = this.isCircular();\n let totalShiftedItems = this.totalShiftedItems;\n\n if (this.value && this.itemsContainer && (this.prevState.numScroll !== this._numScroll || this.prevState.numVisible !== this._numVisible || this.prevState.value.length !== this.value.length)) {\n if (this.autoplayInterval) {\n this.stopAutoplay(false);\n }\n\n this.remainingItems = (this.value.length - this._numVisible) % this._numScroll;\n\n let page = this._page;\n if (this.totalDots() !== 0 && page >= this.totalDots()) {\n page = this.totalDots() - 1;\n this._page = page;\n this.onPage.emit({\n page: this.page\n });\n }\n\n totalShiftedItems = page * this._numScroll * -1;\n if (isCircular) {\n totalShiftedItems -= this._numVisible;\n }\n\n if (page === this.totalDots() - 1 && this.remainingItems > 0) {\n totalShiftedItems += -1 * this.remainingItems + this._numScroll;\n this.isRemainingItemsAdded = true;\n } else {\n this.isRemainingItemsAdded = false;\n }\n\n if (totalShiftedItems !== this.totalShiftedItems) {\n this.totalShiftedItems = totalShiftedItems;\n }\n\n this._oldNumScroll = this._numScroll;\n this.prevState.numScroll = this._numScroll;\n this.prevState.numVisible = this._numVisible;\n this.prevState.value = [...(this._value as any[])];\n\n if (this.totalDots() > 0 && this.itemsContainer.nativeElement) {\n this.itemsContainer.nativeElement.style.transform = this.isVertical() ? `translate3d(0, ${totalShiftedItems * (100 / this._numVisible)}%, 0)` : `translate3d(${totalShiftedItems * (100 / this._numVisible)}%, 0, 0)`;\n }\n\n this.isCreated = true;\n\n if (this.autoplayInterval && this.isAutoplay()) {\n this.startAutoplay();\n }\n }\n\n if (isCircular) {\n if (this.page === 0) {\n totalShiftedItems = -1 * this._numVisible;\n } else if (totalShiftedItems === 0) {\n totalShiftedItems = -1 * this.value.length;\n if (this.remainingItems > 0) {\n this.isRemainingItemsAdded = true;\n }\n }\n\n if (totalShiftedItems !== this.totalShiftedItems) {\n this.totalShiftedItems = totalShiftedItems;\n }\n }\n }\n }\n\n createStyle() {\n if (!this.carouselStyle) {\n this.carouselStyle = this.renderer.createElement('style');\n this.carouselStyle.type = 'text/css';\n setAttribute(this.carouselStyle, 'nonce', this.config?.csp()?.nonce);\n this.renderer.appendChild(this.document.head, this.carouselStyle);\n }\n\n let innerHTML = `\n #${this.id} .p-carousel-item {\n\t\t\t\tflex: 1 0 ${100 / this.numVisible}%\n\t\t\t}\n `;\n\n if (this.responsiveOptions) {\n this.responsiveOptions.sort((data1, data2) => {\n const value1 = data1.breakpoint;\n const value2 = data2.breakpoint;\n let result = null;\n\n if (value1 == null && value2 != null) result = -1;\n else if (value1 != null && value2 == null) result = 1;\n else if (value1 == null && value2 == null) result = 0;\n else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, { numeric: true });\n else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;\n\n return -1 * result;\n });\n\n for (let i = 0; i < this.responsiveOptions.length; i++) {\n let res = this.responsiveOptions[i];\n\n innerHTML += `\n @media screen and (max-width: ${res.breakpoint}) {\n #${this.id} .p-carousel-item {\n flex: 1 0 ${100 / res.numVisible}%\n }\n }\n `;\n }\n }\n\n this.carouselStyle.innerHTML = innerHTML;\n }\n\n calculatePosition() {\n if (this.responsiveOptions) {\n let matchedResponsiveData = {\n numVisible: this.defaultNumVisible,\n numScroll: this.defaultNumScroll\n };\n\n if (typeof window !== 'undefined') {\n let windowWidth = window.innerWidth;\n for (let i = 0; i < this.responsiveOptions.length; i++) {\n let res = this.responsiveOptions[i];\n\n if (parseInt(res.breakpoint, 10) >= windowWidth) {\n matchedResponsiveData = res;\n }\n }\n }\n\n if (this._numScroll !== matchedResponsiveData.numScroll) {\n let page = this._page;\n page = Math.floor((page * this._numScroll) / matchedResponsiveData.numScroll);\n\n let totalShiftedItems = matchedResponsiveData.numScroll * this.page * -1;\n\n if (this.isCircular()) {\n totalShiftedItems -= matchedResponsiveData.numVisible;\n }\n\n this.totalShiftedItems = totalShiftedItems;\n this._numScroll = matchedResponsiveData.numScroll;\n\n this._page = page;\n this.onPage.emit({\n page: this.page\n });\n }\n\n if (this._numVisible !== matchedResponsiveData.numVisible) {\n this._numVisible = matchedResponsiveData.numVisible;\n this.setCloneItems();\n }\n\n this.cd.markForCheck();\n }\n }\n\n setCloneItems() {\n this.clonedItemsForStarting = [];\n this.clonedItemsForFinishing = [];\n if (this.isCircular()) {\n this.clonedItemsForStarting.push(...this.value.slice(-1 * this._numVisible));\n this.clonedItemsForFinishing.push(...this.value.slice(0, this._numVisible));\n }\n }\n\n firstIndex() {\n return this.isCircular() ? -1 * (this.totalShiftedItems + this.numVisible) : this.totalShiftedItems * -1;\n }\n\n lastIndex() {\n return this.firstIndex() + this.numVisible - 1;\n }\n\n totalDots() {\n return this.value?.length ? Math.ceil((this.value.length - this._numVisible) / this._numScroll) + 1 : 0;\n }\n\n totalDotsArray() {\n const totalDots = this.totalDots();\n return totalDots <= 0 ? [] : Array(totalDots).fill(0);\n }\n\n isVertical() {\n return this.orientation === 'vertical';\n }\n\n isCircular() {\n return this.circular && this.value && this.value.length >= this.numVisible;\n }\n\n isAutoplay() {\n return this.autoplayInterval && this.allowAutoplay;\n }\n\n isForwardNavDisabled() {\n return this.isEmpty() || (this._page >= this.totalDots() - 1 && !this.isCircular());\n }\n\n isBackwardNavDisabled() {\n return this.isEmpty() || (this._page <= 0 && !this.isCircular());\n }\n\n isEmpty() {\n return !this.value || this.value.length === 0;\n }\n\n navForward(e: MouseEvent | TouchEvent, index?: number) {\n if (this.isCircular() || this._page < this.totalDots() - 1) {\n this.step(-1, index);\n }\n\n if (this.autoplayInterval) {\n this.stopAutoplay();\n }\n\n if (e && e.cancelable) {\n e.preventDefault();\n }\n }\n\n navBackward(e: MouseEvent | TouchEvent, index?: number) {\n if (this.isCircular() || this._page !== 0) {\n this.step(1, index);\n }\n\n if (this.autoplayInterval) {\n this.stopAutoplay();\n }\n\n if (e && e.cancelable) {\n e.preventDefault();\n }\n }\n\n onDotClick(e: MouseEvent, index: number) {\n let page = this._page;\n\n if (this.autoplayInterval) {\n this.stopAutoplay();\n }\n\n if (index > page) {\n this.navForward(e, index);\n } else if (index < page) {\n this.navBackward(e, index);\n }\n }\n\n onIndicatorKeydown(event: KeyboardEvent) {\n switch (event.code) {\n case 'ArrowRight':\n this.onRightKey();\n break;\n\n case 'ArrowLeft':\n this.onLeftKey();\n break;\n }\n }\n\n onRightKey() {\n const indicators = [...find(this.indicatorContent.nativeElement, '[data-pc-section=\"indicator\"]')];\n const activeIndex = this.findFocusedIndicatorIndex();\n\n this.changedFocusedIndicator(activeIndex, activeIndex + 1 === indicators.length ? indicators.length - 1 : activeIndex + 1);\n }\n\n onLeftKey() {\n const activeIndex = this.findFocusedIndicatorIndex();\n\n this.changedFocusedIndicator(activeIndex, activeIndex - 1 <= 0 ? 0 : activeIndex - 1);\n }\n\n onHomeKey() {\n const activeIndex = this.findFocusedIndicatorIndex();\n\n this.changedFocusedIndicator(activeIndex, 0);\n }\n\n onEndKey() {\n const indicators = [...find(this.indicatorContent.nativeElement, '[data-pc-section=\"indicator\"]r')];\n const activeIndex = this.findFocusedIndicatorIndex();\n\n this.changedFocusedIndicator(activeIndex, indicators.length - 1);\n }\n\n onTabKey() {\n const indicators = <any>[...find(this.indicatorContent.nativeElement, '[data-pc-section=\"indicator\"]')];\n const highlightedIndex = indicators.findIndex((ind) => getAttribute(ind, 'data-p-highlight') === true);\n\n const activeIndicator = <any>findSingle(this.indicatorContent.nativeElement, '[data-pc-section=\"indicator\"] > button[tabindex=\"0\"]');\n const activeIndex = indicators.findIndex((ind) => ind === activeIndicator.parentElement);\n\n indicators[activeIndex].children[0].tabIndex = '-1';\n indicators[highlightedIndex].children[0].tabIndex = '0';\n }\n\n findFocusedIndicatorIndex() {\n const indicators = [...find(this.indicatorContent.nativeElement, '[data-pc-section=\"indicator\"]')];\n const activeIndicator = findSingle(this.indicatorContent.nativeElement, '[data-pc-section=\"indicator\"] > button[tabindex=\"0\"]');\n\n return indicators.findIndex((ind) => ind === activeIndicator.parentElement);\n }\n\n changedFocusedIndicator(prevInd, nextInd) {\n const indicators = <any>[...find(this.indicatorContent.nativeElement, '[data-pc-section=\"indicator\"]')];\n\n indicators[prevInd].children[0].tabIndex = '-1';\n indicators[nextInd].children[0].tabIndex = '0';\n indicators[nextInd].children[0].focus();\n }\n\n step(dir: number, page?: number) {\n let totalShiftedItems = this.totalShiftedItems;\n const isCircular = this.isCircular();\n\n if (page != null) {\n totalShiftedItems = this._numScroll * page * -1;\n\n if (isCircular) {\n totalShiftedItems -= this._numVisible;\n }\n\n this.isRemainingItemsAdded = false;\n } else {\n totalShiftedItems += this._numScroll * dir;\n if (this.isRemainingItemsAdded) {\n totalShiftedItems += this.remainingItems - this._numScroll * dir;\n this.isRemainingItemsAdded = false;\n }\n\n let originalShiftedItems = isCircular ? totalShiftedItems + this._numVisible : totalShiftedItems;\n page = Math.abs(Math.floor(originalShiftedItems / this._numScroll));\n }\n\n if (isCircular && this.page === this.totalDots() - 1 && dir === -1) {\n totalShiftedItems = -1 * (this.value.length + this._numVisible);\n page = 0;\n } else if (isCircular && this.page === 0 && dir === 1) {\n totalShiftedItems = 0;\n page = this.totalDots() - 1;\n } else if (page === this.totalDots() - 1 && this.remainingItems > 0) {\n totalShiftedItems += this.remainingItems * -1 - this._numScroll * dir;\n this.isRemainingItemsAdded = true;\n }\n\n if (this.itemsContainer) {\n this.itemsContainer.nativeElement.style.transform = this.isVertical() ? `translate3d(0, ${totalShiftedItems * (100 / this._numVisible)}%, 0)` : `translate3d(${totalShiftedItems * (100 / this._numVisible)}%, 0, 0)`;\n this.itemsContainer.nativeElement.style.transition = 'transform 500ms ease 0s';\n }\n\n this.totalShiftedItems = totalShiftedItems;\n this._page = page;\n this.onPage.emit({\n page: this.page\n });\n this.cd.markForCheck();\n }\n\n startAutoplay() {\n this.interval = setInterval(() => {\n if (this.totalDots() > 0) {\n if (this.page === this.totalDots() - 1) {\n this.step(-1, 0);\n } else {\n this.step(-1, this.page + 1);\n }\n }\n }, this.autoplayInterval);\n this.allowAutoplay = true;\n this.cd.markForCheck();\n }\n\n stopAutoplay(changeAllow: boolean = true) {\n if (this.interval) {\n clearInterval(this.interval);\n this.interval = undefined;\n if (changeAllow) {\n this.allowAutoplay = false;\n }\n }\n this.cd.markForCheck();\n }\n\n isPlaying(): boolean {\n return !!this.interval;\n }\n\n onTransitionEnd() {\n if (this.itemsContainer) {\n this.itemsContainer.nativeElement.style.transition = '';\n\n if ((this.page === 0 || this.page === this.totalDots() - 1) && this.isCircular()) {\n this.itemsContainer.nativeElement.style.transform = this.isVertical() ? `translate3d(0, ${this.totalShiftedItems * (100 / this._numVisible)}%, 0)` : `translate3d(${this.totalShiftedItems * (100 / this._numVisible)}%, 0, 0)`;\n }\n }\n }\n\n onTouchStart(e: TouchEvent) {\n let touchobj = e.changedTouches[0];\n\n this.startPos = {\n x: touchobj.pageX,\n y: touchobj.pageY\n };\n }\n\n onTouchMove(e: TouchEvent | MouseEvent) {\n if (e.cancelable) {\n e.preventDefault();\n }\n }\n\n onTouchEnd(e: TouchEvent) {\n let touchobj = e.changedTouches[0];\n\n if (this.isVertical()) {\n this.changePageOnTouch(e, touchobj.pageY - this.startPos.y);\n } else {\n this.changePageOnTouch(e, touchobj.pageX - this.startPos.x);\n }\n }\n\n changePageOnTouch(e: TouchEvent | MouseEvent, diff: number) {\n if (Math.abs(diff) > this.swipeThreshold) {\n if (diff < 0) {\n this.navForward(e);\n } else {\n this.navBackward(e);\n }\n }\n }\n\n ariaPrevButtonLabel() {\n return this.config.translation.aria ? this.config.translation.aria.prevPageLabel : undefined;\n }\n\n ariaSlideLabel() {\n return this.config.translation.aria ? this.config.translation.aria.slide : undefined;\n }\n\n ariaNextButtonLabel() {\n return this.config.translation.aria ? this.config.translation.aria.nextPageLabel : undefined;\n }\n\n ariaSlideNumber(value) {\n return this.config.translation.aria ? this.config.translation.aria.slideNumber.replace(/{slideNumber}/g, value) : undefined;\n }\n\n ariaPageLabel(value) {\n return this.config.translation.aria ? this.config.translation.aria.pageLabel.replace(/{page}/g, value) : undefined;\n }\n\n bindDocumentListeners() {\n if (isPlatformBrowser(this.platformId)) {\n if (!this.documentResizeListener) {\n this.documentResizeListener = this.renderer.listen(this.window, 'resize', (event) => {\n this.calculatePosition();\n });\n }\n }\n }\n\n unbindDocumentListeners() {\n if (isPlatformBrowser(this.platformId)) {\n if (this.documentResizeListener) {\n this.documentResizeListener();\n this.documentResizeListener = null;\n }\n }\n }\n\n ngOnDestroy() {\n if (this.responsiveOptions) {\n this.unbindDocumentListeners();\n }\n if (this.autoplayInterval) {\n this.stopAutoplay();\n }\n }\n}\n\n@NgModule({\n imports: [Carousel, SharedModule],\n exports: [Carousel, SharedModule]\n})\nexport class CarouselModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGA,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;;;;;;;;;;;;;;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