@eui/ecl 21.0.0-alpha.31 → 21.0.0-alpha.32
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/components/ecl-accordion/index.d.ts +8 -4
- package/components/ecl-accordion/index.d.ts.map +1 -1
- package/components/ecl-banner/index.d.ts +4 -1
- package/components/ecl-banner/index.d.ts.map +1 -1
- package/components/ecl-divider/index.d.ts +31 -0
- package/components/ecl-divider/index.d.ts.map +1 -0
- package/components/ecl-divider/package.json +3 -0
- package/components/ecl-featured/index.d.ts +13 -35
- package/components/ecl-featured/index.d.ts.map +1 -1
- package/components/ecl-feedback-message/index.d.ts.map +1 -1
- package/components/ecl-mega-menu/index.d.ts +7 -3
- package/components/ecl-mega-menu/index.d.ts.map +1 -1
- package/components/ecl-menu/index.d.ts +6 -3
- package/components/ecl-menu/index.d.ts.map +1 -1
- package/components/ecl-popover/index.d.ts +17 -12
- package/components/ecl-popover/index.d.ts.map +1 -1
- package/components/ecl-site-footer/index.d.ts +9 -3
- package/components/ecl-site-footer/index.d.ts.map +1 -1
- package/components/ecl-site-header/index.d.ts +6 -1
- package/components/ecl-site-header/index.d.ts.map +1 -1
- package/components/ecl-social-media-follow/index.d.ts.map +1 -1
- package/docs/changelog.html +142 -0
- package/docs/components/EclAccordionComponent.html +43 -2
- package/docs/components/EclAccordionItemComponent.html +2 -2
- package/docs/components/EclAppComponent.html +2 -2
- package/docs/components/EclBannerComponent.html +2 -2
- package/docs/components/EclBlockquoteComponent.html +2 -2
- package/docs/components/EclBreadcrumbComponent.html +2 -2
- package/docs/components/EclBreadcrumbSegmentComponent.html +2 -2
- package/docs/components/EclButtonComponent.html +2 -2
- package/docs/components/EclCardBodyComponent.html +2 -2
- package/docs/components/EclCardComponent.html +2 -2
- package/docs/components/EclCarouselComponent.html +2 -2
- package/docs/components/EclCarouselItemComponent.html +2 -2
- package/docs/components/EclCategoryFilterComponent.html +2 -2
- package/docs/components/EclCategoryFilterItemComponent.html +2 -2
- package/docs/components/EclCategoryFilterListComponent.html +2 -2
- package/docs/components/EclCheckboxHelpComponent.html +2 -2
- package/docs/components/EclCheckboxLabelComponent.html +3 -3
- package/docs/components/EclContentBlockComponent.html +2 -2
- package/docs/components/EclContentItemComponent.html +2 -2
- package/docs/components/EclDateBlockComponent.html +2 -2
- package/docs/components/EclDescriptionListDefinitionComponent.html +2 -2
- package/docs/components/EclExpandableComponent.html +2 -2
- package/docs/components/EclFactFiguresComponent.html +2 -2
- package/docs/components/EclFactFiguresDescriptionComponent.html +2 -2
- package/docs/components/EclFactFiguresItemComponent.html +2 -2
- package/docs/components/EclFactFiguresTitleComponent.html +2 -2
- package/docs/components/EclFactFiguresValueComponent.html +2 -2
- package/docs/components/EclFactFiguresViewAllComponent.html +2 -2
- package/docs/components/EclFeaturedComponent.html +33 -15
- package/docs/components/EclFeaturedItemComponent.html +27 -3
- package/docs/components/EclFeaturedItemDescriptionComponent.html +2 -2
- package/docs/components/EclFileComponent.html +2 -2
- package/docs/components/EclFileItemComponent.html +2 -2
- package/docs/components/EclFileItemsComponent.html +2 -2
- package/docs/components/EclFileTaxonomyComponent.html +2 -2
- package/docs/components/EclFormGroupComponent.html +2 -2
- package/docs/components/EclFormLabelComponent.html +3 -3
- package/docs/components/EclGalleryComponent.html +3 -3
- package/docs/components/EclGalleryFooterComponent.html +2 -2
- package/docs/components/EclGalleryItemComponent.html +3 -3
- package/docs/components/EclIconComponent.html +2 -2
- package/docs/components/EclInpageNavigationComponent.html +2 -2
- package/docs/components/EclInpageNavigationItemComponent.html +2 -2
- package/docs/components/EclListIllustrationComponent.html +2 -2
- package/docs/components/EclListIllustrationItemComponent.html +2 -2
- package/docs/components/EclLoadingIndicatorComponent.html +2 -2
- package/docs/components/EclMediaContainerComponent.html +2 -2
- package/docs/components/EclMegaMenuComponent.html +46 -2
- package/docs/components/EclMegaMenuFeaturedComponent.html +2 -2
- package/docs/components/EclMegaMenuInfoComponent.html +2 -2
- package/docs/components/EclMegaMenuItemComponent.html +2 -2
- package/docs/components/EclMegaMenuSubitemComponent.html +2 -2
- package/docs/components/EclMenuComponent.html +46 -2
- package/docs/components/EclMenuItemComponent.html +3 -3
- package/docs/components/EclMenuMegaComponent.html +2 -2
- package/docs/components/EclMenuMegaItemComponent.html +2 -2
- package/docs/components/EclModalBodyComponent.html +2 -2
- package/docs/components/EclModalComponent.html +2 -2
- package/docs/components/EclModalFooterComponent.html +2 -2
- package/docs/components/EclModalHeaderComponent.html +2 -2
- package/docs/components/EclMultiselectComponent.html +2 -2
- package/docs/components/EclMultiselectDropdownComponent.html +2 -2
- package/docs/components/EclMultiselectInputComponent.html +2 -2
- package/docs/components/EclMultiselectOptgroupComponent.html +2 -2
- package/docs/components/EclMultiselectOptionComponent.html +2 -2
- package/docs/components/EclNavigationListComponent.html +2 -2
- package/docs/components/EclNavigationListItemComponent.html +2 -2
- package/docs/components/EclNewsTickerComponent.html +2 -2
- package/docs/components/EclNewsTickerItemComponent.html +2 -2
- package/docs/components/EclNotificationComponent.html +3 -3
- package/docs/components/EclPageHeaderComponent.html +2 -2
- package/docs/components/EclPaginationComponent.html +2 -2
- package/docs/components/EclPaginationItemComponent.html +2 -2
- package/docs/components/EclPopoverComponent.html +96 -27
- package/docs/components/EclRadioHelpComponent.html +2 -2
- package/docs/components/EclRadioLabelComponent.html +2 -2
- package/docs/components/EclRangeBubbleComponent.html +2 -2
- package/docs/components/EclRangeValueComponent.html +2 -2
- package/docs/components/EclRatingFieldComponent.html +2 -2
- package/docs/components/EclSearchFormComponent.html +3 -3
- package/docs/components/EclSelectContainerComponent.html +2 -2
- package/docs/components/EclSiteFooterComponent.html +2 -2
- package/docs/components/EclSiteFooterCoreComponent.html +2 -2
- package/docs/components/EclSiteFooterFixedContentEUComponent.html +2 -2
- package/docs/components/EclSiteFooterRowCommonComponent.html +2 -2
- package/docs/components/EclSiteHeaderActionComponent.html +2 -2
- package/docs/components/EclSiteHeaderBannerTopComponent.html +2 -2
- package/docs/components/EclSiteHeaderComponent.html +33 -3
- package/docs/components/EclSiteHeaderCustomActionComponent.html +2 -2
- package/docs/components/EclSiteHeaderEnvironmentComponent.html +2 -2
- package/docs/components/EclSiteHeaderLanguageComponent.html +3 -3
- package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +3 -3
- package/docs/components/EclSiteHeaderLoginComponent.html +3 -3
- package/docs/components/EclSiteHeaderNotificationComponent.html +2 -2
- package/docs/components/EclSiteHeaderSearchComponent.html +2 -2
- package/docs/components/EclSocialMediaFollowComponent.html +2 -2
- package/docs/components/EclSocialMediaFollowItemComponent.html +2 -2
- package/docs/components/EclSplashPageComponent.html +2 -2
- package/docs/components/EclSplashPageLanguageCategoryComponent.html +2 -2
- package/docs/components/EclSplashPageLanguageContainerComponent.html +2 -2
- package/docs/components/EclSplashPageLanguageLinkComponent.html +2 -2
- package/docs/components/EclStickyContainerComponent.html +2 -2
- package/docs/components/EclTabComponent.html +2 -2
- package/docs/components/EclTabLabelComponent.html +2 -2
- package/docs/components/EclTabMoreComponent.html +2 -2
- package/docs/components/EclTableSortButtonComponent.html +2 -2
- package/docs/components/EclTabsComponent.html +2 -2
- package/docs/components/EclTagComponent.html +2 -2
- package/docs/components/EclTimelineComponent.html +2 -2
- package/docs/components/EclTimelineItemComponent.html +2 -2
- package/docs/components/EclTimelineItemTogglerComponent.html +2 -2
- package/docs/directives/EclBannerDescriptionLinkDirective.html +65 -1
- package/docs/directives/EclBannerTitleLinkDirective.html +64 -1
- package/docs/directives/{EclSeparatorDirective.html → EclDividerDirective.html} +4 -4
- package/docs/directives/{EclFeaturedItemFooterLinkDirective.html → EclSiteFooterDescriptionNameDirective.html} +14 -14
- package/docs/js/menu-wc.js +36 -109
- package/docs/js/menu-wc_es5.js +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/miscellaneous/variables.html +31 -98
- package/docs/modules/{EclSeparatorModule.html → EclDividerModule.html} +6 -6
- package/docs/modules.html +12 -24
- package/docs/overview.html +4 -4
- package/docs/properties.html +1 -1
- package/fesm2022/eui-ecl-components-ecl-accordion.mjs +61 -43
- package/fesm2022/eui-ecl-components-ecl-accordion.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-app.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-app.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-banner.mjs +14 -5
- package/fesm2022/eui-ecl-components-ecl-banner.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-checkbox.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-checkbox.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-divider.mjs +57 -0
- package/fesm2022/eui-ecl-components-ecl-divider.mjs.map +1 -0
- package/fesm2022/eui-ecl-components-ecl-featured.mjs +21 -83
- package/fesm2022/eui-ecl-components-ecl-featured.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-feedback-message.mjs +1 -0
- package/fesm2022/eui-ecl-components-ecl-feedback-message.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-form-label.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-form-label.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-gallery.mjs +4 -4
- package/fesm2022/eui-ecl-components-ecl-gallery.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs +45 -18
- package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-menu.mjs +34 -15
- package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-notification.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-notification.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-popover.mjs +169 -98
- package/fesm2022/eui-ecl-components-ecl-popover.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-search-form.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-search-form.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs +23 -1
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs +22 -15
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs +1 -0
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs.map +1 -1
- package/fesm2022/eui-ecl.mjs +46 -49
- package/fesm2022/eui-ecl.mjs.map +1 -1
- package/index.d.ts +44 -45
- package/index.d.ts.map +1 -1
- package/package.json +52 -56
- package/components/ecl-separator/index.d.ts +0 -31
- package/components/ecl-separator/index.d.ts.map +0 -1
- package/components/ecl-separator/package.json +0 -3
- package/components/ecl-social-media-share/index.d.ts +0 -54
- package/components/ecl-social-media-share/index.d.ts.map +0 -1
- package/components/ecl-social-media-share/package.json +0 -3
- package/docs/classes/EclSocialMediaShareItemClickEvent.html +0 -304
- package/docs/components/EclFeaturedItemFooterComponent.html +0 -560
- package/docs/components/EclSocialMediaShareComponent.html +0 -584
- package/docs/components/EclSocialMediaShareItemComponent.html +0 -829
- package/docs/directives/EclFeaturedItemFooterPictureDirective.html +0 -502
- package/docs/directives/EclSocialMediaShareLinkDirective.html +0 -553
- package/docs/modules/EclSocialMediaShareModule.html +0 -321
- package/fesm2022/eui-ecl-components-ecl-separator.mjs +0 -57
- package/fesm2022/eui-ecl-components-ecl-separator.mjs.map +0 -1
- package/fesm2022/eui-ecl-components-ecl-social-media-share.mjs +0 -136
- package/fesm2022/eui-ecl-components-ecl-social-media-share.mjs.map +0 -1
|
@@ -6,7 +6,8 @@ import * as i3$1 from '@ngx-translate/core';
|
|
|
6
6
|
import { TranslateModule } from '@ngx-translate/core';
|
|
7
7
|
import { Subject, of } from 'rxjs';
|
|
8
8
|
import { mergeWith, takeUntil } from 'rxjs/operators';
|
|
9
|
-
import { EclDomEvent, ECLBaseDirective, KeyCode, EclRtlService
|
|
9
|
+
import { EclDomEvent, ECLBaseDirective, KeyCode, EclRtlService } from '@eui/ecl/core';
|
|
10
|
+
import { EuiAppShellService } from '@eui/core';
|
|
10
11
|
import * as i1 from '@eui/ecl/components/ecl-button';
|
|
11
12
|
import { EclButtonComponent, EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';
|
|
12
13
|
import { RouterLink, RouterLinkWithHref } from '@angular/router';
|
|
@@ -738,11 +739,11 @@ class EclMenuItemComponent extends ECLBaseDirective {
|
|
|
738
739
|
});
|
|
739
740
|
}
|
|
740
741
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: EclMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
741
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0-next.5", type: EclMenuItemComponent, isStandalone: true, selector: "ecl-menu-item", inputs: { id: "id", label: "label", toggleAriaLabel: "toggleAriaLabel", routerLink: "routerLink", queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", href: "href", target: "target", isCurrent: "isCurrent", linkExtraAttributes: "linkExtraAttributes" }, outputs: { menuItemSelect: "menuItemSelect", menuItemCaret: "menuItemCaret", menuItemHover: "menuItemHover", menuItemHoverOut: "menuItemHoverOut", menuMegaItemSelect: "menuMegaItemSelect", menuItemFocus: "menuItemFocus", menuItemKeydown: "menuItemKeydown", menuMegaLastItemTab: "menuMegaLastItemTab" }, host: { listeners: { "mouseenter": "onItemMouseEnter($event)", "mouseleave": "onItemMouseLeave($event)" }, properties: { "attr.role": "this.role", "class": "this.cssClasses", "class.ecl-menu__item--has-children": "this.hasEclChildrenDataAttribute", "attr.aria-haspopup": "this.hasEclChildrenDataAttribute", "attr.aria-expanded": "this.isAriaExpanded" } }, 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 isIconOnly\n variant=\"
|
|
742
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0-next.5", type: EclMenuItemComponent, isStandalone: true, selector: "ecl-menu-item", inputs: { id: "id", label: "label", toggleAriaLabel: "toggleAriaLabel", routerLink: "routerLink", queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", href: "href", target: "target", isCurrent: "isCurrent", linkExtraAttributes: "linkExtraAttributes" }, outputs: { menuItemSelect: "menuItemSelect", menuItemCaret: "menuItemCaret", menuItemHover: "menuItemHover", menuItemHoverOut: "menuItemHoverOut", menuMegaItemSelect: "menuMegaItemSelect", menuItemFocus: "menuItemFocus", menuItemKeydown: "menuItemKeydown", menuMegaLastItemTab: "menuMegaLastItemTab" }, host: { listeners: { "mouseenter": "onItemMouseEnter($event)", "mouseleave": "onItemMouseLeave($event)" }, properties: { "attr.role": "this.role", "class": "this.cssClasses", "class.ecl-menu__item--has-children": "this.hasEclChildrenDataAttribute", "attr.aria-haspopup": "this.hasEclChildrenDataAttribute", "attr.aria-expanded": "this.isAriaExpanded" } }, 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 isIconOnly\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=\"xs\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n </button>\n } @else {\n <button\n eclButton\n isIconOnly\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.aria-expanded]=\"isAriaExpanded\"\n (keydown)=\"onButtonKeydown($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" 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", "routerLink"] }, { kind: "component", type: i1.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "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: ["isInverted", "isIconOnly", "isNoVisited", "variant"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
742
743
|
}
|
|
743
744
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: EclMenuItemComponent, decorators: [{
|
|
744
745
|
type: Component,
|
|
745
|
-
args: [{ selector: 'ecl-menu-item', imports: [NgTemplateOutlet, RouterLink, RouterLinkWithHref, ...EUI_ECL_BUTTON, ...EUI_ECL_ICON, ...EUI_ECL_LINK], encapsulation: ViewEncapsulation.None, 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 isIconOnly\n variant=\"
|
|
746
|
+
args: [{ selector: 'ecl-menu-item', imports: [NgTemplateOutlet, RouterLink, RouterLinkWithHref, ...EUI_ECL_BUTTON, ...EUI_ECL_ICON, ...EUI_ECL_LINK], encapsulation: ViewEncapsulation.None, 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 isIconOnly\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=\"xs\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n </button>\n } @else {\n <button\n eclButton\n isIconOnly\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.aria-expanded]=\"isAriaExpanded\"\n (keydown)=\"onButtonKeydown($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" 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" }]
|
|
746
747
|
}], ctorParameters: () => [], propDecorators: { id: [{
|
|
747
748
|
type: Input
|
|
748
749
|
}], label: [{
|
|
@@ -854,6 +855,17 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
854
855
|
this.menuListStyleLeft = 'auto';
|
|
855
856
|
this.overlayStyleTop = null;
|
|
856
857
|
this.innerStyleTop = null;
|
|
858
|
+
/**
|
|
859
|
+
* Represents the current viewport breakpoint states.
|
|
860
|
+
*/
|
|
861
|
+
this.breakpointsValue = {
|
|
862
|
+
isMobile: false,
|
|
863
|
+
isTablet: false,
|
|
864
|
+
isLtDesktop: false,
|
|
865
|
+
isDesktop: false,
|
|
866
|
+
isXL: false,
|
|
867
|
+
isXXL: false,
|
|
868
|
+
};
|
|
857
869
|
this.destroy$ = new Subject();
|
|
858
870
|
this.isRtl = false;
|
|
859
871
|
this.totalItemsWidth = 0;
|
|
@@ -864,7 +876,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
864
876
|
this.cdkBreakpointObserver = inject(BreakpointObserver);
|
|
865
877
|
this.renderer = inject(Renderer2);
|
|
866
878
|
this.eclRtlService = inject(EclRtlService);
|
|
867
|
-
this.
|
|
879
|
+
this.euiAppShellService = inject(EuiAppShellService);
|
|
868
880
|
this.platformId = inject(PLATFORM_ID);
|
|
869
881
|
this.differ = this.differs.find([]).create();
|
|
870
882
|
afterNextRender(() => {
|
|
@@ -874,7 +886,7 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
874
886
|
this.checkMenuItemsWidth();
|
|
875
887
|
this.checkMenuOverflow();
|
|
876
888
|
}, this.TIMEOUT_INTERVAL);
|
|
877
|
-
this.
|
|
889
|
+
this.subscribeToAppShellBreakpoints();
|
|
878
890
|
});
|
|
879
891
|
}
|
|
880
892
|
/**
|
|
@@ -904,7 +916,6 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
904
916
|
ngOnInit() {
|
|
905
917
|
if (isPlatformBrowser(this.platformId)) {
|
|
906
918
|
this.handleRtlChangeState();
|
|
907
|
-
this.observeBreakpointChanges();
|
|
908
919
|
this.observeSwipeGestures();
|
|
909
920
|
}
|
|
910
921
|
}
|
|
@@ -1009,10 +1020,6 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1009
1020
|
}, this.TIMEOUT_INTERVAL);
|
|
1010
1021
|
}).observe(this.innerSection.nativeElement);
|
|
1011
1022
|
}
|
|
1012
|
-
checkIsTabletDevice() {
|
|
1013
|
-
const userAgent = navigator.userAgent.toLowerCase();
|
|
1014
|
-
this.isTablet = this.eclUserDeviceService.isTabletDevice(userAgent);
|
|
1015
|
-
}
|
|
1016
1023
|
slideMenuInitialState() {
|
|
1017
1024
|
this.offsetLeft = 0;
|
|
1018
1025
|
if (this.isRtl) {
|
|
@@ -1451,12 +1458,24 @@ class EclMenuComponent extends ECLBaseDirective {
|
|
|
1451
1458
|
});
|
|
1452
1459
|
}
|
|
1453
1460
|
}
|
|
1454
|
-
|
|
1455
|
-
this.
|
|
1456
|
-
.observe([('(max-width: 480px)')])
|
|
1461
|
+
subscribeToAppShellBreakpoints() {
|
|
1462
|
+
this.euiAppShellService.breakpoints$
|
|
1457
1463
|
.pipe(takeUntil(this.destroy$))
|
|
1458
|
-
.subscribe((
|
|
1459
|
-
this.
|
|
1464
|
+
.subscribe((bkps) => {
|
|
1465
|
+
this.breakpointsValue = bkps ?? this.breakpointsValue;
|
|
1466
|
+
if (typeof bkps?.width === 'number') {
|
|
1467
|
+
const w = bkps.width;
|
|
1468
|
+
this.isMobileBreakpoint = w <= 480;
|
|
1469
|
+
this.isTablet = w > 600 && w <= 996;
|
|
1470
|
+
}
|
|
1471
|
+
else if (bkps && typeof bkps === 'object') {
|
|
1472
|
+
this.isMobileBreakpoint = !!(bkps.Handset || bkps.Small || bkps.mobile);
|
|
1473
|
+
this.isTablet = !!(bkps.Tablet || bkps.tablet);
|
|
1474
|
+
}
|
|
1475
|
+
else if (typeof bkps?.isMobile !== 'undefined' || typeof bkps?.isTablet !== 'undefined') {
|
|
1476
|
+
this.isMobileBreakpoint = !!bkps.isMobile;
|
|
1477
|
+
this.isTablet = !!bkps.isTablet;
|
|
1478
|
+
}
|
|
1460
1479
|
if (!this.isMobileBreakpoint) {
|
|
1461
1480
|
this.overlayStyleTop = null;
|
|
1462
1481
|
this.innerStyleTop = null;
|