@eui/ecl 23.0.0-alpha.6 → 23.0.0-alpha.7
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 +41 -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 { NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, EventEmitter, inject, Renderer2, booleanAttribute, HostListener, Output,
|
|
3
|
+
import { input, contentChildren, forwardRef, viewChild, EventEmitter, inject, Renderer2, booleanAttribute, HostListener, Output, Input, HostBinding, Component, ElementRef, IterableDiffers, ContentChildren, DOCUMENT, contentChild, afterNextRender, ViewEncapsulation, numberAttribute, output, signal, PLATFORM_ID, ChangeDetectorRef } from '@angular/core';
|
|
4
4
|
import { EuiAppShellService } from '@eui/core';
|
|
5
5
|
import * as i1 from '@eui/ecl/components/ecl-button';
|
|
6
6
|
import { EclButtonComponent, EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';
|
|
@@ -91,6 +91,21 @@ class EclMenuMegaItemComponent extends ECLBaseDirective {
|
|
|
91
91
|
this.isSeeAll = false;
|
|
92
92
|
this.linkExtraAttributes = input(undefined, /* @ts-ignore */
|
|
93
93
|
...(ngDevMode ? [{ debugName: "linkExtraAttributes" }] : /* istanbul ignore next */ []));
|
|
94
|
+
/**
|
|
95
|
+
* If menu item includes any icon, added by the user (for example for 'external' link).
|
|
96
|
+
*/
|
|
97
|
+
this.iconComponents = contentChildren(forwardRef(() => EclIconComponent), /* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [{ debugName: "iconComponents" }] : /* istanbul ignore next */ []));
|
|
99
|
+
/**
|
|
100
|
+
* If menu item includes any links, added by the user.
|
|
101
|
+
*/
|
|
102
|
+
this.links = contentChildren(forwardRef(() => EclLinkDirective), /* @ts-ignore */
|
|
103
|
+
...(ngDevMode ? [{ debugName: "links" }] : /* istanbul ignore next */ []));
|
|
104
|
+
/**
|
|
105
|
+
* The actual link of the menu item.
|
|
106
|
+
*/
|
|
107
|
+
this.megaMenuLink = viewChild('megaMenuLink', /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "megaMenuLink" }] : /* istanbul ignore next */ []));
|
|
94
109
|
this.menuItemSelect = new EventEmitter();
|
|
95
110
|
this.menuItemKeydown = new EventEmitter();
|
|
96
111
|
this.hasChildren = false;
|
|
@@ -100,7 +115,7 @@ class EclMenuMegaItemComponent extends ECLBaseDirective {
|
|
|
100
115
|
}
|
|
101
116
|
ngAfterViewInit() {
|
|
102
117
|
this.manageContentChildren();
|
|
103
|
-
this.setExtraAttributesForLink(this.megaMenuLink?.nativeElement, this.linkExtraAttributes());
|
|
118
|
+
this.setExtraAttributesForLink(this.megaMenuLink()?.nativeElement, this.linkExtraAttributes());
|
|
104
119
|
}
|
|
105
120
|
/**
|
|
106
121
|
*
|
|
@@ -125,7 +140,7 @@ class EclMenuMegaItemComponent extends ECLBaseDirective {
|
|
|
125
140
|
* Focus should be set on the underlying <a> element.
|
|
126
141
|
*/
|
|
127
142
|
onFocus() {
|
|
128
|
-
this.megaMenuLink.nativeElement.focus();
|
|
143
|
+
this.megaMenuLink().nativeElement.focus();
|
|
129
144
|
}
|
|
130
145
|
onKeydown(evt) {
|
|
131
146
|
if (evt.key === KeyCode.ENTER) {
|
|
@@ -137,16 +152,16 @@ class EclMenuMegaItemComponent extends ECLBaseDirective {
|
|
|
137
152
|
* Adds specific classes to content children (icons or links).
|
|
138
153
|
*/
|
|
139
154
|
manageContentChildren() {
|
|
140
|
-
if (this.iconComponents) {
|
|
155
|
+
if (this.iconComponents()) {
|
|
141
156
|
setTimeout(() => {
|
|
142
|
-
this.iconComponents.forEach((icn) => {
|
|
157
|
+
this.iconComponents().forEach((icn) => {
|
|
143
158
|
icn.baseDirective.class = 'ecl-menu__sublink-icon';
|
|
144
159
|
});
|
|
145
160
|
});
|
|
146
161
|
}
|
|
147
|
-
if (this.links) {
|
|
162
|
+
if (this.links()) {
|
|
148
163
|
setTimeout(() => {
|
|
149
|
-
this.links.forEach((icn) => {
|
|
164
|
+
this.links().forEach((icn) => {
|
|
150
165
|
icn.class = icn.class ? icn.class + ' ecl-menu__sublink' : 'ecl-menu__sublink';
|
|
151
166
|
});
|
|
152
167
|
});
|
|
@@ -162,7 +177,7 @@ class EclMenuMegaItemComponent extends ECLBaseDirective {
|
|
|
162
177
|
}
|
|
163
178
|
}
|
|
164
179
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclMenuMegaItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
165
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclMenuMegaItemComponent, isStandalone: true, selector: "ecl-menu-mega-item", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: false, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, isCurrent: { classPropertyName: "isCurrent", publicName: "isCurrent", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, isSeeAll: { classPropertyName: "isSeeAll", publicName: "isSeeAll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, linkExtraAttributes: { classPropertyName: "linkExtraAttributes", publicName: "linkExtraAttributes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemSelect: "menuItemSelect", menuItemKeydown: "menuItemKeydown" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class.ecl-menu__subitem": "this.cmpClass", "attr.role": "this.role", "class.ecl-menu__subitem--current": "this.isCurrent", "class.ecl-menu__see-all": "this.isSeeAll" } }, queries: [{ propertyName: "iconComponents", predicate: i0.forwardRef(() => EclIconComponent) }, { propertyName: "links", predicate: i0.forwardRef(() => EclLinkDirective) }], viewQueries: [{ propertyName: "megaMenuLink", first: true, predicate: ["megaMenuLink"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (!isSeeAll) {\n @if (href) {\n <a #megaMenuLink\n [href]=\"href\"\n [target]=\"target()\"\n class=\"ecl-link ecl-link--standalone ecl-menu__sublink\"\n [class.ecl-menu__sublink--current]=\"isCurrent\"\n [attr.aria-current]=\"ariaCurrent\"\n (click)=\"onItemClick($event)\"\n (keydown)=\"onKeydown($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </a>\n } @else {\n <a #megaMenuLink\n tabindex=\"0\"\n [routerLink]=\"routerLink()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n class=\"ecl-link ecl-link--standalone ecl-menu__sublink\"\n [class.ecl-menu__sublink--current]=\"isCurrent\"\n [attr.aria-current]=\"ariaCurrent\"\n (click)=\"onItemClick($event)\"\n (keydown)=\"onKeydown($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </a>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n}\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:list-item}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] }); }
|
|
180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclMenuMegaItemComponent, isStandalone: true, selector: "ecl-menu-mega-item", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: false, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, isCurrent: { classPropertyName: "isCurrent", publicName: "isCurrent", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, isSeeAll: { classPropertyName: "isSeeAll", publicName: "isSeeAll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, linkExtraAttributes: { classPropertyName: "linkExtraAttributes", publicName: "linkExtraAttributes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemSelect: "menuItemSelect", menuItemKeydown: "menuItemKeydown" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class.ecl-menu__subitem": "this.cmpClass", "attr.role": "this.role", "class.ecl-menu__subitem--current": "this.isCurrent", "class.ecl-menu__see-all": "this.isSeeAll" } }, queries: [{ propertyName: "iconComponents", predicate: i0.forwardRef(() => EclIconComponent), isSignal: true }, { propertyName: "links", predicate: i0.forwardRef(() => EclLinkDirective), isSignal: true }], viewQueries: [{ propertyName: "megaMenuLink", first: true, predicate: ["megaMenuLink"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (!isSeeAll) {\n @if (href) {\n <a #megaMenuLink\n [href]=\"href\"\n [target]=\"target()\"\n class=\"ecl-link ecl-link--standalone ecl-menu__sublink\"\n [class.ecl-menu__sublink--current]=\"isCurrent\"\n [attr.aria-current]=\"ariaCurrent\"\n (click)=\"onItemClick($event)\"\n (keydown)=\"onKeydown($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </a>\n } @else {\n <a #megaMenuLink\n tabindex=\"0\"\n [routerLink]=\"routerLink()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n class=\"ecl-link ecl-link--standalone ecl-menu__sublink\"\n [class.ecl-menu__sublink--current]=\"isCurrent\"\n [attr.aria-current]=\"ariaCurrent\"\n (click)=\"onItemClick($event)\"\n (keydown)=\"onKeydown($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </a>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n}\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:list-item}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] }); }
|
|
166
181
|
}
|
|
167
182
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclMenuMegaItemComponent, decorators: [{
|
|
168
183
|
type: Component,
|
|
@@ -191,16 +206,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
191
206
|
}, {
|
|
192
207
|
type: HostBinding,
|
|
193
208
|
args: ['class.ecl-menu__see-all']
|
|
194
|
-
}], linkExtraAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkExtraAttributes", required: false }] }], iconComponents: [{
|
|
195
|
-
type: ContentChildren,
|
|
196
|
-
args: [forwardRef(() => EclIconComponent)]
|
|
197
|
-
}], links: [{
|
|
198
|
-
type: ContentChildren,
|
|
199
|
-
args: [forwardRef(() => EclLinkDirective)]
|
|
200
|
-
}], megaMenuLink: [{
|
|
201
|
-
type: ViewChild,
|
|
202
|
-
args: ['megaMenuLink']
|
|
203
|
-
}], menuItemSelect: [{
|
|
209
|
+
}], linkExtraAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkExtraAttributes", required: false }] }], iconComponents: [{ type: i0.ContentChildren, args: [forwardRef(() => EclIconComponent), { isSignal: true }] }], links: [{ type: i0.ContentChildren, args: [forwardRef(() => EclLinkDirective), { isSignal: true }] }], megaMenuLink: [{ type: i0.ViewChild, args: ['megaMenuLink', { isSignal: true }] }], menuItemSelect: [{
|
|
204
210
|
type: Output
|
|
205
211
|
}], menuItemKeydown: [{
|
|
206
212
|
type: Output
|
|
@@ -398,10 +404,10 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
398
404
|
return this.isCurrent ? true : null;
|
|
399
405
|
}
|
|
400
406
|
get hasChildren() {
|
|
401
|
-
return !!this.submenu;
|
|
407
|
+
return !!this.submenu();
|
|
402
408
|
}
|
|
403
409
|
get children() {
|
|
404
|
-
return this.hasChildren ? this.submenu.eclMenuMegaItems.toArray() : [];
|
|
410
|
+
return this.hasChildren ? this.submenu().eclMenuMegaItems.toArray() : [];
|
|
405
411
|
}
|
|
406
412
|
constructor() {
|
|
407
413
|
super();
|
|
@@ -439,6 +445,18 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
439
445
|
this.isVisible = true;
|
|
440
446
|
this.doc = inject(DOCUMENT);
|
|
441
447
|
this.window = this.doc.defaultView; // Window | null
|
|
448
|
+
this.submenu = contentChild(forwardRef(() => EclMenuMegaComponent), /* @ts-ignore */
|
|
449
|
+
...(ngDevMode ? [{ debugName: "submenu" }] : /* istanbul ignore next */ []));
|
|
450
|
+
/**
|
|
451
|
+
* The <a> element of the menu item, when there are no children.
|
|
452
|
+
*/
|
|
453
|
+
this.menuLink = viewChild('menuLink', /* @ts-ignore */
|
|
454
|
+
...(ngDevMode ? [{ debugName: "menuLink" }] : /* istanbul ignore next */ []));
|
|
455
|
+
/**
|
|
456
|
+
* The <button> element of the menu item, when item has children.
|
|
457
|
+
*/
|
|
458
|
+
this.menuButton = viewChild(EclButtonComponent, /* @ts-ignore */
|
|
459
|
+
...(ngDevMode ? [{ debugName: "menuButton" }] : /* istanbul ignore next */ []));
|
|
442
460
|
this.menuItemSelect = new EventEmitter();
|
|
443
461
|
this.menuItemCaret = new EventEmitter();
|
|
444
462
|
/**
|
|
@@ -459,7 +477,7 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
459
477
|
this.appShell = inject(EuiAppShellService);
|
|
460
478
|
afterNextRender(() => {
|
|
461
479
|
this.observeBreakpointChanges();
|
|
462
|
-
this.setExtraAttributesForLink(this.menuLink?.nativeElement, this.linkExtraAttributes());
|
|
480
|
+
this.setExtraAttributesForLink(this.menuLink()?.nativeElement, this.linkExtraAttributes());
|
|
463
481
|
});
|
|
464
482
|
}
|
|
465
483
|
onItemMouseEnter(evt) {
|
|
@@ -474,16 +492,17 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
474
492
|
}
|
|
475
493
|
ngAfterContentInit() {
|
|
476
494
|
// Subscibe to submenu component events.
|
|
477
|
-
|
|
478
|
-
|
|
495
|
+
const submenu = this.submenu();
|
|
496
|
+
if (submenu) {
|
|
497
|
+
submenu.menuItemSelect.pipe(takeUntil(this.destroy$)).subscribe((it) => {
|
|
479
498
|
this.menuMegaItemSelect.next(new EclMenuItemSelectEvent(it.menuItem, it.domEvent));
|
|
480
499
|
});
|
|
481
|
-
|
|
500
|
+
submenu.menuMegaItemParentFocus.pipe(takeUntil(this.destroy$)).subscribe((it) => {
|
|
482
501
|
if (!this.isMobileBreakpoint) {
|
|
483
502
|
this.onFocusFromSubmenu();
|
|
484
503
|
}
|
|
485
504
|
});
|
|
486
|
-
|
|
505
|
+
submenu.menuMegaLastItemTab.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
487
506
|
if (this.isMobileBreakpoint) {
|
|
488
507
|
this.menuMegaLastItemTab.next();
|
|
489
508
|
}
|
|
@@ -527,7 +546,7 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
527
546
|
* the next root menu item.
|
|
528
547
|
*/
|
|
529
548
|
onFocusFromNext() {
|
|
530
|
-
if (this.menuButton) {
|
|
549
|
+
if (this.menuButton()) {
|
|
531
550
|
this.onButtonFocus();
|
|
532
551
|
}
|
|
533
552
|
else {
|
|
@@ -642,7 +661,7 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
642
661
|
if (maxLines < 1)
|
|
643
662
|
return;
|
|
644
663
|
const currentItem = this.el.nativeElement;
|
|
645
|
-
const currentLink = this.menuLink.nativeElement;
|
|
664
|
+
const currentLink = this.menuLink().nativeElement;
|
|
646
665
|
if (isMobileBreakpoint) {
|
|
647
666
|
this.renderer.setStyle(currentLink, 'width', '100%');
|
|
648
667
|
return;
|
|
@@ -656,22 +675,23 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
656
675
|
this.renderer.removeStyle(currentItem, 'alignItems');
|
|
657
676
|
}
|
|
658
677
|
onLinkEscape(evt) {
|
|
659
|
-
|
|
660
|
-
|
|
678
|
+
const menuButton = this.menuButton();
|
|
679
|
+
if (menuButton) {
|
|
680
|
+
menuButton.el.nativeElement.focus();
|
|
661
681
|
evt.stopPropagation();
|
|
662
682
|
}
|
|
663
683
|
else {
|
|
664
|
-
this.menuLink.nativeElement.blur();
|
|
684
|
+
this.menuLink().nativeElement.blur();
|
|
665
685
|
}
|
|
666
686
|
}
|
|
667
687
|
selectFirstMegaMenuItem() {
|
|
668
|
-
this.submenu.selectFirstSubItem();
|
|
688
|
+
this.submenu().selectFirstSubItem();
|
|
669
689
|
}
|
|
670
690
|
onLinkFocus() {
|
|
671
|
-
this.menuLink.nativeElement.focus();
|
|
691
|
+
this.menuLink().nativeElement.focus();
|
|
672
692
|
}
|
|
673
693
|
onLinkNextFocus(evt) {
|
|
674
|
-
if (this.menuButton) {
|
|
694
|
+
if (this.menuButton()) {
|
|
675
695
|
this.onButtonFocus();
|
|
676
696
|
}
|
|
677
697
|
else {
|
|
@@ -679,7 +699,7 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
679
699
|
}
|
|
680
700
|
}
|
|
681
701
|
onButtonFocus() {
|
|
682
|
-
this.menuButton.el.nativeElement.focus();
|
|
702
|
+
this.menuButton().el.nativeElement.focus();
|
|
683
703
|
}
|
|
684
704
|
getMenuItemLinkMaxHeight(linkStyle, maxLines) {
|
|
685
705
|
return parseInt(linkStyle.lineHeight, 10) * maxLines + parseInt(linkStyle.paddingTop, 10) + parseInt(linkStyle.paddingBottom, 10);
|
|
@@ -715,13 +735,13 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
715
735
|
}
|
|
716
736
|
getClassDependingChildrenCnt() {
|
|
717
737
|
if (this.hasChildren) {
|
|
718
|
-
if (this.submenu.eclMenuMegaItems.length < 5 /* ColTrigger.COL1_TRIGGER */) {
|
|
738
|
+
if (this.submenu().eclMenuMegaItems.length < 5 /* ColTrigger.COL1_TRIGGER */) {
|
|
719
739
|
return 'ecl-menu__item--col1';
|
|
720
740
|
}
|
|
721
|
-
else if (this.submenu.eclMenuMegaItems.length < 9 /* ColTrigger.COL2_TRIGGER */) {
|
|
741
|
+
else if (this.submenu().eclMenuMegaItems.length < 9 /* ColTrigger.COL2_TRIGGER */) {
|
|
722
742
|
return 'ecl-menu__item--col2';
|
|
723
743
|
}
|
|
724
|
-
else if (this.submenu.eclMenuMegaItems.length < 13 /* ColTrigger.COL3_TRIGGER */) {
|
|
744
|
+
else if (this.submenu().eclMenuMegaItems.length < 13 /* ColTrigger.COL3_TRIGGER */) {
|
|
725
745
|
return 'ecl-menu__item--col3';
|
|
726
746
|
}
|
|
727
747
|
else {
|
|
@@ -732,7 +752,8 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
732
752
|
return '';
|
|
733
753
|
}
|
|
734
754
|
hasSubmenuAnySelections() {
|
|
735
|
-
|
|
755
|
+
const submenu = this.submenu();
|
|
756
|
+
return submenu && !!submenu.eclMenuMegaItems.find((it) => it.isCurrent);
|
|
736
757
|
}
|
|
737
758
|
setExtraAttributesForLink(link, linkExtraAttributes) {
|
|
738
759
|
if (linkExtraAttributes) {
|
|
@@ -752,12 +773,12 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
752
773
|
});
|
|
753
774
|
}
|
|
754
775
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
755
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclMenuItemComponent, isStandalone: true, selector: "ecl-menu-item", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, toggleAriaLabel: { classPropertyName: "toggleAriaLabel", publicName: "toggleAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: false, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, isCurrent: { classPropertyName: "isCurrent", publicName: "isCurrent", isSignal: false, isRequired: false, transformFunction: null }, linkExtraAttributes: { classPropertyName: "linkExtraAttributes", publicName: "linkExtraAttributes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemSelect: "menuItemSelect", menuItemCaret: "menuItemCaret", menuItemHover: "menuItemHover", menuItemHoverOut: "menuItemHoverOut", menuMegaItemSelect: "menuMegaItemSelect", menuItemFocus: "menuItemFocus", menuItemKeydown: "menuItemKeydown", menuMegaLastItemTab: "menuMegaLastItemTab" }, host: { attributes: { "role": "listitem" }, listeners: { "mouseenter": "onItemMouseEnter($event)", "mouseleave": "onItemMouseLeave($event)" }, properties: { "class": "cssClasses", "class.ecl-menu__item--has-children": "hasEclChildrenDataAttribute", "attr.aria-haspopup": "hasEclChildrenDataAttribute", "attr.data-expanded": "isDataExpanded" } }, queries: [{ propertyName: "submenu", first: true, predicate: i0.forwardRef(() => EclMenuMegaComponent), descendants: true }], viewQueries: [{ propertyName: "menuLink", first: true, predicate: ["menuLink"], descendants: true }, { propertyName: "menuButton", first: true, predicate: EclButtonComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (href) {\n <a eclLink\n #menuLink\n variant=\"standalone\"\n [href]=\"href\"\n [target]=\"target()\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n [attr.aria-current]=\"ariaCurrent\"\n (focus)=\"onItemFocus($event)\"\n (click)=\"onItemClick($event)\"\n (keydown)=\"onLinkKeydown($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </a>\n} @else {\n <a eclLink\n #menuLink\n variant=\"standalone\"\n [attr.tabindex]=\"tabindex || 0\"\n [routerLink]=\"routerLink()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n [attr.aria-current]=\"ariaCurrent\"\n (focus)=\"onItemFocus($event)\"\n (click)=\"onItemClick($event)\"\n (keydown)=\"onLinkKeydown($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </a>\n}\n\n@if (hasChildren) {\n @if (isMobileBreakpoint) {\n <button\n eclButton\n variant=\"tertiary\"\n class=\"ecl-menu__button-caret ecl-button--neutral\"\n type=\"button\"\n [attr.aria-label]=\"toggleAriaLabel() || 'Access item children'\"\n (click)=\"onItemCaretClick($event)\"\n (keydown)=\"onButtonKeydown($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"m\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n </button>\n } @else {\n <button\n eclButton\n variant=\"tertiary\"\n class=\"ecl-menu__button-caret ecl-button--neutral\"\n type=\"button\"\n [attr.aria-label]=\"toggleAriaLabel() || 'Access item children'\"\n [attr.data-expanded]=\"isDataExpanded\"\n (keydown)=\"onButtonKeydown($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"m\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n </button>\n }\n}\n\n<ng-content select=\"ecl-menu-mega\"></ng-content>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: i1.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "eclStyle", "size", "containerStyleClass"] }, { kind: "component", type: i2.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { kind: "directive", type: i3.EclLinkDirective, selector: "[eclLink]", inputs: ["extraAttributes", "isInverted", "isIconOnly", "isHighlight", "isNoVisited", "isBranded", "variant"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
776
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclMenuItemComponent, isStandalone: true, selector: "ecl-menu-item", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, toggleAriaLabel: { classPropertyName: "toggleAriaLabel", publicName: "toggleAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: false, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, isCurrent: { classPropertyName: "isCurrent", publicName: "isCurrent", isSignal: false, isRequired: false, transformFunction: null }, linkExtraAttributes: { classPropertyName: "linkExtraAttributes", publicName: "linkExtraAttributes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemSelect: "menuItemSelect", menuItemCaret: "menuItemCaret", menuItemHover: "menuItemHover", menuItemHoverOut: "menuItemHoverOut", menuMegaItemSelect: "menuMegaItemSelect", menuItemFocus: "menuItemFocus", menuItemKeydown: "menuItemKeydown", menuMegaLastItemTab: "menuMegaLastItemTab" }, host: { attributes: { "role": "listitem" }, listeners: { "mouseenter": "onItemMouseEnter($event)", "mouseleave": "onItemMouseLeave($event)" }, properties: { "class": "cssClasses", "class.ecl-menu__item--has-children": "hasEclChildrenDataAttribute", "attr.aria-haspopup": "hasEclChildrenDataAttribute", "attr.data-expanded": "isDataExpanded" } }, queries: [{ propertyName: "submenu", first: true, predicate: i0.forwardRef(() => EclMenuMegaComponent), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "menuLink", first: true, predicate: ["menuLink"], descendants: true, isSignal: true }, { propertyName: "menuButton", first: true, predicate: EclButtonComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (href) {\n <a eclLink\n #menuLink\n variant=\"standalone\"\n [href]=\"href\"\n [target]=\"target()\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n [attr.aria-current]=\"ariaCurrent\"\n (focus)=\"onItemFocus($event)\"\n (click)=\"onItemClick($event)\"\n (keydown)=\"onLinkKeydown($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </a>\n} @else {\n <a eclLink\n #menuLink\n variant=\"standalone\"\n [attr.tabindex]=\"tabindex || 0\"\n [routerLink]=\"routerLink()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n [attr.aria-current]=\"ariaCurrent\"\n (focus)=\"onItemFocus($event)\"\n (click)=\"onItemClick($event)\"\n (keydown)=\"onLinkKeydown($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </a>\n}\n\n@if (hasChildren) {\n @if (isMobileBreakpoint) {\n <button\n eclButton\n variant=\"tertiary\"\n class=\"ecl-menu__button-caret ecl-button--neutral\"\n type=\"button\"\n [attr.aria-label]=\"toggleAriaLabel() || 'Access item children'\"\n (click)=\"onItemCaretClick($event)\"\n (keydown)=\"onButtonKeydown($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"m\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n </button>\n } @else {\n <button\n eclButton\n variant=\"tertiary\"\n class=\"ecl-menu__button-caret ecl-button--neutral\"\n type=\"button\"\n [attr.aria-label]=\"toggleAriaLabel() || 'Access item children'\"\n [attr.data-expanded]=\"isDataExpanded\"\n (keydown)=\"onButtonKeydown($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"m\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n </button>\n }\n}\n\n<ng-content select=\"ecl-menu-mega\"></ng-content>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: i1.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "eclStyle", "size", "containerStyleClass"] }, { kind: "component", type: i2.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { kind: "directive", type: i3.EclLinkDirective, selector: "[eclLink]", inputs: ["extraAttributes", "isInverted", "isIconOnly", "isHighlight", "isNoVisited", "isBranded", "variant"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
756
777
|
}
|
|
757
778
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclMenuItemComponent, decorators: [{
|
|
758
779
|
type: Component,
|
|
759
780
|
args: [{ selector: 'ecl-menu-item', imports: [NgTemplateOutlet, RouterLink, RouterLinkWithHref, ...EUI_ECL_BUTTON, ...EUI_ECL_ICON, ...EUI_ECL_LINK], encapsulation: ViewEncapsulation.None, host: {
|
|
760
|
-
|
|
781
|
+
role: 'listitem',
|
|
761
782
|
'[class]': 'cssClasses',
|
|
762
783
|
'[class.ecl-menu__item--has-children]': 'hasEclChildrenDataAttribute',
|
|
763
784
|
'[attr.aria-haspopup]': 'hasEclChildrenDataAttribute',
|
|
@@ -773,16 +794,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
773
794
|
type: Input
|
|
774
795
|
}], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], isCurrent: [{
|
|
775
796
|
type: Input
|
|
776
|
-
}], linkExtraAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkExtraAttributes", required: false }] }], submenu: [{
|
|
777
|
-
type: ContentChild,
|
|
778
|
-
args: [forwardRef(() => EclMenuMegaComponent)]
|
|
779
|
-
}], menuLink: [{
|
|
780
|
-
type: ViewChild,
|
|
781
|
-
args: ['menuLink']
|
|
782
|
-
}], menuButton: [{
|
|
783
|
-
type: ViewChild,
|
|
784
|
-
args: [EclButtonComponent]
|
|
785
|
-
}], menuItemSelect: [{
|
|
797
|
+
}], linkExtraAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkExtraAttributes", required: false }] }], submenu: [{ type: i0.ContentChild, args: [forwardRef(() => EclMenuMegaComponent), { isSignal: true }] }], menuLink: [{ type: i0.ViewChild, args: ['menuLink', { isSignal: true }] }], menuButton: [{ type: i0.ViewChild, args: [i0.forwardRef(() => EclButtonComponent), { isSignal: true }] }], menuItemSelect: [{
|
|
786
798
|
type: Output
|
|
787
799
|
}], menuItemCaret: [{
|
|
788
800
|
type: Output
|
|
@@ -819,6 +831,31 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
819
831
|
* Depending on that value, the labels can drop on 2-3 lines, if they are longer.
|
|
820
832
|
*/
|
|
821
833
|
this.maxLines = input(0, { ...(ngDevMode ? { debugName: "maxLines" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
834
|
+
/**
|
|
835
|
+
* The element, that wraps the main menu items and the back and forth button.
|
|
836
|
+
*/
|
|
837
|
+
this.innerSection = viewChild('innerSection', /* @ts-ignore */
|
|
838
|
+
...(ngDevMode ? [{ debugName: "innerSection" }] : /* istanbul ignore next */ []));
|
|
839
|
+
/**
|
|
840
|
+
* The element that wraps the main menu items.
|
|
841
|
+
*/
|
|
842
|
+
this.itemsList = viewChild('itemsList', /* @ts-ignore */
|
|
843
|
+
...(ngDevMode ? [{ debugName: "itemsList" }] : /* istanbul ignore next */ []));
|
|
844
|
+
/**
|
|
845
|
+
* When there is an overflow of the menu, the 'previous' button to navigate back to first hidden items.
|
|
846
|
+
*/
|
|
847
|
+
this.btnPrevious = viewChild('btnPrevious', /* @ts-ignore */
|
|
848
|
+
...(ngDevMode ? [{ debugName: "btnPrevious" }] : /* istanbul ignore next */ []));
|
|
849
|
+
/**
|
|
850
|
+
* When there is an overflow of the menu, the 'next' button to navigate to next hidden items.
|
|
851
|
+
*/
|
|
852
|
+
this.btnNext = viewChild('btnNext', /* @ts-ignore */
|
|
853
|
+
...(ngDevMode ? [{ debugName: "btnNext" }] : /* istanbul ignore next */ []));
|
|
854
|
+
/**
|
|
855
|
+
* The button to open/close menu in mobile mode.
|
|
856
|
+
*/
|
|
857
|
+
this.openCloseButton = viewChild('openCloseButton', /* @ts-ignore */
|
|
858
|
+
...(ngDevMode ? [{ debugName: "openCloseButton" }] : /* istanbul ignore next */ []));
|
|
822
859
|
this.menuItemSelect = output();
|
|
823
860
|
this.openHamburgerMenu = output();
|
|
824
861
|
this.closeHamburgerMenu = output();
|
|
@@ -1016,7 +1053,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1016
1053
|
// Re-enable hover after resize completes
|
|
1017
1054
|
this.ignoreHover = false;
|
|
1018
1055
|
}, this.TIMEOUT_INTERVAL);
|
|
1019
|
-
}).observe(this.innerSection.nativeElement);
|
|
1056
|
+
}).observe(this.innerSection().nativeElement);
|
|
1020
1057
|
}
|
|
1021
1058
|
slideMenuInitialState() {
|
|
1022
1059
|
this.offsetLeft = 0;
|
|
@@ -1032,18 +1069,18 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1032
1069
|
this.isShowNextBtn.set(true);
|
|
1033
1070
|
}
|
|
1034
1071
|
showNextSlideLtr() {
|
|
1035
|
-
const btnOffsetWidth = this.btnNext.el.nativeElement.offsetWidth;
|
|
1072
|
+
const btnOffsetWidth = this.btnNext().el.nativeElement.offsetWidth;
|
|
1036
1073
|
this.offsetLeft =
|
|
1037
1074
|
this.lastVisibleItem.el.nativeElement.getBoundingClientRect().left -
|
|
1038
|
-
this.itemsList.nativeElement.getBoundingClientRect().left -
|
|
1075
|
+
this.itemsList().nativeElement.getBoundingClientRect().left -
|
|
1039
1076
|
btnOffsetWidth;
|
|
1040
1077
|
this.menuListStyleLeft = `-${this.offsetLeft}px`;
|
|
1041
1078
|
this.menuListStyleRight = 'auto';
|
|
1042
1079
|
}
|
|
1043
1080
|
showNextSlideRtl() {
|
|
1044
|
-
const btnOffsetWidth = this.btnNext.el.nativeElement.offsetWidth;
|
|
1081
|
+
const btnOffsetWidth = this.btnNext().el.nativeElement.offsetWidth;
|
|
1045
1082
|
this.offsetLeft =
|
|
1046
|
-
this.itemsList.nativeElement.getBoundingClientRect().right -
|
|
1083
|
+
this.itemsList().nativeElement.getBoundingClientRect().right -
|
|
1047
1084
|
this.lastVisibleItem.el.nativeElement.getBoundingClientRect().right -
|
|
1048
1085
|
btnOffsetWidth;
|
|
1049
1086
|
this.menuListStyleRight = `-${this.offsetLeft}px`;
|
|
@@ -1056,7 +1093,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1056
1093
|
});
|
|
1057
1094
|
}
|
|
1058
1095
|
checkMenuOverflow() {
|
|
1059
|
-
this.hasOverflow = this.totalItemsWidth > this.innerSection.nativeElement.offsetWidth + 16;
|
|
1096
|
+
this.hasOverflow = this.totalItemsWidth > this.innerSection().nativeElement.offsetWidth + 16;
|
|
1060
1097
|
if (!this.hasOverflow || this.isMobileBreakpoint || this.isTablet) {
|
|
1061
1098
|
this.resetOverflowValues();
|
|
1062
1099
|
return;
|
|
@@ -1077,12 +1114,12 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1077
1114
|
if (this.isRtl) {
|
|
1078
1115
|
this.eclRootMenuItems
|
|
1079
1116
|
.filter((item) => item.el.nativeElement.getBoundingClientRect().right <=
|
|
1080
|
-
this.innerSection.nativeElement.getBoundingClientRect().right)
|
|
1117
|
+
this.innerSection().nativeElement.getBoundingClientRect().right)
|
|
1081
1118
|
.forEach((el) => (el.isVisible = true));
|
|
1082
1119
|
}
|
|
1083
1120
|
else {
|
|
1084
1121
|
this.eclRootMenuItems
|
|
1085
|
-
.filter((item) => item.el.nativeElement.getBoundingClientRect().left >= this.innerSection.nativeElement.getBoundingClientRect().left)
|
|
1122
|
+
.filter((item) => item.el.nativeElement.getBoundingClientRect().left >= this.innerSection().nativeElement.getBoundingClientRect().left)
|
|
1086
1123
|
.forEach((el) => (el.isVisible = true));
|
|
1087
1124
|
}
|
|
1088
1125
|
}
|
|
@@ -1095,7 +1132,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1095
1132
|
this.menuListStyleRight = 'auto';
|
|
1096
1133
|
if (this.isRtl) {
|
|
1097
1134
|
for (const item of this.eclRootMenuItems) {
|
|
1098
|
-
if (item.el.nativeElement.getBoundingClientRect().left < this.itemsList.nativeElement.getBoundingClientRect().left) {
|
|
1135
|
+
if (item.el.nativeElement.getBoundingClientRect().left < this.itemsList().nativeElement.getBoundingClientRect().left) {
|
|
1099
1136
|
this.lastVisibleItem = item;
|
|
1100
1137
|
break;
|
|
1101
1138
|
}
|
|
@@ -1104,7 +1141,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1104
1141
|
}
|
|
1105
1142
|
else {
|
|
1106
1143
|
for (const item of this.eclRootMenuItems) {
|
|
1107
|
-
if (item.el.nativeElement.getBoundingClientRect().right > this.itemsList.nativeElement.getBoundingClientRect().right) {
|
|
1144
|
+
if (item.el.nativeElement.getBoundingClientRect().right > this.itemsList().nativeElement.getBoundingClientRect().right) {
|
|
1108
1145
|
this.lastVisibleItem = item;
|
|
1109
1146
|
break;
|
|
1110
1147
|
}
|
|
@@ -1186,7 +1223,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1186
1223
|
this.onRootMenuItemKeydown(item, evt);
|
|
1187
1224
|
});
|
|
1188
1225
|
item.menuMegaLastItemTab.pipe(takeUntil(this.destroy$)).subscribe((evt) => {
|
|
1189
|
-
this.openCloseButton.onFocus();
|
|
1226
|
+
this.openCloseButton().onFocus();
|
|
1190
1227
|
});
|
|
1191
1228
|
}
|
|
1192
1229
|
onRootMenuItemFocused(item) {
|
|
@@ -1230,7 +1267,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1230
1267
|
case KeyCode.TAB: {
|
|
1231
1268
|
if ((this.isMobileBreakpoint || this.isTablet) && this.isLastItem(item)) {
|
|
1232
1269
|
evt.preventDefault();
|
|
1233
|
-
this.openCloseButton.onFocus();
|
|
1270
|
+
this.openCloseButton().onFocus();
|
|
1234
1271
|
}
|
|
1235
1272
|
break;
|
|
1236
1273
|
}
|
|
@@ -1310,7 +1347,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1310
1347
|
}
|
|
1311
1348
|
openSubmenu(item) {
|
|
1312
1349
|
if (item.isVisible) {
|
|
1313
|
-
if (!this.isMobileBreakpoint && !this.isTablet && item.submenu) {
|
|
1350
|
+
if (!this.isMobileBreakpoint && !this.isTablet && item.submenu()) {
|
|
1314
1351
|
this.checkMegaMenu(item);
|
|
1315
1352
|
}
|
|
1316
1353
|
item.isHovered = true;
|
|
@@ -1324,27 +1361,27 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1324
1361
|
checkMegaMenu(menuItem) {
|
|
1325
1362
|
if (menuItem.isFull) {
|
|
1326
1363
|
if (this.isRtl) {
|
|
1327
|
-
menuItem.submenu.offsetRight = this.offsetLeft;
|
|
1364
|
+
menuItem.submenu().offsetRight = this.offsetLeft;
|
|
1328
1365
|
}
|
|
1329
1366
|
else {
|
|
1330
|
-
menuItem.submenu.offsetLeft = this.offsetLeft;
|
|
1367
|
+
menuItem.submenu().offsetLeft = this.offsetLeft;
|
|
1331
1368
|
}
|
|
1332
1369
|
return;
|
|
1333
1370
|
}
|
|
1334
1371
|
this.checkEnoughSpaceForMegaMenu(menuItem);
|
|
1335
1372
|
}
|
|
1336
1373
|
checkEnoughSpaceForMegaMenu(menuItem) {
|
|
1337
|
-
const megaBounding = menuItem.submenu.el.nativeElement.getBoundingClientRect();
|
|
1338
|
-
const containerBounding = this.innerSection.nativeElement.getBoundingClientRect();
|
|
1374
|
+
const megaBounding = menuItem.submenu().el.nativeElement.getBoundingClientRect();
|
|
1375
|
+
const containerBounding = this.innerSection().nativeElement.getBoundingClientRect();
|
|
1339
1376
|
const menuItemBounding = menuItem.el.nativeElement.getBoundingClientRect();
|
|
1340
1377
|
const megaWidth = megaBounding.width;
|
|
1341
1378
|
const containerWidth = containerBounding.width;
|
|
1342
1379
|
const menuItemPosition = menuItemBounding.left - containerBounding.left;
|
|
1343
1380
|
if (menuItemPosition + megaWidth > containerWidth) {
|
|
1344
|
-
menuItem.submenu.isRtlDisplay = true;
|
|
1381
|
+
menuItem.submenu().isRtlDisplay = true;
|
|
1345
1382
|
}
|
|
1346
1383
|
else {
|
|
1347
|
-
menuItem.submenu.isRtlDisplay = false;
|
|
1384
|
+
menuItem.submenu().isRtlDisplay = false;
|
|
1348
1385
|
}
|
|
1349
1386
|
}
|
|
1350
1387
|
onRootMenuItemHoveredOut(evt) {
|
|
@@ -1487,7 +1524,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1487
1524
|
});
|
|
1488
1525
|
}
|
|
1489
1526
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1490
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclMenuComponent, isStandalone: true, selector: "ecl-menu", inputs: { maxLines: { classPropertyName: "maxLines", publicName: "maxLines", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemSelect: "menuItemSelect", openHamburgerMenu: "openHamburgerMenu", closeHamburgerMenu: "closeHamburgerMenu" }, host: { attributes: { "role": "navigation" }, listeners: { "document:click": "onDocumentClick($event)", "keydown.escape": "onEscapePress($event)" }, properties: { "class": "cssClasses", "class.ecl-menu--forced-mobile": "isTablet", "class.ecl-menu--forced-close": "isMenuHidden", "attr.data-expanded": "isHamburgerMenuOpened ? \"\" : null" } }, queries: [{ propertyName: "eclRootMenuItems", predicate: EclMenuItemComponent }], viewQueries: [{ propertyName: "innerSection", first: true, predicate: ["innerSection"], descendants: true }, { propertyName: "itemsList", first: true, predicate: ["itemsList"], descendants: true }, { propertyName: "btnPrevious", first: true, predicate: ["btnPrevious"], descendants: true }, { propertyName: "btnNext", first: true, predicate: ["btnNext"], descendants: true }, { propertyName: "openCloseButton", first: true, predicate: ["openCloseButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-menu__overlay\" [style.top.px]=\"overlayStyleTop\"></div>\n<div class=\"ecl-container ecl-menu__container\">\n <button #openCloseButton eclButton isIconOnly variant=\"tertiary\" eclStyle=\"neutral\" type=\"button\" class=\"ecl-menu__open\"\n (click)=\"onMenuOpenCloseClick($event)\" [attr.aria-expanded]=\"isHamburgerMenuOpened\">\n <ecl-icon icon=\"hamburger\" size=\"m\"></ecl-icon>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n @if (isHamburgerMenuOpened) {\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n } @else {\n <span eclButtonLabel>{{ 'ecl.menu.MENU' | translate }}</span>\n }\n </button>\n\n <section\n class=\"ecl-menu__inner\"\n #innerSection\n [class.ecl-menu__inner--expanded]=\"isMenuExpandedInMobile\"\n [class.ecl-menu__inner--has-overflow]=\"hasOverflow\"\n aria-label=\"Menu\" [style.top.px]=\"innerStyleTop\">\n <header class=\"ecl-menu__inner-header\">\n <button\n eclButton\n variant=\"tertiary\"\n class=\"ecl-menu__close\"\n containerStyleClass=\"ecl-menu__close-container\"\n (click)=\"onMenuCloseClick($event)\">\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n <ecl-icon icon=\"close\" size=\"s\"></ecl-icon>\n </button>\n\n <div class=\"ecl-menu__title\">{{ 'ecl.menu.MENU' | translate }}</div>\n\n <button eclButton variant=\"tertiary\" class=\"ecl-menu__back\" (click)=\"onMenuBackClick($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.BACK' | translate }}</span>\n </button>\n </header>\n <button\n eclButton\n #btnPrevious\n tabindex=\"-1\"\n variant=\"tertiary\"\n isIconOnly\n class=\"ecl-menu__item ecl-menu__items-previous\"\n [class.ecl-menu__item--current]=\"isPrevBtnCurrentClass\"\n [style.display]=\"isShowPrevBtn() ? 'flex' : 'none'\"\n (click)=\"onPrevBtnClick()\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel class=\"ecl-u-sr-only\">{{ 'ecl.common.PREVIOUS' | translate }}</span>\n </button>\n <button\n eclButton\n #btnNext\n variant=\"tertiary\"\n tabindex=\"-1\"\n isIconOnly\n class=\"ecl-menu__item ecl-menu__items-next\"\n [class.ecl-menu__item--current]=\"!isPrevBtnCurrentClass\"\n [style.display]=\"isShowNextBtn() ? 'flex' : 'none'\"\n (click)=\"onNextBtnClick()\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-90\"></ecl-icon>\n <span eclButtonLabel class=\"ecl-u-sr-only\">{{ 'ecl.common.NEXT' | translate }}</span>\n </button>\n <ul class=\"ecl-menu__list\" #itemsList [style.right]=\"menuListStyleRight\" [style.left]=\"menuListStyleLeft\">\n <ng-content></ng-content>\n </ul>\n </section>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: i1.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "eclStyle", "size", "containerStyleClass"] }, { kind: "directive", type: i1.EclButtonLabelDirective, selector: "[eclButtonLabel]" }, { kind: "component", type: i2.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
1527
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclMenuComponent, isStandalone: true, selector: "ecl-menu", inputs: { maxLines: { classPropertyName: "maxLines", publicName: "maxLines", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemSelect: "menuItemSelect", openHamburgerMenu: "openHamburgerMenu", closeHamburgerMenu: "closeHamburgerMenu" }, host: { attributes: { "role": "navigation" }, listeners: { "document:click": "onDocumentClick($event)", "keydown.escape": "onEscapePress($event)" }, properties: { "class": "cssClasses", "class.ecl-menu--forced-mobile": "isTablet", "class.ecl-menu--forced-close": "isMenuHidden", "attr.data-expanded": "isHamburgerMenuOpened ? \"\" : null" } }, queries: [{ propertyName: "eclRootMenuItems", predicate: EclMenuItemComponent }], viewQueries: [{ propertyName: "innerSection", first: true, predicate: ["innerSection"], descendants: true, isSignal: true }, { propertyName: "itemsList", first: true, predicate: ["itemsList"], descendants: true, isSignal: true }, { propertyName: "btnPrevious", first: true, predicate: ["btnPrevious"], descendants: true, isSignal: true }, { propertyName: "btnNext", first: true, predicate: ["btnNext"], descendants: true, isSignal: true }, { propertyName: "openCloseButton", first: true, predicate: ["openCloseButton"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-menu__overlay\" [style.top.px]=\"overlayStyleTop\"></div>\n<div class=\"ecl-container ecl-menu__container\">\n <button #openCloseButton eclButton isIconOnly variant=\"tertiary\" eclStyle=\"neutral\" type=\"button\" class=\"ecl-menu__open\"\n (click)=\"onMenuOpenCloseClick($event)\" [attr.aria-expanded]=\"isHamburgerMenuOpened\">\n <ecl-icon icon=\"hamburger\" size=\"m\"></ecl-icon>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n @if (isHamburgerMenuOpened) {\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n } @else {\n <span eclButtonLabel>{{ 'ecl.menu.MENU' | translate }}</span>\n }\n </button>\n\n <section\n class=\"ecl-menu__inner\"\n #innerSection\n [class.ecl-menu__inner--expanded]=\"isMenuExpandedInMobile\"\n [class.ecl-menu__inner--has-overflow]=\"hasOverflow\"\n aria-label=\"Menu\" [style.top.px]=\"innerStyleTop\">\n <header class=\"ecl-menu__inner-header\">\n <button\n eclButton\n variant=\"tertiary\"\n class=\"ecl-menu__close\"\n containerStyleClass=\"ecl-menu__close-container\"\n (click)=\"onMenuCloseClick($event)\">\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n <ecl-icon icon=\"close\" size=\"s\"></ecl-icon>\n </button>\n\n <div class=\"ecl-menu__title\">{{ 'ecl.menu.MENU' | translate }}</div>\n\n <button eclButton variant=\"tertiary\" class=\"ecl-menu__back\" (click)=\"onMenuBackClick($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.BACK' | translate }}</span>\n </button>\n </header>\n <button\n eclButton\n #btnPrevious\n tabindex=\"-1\"\n variant=\"tertiary\"\n isIconOnly\n class=\"ecl-menu__item ecl-menu__items-previous\"\n [class.ecl-menu__item--current]=\"isPrevBtnCurrentClass\"\n [style.display]=\"isShowPrevBtn() ? 'flex' : 'none'\"\n (click)=\"onPrevBtnClick()\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel class=\"ecl-u-sr-only\">{{ 'ecl.common.PREVIOUS' | translate }}</span>\n </button>\n <button\n eclButton\n #btnNext\n variant=\"tertiary\"\n tabindex=\"-1\"\n isIconOnly\n class=\"ecl-menu__item ecl-menu__items-next\"\n [class.ecl-menu__item--current]=\"!isPrevBtnCurrentClass\"\n [style.display]=\"isShowNextBtn() ? 'flex' : 'none'\"\n (click)=\"onNextBtnClick()\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-90\"></ecl-icon>\n <span eclButtonLabel class=\"ecl-u-sr-only\">{{ 'ecl.common.NEXT' | translate }}</span>\n </button>\n <ul class=\"ecl-menu__list\" #itemsList [style.right]=\"menuListStyleRight\" [style.left]=\"menuListStyleLeft\">\n <ng-content></ng-content>\n </ul>\n </section>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: i1.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "eclStyle", "size", "containerStyleClass"] }, { kind: "directive", type: i1.EclButtonLabelDirective, selector: "[eclButtonLabel]" }, { kind: "component", type: i2.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
1491
1528
|
}
|
|
1492
1529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclMenuComponent, decorators: [{
|
|
1493
1530
|
type: Component,
|
|
@@ -1503,22 +1540,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
1503
1540
|
}], ctorParameters: () => [], propDecorators: { maxLines: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLines", required: false }] }], eclRootMenuItems: [{
|
|
1504
1541
|
type: ContentChildren,
|
|
1505
1542
|
args: [EclMenuItemComponent]
|
|
1506
|
-
}], innerSection: [{
|
|
1507
|
-
type: ViewChild,
|
|
1508
|
-
args: ['innerSection']
|
|
1509
|
-
}], itemsList: [{
|
|
1510
|
-
type: ViewChild,
|
|
1511
|
-
args: ['itemsList']
|
|
1512
|
-
}], btnPrevious: [{
|
|
1513
|
-
type: ViewChild,
|
|
1514
|
-
args: ['btnPrevious']
|
|
1515
|
-
}], btnNext: [{
|
|
1516
|
-
type: ViewChild,
|
|
1517
|
-
args: ['btnNext']
|
|
1518
|
-
}], openCloseButton: [{
|
|
1519
|
-
type: ViewChild,
|
|
1520
|
-
args: ['openCloseButton']
|
|
1521
|
-
}], menuItemSelect: [{ type: i0.Output, args: ["menuItemSelect"] }], openHamburgerMenu: [{ type: i0.Output, args: ["openHamburgerMenu"] }], closeHamburgerMenu: [{ type: i0.Output, args: ["closeHamburgerMenu"] }] } });
|
|
1543
|
+
}], innerSection: [{ type: i0.ViewChild, args: ['innerSection', { isSignal: true }] }], itemsList: [{ type: i0.ViewChild, args: ['itemsList', { isSignal: true }] }], btnPrevious: [{ type: i0.ViewChild, args: ['btnPrevious', { isSignal: true }] }], btnNext: [{ type: i0.ViewChild, args: ['btnNext', { isSignal: true }] }], openCloseButton: [{ type: i0.ViewChild, args: ['openCloseButton', { isSignal: true }] }], menuItemSelect: [{ type: i0.Output, args: ["menuItemSelect"] }], openHamburgerMenu: [{ type: i0.Output, args: ["openHamburgerMenu"] }], closeHamburgerMenu: [{ type: i0.Output, args: ["closeHamburgerMenu"] }] } });
|
|
1522
1544
|
|
|
1523
1545
|
const EUI_ECL_MENU = [
|
|
1524
1546
|
EclMenuComponent, EclMenuItemComponent, EclMenuMegaComponent, EclMenuMegaItemComponent,
|