@mintplayer/ng-bootstrap 22.5.1 → 22.6.0

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,290 +1,126 @@
1
- import { isPlatformServer, NgTemplateOutlet } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { inject, TemplateRef, ElementRef, Directive, PLATFORM_ID, DestroyRef, signal, contentChildren, forwardRef, input, model, output, computed, viewChild, effect, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { Color } from '@mintplayer/ng-bootstrap';
5
- import { BsSwipeContainerDirective, BsSwipeDirective, BsSwipeViewportDirective } from '@mintplayer/ng-swiper/swiper';
6
- import { BsNoNoscriptDirective } from '@mintplayer/ng-bootstrap/no-noscript';
7
- import * as i1 from '@mintplayer/ng-bootstrap/reduced-motion';
8
- import { BsReducedMotionDirective } from '@mintplayer/ng-bootstrap/reduced-motion';
9
-
10
- class BsCarouselImageDirective {
11
- constructor() {
12
- this.templateRef = inject((TemplateRef));
13
- this.carousel = inject(BsCarouselComponent);
14
- this.element = inject((ElementRef));
15
- this.isFirst = false;
16
- this.itemTemplate = this.templateRef;
17
- // Post-increment semantics: this.id gets the OLD value, then the counter increments.
18
- this.id = this.carousel.imageCounter();
19
- this.carousel.imageCounter.update(c => c + 1);
20
- }
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsCarouselImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
22
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsCarouselImageDirective, isStandalone: true, selector: "*[bsCarouselImage]", ngImport: i0 }); }
23
- }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsCarouselImageDirective, decorators: [{
25
- type: Directive,
26
- args: [{
27
- selector: '*[bsCarouselImage]',
28
- }]
29
- }], ctorParameters: () => [] });
2
+ import { input, model, output, viewChild, computed, afterNextRender, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component } from '@angular/core';
30
3
 
4
+ /**
5
+ * `<bs-carousel>` — Angular wrapper around the `<mp-carousel>` web component.
6
+ *
7
+ * Slides are plain content children (no structural directive):
8
+ *
9
+ * <bs-carousel animation="fade" [indicators]="true" [interval]="4000" ariaLabel="Photos">
10
+ * <img src="a.png" alt="…">
11
+ * <img src="b.png" alt="…">
12
+ * </bs-carousel>
13
+ *
14
+ * Track layout, gestures, keyboard, ARIA, the radio-driven no-JS tier and the
15
+ * height contract all live in the WC (single source of UI truth); this wrapper
16
+ * only bridges inputs to attributes and re-emits the WC's typed events. A
17
+ * custom play/pause control can be projected with `slot="play-pause"` — wire
18
+ * it to `togglePaused()` (or listen to `pausedChange`).
19
+ *
20
+ * The WC is registered **client-side only** (`afterNextRender`); on the server
21
+ * Angular emits a bare `<mp-carousel>` tag and the SSR layer injects its
22
+ * Declarative Shadow DOM (see `injectMpCarouselDsd`), so the carousel renders
23
+ * — and navigates — with JS off.
24
+ */
31
25
  class BsCarouselComponent {
32
26
  constructor() {
33
- this.platformId = inject(PLATFORM_ID);
34
- this.destroyRef = inject(DestroyRef);
35
- this.reducedMotion = inject(BsReducedMotionDirective);
36
- this.colors = Color;
37
- this.isServerSide = isPlatformServer(this.platformId);
38
- this.currentImageIndex = signal(0, /* @ts-ignore */
39
- ...(ngDevMode ? [{ debugName: "currentImageIndex" }] : /* istanbul ignore next */ []));
40
- this.images = contentChildren(forwardRef(() => BsCarouselImageDirective), /* @ts-ignore */
41
- ...(ngDevMode ? [{ debugName: "images" }] : /* istanbul ignore next */ []));
42
- this.isDestroyed = false;
43
- // Inputs
44
- this.indicators = input(false, /* @ts-ignore */
45
- ...(ngDevMode ? [{ debugName: "indicators" }] : /* istanbul ignore next */ []));
46
- this.keyboardEvents = input(true, /* @ts-ignore */
47
- ...(ngDevMode ? [{ debugName: "keyboardEvents" }] : /* istanbul ignore next */ []));
48
- this.orientation = input('horizontal', /* @ts-ignore */
49
- ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
27
+ /** Slide transition: `slide` (default), `fade`, or `none`. */
50
28
  this.animation = input('slide', /* @ts-ignore */
51
29
  ...(ngDevMode ? [{ debugName: "animation" }] : /* istanbul ignore next */ []));
30
+ /** Slide axis; vertical also pins every slide to the tallest one. */
31
+ this.orientation = input('horizontal', /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
33
+ /** Show the indicator dots. */
34
+ this.indicators = input(false, /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "indicators" }] : /* istanbul ignore next */ []));
36
+ /** Auto-advance interval in ms; `null`/`0` disables autoplay. */
52
37
  this.interval = input(null, /* @ts-ignore */
53
38
  ...(ngDevMode ? [{ debugName: "interval" }] : /* istanbul ignore next */ []));
39
+ /** Wrap around at the ends (buttons, keyboard AND swipe). */
54
40
  this.wrap = input(true, /* @ts-ignore */
55
41
  ...(ngDevMode ? [{ debugName: "wrap" }] : /* istanbul ignore next */ []));
42
+ /** Arrow/Home/End navigation on the focused viewport. */
43
+ this.keyboardEvents = input(true, /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "keyboardEvents" }] : /* istanbul ignore next */ []));
45
+ /** Accessible label for the carousel region. */
56
46
  this.ariaLabel = input(null, /* @ts-ignore */
57
47
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
58
- // Two-way: pause / resume the auto-advance timer. Toggled by the
59
- // consumer's `*bsCarouselPlayPause` template via the `toggle` callback in
60
- // its context, or by the public `play()` / `pause()` methods. Default
61
- // false (auto-advance allowed); has no effect when `interval` is null/0.
48
+ /** Two-way: whether autoplay is paused. */
62
49
  this.paused = model(false, /* @ts-ignore */
63
50
  ...(ngDevMode ? [{ debugName: "paused" }] : /* istanbul ignore next */ []));
64
- /**
65
- * Template projected via `*bsCarouselPlayPause`. When set, the carousel
66
- * renders it in a control row above the slides. Per APG, auto-advancing
67
- * carousels must expose a play/pause control — this is how consumers
68
- * provide one without us imposing a button style.
69
- */
70
- this.playPauseTemplate = signal(null, /* @ts-ignore */
71
- ...(ngDevMode ? [{ debugName: "playPauseTemplate" }] : /* istanbul ignore next */ []));
72
- // Outputs
51
+ /** The committed slide index changed. */
73
52
  this.slideChange = output();
74
53
  this.animationStart = output();
75
54
  this.animationEnd = output();
76
- // Computed signals
77
- this.imageCount = computed(() => this.images().length, /* @ts-ignore */
78
- ...(ngDevMode ? [{ debugName: "imageCount" }] : /* istanbul ignore next */ []));
79
- this.innerElement = viewChild('innerElement', /* @ts-ignore */
80
- ...(ngDevMode ? [{ debugName: "innerElement" }] : /* istanbul ignore next */ []));
81
- this.swipeContainer = viewChild('container', /* @ts-ignore */
82
- ...(ngDevMode ? [{ debugName: "swipeContainer" }] : /* istanbul ignore next */ []));
83
- // Returns 200 when swipeContainer isn't ready or height is null/0, ensuring images render and ResizeObserver triggers
84
- this.slideHeight = computed(() => {
85
- const container = this.swipeContainer();
86
- const height = container?.currentSlideHeight();
87
- return (height && height > 0) ? height : 200;
55
+ this.element = viewChild('element', /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
57
+ /** Presence/string-or-absent attributes derived once via signals. */
58
+ this.indicatorsAttr = computed(() => (this.indicators() ? '' : null), /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "indicatorsAttr" }] : /* istanbul ignore next */ []));
60
+ this.intervalAttr = computed(() => {
61
+ const value = this.interval();
62
+ return value && value > 0 ? String(value) : null;
88
63
  }, /* @ts-ignore */
89
- ...(ngDevMode ? [{ debugName: "slideHeight" }] : /* istanbul ignore next */ []));
90
- this.firstImageTemplate = computed(() => {
91
- const images = this.images();
92
- if (images.length === 0)
93
- return null;
94
- const img = images[0];
95
- if (!img)
96
- return null;
97
- return img.itemTemplate;
98
- }, /* @ts-ignore */
99
- ...(ngDevMode ? [{ debugName: "firstImageTemplate" }] : /* istanbul ignore next */ []));
100
- this.lastImageTemplate = computed(() => {
101
- const images = this.images();
102
- if (images.length === 0)
103
- return null;
104
- const img = images[images.length - 1];
105
- if (!img)
106
- return null;
107
- return img.itemTemplate;
108
- }, /* @ts-ignore */
109
- ...(ngDevMode ? [{ debugName: "lastImageTemplate" }] : /* istanbul ignore next */ []));
110
- this.animationsDisabled = signal(false, /* @ts-ignore */
111
- ...(ngDevMode ? [{ debugName: "animationsDisabled" }] : /* istanbul ignore next */ []));
112
- /**
113
- * `aria-live` value for the slide viewport. Stays `off` while
114
- * auto-advance is actually rotating — otherwise the SR would re-read the
115
- * active slide every interval — and switches to `polite` whenever the
116
- * rotation is paused (by `paused`, missing/zero `interval`, or
117
- * `prefers-reduced-motion`), so manual prev/next/indicator clicks get
118
- * announced.
119
- */
120
- this.slideAriaLive = computed(() => {
121
- const intervalTime = this.interval();
122
- if (!intervalTime || intervalTime <= 0)
123
- return 'polite';
124
- if (this.paused())
125
- return 'polite';
126
- if (this.reducedMotion.matches())
127
- return 'polite';
128
- return 'off';
129
- }, /* @ts-ignore */
130
- ...(ngDevMode ? [{ debugName: "slideAriaLive" }] : /* istanbul ignore next */ []));
131
- /** Toggle the paused state. Used as the `toggle` callback in `BsCarouselPlayPauseContext`. */
64
+ ...(ngDevMode ? [{ debugName: "intervalAttr" }] : /* istanbul ignore next */ []));
65
+ this.wrapAttr = computed(() => (this.wrap() ? null : 'false'), /* @ts-ignore */
66
+ ...(ngDevMode ? [{ debugName: "wrapAttr" }] : /* istanbul ignore next */ []));
67
+ this.keyboardEventsAttr = computed(() => (this.keyboardEvents() ? null : 'false'), /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "keyboardEventsAttr" }] : /* istanbul ignore next */ []));
69
+ this.pausedAttr = computed(() => (this.paused() ? '' : null), /* @ts-ignore */
70
+ ...(ngDevMode ? [{ debugName: "pausedAttr" }] : /* istanbul ignore next */ []));
132
71
  this.togglePaused = () => {
133
- this.paused.update((p) => !p);
72
+ this.paused.set(!this.paused());
134
73
  };
