{"version":3,"file":"primeng-carousel.mjs","sources":["../../src/app/components/carousel/carousel.ts","../../src/app/components/carousel/primeng-carousel.ts"],"sourcesContent":["import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgModule,\n NgZone,\n Output,\n PLATFORM_ID,\n QueryList,\n Renderer2,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n booleanAttribute,\n numberAttribute\n} from '@angular/core';\nimport { Footer, Header, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { ChevronDownIcon } from 'primeng/icons/chevrondown';\nimport { ChevronLeftIcon } from 'primeng/icons/chevronleft';\nimport { ChevronRightIcon } from 'primeng/icons/chevronright';\nimport { ChevronUpIcon } from 'primeng/icons/chevronup';\nimport { RippleModule } from 'primeng/ripple';\nimport { UniqueComponentId } from 'primeng/utils';\nimport { CarouselPageEvent, CarouselResponsiveOptions } from './carousel.interface';\nimport { PrimeNGConfig } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\n/**\n * Carousel is a content slider featuring various customization options.\n * @group Components\n */\n@Component({\n selector: 'p-carousel',\n template: `\n
\n \n
\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./carousel.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Carousel 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 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 * Number of items per page.\n * @defaultValue 1\n * @group Props\n */\n @Input() get numVisible(): number {\n return this._numVisible;\n }\n set numVisible(val: number) {\n this._numVisible = val;\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 set numScroll(val: number) {\n this._numScroll = val;\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 * 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 set value(val) {\n this._value = val;\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 * Callback to invoke after scroll.\n * @param {CarouselPageEvent} event - Custom page event.\n * @group Emits\n */\n @Output() onPage: EventEmitter = new EventEmitter();\n\n @ViewChild('itemsContainer') itemsContainer: ElementRef | undefined;\n\n @ViewChild('indicatorContent') indicatorContent: ElementRef | undefined;\n\n @ContentChild(Header) headerFacet: QueryList
| undefined;\n\n @ContentChild(Footer) footerFacet: QueryList