@eui/ecl 23.0.0-alpha.6 → 23.0.0-alpha.8
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/docs/changelog.html +86 -0
- package/docs/classes/EclLanguageService.html +8 -8
- package/docs/components/EclBannerComponent.html +28 -56
- package/docs/components/EclCardComponent.html +12 -24
- package/docs/components/EclCarouselComponent.html +33 -65
- package/docs/components/EclCarouselItemComponent.html +4 -8
- package/docs/components/EclCategoryFilterComponent.html +4 -8
- package/docs/components/EclCategoryFilterItemComponent.html +5 -9
- package/docs/components/EclCategoryFilterListComponent.html +5 -9
- package/docs/components/EclContentItemComponent.html +20 -40
- package/docs/components/EclFactFiguresItemComponent.html +4 -8
- package/docs/components/EclFactFiguresViewAllComponent.html +4 -8
- package/docs/components/EclFeaturedItemComponent.html +4 -10
- package/docs/components/EclFileComponent.html +4 -8
- package/docs/components/EclFileItemsComponent.html +4 -8
- package/docs/components/EclFormGroupComponent.html +4 -8
- package/docs/components/EclGalleryComponent.html +21 -41
- package/docs/components/EclGalleryItemComponent.html +8 -16
- package/docs/components/EclIconComponent.html +4 -8
- package/docs/components/EclInpageNavigationComponent.html +20 -40
- package/docs/components/EclInpageNavigationItemComponent.html +4 -8
- package/docs/components/EclListIllustrationComponent.html +4 -8
- package/docs/components/EclListIllustrationItemComponent.html +9 -17
- package/docs/components/EclMediaContainerComponent.html +21 -41
- package/docs/components/EclMegaMenuComponent.html +4 -8
- package/docs/components/EclMegaMenuFeaturedComponent.html +12 -24
- package/docs/components/EclMegaMenuInfoComponent.html +4 -8
- package/docs/components/EclMegaMenuItemComponent.html +37 -73
- package/docs/components/EclMegaMenuSubitemComponent.html +21 -43
- package/docs/components/EclMenuComponent.html +20 -40
- package/docs/components/EclMenuItemComponent.html +12 -24
- package/docs/components/EclMenuMegaItemComponent.html +12 -24
- package/docs/components/EclModalComponent.html +1 -1
- package/docs/components/EclMultiselectComponent.html +4 -8
- package/docs/components/EclMultiselectDropdownComponent.html +21 -41
- package/docs/components/EclMultiselectInputComponent.html +4 -8
- package/docs/components/EclMultiselectOptionComponent.html +4 -8
- package/docs/components/EclNavigationListComponent.html +4 -8
- package/docs/components/EclNavigationListItemComponent.html +4 -8
- package/docs/components/EclNewsTickerComponent.html +28 -48
- package/docs/components/EclNewsTickerItemComponent.html +4 -8
- package/docs/components/EclPageHeaderComponent.html +8 -16
- package/docs/components/EclPaginationComponent.html +4 -8
- package/docs/components/EclPopoverComponent.html +12 -24
- package/docs/components/EclSiteHeaderComponent.html +44 -88
- package/docs/components/EclSiteHeaderCustomActionComponent.html +8 -16
- package/docs/components/EclSiteHeaderLanguageComponent.html +10 -18
- package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +6 -10
- package/docs/components/EclSiteHeaderLoginComponent.html +4 -8
- package/docs/components/EclSiteHeaderSearchComponent.html +4 -8
- package/docs/components/EclTabComponent.html +12 -24
- package/docs/components/EclTabsComponent.html +29 -57
- package/docs/components/EclTimelineComponent.html +4 -8
- package/docs/components/EclTimelineItemComponent.html +16 -32
- package/docs/directives/EclCheckboxDirective.html +16 -32
- package/docs/directives/EclDescriptionListDirective.html +4 -8
- package/docs/directives/EclGalleryMediaDirective.html +2 -2
- package/docs/directives/EclGalleryPictureDirective.html +1 -1
- package/docs/directives/EclListIllustrationPictureDirective.html +4 -8
- package/docs/directives/EclMediaContainerItemDirective.html +4 -8
- package/docs/directives/EclMegaMenuSublistDirective.html +8 -16
- package/docs/directives/EclMultiselectOptionDirective.html +4 -8
- package/docs/directives/EclPageHeaderMetaItemDirective.html +9 -0
- package/docs/directives/EclRadioDirective.html +8 -16
- package/docs/directives/EclSocialMediaFollowLinkDirective.html +4 -8
- package/docs/directives/EclTableDirective.html +4 -8
- package/docs/directives/EclTableHeadDirective.html +4 -8
- package/docs/injectables/EclDefaultLanguageService.html +7 -7
- package/docs/injectables/EclMegaMenuService.html +2 -2
- package/docs/interfaces/EclMegaMenuItem.html +2 -2
- package/docs/interfaces/EclMenuItem.html +2 -2
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/EclMegaMenuItemComponent.md +1 -1
- package/docs/json/EclMegaMenuSubitemComponent.md +1 -1
- package/docs/json/EclSiteHeaderLanguagePopoverComponent.md +2 -2
- package/docs/json/documentation.json +1365 -2133
- package/docs/llms.txt +182 -182
- package/docs/miscellaneous/variables.html +16 -16
- package/docs/properties.html +1 -1
- package/fesm2022/eui-ecl-components-ecl-banner.mjs +37 -40
- package/fesm2022/eui-ecl-components-ecl-banner.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-card.mjs +23 -17
- package/fesm2022/eui-ecl-components-ecl-card.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-carousel.mjs +105 -82
- package/fesm2022/eui-ecl-components-ecl-carousel.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-category-filter.mjs +36 -29
- package/fesm2022/eui-ecl-components-ecl-category-filter.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-checkbox.mjs +30 -20
- package/fesm2022/eui-ecl-components-ecl-checkbox.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-content-item.mjs +46 -27
- package/fesm2022/eui-ecl-components-ecl-content-item.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-date-picker.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-fact-figures.mjs +25 -15
- package/fesm2022/eui-ecl-components-ecl-fact-figures.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-featured.mjs +10 -9
- package/fesm2022/eui-ecl-components-ecl-featured.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-file.mjs +17 -13
- package/fesm2022/eui-ecl-components-ecl-file.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-form-group.mjs +12 -7
- package/fesm2022/eui-ecl-components-ecl-form-group.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-gallery.mjs +44 -49
- package/fesm2022/eui-ecl-components-ecl-gallery.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-icon.mjs +7 -8
- package/fesm2022/eui-ecl-components-ecl-icon.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs +48 -50
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-link.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-list-illustration.mjs +19 -24
- package/fesm2022/eui-ecl-components-ecl-list-illustration.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-list.mjs +6 -7
- package/fesm2022/eui-ecl-components-ecl-list.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-loading-indicator.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-media-container.mjs +31 -34
- package/fesm2022/eui-ecl-components-ecl-media-container.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs +237 -197
- package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-menu.mjs +108 -86
- package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-modal.mjs +0 -1
- package/fesm2022/eui-ecl-components-ecl-modal.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-multiselect.mjs +70 -67
- package/fesm2022/eui-ecl-components-ecl-multiselect.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-navigation-list.mjs +16 -14
- package/fesm2022/eui-ecl-components-ecl-navigation-list.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs +67 -51
- package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-page-header.mjs +17 -12
- package/fesm2022/eui-ecl-components-ecl-page-header.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-pagination.mjs +9 -7
- package/fesm2022/eui-ecl-components-ecl-pagination.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-popover.mjs +44 -38
- package/fesm2022/eui-ecl-components-ecl-popover.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-radio.mjs +22 -14
- package/fesm2022/eui-ecl-components-ecl-radio.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs +123 -118
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-slogan-ticker.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-slogan-ticker.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs +10 -8
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-table.mjs +17 -15
- package/fesm2022/eui-ecl-components-ecl-table.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-tabs.mjs +101 -81
- package/fesm2022/eui-ecl-components-ecl-tabs.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-timeline.mjs +47 -37
- package/fesm2022/eui-ecl-components-ecl-timeline.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-tooltip.mjs.map +1 -1
- package/fesm2022/eui-ecl-core.mjs +1 -1
- package/fesm2022/eui-ecl-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eui-ecl-components-ecl-banner.d.ts +42 -43
- package/types/eui-ecl-components-ecl-banner.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-card.d.ts +34 -35
- package/types/eui-ecl-components-ecl-card.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-carousel.d.ts +10 -11
- package/types/eui-ecl-components-ecl-carousel.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-category-filter.d.ts +6 -6
- package/types/eui-ecl-components-ecl-category-filter.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-checkbox.d.ts +47 -49
- package/types/eui-ecl-components-ecl-checkbox.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-content-item.d.ts +16 -18
- package/types/eui-ecl-components-ecl-content-item.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-fact-figures.d.ts +3 -3
- package/types/eui-ecl-components-ecl-fact-figures.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-featured.d.ts +2 -2
- package/types/eui-ecl-components-ecl-featured.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-file.d.ts +42 -43
- package/types/eui-ecl-components-ecl-file.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-form-group.d.ts +1 -3
- package/types/eui-ecl-components-ecl-form-group.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-gallery.d.ts +12 -12
- package/types/eui-ecl-components-ecl-gallery.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-icon.d.ts +1 -1
- package/types/eui-ecl-components-ecl-icon.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-inpage-navigation.d.ts +8 -8
- package/types/eui-ecl-components-ecl-inpage-navigation.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-list-illustration.d.ts +44 -44
- package/types/eui-ecl-components-ecl-list-illustration.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-list.d.ts +2 -2
- package/types/eui-ecl-components-ecl-list.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-media-container.d.ts +33 -33
- package/types/eui-ecl-components-ecl-media-container.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-mega-menu.d.ts +185 -191
- package/types/eui-ecl-components-ecl-mega-menu.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-menu.d.ts +126 -128
- package/types/eui-ecl-components-ecl-menu.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-modal.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-multiselect.d.ts +10 -10
- package/types/eui-ecl-components-ecl-multiselect.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-navigation-list.d.ts +3 -4
- package/types/eui-ecl-components-ecl-navigation-list.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-news-ticker.d.ts +18 -18
- package/types/eui-ecl-components-ecl-news-ticker.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-page-header.d.ts +3 -3
- package/types/eui-ecl-components-ecl-page-header.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-pagination.d.ts +1 -1
- package/types/eui-ecl-components-ecl-pagination.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-popover.d.ts +3 -3
- package/types/eui-ecl-components-ecl-popover.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-radio.d.ts +28 -28
- package/types/eui-ecl-components-ecl-radio.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-site-header.d.ts +48 -48
- package/types/eui-ecl-components-ecl-site-header.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-social-media-follow.d.ts +1 -1
- package/types/eui-ecl-components-ecl-social-media-follow.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-table.d.ts +3 -3
- package/types/eui-ecl-components-ecl-table.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-tabs.d.ts +12 -12
- package/types/eui-ecl-components-ecl-tabs.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-timeline.d.ts +27 -28
- package/types/eui-ecl-components-ecl-timeline.d.ts.map +1 -1
- package/types/eui-ecl-core.d.ts +11 -11
- package/types/eui-ecl-core.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, ElementRef, output,
|
|
3
|
+
import { inject, ElementRef, output, contentChild, forwardRef, booleanAttribute, HostListener, Input, Component, input, numberAttribute, viewChild, contentChildren, viewChildren, ChangeDetectorRef, Renderer2, DOCUMENT, afterNextRender } from '@angular/core';
|
|
4
4
|
import { EclIconComponent } from '@eui/ecl/components/ecl-icon';
|
|
5
5
|
import { EclBaseEvent, ECLBaseDirective, EclRtlService, KeyCode } from '@eui/ecl/core';
|
|
6
6
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
@@ -31,6 +31,11 @@ class EclCarouselItemComponent extends ECLBaseDirective {
|
|
|
31
31
|
* Emits an event when the slide is clicked.
|
|
32
32
|
*/
|
|
33
33
|
this.slideClick = output();
|
|
34
|
+
/**
|
|
35
|
+
* Optionally captures a banner component projected into the slide.
|
|
36
|
+
*/
|
|
37
|
+
this.banner = contentChild(forwardRef(() => EclBannerComponent), /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "banner" }] : /* istanbul ignore next */ []));
|
|
34
39
|
}
|
|
35
40
|
/**
|
|
36
41
|
* Computes the slide's CSS class.
|
|
@@ -45,7 +50,7 @@ class EclCarouselItemComponent extends ECLBaseDirective {
|
|
|
45
50
|
this.slideClick.emit(new EclSlideEvent(this));
|
|
46
51
|
}
|
|
47
52
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclCarouselItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
53
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: EclCarouselItemComponent, isStandalone: true, selector: "ecl-carousel-item", inputs: { id: "id", isCurrent: ["isCurrent", "isCurrent", booleanAttribute] }, outputs: { slideClick: "slideClick" }, host: { attributes: { "role": "tabpanel" }, listeners: { "click": "onSlideClick()" }, properties: { "attr.aria-label": "ariaLabel", "attr.aria-roledescription": "\"slide\"", "attr.inert": "!isCurrent || undefined", "class": "cssClasses" } }, queries: [{ propertyName: "banner", first: true, predicate: i0.forwardRef(() => EclBannerComponent), descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host:before{left:0!important;display:none}\n"] }); }
|
|
49
54
|
}
|
|
50
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclCarouselItemComponent, decorators: [{
|
|
51
56
|
type: Component,
|
|
@@ -61,10 +66,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
61
66
|
}], isCurrent: [{
|
|
62
67
|
type: Input,
|
|
63
68
|
args: [{ transform: booleanAttribute }]
|
|
64
|
-
}], slideClick: [{ type: i0.Output, args: ["slideClick"] }], banner: [{
|
|
65
|
-
type: ContentChild,
|
|
66
|
-
args: [forwardRef(() => EclBannerComponent)]
|
|
67
|
-
}], onSlideClick: [{
|
|
69
|
+
}], slideClick: [{ type: i0.Output, args: ["slideClick"] }], banner: [{ type: i0.ContentChild, args: [forwardRef(() => EclBannerComponent), { isSignal: true }] }], onSlideClick: [{
|
|
68
70
|
type: HostListener,
|
|
69
71
|
args: ['click']
|
|
70
72
|
}] } });
|
|
@@ -92,6 +94,46 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
92
94
|
* Event emitted when a slide change occurs.
|
|
93
95
|
*/
|
|
94
96
|
this.slide = output();
|
|
97
|
+
/**
|
|
98
|
+
* Reference to the main carousel container element.
|
|
99
|
+
*/
|
|
100
|
+
this.carouselContainerElement = viewChild('carouselContainer', /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "carouselContainerElement" }] : /* istanbul ignore next */ []));
|
|
102
|
+
/**
|
|
103
|
+
* Collection of slide components rendered inside the carousel.
|
|
104
|
+
*/
|
|
105
|
+
this.slides = contentChildren(forwardRef(() => EclCarouselItemComponent), /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "slides" }] : /* istanbul ignore next */ []));
|
|
107
|
+
/**
|
|
108
|
+
* References to the navigation buttons corresponding to each slide.
|
|
109
|
+
*/
|
|
110
|
+
this.navigationButtons = viewChildren('currButton', /* @ts-ignore */
|
|
111
|
+
...(ngDevMode ? [{ debugName: "navigationButtons" }] : /* istanbul ignore next */ []));
|
|
112
|
+
/**
|
|
113
|
+
* Reference to the play button element.
|
|
114
|
+
*/
|
|
115
|
+
this.playButton = viewChild('playButton', /* @ts-ignore */
|
|
116
|
+
...(ngDevMode ? [{ debugName: "playButton" }] : /* istanbul ignore next */ []));
|
|
117
|
+
/**
|
|
118
|
+
* Reference to the pause button element.
|
|
119
|
+
*/
|
|
120
|
+
this.pauseButton = viewChild('pauseButton', /* @ts-ignore */
|
|
121
|
+
...(ngDevMode ? [{ debugName: "pauseButton" }] : /* istanbul ignore next */ []));
|
|
122
|
+
/**
|
|
123
|
+
* Reference to the first hidden slide item (used for focus management).
|
|
124
|
+
*/
|
|
125
|
+
this.firstHiddenItem = viewChild('firstHiddenItem', /* @ts-ignore */
|
|
126
|
+
...(ngDevMode ? [{ debugName: "firstHiddenItem" }] : /* istanbul ignore next */ []));
|
|
127
|
+
/**
|
|
128
|
+
* Reference to the last hidden slide item (used for focus management).
|
|
129
|
+
*/
|
|
130
|
+
this.lastHiddenItem = viewChild('lastHiddenItem', /* @ts-ignore */
|
|
131
|
+
...(ngDevMode ? [{ debugName: "lastHiddenItem" }] : /* istanbul ignore next */ []));
|
|
132
|
+
/**
|
|
133
|
+
* Reference to the slides container element.
|
|
134
|
+
*/
|
|
135
|
+
this.slidesContainer = viewChild('slidesContainer', /* @ts-ignore */
|
|
136
|
+
...(ngDevMode ? [{ debugName: "slidesContainer" }] : /* istanbul ignore next */ []));
|
|
95
137
|
/**
|
|
96
138
|
* Indicates whether autoplay is currently active.
|
|
97
139
|
*/
|
|
@@ -178,14 +220,14 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
178
220
|
*/
|
|
179
221
|
onPlayClick() {
|
|
180
222
|
this.startPlaying();
|
|
181
|
-
this.focusOnButton(this.pauseButton);
|
|
223
|
+
this.focusOnButton(this.pauseButton());
|
|
182
224
|
}
|
|
183
225
|
/**
|
|
184
226
|
* Stops autoplay and focuses the play button.
|
|
185
227
|
*/
|
|
186
228
|
onPauseClick() {
|
|
187
229
|
this.stopPlaying();
|
|
188
|
-
this.focusOnButton(this.playButton);
|
|
230
|
+
this.focusOnButton(this.playButton());
|
|
189
231
|
}
|
|
190
232
|
/**
|
|
191
233
|
* Handles key press on the first carousel element to stop autoplay if TAB is pressed.
|
|
@@ -206,16 +248,16 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
206
248
|
}
|
|
207
249
|
if ([KeyCode.TAB].includes(e.key)) {
|
|
208
250
|
if (this.isPlaying) {
|
|
209
|
-
this.focusOnButton(this.navigationButtons.
|
|
251
|
+
this.focusOnButton(this.navigationButtons().at(this.getCurrentSlideIndex()));
|
|
210
252
|
this.stopPlaying();
|
|
211
253
|
}
|
|
212
254
|
else {
|
|
213
|
-
this.focusOnButton(this.navigationButtons.
|
|
255
|
+
this.focusOnButton(this.navigationButtons().at(this.getCurrentSlideIndex()));
|
|
214
256
|
}
|
|
215
257
|
e.preventDefault();
|
|
216
258
|
}
|
|
217
259
|
else if (!this.isPlaying && [KeyCode.ARROW_RIGHT].includes(e.key)) {
|
|
218
|
-
this.focusOnButton(this.navigationButtons.
|
|
260
|
+
this.focusOnButton(this.navigationButtons().at(this.getCurrentSlideIndex()));
|
|
219
261
|
}
|
|
220
262
|
}
|
|
221
263
|
/**
|
|
@@ -324,13 +366,13 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
324
366
|
* Computes the left offset to shift the slides container.
|
|
325
367
|
*/
|
|
326
368
|
getCarouselSlidesOffsetLeft() {
|
|
327
|
-
return -1 * this.carouselContainerElement?.nativeElement.offsetWidth * this.getCurrentItemIndex();
|
|
369
|
+
return -1 * this.carouselContainerElement()?.nativeElement.offsetWidth * this.getCurrentItemIndex();
|
|
328
370
|
}
|
|
329
371
|
/**
|
|
330
372
|
* Computes the right offset to shift the slides container (same logic as left in RTL).
|
|
331
373
|
*/
|
|
332
374
|
getCarouselSlidesOffsetRight() {
|
|
333
|
-
return -1 * this.carouselContainerElement?.nativeElement.offsetWidth * this.getCurrentItemIndex();
|
|
375
|
+
return -1 * this.carouselContainerElement()?.nativeElement.offsetWidth * this.getCurrentItemIndex();
|
|
334
376
|
}
|
|
335
377
|
/**
|
|
336
378
|
* Subscribes to RTL layout state changes to adapt carousel behavior.
|
|
@@ -368,13 +410,13 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
368
410
|
* Initializes slides, hidden buffer items, and sets default active slide.
|
|
369
411
|
*/
|
|
370
412
|
initializeSlider() {
|
|
371
|
-
this.slides.forEach((item, idx) => {
|
|
413
|
+
this.slides().forEach((item, idx) => {
|
|
372
414
|
this.initSlide(item, idx);
|
|
373
415
|
});
|
|
374
416
|
if (this.hasControls()) {
|
|
375
417
|
this.initHiddenItems();
|
|
376
418
|
if (this.isNoSlideSelected()) {
|
|
377
|
-
this.activateSlide(this.slides.
|
|
419
|
+
this.activateSlide(this.slides().at(0), false);
|
|
378
420
|
}
|
|
379
421
|
}
|
|
380
422
|
}
|
|
@@ -382,22 +424,22 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
382
424
|
* Initializes hidden first and last slide clones used for infinite scroll illusion.
|
|
383
425
|
*/
|
|
384
426
|
initHiddenItems() {
|
|
385
|
-
this.firstHiddenItem.el.nativeElement.innerHTML = this.getLastContentChild();
|
|
386
|
-
this.firstHiddenItem.isCurrent = false;
|
|
387
|
-
this.lastHiddenItem.el.nativeElement.innerHTML = this.getFirstContentChild();
|
|
388
|
-
this.lastHiddenItem.isCurrent = false;
|
|
389
|
-
this.unsubscribeListener = this.renderer2.listen(this.slidesContainer.nativeElement, 'transitionend', () => this.checkIndex());
|
|
427
|
+
this.firstHiddenItem().el.nativeElement.innerHTML = this.getLastContentChild();
|
|
428
|
+
this.firstHiddenItem().isCurrent = false;
|
|
429
|
+
this.lastHiddenItem().el.nativeElement.innerHTML = this.getFirstContentChild();
|
|
430
|
+
this.lastHiddenItem().isCurrent = false;
|
|
431
|
+
this.unsubscribeListener = this.renderer2.listen(this.slidesContainer().nativeElement, 'transitionend', () => this.checkIndex());
|
|
390
432
|
}
|
|
391
433
|
/**
|
|
392
434
|
* Verifies current index and resets to actual slide if hidden clone is reached.
|
|
393
435
|
*/
|
|
394
436
|
checkIndex() {
|
|
395
437
|
if (this.getCurrentItemIndex() === this.getAllSlidesCount() - 1) {
|
|
396
|
-
const item = this.slides.
|
|
438
|
+
const item = this.slides().at(0);
|
|
397
439
|
this.activateSlide(item, false);
|
|
398
440
|
}
|
|
399
441
|
else if (this.getCurrentItemIndex() === 0) {
|
|
400
|
-
const item = this.slides.
|
|
442
|
+
const item = this.slides().at(-1);
|
|
401
443
|
this.activateSlide(item, false);
|
|
402
444
|
}
|
|
403
445
|
}
|
|
@@ -405,13 +447,13 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
405
447
|
* Returns the inner HTML of the last real slide (used for buffer item).
|
|
406
448
|
*/
|
|
407
449
|
getLastContentChild() {
|
|
408
|
-
return this.getSlidesCount() > 0 ? this.slides.
|
|
450
|
+
return this.getSlidesCount() > 0 ? this.slides().at(this.getSlidesCount() - 1).el.nativeElement.innerHTML : '';
|
|
409
451
|
}
|
|
410
452
|
/**
|
|
411
453
|
* Returns the inner HTML of the first real slide (used for buffer item).
|
|
412
454
|
*/
|
|
413
455
|
getFirstContentChild() {
|
|
414
|
-
return this.getSlidesCount() > 0 ? this.slides.
|
|
456
|
+
return this.getSlidesCount() > 0 ? this.slides().at(0).el.nativeElement.innerHTML : '';
|
|
415
457
|
}
|
|
416
458
|
/**
|
|
417
459
|
* Sets up a slide with index and ARIA label.
|
|
@@ -419,8 +461,9 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
419
461
|
initSlide(item, idx) {
|
|
420
462
|
item.index = idx;
|
|
421
463
|
item.ariaLabel = `slide ${idx + 1} of ${this.getSlidesCount()}`;
|
|
422
|
-
|
|
423
|
-
|
|
464
|
+
const banner = item.banner();
|
|
465
|
+
if (banner) {
|
|
466
|
+
banner.skipHeightManagement = true;
|
|
424
467
|
}
|
|
425
468
|
}
|
|
426
469
|
/**
|
|
@@ -453,14 +496,14 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
453
496
|
}
|
|
454
497
|
this.cd.detectChanges();
|
|
455
498
|
if (withTransition) {
|
|
456
|
-
this.slide.emit(new EclSlideEvent(this.slides.
|
|
499
|
+
this.slide.emit(new EclSlideEvent(this.slides().at(this.getCurrentSlideIndex())));
|
|
457
500
|
}
|
|
458
501
|
}
|
|
459
502
|
/**
|
|
460
503
|
* Checks if the currently focused button is the last in the list.
|
|
461
504
|
*/
|
|
462
505
|
isLastButton(index) {
|
|
463
|
-
const buttonsList = this.navigationButtons;
|
|
506
|
+
const buttonsList = this.navigationButtons();
|
|
464
507
|
return index + 1 >= buttonsList.length;
|
|
465
508
|
}
|
|
466
509
|
/**
|
|
@@ -514,18 +557,18 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
514
557
|
return this.getAllSlidesArray()[this.getAllSlidesCount() - 1];
|
|
515
558
|
}
|
|
516
559
|
else {
|
|
517
|
-
return this.slides.
|
|
560
|
+
return this.slides().at(-1);
|
|
518
561
|
}
|
|
519
562
|
}
|
|
520
563
|
else {
|
|
521
|
-
return this.slides.
|
|
564
|
+
return this.slides().at(currentIndex + 1);
|
|
522
565
|
}
|
|
523
566
|
}
|
|
524
567
|
/**
|
|
525
568
|
* Returns all slides, including the hidden buffer items.
|
|
526
569
|
*/
|
|
527
570
|
getAllSlidesArray() {
|
|
528
|
-
return [...[this.firstHiddenItem], ...this.slides
|
|
571
|
+
return [...[this.firstHiddenItem()], ...this.slides(), ...[this.lastHiddenItem()]];
|
|
529
572
|
}
|
|
530
573
|
/**
|
|
531
574
|
* Retrieves the previous slide based on the current index and loop setting.
|
|
@@ -537,35 +580,35 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
537
580
|
return this.getAllSlidesArray()[0];
|
|
538
581
|
}
|
|
539
582
|
else {
|
|
540
|
-
return this.slides.
|
|
583
|
+
return this.slides().at(0);
|
|
541
584
|
}
|
|
542
585
|
}
|
|
543
586
|
else {
|
|
544
|
-
return this.slides.
|
|
587
|
+
return this.slides().at(currentIndex - 1);
|
|
545
588
|
}
|
|
546
589
|
}
|
|
547
590
|
/**
|
|
548
591
|
* Returns the number of actual visible slides (excluding hidden buffer).
|
|
549
592
|
*/
|
|
550
593
|
getSlidesCount() {
|
|
551
|
-
return this.slides.length;
|
|
594
|
+
return this.slides().length;
|
|
552
595
|
}
|
|
553
596
|
/**
|
|
554
597
|
* Returns total number of slides, including buffer (hidden) items.
|
|
555
598
|
*/
|
|
556
599
|
getAllSlidesCount() {
|
|
557
600
|
if (this.hasControls()) {
|
|
558
|
-
return this.slides.length + 2;
|
|
601
|
+
return this.slides().length + 2;
|
|
559
602
|
}
|
|
560
603
|
else {
|
|
561
|
-
return this.slides.length;
|
|
604
|
+
return this.slides().length;
|
|
562
605
|
}
|
|
563
606
|
}
|
|
564
607
|
/**
|
|
565
608
|
* Determines whether no slide is currently marked as active.
|
|
566
609
|
*/
|
|
567
610
|
isNoSlideSelected() {
|
|
568
|
-
return !this.slides.some((item) => item.isCurrent);
|
|
611
|
+
return !this.slides().some((item) => item.isCurrent);
|
|
569
612
|
}
|
|
570
613
|
/**
|
|
571
614
|
* Handles right arrow key navigation for buttons.
|
|
@@ -573,7 +616,7 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
573
616
|
onNavigationButtonArrowRight(e) {
|
|
574
617
|
setTimeout(() => {
|
|
575
618
|
this.goToNextSlide(false);
|
|
576
|
-
const button = this.navigationButtons.
|
|
619
|
+
const button = this.navigationButtons().at(this.getCurrentSlideIndex());
|
|
577
620
|
this.focusOnButton(button);
|
|
578
621
|
}, this.TIMEOUT_INTERVAL);
|
|
579
622
|
e.preventDefault();
|
|
@@ -583,17 +626,19 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
583
626
|
*/
|
|
584
627
|
onNavigationButtonArrowLeft(e, index) {
|
|
585
628
|
if (this.isFirstButton(index)) {
|
|
586
|
-
|
|
587
|
-
|
|
629
|
+
const playButton = this.playButton();
|
|
630
|
+
if (playButton) {
|
|
631
|
+
this.focusOnButton(playButton);
|
|
588
632
|
}
|
|
589
|
-
|
|
590
|
-
|
|
633
|
+
const pauseButton = this.pauseButton();
|
|
634
|
+
if (pauseButton) {
|
|
635
|
+
this.focusOnButton(pauseButton);
|
|
591
636
|
}
|
|
592
637
|
}
|
|
593
638
|
else {
|
|
594
639
|
setTimeout(() => {
|
|
595
640
|
this.goToPreviousSlide(false);
|
|
596
|
-
const button = this.navigationButtons.
|
|
641
|
+
const button = this.navigationButtons().at(this.getCurrentSlideIndex());
|
|
597
642
|
this.focusOnButton(button);
|
|
598
643
|
}, this.TIMEOUT_INTERVAL);
|
|
599
644
|
e.preventDefault();
|
|
@@ -647,13 +692,14 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
647
692
|
*/
|
|
648
693
|
checkBannerHeights() {
|
|
649
694
|
// First, let each banner calculate its own height (like ECL's bannerInstance.setHeight(ratio))
|
|
650
|
-
this.slides.forEach((slide) => {
|
|
651
|
-
|
|
652
|
-
|
|
695
|
+
this.slides().forEach((slide) => {
|
|
696
|
+
const banner = slide.banner();
|
|
697
|
+
if (banner) {
|
|
698
|
+
banner.calculateHeight();
|
|
653
699
|
}
|
|
654
700
|
});
|
|
655
|
-
const heightValues = this.slides.map((slide) => {
|
|
656
|
-
const el = slide.banner?.el.nativeElement;
|
|
701
|
+
const heightValues = this.slides().map((slide) => {
|
|
702
|
+
const el = slide.banner()?.el.nativeElement;
|
|
657
703
|
if (!el)
|
|
658
704
|
return undefined;
|
|
659
705
|
const styleHeight = el.style.height;
|
|
@@ -668,9 +714,10 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
668
714
|
});
|
|
669
715
|
const elementHeights = heightValues.filter((h) => h !== undefined);
|
|
670
716
|
const tallestElementHeight = Math.max(...elementHeights);
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
717
|
+
const slides = this.slides();
|
|
718
|
+
if (tallestElementHeight > 1 && elementHeights.length === slides.length) {
|
|
719
|
+
slides.forEach((slide) => {
|
|
720
|
+
const banner = slide.banner();
|
|
674
721
|
if (!banner)
|
|
675
722
|
return;
|
|
676
723
|
const el = banner.el.nativeElement;
|
|
@@ -692,8 +739,8 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
692
739
|
* Clears all explicit banner height and aspect ratio styling for smaller breakpoints.
|
|
693
740
|
*/
|
|
694
741
|
resetHeight() {
|
|
695
|
-
this.slides.forEach((slide) => {
|
|
696
|
-
const banner = slide.banner;
|
|
742
|
+
this.slides().forEach((slide) => {
|
|
743
|
+
const banner = slide.banner();
|
|
697
744
|
if (banner) {
|
|
698
745
|
const bannerImage = banner.eclBannerImage;
|
|
699
746
|
const bannerVideo = banner.eclBannerVideo;
|
|
@@ -714,12 +761,12 @@ class EclCarouselComponent extends ECLBaseDirective {
|
|
|
714
761
|
*/
|
|
715
762
|
resetHiddenItems() {
|
|
716
763
|
if (this.hasControls()) {
|
|
717
|
-
this.firstHiddenItem.el.nativeElement.innerHTML = this.getLastContentChild();
|
|
718
|
-
this.lastHiddenItem.el.nativeElement.innerHTML = this.getFirstContentChild();
|
|
764
|
+
this.firstHiddenItem().el.nativeElement.innerHTML = this.getLastContentChild();
|
|
765
|
+
this.lastHiddenItem().el.nativeElement.innerHTML = this.getFirstContentChild();
|
|
719
766
|
}
|
|
720
767
|
}
|
|
721
768
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
722
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclCarouselComponent, isStandalone: true, selector: "ecl-carousel", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, isAutoplay: { classPropertyName: "isAutoplay", publicName: "isAutoplay", isSignal: true, isRequired: false, transformFunction: null }, playInterval: { classPropertyName: "playInterval", publicName: "playInterval", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { slide: "slide" }, host: { properties: { "attr.aria-label": "ariaLabel()", "attr.aria-roledescription": "\"carousel\"", "class": "cssClasses" } }, queries: [{ propertyName: "slides", predicate: i0.forwardRef(() => EclCarouselItemComponent) }], viewQueries: [{ propertyName: "carouselContainerElement", first: true, predicate: ["carouselContainer"], descendants: true }, { propertyName: "
|
|
769
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclCarouselComponent, isStandalone: true, selector: "ecl-carousel", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, isAutoplay: { classPropertyName: "isAutoplay", publicName: "isAutoplay", isSignal: true, isRequired: false, transformFunction: null }, playInterval: { classPropertyName: "playInterval", publicName: "playInterval", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { slide: "slide" }, host: { properties: { "attr.aria-label": "ariaLabel()", "attr.aria-roledescription": "\"carousel\"", "class": "cssClasses" } }, queries: [{ propertyName: "slides", predicate: i0.forwardRef(() => EclCarouselItemComponent), isSignal: true }], viewQueries: [{ propertyName: "carouselContainerElement", first: true, predicate: ["carouselContainer"], descendants: true, isSignal: true }, { propertyName: "navigationButtons", predicate: ["currButton"], descendants: true, isSignal: true }, { propertyName: "playButton", first: true, predicate: ["playButton"], descendants: true, isSignal: true }, { propertyName: "pauseButton", first: true, predicate: ["pauseButton"], descendants: true, isSignal: true }, { propertyName: "firstHiddenItem", first: true, predicate: ["firstHiddenItem"], descendants: true, isSignal: true }, { propertyName: "lastHiddenItem", first: true, predicate: ["lastHiddenItem"], descendants: true, isSignal: true }, { propertyName: "slidesContainer", first: true, predicate: ["slidesContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if(hasControls()){\n<div class=\"ecl-carousel__controls\">\n <div class=\"ecl-container\">\n <div class=\"ecl-carousel__autoplay\">\n <button #playButton class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-carousel__play ecl-button--icon-only\"\n type=\"button\" [style.display]=\"isPlaying ? 'none' : 'flex'\" (keydown)=\"onPlayKeyboardPress($event)\"\n (click)=\"onPlayClick()\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.carousel.PLAY' | translate }}\n </span>\n <ecl-icon icon=\"play-outline\" size=\"m\" class=\"ecl-button__icon ecl-carousel__icon-default\">\n </ecl-icon>\n </span>\n </button>\n\n <button #pauseButton class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-carousel__pause ecl-button--icon-only\"\n type=\"button\" [style.display]=\"isPlaying ? 'flex' : 'none'\" (keydown)=\"onPlayKeyboardPress($event)\"\n (click)=\"onPauseClick()\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.carousel.PAUSE' | translate }}\n </span>\n <ecl-icon icon=\"pause-outline\" size=\"m\" class=\"ecl-button__icon ecl-carousel__icon-default\"> </ecl-icon>\n </span>\n\n </button>\n </div>\n\n <div class=\"ecl-carousel__navigation\" role=\"tablist\" >\n @for (slide of slides(); let i = $index; track slide) {\n <button #currButton [attr.aria-current]=\"i === getCurrentSlideIndex()\" [attr.tabindex]=\"i === getCurrentSlideIndex() ? null: -1\"\n class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-carousel__navigation-item\" role=\"tab\" (click)=\"onSlideControlClick(slide)\"\n (keydown)=\"onNavBtnKeyboardPress($event, i)\">\n {{ i + 1 }}\n </button>\n }\n </div>\n </div>\n</div>\n}\n<div #carouselContainer class=\"ecl-carousel__container\" [class.ecl-carousel-container--padded]=\"isPadded()\">\n <div #slidesContainer (keyup)=\"onFirstCarouselElementPress($event)\" class=\"ecl-carousel__slides\"\n [style.left.px]=\"!isRtl ? getCarouselSlidesOffsetLeft() : null\"\n [style.right.px]=\"isRtl ? getCarouselSlidesOffsetRight() : null\"\n [style.transition-duration.s]=\"transitionDuration\" (mouseover)=\"onSlideHover()\" (mouseout)=\"onSlideHoverout()\">\n\n @if(hasControls()){\n <ecl-carousel-item #firstHiddenItem></ecl-carousel-item>\n }\n <ng-content></ng-content>\n\n @if(hasControls()){\n <ecl-carousel-item #lastHiddenItem></ecl-carousel-item>\n }\n </div>\n</div>\n", styles: [".ecl-carousel__slides{transition-duration:.4s}\n"], dependencies: [{ kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { kind: "component", type: EclCarouselItemComponent, selector: "ecl-carousel-item", inputs: ["id", "isCurrent"], outputs: ["slideClick"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
723
770
|
}
|
|
724
771
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclCarouselComponent, decorators: [{
|
|
725
772
|
type: Component,
|
|
@@ -731,32 +778,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
731
778
|
'[attr.aria-label]': 'ariaLabel()',
|
|
732
779
|
'[attr.aria-roledescription]': '"carousel"',
|
|
733
780
|
'[class]': 'cssClasses',
|
|
734
|
-
}, template: "@if(hasControls()){\n<div class=\"ecl-carousel__controls\">\n <div class=\"ecl-container\">\n <div class=\"ecl-carousel__autoplay\">\n <button #playButton class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-carousel__play ecl-button--icon-only\"\n type=\"button\" [style.display]=\"isPlaying ? 'none' : 'flex'\" (keydown)=\"onPlayKeyboardPress($event)\"\n (click)=\"onPlayClick()\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.carousel.PLAY' | translate }}\n </span>\n <ecl-icon icon=\"play-outline\" size=\"m\" class=\"ecl-button__icon ecl-carousel__icon-default\">\n </ecl-icon>\n </span>\n </button>\n\n <button #pauseButton class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-carousel__pause ecl-button--icon-only\"\n type=\"button\" [style.display]=\"isPlaying ? 'flex' : 'none'\" (keydown)=\"onPlayKeyboardPress($event)\"\n (click)=\"onPauseClick()\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.carousel.PAUSE' | translate }}\n </span>\n <ecl-icon icon=\"pause-outline\" size=\"m\" class=\"ecl-button__icon ecl-carousel__icon-default\"> </ecl-icon>\n </span>\n\n </button>\n </div>\n\n <div class=\"ecl-carousel__navigation\" role=\"tablist\" >\n @for (slide of slides; let i = $index; track slide) {\n <button #currButton [attr.aria-current]=\"i === getCurrentSlideIndex()\" [attr.tabindex]=\"i === getCurrentSlideIndex() ? null: -1\"\n class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-carousel__navigation-item\" role=\"tab\" (click)=\"onSlideControlClick(slide)\"\n (keydown)=\"onNavBtnKeyboardPress($event, i)\">\n {{ i + 1 }}\n </button>\n }\n </div>\n </div>\n</div>\n}\n<div #carouselContainer class=\"ecl-carousel__container\" [class.ecl-carousel-container--padded]=\"isPadded()\">\n <div #slidesContainer (keyup)=\"onFirstCarouselElementPress($event)\" class=\"ecl-carousel__slides\"\n [style.left.px]=\"!isRtl ? getCarouselSlidesOffsetLeft() : null\"\n [style.right.px]=\"isRtl ? getCarouselSlidesOffsetRight() : null\"\n [style.transition-duration.s]=\"transitionDuration\" (mouseover)=\"onSlideHover()\" (mouseout)=\"onSlideHoverout()\">\n\n @if(hasControls()){\n <ecl-carousel-item #firstHiddenItem></ecl-carousel-item>\n }\n <ng-content></ng-content>\n\n @if(hasControls()){\n <ecl-carousel-item #lastHiddenItem></ecl-carousel-item>\n }\n </div>\n</div>\n", styles: [".ecl-carousel__slides{transition-duration:.4s}\n"] }]
|
|
735
|
-
}], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], isAutoplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "isAutoplay", required: false }] }], playInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "playInterval", required: false }] }], slide: [{ type: i0.Output, args: ["slide"] }], carouselContainerElement: [{
|
|
736
|
-
type: ViewChild,
|
|
737
|
-
args: ['carouselContainer']
|
|
738
|
-
}], slides: [{
|
|
739
|
-
type: ContentChildren,
|
|
740
|
-
args: [forwardRef(() => EclCarouselItemComponent)]
|
|
741
|
-
}], navigationButtons: [{
|
|
742
|
-
type: ViewChildren,
|
|
743
|
-
args: ['currButton']
|
|
744
|
-
}], playButton: [{
|
|
745
|
-
type: ViewChild,
|
|
746
|
-
args: ['playButton']
|
|
747
|
-
}], pauseButton: [{
|
|
748
|
-
type: ViewChild,
|
|
749
|
-
args: ['pauseButton']
|
|
750
|
-
}], firstHiddenItem: [{
|
|
751
|
-
type: ViewChild,
|
|
752
|
-
args: ['firstHiddenItem']
|
|
753
|
-
}], lastHiddenItem: [{
|
|
754
|
-
type: ViewChild,
|
|
755
|
-
args: ['lastHiddenItem']
|
|
756
|
-
}], slidesContainer: [{
|
|
757
|
-
type: ViewChild,
|
|
758
|
-
args: ['slidesContainer']
|
|
759
|
-
}] } });
|
|
781
|
+
}, template: "@if(hasControls()){\n<div class=\"ecl-carousel__controls\">\n <div class=\"ecl-container\">\n <div class=\"ecl-carousel__autoplay\">\n <button #playButton class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-carousel__play ecl-button--icon-only\"\n type=\"button\" [style.display]=\"isPlaying ? 'none' : 'flex'\" (keydown)=\"onPlayKeyboardPress($event)\"\n (click)=\"onPlayClick()\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.carousel.PLAY' | translate }}\n </span>\n <ecl-icon icon=\"play-outline\" size=\"m\" class=\"ecl-button__icon ecl-carousel__icon-default\">\n </ecl-icon>\n </span>\n </button>\n\n <button #pauseButton class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-carousel__pause ecl-button--icon-only\"\n type=\"button\" [style.display]=\"isPlaying ? 'flex' : 'none'\" (keydown)=\"onPlayKeyboardPress($event)\"\n (click)=\"onPauseClick()\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.carousel.PAUSE' | translate }}\n </span>\n <ecl-icon icon=\"pause-outline\" size=\"m\" class=\"ecl-button__icon ecl-carousel__icon-default\"> </ecl-icon>\n </span>\n\n </button>\n </div>\n\n <div class=\"ecl-carousel__navigation\" role=\"tablist\" >\n @for (slide of slides(); let i = $index; track slide) {\n <button #currButton [attr.aria-current]=\"i === getCurrentSlideIndex()\" [attr.tabindex]=\"i === getCurrentSlideIndex() ? null: -1\"\n class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-carousel__navigation-item\" role=\"tab\" (click)=\"onSlideControlClick(slide)\"\n (keydown)=\"onNavBtnKeyboardPress($event, i)\">\n {{ i + 1 }}\n </button>\n }\n </div>\n </div>\n</div>\n}\n<div #carouselContainer class=\"ecl-carousel__container\" [class.ecl-carousel-container--padded]=\"isPadded()\">\n <div #slidesContainer (keyup)=\"onFirstCarouselElementPress($event)\" class=\"ecl-carousel__slides\"\n [style.left.px]=\"!isRtl ? getCarouselSlidesOffsetLeft() : null\"\n [style.right.px]=\"isRtl ? getCarouselSlidesOffsetRight() : null\"\n [style.transition-duration.s]=\"transitionDuration\" (mouseover)=\"onSlideHover()\" (mouseout)=\"onSlideHoverout()\">\n\n @if(hasControls()){\n <ecl-carousel-item #firstHiddenItem></ecl-carousel-item>\n }\n <ng-content></ng-content>\n\n @if(hasControls()){\n <ecl-carousel-item #lastHiddenItem></ecl-carousel-item>\n }\n </div>\n</div>\n", styles: [".ecl-carousel__slides{transition-duration:.4s}\n"] }]
|
|
782
|
+
}], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], isAutoplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "isAutoplay", required: false }] }], playInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "playInterval", required: false }] }], slide: [{ type: i0.Output, args: ["slide"] }], carouselContainerElement: [{ type: i0.ViewChild, args: ['carouselContainer', { isSignal: true }] }], slides: [{ type: i0.ContentChildren, args: [forwardRef(() => EclCarouselItemComponent), { isSignal: true }] }], navigationButtons: [{ type: i0.ViewChildren, args: ['currButton', { isSignal: true }] }], playButton: [{ type: i0.ViewChild, args: ['playButton', { isSignal: true }] }], pauseButton: [{ type: i0.ViewChild, args: ['pauseButton', { isSignal: true }] }], firstHiddenItem: [{ type: i0.ViewChild, args: ['firstHiddenItem', { isSignal: true }] }], lastHiddenItem: [{ type: i0.ViewChild, args: ['lastHiddenItem', { isSignal: true }] }], slidesContainer: [{ type: i0.ViewChild, args: ['slidesContainer', { isSignal: true }] }] } });
|
|
760
783
|
|
|
761
784
|
const EUI_ECL_CAROUSEL = [
|
|
762
785
|
EclCarouselComponent,
|