135
- this.imageCounter = signal(1, /* @ts-ignore */
136
- ...(ngDevMode ? [{ debugName: "imageCounter" }] : /* istanbul ignore next */ []));
137
- // Mark first image whenever images change
138
- effect(() => {
139
- const images = this.images();
140
- images.forEach((item, index) => item.isFirst = (index === 0));
141
- });
142
- // Setup auto-advance interval effect — gated on the two new axes added
143
- // by the APG carousel bundle (PRD aria-accessibility-audit §13.2):
144
- // • `paused` model: lets the consumer (or the projected play/pause
145
- // button) suspend rotation.
146
- // • prefers-reduced-motion: suppresses auto-advance entirely when
147
- // the user opts out of motion at the OS level.
148
- effect(() => {
149
- const intervalTime = this.interval();
150
- const isPaused = this.paused();
151
- const reduceMotion = this.reducedMotion.matches();
152
- this.clearAutoAdvance();
153
- if (intervalTime && intervalTime > 0 && !isPaused && !reduceMotion) {
154
- this.intervalId = setInterval(() => {
155
- this.next();
156
- }, intervalTime);
157
- }
158
- });
159
- // Emit slideChange when currentImageIndex changes
160
- effect(() => {
161
- const index = this.currentImageIndex();
162
- if (!this.isDestroyed) {
163
- this.slideChange.emit(index);
164
- }
165
- });
166
- // Cleanup on destroy
167
- this.destroyRef.onDestroy(() => {
168
- this.isDestroyed = true;
169
- this.clearAutoAdvance();
170
- this.resizeObserver?.disconnect();
74
+ afterNextRender(() => {
75
+ // Side-effect import registers <mp-carousel>; client-only so SSR stays
76
+ // a bare tag for DSD injection.
77
+ import('@mintplayer/web-components/carousel');
171
78
  });
172
79
  }
173
- /** Resume auto-advance. No-op if `interval` is unset or reduce-motion is on. */
174
- play() {
175
- this.paused.set(false);
176
- }
177
- /** Pause auto-advance. Manual prev/next/goto still work. */
178
- pause() {
179
- this.paused.set(true);
180
- }
181
- clearAutoAdvance() {
182
- if (this.intervalId) {
183
- clearInterval(this.intervalId);
184
- this.intervalId = undefined;
185
- }
186
- }
187
80
  previous() {
188
- if (!this.wrap() && this.currentImageIndex() === 0)
189
- return;
190
- this.swipeContainer()?.previous();
81
+ this.element()?.nativeElement.previous?.();
191
82
  }
192
83
  next() {
193
- if (!this.wrap() && this.currentImageIndex() === this.imageCount() - 1)
194
- return;
195
- this.swipeContainer()?.next();
84
+ this.element()?.nativeElement.next?.();
196
85
  }
197
86
  goto(index) {
198
- if (index < 0 || index >= this.imageCount())
199
- return;
200
- this.swipeContainer()?.goto(index);
87
+ this.element()?.nativeElement.goto?.(index);
88
+ }
89
+ play() {
90
+ this.paused.set(false);
201
91
  }
202
- ngAfterViewInit() {
203
- if (!this.isServerSide) {
204
- this.resizeObserver = new ResizeObserver(() => {
205
- // Signals automatically trigger change detection in zoneless mode
206
- // The resize will be picked up by the observe-size directive
207
- });
208
- const el = this.innerElement();
209
- if (el) {
210
- this.resizeObserver.observe(el.nativeElement);
211
- }
212
- }
92
+ pause() {
93
+ this.paused.set(true);
213
94
  }
214
- ngOnDestroy() {
215
- this.isDestroyed = true;
216
- const innerEl = this.innerElement();
217
- if (innerEl) {
218
- this.resizeObserver?.unobserve(innerEl.nativeElement);
219
- }
220
- this.resizeObserver?.disconnect();
221
- this.clearAutoAdvance();
95
+ onSlideChange(event) {
96
+ // stopPropagation so the composed WC event doesn't ALSO fire the
97
+ // consumer's binding on the <bs-carousel> host with the raw CustomEvent.
98
+ event.stopPropagation();
99
+ this.slideChange.emit(event.detail.index);
222
100
  }
223
- onContainerAnimationStart() {
101
+ onPausedChange(event) {
102
+ event.stopPropagation();
103
+ this.paused.set(event.detail.paused);
104
+ }
105
+ onAnimationStart(event) {
106
+ event.stopPropagation();
224
107
  this.animationStart.emit();
225
108
  }
226
- onContainerAnimationEnd() {
109
+ onAnimationEnd(event) {
110
+ event.stopPropagation();
227
111
  this.animationEnd.emit();
228
112
  }
229
- onImageIndexChange(index) {
230
- this.currentImageIndex.set(index);
231
- }
232
113
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
233
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: BsCarouselComponent, isStandalone: true, selector: "bs-carousel", inputs: { indicators: { classPropertyName: "indicators", publicName: "indicators", isSignal: true, isRequired: false, transformFunction: null }, keyboardEvents: { classPropertyName: "keyboardEvents", publicName: "keyboardEvents", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, paused: { classPropertyName: "paused", publicName: "paused", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paused: "pausedChange", slideChange: "slideChange", animationStart: "animationStart", animationEnd: "animationEnd" }, host: { properties: { "@.disabled": "animationsDisabled()" } }, queries: [{ propertyName: "images", predicate: i0.forwardRef(() => BsCarouselImageDirective), isSignal: true }], viewQueries: [{ propertyName: "innerElement", first: true, predicate: ["innerElement"], descendants: true, isSignal: true }, { propertyName: "swipeContainer", first: true, predicate: ["container"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BsReducedMotionDirective }], ngImport: i0, template: "@if (isServerSide) {\n <div class=\"carousel mx-auto noscript\"\n role=\"region\"\n aria-roledescription=\"carousel\"\n [attr.aria-label]=\"ariaLabel()\"\n [class.carousel-vertical]=\"orientation() === 'vertical'\">\n <div class=\"carousel-inner d-grid\">\n @let imagesValue = images();\n @if (imageCount(); as imageCount) {\n @for (image of imagesValue; track image.id; let i = $index) {\n <input type=\"radio\" [id]=\"'car-' + i\" [name]=\"'car'\" class=\"car-radio d-none\" bsNoNoscript [checked]=\"i === 0\">\n <div class=\"carousel-item fade d-flex flex-row h-100 align-items-center\"\n role=\"group\"\n aria-roledescription=\"slide\"\n [attr.aria-label]=\"(i + 1) + ' of ' + imageCount\"\n [class.flex-column]=\"orientation() === 'vertical'\">\n <div class=\"w-100 position-relative\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container>\n @if (indicators()) {\n <div class=\"carousel-indicators\"\n [class.carousel-indicators-vertical]=\"orientation() === 'vertical'\">\n @for (image of imagesValue; track image.id; let j = $index) {\n <label [attr.for]=\"'car-' + (j % imageCount)\" [attr.aria-label]=\"'Slide ' + (j + 1)\" [class.active]=\"i === j\" data-bs-target></label>\n }\n </div>\n }\n </div>\n </div>\n\n <label class=\"carousel-control-prev cursor-pointer\" [for]=\"'car-' + ((i - 1 + imageCount) % imageCount)\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </label>\n <label class=\"carousel-control-next cursor-pointer\" [for]=\"'car-' + ((i + 1) % imageCount)\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </label>\n }\n }\n </div>\n </div>\n} @else {\n <div class=\"carousel mx-auto\"\n role=\"region\"\n aria-roledescription=\"carousel\"\n [attr.aria-label]=\"ariaLabel()\"\n [class.slide]=\"animation() === 'slide'\"\n [class.fade]=\"animation() === 'fade'\"\n [class.carousel-vertical]=\"orientation() === 'vertical'\">\n @if (playPauseTemplate() || (interval() ?? 0) > 0) {\n <div class=\"carousel-play-pause\">\n <ng-container *ngTemplateOutlet=\"playPauseTemplate() ?? defaultPlayPauseTemplate; context: { $implicit: paused(), paused: paused(), toggle: togglePaused }\"></ng-container>\n </div>\n }\n @if (indicators()) {\n <div class=\"carousel-indicators\" [class.carousel-indicators-vertical]=\"orientation() === 'vertical'\">\n @for (image of images(); track image.id; let i = $index) {\n <button type=\"button\" (click)=\"goto(i)\"\n [class.active]=\"currentImageIndex() === i\" data-bs-target\n [attr.aria-current]=\"currentImageIndex() === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + (i + 1)\"></button>\n }\n </div>\n }\n <div class=\"carousel-inner\" bsSwipeViewport #innerElement [style.height.px]=\"slideHeight()\"\n [ariaLive]=\"slideAriaLive()\"\n [ariaBusy]=\"container.isAnimating() ? true : null\">\n <div bsSwipeContainer #container=\"bsSwipeContainer\"\n [minimumOffset]=\"50\"\n [animation]=\"animation()\"\n [orientation]=\"orientation()\"\n [keyboardEvents]=\"keyboardEvents()\"\n [(imageIndex)]=\"currentImageIndex\"\n (animationStart)=\"onContainerAnimationStart()\"\n (animationEnd)=\"onContainerAnimationEnd()\">\n @if (animation() === 'slide') {\n <div class=\"carousel-item\" bsSwipe [offside]=\"true\">\n <ng-container *ngTemplateOutlet=\"lastImageTemplate()\"></ng-container>\n </div>\n }\n @for (image of images(); track image.id; let i = $index) {\n <div class=\"carousel-item\" bsSwipe\n [class.active]=\"currentImageIndex() === i\">\n <ng-container *ngTemplateOutlet=\"image.itemTemplate\"></ng-container>\n </div>\n }\n @if (animation() === 'slide') {\n <div class=\"carousel-item\" bsSwipe [offside]=\"true\">\n <ng-container *ngTemplateOutlet=\"firstImageTemplate()\"></ng-container>\n </div>\n }\n </div>\n </div>\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previous()\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\"\n aria-label=\"Previous slide\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"next()\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\"\n aria-label=\"Next slide\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n </div>\n}\n\n<!-- Fallback rendered when the consumer does not supply a `*bsCarouselPlayPause`\n template but auto-advance is configured. APG requires auto-advancing\n carousels to expose a pause control; this is the carousel's \"make it\n correct by default\" path so consumers don't have to write boilerplate. -->\n<ng-template #defaultPlayPauseTemplate let-paused=\"paused\" let-toggle=\"toggle\">\n <button type=\"button\"\n class=\"carousel-play-pause-btn\"\n [class.carousel-play-pause-paused]=\"paused\"\n [class.carousel-play-pause-playing]=\"!paused\"\n (click)=\"toggle()\" [attr.aria-pressed]=\"paused\"\n [attr.aria-label]=\"paused ? 'Resume auto-advance' : 'Pause auto-advance'\">\n <span class=\"carousel-play-pause-icon\" aria-hidden=\"true\"></span>\n </button>\n</ng-template>\n", styles: [":host ::ng-deep .carousel{position:relative}:host ::ng-deep .carousel.pointer-event{touch-action:pan-y}:host ::ng-deep .carousel-inner{position:relative;width:100%;overflow:hidden}:host ::ng-deep .carousel-inner:after{display:block;clear:both;content:\"\"}:host ::ng-deep .carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;backface-visibility:hidden;transition:transform .6s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .carousel-item{transition:none}}:host ::ng-deep .carousel-item.active,:host ::ng-deep .carousel-item-next,:host ::ng-deep .carousel-item-prev{display:block}:host ::ng-deep .carousel-item-next:not(.carousel-item-start),:host ::ng-deep .active.carousel-item-end{transform:translate(100%)}:host ::ng-deep .carousel-item-prev:not(.carousel-item-end),:host ::ng-deep .active.carousel-item-start{transform:translate(-100%)}:host ::ng-deep .carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}:host ::ng-deep .carousel-fade .carousel-item.active,:host ::ng-deep .carousel-fade .carousel-item-next.carousel-item-start,:host ::ng-deep .carousel-fade .carousel-item-prev.carousel-item-end{z-index:1;opacity:1}:host ::ng-deep .carousel-fade .active.carousel-item-start,:host ::ng-deep .carousel-fade .active.carousel-item-end{z-index:0;opacity:0;transition:opacity 0s .6s}@media(prefers-reduced-motion:reduce){:host ::ng-deep .carousel-fade .active.carousel-item-start,:host ::ng-deep .carousel-fade .active.carousel-item-end{transition:none}}:host ::ng-deep .carousel-control-prev,:host ::ng-deep .carousel-control-next{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:none;filter:var(--bs-carousel-control-icon-filter);border:0;opacity:.5;transition:opacity .15s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .carousel-control-prev,:host ::ng-deep .carousel-control-next{transition:none}}:host ::ng-deep .carousel-control-prev:hover,:host ::ng-deep .carousel-control-prev:focus,:host ::ng-deep .carousel-control-next:hover,:host ::ng-deep .carousel-control-next:focus{color:#fff;text-decoration:none;outline:0;opacity:.9}:host ::ng-deep .carousel-control-prev{left:0}:host ::ng-deep .carousel-control-next{right:0}:host ::ng-deep .carousel-control-prev-icon,:host ::ng-deep .carousel-control-next-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}:host ::ng-deep .carousel-control-prev-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e\")}:host ::ng-deep .carousel-control-next-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e\")}:host ::ng-deep .carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%}:host ::ng-deep .carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:var(--bs-carousel-indicator-active-bg);background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .carousel-indicators [data-bs-target]{transition:none}}:host ::ng-deep .carousel-indicators .active{opacity:1}:host ::ng-deep .carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:var(--bs-carousel-caption-color);text-align:center}:host ::ng-deep .carousel-dark{--bs-carousel-indicator-active-bg: #000;--bs-carousel-caption-color: #000;--bs-carousel-control-icon-filter: invert(1) grayscale(100)}:host ::ng-deep :root,:host ::ng-deep [data-bs-theme=light]{--bs-carousel-indicator-active-bg: #fff;--bs-carousel-caption-color: #fff;--bs-carousel-control-icon-filter: }:host ::ng-deep [data-bs-theme=dark]{--bs-carousel-indicator-active-bg: #000;--bs-carousel-caption-color: #000;--bs-carousel-control-icon-filter: invert(1) grayscale(100)}:host ::ng-deep .carousel{min-height:100px;max-width:500px}:host ::ng-deep .carousel.noscript .carousel-inner{grid-template-rows:100%;grid-template-columns:100%}:host ::ng-deep .carousel.noscript .carousel-control-prev,:host ::ng-deep .carousel.noscript .carousel-control-next{display:none;z-index:10}:host ::ng-deep .carousel.noscript .carousel-item{display:block;opacity:0;transition:opacity .4s ease-in-out;grid-row:1;grid-column:1}:host ::ng-deep .carousel.noscript .car-radio.noscript:checked+.carousel-item{opacity:1;z-index:5}:host ::ng-deep .carousel.noscript .car-radio.noscript:checked+.carousel-item+label.carousel-control-prev,:host ::ng-deep .carousel.noscript .car-radio.noscript:checked+.carousel-item+label.carousel-control-prev+.carousel-control-next{display:flex}:host ::ng-deep .carousel.noscript .carousel-indicators{z-index:10}:host ::ng-deep .carousel.noscript .carousel-item img{width:100%;height:auto}:host ::ng-deep .carousel .carousel-item>*{width:100%!important}:host ::ng-deep .carousel-indicators [data-bs-target]{background-color:var(--bs-carousel-indicator-active-bg, #fff)}:host ::ng-deep .carousel-play-pause{position:absolute;bottom:3rem;left:50%;transform:translate(-50%);z-index:3;margin:0}:host ::ng-deep .carousel-play-pause-btn{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;border:none;border-radius:50%;background-color:#00000080;color:#fff;cursor:pointer;transition:background-color .15s ease}:host ::ng-deep .carousel-play-pause-btn:hover,:host ::ng-deep .carousel-play-pause-btn:focus-visible{background-color:#000000bf}:host ::ng-deep .carousel-play-pause-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}:host ::ng-deep .carousel-play-pause-icon{display:inline-block;width:.75rem;height:.75rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}:host ::ng-deep .carousel-play-pause-paused .carousel-play-pause-icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M3 1.5v13a.5.5 0 0 0 .77.42l11-6.5a.5.5 0 0 0 0-.84l-11-6.5A.5.5 0 0 0 3 1.5z'/%3E%3C/svg%3E\")}:host ::ng-deep .carousel-play-pause-playing .carousel-play-pause-icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M5 2h2v12H5zM9 2h2v12H9z'/%3E%3C/svg%3E\")}:host ::ng-deep .carousel.carousel-vertical .carousel-play-pause{bottom:auto;top:.5rem;left:auto;right:.5rem;transform:none}:host ::ng-deep .carousel.fade .carousel-item{position:absolute;top:0;left:0;right:0;opacity:0;transition:opacity .5s ease-in-out;pointer-events:none}:host ::ng-deep .carousel.fade .carousel-item.active{opacity:1;pointer-events:auto}:host ::ng-deep .carousel.carousel-vertical .carousel-control-prev,:host ::ng-deep .carousel.carousel-vertical .carousel-control-next{width:100%;left:0;right:0}:host ::ng-deep .carousel.carousel-vertical .carousel-control-prev.carousel-control-vertical,:host ::ng-deep .carousel.carousel-vertical .carousel-control-next.carousel-control-vertical{justify-content:center}:host ::ng-deep .carousel.carousel-vertical .carousel-control-prev-icon,:host ::ng-deep .carousel.carousel-vertical .carousel-control-next-icon{background-color:#00000080;border-radius:50%;padding:1.5rem;background-size:50%;box-shadow:0 2px 8px #0000004d}:host ::ng-deep .carousel.carousel-vertical [bsSwipeContainer] .carousel-item{flex:0 0 auto;display:flex!important;flex-direction:column;justify-content:center;align-items:center}:host ::ng-deep .carousel-indicators-vertical{position:absolute;inset:50% auto auto 0;transform:translateY(-50%);flex-direction:column;justify-content:center;align-items:center;margin:0;margin-left:.5rem;gap:.5rem}:host ::ng-deep .carousel-indicators-vertical [data-bs-target]{width:12px;height:12px;border-radius:50%;background-color:#ffffff80;border:none;box-shadow:0 1px 3px #0000004d;opacity:.7;transition:opacity .15s ease}:host ::ng-deep .carousel-indicators-vertical [data-bs-target].active{opacity:1;background-color:#fff}:host ::ng-deep .carousel-control-vertical{top:0;bottom:auto;height:2.5rem;align-items:center}:host ::ng-deep .carousel-control-vertical.carousel-control-next{top:auto;bottom:0}:host ::ng-deep .carousel-control-vertical.carousel-control-prev .carousel-control-prev-icon{transform:rotate(90deg)}:host ::ng-deep .carousel-control-vertical.carousel-control-next .carousel-control-next-icon{transform:rotate(90deg)}.wrapper{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BsSwipeContainerDirective, selector: "[bsSwipeContainer]", inputs: ["minimumOffset", "animation", "orientation", "keyboardEvents", "imageIndex"], outputs: ["imageIndexChange", "animationStart", "animationEnd"], exportAs: ["bsSwipeContainer"] }, { kind: "directive", type: BsSwipeDirective, selector: "[bsSwipe]", inputs: ["offside", "ariaRoledescription", "ariaLabel"] }, { kind: "directive", type: BsSwipeViewportDirective, selector: "[bsSwipeViewport]", inputs: ["tabIndex", "ariaLive", "ariaAtomic", "ariaRelevant", "ariaBusy"] }, { kind: "directive", type: BsNoNoscriptDirective, selector: "[bsNoNoscript]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
114
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.0", type: BsCarouselComponent, isStandalone: true, selector: "bs-carousel", inputs: { animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, indicators: { classPropertyName: "indicators", publicName: "indicators", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, keyboardEvents: { classPropertyName: "keyboardEvents", publicName: "keyboardEvents", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, paused: { classPropertyName: "paused", publicName: "paused", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paused: "pausedChange", slideChange: "slideChange", animationStart: "animationStart", animationEnd: "animationEnd" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, isSignal: true }], ngImport: i0, template: "<mp-carousel\n #element\n [attr.animation]=\"animation()\"\n [attr.orientation]=\"orientation()\"\n [attr.indicators]=\"indicatorsAttr()\"\n [attr.interval]=\"intervalAttr()\"\n [attr.wrap]=\"wrapAttr()\"\n [attr.keyboard-events]=\"keyboardEventsAttr()\"\n [attr.paused]=\"pausedAttr()\"\n [attr.aria-label]=\"ariaLabel()\"\n (slide-change)=\"onSlideChange($event)\"\n (paused-change)=\"onPausedChange($event)\"\n (animation-start)=\"onAnimationStart($event)\"\n (animation-end)=\"onAnimationEnd($event)\">\n <ng-content></ng-content>\n</mp-carousel>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
234
115
  }
235
116
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsCarouselComponent, decorators: [{
236
117
  type: Component,
237
- args: [{ selector: 'bs-carousel', imports: [
238
- NgTemplateOutlet,
239
- BsSwipeContainerDirective,
240
- BsSwipeDirective,
241
- BsSwipeViewportDirective,
242
- BsNoNoscriptDirective,
243
- ], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [BsReducedMotionDirective], host: {
244
- '[@.disabled]': 'animationsDisabled()',
245
- }, template: "@if (isServerSide) {\n <div class=\"carousel mx-auto noscript\"\n role=\"region\"\n aria-roledescription=\"carousel\"\n [attr.aria-label]=\"ariaLabel()\"\n [class.carousel-vertical]=\"orientation() === 'vertical'\">\n <div class=\"carousel-inner d-grid\">\n @let imagesValue = images();\n @if (imageCount(); as imageCount) {\n @for (image of imagesValue; track image.id; let i = $index) {\n <input type=\"radio\" [id]=\"'car-' + i\" [name]=\"'car'\" class=\"car-radio d-none\" bsNoNoscript [checked]=\"i === 0\">\n <div class=\"carousel-item fade d-flex flex-row h-100 align-items-center\"\n role=\"group\"\n aria-roledescription=\"slide\"\n [attr.aria-label]=\"(i + 1) + ' of ' + imageCount\"\n [class.flex-column]=\"orientation() === 'vertical'\">\n <div class=\"w-100 position-relative\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container>\n @if (indicators()) {\n <div class=\"carousel-indicators\"\n [class.carousel-indicators-vertical]=\"orientation() === 'vertical'\">\n @for (image of imagesValue; track image.id; let j = $index) {\n <label [attr.for]=\"'car-' + (j % imageCount)\" [attr.aria-label]=\"'Slide ' + (j + 1)\" [class.active]=\"i === j\" data-bs-target></label>\n }\n </div>\n }\n </div>\n </div>\n\n <label class=\"carousel-control-prev cursor-pointer\" [for]=\"'car-' + ((i - 1 + imageCount) % imageCount)\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </label>\n <label class=\"carousel-control-next cursor-pointer\" [for]=\"'car-' + ((i + 1) % imageCount)\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </label>\n }\n }\n </div>\n </div>\n} @else {\n <div class=\"carousel mx-auto\"\n role=\"region\"\n aria-roledescription=\"carousel\"\n [attr.aria-label]=\"ariaLabel()\"\n [class.slide]=\"animation() === 'slide'\"\n [class.fade]=\"animation() === 'fade'\"\n [class.carousel-vertical]=\"orientation() === 'vertical'\">\n @if (playPauseTemplate() || (interval() ?? 0) > 0) {\n <div class=\"carousel-play-pause\">\n <ng-container *ngTemplateOutlet=\"playPauseTemplate() ?? defaultPlayPauseTemplate; context: { $implicit: paused(), paused: paused(), toggle: togglePaused }\"></ng-container>\n </div>\n }\n @if (indicators()) {\n <div class=\"carousel-indicators\" [class.carousel-indicators-vertical]=\"orientation() === 'vertical'\">\n @for (image of images(); track image.id; let i = $index) {\n <button type=\"button\" (click)=\"goto(i)\"\n [class.active]=\"currentImageIndex() === i\" data-bs-target\n [attr.aria-current]=\"currentImageIndex() === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + (i + 1)\"></button>\n }\n </div>\n }\n <div class=\"carousel-inner\" bsSwipeViewport #innerElement [style.height.px]=\"slideHeight()\"\n [ariaLive]=\"slideAriaLive()\"\n [ariaBusy]=\"container.isAnimating() ? true : null\">\n <div bsSwipeContainer #container=\"bsSwipeContainer\"\n [minimumOffset]=\"50\"\n [animation]=\"animation()\"\n [orientation]=\"orientation()\"\n [keyboardEvents]=\"keyboardEvents()\"\n [(imageIndex)]=\"currentImageIndex\"\n (animationStart)=\"onContainerAnimationStart()\"\n (animationEnd)=\"onContainerAnimationEnd()\">\n @if (animation() === 'slide') {\n <div class=\"carousel-item\" bsSwipe [offside]=\"true\">\n <ng-container *ngTemplateOutlet=\"lastImageTemplate()\"></ng-container>\n </div>\n }\n @for (image of images(); track image.id; let i = $index) {\n <div class=\"carousel-item\" bsSwipe\n [class.active]=\"currentImageIndex() === i\">\n <ng-container *ngTemplateOutlet=\"image.itemTemplate\"></ng-container>\n </div>\n }\n @if (animation() === 'slide') {\n <div class=\"carousel-item\" bsSwipe [offside]=\"true\">\n <ng-container *ngTemplateOutlet=\"firstImageTemplate()\"></ng-container>\n </div>\n }\n </div>\n </div>\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previous()\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\"\n aria-label=\"Previous slide\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"next()\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\"\n aria-label=\"Next slide\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n </div>\n}\n\n<!-- Fallback rendered when the consumer does not supply a `*bsCarouselPlayPause`\n template but auto-advance is configured. APG requires auto-advancing\n carousels to expose a pause control; this is the carousel's \"make it\n correct by default\" path so consumers don't have to write boilerplate. -->\n<ng-template #defaultPlayPauseTemplate let-paused=\"paused\" let-toggle=\"toggle\">\n <button type=\"button\"\n class=\"carousel-play-pause-btn\"\n [class.carousel-play-pause-paused]=\"paused\"\n [class.carousel-play-pause-playing]=\"!paused\"\n (click)=\"toggle()\" [attr.aria-pressed]=\"paused\"\n [attr.aria-label]=\"paused ? 'Resume auto-advance' : 'Pause auto-advance'\">\n <span class=\"carousel-play-pause-icon\" aria-hidden=\"true\"></span>\n </button>\n</ng-template>\n", styles: [":host ::ng-deep .carousel{position:relative}:host ::ng-deep .carousel.pointer-event{touch-action:pan-y}:host ::ng-deep .carousel-inner{position:relative;width:100%;overflow:hidden}:host ::ng-deep .carousel-inner:after{display:block;clear:both;content:\"\"}:host ::ng-deep .carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;backface-visibility:hidden;transition:transform .6s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .carousel-item{transition:none}}:host ::ng-deep .carousel-item.active,:host ::ng-deep .carousel-item-next,:host ::ng-deep .carousel-item-prev{display:block}:host ::ng-deep .carousel-item-next:not(.carousel-item-start),:host ::ng-deep .active.carousel-item-end{transform:translate(100%)}:host ::ng-deep .carousel-item-prev:not(.carousel-item-end),:host ::ng-deep .active.carousel-item-start{transform:translate(-100%)}:host ::ng-deep .carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}:host ::ng-deep .carousel-fade .carousel-item.active,:host ::ng-deep .carousel-fade .carousel-item-next.carousel-item-start,:host ::ng-deep .carousel-fade .carousel-item-prev.carousel-item-end{z-index:1;opacity:1}:host ::ng-deep .carousel-fade .active.carousel-item-start,:host ::ng-deep .carousel-fade .active.carousel-item-end{z-index:0;opacity:0;transition:opacity 0s .6s}@media(prefers-reduced-motion:reduce){:host ::ng-deep .carousel-fade .active.carousel-item-start,:host ::ng-deep .carousel-fade .active.carousel-item-end{transition:none}}:host ::ng-deep .carousel-control-prev,:host ::ng-deep .carousel-control-next{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:none;filter:var(--bs-carousel-control-icon-filter);border:0;opacity:.5;transition:opacity .15s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .carousel-control-prev,:host ::ng-deep .carousel-control-next{transition:none}}:host ::ng-deep .carousel-control-prev:hover,:host ::ng-deep .carousel-control-prev:focus,:host ::ng-deep .carousel-control-next:hover,:host ::ng-deep .carousel-control-next:focus{color:#fff;text-decoration:none;outline:0;opacity:.9}:host ::ng-deep .carousel-control-prev{left:0}:host ::ng-deep .carousel-control-next{right:0}:host ::ng-deep .carousel-control-prev-icon,:host ::ng-deep .carousel-control-next-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}:host ::ng-deep .carousel-control-prev-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e\")}:host ::ng-deep .carousel-control-next-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e\")}:host ::ng-deep .carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%}:host ::ng-deep .carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:var(--bs-carousel-indicator-active-bg);background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media(prefers-reduced-motion:reduce){:host ::ng-deep .carousel-indicators [data-bs-target]{transition:none}}:host ::ng-deep .carousel-indicators .active{opacity:1}:host ::ng-deep .carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:var(--bs-carousel-caption-color);text-align:center}:host ::ng-deep .carousel-dark{--bs-carousel-indicator-active-bg: #000;--bs-carousel-caption-color: #000;--bs-carousel-control-icon-filter: invert(1) grayscale(100)}:host ::ng-deep :root,:host ::ng-deep [data-bs-theme=light]{--bs-carousel-indicator-active-bg: #fff;--bs-carousel-caption-color: #fff;--bs-carousel-control-icon-filter: }:host ::ng-deep [data-bs-theme=dark]{--bs-carousel-indicator-active-bg: #000;--bs-carousel-caption-color: #000;--bs-carousel-control-icon-filter: invert(1) grayscale(100)}:host ::ng-deep .carousel{min-height:100px;max-width:500px}:host ::ng-deep .carousel.noscript .carousel-inner{grid-template-rows:100%;grid-template-columns:100%}:host ::ng-deep .carousel.noscript .carousel-control-prev,:host ::ng-deep .carousel.noscript .carousel-control-next{display:none;z-index:10}:host ::ng-deep .carousel.noscript .carousel-item{display:block;opacity:0;transition:opacity .4s ease-in-out;grid-row:1;grid-column:1}:host ::ng-deep .carousel.noscript .car-radio.noscript:checked+.carousel-item{opacity:1;z-index:5}:host ::ng-deep .carousel.noscript .car-radio.noscript:checked+.carousel-item+label.carousel-control-prev,:host ::ng-deep .carousel.noscript .car-radio.noscript:checked+.carousel-item+label.carousel-control-prev+.carousel-control-next{display:flex}:host ::ng-deep .carousel.noscript .carousel-indicators{z-index:10}:host ::ng-deep .carousel.noscript .carousel-item img{width:100%;height:auto}:host ::ng-deep .carousel .carousel-item>*{width:100%!important}:host ::ng-deep .carousel-indicators [data-bs-target]{background-color:var(--bs-carousel-indicator-active-bg, #fff)}:host ::ng-deep .carousel-play-pause{position:absolute;bottom:3rem;left:50%;transform:translate(-50%);z-index:3;margin:0}:host ::ng-deep .carousel-play-pause-btn{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;border:none;border-radius:50%;background-color:#00000080;color:#fff;cursor:pointer;transition:background-color .15s ease}:host ::ng-deep .carousel-play-pause-btn:hover,:host ::ng-deep .carousel-play-pause-btn:focus-visible{background-color:#000000bf}:host ::ng-deep .carousel-play-pause-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}:host ::ng-deep .carousel-play-pause-icon{display:inline-block;width:.75rem;height:.75rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}:host ::ng-deep .carousel-play-pause-paused .carousel-play-pause-icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M3 1.5v13a.5.5 0 0 0 .77.42l11-6.5a.5.5 0 0 0 0-.84l-11-6.5A.5.5 0 0 0 3 1.5z'/%3E%3C/svg%3E\")}:host ::ng-deep .carousel-play-pause-playing .carousel-play-pause-icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M5 2h2v12H5zM9 2h2v12H9z'/%3E%3C/svg%3E\")}:host ::ng-deep .carousel.carousel-vertical .carousel-play-pause{bottom:auto;top:.5rem;left:auto;right:.5rem;transform:none}:host ::ng-deep .carousel.fade .carousel-item{position:absolute;top:0;left:0;right:0;opacity:0;transition:opacity .5s ease-in-out;pointer-events:none}:host ::ng-deep .carousel.fade .carousel-item.active{opacity:1;pointer-events:auto}:host ::ng-deep .carousel.carousel-vertical .carousel-control-prev,:host ::ng-deep .carousel.carousel-vertical .carousel-control-next{width:100%;left:0;right:0}:host ::ng-deep .carousel.carousel-vertical .carousel-control-prev.carousel-control-vertical,:host ::ng-deep .carousel.carousel-vertical .carousel-control-next.carousel-control-vertical{justify-content:center}:host ::ng-deep .carousel.carousel-vertical .carousel-control-prev-icon,:host ::ng-deep .carousel.carousel-vertical .carousel-control-next-icon{background-color:#00000080;border-radius:50%;padding:1.5rem;background-size:50%;box-shadow:0 2px 8px #0000004d}:host ::ng-deep .carousel.carousel-vertical [bsSwipeContainer] .carousel-item{flex:0 0 auto;display:flex!important;flex-direction:column;justify-content:center;align-items:center}:host ::ng-deep .carousel-indicators-vertical{position:absolute;inset:50% auto auto 0;transform:translateY(-50%);flex-direction:column;justify-content:center;align-items:center;margin:0;margin-left:.5rem;gap:.5rem}:host ::ng-deep .carousel-indicators-vertical [data-bs-target]{width:12px;height:12px;border-radius:50%;background-color:#ffffff80;border:none;box-shadow:0 1px 3px #0000004d;opacity:.7;transition:opacity .15s ease}:host ::ng-deep .carousel-indicators-vertical [data-bs-target].active{opacity:1;background-color:#fff}:host ::ng-deep .carousel-control-vertical{top:0;bottom:auto;height:2.5rem;align-items:center}:host ::ng-deep .carousel-control-vertical.carousel-control-next{top:auto;bottom:0}:host ::ng-deep .carousel-control-vertical.carousel-control-prev .carousel-control-prev-icon{transform:rotate(90deg)}:host ::ng-deep .carousel-control-vertical.carousel-control-next .carousel-control-next-icon{transform:rotate(90deg)}.wrapper{overflow:hidden}\n"] }]
246
- }], ctorParameters: () => [], propDecorators: { images: [{ type: i0.ContentChildren, args: [forwardRef(() => BsCarouselImageDirective), { isSignal: true }] }], indicators: [{ type: i0.Input, args: [{ isSignal: true, alias: "indicators", required: false }] }], keyboardEvents: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboardEvents", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "animation", required: false }] }], interval: [{ type: i0.Input, args: [{ isSignal: true, alias: "interval", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], paused: [{ type: i0.Input, args: [{ isSignal: true, alias: "paused", required: false }] }, { type: i0.Output, args: ["pausedChange"] }], slideChange: [{ type: i0.Output, args: ["slideChange"] }], animationStart: [{ type: i0.Output, args: ["animationStart"] }], animationEnd: [{ type: i0.Output, args: ["animationEnd"] }], innerElement: [{ type: i0.ViewChild, args: ['innerElement', { isSignal: true }] }], swipeContainer: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }] } });
247
-
248
- class BsCarouselImgDirective {
249
- constructor() {
250
- this.image = inject(BsCarouselImageDirective, { optional: true });
251
- this.fetchPriority = (this.image && this.image.isFirst) ? 'high' : 'low';
252
- }
253
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsCarouselImgDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
254
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsCarouselImgDirective, isStandalone: true, selector: "img", host: { properties: { "attr.fetch-priority": "fetchPriority" } }, ngImport: i0 }); }
255
- }
256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsCarouselImgDirective, decorators: [{
257
- type: Directive,
258
- args: [{
259
- selector: 'img',
260
- host: {
261
- '[attr.fetch-priority]': 'fetchPriority',
262
- },
263
- }]
264
- }], ctorParameters: () => [] });
265
-
266
- class BsCarouselPlayPauseDirective {
267
- static ngTemplateContextGuard(_dir, ctx) {
268
- return true;
269
- }
270
- constructor() {
271
- this.templateRef = inject((TemplateRef));
272
- this.carousel = inject(BsCarouselComponent);
273
- this.carousel.playPauseTemplate.set(this.templateRef);
274
- }
275
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsCarouselPlayPauseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
276
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsCarouselPlayPauseDirective, isStandalone: true, selector: "[bsCarouselPlayPause]", ngImport: i0 }); }
277
- }
278
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsCarouselPlayPauseDirective, decorators: [{
279
- type: Directive,
280
- args: [{
281
- selector: '[bsCarouselPlayPause]',
282
- }]
283
- }], ctorParameters: () => [] });
118
+ args: [{ selector: 'bs-carousel', changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<mp-carousel\n #element\n [attr.animation]=\"animation()\"\n [attr.orientation]=\"orientation()\"\n [attr.indicators]=\"indicatorsAttr()\"\n [attr.interval]=\"intervalAttr()\"\n [attr.wrap]=\"wrapAttr()\"\n [attr.keyboard-events]=\"keyboardEventsAttr()\"\n [attr.paused]=\"pausedAttr()\"\n [attr.aria-label]=\"ariaLabel()\"\n (slide-change)=\"onSlideChange($event)\"\n (paused-change)=\"onPausedChange($event)\"\n (animation-start)=\"onAnimationStart($event)\"\n (animation-end)=\"onAnimationEnd($event)\">\n <ng-content></ng-content>\n</mp-carousel>\n" }]
119
+ }], ctorParameters: () => [], propDecorators: { animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "animation", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], indicators: [{ type: i0.Input, args: [{ isSignal: true, alias: "indicators", required: false }] }], interval: [{ type: i0.Input, args: [{ isSignal: true, alias: "interval", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], keyboardEvents: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboardEvents", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], paused: [{ type: i0.Input, args: [{ isSignal: true, alias: "paused", required: false }] }, { type: i0.Output, args: ["pausedChange"] }], slideChange: [{ type: i0.Output, args: ["slideChange"] }], animationStart: [{ type: i0.Output, args: ["animationStart"] }], animationEnd: [{ type: i0.Output, args: ["animationEnd"] }], element: [{ type: i0.ViewChild, args: ['element', { isSignal: true }] }] } });
284
120
 
285
121
  /**
286
122
  * Generated bundle index. Do not edit.
287
123
  */
288
124
 
289
- export { BsCarouselComponent, BsCarouselImageDirective, BsCarouselImgDirective, BsCarouselPlayPauseDirective };
125
+ export { BsCarouselComponent };
290
126
  //# sourceMappingURL=mintplayer-ng-bootstrap-carousel.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-carousel.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/carousel/src/carousel-image/carousel-image.directive.ts","../../../../libs/mintplayer-ng-bootstrap/carousel/src/carousel/carousel.component.ts","../../../../libs/mintplayer-ng-bootstrap/carousel/src/carousel/carousel.component.html","../../../../libs/mintplayer-ng-bootstrap/carousel/src/carousel-img/carousel-img.directive.ts","../../../../libs/mintplayer-ng-bootstrap/carousel/src/carousel-play-pause/carousel-play-pause.directive.ts","../../../../libs/mintplayer-ng-bootstrap/carousel/mintplayer-ng-bootstrap-carousel.ts"],"sourcesContent":["import { Directive, inject, TemplateRef, ElementRef } from '@angular/core';\nimport { BsCarouselComponent } from '../carousel/carousel.component';\n\n@Directive({\n selector: '*[bsCarouselImage]',\n})\nexport class BsCarouselImageDirective {\n private templateRef = inject(TemplateRef<any>);\n private carousel = inject(BsCarouselComponent);\n private element = inject(ElementRef<HTMLElement>);\n\n public itemTemplate: TemplateRef<any>;\n id: number;\n isFirst = false;\n\n constructor() {\n this.itemTemplate = this.templateRef;\n // Post-increment semantics: this.id gets the OLD value, then the counter increments.\n this.id = this.carousel.imageCounter();\n this.carousel.imageCounter.update(c => c + 1);\n }\n}\n","import { isPlatformServer, NgTemplateOutlet } from '@angular/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, computed, contentChildren, DestroyRef, effect, ElementRef, forwardRef, inject, input, model, OnDestroy, output, PLATFORM_ID, signal, TemplateRef, viewChild } from '@angular/core';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { BsSwipeContainerDirective, BsSwipeDirective, BsSwipeViewportDirective } from '@mintplayer/ng-swiper/swiper';\nimport { BsNoNoscriptDirective } from '@mintplayer/ng-bootstrap/no-noscript';\nimport { BsReducedMotionDirective } from '@mintplayer/ng-bootstrap/reduced-motion';\nimport { BsCarouselImageDirective } from '../carousel-image/carousel-image.directive';\nimport type { BsCarouselPlayPauseContext } from '../carousel-play-pause/carousel-play-pause.directive';\n\n@Component({\n selector: 'bs-carousel',\n templateUrl: './carousel.component.html',\n styleUrls: ['./carousel.component.scss'],\n imports: [\n NgTemplateOutlet,\n BsSwipeContainerDirective,\n BsSwipeDirective,\n BsSwipeViewportDirective,\n BsNoNoscriptDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [BsReducedMotionDirective],\n host: {\n '[@.disabled]': 'animationsDisabled()',\n },\n})\nexport class BsCarouselComponent implements AfterViewInit, OnDestroy {\n private platformId = inject(PLATFORM_ID);\n private destroyRef = inject(DestroyRef);\n private readonly reducedMotion = inject(BsReducedMotionDirective);\n\n readonly colors = Color;\n readonly isServerSide = isPlatformServer(this.platformId);\n currentImageIndex = signal(0);\n readonly images = contentChildren<BsCarouselImageDirective>(forwardRef(() => BsCarouselImageDirective));\n resizeObserver?: ResizeObserver;\n private intervalId?: ReturnType<typeof setInterval>;\n private isDestroyed = false;\n\n // Inputs\n indicators = input(false);\n keyboardEvents = input(true);\n orientation = input<'horizontal' | 'vertical'>('horizontal');\n animation = input<'fade' | 'slide' | 'none'>('slide');\n interval = input<number | null>(null);\n wrap = input(true);\n ariaLabel = input<string | null>(null);\n\n // Two-way: pause / resume the auto-advance timer. Toggled by the\n // consumer's `*bsCarouselPlayPause` template via the `toggle` callback in\n // its context, or by the public `play()` / `pause()` methods. Default\n // false (auto-advance allowed); has no effect when `interval` is null/0.\n paused = model<boolean>(false);\n\n /**\n * Template projected via `*bsCarouselPlayPause`. When set, the carousel\n * renders it in a control row above the slides. Per APG, auto-advancing\n * carousels must expose a play/pause control — this is how consumers\n * provide one without us imposing a button style.\n */\n readonly playPauseTemplate = signal<TemplateRef<BsCarouselPlayPauseContext> | null>(null);\n\n // Outputs\n slideChange = output<number>();\n animationStart = output<void>();\n animationEnd = output<void>();\n\n // Computed signals\n imageCount = computed(() => this.images().length);\n\n readonly innerElement = viewChild<ElementRef<HTMLDivElement>>('innerElement');\n readonly swipeContainer = viewChild<BsSwipeContainerDirective>('container');\n\n // Returns 200 when swipeContainer isn't ready or height is null/0, ensuring images render and ResizeObserver triggers\n slideHeight = computed(() => {\n const container = this.swipeContainer();\n const height = container?.currentSlideHeight();\n return (height && height > 0) ? height : 200;\n });\n\n firstImageTemplate = computed<TemplateRef<any> | null>(() => {\n const images = this.images();\n if (images.length === 0) return null;\n\n const img = images[0];\n if (!img) return null;\n\n return img.itemTemplate;\n });\n\n lastImageTemplate = computed<TemplateRef<any> | null>(() => {\n const images = this.images();\n if (images.length === 0) return null;\n\n const img = images[images.length - 1];\n if (!img) return null;\n\n return img.itemTemplate;\n });\n\n readonly animationsDisabled = signal<boolean>(false);\n\n /**\n * `aria-live` value for the slide viewport. Stays `off` while\n * auto-advance is actually rotating — otherwise the SR would re-read the\n * active slide every interval — and switches to `polite` whenever the\n * rotation is paused (by `paused`, missing/zero `interval`, or\n * `prefers-reduced-motion`), so manual prev/next/indicator clicks get\n * announced.\n */\n readonly slideAriaLive = computed<'off' | 'polite'>(() => {\n const intervalTime = this.interval();\n if (!intervalTime || intervalTime <= 0) return 'polite';\n if (this.paused()) return 'polite';\n if (this.reducedMotion.matches()) return 'polite';\n return 'off';\n });\n\n constructor() {\n // Mark first image whenever images change\n effect(() => {\n const images = this.images();\n images.forEach((item, index) => item.isFirst = (index === 0));\n });\n\n // Setup auto-advance interval effect — gated on the two new axes added\n // by the APG carousel bundle (PRD aria-accessibility-audit §13.2):\n // • `paused` model: lets the consumer (or the projected play/pause\n // button) suspend rotation.\n // • prefers-reduced-motion: suppresses auto-advance entirely when\n // the user opts out of motion at the OS level.\n effect(() => {\n const intervalTime = this.interval();\n const isPaused = this.paused();\n const reduceMotion = this.reducedMotion.matches();\n this.clearAutoAdvance();\n\n if (intervalTime && intervalTime > 0 && !isPaused && !reduceMotion) {\n this.intervalId = setInterval(() => {\n this.next();\n }, intervalTime);\n }\n });\n\n // Emit slideChange when currentImageIndex changes\n effect(() => {\n const index = this.currentImageIndex();\n if (!this.isDestroyed) {\n this.slideChange.emit(index);\n }\n });\n\n // Cleanup on destroy\n this.destroyRef.onDestroy(() => {\n this.isDestroyed = true;\n this.clearAutoAdvance();\n this.resizeObserver?.disconnect();\n });\n }\n\n /** Resume auto-advance. No-op if `interval` is unset or reduce-motion is on. */\n play() {\n this.paused.set(false);\n }\n\n /** Pause auto-advance. Manual prev/next/goto still work. */\n pause() {\n this.paused.set(true);\n }\n\n /** Toggle the paused state. Used as the `toggle` callback in `BsCarouselPlayPauseContext`. */\n togglePaused = () => {\n this.paused.update((p) => !p);\n };\n\n private clearAutoAdvance() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = undefined;\n }\n }\n\n previous() {\n if (!this.wrap() && this.currentImageIndex() === 0) return;\n this.swipeContainer()?.previous();\n }\n\n next() {\n if (!this.wrap() && this.currentImageIndex() === this.imageCount() - 1) return;\n this.swipeContainer()?.next();\n }\n\n goto(index: number) {\n if (index < 0 || index >= this.imageCount()) return;\n this.swipeContainer()?.goto(index);\n }\n\n readonly imageCounter = signal<number>(1);\n\n ngAfterViewInit() {\n if (!this.isServerSide) {\n this.resizeObserver = new ResizeObserver(() => {\n // Signals automatically trigger change detection in zoneless mode\n // The resize will be picked up by the observe-size directive\n });\n const el = this.innerElement();\n if (el) {\n this.resizeObserver.observe(el.nativeElement);\n }\n }\n }\n\n ngOnDestroy() {\n this.isDestroyed = true;\n const innerEl = this.innerElement();\n if (innerEl) {\n this.resizeObserver?.unobserve(innerEl.nativeElement);\n }\n this.resizeObserver?.disconnect();\n this.clearAutoAdvance();\n }\n\n onContainerAnimationStart() {\n this.animationStart.emit();\n }\n\n onContainerAnimationEnd() {\n this.animationEnd.emit();\n }\n\n onImageIndexChange(index: number) {\n this.currentImageIndex.set(index);\n }\n}\n","@if (isServerSide) {\n <div class=\"carousel mx-auto noscript\"\n role=\"region\"\n aria-roledescription=\"carousel\"\n [attr.aria-label]=\"ariaLabel()\"\n [class.carousel-vertical]=\"orientation() === 'vertical'\">\n <div class=\"carousel-inner d-grid\">\n @let imagesValue = images();\n @if (imageCount(); as imageCount) {\n @for (image of imagesValue; track image.id; let i = $index) {\n <input type=\"radio\" [id]=\"'car-' + i\" [name]=\"'car'\" class=\"car-radio d-none\" bsNoNoscript [checked]=\"i === 0\">\n <div class=\"carousel-item fade d-flex flex-row h-100 align-items-center\"\n role=\"group\"\n aria-roledescription=\"slide\"\n [attr.aria-label]=\"(i + 1) + ' of ' + imageCount\"\n [class.flex-column]=\"orientation() === 'vertical'\">\n <div class=\"w-100 position-relative\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container>\n @if (indicators()) {\n <div class=\"carousel-indicators\"\n [class.carousel-indicators-vertical]=\"orientation() === 'vertical'\">\n @for (image of imagesValue; track image.id; let j = $index) {\n <label [attr.for]=\"'car-' + (j % imageCount)\" [attr.aria-label]=\"'Slide ' + (j + 1)\" [class.active]=\"i === j\" data-bs-target></label>\n }\n </div>\n }\n </div>\n </div>\n\n <label class=\"carousel-control-prev cursor-pointer\" [for]=\"'car-' + ((i - 1 + imageCount) % imageCount)\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </label>\n <label class=\"carousel-control-next cursor-pointer\" [for]=\"'car-' + ((i + 1) % imageCount)\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </label>\n }\n }\n </div>\n </div>\n} @else {\n <div class=\"carousel mx-auto\"\n role=\"region\"\n aria-roledescription=\"carousel\"\n [attr.aria-label]=\"ariaLabel()\"\n [class.slide]=\"animation() === 'slide'\"\n [class.fade]=\"animation() === 'fade'\"\n [class.carousel-vertical]=\"orientation() === 'vertical'\">\n @if (playPauseTemplate() || (interval() ?? 0) > 0) {\n <div class=\"carousel-play-pause\">\n <ng-container *ngTemplateOutlet=\"playPauseTemplate() ?? defaultPlayPauseTemplate; context: { $implicit: paused(), paused: paused(), toggle: togglePaused }\"></ng-container>\n </div>\n }\n @if (indicators()) {\n <div class=\"carousel-indicators\" [class.carousel-indicators-vertical]=\"orientation() === 'vertical'\">\n @for (image of images(); track image.id; let i = $index) {\n <button type=\"button\" (click)=\"goto(i)\"\n [class.active]=\"currentImageIndex() === i\" data-bs-target\n [attr.aria-current]=\"currentImageIndex() === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + (i + 1)\"></button>\n }\n </div>\n }\n <div class=\"carousel-inner\" bsSwipeViewport #innerElement [style.height.px]=\"slideHeight()\"\n [ariaLive]=\"slideAriaLive()\"\n [ariaBusy]=\"container.isAnimating() ? true : null\">\n <div bsSwipeContainer #container=\"bsSwipeContainer\"\n [minimumOffset]=\"50\"\n [animation]=\"animation()\"\n [orientation]=\"orientation()\"\n [keyboardEvents]=\"keyboardEvents()\"\n [(imageIndex)]=\"currentImageIndex\"\n (animationStart)=\"onContainerAnimationStart()\"\n (animationEnd)=\"onContainerAnimationEnd()\">\n @if (animation() === 'slide') {\n <div class=\"carousel-item\" bsSwipe [offside]=\"true\">\n <ng-container *ngTemplateOutlet=\"lastImageTemplate()\"></ng-container>\n </div>\n }\n @for (image of images(); track image.id; let i = $index) {\n <div class=\"carousel-item\" bsSwipe\n [class.active]=\"currentImageIndex() === i\">\n <ng-container *ngTemplateOutlet=\"image.itemTemplate\"></ng-container>\n </div>\n }\n @if (animation() === 'slide') {\n <div class=\"carousel-item\" bsSwipe [offside]=\"true\">\n <ng-container *ngTemplateOutlet=\"firstImageTemplate()\"></ng-container>\n </div>\n }\n </div>\n </div>\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previous()\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\"\n aria-label=\"Previous slide\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"next()\"\n [class.carousel-control-vertical]=\"orientation() === 'vertical'\"\n aria-label=\"Next slide\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n </div>\n}\n\n<!-- Fallback rendered when the consumer does not supply a `*bsCarouselPlayPause`\n template but auto-advance is configured. APG requires auto-advancing\n carousels to expose a pause control; this is the carousel's \"make it\n correct by default\" path so consumers don't have to write boilerplate. -->\n<ng-template #defaultPlayPauseTemplate let-paused=\"paused\" let-toggle=\"toggle\">\n <button type=\"button\"\n class=\"carousel-play-pause-btn\"\n [class.carousel-play-pause-paused]=\"paused\"\n [class.carousel-play-pause-playing]=\"!paused\"\n (click)=\"toggle()\" [attr.aria-pressed]=\"paused\"\n [attr.aria-label]=\"paused ? 'Resume auto-advance' : 'Pause auto-advance'\">\n <span class=\"carousel-play-pause-icon\" aria-hidden=\"true\"></span>\n </button>\n</ng-template>\n","import { Directive, inject } from '@angular/core';\nimport { BsCarouselImageDirective } from '../carousel-image/carousel-image.directive';\n\n@Directive({\n selector: 'img',\n host: {\n '[attr.fetch-priority]': 'fetchPriority',\n },\n})\nexport class BsCarouselImgDirective {\n private image = inject(BsCarouselImageDirective, { optional: true });\n\n fetchPriority: 'high' | 'low' | 'auto';\n\n constructor() {\n this.fetchPriority = (this.image && this.image.isFirst) ? 'high' : 'low';\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { BsCarouselComponent } from '../carousel/carousel.component';\n\n/**\n * Context exposed to a `*bsCarouselPlayPause` template — the consumer reads\n * `paused` to render the right glyph/label and calls `toggle` on click.\n *\n * Per PRD aria-accessibility-audit §13.2 (and the WAI-ARIA Authoring\n * Practices Carousel pattern): when a carousel auto-advances, it MUST\n * expose a visible, keyboard-operable play/pause control. The carousel\n * itself doesn't impose a button style — the consumer projects whatever\n * UI fits their app and reads the `paused` flag from this context.\n */\nexport interface BsCarouselPlayPauseContext {\n /** Whether the carousel is currently paused. Same value as `paused`. */\n $implicit: boolean;\n /** Whether the carousel is currently paused. */\n paused: boolean;\n /** Toggle the paused state. Mirrors the carousel's two-way `[(paused)]`. */\n toggle: () => void;\n}\n\n@Directive({\n selector: '[bsCarouselPlayPause]',\n})\nexport class BsCarouselPlayPauseDirective {\n private templateRef = inject(TemplateRef<BsCarouselPlayPauseContext>);\n private carousel = inject(BsCarouselComponent);\n\n static ngTemplateContextGuard(\n _dir: BsCarouselPlayPauseDirective,\n ctx: unknown,\n ): ctx is BsCarouselPlayPauseContext {\n return true;\n }\n\n constructor() {\n this.carousel.playPauseTemplate.set(this.templateRef);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAMa,wBAAwB,CAAA;AASnC,IAAA,WAAA,GAAA;AARQ,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,EAAC,WAAgB,EAAC;AACtC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACtC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,EAAC,UAAuB,EAAC;QAIjD,IAAA,CAAA,OAAO,GAAG,KAAK;AAGb,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW;;QAEpC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;AACtC,QAAA,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C;8GAdW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC/B,iBAAA;;;MCqBY,mBAAmB,CAAA;AA4F9B,IAAA,WAAA,GAAA;AA3FQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CA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E,eAAe;AACzC,qBAAA;AACF,iBAAA;;;MCiBY,4BAA4B,CAAA;AAIvC,IAAA,OAAO,sBAAsB,CAC3B,IAAkC,EAClC,GAAY,EAAA;AAEZ,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,WAAA,GAAA;AAVQ,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,EAAC,WAAuC,EAAC;AAC7D,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC;QAU5C,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC;IACvD;8GAbW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAHxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AAClC,iBAAA;;;ACxBD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-carousel.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/carousel/src/carousel/carousel.component.ts","../../../../libs/mintplayer-ng-bootstrap/carousel/src/carousel/carousel.component.html","../../../../libs/mintplayer-ng-bootstrap/carousel/mintplayer-ng-bootstrap-carousel.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport type {\n CarouselAnimation,\n CarouselOrientation,\n CarouselPausedChangeEventDetail,\n CarouselSlideChangeEventDetail,\n MpCarousel,\n} from '@mintplayer/web-components/carousel';\n\n/**\n * `<bs-carousel>` — Angular wrapper around the `<mp-carousel>` web component.\n *\n * Slides are plain content children (no structural directive):\n *\n * <bs-carousel animation=\"fade\" [indicators]=\"true\" [interval]=\"4000\" ariaLabel=\"Photos\">\n * <img src=\"a.png\" alt=\"…\">\n * <img src=\"b.png\" alt=\"…\">\n * </bs-carousel>\n *\n * Track layout, gestures, keyboard, ARIA, the radio-driven no-JS tier and the\n * height contract all live in the WC (single source of UI truth); this wrapper\n * only bridges inputs to attributes and re-emits the WC's typed events. A\n * custom play/pause control can be projected with `slot=\"play-pause\"` — wire\n * it to `togglePaused()` (or listen to `pausedChange`).\n *\n * The WC is registered **client-side only** (`afterNextRender`); on the server\n * Angular emits a bare `<mp-carousel>` tag and the SSR layer injects its\n * Declarative Shadow DOM (see `injectMpCarouselDsd`), so the carousel renders\n * — and navigates — with JS off.\n */\n@Component({\n selector: 'bs-carousel',\n templateUrl: './carousel.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class BsCarouselComponent {\n /** Slide transition: `slide` (default), `fade`, or `none`. */\n readonly animation = input<CarouselAnimation>('slide');\n /** Slide axis; vertical also pins every slide to the tallest one. */\n readonly orientation = input<CarouselOrientation>('horizontal');\n /** Show the indicator dots. */\n readonly indicators = input(false);\n /** Auto-advance interval in ms; `null`/`0` disables autoplay. */\n readonly interval = input<number | null>(null);\n /** Wrap around at the ends (buttons, keyboard AND swipe). */\n readonly wrap = input(true);\n /** Arrow/Home/End navigation on the focused viewport. */\n readonly keyboardEvents = input(true);\n /** Accessible label for the carousel region. */\n readonly ariaLabel = input<string | null>(null);\n /** Two-way: whether autoplay is paused. */\n readonly paused = model(false);\n\n /** The committed slide index changed. */\n readonly slideChange = output<number>();\n readonly animationStart = output<void>();\n readonly animationEnd = output<void>();\n\n protected readonly element = viewChild<ElementRef<MpCarousel>>('element');\n\n /** Presence/string-or-absent attributes derived once via signals. */\n protected readonly indicatorsAttr = computed(() => (this.indicators() ? '' : null));\n protected readonly intervalAttr = computed(() => {\n const value = this.interval();\n return value && value > 0 ? String(value) : null;\n });\n protected readonly wrapAttr = computed(() => (this.wrap() ? null : 'false'));\n protected readonly keyboardEventsAttr = computed(() => (this.keyboardEvents() ? null : 'false'));\n protected readonly pausedAttr = computed(() => (this.paused() ? '' : null));\n\n constructor() {\n afterNextRender(() => {\n // Side-effect import registers <mp-carousel>; client-only so SSR stays\n // a bare tag for DSD injection.\n import('@mintplayer/web-components/carousel');\n });\n }\n\n previous(): void {\n this.element()?.nativeElement.previous?.();\n }\n\n next(): void {\n this.element()?.nativeElement.next?.();\n }\n\n goto(index: number): void {\n this.element()?.nativeElement.goto?.(index);\n }\n\n play(): void {\n this.paused.set(false);\n }\n\n pause(): void {\n this.paused.set(true);\n }\n\n togglePaused = (): void => {\n this.paused.set(!this.paused());\n };\n\n protected onSlideChange(event: Event) {\n // stopPropagation so the composed WC event doesn't ALSO fire the\n // consumer's binding on the <bs-carousel> host with the raw CustomEvent.\n event.stopPropagation();\n this.slideChange.emit((event as CustomEvent<CarouselSlideChangeEventDetail>).detail.index);\n }\n\n protected onPausedChange(event: Event) {\n event.stopPropagation();\n this.paused.set((event as CustomEvent<CarouselPausedChangeEventDetail>).detail.paused);\n }\n\n protected onAnimationStart(event: Event) {\n event.stopPropagation();\n this.animationStart.emit();\n }\n\n protected onAnimationEnd(event: Event) {\n event.stopPropagation();\n this.animationEnd.emit();\n }\n}\n","<mp-carousel\n #element\n [attr.animation]=\"animation()\"\n [attr.orientation]=\"orientation()\"\n [attr.indicators]=\"indicatorsAttr()\"\n [attr.interval]=\"intervalAttr()\"\n [attr.wrap]=\"wrapAttr()\"\n [attr.keyboard-events]=\"keyboardEventsAttr()\"\n [attr.paused]=\"pausedAttr()\"\n [attr.aria-label]=\"ariaLabel()\"\n (slide-change)=\"onSlideChange($event)\"\n (paused-change)=\"onPausedChange($event)\"\n (animation-start)=\"onAnimationStart($event)\"\n (animation-end)=\"onAnimationEnd($event)\">\n <ng-content></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CAAC,MAAM,CAAC,MAAM,CAAC;IACxF;AAEU,IAAA,gBAAgB,CAAC,KAAY,EAAA;QACrC,KAAK,CAAC,eAAe,EAAE;AACvB,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE;IAC5B;AAEU,IAAA,cAAc,CAAC,KAAY,EAAA;QACnC,KAAK,CAAC,eAAe,EAAE;AACvB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC1B;8GAvFW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,q2CC/ChC,olBAgBA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FD+Ba,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,mBAEN,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,olBAAA,EAAA;mlCAyB8B,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtE1E;;AAEG;;;;"}
@@ -0,0 +1,48 @@
1
+ import { isPlatformServer } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, ElementRef, PLATFORM_ID, signal, computed, Directive } from '@angular/core';
4
+
5
+ class BsObserveSizeDirective {
6
+ constructor() {
7
+ this.element = inject(ElementRef);
8
+ this.platformId = inject(PLATFORM_ID);
9
+ this.size = signal(undefined, /* @ts-ignore */
10
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
11
+ this.width = computed(() => this.size()?.width, /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
13
+ this.height = computed(() => this.size()?.height, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
15
+ if (!isPlatformServer(this.platformId) && typeof ResizeObserver !== 'undefined') {
16
+ this.observer = new ResizeObserver((entries) => {
17
+ this.size.set(entries[0].contentRect);
18
+ });
19
+ }
20
+ }
21
+ ngAfterViewInit() {
22
+ const el = this.element.nativeElement;
23
+ this.observer?.observe(el);
24
+ this.size.set({ width: el.clientWidth, height: el.clientHeight });
25
+ }
26
+ ngOnDestroy() {
27
+ if (this.observer) {
28
+ this.observer.unobserve(this.element.nativeElement);
29
+ this.observer.disconnect();
30
+ }
31
+ }
32
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsObserveSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
33
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsObserveSizeDirective, isStandalone: true, selector: "[bsObserveSize]", exportAs: ["bsObserveSize"], ngImport: i0 }); }
34
+ }
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsObserveSizeDirective, decorators: [{
36
+ type: Directive,
37
+ args: [{
38
+ selector: '[bsObserveSize]',
39
+ exportAs: 'bsObserveSize'
40
+ }]
41
+ }], ctorParameters: () => [] });
42
+
43
+ /**
44
+ * Generated bundle index. Do not edit.
45
+ */
46
+
47
+ export { BsObserveSizeDirective };
48
+ //# sourceMappingURL=mintplayer-ng-bootstrap-observe-size.mjs.map