@apexara/ng-components 1.0.6-test.2 → 1.0.6-test.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, PLATFORM_ID, HostListener, ViewChild, Component } from '@angular/core';
2
+ import { signal, inject, PLATFORM_ID, HostListener, ViewChild, Component } from '@angular/core';
3
3
  import { isPlatformBrowser } from '@angular/common';
4
4
  import { Subject, throttleTime } from 'rxjs';
5
5
 
6
6
  class ApexCarouselComponent {
7
7
  constructor() {
8
- this.scrollProgress = 0;
8
+ this.scrollProgress = signal(0, ...(ngDevMode ? [{ debugName: "scrollProgress" }] : []));
9
9
  this.scrollAnimationDuration = 500; // ms
10
10
  this.scrollSubject = new Subject();
11
11
  this.currentCenteredElemIndex = 0;
@@ -98,7 +98,7 @@ class ApexCarouselComponent {
98
98
  updateProgressBar(container) {
99
99
  const scrollLeft = container.scrollLeft;
100
100
  const scrollWidth = container.scrollWidth - container.clientWidth;
101
- this.scrollProgress = ((scrollLeft / scrollWidth) * 100) - (104 / container.clientWidth);
101
+ this.scrollProgress.set(((scrollLeft / scrollWidth) * 100) - (104 / container.clientWidth));
102
102
  }
103
103
  updateCurrentCenterdElemIndex(container) {
104
104
  const carouselEl = this.carousel.nativeElement;
@@ -134,11 +134,11 @@ class ApexCarouselComponent {
134
134
  carouselEl.style.paddingLeft = `${leftCalculatedValue}px`;
135
135
  }
136
136
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ApexCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
137
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: ApexCarouselComponent, isStandalone: true, selector: "apex-carousel", host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true }, { propertyName: "prevButton", first: true, predicate: ["prevButton"], descendants: true }, { propertyName: "nextButton", first: true, predicate: ["nextButton"], descendants: true }], ngImport: i0, template: "<div class=\"carousel-container\">\n <div #carousel class=\"carousel\" (scroll)=\"onScroll($event)\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<div class=\"carousel-navigation\">\n <div class=\"navigation-buttons-wrapper\">\n <div \n #prevButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to previous item\"\n (click)=\"scrollSubject.next('prev')\"\n (keydown)=\"onNavigationKeydown($event, 'prev')\">\n <div class=\"chevron prev\"></div>\n </div>\n\n <div\n #nextButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to next item\"\n (click)=\"scrollSubject.next('next')\"\n (keydown)=\"onNavigationKeydown($event, 'next')\">\n <div class=\"chevron next\"></div>\n </div>\n </div>\n\n <div #progressBarContainer class=\"scroll-bar-container\">\n <div class=\"scroll-indicator\" [style.width.%]=\"scrollProgress\"></div>\n </div>\n</div>\n", styles: [".carousel-container{width:100%;display:flex;align-items:center;background-color:var(--apex-carousel-background-color, transparent);position:relative;margin-bottom:24px}.carousel{display:flex;flex-grow:1;overflow:scroll;flex-wrap:nowrap;scroll-behavior:smooth;scroll-snap-type:x mandatory;gap:16px}.carousel::-webkit-scrollbar{display:none}.carousel-navigation{display:flex;align-items:center;justify-content:flex-start;gap:24px}.navigation-buttons-wrapper{width:104px;height:48px;display:flex;gap:8px}.chevron-wrapper{min-width:40px;height:40px;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer;border:1px solid transparent;border-radius:50%}.chevron-wrapper:before{pointer-events:none;content:\"\";position:absolute;inset:0;border-radius:inherit;background:var(--apex-carousel-button-border-color, #FFFFFF);padding:1px;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.chevron-wrapper:hover:before{background:var(--apex-carousel-button-border-hover-color, #FFFFFF)}.chevron-wrapper:hover .chevron{border-top:3px solid var(--apex-carousel-chevron-hover-color, #FFFFFF);border-left:3px solid var(--apex-carousel-chevro-hover-color, #FFFFFF)}.chevron{width:8px;height:8px;flex-shrink:0;position:relative;transform-origin:center;transform:rotate(-135deg);border-top:3px solid var(--apex-carousel-chevron-color, #FFFFFF);border-left:3px solid var(--apex-carousel-chevron-color, #FFFFFF);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px}.chevron.next{transform:rotate(135deg);left:-1px}.chevron.prev{transform:rotate(-45deg);right:0}.scroll-bar-container{width:100%;height:1px;overflow:hidden;position:relative;background-color:var(--apex-carousel-scrollbar-container-color, #020617);border-radius:10px;margin:.5rem 0}.scroll-indicator{left:0;height:1px;background-color:var(--apex-carousel-scrollbar-color, #FFFFFF);transition:width .1s}\n"] }); }
137
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: ApexCarouselComponent, isStandalone: true, selector: "apex-carousel", host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true }, { propertyName: "prevButton", first: true, predicate: ["prevButton"], descendants: true }, { propertyName: "nextButton", first: true, predicate: ["nextButton"], descendants: true }], ngImport: i0, template: "<div class=\"carousel-container\">\n <div #carousel class=\"carousel\" (scroll)=\"onScroll($event)\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<div class=\"carousel-navigation\">\n <div class=\"navigation-buttons-wrapper\">\n <div \n #prevButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to previous item\"\n (click)=\"scrollSubject.next('prev')\"\n (keydown)=\"onNavigationKeydown($event, 'prev')\">\n <div class=\"chevron prev\"></div>\n </div>\n\n <div\n #nextButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to next item\"\n (click)=\"scrollSubject.next('next')\"\n (keydown)=\"onNavigationKeydown($event, 'next')\">\n <div class=\"chevron next\"></div>\n </div>\n </div>\n\n <div #progressBarContainer class=\"scroll-bar-container\">\n <div class=\"scroll-indicator\" [style.width.%]=\"scrollProgress()\"></div>\n </div>\n</div>\n", styles: [".carousel-container{width:100%;display:flex;align-items:center;background-color:var(--apex-carousel-background-color, transparent);position:relative;margin-bottom:24px}.carousel{display:flex;flex-grow:1;overflow:scroll;flex-wrap:nowrap;scroll-behavior:smooth;scroll-snap-type:x mandatory;gap:16px}.carousel::-webkit-scrollbar{display:none}.carousel-navigation{display:flex;align-items:center;justify-content:flex-start;gap:24px}.navigation-buttons-wrapper{width:104px;height:48px;display:flex;gap:8px}.chevron-wrapper{min-width:40px;height:40px;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer;border:1px solid transparent;border-radius:50%}.chevron-wrapper:before{pointer-events:none;content:\"\";position:absolute;inset:0;border-radius:inherit;background:var(--apex-carousel-button-border-color, #FFFFFF);padding:1px;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.chevron-wrapper:hover:before{background:var(--apex-carousel-button-border-hover-color, #FFFFFF)}.chevron-wrapper:hover .chevron{border-top:3px solid var(--apex-carousel-chevron-hover-color, #FFFFFF);border-left:3px solid var(--apex-carousel-chevro-hover-color, #FFFFFF)}.chevron{width:8px;height:8px;flex-shrink:0;position:relative;transform-origin:center;transform:rotate(-135deg);border-top:3px solid var(--apex-carousel-chevron-color, #FFFFFF);border-left:3px solid var(--apex-carousel-chevron-color, #FFFFFF);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px}.chevron.next{transform:rotate(135deg);left:-1px}.chevron.prev{transform:rotate(-45deg);right:0}.scroll-bar-container{width:100%;height:1px;overflow:hidden;position:relative;background-color:var(--apex-carousel-scrollbar-container-color, #020617);border-radius:10px;margin:.5rem 0}.scroll-indicator{left:0;height:1px;background-color:var(--apex-carousel-scrollbar-color, #FFFFFF);transition:width .1s}\n"] }); }
138
138
  }
