@mintplayer/ng-bootstrap 21.30.0 → 21.31.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.
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +455 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +10 -4
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +131 -3
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +80 -48
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +218 -14
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +294 -3
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +163 -18
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +179 -7
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +14 -4
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +14 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +2 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +70 -6
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +5 -4
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +45 -13
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +51 -5
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +5 -3
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +18 -4
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +61 -6
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +19 -4
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +34 -4
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs +59 -0
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +91 -2
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -5
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +28 -5
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +18 -4
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +10 -3
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +143 -29
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +42 -21
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +33 -4
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +17 -7
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +50 -8
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs +34 -12
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs +74 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs +1476 -71
- package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs +194 -2
- package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs.map +1 -1
- package/package.json +14 -2
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +196 -0
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +32 -0
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +56 -3
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +75 -4
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-dock.d.ts +51 -0
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +54 -9
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +57 -2
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +4 -1
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-modal.d.ts +25 -1
- package/types/mintplayer-ng-bootstrap-multiselect.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +25 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +23 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +5 -1
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-popover.d.ts +21 -1
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +4 -1
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-range.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-rating.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-reduced-motion.d.ts +36 -0
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +4 -0
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +42 -9
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-searchbox.d.ts +8 -1
- package/types/mintplayer-ng-bootstrap-select.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-select2.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-table.d.ts +8 -1
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +21 -2
- package/types/mintplayer-ng-bootstrap-toast.d.ts +6 -1
- package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +11 -0
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +5 -0
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -1
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +11 -3
- package/types/mintplayer-ng-bootstrap-virtual-datatable.d.ts +14 -1
- package/types/mintplayer-ng-bootstrap-web-components-a11y.d.ts +34 -0
- package/types/mintplayer-ng-bootstrap-web-components-scheduler-core.d.ts +35 -11
- package/types/mintplayer-ng-bootstrap-web-components-scheduler.d.ts +246 -0
- package/types/mintplayer-ng-bootstrap-web-components-splitter.d.ts +95 -37
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { isPlatformServer, NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, TemplateRef, ElementRef, Directive, PLATFORM_ID, DestroyRef, signal, contentChildren, forwardRef, input, output, computed, viewChild, effect, ChangeDetectionStrategy, Component } 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
4
|
import { Color } from '@mintplayer/ng-bootstrap';
|
|
5
5
|
import { BsSwipeContainerDirective, BsSwipeDirective, BsSwipeViewportDirective } from '@mintplayer/ng-swiper/swiper';
|
|
6
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';
|
|
7
9
|
|
|
8
10
|
class BsCarouselImageDirective {
|
|
9
11
|
constructor() {
|
|
@@ -27,45 +29,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
27
29
|
}], ctorParameters: () => [] });
|
|
28
30
|
|
|
29
31
|
class BsCarouselComponent {
|
|
30
|
-
onKeyPress(event) {
|
|
31
|
-
const ev = event;
|
|
32
|
-
if (this.keyboardEvents()) {
|
|
33
|
-
let handled = false;
|
|
34
|
-
const orientation = this.orientation();
|
|
35
|
-
switch (ev.key) {
|
|
36
|
-
case 'ArrowLeft':
|
|
37
|
-
if (orientation === 'horizontal') {
|
|
38
|
-
this.previous();
|
|
39
|
-
handled = true;
|
|
40
|
-
}
|
|
41
|
-
break;
|
|
42
|
-
case 'ArrowRight':
|
|
43
|
-
if (orientation === 'horizontal') {
|
|
44
|
-
this.next();
|
|
45
|
-
handled = true;
|
|
46
|
-
}
|
|
47
|
-
break;
|
|
48
|
-
case 'ArrowUp':
|
|
49
|
-
if (orientation === 'vertical') {
|
|
50
|
-
this.previous();
|
|
51
|
-
handled = true;
|
|
52
|
-
}
|
|
53
|
-
break;
|
|
54
|
-
case 'ArrowDown':
|
|
55
|
-
if (orientation === 'vertical') {
|
|
56
|
-
this.next();
|
|
57
|
-
handled = true;
|
|
58
|
-
}
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
if (handled) {
|
|
62
|
-
ev.preventDefault();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
32
|
constructor() {
|
|
67
33
|
this.platformId = inject(PLATFORM_ID);
|
|
68
34
|
this.destroyRef = inject(DestroyRef);
|
|
35
|
+
this.reducedMotion = inject(BsReducedMotionDirective);
|
|
69
36
|
this.colors = Color;
|
|
70
37
|
this.isServerSide = isPlatformServer(this.platformId);
|
|
71
38
|
this.currentImageIndex = signal(0, ...(ngDevMode ? [{ debugName: "currentImageIndex" }] : /* istanbul ignore next */ []));
|
|
@@ -78,6 +45,19 @@ class BsCarouselComponent {
|
|
|
78
45
|
this.animation = input('slide', ...(ngDevMode ? [{ debugName: "animation" }] : /* istanbul ignore next */ []));
|
|
79
46
|
this.interval = input(null, ...(ngDevMode ? [{ debugName: "interval" }] : /* istanbul ignore next */ []));
|
|
80
47
|
this.wrap = input(true, ...(ngDevMode ? [{ debugName: "wrap" }] : /* istanbul ignore next */ []));
|
|
48
|
+
this.ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
49
|
+
// Two-way: pause / resume the auto-advance timer. Toggled by the
|
|
50
|
+
// consumer's `*bsCarouselPlayPause` template via the `toggle` callback in
|
|
51
|
+
// its context, or by the public `play()` / `pause()` methods. Default
|
|
52
|
+
// false (auto-advance allowed); has no effect when `interval` is null/0.
|
|
53
|
+
this.paused = model(false, ...(ngDevMode ? [{ debugName: "paused" }] : /* istanbul ignore next */ []));
|
|
54
|
+
/**
|
|
55
|
+
* Template projected via `*bsCarouselPlayPause`. When set, the carousel
|
|
56
|
+
* renders it in a control row above the slides. Per APG, auto-advancing
|
|
57
|
+
* carousels must expose a play/pause control — this is how consumers
|
|
58
|
+
* provide one without us imposing a button style.
|
|
59
|
+
*/
|
|
60
|
+
this.playPauseTemplate = signal(null, ...(ngDevMode ? [{ debugName: "playPauseTemplate" }] : /* istanbul ignore next */ []));
|
|
81
61
|
// Outputs
|
|
82
62
|
this.slideChange = output();
|
|
83
63
|
this.animationStart = output();
|
|
@@ -111,17 +91,46 @@ class BsCarouselComponent {
|
|
|
111
91
|
return img.itemTemplate;
|
|
112
92
|
}, ...(ngDevMode ? [{ debugName: "lastImageTemplate" }] : /* istanbul ignore next */ []));
|
|
113
93
|
this.animationsDisabled = signal(false, ...(ngDevMode ? [{ debugName: "animationsDisabled" }] : /* istanbul ignore next */ []));
|
|
94
|
+
/**
|
|
95
|
+
* `aria-live` value for the slide viewport. Stays `off` while
|
|
96
|
+
* auto-advance is actually rotating — otherwise the SR would re-read the
|
|
97
|
+
* active slide every interval — and switches to `polite` whenever the
|
|
98
|
+
* rotation is paused (by `paused`, missing/zero `interval`, or
|
|
99
|
+
* `prefers-reduced-motion`), so manual prev/next/indicator clicks get
|
|
100
|
+
* announced.
|
|
101
|
+
*/
|
|
102
|
+
this.slideAriaLive = computed(() => {
|
|
103
|
+
const intervalTime = this.interval();
|
|
104
|
+
if (!intervalTime || intervalTime <= 0)
|
|
105
|
+
return 'polite';
|
|
106
|
+
if (this.paused())
|
|
107
|
+
return 'polite';
|
|
108
|
+
if (this.reducedMotion.matches())
|
|
109
|
+
return 'polite';
|
|
110
|
+
return 'off';
|
|
111
|
+
}, ...(ngDevMode ? [{ debugName: "slideAriaLive" }] : /* istanbul ignore next */ []));
|
|
112
|
+
/** Toggle the paused state. Used as the `toggle` callback in `BsCarouselPlayPauseContext`. */
|
|
113
|
+
this.togglePaused = () => {
|
|
114
|
+
this.paused.update((p) => !p);
|
|
115
|
+
};
|
|
114
116
|
this.imageCounter = signal(1, ...(ngDevMode ? [{ debugName: "imageCounter" }] : /* istanbul ignore next */ []));
|
|
115
117
|
// Mark first image whenever images change
|
|
116
118
|
effect(() => {
|
|
117
119
|
const images = this.images();
|
|
118
120
|
images.forEach((item, index) => item.isFirst = (index === 0));
|
|
119
121
|
});
|
|
120
|
-
// Setup auto-advance interval effect
|
|
122
|
+
// Setup auto-advance interval effect — gated on the two new axes added
|
|
123
|
+
// by the APG carousel bundle (PRD aria-accessibility-audit §13.2):
|
|
124
|
+
// • `paused` model: lets the consumer (or the projected play/pause
|
|
125
|
+
// button) suspend rotation.
|
|
126
|
+
// • prefers-reduced-motion: suppresses auto-advance entirely when
|
|
127
|
+
// the user opts out of motion at the OS level.
|
|
121
128
|
effect(() => {
|
|
122
129
|
const intervalTime = this.interval();
|
|
130
|
+
const isPaused = this.paused();
|
|
131
|
+
const reduceMotion = this.reducedMotion.matches();
|
|
123
132
|
this.clearAutoAdvance();
|
|
124
|
-
if (intervalTime && intervalTime > 0) {
|
|
133
|
+
if (intervalTime && intervalTime > 0 && !isPaused && !reduceMotion) {
|
|
125
134
|
this.intervalId = setInterval(() => {
|
|
126
135
|
this.next();
|
|
127
136
|
}, intervalTime);
|
|
@@ -141,6 +150,14 @@ class BsCarouselComponent {
|
|
|
141
150
|
this.resizeObserver?.disconnect();
|
|
142
151
|
});
|
|
143
152
|
}
|
|
153
|
+
/** Resume auto-advance. No-op if `interval` is unset or reduce-motion is on. */
|
|
154
|
+
play() {
|
|
155
|
+
this.paused.set(false);
|
|
156
|
+
}
|
|
157
|
+
/** Pause auto-advance. Manual prev/next/goto still work. */
|
|
158
|
+
pause() {
|
|
159
|
+
this.paused.set(true);
|
|
160
|
+
}
|
|
144
161
|
clearAutoAdvance() {
|
|
145
162
|
if (this.intervalId) {
|
|
146
163
|
clearInterval(this.intervalId);
|
|
@@ -193,7 +210,7 @@ class BsCarouselComponent {
|
|
|
193
210
|
this.currentImageIndex.set(index);
|
|
194
211
|
}
|
|
195
212
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
196
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", 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 } }, outputs: { slideChange: "slideChange", animationStart: "animationStart", animationEnd: "animationEnd" }, host: { listeners: { "document:keydown.ArrowLeft": "onKeyPress($event)", "document:keydown.ArrowRight": "onKeyPress($event)", "document:keydown.ArrowUp": "onKeyPress($event)", "document:keydown.ArrowDown": "onKeyPress($event)" }, 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 }], ngImport: i0, template: "@if (isServerSide) {\n <div class=\"carousel mx-auto noscript\" [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 [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)\" [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 [class.slide]=\"animation() === 'slide'\"\n [class.fade]=\"animation() === 'fade'\"\n [class.carousel-vertical]=\"orientation() === 'vertical'\">\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\"></button>\n }\n </div>\n }\n <div class=\"carousel-inner\" bsSwipeViewport #innerElement [style.height.px]=\"slideHeight()\">\n <div bsSwipeContainer #container=\"bsSwipeContainer\"\n [minimumOffset]=\"50\"\n [animation]=\"animation()\"\n [orientation]=\"orientation()\"\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", 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.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", "imageIndex"], outputs: ["imageIndexChange", "animationStart", "animationEnd"], exportAs: ["bsSwipeContainer"] }, { kind: "directive", type: BsSwipeDirective, selector: "[bsSwipe]", inputs: ["offside"] }, { kind: "directive", type: BsSwipeViewportDirective, selector: "[bsSwipeViewport]" }, { kind: "directive", type: BsNoNoscriptDirective, selector: "[bsNoNoscript]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
213
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", 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 }); }
|
|
197
214
|
}
|
|
198
215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsCarouselComponent, decorators: [{
|
|
199
216
|
type: Component,
|
|
@@ -203,14 +220,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
203
220
|
BsSwipeDirective,
|
|
204
221
|
BsSwipeViewportDirective,
|
|
205
222
|
BsNoNoscriptDirective,
|
|
206
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
223
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [BsReducedMotionDirective], host: {
|
|
207
224
|
'[@.disabled]': 'animationsDisabled()',
|
|
208
|
-
'(document:keydown.ArrowLeft)': 'onKeyPress($event)',
|
|
209
|
-
|
|
210
|
-
'(document:keydown.ArrowUp)': 'onKeyPress($event)',
|
|
211
|
-
'(document:keydown.ArrowDown)': 'onKeyPress($event)',
|
|
212
|
-
}, template: "@if (isServerSide) {\n <div class=\"carousel mx-auto noscript\" [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 [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)\" [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 [class.slide]=\"animation() === 'slide'\"\n [class.fade]=\"animation() === 'fade'\"\n [class.carousel-vertical]=\"orientation() === 'vertical'\">\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\"></button>\n }\n </div>\n }\n <div class=\"carousel-inner\" bsSwipeViewport #innerElement [style.height.px]=\"slideHeight()\">\n <div bsSwipeContainer #container=\"bsSwipeContainer\"\n [minimumOffset]=\"50\"\n [animation]=\"animation()\"\n [orientation]=\"orientation()\"\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", 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.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"] }]
|
|
213
|
-
}], 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 }] }], 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 }] }] } });
|
|
225
|
+
}, 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"] }]
|
|
226
|
+
}], 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 }] }] } });
|
|
214
227
|
|
|
215
228
|
class BsCarouselImgDirective {
|
|
216
229
|
constructor() {
|
|
@@ -230,9 +243,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
230
243
|
}]
|
|
231
244
|
}], ctorParameters: () => [] });
|
|
232
245
|
|
|
246
|
+
class BsCarouselPlayPauseDirective {
|
|
247
|
+
static ngTemplateContextGuard(_dir, ctx) {
|
|
248
|
+
return true;
|
|
249
|
+
}
|
|
250
|
+
constructor() {
|
|
251
|
+
this.templateRef = inject((TemplateRef));
|
|
252
|
+
this.carousel = inject(BsCarouselComponent);
|
|
253
|
+
this.carousel.playPauseTemplate.set(this.templateRef);
|
|
254
|
+
}
|
|
255
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsCarouselPlayPauseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
256
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: BsCarouselPlayPauseDirective, isStandalone: true, selector: "[bsCarouselPlayPause]", ngImport: i0 }); }
|
|
257
|
+
}
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsCarouselPlayPauseDirective, decorators: [{
|
|
259
|
+
type: Directive,
|
|
260
|
+
args: [{
|
|
261
|
+
selector: '[bsCarouselPlayPause]',
|
|
262
|
+
}]
|
|
263
|
+
}], ctorParameters: () => [] });
|
|
264
|
+
|
|
233
265
|
/**
|
|
234
266
|
* Generated bundle index. Do not edit.
|
|
235
267
|
*/
|
|
236
268
|
|
|
237
|
-
export { BsCarouselComponent, BsCarouselImageDirective, BsCarouselImgDirective };
|
|
269
|
+
export { BsCarouselComponent, BsCarouselImageDirective, BsCarouselImgDirective, BsCarouselPlayPauseDirective };
|
|
238
270
|
//# 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/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, 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 { BsCarouselImageDirective } from '../carousel-image/carousel-image.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 host: {\n '[@.disabled]': 'animationsDisabled()',\n '(document:keydown.ArrowLeft)': 'onKeyPress($event)',\n '(document:keydown.ArrowRight)': 'onKeyPress($event)',\n '(document:keydown.ArrowUp)': 'onKeyPress($event)',\n '(document:keydown.ArrowDown)': 'onKeyPress($event)',\n },\n})\nexport class BsCarouselComponent implements AfterViewInit, OnDestroy {\n private platformId = inject(PLATFORM_ID);\n private destroyRef = inject(DestroyRef);\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\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 onKeyPress(event: Event) {\n const ev = event as KeyboardEvent;\n if (this.keyboardEvents()) {\n let handled = false;\n const orientation = this.orientation();\n switch (ev.key) {\n case 'ArrowLeft':\n if (orientation === 'horizontal') {\n this.previous();\n handled = true;\n }\n break;\n case 'ArrowRight':\n if (orientation === 'horizontal') {\n this.next();\n handled = true;\n }\n break;\n case 'ArrowUp':\n if (orientation === 'vertical') {\n this.previous();\n handled = true;\n }\n break;\n case 'ArrowDown':\n if (orientation === 'vertical') {\n this.next();\n handled = true;\n }\n break;\n }\n if (handled) {\n ev.preventDefault();\n }\n }\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\n effect(() => {\n const intervalTime = this.interval();\n this.clearAutoAdvance();\n\n if (intervalTime && intervalTime > 0) {\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 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\" [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 [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)\" [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 [class.slide]=\"animation() === 'slide'\"\n [class.fade]=\"animation() === 'fade'\"\n [class.carousel-vertical]=\"orientation() === 'vertical'\">\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\"></button>\n }\n </div>\n }\n <div class=\"carousel-inner\" bsSwipeViewport #innerElement [style.height.px]=\"slideHeight()\">\n <div bsSwipeContainer #container=\"bsSwipeContainer\"\n [minimumOffset]=\"50\"\n [animation]=\"animation()\"\n [orientation]=\"orientation()\"\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","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","/**\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,CAA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KAAK;AACf,oBAAA,IAAI,EAAE;AACJ,wBAAA,uBAAuB,EAAE,eAAe;AACzC,qBAAA;AACF,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
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;+GAdW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QA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 -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { model, input, viewChild, output, signal, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { inject, model, input, viewChild, output, signal, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';
|
|
3
4
|
import { BsCopyDirective } from '@mintplayer/ng-bootstrap/copy';
|
|
4
5
|
import { BsOffcanvasHostComponent, BsOffcanvasContentDirective } from '@mintplayer/ng-bootstrap/offcanvas';
|
|
5
6
|
import * as i1 from 'ngx-highlightjs';
|
|
@@ -7,6 +8,7 @@ import { HighlightModule } from 'ngx-highlightjs';
|
|
|
7
8
|
|
|
8
9
|
class BsCodeSnippetComponent {
|
|
9
10
|
constructor() {
|
|
11
|
+
this.announcer = inject(BsLiveAnnouncerService);
|
|
10
12
|
this.offcanvasVisible = model(false, ...(ngDevMode ? [{ debugName: "offcanvasVisible" }] : /* istanbul ignore next */ []));
|
|
11
13
|
this.codeToCopy = input('', ...(ngDevMode ? [{ debugName: "codeToCopy" }] : /* istanbul ignore next */ []));
|
|
12
14
|
this.language = input('', ...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
|
|
@@ -19,6 +21,7 @@ class BsCodeSnippetComponent {
|
|
|
19
21
|
});
|
|
20
22
|
}
|
|
21
23
|
copiedHtml() {
|
|
24
|
+
this.announcer.announce('Copied to clipboard');
|
|
22
25
|
this.offcanvasVisible.set(true);
|
|
23
26
|
setTimeout(() => this.offcanvasVisible.set(false), 3000);
|
|
24
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-code-snippet.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.ts","../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.html","../../../../libs/mintplayer-ng-bootstrap/code-snippet/mintplayer-ng-bootstrap-code-snippet.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, input, model, output, signal, TemplateRef, viewChild } from '@angular/core';\nimport { BsCopyDirective } from '@mintplayer/ng-bootstrap/copy';\nimport { BsOffcanvasHostComponent, BsOffcanvasContentDirective } from '@mintplayer/ng-bootstrap/offcanvas';\nimport { HighlightModule } from 'ngx-highlightjs';\nimport { HighlightResult } from 'highlight.js';\n\n@Component({\n selector: 'bs-code-snippet',\n templateUrl: './code-snippet.component.html',\n styleUrls: ['./code-snippet.component.scss'],\n imports: [BsCopyDirective, BsOffcanvasHostComponent, BsOffcanvasContentDirective, HighlightModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsCodeSnippetComponent {\n\n constructor() {\n effect(() => {\n const language = this.detectedLanguageValue();\n this.detectedLanguage.emit(language);\n });\n }\n\n offcanvasVisible = model(false);\n codeToCopy = input<string>('');\n language = input<string>('');\n readonly copiedTemplate = viewChild.required<TemplateRef<any>>('copiedTemplate');\n detectedLanguage = output<string>();\n\n detectedLanguageValue = signal<string>('code');\n\n copiedHtml() {\n this.offcanvasVisible.set(true);\n setTimeout(() => this.offcanvasVisible.set(false), 3000);\n }\n\n onHighlighted(result: HighlightResult | null) {\n this.detectedLanguageValue.set(result?.language ?? 'code');\n }\n\n}\n","<div class=\"position-relative\">\n <button #copyBtn [bsCopy]=\"codeToCopy()\" (bsCopied)=\"copiedHtml()\" class=\"btn btn-link rounded-0 text-light position-absolute copy-btn\">\n Copy {{ detectedLanguageValue() }}\n </button>\n <pre class=\"white-space-normal\">\n <code class=\"d-block white-space-pre\" [highlight]=\"codeToCopy()\" [language]=\"language()\" (highlighted)=\"onHighlighted($event)\"></code>\n </pre>\n <bs-offcanvas [(isVisible)]=\"offcanvasVisible\" [position]=\"'bottom'\">\n <div *bsOffcanvasContent class=\"p-3 bg-dark text-light\">Copied!</div>\n </bs-offcanvas>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-code-snippet.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.ts","../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.html","../../../../libs/mintplayer-ng-bootstrap/code-snippet/mintplayer-ng-bootstrap-code-snippet.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, inject, input, model, output, signal, TemplateRef, viewChild } from '@angular/core';\nimport { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsCopyDirective } from '@mintplayer/ng-bootstrap/copy';\nimport { BsOffcanvasHostComponent, BsOffcanvasContentDirective } from '@mintplayer/ng-bootstrap/offcanvas';\nimport { HighlightModule } from 'ngx-highlightjs';\nimport { HighlightResult } from 'highlight.js';\n\n@Component({\n selector: 'bs-code-snippet',\n templateUrl: './code-snippet.component.html',\n styleUrls: ['./code-snippet.component.scss'],\n imports: [BsCopyDirective, BsOffcanvasHostComponent, BsOffcanvasContentDirective, HighlightModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsCodeSnippetComponent {\n private announcer = inject(BsLiveAnnouncerService);\n\n constructor() {\n effect(() => {\n const language = this.detectedLanguageValue();\n this.detectedLanguage.emit(language);\n });\n }\n\n offcanvasVisible = model(false);\n codeToCopy = input<string>('');\n language = input<string>('');\n readonly copiedTemplate = viewChild.required<TemplateRef<any>>('copiedTemplate');\n detectedLanguage = output<string>();\n\n detectedLanguageValue = signal<string>('code');\n\n copiedHtml() {\n this.announcer.announce('Copied to clipboard');\n this.offcanvasVisible.set(true);\n setTimeout(() => this.offcanvasVisible.set(false), 3000);\n }\n\n onHighlighted(result: HighlightResult | null) {\n this.detectedLanguageValue.set(result?.language ?? 'code');\n }\n\n}\n","<div class=\"position-relative\">\n <button #copyBtn [bsCopy]=\"codeToCopy()\" (bsCopied)=\"copiedHtml()\" class=\"btn btn-link rounded-0 text-light position-absolute copy-btn\">\n Copy {{ detectedLanguageValue() }}\n </button>\n <pre class=\"white-space-normal\">\n <code class=\"d-block white-space-pre\" [highlight]=\"codeToCopy()\" [language]=\"language()\" (highlighted)=\"onHighlighted($event)\"></code>\n </pre>\n <bs-offcanvas [(isVisible)]=\"offcanvasVisible\" [position]=\"'bottom'\">\n <div *bsOffcanvasContent class=\"p-3 bg-dark text-light\">Copied!</div>\n </bs-offcanvas>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAca,sBAAsB,CAAA;AAGjC,IAAA,WAAA,GAAA;AAFQ,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,sBAAsB,CAAC;AASlD,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,KAAK,uFAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,iFAAC;AAC9B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,+EAAC;AACnB,QAAA,IAAA,CAAA,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAmB,gBAAgB,CAAC;QAChF,IAAA,CAAA,gBAAgB,GAAG,MAAM,EAAU;AAEnC,QAAA,IAAA,CAAA,qBAAqB,GAAG,MAAM,CAAS,MAAM,4FAAC;QAZ5C,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,qBAAqB,EAAE;AAC7C,YAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC;AACtC,QAAA,CAAC,CAAC;IACJ;IAUA,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC;AAC9C,QAAA,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC;AAC/B,QAAA,UAAU,CAAC,MAAM,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,EA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