139
139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ApexCarouselComponent, decorators: [{
140
140
  type: Component,
141
- args: [{ selector: 'apex-carousel', template: "<div class=\"carousel-container\">\n <div #carousel class=\"carousel\" (scroll)=\"onScroll($event)\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<div class=\"carousel-navigation\">\n <div class=\"navigation-buttons-wrapper\">\n <div \n #prevButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to previous item\"\n (click)=\"scrollSubject.next('prev')\"\n (keydown)=\"onNavigationKeydown($event, 'prev')\">\n <div class=\"chevron prev\"></div>\n </div>\n\n <div\n #nextButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to next item\"\n (click)=\"scrollSubject.next('next')\"\n (keydown)=\"onNavigationKeydown($event, 'next')\">\n <div class=\"chevron next\"></div>\n </div>\n </div>\n\n <div #progressBarContainer class=\"scroll-bar-container\">\n <div class=\"scroll-indicator\" [style.width.%]=\"scrollProgress\"></div>\n </div>\n</div>\n", styles: [".carousel-container{width:100%;display:flex;align-items:center;background-color:var(--apex-carousel-background-color, transparent);position:relative;margin-bottom:24px}.carousel{display:flex;flex-grow:1;overflow:scroll;flex-wrap:nowrap;scroll-behavior:smooth;scroll-snap-type:x mandatory;gap:16px}.carousel::-webkit-scrollbar{display:none}.carousel-navigation{display:flex;align-items:center;justify-content:flex-start;gap:24px}.navigation-buttons-wrapper{width:104px;height:48px;display:flex;gap:8px}.chevron-wrapper{min-width:40px;height:40px;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer;border:1px solid transparent;border-radius:50%}.chevron-wrapper:before{pointer-events:none;content:\"\";position:absolute;inset:0;border-radius:inherit;background:var(--apex-carousel-button-border-color, #FFFFFF);padding:1px;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.chevron-wrapper:hover:before{background:var(--apex-carousel-button-border-hover-color, #FFFFFF)}.chevron-wrapper:hover .chevron{border-top:3px solid var(--apex-carousel-chevron-hover-color, #FFFFFF);border-left:3px solid var(--apex-carousel-chevro-hover-color, #FFFFFF)}.chevron{width:8px;height:8px;flex-shrink:0;position:relative;transform-origin:center;transform:rotate(-135deg);border-top:3px solid var(--apex-carousel-chevron-color, #FFFFFF);border-left:3px solid var(--apex-carousel-chevron-color, #FFFFFF);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px}.chevron.next{transform:rotate(135deg);left:-1px}.chevron.prev{transform:rotate(-45deg);right:0}.scroll-bar-container{width:100%;height:1px;overflow:hidden;position:relative;background-color:var(--apex-carousel-scrollbar-container-color, #020617);border-radius:10px;margin:.5rem 0}.scroll-indicator{left:0;height:1px;background-color:var(--apex-carousel-scrollbar-color, #FFFFFF);transition:width .1s}\n"] }]
141
+ args: [{ selector: 'apex-carousel', template: "<div class=\"carousel-container\">\n <div #carousel class=\"carousel\" (scroll)=\"onScroll($event)\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<div class=\"carousel-navigation\">\n <div class=\"navigation-buttons-wrapper\">\n <div \n #prevButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to previous item\"\n (click)=\"scrollSubject.next('prev')\"\n (keydown)=\"onNavigationKeydown($event, 'prev')\">\n <div class=\"chevron prev\"></div>\n </div>\n\n <div\n #nextButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to next item\"\n (click)=\"scrollSubject.next('next')\"\n (keydown)=\"onNavigationKeydown($event, 'next')\">\n <div class=\"chevron next\"></div>\n </div>\n </div>\n\n <div #progressBarContainer class=\"scroll-bar-container\">\n <div class=\"scroll-indicator\" [style.width.%]=\"scrollProgress()\"></div>\n </div>\n</div>\n", styles: [".carousel-container{width:100%;display:flex;align-items:center;background-color:var(--apex-carousel-background-color, transparent);position:relative;margin-bottom:24px}.carousel{display:flex;flex-grow:1;overflow:scroll;flex-wrap:nowrap;scroll-behavior:smooth;scroll-snap-type:x mandatory;gap:16px}.carousel::-webkit-scrollbar{display:none}.carousel-navigation{display:flex;align-items:center;justify-content:flex-start;gap:24px}.navigation-buttons-wrapper{width:104px;height:48px;display:flex;gap:8px}.chevron-wrapper{min-width:40px;height:40px;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer;border:1px solid transparent;border-radius:50%}.chevron-wrapper:before{pointer-events:none;content:\"\";position:absolute;inset:0;border-radius:inherit;background:var(--apex-carousel-button-border-color, #FFFFFF);padding:1px;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.chevron-wrapper:hover:before{background:var(--apex-carousel-button-border-hover-color, #FFFFFF)}.chevron-wrapper:hover .chevron{border-top:3px solid var(--apex-carousel-chevron-hover-color, #FFFFFF);border-left:3px solid var(--apex-carousel-chevro-hover-color, #FFFFFF)}.chevron{width:8px;height:8px;flex-shrink:0;position:relative;transform-origin:center;transform:rotate(-135deg);border-top:3px solid var(--apex-carousel-chevron-color, #FFFFFF);border-left:3px solid var(--apex-carousel-chevron-color, #FFFFFF);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px}.chevron.next{transform:rotate(135deg);left:-1px}.chevron.prev{transform:rotate(-45deg);right:0}.scroll-bar-container{width:100%;height:1px;overflow:hidden;position:relative;background-color:var(--apex-carousel-scrollbar-container-color, #020617);border-radius:10px;margin:.5rem 0}.scroll-indicator{left:0;height:1px;background-color:var(--apex-carousel-scrollbar-color, #FFFFFF);transition:width .1s}\n"] }]
142
142
  }], ctorParameters: () => [], propDecorators: { carousel: [{
143
143
  type: ViewChild,
144
144
  args: ['carousel']
@@ -1 +1 @@
1
- {"version":3,"file":"apexara-ng-components-carousel.mjs","sources":["../../../../projects/apexara/ng-components/carousel/src/carousel.component.ts","../../../../projects/apexara/ng-components/carousel/src/carousel.component.html","../../../../projects/apexara/ng-components/carousel/apexara-ng-components-carousel.ts"],"sourcesContent":["import { Component, ViewChild, ElementRef, HostListener, inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { Subject, Subscription, throttleTime } from 'rxjs';\n\n@Component({\n selector: 'apex-carousel',\n templateUrl: './carousel.component.html',\n styleUrls: ['./carousel.component.css'],\n})\n\nexport class ApexCarouselComponent {\n\n constructor() { }\n\n @ViewChild('carousel') carousel!: ElementRef<HTMLDivElement>;\n\n @ViewChild('prevButton') prevButton!: ElementRef;\n @ViewChild('nextButton') nextButton!: ElementRef;\n\n public scrollProgress = 0;\n public scrollAnimationDuration = 500; // ms\n \n public scrollSubject = new Subject<'prev' | 'next'>();\n\n private currentCenteredElemIndex = 0; \n\n private isProgrammaticScroll = false;\n private scrollSubscription!: Subscription;\n\n private platformId = inject(PLATFORM_ID);\n\n public ngAfterViewInit(): void {\n this.applyScrollSnapAlign();\n\n if (isPlatformBrowser(this.platformId)) {\n this.adjustCarouselSpacing();\n }\n\n this.scrollSubject.pipe(throttleTime(this.scrollAnimationDuration)).subscribe((direction: 'prev' | 'next') => {\n this.scroll(direction);\n });\n\n this.updateCurrentCenterdElemIndex(this.carousel.nativeElement);\n }\n\n public ngOnDestroy(): void {\n if (this.scrollSubscription) {\n this.scrollSubscription.unsubscribe();\n }\n }\n\n public scroll(direction: 'prev' | 'next'): void {\n const carouselEl = this.carousel.nativeElement;\n const children = Array.from(carouselEl.children) as HTMLElement[];\n \n if (direction === 'next') {\n this.currentCenteredElemIndex = Math.min(this.currentCenteredElemIndex + 1, children.length - 1);\n\n } else {\n this.currentCenteredElemIndex = Math.max(this.currentCenteredElemIndex - 1, 0);\n }\n \n const targetElement = children[this.currentCenteredElemIndex];\n \n this.isProgrammaticScroll = true; \n \n if (!targetElement) {\n return;\n }\n \n switch (this.currentCenteredElemIndex) {\n case 0:\n carouselEl.scrollTo({ left: 0, behavior: 'smooth' });\n \n break;\n case children.length - 1:\n const scrollEnd = carouselEl.scrollWidth - carouselEl.clientWidth;\n\n carouselEl.scrollTo({ left: scrollEnd, behavior: 'smooth' });\n\n break;\n default:\n targetElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' });\n } \n\n setTimeout(() => {\n this.isProgrammaticScroll = false;\n }, this.scrollAnimationDuration);\n }\n\n @HostListener('window:resize')\n public onResize(): void {\n const carouselEl = this.carousel.nativeElement;\n\n const carouselCenter = carouselEl.offsetWidth / 2;\n const scrollLeft = carouselEl.scrollLeft;\n\n const children = Array.from(carouselEl.children) as HTMLElement[];\n\n const currentlyCenteredElement = children.find(child => {\n const childLeft = child.offsetLeft - scrollLeft;\n const childCenter = childLeft + child.offsetWidth / 2;\n return Math.abs(childCenter - carouselCenter) < child.offsetWidth / 2;\n });\n\n if (currentlyCenteredElement) {\n const targetLeft = currentlyCenteredElement.offsetLeft;\n const targetCenter = targetLeft + currentlyCenteredElement.offsetWidth / 2;\n const newScrollPosition = targetCenter - carouselCenter;\n\n carouselEl.scrollTo({ left: newScrollPosition, behavior: 'smooth' });\n }\n }\n\n public onNavigationKeydown(event: KeyboardEvent, direction: 'prev' | 'next'): void {\n if (event.code === 'Space' || event.code === 'Enter') {\n this.scroll(direction);\n\n return;\n }\n\n if (event.code === 'ArrowLeft' || event.code === 'ArrowRight') {\n if (this.nextButton.nativeElement === document.activeElement) {\n this.prevButton.nativeElement.focus();\n } else {\n this.nextButton.nativeElement.focus();\n }\n }\n }\n\n public onScroll(event: Event): void {\n const container = event.target as HTMLElement;\n \n this.updateProgressBar(container);\n \n if (this.isProgrammaticScroll) {\n return;\n }\n\n this.updateCurrentCenterdElemIndex(container);\n }\n\n private updateProgressBar(container: HTMLElement) {\n const scrollLeft = container.scrollLeft;\n const scrollWidth = container.scrollWidth - container.clientWidth;\n\n this.scrollProgress = ((scrollLeft / scrollWidth) * 100) - (104 / container.clientWidth);\n }\n\n private updateCurrentCenterdElemIndex(container: HTMLElement): void {\n const carouselEl = this.carousel.nativeElement;\n const carouselWidth = carouselEl.offsetWidth;\n const carouselCenter = container.scrollLeft + carouselWidth / 2;\n\n const children = Array.from(carouselEl.children) as HTMLElement[];\n \n let closestIndex = 0;\n let minDistance = Infinity;\n \n for (let i = 0; i < children.length; i++) {\n const childCenter = children[i].offsetLeft + children[i].offsetWidth / 2;\n const distance = Math.abs(carouselCenter - childCenter);\n\n if (distance < minDistance) {\n minDistance = distance;\n closestIndex = i;\n }\n }\n\n this.currentCenteredElemIndex = closestIndex;\n }\n\n private applyScrollSnapAlign(): void {\n const children = this.carousel.nativeElement.children;\n\n for (let i = 0; i < children.length; i++) {\n (children[i] as HTMLElement).style.scrollSnapAlign = 'center';\n }\n }\n\n private adjustCarouselSpacing(): void {\n const carouselEl = this.carousel.nativeElement;\n \n const carouselRect = carouselEl.getBoundingClientRect();\n const rightCalculatedValue = window.innerWidth - carouselRect.right;\n \n const leftCalculatedValue = carouselRect.left;\n\n carouselEl.style.marginRight = `-${rightCalculatedValue}px`;\n carouselEl.style.paddingRight = `${rightCalculatedValue}px`;\n\n carouselEl.style.marginLeft = `-${leftCalculatedValue}px`;\n carouselEl.style.paddingLeft = `${leftCalculatedValue}px`;\n }\n\n}\n","<div class=\"carousel-container\">\n <div #carousel class=\"carousel\" (scroll)=\"onScroll($event)\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<div class=\"carousel-navigation\">\n <div class=\"navigation-buttons-wrapper\">\n <div \n #prevButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to previous item\"\n (click)=\"scrollSubject.next('prev')\"\n (keydown)=\"onNavigationKeydown($event, 'prev')\">\n <div class=\"chevron prev\"></div>\n </div>\n\n <div\n #nextButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to next item\"\n (click)=\"scrollSubject.next('next')\"\n (keydown)=\"onNavigationKeydown($event, 'next')\">\n <div class=\"chevron next\"></div>\n </div>\n </div>\n\n <div #progressBarContainer class=\"scroll-bar-container\">\n <div class=\"scroll-indicator\" [style.width.%]=\"scrollProgress\"></div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAWa,qBAAqB,CAAA;AAEhC,IAAA,WAAA,GAAA;QAOO,IAAA,CAAA,cAAc,GAAG,CAAC;AAClB,QAAA,IAAA,CAAA,uBAAuB,GAAG,GAAG,CAAC;AAE9B,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,OAAO,EAAmB;QAE7C,IAAA,CAAA,wBAAwB,GAAG,CAAC;QAE5B,IAAA,CAAA,oBAAoB,GAAG,KAAK;AAG5B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;IAjBxB;IAmBT,eAAe,GAAA;QACpB,IAAI,CAAC,oBAAoB,EAAE;AAE3B,QAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACtC,IAAI,CAAC,qBAAqB,EAAE;QAC9B;AAEA,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAA0B,KAAI;AAC3G,YAAA,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;AACxB,QAAA,CAAC,CAAC;QAEF,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;IACjE;IAEO,WAAW,GAAA;AAChB,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;AAC3B,YAAA,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE;QACvC;IACF;AAEO,IAAA,MAAM,CAAC,SAA0B,EAAA;AACtC,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,C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AAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,6ZCXlC,8lCAiCA,EAAA,MAAA,EAAA,CAAA,0gEAAA,CAAA,EAAA,CAAA,CAAA;;2FDtBa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;+BACE,eAAe,EAAA,QAAA,EAAA,8lCAAA,EAAA,MAAA,EAAA,CAAA,0gEAAA,CAAA,EAAA;;sBASxB,SAAS;uBAAC,UAAU;;sBAEpB,SAAS;uBAAC,YAAY;;sBACtB,SAAS;uBAAC,YAAY;;sBAyEtB,YAAY;uBAAC,eAAe;;;AE3F/B;;AAEG;;;;"}
1
+ {"version":3,"file":"apexara-ng-components-carousel.mjs","sources":["../../../../projects/apexara/ng-components/carousel/src/carousel.component.ts","../../../../projects/apexara/ng-components/carousel/src/carousel.component.html","../../../../projects/apexara/ng-components/carousel/apexara-ng-components-carousel.ts"],"sourcesContent":["import { Component, ViewChild, ElementRef, HostListener, inject, PLATFORM_ID, signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { Subject, Subscription, throttleTime } from 'rxjs';\n\n@Component({\n selector: 'apex-carousel',\n templateUrl: './carousel.component.html',\n styleUrls: ['./carousel.component.css'],\n})\n\nexport class ApexCarouselComponent {\n\n constructor() { }\n\n @ViewChild('carousel') carousel!: ElementRef<HTMLDivElement>;\n\n @ViewChild('prevButton') prevButton!: ElementRef;\n @ViewChild('nextButton') nextButton!: ElementRef;\n\n public scrollProgress = signal(0);\n public scrollAnimationDuration = 500; // ms\n \n public scrollSubject = new Subject<'prev' | 'next'>();\n\n private currentCenteredElemIndex = 0; \n\n private isProgrammaticScroll = false;\n private scrollSubscription!: Subscription;\n\n private platformId = inject(PLATFORM_ID);\n\n public ngAfterViewInit(): void {\n this.applyScrollSnapAlign();\n\n if (isPlatformBrowser(this.platformId)) {\n this.adjustCarouselSpacing();\n }\n\n this.scrollSubject.pipe(throttleTime(this.scrollAnimationDuration)).subscribe((direction: 'prev' | 'next') => {\n this.scroll(direction);\n });\n\n this.updateCurrentCenterdElemIndex(this.carousel.nativeElement);\n }\n\n public ngOnDestroy(): void {\n if (this.scrollSubscription) {\n this.scrollSubscription.unsubscribe();\n }\n }\n\n public scroll(direction: 'prev' | 'next'): void {\n const carouselEl = this.carousel.nativeElement;\n const children = Array.from(carouselEl.children) as HTMLElement[];\n \n if (direction === 'next') {\n this.currentCenteredElemIndex = Math.min(this.currentCenteredElemIndex + 1, children.length - 1);\n\n } else {\n this.currentCenteredElemIndex = Math.max(this.currentCenteredElemIndex - 1, 0);\n }\n \n const targetElement = children[this.currentCenteredElemIndex];\n \n this.isProgrammaticScroll = true; \n \n if (!targetElement) {\n return;\n }\n \n switch (this.currentCenteredElemIndex) {\n case 0:\n carouselEl.scrollTo({ left: 0, behavior: 'smooth' });\n \n break;\n case children.length - 1:\n const scrollEnd = carouselEl.scrollWidth - carouselEl.clientWidth;\n\n carouselEl.scrollTo({ left: scrollEnd, behavior: 'smooth' });\n\n break;\n default:\n targetElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' });\n } \n\n setTimeout(() => {\n this.isProgrammaticScroll = false;\n }, this.scrollAnimationDuration);\n }\n\n @HostListener('window:resize')\n public onResize(): void {\n const carouselEl = this.carousel.nativeElement;\n\n const carouselCenter = carouselEl.offsetWidth / 2;\n const scrollLeft = carouselEl.scrollLeft;\n\n const children = Array.from(carouselEl.children) as HTMLElement[];\n\n const currentlyCenteredElement = children.find(child => {\n const childLeft = child.offsetLeft - scrollLeft;\n const childCenter = childLeft + child.offsetWidth / 2;\n return Math.abs(childCenter - carouselCenter) < child.offsetWidth / 2;\n });\n\n if (currentlyCenteredElement) {\n const targetLeft = currentlyCenteredElement.offsetLeft;\n const targetCenter = targetLeft + currentlyCenteredElement.offsetWidth / 2;\n const newScrollPosition = targetCenter - carouselCenter;\n\n carouselEl.scrollTo({ left: newScrollPosition, behavior: 'smooth' });\n }\n }\n\n public onNavigationKeydown(event: KeyboardEvent, direction: 'prev' | 'next'): void {\n if (event.code === 'Space' || event.code === 'Enter') {\n this.scroll(direction);\n\n return;\n }\n\n if (event.code === 'ArrowLeft' || event.code === 'ArrowRight') {\n if (this.nextButton.nativeElement === document.activeElement) {\n this.prevButton.nativeElement.focus();\n } else {\n this.nextButton.nativeElement.focus();\n }\n }\n }\n\n public onScroll(event: Event): void {\n const container = event.target as HTMLElement;\n \n this.updateProgressBar(container);\n \n if (this.isProgrammaticScroll) {\n return;\n }\n\n this.updateCurrentCenterdElemIndex(container);\n }\n\n private updateProgressBar(container: HTMLElement) {\n const scrollLeft = container.scrollLeft;\n const scrollWidth = container.scrollWidth - container.clientWidth;\n\n this.scrollProgress.set(((scrollLeft / scrollWidth) * 100) - (104 / container.clientWidth));\n }\n\n private updateCurrentCenterdElemIndex(container: HTMLElement): void {\n const carouselEl = this.carousel.nativeElement;\n const carouselWidth = carouselEl.offsetWidth;\n const carouselCenter = container.scrollLeft + carouselWidth / 2;\n\n const children = Array.from(carouselEl.children) as HTMLElement[];\n \n let closestIndex = 0;\n let minDistance = Infinity;\n \n for (let i = 0; i < children.length; i++) {\n const childCenter = children[i].offsetLeft + children[i].offsetWidth / 2;\n const distance = Math.abs(carouselCenter - childCenter);\n\n if (distance < minDistance) {\n minDistance = distance;\n closestIndex = i;\n }\n }\n\n this.currentCenteredElemIndex = closestIndex;\n }\n\n private applyScrollSnapAlign(): void {\n const children = this.carousel.nativeElement.children;\n\n for (let i = 0; i < children.length; i++) {\n (children[i] as HTMLElement).style.scrollSnapAlign = 'center';\n }\n }\n\n private adjustCarouselSpacing(): void {\n const carouselEl = this.carousel.nativeElement;\n \n const carouselRect = carouselEl.getBoundingClientRect();\n const rightCalculatedValue = window.innerWidth - carouselRect.right;\n \n const leftCalculatedValue = carouselRect.left;\n\n carouselEl.style.marginRight = `-${rightCalculatedValue}px`;\n carouselEl.style.paddingRight = `${rightCalculatedValue}px`;\n\n carouselEl.style.marginLeft = `-${leftCalculatedValue}px`;\n carouselEl.style.paddingLeft = `${leftCalculatedValue}px`;\n }\n\n}\n","<div class=\"carousel-container\">\n <div #carousel class=\"carousel\" (scroll)=\"onScroll($event)\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<div class=\"carousel-navigation\">\n <div class=\"navigation-buttons-wrapper\">\n <div \n #prevButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to previous item\"\n (click)=\"scrollSubject.next('prev')\"\n (keydown)=\"onNavigationKeydown($event, 'prev')\">\n <div class=\"chevron prev\"></div>\n </div>\n\n <div\n #nextButton\n tabindex=\"0\"\n class=\"chevron-wrapper\"\n aria-label=\"Scroll to next item\"\n (click)=\"scrollSubject.next('next')\"\n (keydown)=\"onNavigationKeydown($event, 'next')\">\n <div class=\"chevron next\"></div>\n </div>\n </div>\n\n <div #progressBarContainer class=\"scroll-bar-container\">\n <div class=\"scroll-indicator\" [style.width.%]=\"scrollProgress()\"></div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAWa,qBAAqB,CAAA;AAEhC,IAAA,WAAA,GAAA;AAOO,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,CAAC,0DAAC;AAC1B,QAAA,IAAA,CAAA,uBAAuB,GAAG,GAAG,CAAC;AAE9B,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,OAAO,EAAmB;QAE7C,IAAA,CAAA,wBAAwB,GAAG,CAAC;QAE5B,IAAA,CAAA,oBAAoB,GAAG,KAAK;AAG5B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;IAjBxB;IAmBT,eAAe,GAAA;QACpB,IAAI,CAAC,oBAAoB,EAAE;AAE3B,QAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACtC,I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