@eui/ecl 21.4.3 → 21.4.4-snapshot-1789472586190
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 +59 -0
- package/docs/components/EclInpageNavigationItemComponent.html +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/documentation.json +7 -7
- package/docs/properties.html +1 -1
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs +8 -5
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-menu.mjs +0 -3
- package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
- package/package.json +2 -2
- package/types/eui-ecl-components-ecl-inpage-navigation.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-menu.d.ts.map +1 -1
|
@@ -4305,12 +4305,12 @@
|
|
|
4305
4305
|
},
|
|
4306
4306
|
{
|
|
4307
4307
|
"name": "EclInpageNavigationSectionEnterEvent",
|
|
4308
|
-
"id": "class-EclInpageNavigationSectionEnterEvent-
|
|
4308
|
+
"id": "class-EclInpageNavigationSectionEnterEvent-1baa0416d6ce484a25d94dad7ac099730d64b95a4a509193e48a7d9a66c8d0d63fd7eb94bfa3b225d4ec82bba50a0e665d88a531421660728ef786b9c05d87a1",
|
|
4309
4309
|
"file": "packages/ecl/components/ecl-inpage-navigation/ecl-inpage-navigation.component.ts",
|
|
4310
4310
|
"deprecated": false,
|
|
4311
4311
|
"deprecationMessage": "",
|
|
4312
4312
|
"type": "class",
|
|
4313
|
-
"sourceCode": "import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, ContentChild, ContentChildren, DOCUMENT, DoCheck, ElementRef, EventEmitter, Input, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, Output, PLATFORM_ID, QueryList, ViewChild, afterNextRender, inject, numberAttribute } from '@angular/core';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_STICKY_CONTAINER } from '@eui/ecl/components/ecl-sticky-container';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService, EclThemeService } from '@eui/ecl/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { EclInpageNavigationItemComponent } from './ecl-inpage-navigation-item.component';\nimport { EclInpageNavigationListDirective } from './ecl-inpage-navigation-list.directive';\nimport { EclInpageNavigationService } from './services/ecl-inpage-navigation.service';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport class EclInpageNavigationSectionEnterEvent extends EclBaseEvent {\n constructor(public sectionId: string) {\n super();\n }\n}\n\n/**\n * The in-page navigation is a vertical menu containing (anchored) links to H2-headings on long content pages.\n * It gives the user an overview of the page contents and has a fixed position (does not move while scrolling) at either the left\n * side of a page on desktop or top-bar on mobile. This component helps users scan of the page quickly contents and may potentially\n * reduce vertical scrolling, allowing users to easily jump straight to the segment of the page.\n */\n@Component({\n selector: 'ecl-inpage-navigation',\n templateUrl: './ecl-inpage-navigation.component.html',\n imports: [TranslateModule, ...EUI_ECL_STICKY_CONTAINER, ...EUI_ECL_ICON],\n styles: [\n `\n @media (min-width: 996px) {\n .ecl-inpage-navigation__list {\n display: block !important;\n }\n }\n `,\n ],\n})\nexport class EclInpageNavigationComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy, DoCheck {\n eclThemeService = inject(EclThemeService);\n\n @Input() eclTitle: string;\n /**\n * Used to calculate component's position.\n */\n @Input() marginTop: number;\n @Input() marginBottom: number;\n /**\n * Sets the offset from the top of the page (for example if there is a toolbar or header). Used to calculate scrolling behaviour.\n */\n @Input({ transform: numberAttribute }) offsetTop: number;\n @ViewChild('togglerButton') togglerButton: ElementRef<HTMLButtonElement>;\n @ViewChild('toggleWrapper') toggleWrapper: ElementRef<HTMLDivElement>;\n @ViewChild('navTittle') navTittle: ElementRef<HTMLDivElement>;\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n @Output() sectionEnter = new EventEmitter<EclInpageNavigationSectionEnterEvent>();\n\n @ContentChildren(EclInpageNavigationItemComponent, { descendants: true }) eclNavigationLinkItems: QueryList<EclInpageNavigationItemComponent>;\n @ContentChild(EclInpageNavigationListDirective) eclNavigationList: EclInpageNavigationListDirective;\n\n /**\n * Used for the mobile view, where user can select a section from the dropdown.\n */\n isButtonExpanded = false;\n currentSectionElement: HTMLElement | null = null;\n public isRtl = false;\n public listMaxHeight: number;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private differ: IterableDiffer<EclInpageNavigationItemComponent>;\n private isMobileBreakpoint = false;\n private MIN_DISTANCE_TOP = 10;\n /**\n * Extra spacing (px) kept between the sticky toggler and the target heading when scrolling to a section on mobile,\n * so the heading is not flush against the toggler. Mirrors the spacing buffer used by the vanilla ECL\n * `scroll-margin-top` rule (trigger height + spacing).\n */\n private readonly MOBILE_SCROLL_SPACING = 16;\n private readonly ICON_SIZE_EC_THEME = '2xs';\n private readonly ICON_SIZE_EU_THEME = 's';\n private readonly TABLET_BREAKPOINT = 996;\n private intersectionObserver: IntersectionObserver;\n private eclRtlService = inject(EclRtlService);\n private differs = inject(IterableDiffers);\n private scrollDispatcher: ScrollDispatcher = inject(ScrollDispatcher);\n private zone = inject(NgZone);\n private cdkBreakpointObserver = inject(BreakpointObserver);\n private viewportRuler = inject(ViewportRuler);\n private eclInpageNavigationService = inject(EclInpageNavigationService);\n private cdr = inject(ChangeDetectorRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly doc = inject(DOCUMENT);\n private readonly win = this.doc.defaultView; // Window | null\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n constructor() {\n super();\n this.differ = this.differs.find([]).create();\n afterNextRender(() => {\n this.zone.run(() => this.setListHeight());\n });\n }\n\n ngOnInit(): void {\n this.handleRtlChangeState();\n }\n\n ngAfterViewInit() {\n if (!this.isBrowser) return;\n\n this.subscribeToCDKScrollEvent();\n this.observeBreakpointChanges();\n this.viewportRuler.change(300)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.zone.run(() => this.setListHeight()));\n\n if (typeof IntersectionObserver !== 'undefined' && this.togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(this.togglerButton.nativeElement);\n }\n }\n\n get hasNavigationList(): boolean {\n return !!this.eclNavigationList;\n }\n\n get currentNavigationLinkItem(): EclInpageNavigationItemComponent {\n return this.eclNavigationLinkItems.find((item) => item.sectionElement === this.currentSectionElement);\n }\n\n /**\n * the size of the arrow-down icon, used in mobile view. There are different sizes for EC and EU themes.\n */\n get sizeIcon(): string {\n if (this.eclThemeService.isECTheme()) {\n return this.ICON_SIZE_EC_THEME;\n } else {\n return this.ICON_SIZE_EU_THEME;\n }\n }\n\n get hasActiveSection(): boolean {\n return !!this.currentSectionElement;\n }\n\n ngDoCheck(): void {\n const diff = this.differ.diff(this.eclNavigationLinkItems);\n if (diff) {\n diff.forEachItem((item) => {\n this.connectItemEvents(item.item);\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n if (this.intersectionObserver && this.togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(this.togglerButton.nativeElement);\n this.intersectionObserver.disconnect();\n }\n }\n\n /**\n * On mobile view - handle the dropdown toggle.\n */\n onExpandButtonClick(): void {\n this.setButtonExpanded(!this.isButtonExpanded);\n }\n\n /**\n * Single entry point for changing the dropdown expanded state. Keeps the local flag (used for the button's\n * aria-expanded) and the shared service state (that drives the list's visibility class) in sync.\n */\n private setButtonExpanded(isExpanded: boolean): void {\n this.isButtonExpanded = isExpanded;\n this.eclInpageNavigationService.eclInpageNavigationToggle(isExpanded);\n }\n\n /**\n * Dropdown keyboard navigation on mobile view.\n * @param evt\n */\n onExpandButtonKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case 'Tab':\n this.onExpandButtonTab(evt);\n break;\n case 'ArrowDown':\n this.onExpandButtonArrowDown(evt);\n break;\n default:\n break;\n }\n }\n\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n this.isRtl = rtlState;\n });\n }\n\n /**\n * Set the height of the list with the navigation items in px. So in case the full list cannot be displayed, a scroll will appear.\n */\n private setListHeight(): void {\n if (!this.isBrowser) return;\n if (!this.eclNavigationList) return;\n if (!this.win) return;\n\n const viewportHeight = this.win.innerHeight;\n const viewportWidth = this.win.innerWidth;\n let topPosition = 0;\n\n if (viewportWidth < this.TABLET_BREAKPOINT) {\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (toggleWrapper) {\n const styles = this.win.getComputedStyle(toggleWrapper);\n topPosition =\n toggleWrapper.getBoundingClientRect().bottom +\n parseFloat(styles.marginBottom || '0');\n }\n } else if (this.eclTitle) {\n const titleEl = this.navTittle?.nativeElement;\n if (titleEl) topPosition = titleEl.getBoundingClientRect().bottom;\n } else {\n const listEl = this.eclNavigationList?.el?.nativeElement;\n if (listEl) topPosition = listEl.getBoundingClientRect().top;\n }\n\n const availableSpace = viewportHeight - topPosition;\n if (availableSpace > 0) {\n this.listMaxHeight = availableSpace;\n this.eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.setButtonExpanded(true);\n this.eclNavigationLinkItems.get(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems.get(this.eclNavigationLinkItems.length - 1).onFocus();\n }\n }\n\n private connectItemEvents(item: EclInpageNavigationItemComponent): void {\n item.itemArrowDown.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowDown(item);\n });\n\n item.itemArrowUp.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowUp(item);\n });\n\n item.itemTab.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemTab(item, evt);\n });\n\n item.itemEnter.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemEnter(item);\n });\n\n item.itemClick.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n item.sectionElement.focus();\n }\n this.setButtonExpanded(false);\n });\n }\n\n private onItemEnter(item: EclInpageNavigationItemComponent): void {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n if (item.sectionElement.tabIndex === -1) {\n item.sectionElement.tabIndex = 0;\n item.sectionElement.focus();\n item.sectionElement.tabIndex = -1;\n }\n }\n this.setButtonExpanded(false);\n }\n\n /**\n * Scrolls the target section into view. On desktop this is a plain scrollIntoView() (unchanged behaviour). On\n * mobile the in-page navigation toggler is sticky at the top, so a top-aligned scroll would hide the heading\n * underneath it; we therefore set `scroll-margin-top` on the target (sticky toggler height + spacing buffer) and\n * let scrollIntoView() honour it. Using scroll-margin-top instead of a manual window.scrollTo() keeps this working\n * regardless of which element is the actual scroll container (window or a nested scrollable wrapper).\n */\n private scrollToSection(sectionElement: HTMLElement): void {\n if (!this.isBrowser) return;\n\n const offset = this.getMobileScrollOffset();\n sectionElement.style.scrollMarginTop = offset > 0 ? `${offset}px` : '';\n sectionElement.scrollIntoView();\n }\n\n /**\n * The offset (px) applied on mobile so that a scrolled-to heading clears the sticky toggler: the toggler height\n * plus a spacing buffer. Returns 0 on desktop (no sticky toggler). Shared by the scroll logic and the scroll-spy\n * so the heading lands exactly where the spy expects it, keeping the active item in sync after a click.\n */\n private getMobileScrollOffset(): number {\n if (!this.isMobileBreakpoint) return 0;\n\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (!toggleWrapper) return 0;\n\n return toggleWrapper.getBoundingClientRect().height + this.MOBILE_SCROLL_SPACING;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== this.eclNavigationLinkItems.length - 1) {\n this.eclNavigationLinkItems.get(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems.get(index - 1).onFocus();\n } else {\n if (this.isMobileBreakpoint && this.togglerButton) {\n this.setButtonExpanded(false);\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n\n private onItemTab(item: EclInpageNavigationItemComponent, evt: Event): void {\n if (this.isMobileBreakpoint) {\n if (!(evt as KeyboardEvent).shiftKey) {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index === this.eclNavigationLinkItems.length - 1) {\n evt.preventDefault();\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n }\n\n private subscribeToCDKScrollEvent(): void {\n if (!this.isBrowser) return;\n\n this.scrollDispatcher\n .scrolled()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.zone.run(() => {\n const ids = this.eclNavigationLinkItems.map((item) => item.sectionId);\n\n const sectionElements = ids\n .map((id) => this.doc.querySelector<HTMLElement>(`#${id}`))\n .filter((el): el is HTMLElement => !!el);\n\n this.handleNavigationLinksHighlight(sectionElements);\n this.setListHeight();\n });\n });\n }\n\n private selectNavigationItem(itemElement: HTMLElement): void {\n this.eclNavigationLinkItems.forEach((it) => {\n it.isActive = it.sectionElement === itemElement;\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: Array<HTMLElement>): void {\n const currentSectionElement = this.findActiveSectionElement(sectionElements);\n\n if (currentSectionElement !== this.currentSectionElement) {\n this.currentSectionElement = currentSectionElement ?? undefined as HTMLElement | null;\n if (currentSectionElement) this.selectNavigationItem(currentSectionElement);\n\n const sectionId = this.currentNavigationLinkItem?.sectionId;\n this.sectionEnter.next(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: Array<HTMLElement>): HTMLElement | null {\n if (!this.isBrowser || !this.win) return null;\n\n let currentSection: HTMLElement | null = null;\n // On mobile the heading is scrolled to sit just below the sticky toggler, so the spy must use that same\n // offset; otherwise it would highlight the previous section. On desktop keep the original threshold.\n const offset = this.isMobileBreakpoint\n ? this.getMobileScrollOffset()\n : this.MIN_DISTANCE_TOP + (this.offsetTop ?? 0);\n\n const isNearBottom =\n this.win.innerHeight + this.win.scrollY >=\n this.doc.documentElement.scrollHeight - 10;\n\n for (const sectionElement of sectionElements) {\n const rect = sectionElement.getBoundingClientRect();\n const isAboveOffset = rect.top <= offset;\n const isVisibleInViewport = rect.top < this.win.innerHeight;\n\n if (isAboveOffset || (isVisibleInViewport && isNearBottom)) {\n currentSection = sectionElement;\n }\n }\n\n return currentSection;\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe([Breakpoints.Handset, Breakpoints.Tablet, Breakpoints.Small])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobileBreakpoint = result.matches;\n });\n }\n}\n",
|
|
4313
|
+
"sourceCode": "import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, ContentChild, ContentChildren, DOCUMENT, DoCheck, ElementRef, EventEmitter, Input, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, Output, PLATFORM_ID, QueryList, ViewChild, afterNextRender, inject, numberAttribute } from '@angular/core';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_STICKY_CONTAINER } from '@eui/ecl/components/ecl-sticky-container';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService, EclThemeService } from '@eui/ecl/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { EclInpageNavigationItemComponent } from './ecl-inpage-navigation-item.component';\nimport { EclInpageNavigationListDirective } from './ecl-inpage-navigation-list.directive';\nimport { EclInpageNavigationService } from './services/ecl-inpage-navigation.service';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport class EclInpageNavigationSectionEnterEvent extends EclBaseEvent {\n constructor(public sectionId: string) {\n super();\n }\n}\n\n/**\n * The in-page navigation is a vertical menu containing (anchored) links to H2-headings on long content pages.\n * It gives the user an overview of the page contents and has a fixed position (does not move while scrolling) at either the left\n * side of a page on desktop or top-bar on mobile. This component helps users scan of the page quickly contents and may potentially\n * reduce vertical scrolling, allowing users to easily jump straight to the segment of the page.\n */\n@Component({\n selector: 'ecl-inpage-navigation',\n templateUrl: './ecl-inpage-navigation.component.html',\n imports: [TranslateModule, ...EUI_ECL_STICKY_CONTAINER, ...EUI_ECL_ICON],\n styles: [\n `\n @media (min-width: 996px) {\n .ecl-inpage-navigation__list {\n display: block !important;\n }\n }\n `,\n ],\n})\nexport class EclInpageNavigationComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy, DoCheck {\n eclThemeService = inject(EclThemeService);\n\n @Input() eclTitle: string;\n /**\n * Used to calculate component's position.\n */\n @Input() marginTop: number;\n @Input() marginBottom: number;\n /**\n * Sets the offset from the top of the page (for example if there is a toolbar or header). Used to calculate scrolling behaviour.\n */\n @Input({ transform: numberAttribute }) offsetTop: number;\n @ViewChild('togglerButton') togglerButton: ElementRef<HTMLButtonElement>;\n @ViewChild('toggleWrapper') toggleWrapper: ElementRef<HTMLDivElement>;\n @ViewChild('navTittle') navTittle: ElementRef<HTMLDivElement>;\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n @Output() sectionEnter = new EventEmitter<EclInpageNavigationSectionEnterEvent>();\n\n @ContentChildren(EclInpageNavigationItemComponent, { descendants: true }) eclNavigationLinkItems: QueryList<EclInpageNavigationItemComponent>;\n @ContentChild(EclInpageNavigationListDirective) eclNavigationList: EclInpageNavigationListDirective;\n\n /**\n * Used for the mobile view, where user can select a section from the dropdown.\n */\n isButtonExpanded = false;\n currentSectionElement: HTMLElement | null = null;\n public isRtl = false;\n public listMaxHeight: number;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private differ: IterableDiffer<EclInpageNavigationItemComponent>;\n private isMobileBreakpoint = false;\n private MIN_DISTANCE_TOP = 10;\n /**\n * Extra spacing (px) kept between the sticky toggler and the target heading when scrolling to a section on mobile,\n * so the heading is not flush against the toggler. Mirrors the spacing buffer used by the vanilla ECL\n * `scroll-margin-top` rule (trigger height + spacing).\n */\n private readonly MOBILE_SCROLL_SPACING = 16;\n private readonly ICON_SIZE_EC_THEME = '2xs';\n private readonly ICON_SIZE_EU_THEME = 's';\n private readonly TABLET_BREAKPOINT = 996;\n private intersectionObserver: IntersectionObserver;\n private eclRtlService = inject(EclRtlService);\n private differs = inject(IterableDiffers);\n private scrollDispatcher: ScrollDispatcher = inject(ScrollDispatcher);\n private zone = inject(NgZone);\n private cdkBreakpointObserver = inject(BreakpointObserver);\n private viewportRuler = inject(ViewportRuler);\n private eclInpageNavigationService = inject(EclInpageNavigationService);\n private cdr = inject(ChangeDetectorRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly doc = inject(DOCUMENT);\n private readonly win = this.doc.defaultView; // Window | null\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n constructor() {\n super();\n this.differ = this.differs.find([]).create();\n afterNextRender(() => {\n this.zone.run(() => this.setListHeight());\n });\n }\n\n ngOnInit(): void {\n this.handleRtlChangeState();\n }\n\n ngAfterViewInit() {\n if (!this.isBrowser) return;\n\n this.subscribeToCDKScrollEvent();\n this.observeBreakpointChanges();\n this.viewportRuler.change(300)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.zone.run(() => this.setListHeight()));\n\n if (typeof IntersectionObserver !== 'undefined' && this.togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(this.togglerButton.nativeElement);\n }\n }\n\n get hasNavigationList(): boolean {\n return !!this.eclNavigationList;\n }\n\n get currentNavigationLinkItem(): EclInpageNavigationItemComponent {\n return this.eclNavigationLinkItems.find((item) => item.sectionElement === this.currentSectionElement);\n }\n\n /**\n * the size of the arrow-down icon, used in mobile view. There are different sizes for EC and EU themes.\n */\n get sizeIcon(): string {\n if (this.eclThemeService.isECTheme()) {\n return this.ICON_SIZE_EC_THEME;\n } else {\n return this.ICON_SIZE_EU_THEME;\n }\n }\n\n get hasActiveSection(): boolean {\n return !!this.currentSectionElement;\n }\n\n ngDoCheck(): void {\n const diff = this.differ.diff(this.eclNavigationLinkItems);\n if (diff) {\n diff.forEachItem((item) => {\n this.connectItemEvents(item.item);\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n if (this.intersectionObserver && this.togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(this.togglerButton.nativeElement);\n this.intersectionObserver.disconnect();\n }\n }\n\n /**\n * On mobile view - handle the dropdown toggle.\n */\n onExpandButtonClick(): void {\n this.setButtonExpanded(!this.isButtonExpanded);\n }\n\n /**\n * Single entry point for changing the dropdown expanded state. Keeps the local flag (used for the button's\n * aria-expanded) and the shared service state (that drives the list's visibility class) in sync.\n */\n private setButtonExpanded(isExpanded: boolean): void {\n this.isButtonExpanded = isExpanded;\n this.eclInpageNavigationService.eclInpageNavigationToggle(isExpanded);\n }\n\n /**\n * Dropdown keyboard navigation on mobile view.\n * @param evt\n */\n onExpandButtonKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case 'Tab':\n this.onExpandButtonTab(evt);\n break;\n case 'ArrowDown':\n this.onExpandButtonArrowDown(evt);\n break;\n default:\n break;\n }\n }\n\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n this.isRtl = rtlState;\n });\n }\n\n /**\n * Set the height of the list with the navigation items in px. So in case the full list cannot be displayed, a scroll will appear.\n */\n private setListHeight(): void {\n if (!this.isBrowser) return;\n if (!this.eclNavigationList) return;\n if (!this.win) return;\n\n const viewportHeight = this.win.innerHeight;\n const viewportWidth = this.win.innerWidth;\n let topPosition = 0;\n\n if (viewportWidth < this.TABLET_BREAKPOINT) {\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (toggleWrapper) {\n const styles = this.win.getComputedStyle(toggleWrapper);\n topPosition =\n toggleWrapper.getBoundingClientRect().bottom +\n parseFloat(styles.marginBottom || '0');\n }\n } else if (this.eclTitle) {\n const titleEl = this.navTittle?.nativeElement;\n if (titleEl) topPosition = titleEl.getBoundingClientRect().bottom;\n } else {\n const listEl = this.eclNavigationList?.el?.nativeElement;\n if (listEl) topPosition = listEl.getBoundingClientRect().top;\n }\n\n const availableSpace = viewportHeight - topPosition;\n if (availableSpace > 0) {\n this.listMaxHeight = availableSpace;\n this.eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.setButtonExpanded(true);\n this.eclNavigationLinkItems.get(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems.get(this.eclNavigationLinkItems.length - 1).onFocus();\n }\n }\n\n private connectItemEvents(item: EclInpageNavigationItemComponent): void {\n item.itemArrowDown.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowDown(item);\n });\n\n item.itemArrowUp.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowUp(item);\n });\n\n item.itemTab.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemTab(item, evt);\n });\n\n item.itemEnter.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemEnter(item);\n });\n\n item.itemClick.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n item.sectionElement.focus();\n }\n this.setButtonExpanded(false);\n });\n }\n\n private onItemEnter(item: EclInpageNavigationItemComponent): void {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n if (item.sectionElement.tabIndex === -1) {\n item.sectionElement.tabIndex = 0;\n item.sectionElement.focus();\n item.sectionElement.tabIndex = -1;\n }\n }\n this.setButtonExpanded(false);\n }\n\n /**\n * Scrolls the target section into view. On desktop this is a plain scrollIntoView() (unchanged behaviour). On\n * mobile the in-page navigation toggler is sticky at the top, so a top-aligned scroll would hide the heading\n * underneath it; we therefore set `scroll-margin-top` on the target (sticky toggler height + spacing buffer) and\n * let scrollIntoView() honour it. Using scroll-margin-top instead of a manual window.scrollTo() keeps this working\n * regardless of which element is the actual scroll container (window or a nested scrollable wrapper).\n */\n private scrollToSection(sectionElement: HTMLElement): void {\n if (!this.isBrowser) return;\n\n const offset = this.getMobileScrollOffset();\n sectionElement.style.scrollMarginTop = offset > 0 ? `${offset}px` : '';\n sectionElement.scrollIntoView();\n }\n\n /**\n * The offset (px) applied on mobile so that a scrolled-to heading clears the sticky toggler: the toggler height\n * plus a spacing buffer. Returns 0 on desktop (no sticky toggler). Shared by the scroll logic and the scroll-spy\n * so the heading lands exactly where the spy expects it, keeping the active item in sync after a click.\n */\n private getMobileScrollOffset(): number {\n if (!this.isMobileBreakpoint) return 0;\n\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (!toggleWrapper) return 0;\n\n return toggleWrapper.getBoundingClientRect().height + this.MOBILE_SCROLL_SPACING;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== this.eclNavigationLinkItems.length - 1) {\n this.eclNavigationLinkItems.get(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems.get(index - 1).onFocus();\n } else {\n if (this.isMobileBreakpoint && this.togglerButton) {\n this.setButtonExpanded(false);\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n\n private onItemTab(item: EclInpageNavigationItemComponent, evt: Event): void {\n if (this.isMobileBreakpoint) {\n if (!(evt as KeyboardEvent).shiftKey) {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index === this.eclNavigationLinkItems.length - 1) {\n evt.preventDefault();\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n }\n\n private subscribeToCDKScrollEvent(): void {\n if (!this.isBrowser) return;\n\n this.scrollDispatcher\n .scrolled()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.zone.run(() => {\n const ids = this.eclNavigationLinkItems.map((item) => item.sectionId);\n\n const sectionElements = ids\n .map((id) => this.doc.querySelector<HTMLElement>(`#${id}`))\n .filter((el): el is HTMLElement => !!el);\n\n this.handleNavigationLinksHighlight(sectionElements);\n this.setListHeight();\n });\n });\n }\n\n private selectNavigationItem(itemElement: HTMLElement): void {\n this.eclNavigationLinkItems.forEach((it) => {\n it.isActive = it.sectionElement === itemElement;\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: Array<HTMLElement>): void {\n const currentSectionElement = this.findActiveSectionElement(sectionElements);\n\n if (currentSectionElement !== this.currentSectionElement) {\n this.currentSectionElement = currentSectionElement ?? undefined as HTMLElement | null;\n if (currentSectionElement) this.selectNavigationItem(currentSectionElement);\n\n const sectionId = this.currentNavigationLinkItem?.sectionId;\n this.sectionEnter.next(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: Array<HTMLElement>): HTMLElement | null {\n if (!this.isBrowser || !this.win) return null;\n\n let currentSection: HTMLElement | null = null;\n // On mobile the heading is scrolled to sit just below the sticky toggler (getMobileScrollOffset). Because the\n // scroll target and the spy threshold would otherwise be the exact same value, a heading landing right on the\n // boundary (with sub-pixel rounding) could be treated as \"not yet reached\" and the previous section would be\n // highlighted instead. Adding MIN_DISTANCE_TOP as a cushion lands the heading just inside the active zone,\n // mirroring how the desktop threshold already uses MIN_DISTANCE_TOP.\n const offset = this.isMobileBreakpoint\n ? this.getMobileScrollOffset() + this.MIN_DISTANCE_TOP\n : this.MIN_DISTANCE_TOP + (this.offsetTop ?? 0);\n\n const isNearBottom =\n this.win.innerHeight + this.win.scrollY >=\n this.doc.documentElement.scrollHeight - 10;\n\n for (const sectionElement of sectionElements) {\n const rect = sectionElement.getBoundingClientRect();\n const isAboveOffset = rect.top <= offset;\n const isVisibleInViewport = rect.top < this.win.innerHeight;\n\n if (isAboveOffset || (isVisibleInViewport && isNearBottom)) {\n currentSection = sectionElement;\n }\n }\n\n return currentSection;\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe([Breakpoints.Handset, Breakpoints.Tablet, Breakpoints.Small])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobileBreakpoint = result.matches;\n });\n }\n}\n",
|
|
4314
4314
|
"constructorObj": {
|
|
4315
4315
|
"name": "constructor",
|
|
4316
4316
|
"description": "",
|
|
@@ -45760,7 +45760,7 @@
|
|
|
45760
45760
|
},
|
|
45761
45761
|
{
|
|
45762
45762
|
"name": "EclInpageNavigationComponent",
|
|
45763
|
-
"id": "component-EclInpageNavigationComponent-
|
|
45763
|
+
"id": "component-EclInpageNavigationComponent-1baa0416d6ce484a25d94dad7ac099730d64b95a4a509193e48a7d9a66c8d0d63fd7eb94bfa3b225d4ec82bba50a0e665d88a531421660728ef786b9c05d87a1",
|
|
45764
45764
|
"file": "packages/ecl/components/ecl-inpage-navigation/ecl-inpage-navigation.component.ts",
|
|
45765
45765
|
"encapsulation": [],
|
|
45766
45766
|
"entryComponents": [],
|
|
@@ -46178,7 +46178,7 @@
|
|
|
46178
46178
|
"description": "<p>The in-page navigation is a vertical menu containing (anchored) links to H2-headings on long content pages.\nIt gives the user an overview of the page contents and has a fixed position (does not move while scrolling) at either the left\nside of a page on desktop or top-bar on mobile. This component helps users scan of the page quickly contents and may potentially\nreduce vertical scrolling, allowing users to easily jump straight to the segment of the page.</p>\n",
|
|
46179
46179
|
"rawdescription": "\n\nThe in-page navigation is a vertical menu containing (anchored) links to H2-headings on long content pages.\nIt gives the user an overview of the page contents and has a fixed position (does not move while scrolling) at either the left\nside of a page on desktop or top-bar on mobile. This component helps users scan of the page quickly contents and may potentially\nreduce vertical scrolling, allowing users to easily jump straight to the segment of the page.\n",
|
|
46180
46180
|
"type": "component",
|
|
46181
|
-
"sourceCode": "import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, ContentChild, ContentChildren, DOCUMENT, DoCheck, ElementRef, EventEmitter, Input, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, Output, PLATFORM_ID, QueryList, ViewChild, afterNextRender, inject, numberAttribute } from '@angular/core';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_STICKY_CONTAINER } from '@eui/ecl/components/ecl-sticky-container';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService, EclThemeService } from '@eui/ecl/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { EclInpageNavigationItemComponent } from './ecl-inpage-navigation-item.component';\nimport { EclInpageNavigationListDirective } from './ecl-inpage-navigation-list.directive';\nimport { EclInpageNavigationService } from './services/ecl-inpage-navigation.service';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport class EclInpageNavigationSectionEnterEvent extends EclBaseEvent {\n constructor(public sectionId: string) {\n super();\n }\n}\n\n/**\n * The in-page navigation is a vertical menu containing (anchored) links to H2-headings on long content pages.\n * It gives the user an overview of the page contents and has a fixed position (does not move while scrolling) at either the left\n * side of a page on desktop or top-bar on mobile. This component helps users scan of the page quickly contents and may potentially\n * reduce vertical scrolling, allowing users to easily jump straight to the segment of the page.\n */\n@Component({\n selector: 'ecl-inpage-navigation',\n templateUrl: './ecl-inpage-navigation.component.html',\n imports: [TranslateModule, ...EUI_ECL_STICKY_CONTAINER, ...EUI_ECL_ICON],\n styles: [\n `\n @media (min-width: 996px) {\n .ecl-inpage-navigation__list {\n display: block !important;\n }\n }\n `,\n ],\n})\nexport class EclInpageNavigationComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy, DoCheck {\n eclThemeService = inject(EclThemeService);\n\n @Input() eclTitle: string;\n /**\n * Used to calculate component's position.\n */\n @Input() marginTop: number;\n @Input() marginBottom: number;\n /**\n * Sets the offset from the top of the page (for example if there is a toolbar or header). Used to calculate scrolling behaviour.\n */\n @Input({ transform: numberAttribute }) offsetTop: number;\n @ViewChild('togglerButton') togglerButton: ElementRef<HTMLButtonElement>;\n @ViewChild('toggleWrapper') toggleWrapper: ElementRef<HTMLDivElement>;\n @ViewChild('navTittle') navTittle: ElementRef<HTMLDivElement>;\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n @Output() sectionEnter = new EventEmitter<EclInpageNavigationSectionEnterEvent>();\n\n @ContentChildren(EclInpageNavigationItemComponent, { descendants: true }) eclNavigationLinkItems: QueryList<EclInpageNavigationItemComponent>;\n @ContentChild(EclInpageNavigationListDirective) eclNavigationList: EclInpageNavigationListDirective;\n\n /**\n * Used for the mobile view, where user can select a section from the dropdown.\n */\n isButtonExpanded = false;\n currentSectionElement: HTMLElement | null = null;\n public isRtl = false;\n public listMaxHeight: number;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private differ: IterableDiffer<EclInpageNavigationItemComponent>;\n private isMobileBreakpoint = false;\n private MIN_DISTANCE_TOP = 10;\n /**\n * Extra spacing (px) kept between the sticky toggler and the target heading when scrolling to a section on mobile,\n * so the heading is not flush against the toggler. Mirrors the spacing buffer used by the vanilla ECL\n * `scroll-margin-top` rule (trigger height + spacing).\n */\n private readonly MOBILE_SCROLL_SPACING = 16;\n private readonly ICON_SIZE_EC_THEME = '2xs';\n private readonly ICON_SIZE_EU_THEME = 's';\n private readonly TABLET_BREAKPOINT = 996;\n private intersectionObserver: IntersectionObserver;\n private eclRtlService = inject(EclRtlService);\n private differs = inject(IterableDiffers);\n private scrollDispatcher: ScrollDispatcher = inject(ScrollDispatcher);\n private zone = inject(NgZone);\n private cdkBreakpointObserver = inject(BreakpointObserver);\n private viewportRuler = inject(ViewportRuler);\n private eclInpageNavigationService = inject(EclInpageNavigationService);\n private cdr = inject(ChangeDetectorRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly doc = inject(DOCUMENT);\n private readonly win = this.doc.defaultView; // Window | null\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n constructor() {\n super();\n this.differ = this.differs.find([]).create();\n afterNextRender(() => {\n this.zone.run(() => this.setListHeight());\n });\n }\n\n ngOnInit(): void {\n this.handleRtlChangeState();\n }\n\n ngAfterViewInit() {\n if (!this.isBrowser) return;\n\n this.subscribeToCDKScrollEvent();\n this.observeBreakpointChanges();\n this.viewportRuler.change(300)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.zone.run(() => this.setListHeight()));\n\n if (typeof IntersectionObserver !== 'undefined' && this.togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(this.togglerButton.nativeElement);\n }\n }\n\n get hasNavigationList(): boolean {\n return !!this.eclNavigationList;\n }\n\n get currentNavigationLinkItem(): EclInpageNavigationItemComponent {\n return this.eclNavigationLinkItems.find((item) => item.sectionElement === this.currentSectionElement);\n }\n\n /**\n * the size of the arrow-down icon, used in mobile view. There are different sizes for EC and EU themes.\n */\n get sizeIcon(): string {\n if (this.eclThemeService.isECTheme()) {\n return this.ICON_SIZE_EC_THEME;\n } else {\n return this.ICON_SIZE_EU_THEME;\n }\n }\n\n get hasActiveSection(): boolean {\n return !!this.currentSectionElement;\n }\n\n ngDoCheck(): void {\n const diff = this.differ.diff(this.eclNavigationLinkItems);\n if (diff) {\n diff.forEachItem((item) => {\n this.connectItemEvents(item.item);\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n if (this.intersectionObserver && this.togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(this.togglerButton.nativeElement);\n this.intersectionObserver.disconnect();\n }\n }\n\n /**\n * On mobile view - handle the dropdown toggle.\n */\n onExpandButtonClick(): void {\n this.setButtonExpanded(!this.isButtonExpanded);\n }\n\n /**\n * Single entry point for changing the dropdown expanded state. Keeps the local flag (used for the button's\n * aria-expanded) and the shared service state (that drives the list's visibility class) in sync.\n */\n private setButtonExpanded(isExpanded: boolean): void {\n this.isButtonExpanded = isExpanded;\n this.eclInpageNavigationService.eclInpageNavigationToggle(isExpanded);\n }\n\n /**\n * Dropdown keyboard navigation on mobile view.\n * @param evt\n */\n onExpandButtonKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case 'Tab':\n this.onExpandButtonTab(evt);\n break;\n case 'ArrowDown':\n this.onExpandButtonArrowDown(evt);\n break;\n default:\n break;\n }\n }\n\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n this.isRtl = rtlState;\n });\n }\n\n /**\n * Set the height of the list with the navigation items in px. So in case the full list cannot be displayed, a scroll will appear.\n */\n private setListHeight(): void {\n if (!this.isBrowser) return;\n if (!this.eclNavigationList) return;\n if (!this.win) return;\n\n const viewportHeight = this.win.innerHeight;\n const viewportWidth = this.win.innerWidth;\n let topPosition = 0;\n\n if (viewportWidth < this.TABLET_BREAKPOINT) {\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (toggleWrapper) {\n const styles = this.win.getComputedStyle(toggleWrapper);\n topPosition =\n toggleWrapper.getBoundingClientRect().bottom +\n parseFloat(styles.marginBottom || '0');\n }\n } else if (this.eclTitle) {\n const titleEl = this.navTittle?.nativeElement;\n if (titleEl) topPosition = titleEl.getBoundingClientRect().bottom;\n } else {\n const listEl = this.eclNavigationList?.el?.nativeElement;\n if (listEl) topPosition = listEl.getBoundingClientRect().top;\n }\n\n const availableSpace = viewportHeight - topPosition;\n if (availableSpace > 0) {\n this.listMaxHeight = availableSpace;\n this.eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.setButtonExpanded(true);\n this.eclNavigationLinkItems.get(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems.get(this.eclNavigationLinkItems.length - 1).onFocus();\n }\n }\n\n private connectItemEvents(item: EclInpageNavigationItemComponent): void {\n item.itemArrowDown.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowDown(item);\n });\n\n item.itemArrowUp.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowUp(item);\n });\n\n item.itemTab.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemTab(item, evt);\n });\n\n item.itemEnter.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemEnter(item);\n });\n\n item.itemClick.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n item.sectionElement.focus();\n }\n this.setButtonExpanded(false);\n });\n }\n\n private onItemEnter(item: EclInpageNavigationItemComponent): void {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n if (item.sectionElement.tabIndex === -1) {\n item.sectionElement.tabIndex = 0;\n item.sectionElement.focus();\n item.sectionElement.tabIndex = -1;\n }\n }\n this.setButtonExpanded(false);\n }\n\n /**\n * Scrolls the target section into view. On desktop this is a plain scrollIntoView() (unchanged behaviour). On\n * mobile the in-page navigation toggler is sticky at the top, so a top-aligned scroll would hide the heading\n * underneath it; we therefore set `scroll-margin-top` on the target (sticky toggler height + spacing buffer) and\n * let scrollIntoView() honour it. Using scroll-margin-top instead of a manual window.scrollTo() keeps this working\n * regardless of which element is the actual scroll container (window or a nested scrollable wrapper).\n */\n private scrollToSection(sectionElement: HTMLElement): void {\n if (!this.isBrowser) return;\n\n const offset = this.getMobileScrollOffset();\n sectionElement.style.scrollMarginTop = offset > 0 ? `${offset}px` : '';\n sectionElement.scrollIntoView();\n }\n\n /**\n * The offset (px) applied on mobile so that a scrolled-to heading clears the sticky toggler: the toggler height\n * plus a spacing buffer. Returns 0 on desktop (no sticky toggler). Shared by the scroll logic and the scroll-spy\n * so the heading lands exactly where the spy expects it, keeping the active item in sync after a click.\n */\n private getMobileScrollOffset(): number {\n if (!this.isMobileBreakpoint) return 0;\n\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (!toggleWrapper) return 0;\n\n return toggleWrapper.getBoundingClientRect().height + this.MOBILE_SCROLL_SPACING;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== this.eclNavigationLinkItems.length - 1) {\n this.eclNavigationLinkItems.get(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems.get(index - 1).onFocus();\n } else {\n if (this.isMobileBreakpoint && this.togglerButton) {\n this.setButtonExpanded(false);\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n\n private onItemTab(item: EclInpageNavigationItemComponent, evt: Event): void {\n if (this.isMobileBreakpoint) {\n if (!(evt as KeyboardEvent).shiftKey) {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index === this.eclNavigationLinkItems.length - 1) {\n evt.preventDefault();\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n }\n\n private subscribeToCDKScrollEvent(): void {\n if (!this.isBrowser) return;\n\n this.scrollDispatcher\n .scrolled()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.zone.run(() => {\n const ids = this.eclNavigationLinkItems.map((item) => item.sectionId);\n\n const sectionElements = ids\n .map((id) => this.doc.querySelector<HTMLElement>(`#${id}`))\n .filter((el): el is HTMLElement => !!el);\n\n this.handleNavigationLinksHighlight(sectionElements);\n this.setListHeight();\n });\n });\n }\n\n private selectNavigationItem(itemElement: HTMLElement): void {\n this.eclNavigationLinkItems.forEach((it) => {\n it.isActive = it.sectionElement === itemElement;\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: Array<HTMLElement>): void {\n const currentSectionElement = this.findActiveSectionElement(sectionElements);\n\n if (currentSectionElement !== this.currentSectionElement) {\n this.currentSectionElement = currentSectionElement ?? undefined as HTMLElement | null;\n if (currentSectionElement) this.selectNavigationItem(currentSectionElement);\n\n const sectionId = this.currentNavigationLinkItem?.sectionId;\n this.sectionEnter.next(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: Array<HTMLElement>): HTMLElement | null {\n if (!this.isBrowser || !this.win) return null;\n\n let currentSection: HTMLElement | null = null;\n // On mobile the heading is scrolled to sit just below the sticky toggler, so the spy must use that same\n // offset; otherwise it would highlight the previous section. On desktop keep the original threshold.\n const offset = this.isMobileBreakpoint\n ? this.getMobileScrollOffset()\n : this.MIN_DISTANCE_TOP + (this.offsetTop ?? 0);\n\n const isNearBottom =\n this.win.innerHeight + this.win.scrollY >=\n this.doc.documentElement.scrollHeight - 10;\n\n for (const sectionElement of sectionElements) {\n const rect = sectionElement.getBoundingClientRect();\n const isAboveOffset = rect.top <= offset;\n const isVisibleInViewport = rect.top < this.win.innerHeight;\n\n if (isAboveOffset || (isVisibleInViewport && isNearBottom)) {\n currentSection = sectionElement;\n }\n }\n\n return currentSection;\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe([Breakpoints.Handset, Breakpoints.Tablet, Breakpoints.Small])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobileBreakpoint = result.matches;\n });\n }\n}\n",
|
|
46181
|
+
"sourceCode": "import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, ContentChild, ContentChildren, DOCUMENT, DoCheck, ElementRef, EventEmitter, Input, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, Output, PLATFORM_ID, QueryList, ViewChild, afterNextRender, inject, numberAttribute } from '@angular/core';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_STICKY_CONTAINER } from '@eui/ecl/components/ecl-sticky-container';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService, EclThemeService } from '@eui/ecl/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { EclInpageNavigationItemComponent } from './ecl-inpage-navigation-item.component';\nimport { EclInpageNavigationListDirective } from './ecl-inpage-navigation-list.directive';\nimport { EclInpageNavigationService } from './services/ecl-inpage-navigation.service';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport class EclInpageNavigationSectionEnterEvent extends EclBaseEvent {\n constructor(public sectionId: string) {\n super();\n }\n}\n\n/**\n * The in-page navigation is a vertical menu containing (anchored) links to H2-headings on long content pages.\n * It gives the user an overview of the page contents and has a fixed position (does not move while scrolling) at either the left\n * side of a page on desktop or top-bar on mobile. This component helps users scan of the page quickly contents and may potentially\n * reduce vertical scrolling, allowing users to easily jump straight to the segment of the page.\n */\n@Component({\n selector: 'ecl-inpage-navigation',\n templateUrl: './ecl-inpage-navigation.component.html',\n imports: [TranslateModule, ...EUI_ECL_STICKY_CONTAINER, ...EUI_ECL_ICON],\n styles: [\n `\n @media (min-width: 996px) {\n .ecl-inpage-navigation__list {\n display: block !important;\n }\n }\n `,\n ],\n})\nexport class EclInpageNavigationComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy, DoCheck {\n eclThemeService = inject(EclThemeService);\n\n @Input() eclTitle: string;\n /**\n * Used to calculate component's position.\n */\n @Input() marginTop: number;\n @Input() marginBottom: number;\n /**\n * Sets the offset from the top of the page (for example if there is a toolbar or header). Used to calculate scrolling behaviour.\n */\n @Input({ transform: numberAttribute }) offsetTop: number;\n @ViewChild('togglerButton') togglerButton: ElementRef<HTMLButtonElement>;\n @ViewChild('toggleWrapper') toggleWrapper: ElementRef<HTMLDivElement>;\n @ViewChild('navTittle') navTittle: ElementRef<HTMLDivElement>;\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n @Output() sectionEnter = new EventEmitter<EclInpageNavigationSectionEnterEvent>();\n\n @ContentChildren(EclInpageNavigationItemComponent, { descendants: true }) eclNavigationLinkItems: QueryList<EclInpageNavigationItemComponent>;\n @ContentChild(EclInpageNavigationListDirective) eclNavigationList: EclInpageNavigationListDirective;\n\n /**\n * Used for the mobile view, where user can select a section from the dropdown.\n */\n isButtonExpanded = false;\n currentSectionElement: HTMLElement | null = null;\n public isRtl = false;\n public listMaxHeight: number;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private differ: IterableDiffer<EclInpageNavigationItemComponent>;\n private isMobileBreakpoint = false;\n private MIN_DISTANCE_TOP = 10;\n /**\n * Extra spacing (px) kept between the sticky toggler and the target heading when scrolling to a section on mobile,\n * so the heading is not flush against the toggler. Mirrors the spacing buffer used by the vanilla ECL\n * `scroll-margin-top` rule (trigger height + spacing).\n */\n private readonly MOBILE_SCROLL_SPACING = 16;\n private readonly ICON_SIZE_EC_THEME = '2xs';\n private readonly ICON_SIZE_EU_THEME = 's';\n private readonly TABLET_BREAKPOINT = 996;\n private intersectionObserver: IntersectionObserver;\n private eclRtlService = inject(EclRtlService);\n private differs = inject(IterableDiffers);\n private scrollDispatcher: ScrollDispatcher = inject(ScrollDispatcher);\n private zone = inject(NgZone);\n private cdkBreakpointObserver = inject(BreakpointObserver);\n private viewportRuler = inject(ViewportRuler);\n private eclInpageNavigationService = inject(EclInpageNavigationService);\n private cdr = inject(ChangeDetectorRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly doc = inject(DOCUMENT);\n private readonly win = this.doc.defaultView; // Window | null\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n constructor() {\n super();\n this.differ = this.differs.find([]).create();\n afterNextRender(() => {\n this.zone.run(() => this.setListHeight());\n });\n }\n\n ngOnInit(): void {\n this.handleRtlChangeState();\n }\n\n ngAfterViewInit() {\n if (!this.isBrowser) return;\n\n this.subscribeToCDKScrollEvent();\n this.observeBreakpointChanges();\n this.viewportRuler.change(300)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.zone.run(() => this.setListHeight()));\n\n if (typeof IntersectionObserver !== 'undefined' && this.togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(this.togglerButton.nativeElement);\n }\n }\n\n get hasNavigationList(): boolean {\n return !!this.eclNavigationList;\n }\n\n get currentNavigationLinkItem(): EclInpageNavigationItemComponent {\n return this.eclNavigationLinkItems.find((item) => item.sectionElement === this.currentSectionElement);\n }\n\n /**\n * the size of the arrow-down icon, used in mobile view. There are different sizes for EC and EU themes.\n */\n get sizeIcon(): string {\n if (this.eclThemeService.isECTheme()) {\n return this.ICON_SIZE_EC_THEME;\n } else {\n return this.ICON_SIZE_EU_THEME;\n }\n }\n\n get hasActiveSection(): boolean {\n return !!this.currentSectionElement;\n }\n\n ngDoCheck(): void {\n const diff = this.differ.diff(this.eclNavigationLinkItems);\n if (diff) {\n diff.forEachItem((item) => {\n this.connectItemEvents(item.item);\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n if (this.intersectionObserver && this.togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(this.togglerButton.nativeElement);\n this.intersectionObserver.disconnect();\n }\n }\n\n /**\n * On mobile view - handle the dropdown toggle.\n */\n onExpandButtonClick(): void {\n this.setButtonExpanded(!this.isButtonExpanded);\n }\n\n /**\n * Single entry point for changing the dropdown expanded state. Keeps the local flag (used for the button's\n * aria-expanded) and the shared service state (that drives the list's visibility class) in sync.\n */\n private setButtonExpanded(isExpanded: boolean): void {\n this.isButtonExpanded = isExpanded;\n this.eclInpageNavigationService.eclInpageNavigationToggle(isExpanded);\n }\n\n /**\n * Dropdown keyboard navigation on mobile view.\n * @param evt\n */\n onExpandButtonKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case 'Tab':\n this.onExpandButtonTab(evt);\n break;\n case 'ArrowDown':\n this.onExpandButtonArrowDown(evt);\n break;\n default:\n break;\n }\n }\n\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n this.isRtl = rtlState;\n });\n }\n\n /**\n * Set the height of the list with the navigation items in px. So in case the full list cannot be displayed, a scroll will appear.\n */\n private setListHeight(): void {\n if (!this.isBrowser) return;\n if (!this.eclNavigationList) return;\n if (!this.win) return;\n\n const viewportHeight = this.win.innerHeight;\n const viewportWidth = this.win.innerWidth;\n let topPosition = 0;\n\n if (viewportWidth < this.TABLET_BREAKPOINT) {\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (toggleWrapper) {\n const styles = this.win.getComputedStyle(toggleWrapper);\n topPosition =\n toggleWrapper.getBoundingClientRect().bottom +\n parseFloat(styles.marginBottom || '0');\n }\n } else if (this.eclTitle) {\n const titleEl = this.navTittle?.nativeElement;\n if (titleEl) topPosition = titleEl.getBoundingClientRect().bottom;\n } else {\n const listEl = this.eclNavigationList?.el?.nativeElement;\n if (listEl) topPosition = listEl.getBoundingClientRect().top;\n }\n\n const availableSpace = viewportHeight - topPosition;\n if (availableSpace > 0) {\n this.listMaxHeight = availableSpace;\n this.eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.setButtonExpanded(true);\n this.eclNavigationLinkItems.get(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems.get(this.eclNavigationLinkItems.length - 1).onFocus();\n }\n }\n\n private connectItemEvents(item: EclInpageNavigationItemComponent): void {\n item.itemArrowDown.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowDown(item);\n });\n\n item.itemArrowUp.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowUp(item);\n });\n\n item.itemTab.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemTab(item, evt);\n });\n\n item.itemEnter.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemEnter(item);\n });\n\n item.itemClick.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n item.sectionElement.focus();\n }\n this.setButtonExpanded(false);\n });\n }\n\n private onItemEnter(item: EclInpageNavigationItemComponent): void {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n if (item.sectionElement.tabIndex === -1) {\n item.sectionElement.tabIndex = 0;\n item.sectionElement.focus();\n item.sectionElement.tabIndex = -1;\n }\n }\n this.setButtonExpanded(false);\n }\n\n /**\n * Scrolls the target section into view. On desktop this is a plain scrollIntoView() (unchanged behaviour). On\n * mobile the in-page navigation toggler is sticky at the top, so a top-aligned scroll would hide the heading\n * underneath it; we therefore set `scroll-margin-top` on the target (sticky toggler height + spacing buffer) and\n * let scrollIntoView() honour it. Using scroll-margin-top instead of a manual window.scrollTo() keeps this working\n * regardless of which element is the actual scroll container (window or a nested scrollable wrapper).\n */\n private scrollToSection(sectionElement: HTMLElement): void {\n if (!this.isBrowser) return;\n\n const offset = this.getMobileScrollOffset();\n sectionElement.style.scrollMarginTop = offset > 0 ? `${offset}px` : '';\n sectionElement.scrollIntoView();\n }\n\n /**\n * The offset (px) applied on mobile so that a scrolled-to heading clears the sticky toggler: the toggler height\n * plus a spacing buffer. Returns 0 on desktop (no sticky toggler). Shared by the scroll logic and the scroll-spy\n * so the heading lands exactly where the spy expects it, keeping the active item in sync after a click.\n */\n private getMobileScrollOffset(): number {\n if (!this.isMobileBreakpoint) return 0;\n\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (!toggleWrapper) return 0;\n\n return toggleWrapper.getBoundingClientRect().height + this.MOBILE_SCROLL_SPACING;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== this.eclNavigationLinkItems.length - 1) {\n this.eclNavigationLinkItems.get(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems.get(index - 1).onFocus();\n } else {\n if (this.isMobileBreakpoint && this.togglerButton) {\n this.setButtonExpanded(false);\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n\n private onItemTab(item: EclInpageNavigationItemComponent, evt: Event): void {\n if (this.isMobileBreakpoint) {\n if (!(evt as KeyboardEvent).shiftKey) {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index === this.eclNavigationLinkItems.length - 1) {\n evt.preventDefault();\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n }\n\n private subscribeToCDKScrollEvent(): void {\n if (!this.isBrowser) return;\n\n this.scrollDispatcher\n .scrolled()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.zone.run(() => {\n const ids = this.eclNavigationLinkItems.map((item) => item.sectionId);\n\n const sectionElements = ids\n .map((id) => this.doc.querySelector<HTMLElement>(`#${id}`))\n .filter((el): el is HTMLElement => !!el);\n\n this.handleNavigationLinksHighlight(sectionElements);\n this.setListHeight();\n });\n });\n }\n\n private selectNavigationItem(itemElement: HTMLElement): void {\n this.eclNavigationLinkItems.forEach((it) => {\n it.isActive = it.sectionElement === itemElement;\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: Array<HTMLElement>): void {\n const currentSectionElement = this.findActiveSectionElement(sectionElements);\n\n if (currentSectionElement !== this.currentSectionElement) {\n this.currentSectionElement = currentSectionElement ?? undefined as HTMLElement | null;\n if (currentSectionElement) this.selectNavigationItem(currentSectionElement);\n\n const sectionId = this.currentNavigationLinkItem?.sectionId;\n this.sectionEnter.next(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: Array<HTMLElement>): HTMLElement | null {\n if (!this.isBrowser || !this.win) return null;\n\n let currentSection: HTMLElement | null = null;\n // On mobile the heading is scrolled to sit just below the sticky toggler (getMobileScrollOffset). Because the\n // scroll target and the spy threshold would otherwise be the exact same value, a heading landing right on the\n // boundary (with sub-pixel rounding) could be treated as \"not yet reached\" and the previous section would be\n // highlighted instead. Adding MIN_DISTANCE_TOP as a cushion lands the heading just inside the active zone,\n // mirroring how the desktop threshold already uses MIN_DISTANCE_TOP.\n const offset = this.isMobileBreakpoint\n ? this.getMobileScrollOffset() + this.MIN_DISTANCE_TOP\n : this.MIN_DISTANCE_TOP + (this.offsetTop ?? 0);\n\n const isNearBottom =\n this.win.innerHeight + this.win.scrollY >=\n this.doc.documentElement.scrollHeight - 10;\n\n for (const sectionElement of sectionElements) {\n const rect = sectionElement.getBoundingClientRect();\n const isAboveOffset = rect.top <= offset;\n const isVisibleInViewport = rect.top < this.win.innerHeight;\n\n if (isAboveOffset || (isVisibleInViewport && isNearBottom)) {\n currentSection = sectionElement;\n }\n }\n\n return currentSection;\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe([Breakpoints.Handset, Breakpoints.Tablet, Breakpoints.Small])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobileBreakpoint = result.matches;\n });\n }\n}\n",
|
|
46182
46182
|
"assetsDirs": [],
|
|
46183
46183
|
"styleUrlsData": "",
|
|
46184
46184
|
"stylesData": "\n @media (min-width: 996px) {\n .ecl-inpage-navigation__list {\n display: block !important;\n }\n }\n \n",
|
|
@@ -46705,7 +46705,7 @@
|
|
|
46705
46705
|
}
|
|
46706
46706
|
}
|
|
46707
46707
|
},
|
|
46708
|
-
"templateData": "<a eclLink (click)=\"onItemClick($event)\" href=\"#\" class=\"ecl-inpage-navigation__link\"\n (keydown.arrowUp)=\"onArrowUp($event)\" (keydown.arrowDown)=\"onArrowDown($event)\" (keydown.enter)=\"onEnter($event)\"\n (keydown.tab)=\"onTab($event)\">\n {{ label }}\n</a>\n"
|
|
46708
|
+
"templateData": "<a eclLink (click)=\"onItemClick($event)\" href=\"#\" class=\"ecl_link ecl-inpage-navigation__link\"\n (keydown.arrowUp)=\"onArrowUp($event)\" (keydown.arrowDown)=\"onArrowDown($event)\" (keydown.enter)=\"onEnter($event)\"\n (keydown.tab)=\"onTab($event)\">\n {{ label }}\n</a>\n"
|
|
46709
46709
|
},
|
|
46710
46710
|
{
|
|
46711
46711
|
"name": "EclLayoutWrapperComponent",
|
|
@@ -52598,7 +52598,7 @@
|
|
|
52598
52598
|
},
|
|
52599
52599
|
{
|
|
52600
52600
|
"name": "EclMenuMegaItemComponent",
|
|
52601
|
-
"id": "component-EclMenuMegaItemComponent-
|
|
52601
|
+
"id": "component-EclMenuMegaItemComponent-4b21ad72a8d4de78affe5a44dae77a58a1ecc8e4b80be105b87b207825709329010faf0989fa72d4f3fb9cf7e0410dcfe8ac7066ac79b069ab7ccbd2c956be9c",
|
|
52602
52602
|
"file": "packages/ecl/components/ecl-menu/ecl-menu-mega/ecl-menu-mega-item.component.ts",
|
|
52603
52603
|
"encapsulation": [],
|
|
52604
52604
|
"entryComponents": [],
|
|
@@ -53134,7 +53134,7 @@
|
|
|
53134
53134
|
"description": "<p>This component represents a sub-menu item, that is on the second level of the ecl-menu.\nAdds some custom styling and functionality.</p>\n",
|
|
53135
53135
|
"rawdescription": "\n\nThis component represents a sub-menu item, that is on the second level of the ecl-menu.\nAdds some custom styling and functionality.\n",
|
|
53136
53136
|
"type": "component",
|
|
53137
|
-
"sourceCode": "import {\n AfterViewInit,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n Output,\n QueryList,\n Renderer2,\n ViewChild,\n booleanAttribute,\n forwardRef,\n inject,\n} from '@angular/core';\nimport { Params, QueryParamsHandling, RouterLink } from '@angular/router';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { KeyCode } from '@eui/ecl/core';\nimport { EclLinkDirective } from '@eui/ecl/components/ecl-link';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { EclMenuItem } from '../models/ecl-menu-item.model';\nimport { EclMenuItemKeydownEvent, EclMenuItemSelectEvent } from '../events/ecl-menu-item.event';\n\n/**\n * This component represents a sub-menu item, that is on the second level of the ecl-menu.\n * Adds some custom styling and functionality.\n */\n@Component({\n selector: 'ecl-menu-mega-item',\n templateUrl: './ecl-menu-mega-item.component.html',\n imports: [NgTemplateOutlet, RouterLink],\n styles: [\n `\n :host {\n display: list-item;\n }\n `,\n ],\n})\nexport class EclMenuMegaItemComponent extends ECLBaseDirective implements EclMenuItem, AfterViewInit {\n\n @Input() id: string;\n @Input() label: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() routerLink: string | any[] = null;\n @Input() queryParams: Params | null = null;\n @Input() queryParamsHandling: QueryParamsHandling = null;\n @Input() href = '';\n @Input() target = '';\n @HostBinding('class.ecl-menu__subitem') cmpClass = true;\n /**\n * The default role of the DOM element is 'listitem', should not be changed.\n */\n @HostBinding('attr.role') role = 'listitem';\n @Input({ transform: booleanAttribute }) @HostBinding('class.ecl-menu__subitem--current') isCurrent = false;\n /**\n * An additional item, that represents a link.\n */\n @Input({ transform: booleanAttribute }) @HostBinding('class.ecl-menu__see-all') isSeeAll = false;\n @Input() linkExtraAttributes: { [key: string]: string };\n\n /**\n * If menu item includes any icon, added by the user (for example for 'external' link).\n */\n @ContentChildren(forwardRef(() => EclIconComponent)) iconComponents: QueryList<EclIconComponent>;\n /**\n * If menu item includes any links, added by the user.\n */\n @ContentChildren(forwardRef(() => EclLinkDirective)) links: QueryList<EclLinkDirective>;\n /**\n * The actual link of the menu item.\n */\n @ViewChild('megaMenuLink') megaMenuLink: ElementRef\n\n @Output() menuItemSelect = new EventEmitter<EclMenuItemSelectEvent>();\n @Output() menuItemKeydown = new EventEmitter<EclMenuItemKeydownEvent>();\n\n hasChildren = false;\n isExpanded = true;\n\n children: Array<EclMenuItem> = [];\n private renderer = inject(Renderer2);\n\n ngAfterViewInit(): void {\n this.manageContentChildren();\n this.setExtraAttributesForLink(this.megaMenuLink?.nativeElement, this.linkExtraAttributes);\n }\n\n /**\n *\n * @param evt This event is emited, when the menu item is clicked.\n */\n onItemClick(evt: Event): void {\n this.menuItemSelect.next(new EclMenuItemSelectEvent(this, evt as MouseEvent));\n\n if (!this.href) {\n evt.preventDefault();\n }\n }\n\n @HostListener('click', ['$event'])\n onHostClick(evt: MouseEvent): void {\n evt.stopPropagation();\n }\n\n /**\n * When the item is the current active item, the 'aria-current' attribute is set to 'page'.\n */\n get ariaCurrent(): string | null {\n return this.isCurrent ? 'page' : null;\n }\n\n /**\n * Focus should be set on the underlying <a> element.\n */\n onFocus(): void {\n this.megaMenuLink.nativeElement.focus();\n }\n\n onKeydown(evt: Event): void {\n
|
|
53137
|
+
"sourceCode": "import {\n AfterViewInit,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n Output,\n QueryList,\n Renderer2,\n ViewChild,\n booleanAttribute,\n forwardRef,\n inject,\n} from '@angular/core';\nimport { Params, QueryParamsHandling, RouterLink } from '@angular/router';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { KeyCode } from '@eui/ecl/core';\nimport { EclLinkDirective } from '@eui/ecl/components/ecl-link';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { EclMenuItem } from '../models/ecl-menu-item.model';\nimport { EclMenuItemKeydownEvent, EclMenuItemSelectEvent } from '../events/ecl-menu-item.event';\n\n/**\n * This component represents a sub-menu item, that is on the second level of the ecl-menu.\n * Adds some custom styling and functionality.\n */\n@Component({\n selector: 'ecl-menu-mega-item',\n templateUrl: './ecl-menu-mega-item.component.html',\n imports: [NgTemplateOutlet, RouterLink],\n styles: [\n `\n :host {\n display: list-item;\n }\n `,\n ],\n})\nexport class EclMenuMegaItemComponent extends ECLBaseDirective implements EclMenuItem, AfterViewInit {\n\n @Input() id: string;\n @Input() label: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() routerLink: string | any[] = null;\n @Input() queryParams: Params | null = null;\n @Input() queryParamsHandling: QueryParamsHandling = null;\n @Input() href = '';\n @Input() target = '';\n @HostBinding('class.ecl-menu__subitem') cmpClass = true;\n /**\n * The default role of the DOM element is 'listitem', should not be changed.\n */\n @HostBinding('attr.role') role = 'listitem';\n @Input({ transform: booleanAttribute }) @HostBinding('class.ecl-menu__subitem--current') isCurrent = false;\n /**\n * An additional item, that represents a link.\n */\n @Input({ transform: booleanAttribute }) @HostBinding('class.ecl-menu__see-all') isSeeAll = false;\n @Input() linkExtraAttributes: { [key: string]: string };\n\n /**\n * If menu item includes any icon, added by the user (for example for 'external' link).\n */\n @ContentChildren(forwardRef(() => EclIconComponent)) iconComponents: QueryList<EclIconComponent>;\n /**\n * If menu item includes any links, added by the user.\n */\n @ContentChildren(forwardRef(() => EclLinkDirective)) links: QueryList<EclLinkDirective>;\n /**\n * The actual link of the menu item.\n */\n @ViewChild('megaMenuLink') megaMenuLink: ElementRef\n\n @Output() menuItemSelect = new EventEmitter<EclMenuItemSelectEvent>();\n @Output() menuItemKeydown = new EventEmitter<EclMenuItemKeydownEvent>();\n\n hasChildren = false;\n isExpanded = true;\n\n children: Array<EclMenuItem> = [];\n private renderer = inject(Renderer2);\n\n ngAfterViewInit(): void {\n this.manageContentChildren();\n this.setExtraAttributesForLink(this.megaMenuLink?.nativeElement, this.linkExtraAttributes);\n }\n\n /**\n *\n * @param evt This event is emited, when the menu item is clicked.\n */\n onItemClick(evt: Event): void {\n this.menuItemSelect.next(new EclMenuItemSelectEvent(this, evt as MouseEvent));\n\n if (!this.href) {\n evt.preventDefault();\n }\n }\n\n @HostListener('click', ['$event'])\n onHostClick(evt: MouseEvent): void {\n evt.stopPropagation();\n }\n\n /**\n * When the item is the current active item, the 'aria-current' attribute is set to 'page'.\n */\n get ariaCurrent(): string | null {\n return this.isCurrent ? 'page' : null;\n }\n\n /**\n * Focus should be set on the underlying <a> element.\n */\n onFocus(): void {\n this.megaMenuLink.nativeElement.focus();\n }\n\n onKeydown(evt: Event): void {\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n }\n\n /**\n * Adds specific classes to content children (icons or links).\n */\n private manageContentChildren(): void {\n if (this.iconComponents) {\n setTimeout(() => {\n this.iconComponents.forEach((icn) => {\n icn.baseDirective.class = 'ecl-menu__sublink-icon';\n });\n });\n }\n\n if (this.links) {\n setTimeout(() => {\n this.links.forEach((icn) => {\n icn.class = icn.class ? icn.class + ' ecl-menu__sublink' : 'ecl-menu__sublink';\n });\n });\n }\n }\n\n private setExtraAttributesForLink(link: HTMLElement, linkExtraAttributes: { [key: string]: string }): void {\n if (linkExtraAttributes) {\n Object.keys(linkExtraAttributes).forEach((key) =>{\n if (key !== 'href' && key !== 'routerLink') {\n this.renderer.setAttribute(link, key, linkExtraAttributes[key]);\n }\n });\n }\n }\n}\n",
|
|
53138
53138
|
"assetsDirs": [],
|
|
53139
53139
|
"styleUrlsData": "",
|
|
53140
53140
|
"stylesData": "\n :host {\n display: list-item;\n }\n \n",
|
package/docs/properties.html
CHANGED
|
@@ -92,11 +92,11 @@ class EclInpageNavigationItemComponent extends ECLBaseDirective {
|
|
|
92
92
|
this.itemEnter.emit();
|
|
93
93
|
}
|
|
94
94
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: EclInpageNavigationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
95
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: EclInpageNavigationItemComponent, isStandalone: true, selector: "li[eclInpageNavigationItem]", inputs: { label: "label", sectionId: "sectionId", isActive: "isActive" }, outputs: { itemClick: "itemClick", itemArrowUp: "itemArrowUp", itemArrowDown: "itemArrowDown", itemTab: "itemTab", itemEnter: "itemEnter" }, host: { properties: { "class.ecl-inpage-navigation__item": "this.cmpClass", "attr.role": "this.role", "class.ecl-inpage-navigation__item--active": "this.isActive" } }, viewQueries: [{ propertyName: "link", first: true, predicate: EclLinkDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<a eclLink (click)=\"onItemClick($event)\" href=\"#\" class=\"ecl-inpage-navigation__link\"\n (keydown.arrowUp)=\"onArrowUp($event)\" (keydown.arrowDown)=\"onArrowDown($event)\" (keydown.enter)=\"onEnter($event)\"\n (keydown.tab)=\"onTab($event)\">\n {{ label }}\n</a>\n", styles: [":host{display:list-item}\n"], dependencies: [{ kind: "directive", type: i1.EclLinkDirective, selector: "[eclLink]", inputs: ["extraAttributes", "isInverted", "isIconOnly", "isHighlight", "isNoVisited", "isBranded", "variant"] }] }); }
|
|
95
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: EclInpageNavigationItemComponent, isStandalone: true, selector: "li[eclInpageNavigationItem]", inputs: { label: "label", sectionId: "sectionId", isActive: "isActive" }, outputs: { itemClick: "itemClick", itemArrowUp: "itemArrowUp", itemArrowDown: "itemArrowDown", itemTab: "itemTab", itemEnter: "itemEnter" }, host: { properties: { "class.ecl-inpage-navigation__item": "this.cmpClass", "attr.role": "this.role", "class.ecl-inpage-navigation__item--active": "this.isActive" } }, viewQueries: [{ propertyName: "link", first: true, predicate: EclLinkDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<a eclLink (click)=\"onItemClick($event)\" href=\"#\" class=\"ecl_link ecl-inpage-navigation__link\"\n (keydown.arrowUp)=\"onArrowUp($event)\" (keydown.arrowDown)=\"onArrowDown($event)\" (keydown.enter)=\"onEnter($event)\"\n (keydown.tab)=\"onTab($event)\">\n {{ label }}\n</a>\n", styles: [":host{display:list-item}\n"], dependencies: [{ kind: "directive", type: i1.EclLinkDirective, selector: "[eclLink]", inputs: ["extraAttributes", "isInverted", "isIconOnly", "isHighlight", "isNoVisited", "isBranded", "variant"] }] }); }
|
|
96
96
|
}
|
|
97
97
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: EclInpageNavigationItemComponent, decorators: [{
|
|
98
98
|
type: Component,
|
|
99
|
-
args: [{ selector: 'li[eclInpageNavigationItem]', imports: [...EUI_ECL_LINK], template: "<a eclLink (click)=\"onItemClick($event)\" href=\"#\" class=\"ecl-inpage-navigation__link\"\n (keydown.arrowUp)=\"onArrowUp($event)\" (keydown.arrowDown)=\"onArrowDown($event)\" (keydown.enter)=\"onEnter($event)\"\n (keydown.tab)=\"onTab($event)\">\n {{ label }}\n</a>\n", styles: [":host{display:list-item}\n"] }]
|
|
99
|
+
args: [{ selector: 'li[eclInpageNavigationItem]', imports: [...EUI_ECL_LINK], template: "<a eclLink (click)=\"onItemClick($event)\" href=\"#\" class=\"ecl_link ecl-inpage-navigation__link\"\n (keydown.arrowUp)=\"onArrowUp($event)\" (keydown.arrowDown)=\"onArrowDown($event)\" (keydown.enter)=\"onEnter($event)\"\n (keydown.tab)=\"onTab($event)\">\n {{ label }}\n</a>\n", styles: [":host{display:list-item}\n"] }]
|
|
100
100
|
}], ctorParameters: () => [], propDecorators: { cmpClass: [{
|
|
101
101
|
type: HostBinding,
|
|
102
102
|
args: ['class.ecl-inpage-navigation__item']
|
|
@@ -509,10 +509,13 @@ class EclInpageNavigationComponent extends ECLBaseDirective {
|
|
|
509
509
|
if (!this.isBrowser || !this.win)
|
|
510
510
|
return null;
|
|
511
511
|
let currentSection = null;
|
|
512
|
-
// On mobile the heading is scrolled to sit just below the sticky toggler
|
|
513
|
-
//
|
|
512
|
+
// On mobile the heading is scrolled to sit just below the sticky toggler (getMobileScrollOffset). Because the
|
|
513
|
+
// scroll target and the spy threshold would otherwise be the exact same value, a heading landing right on the
|
|
514
|
+
// boundary (with sub-pixel rounding) could be treated as "not yet reached" and the previous section would be
|
|
515
|
+
// highlighted instead. Adding MIN_DISTANCE_TOP as a cushion lands the heading just inside the active zone,
|
|
516
|
+
// mirroring how the desktop threshold already uses MIN_DISTANCE_TOP.
|
|
514
517
|
const offset = this.isMobileBreakpoint
|
|
515
|
-
? this.getMobileScrollOffset()
|
|
518
|
+
? this.getMobileScrollOffset() + this.MIN_DISTANCE_TOP
|
|
516
519
|
: this.MIN_DISTANCE_TOP + (this.offsetTop ?? 0);
|
|
517
520
|
const isNearBottom = this.win.innerHeight + this.win.scrollY >=
|
|
518
521
|
this.doc.documentElement.scrollHeight - 10;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-ecl-components-ecl-inpage-navigation.mjs","sources":["../../components/ecl-inpage-navigation/ecl-inpage-navigation-item.component.ts","../../components/ecl-inpage-navigation/ecl-inpage-navigation-item.component.html","../../components/ecl-inpage-navigation/services/ecl-inpage-navigation.service.ts","../../components/ecl-inpage-navigation/ecl-inpage-navigation-list.directive.ts","../../components/ecl-inpage-navigation/ecl-inpage-navigation.component.ts","../../components/ecl-inpage-navigation/ecl-inpage-navigation.component.html","../../components/ecl-inpage-navigation/index.ts","../../components/ecl-inpage-navigation/eui-ecl-components-ecl-inpage-navigation.ts"],"sourcesContent":["import { Component, HostBinding, Input, Output, EventEmitter, ViewChild, ElementRef, inject, PLATFORM_ID, DOCUMENT } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclBaseEvent } from '@eui/ecl/core';\nimport { EclLinkDirective, EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport class EclInpageNavigationItemClickEvent extends EclBaseEvent {\n constructor(public sectionElementId: string) {\n super();\n }\n}\n/**\n * Represent a single navigation item. contains the link, that activates/scrolls to the new current paragraph of the page.\n */\n@Component({\n selector: 'li[eclInpageNavigationItem]',\n templateUrl: './ecl-inpage-navigation-item.component.html',\n imports: [...EUI_ECL_LINK],\n styles: [\n `\n :host {\n display: list-item;\n }\n `,\n ],\n})\nexport class EclInpageNavigationItemComponent extends ECLBaseDirective {\n @HostBinding('class.ecl-inpage-navigation__item') cmpClass = true;\n /**\n * The role of the component is 'listitem', should not be changed.\n */\n @HostBinding('attr.role') role = 'listitem';\n\n /**\n * The label that is displayed in the items list.\n */\n @Input() label: string;\n @Input() sectionId: string;\n @Input() @HostBinding('class.ecl-inpage-navigation__item--active') isActive: boolean;\n\n /**\n * Emited when user clicks on the item.\n */\n @Output() itemClick = new EventEmitter<EclInpageNavigationItemClickEvent>();\n /**\n * Emitted when on keyboard navigation, user clicks the arrow-up.\n */\n @Output() itemArrowUp = new EventEmitter();\n /**\n * Emitted when on keyboard navigation, user clicks the arrow-down.\n */\n @Output() itemArrowDown = new EventEmitter();\n /**\n * Emitted when on keyboard navigation, user clicks the TAB.\n */\n @Output() itemTab = new EventEmitter<Event>();\n /**\n * Emitted when on keyboard navigation, user clicks the ENTER.\n */\n @Output() itemEnter = new EventEmitter();\n\n @ViewChild(EclLinkDirective) link: EclLinkDirective;\n private readonly platformId = inject(PLATFORM_ID);\n private readonly doc = inject(DOCUMENT);\n\n constructor() {\n const el = inject(ElementRef);\n\n super();\n if (el.nativeElement.tagName.toLowerCase() === 'ecl-inpage-navigation-item') {\n console.warn('\"ecl-inpage-navigation-item\" selector is deprecated; use \"li[eclInpageNavigationItem]\" instead.');\n }\n }\n\n onItemClick(evt: MouseEvent): void {\n const event = new EclInpageNavigationItemClickEvent(this.sectionId);\n this.itemClick.next(event);\n\n evt.preventDefault();\n }\n\n /**\n * Returns page element/paragraph, that is associated with this item from the navigation list.\n */\n get sectionElement(): HTMLElement | null {\n if (!isPlatformBrowser(this.platformId)) return null;\n return this.doc.querySelector<HTMLElement>(`#${this.sectionId}`);\n }\n\n onArrowUp(evt: Event): void {\n evt.preventDefault();\n this.itemArrowUp.emit()\n }\n\n onArrowDown(evt: Event): void {\n evt.preventDefault();\n this.itemArrowDown.emit();\n }\n\n onTab(evt: Event): void {\n this.itemTab.emit(evt);\n }\n\n onFocus(): void{\n this.link.onFocus();\n }\n\n onEnter(evt: Event): void {\n evt.preventDefault();\n evt.stopPropagation();\n this.itemEnter.emit();\n }\n}\n","<a eclLink (click)=\"onItemClick($event)\" href=\"#\" class=\"ecl-inpage-navigation__link\"\n (keydown.arrowUp)=\"onArrowUp($event)\" (keydown.arrowDown)=\"onArrowDown($event)\" (keydown.enter)=\"onEnter($event)\"\n (keydown.tab)=\"onTab($event)\">\n {{ label }}\n</a>\n","import { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class EclInpageNavigationService {\n\n\tpublic eclInpageNavigationExpanded$: Observable<boolean>;\n\tprivate eclInpageNavigationExpanded: Subject<boolean> = new Subject<boolean>();\n\n\tconstructor() {\n this.eclInpageNavigationExpanded$ = this.eclInpageNavigationExpanded.asObservable();\n\t}\n\n\t/**\n\t * When user clicks on arrow down button in mobile view.\n\t * @param isExpanded\n\t */\n eclInpageNavigationToggle(isExpanded: boolean): void {\n\t\tthis.eclInpageNavigationExpanded.next(isExpanded);\n\t}\n}\n","import { AfterContentInit, Directive, ElementRef, HostBinding, OnDestroy, inject, signal } from '@angular/core';\nimport { Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclInpageNavigationService } from './services/ecl-inpage-navigation.service';\n\n/**\n * The parent list component, that contains navigation items links.\n */\n@Directive({\n selector: 'ul[eclInpageNavigationList]',\n host: {\n '[style.max-height.px]': 'maxHeight()',\n },\n\n})\nexport class EclInpageNavigationListDirective extends ECLBaseDirective implements AfterContentInit, OnDestroy {\n el = inject(ElementRef);\n\n @HostBinding('class.ecl-inpage-navigation__list') hasClass = true;\n /**\n * If the dropdown is visible in mobile view.\n */\n @HostBinding('class.ecl-inpage-navigation__list--visible') isVisible = false;\n maxHeight = signal<number | null>(null);\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private eclInpageNavigationService = inject(EclInpageNavigationService);\n\n ngAfterContentInit(): void {\n this.eclInpageNavigationService.eclInpageNavigationExpanded$.pipe(takeUntil(this.destroy$)).subscribe((value: boolean) => {\n this.isVisible = value;\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n}\n","import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, ContentChild, ContentChildren, DOCUMENT, DoCheck, ElementRef, EventEmitter, Input, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, Output, PLATFORM_ID, QueryList, ViewChild, afterNextRender, inject, numberAttribute } from '@angular/core';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_STICKY_CONTAINER } from '@eui/ecl/components/ecl-sticky-container';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService, EclThemeService } from '@eui/ecl/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { EclInpageNavigationItemComponent } from './ecl-inpage-navigation-item.component';\nimport { EclInpageNavigationListDirective } from './ecl-inpage-navigation-list.directive';\nimport { EclInpageNavigationService } from './services/ecl-inpage-navigation.service';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport class EclInpageNavigationSectionEnterEvent extends EclBaseEvent {\n constructor(public sectionId: string) {\n super();\n }\n}\n\n/**\n * The in-page navigation is a vertical menu containing (anchored) links to H2-headings on long content pages.\n * It gives the user an overview of the page contents and has a fixed position (does not move while scrolling) at either the left\n * side of a page on desktop or top-bar on mobile. This component helps users scan of the page quickly contents and may potentially\n * reduce vertical scrolling, allowing users to easily jump straight to the segment of the page.\n */\n@Component({\n selector: 'ecl-inpage-navigation',\n templateUrl: './ecl-inpage-navigation.component.html',\n imports: [TranslateModule, ...EUI_ECL_STICKY_CONTAINER, ...EUI_ECL_ICON],\n styles: [\n `\n @media (min-width: 996px) {\n .ecl-inpage-navigation__list {\n display: block !important;\n }\n }\n `,\n ],\n})\nexport class EclInpageNavigationComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy, DoCheck {\n eclThemeService = inject(EclThemeService);\n\n @Input() eclTitle: string;\n /**\n * Used to calculate component's position.\n */\n @Input() marginTop: number;\n @Input() marginBottom: number;\n /**\n * Sets the offset from the top of the page (for example if there is a toolbar or header). Used to calculate scrolling behaviour.\n */\n @Input({ transform: numberAttribute }) offsetTop: number;\n @ViewChild('togglerButton') togglerButton: ElementRef<HTMLButtonElement>;\n @ViewChild('toggleWrapper') toggleWrapper: ElementRef<HTMLDivElement>;\n @ViewChild('navTittle') navTittle: ElementRef<HTMLDivElement>;\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n @Output() sectionEnter = new EventEmitter<EclInpageNavigationSectionEnterEvent>();\n\n @ContentChildren(EclInpageNavigationItemComponent, { descendants: true }) eclNavigationLinkItems: QueryList<EclInpageNavigationItemComponent>;\n @ContentChild(EclInpageNavigationListDirective) eclNavigationList: EclInpageNavigationListDirective;\n\n /**\n * Used for the mobile view, where user can select a section from the dropdown.\n */\n isButtonExpanded = false;\n currentSectionElement: HTMLElement | null = null;\n public isRtl = false;\n public listMaxHeight: number;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private differ: IterableDiffer<EclInpageNavigationItemComponent>;\n private isMobileBreakpoint = false;\n private MIN_DISTANCE_TOP = 10;\n /**\n * Extra spacing (px) kept between the sticky toggler and the target heading when scrolling to a section on mobile,\n * so the heading is not flush against the toggler. Mirrors the spacing buffer used by the vanilla ECL\n * `scroll-margin-top` rule (trigger height + spacing).\n */\n private readonly MOBILE_SCROLL_SPACING = 16;\n private readonly ICON_SIZE_EC_THEME = '2xs';\n private readonly ICON_SIZE_EU_THEME = 's';\n private readonly TABLET_BREAKPOINT = 996;\n private intersectionObserver: IntersectionObserver;\n private eclRtlService = inject(EclRtlService);\n private differs = inject(IterableDiffers);\n private scrollDispatcher: ScrollDispatcher = inject(ScrollDispatcher);\n private zone = inject(NgZone);\n private cdkBreakpointObserver = inject(BreakpointObserver);\n private viewportRuler = inject(ViewportRuler);\n private eclInpageNavigationService = inject(EclInpageNavigationService);\n private cdr = inject(ChangeDetectorRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly doc = inject(DOCUMENT);\n private readonly win = this.doc.defaultView; // Window | null\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n constructor() {\n super();\n this.differ = this.differs.find([]).create();\n afterNextRender(() => {\n this.zone.run(() => this.setListHeight());\n });\n }\n\n ngOnInit(): void {\n this.handleRtlChangeState();\n }\n\n ngAfterViewInit() {\n if (!this.isBrowser) return;\n\n this.subscribeToCDKScrollEvent();\n this.observeBreakpointChanges();\n this.viewportRuler.change(300)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.zone.run(() => this.setListHeight()));\n\n if (typeof IntersectionObserver !== 'undefined' && this.togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(this.togglerButton.nativeElement);\n }\n }\n\n get hasNavigationList(): boolean {\n return !!this.eclNavigationList;\n }\n\n get currentNavigationLinkItem(): EclInpageNavigationItemComponent {\n return this.eclNavigationLinkItems.find((item) => item.sectionElement === this.currentSectionElement);\n }\n\n /**\n * the size of the arrow-down icon, used in mobile view. There are different sizes for EC and EU themes.\n */\n get sizeIcon(): string {\n if (this.eclThemeService.isECTheme()) {\n return this.ICON_SIZE_EC_THEME;\n } else {\n return this.ICON_SIZE_EU_THEME;\n }\n }\n\n get hasActiveSection(): boolean {\n return !!this.currentSectionElement;\n }\n\n ngDoCheck(): void {\n const diff = this.differ.diff(this.eclNavigationLinkItems);\n if (diff) {\n diff.forEachItem((item) => {\n this.connectItemEvents(item.item);\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n if (this.intersectionObserver && this.togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(this.togglerButton.nativeElement);\n this.intersectionObserver.disconnect();\n }\n }\n\n /**\n * On mobile view - handle the dropdown toggle.\n */\n onExpandButtonClick(): void {\n this.setButtonExpanded(!this.isButtonExpanded);\n }\n\n /**\n * Single entry point for changing the dropdown expanded state. Keeps the local flag (used for the button's\n * aria-expanded) and the shared service state (that drives the list's visibility class) in sync.\n */\n private setButtonExpanded(isExpanded: boolean): void {\n this.isButtonExpanded = isExpanded;\n this.eclInpageNavigationService.eclInpageNavigationToggle(isExpanded);\n }\n\n /**\n * Dropdown keyboard navigation on mobile view.\n * @param evt\n */\n onExpandButtonKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case 'Tab':\n this.onExpandButtonTab(evt);\n break;\n case 'ArrowDown':\n this.onExpandButtonArrowDown(evt);\n break;\n default:\n break;\n }\n }\n\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n this.isRtl = rtlState;\n });\n }\n\n /**\n * Set the height of the list with the navigation items in px. So in case the full list cannot be displayed, a scroll will appear.\n */\n private setListHeight(): void {\n if (!this.isBrowser) return;\n if (!this.eclNavigationList) return;\n if (!this.win) return;\n\n const viewportHeight = this.win.innerHeight;\n const viewportWidth = this.win.innerWidth;\n let topPosition = 0;\n\n if (viewportWidth < this.TABLET_BREAKPOINT) {\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (toggleWrapper) {\n const styles = this.win.getComputedStyle(toggleWrapper);\n topPosition =\n toggleWrapper.getBoundingClientRect().bottom +\n parseFloat(styles.marginBottom || '0');\n }\n } else if (this.eclTitle) {\n const titleEl = this.navTittle?.nativeElement;\n if (titleEl) topPosition = titleEl.getBoundingClientRect().bottom;\n } else {\n const listEl = this.eclNavigationList?.el?.nativeElement;\n if (listEl) topPosition = listEl.getBoundingClientRect().top;\n }\n\n const availableSpace = viewportHeight - topPosition;\n if (availableSpace > 0) {\n this.listMaxHeight = availableSpace;\n this.eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.setButtonExpanded(true);\n this.eclNavigationLinkItems.get(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems.get(this.eclNavigationLinkItems.length - 1).onFocus();\n }\n }\n\n private connectItemEvents(item: EclInpageNavigationItemComponent): void {\n item.itemArrowDown.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowDown(item);\n });\n\n item.itemArrowUp.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowUp(item);\n });\n\n item.itemTab.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemTab(item, evt);\n });\n\n item.itemEnter.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemEnter(item);\n });\n\n item.itemClick.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n item.sectionElement.focus();\n }\n this.setButtonExpanded(false);\n });\n }\n\n private onItemEnter(item: EclInpageNavigationItemComponent): void {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n if (item.sectionElement.tabIndex === -1) {\n item.sectionElement.tabIndex = 0;\n item.sectionElement.focus();\n item.sectionElement.tabIndex = -1;\n }\n }\n this.setButtonExpanded(false);\n }\n\n /**\n * Scrolls the target section into view. On desktop this is a plain scrollIntoView() (unchanged behaviour). On\n * mobile the in-page navigation toggler is sticky at the top, so a top-aligned scroll would hide the heading\n * underneath it; we therefore set `scroll-margin-top` on the target (sticky toggler height + spacing buffer) and\n * let scrollIntoView() honour it. Using scroll-margin-top instead of a manual window.scrollTo() keeps this working\n * regardless of which element is the actual scroll container (window or a nested scrollable wrapper).\n */\n private scrollToSection(sectionElement: HTMLElement): void {\n if (!this.isBrowser) return;\n\n const offset = this.getMobileScrollOffset();\n sectionElement.style.scrollMarginTop = offset > 0 ? `${offset}px` : '';\n sectionElement.scrollIntoView();\n }\n\n /**\n * The offset (px) applied on mobile so that a scrolled-to heading clears the sticky toggler: the toggler height\n * plus a spacing buffer. Returns 0 on desktop (no sticky toggler). Shared by the scroll logic and the scroll-spy\n * so the heading lands exactly where the spy expects it, keeping the active item in sync after a click.\n */\n private getMobileScrollOffset(): number {\n if (!this.isMobileBreakpoint) return 0;\n\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (!toggleWrapper) return 0;\n\n return toggleWrapper.getBoundingClientRect().height + this.MOBILE_SCROLL_SPACING;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== this.eclNavigationLinkItems.length - 1) {\n this.eclNavigationLinkItems.get(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems.get(index - 1).onFocus();\n } else {\n if (this.isMobileBreakpoint && this.togglerButton) {\n this.setButtonExpanded(false);\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n\n private onItemTab(item: EclInpageNavigationItemComponent, evt: Event): void {\n if (this.isMobileBreakpoint) {\n if (!(evt as KeyboardEvent).shiftKey) {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index === this.eclNavigationLinkItems.length - 1) {\n evt.preventDefault();\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n }\n\n private subscribeToCDKScrollEvent(): void {\n if (!this.isBrowser) return;\n\n this.scrollDispatcher\n .scrolled()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.zone.run(() => {\n const ids = this.eclNavigationLinkItems.map((item) => item.sectionId);\n\n const sectionElements = ids\n .map((id) => this.doc.querySelector<HTMLElement>(`#${id}`))\n .filter((el): el is HTMLElement => !!el);\n\n this.handleNavigationLinksHighlight(sectionElements);\n this.setListHeight();\n });\n });\n }\n\n private selectNavigationItem(itemElement: HTMLElement): void {\n this.eclNavigationLinkItems.forEach((it) => {\n it.isActive = it.sectionElement === itemElement;\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: Array<HTMLElement>): void {\n const currentSectionElement = this.findActiveSectionElement(sectionElements);\n\n if (currentSectionElement !== this.currentSectionElement) {\n this.currentSectionElement = currentSectionElement ?? undefined as HTMLElement | null;\n if (currentSectionElement) this.selectNavigationItem(currentSectionElement);\n\n const sectionId = this.currentNavigationLinkItem?.sectionId;\n this.sectionEnter.next(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: Array<HTMLElement>): HTMLElement | null {\n if (!this.isBrowser || !this.win) return null;\n\n let currentSection: HTMLElement | null = null;\n // On mobile the heading is scrolled to sit just below the sticky toggler, so the spy must use that same\n // offset; otherwise it would highlight the previous section. On desktop keep the original threshold.\n const offset = this.isMobileBreakpoint\n ? this.getMobileScrollOffset()\n : this.MIN_DISTANCE_TOP + (this.offsetTop ?? 0);\n\n const isNearBottom =\n this.win.innerHeight + this.win.scrollY >=\n this.doc.documentElement.scrollHeight - 10;\n\n for (const sectionElement of sectionElements) {\n const rect = sectionElement.getBoundingClientRect();\n const isAboveOffset = rect.top <= offset;\n const isVisibleInViewport = rect.top < this.win.innerHeight;\n\n if (isAboveOffset || (isVisibleInViewport && isNearBottom)) {\n currentSection = sectionElement;\n }\n }\n\n return currentSection;\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe([Breakpoints.Handset, Breakpoints.Tablet, Breakpoints.Small])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobileBreakpoint = result.matches;\n });\n }\n}\n","<ecl-sticky-container [marginTop]=\"marginTop\" [marginBottom]=\"marginBottom\">\n <nav aria-labelledby=\"ecl-inpage-navigation-default\" class=\"ecl-inpage-navigation\"\n [class.ecl-inpage-navigation--visible]=\"hasActiveSection\" [class.ecl-inpage-navigation--rtl]=\"isRtl\">\n <div #navTittle id=\"ecl-inpage-navigation-default\" class=\"ecl-inpage-navigation__title\">\n {{ eclTitle || 'ecl.inpage-navigation.PAGE-CONTENTS' | translate }}\n </div>\n <div class=\"ecl-inpage-navigation__body\">\n <div #toggleWrapper class=\"ecl-inpage-navigation__trigger-wrapper\">\n <button #togglerButton id=\"ecl-inpage-navigation-default-trigger\" type=\"button\"\n class=\"ecl-inpage-navigation__trigger\" aria-controls=\"ecl-inpage-navigation-list\"\n [attr.aria-expanded]=\"isButtonExpanded\" (click)=\"onExpandButtonClick()\"\n (keydown)=\"onExpandButtonKeydown($event)\">\n <span class=\"ecl-inpage-navigation__trigger-current\">\n {{ currentNavigationLinkItem?.label }}\n </span>\n <ecl-icon icon=\"corner-arrow\" [size]=\"sizeIcon\" transform=\"rotate-180\"\n class=\"ecl-inpage-navigation__trigger-icon\" title=\"Show full page table of contents\">\n </ecl-icon>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n </nav>\n</ecl-sticky-container>","import { EclInpageNavigationItemComponent } from './ecl-inpage-navigation-item.component';\nimport { EclInpageNavigationListDirective } from './ecl-inpage-navigation-list.directive';\nimport { EclInpageNavigationComponent } from './ecl-inpage-navigation.component';\n\nexport * from './ecl-inpage-navigation.component';\nexport * from './ecl-inpage-navigation-item.component';\nexport * from './ecl-inpage-navigation-list.directive';\nexport * from './services/ecl-inpage-navigation.service';\n\nexport const EUI_ECL_INPAGE_NAVIGATION = [\n EclInpageNavigationComponent, EclInpageNavigationItemComponent, EclInpageNavigationListDirective,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["takeUntil","i1"],"mappings":";;;;;;;;;;;;;;;;;AAMM,MAAO,iCAAkC,SAAQ,YAAY,CAAA;AAC/D,IAAA,WAAA,CAAmB,gBAAwB,EAAA;AACvC,QAAA,KAAK,EAAE;QADQ,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;IAEnC;AACH;AACD;;AAEG;AAaG,MAAO,gCAAiC,SAAQ,gBAAgB,CAAA;AAuClE,IAAA,WAAA,GAAA;AACI,QAAA,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AAE7B,QAAA,KAAK,EAAE;QAzCuC,IAAA,CAAA,QAAQ,GAAG,IAAI;AACjE;;AAEG;QACuB,IAAA,CAAA,IAAI,GAAG,UAAU;AAS3C;;AAEG;AACO,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAqC;AAC3E;;AAEG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAE;AAC1C;;AAEG;AACO,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAE;AAC5C;;AAEG;AACO,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAS;AAC7C;;AAEG;AACO,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAE;AAGvB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,QA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AAA,CAAA,gBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EAAA,YAAA,EAAA,WAAA,EAAA,kBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAWhB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAdxC,SAAS;+BACI,uBAAuB,EAAA,OAAA,EAExB,CAAC,eAAe,EAAE,GAAG,wBAAwB,EAAE,GAAG,YAAY,CAAC,EAAA,QAAA,EAAA,8gDAAA,EAAA,MAAA,EAAA,CAAA,kFAAA,CAAA,EAAA;;sBAcvE;;sBAIA;;sBACA;;sBAIA,KAAK;uBAAC,EAAE,SAAS,EAAE,eAAe,EAAE;;sBACpC,SAAS;uBAAC,eAAe;;sBACzB,SAAS;uBAAC,eAAe;;sBACzB,SAAS;uBAAC,WAAW;;sBAIrB;;sBAEA,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,gCAAgC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;sBACvE,YAAY;uBAAC,gCAAgC;;;AErD3C,MAAM,yBAAyB,GAAG;IACrC,4BAA4B,EAAE,gCAAgC,EAAE,gCAAgC;;;ACVpG;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-inpage-navigation.mjs","sources":["../../components/ecl-inpage-navigation/ecl-inpage-navigation-item.component.ts","../../components/ecl-inpage-navigation/ecl-inpage-navigation-item.component.html","../../components/ecl-inpage-navigation/services/ecl-inpage-navigation.service.ts","../../components/ecl-inpage-navigation/ecl-inpage-navigation-list.directive.ts","../../components/ecl-inpage-navigation/ecl-inpage-navigation.component.ts","../../components/ecl-inpage-navigation/ecl-inpage-navigation.component.html","../../components/ecl-inpage-navigation/index.ts","../../components/ecl-inpage-navigation/eui-ecl-components-ecl-inpage-navigation.ts"],"sourcesContent":["import { Component, HostBinding, Input, Output, EventEmitter, ViewChild, ElementRef, inject, PLATFORM_ID, DOCUMENT } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclBaseEvent } from '@eui/ecl/core';\nimport { EclLinkDirective, EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport class EclInpageNavigationItemClickEvent extends EclBaseEvent {\n constructor(public sectionElementId: string) {\n super();\n }\n}\n/**\n * Represent a single navigation item. contains the link, that activates/scrolls to the new current paragraph of the page.\n */\n@Component({\n selector: 'li[eclInpageNavigationItem]',\n templateUrl: './ecl-inpage-navigation-item.component.html',\n imports: [...EUI_ECL_LINK],\n styles: [\n `\n :host {\n display: list-item;\n }\n `,\n ],\n})\nexport class EclInpageNavigationItemComponent extends ECLBaseDirective {\n @HostBinding('class.ecl-inpage-navigation__item') cmpClass = true;\n /**\n * The role of the component is 'listitem', should not be changed.\n */\n @HostBinding('attr.role') role = 'listitem';\n\n /**\n * The label that is displayed in the items list.\n */\n @Input() label: string;\n @Input() sectionId: string;\n @Input() @HostBinding('class.ecl-inpage-navigation__item--active') isActive: boolean;\n\n /**\n * Emited when user clicks on the item.\n */\n @Output() itemClick = new EventEmitter<EclInpageNavigationItemClickEvent>();\n /**\n * Emitted when on keyboard navigation, user clicks the arrow-up.\n */\n @Output() itemArrowUp = new EventEmitter();\n /**\n * Emitted when on keyboard navigation, user clicks the arrow-down.\n */\n @Output() itemArrowDown = new EventEmitter();\n /**\n * Emitted when on keyboard navigation, user clicks the TAB.\n */\n @Output() itemTab = new EventEmitter<Event>();\n /**\n * Emitted when on keyboard navigation, user clicks the ENTER.\n */\n @Output() itemEnter = new EventEmitter();\n\n @ViewChild(EclLinkDirective) link: EclLinkDirective;\n private readonly platformId = inject(PLATFORM_ID);\n private readonly doc = inject(DOCUMENT);\n\n constructor() {\n const el = inject(ElementRef);\n\n super();\n if (el.nativeElement.tagName.toLowerCase() === 'ecl-inpage-navigation-item') {\n console.warn('\"ecl-inpage-navigation-item\" selector is deprecated; use \"li[eclInpageNavigationItem]\" instead.');\n }\n }\n\n onItemClick(evt: MouseEvent): void {\n const event = new EclInpageNavigationItemClickEvent(this.sectionId);\n this.itemClick.next(event);\n\n evt.preventDefault();\n }\n\n /**\n * Returns page element/paragraph, that is associated with this item from the navigation list.\n */\n get sectionElement(): HTMLElement | null {\n if (!isPlatformBrowser(this.platformId)) return null;\n return this.doc.querySelector<HTMLElement>(`#${this.sectionId}`);\n }\n\n onArrowUp(evt: Event): void {\n evt.preventDefault();\n this.itemArrowUp.emit()\n }\n\n onArrowDown(evt: Event): void {\n evt.preventDefault();\n this.itemArrowDown.emit();\n }\n\n onTab(evt: Event): void {\n this.itemTab.emit(evt);\n }\n\n onFocus(): void{\n this.link.onFocus();\n }\n\n onEnter(evt: Event): void {\n evt.preventDefault();\n evt.stopPropagation();\n this.itemEnter.emit();\n }\n}\n","<a eclLink (click)=\"onItemClick($event)\" href=\"#\" class=\"ecl_link ecl-inpage-navigation__link\"\n (keydown.arrowUp)=\"onArrowUp($event)\" (keydown.arrowDown)=\"onArrowDown($event)\" (keydown.enter)=\"onEnter($event)\"\n (keydown.tab)=\"onTab($event)\">\n {{ label }}\n</a>\n","import { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class EclInpageNavigationService {\n\n\tpublic eclInpageNavigationExpanded$: Observable<boolean>;\n\tprivate eclInpageNavigationExpanded: Subject<boolean> = new Subject<boolean>();\n\n\tconstructor() {\n this.eclInpageNavigationExpanded$ = this.eclInpageNavigationExpanded.asObservable();\n\t}\n\n\t/**\n\t * When user clicks on arrow down button in mobile view.\n\t * @param isExpanded\n\t */\n eclInpageNavigationToggle(isExpanded: boolean): void {\n\t\tthis.eclInpageNavigationExpanded.next(isExpanded);\n\t}\n}\n","import { AfterContentInit, Directive, ElementRef, HostBinding, OnDestroy, inject, signal } from '@angular/core';\nimport { Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclInpageNavigationService } from './services/ecl-inpage-navigation.service';\n\n/**\n * The parent list component, that contains navigation items links.\n */\n@Directive({\n selector: 'ul[eclInpageNavigationList]',\n host: {\n '[style.max-height.px]': 'maxHeight()',\n },\n\n})\nexport class EclInpageNavigationListDirective extends ECLBaseDirective implements AfterContentInit, OnDestroy {\n el = inject(ElementRef);\n\n @HostBinding('class.ecl-inpage-navigation__list') hasClass = true;\n /**\n * If the dropdown is visible in mobile view.\n */\n @HostBinding('class.ecl-inpage-navigation__list--visible') isVisible = false;\n maxHeight = signal<number | null>(null);\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private eclInpageNavigationService = inject(EclInpageNavigationService);\n\n ngAfterContentInit(): void {\n this.eclInpageNavigationService.eclInpageNavigationExpanded$.pipe(takeUntil(this.destroy$)).subscribe((value: boolean) => {\n this.isVisible = value;\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n}\n","import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, ContentChild, ContentChildren, DOCUMENT, DoCheck, ElementRef, EventEmitter, Input, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, Output, PLATFORM_ID, QueryList, ViewChild, afterNextRender, inject, numberAttribute } from '@angular/core';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_STICKY_CONTAINER } from '@eui/ecl/components/ecl-sticky-container';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService, EclThemeService } from '@eui/ecl/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { EclInpageNavigationItemComponent } from './ecl-inpage-navigation-item.component';\nimport { EclInpageNavigationListDirective } from './ecl-inpage-navigation-list.directive';\nimport { EclInpageNavigationService } from './services/ecl-inpage-navigation.service';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport class EclInpageNavigationSectionEnterEvent extends EclBaseEvent {\n constructor(public sectionId: string) {\n super();\n }\n}\n\n/**\n * The in-page navigation is a vertical menu containing (anchored) links to H2-headings on long content pages.\n * It gives the user an overview of the page contents and has a fixed position (does not move while scrolling) at either the left\n * side of a page on desktop or top-bar on mobile. This component helps users scan of the page quickly contents and may potentially\n * reduce vertical scrolling, allowing users to easily jump straight to the segment of the page.\n */\n@Component({\n selector: 'ecl-inpage-navigation',\n templateUrl: './ecl-inpage-navigation.component.html',\n imports: [TranslateModule, ...EUI_ECL_STICKY_CONTAINER, ...EUI_ECL_ICON],\n styles: [\n `\n @media (min-width: 996px) {\n .ecl-inpage-navigation__list {\n display: block !important;\n }\n }\n `,\n ],\n})\nexport class EclInpageNavigationComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy, DoCheck {\n eclThemeService = inject(EclThemeService);\n\n @Input() eclTitle: string;\n /**\n * Used to calculate component's position.\n */\n @Input() marginTop: number;\n @Input() marginBottom: number;\n /**\n * Sets the offset from the top of the page (for example if there is a toolbar or header). Used to calculate scrolling behaviour.\n */\n @Input({ transform: numberAttribute }) offsetTop: number;\n @ViewChild('togglerButton') togglerButton: ElementRef<HTMLButtonElement>;\n @ViewChild('toggleWrapper') toggleWrapper: ElementRef<HTMLDivElement>;\n @ViewChild('navTittle') navTittle: ElementRef<HTMLDivElement>;\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n @Output() sectionEnter = new EventEmitter<EclInpageNavigationSectionEnterEvent>();\n\n @ContentChildren(EclInpageNavigationItemComponent, { descendants: true }) eclNavigationLinkItems: QueryList<EclInpageNavigationItemComponent>;\n @ContentChild(EclInpageNavigationListDirective) eclNavigationList: EclInpageNavigationListDirective;\n\n /**\n * Used for the mobile view, where user can select a section from the dropdown.\n */\n isButtonExpanded = false;\n currentSectionElement: HTMLElement | null = null;\n public isRtl = false;\n public listMaxHeight: number;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private differ: IterableDiffer<EclInpageNavigationItemComponent>;\n private isMobileBreakpoint = false;\n private MIN_DISTANCE_TOP = 10;\n /**\n * Extra spacing (px) kept between the sticky toggler and the target heading when scrolling to a section on mobile,\n * so the heading is not flush against the toggler. Mirrors the spacing buffer used by the vanilla ECL\n * `scroll-margin-top` rule (trigger height + spacing).\n */\n private readonly MOBILE_SCROLL_SPACING = 16;\n private readonly ICON_SIZE_EC_THEME = '2xs';\n private readonly ICON_SIZE_EU_THEME = 's';\n private readonly TABLET_BREAKPOINT = 996;\n private intersectionObserver: IntersectionObserver;\n private eclRtlService = inject(EclRtlService);\n private differs = inject(IterableDiffers);\n private scrollDispatcher: ScrollDispatcher = inject(ScrollDispatcher);\n private zone = inject(NgZone);\n private cdkBreakpointObserver = inject(BreakpointObserver);\n private viewportRuler = inject(ViewportRuler);\n private eclInpageNavigationService = inject(EclInpageNavigationService);\n private cdr = inject(ChangeDetectorRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly doc = inject(DOCUMENT);\n private readonly win = this.doc.defaultView; // Window | null\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n constructor() {\n super();\n this.differ = this.differs.find([]).create();\n afterNextRender(() => {\n this.zone.run(() => this.setListHeight());\n });\n }\n\n ngOnInit(): void {\n this.handleRtlChangeState();\n }\n\n ngAfterViewInit() {\n if (!this.isBrowser) return;\n\n this.subscribeToCDKScrollEvent();\n this.observeBreakpointChanges();\n this.viewportRuler.change(300)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.zone.run(() => this.setListHeight()));\n\n if (typeof IntersectionObserver !== 'undefined' && this.togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(this.togglerButton.nativeElement);\n }\n }\n\n get hasNavigationList(): boolean {\n return !!this.eclNavigationList;\n }\n\n get currentNavigationLinkItem(): EclInpageNavigationItemComponent {\n return this.eclNavigationLinkItems.find((item) => item.sectionElement === this.currentSectionElement);\n }\n\n /**\n * the size of the arrow-down icon, used in mobile view. There are different sizes for EC and EU themes.\n */\n get sizeIcon(): string {\n if (this.eclThemeService.isECTheme()) {\n return this.ICON_SIZE_EC_THEME;\n } else {\n return this.ICON_SIZE_EU_THEME;\n }\n }\n\n get hasActiveSection(): boolean {\n return !!this.currentSectionElement;\n }\n\n ngDoCheck(): void {\n const diff = this.differ.diff(this.eclNavigationLinkItems);\n if (diff) {\n diff.forEachItem((item) => {\n this.connectItemEvents(item.item);\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n if (this.intersectionObserver && this.togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(this.togglerButton.nativeElement);\n this.intersectionObserver.disconnect();\n }\n }\n\n /**\n * On mobile view - handle the dropdown toggle.\n */\n onExpandButtonClick(): void {\n this.setButtonExpanded(!this.isButtonExpanded);\n }\n\n /**\n * Single entry point for changing the dropdown expanded state. Keeps the local flag (used for the button's\n * aria-expanded) and the shared service state (that drives the list's visibility class) in sync.\n */\n private setButtonExpanded(isExpanded: boolean): void {\n this.isButtonExpanded = isExpanded;\n this.eclInpageNavigationService.eclInpageNavigationToggle(isExpanded);\n }\n\n /**\n * Dropdown keyboard navigation on mobile view.\n * @param evt\n */\n onExpandButtonKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case 'Tab':\n this.onExpandButtonTab(evt);\n break;\n case 'ArrowDown':\n this.onExpandButtonArrowDown(evt);\n break;\n default:\n break;\n }\n }\n\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n this.isRtl = rtlState;\n });\n }\n\n /**\n * Set the height of the list with the navigation items in px. So in case the full list cannot be displayed, a scroll will appear.\n */\n private setListHeight(): void {\n if (!this.isBrowser) return;\n if (!this.eclNavigationList) return;\n if (!this.win) return;\n\n const viewportHeight = this.win.innerHeight;\n const viewportWidth = this.win.innerWidth;\n let topPosition = 0;\n\n if (viewportWidth < this.TABLET_BREAKPOINT) {\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (toggleWrapper) {\n const styles = this.win.getComputedStyle(toggleWrapper);\n topPosition =\n toggleWrapper.getBoundingClientRect().bottom +\n parseFloat(styles.marginBottom || '0');\n }\n } else if (this.eclTitle) {\n const titleEl = this.navTittle?.nativeElement;\n if (titleEl) topPosition = titleEl.getBoundingClientRect().bottom;\n } else {\n const listEl = this.eclNavigationList?.el?.nativeElement;\n if (listEl) topPosition = listEl.getBoundingClientRect().top;\n }\n\n const availableSpace = viewportHeight - topPosition;\n if (availableSpace > 0) {\n this.listMaxHeight = availableSpace;\n this.eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.setButtonExpanded(true);\n this.eclNavigationLinkItems.get(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems.get(this.eclNavigationLinkItems.length - 1).onFocus();\n }\n }\n\n private connectItemEvents(item: EclInpageNavigationItemComponent): void {\n item.itemArrowDown.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowDown(item);\n });\n\n item.itemArrowUp.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemArrowUp(item);\n });\n\n item.itemTab.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemTab(item, evt);\n });\n\n item.itemEnter.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onItemEnter(item);\n });\n\n item.itemClick.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n item.sectionElement.focus();\n }\n this.setButtonExpanded(false);\n });\n }\n\n private onItemEnter(item: EclInpageNavigationItemComponent): void {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n this.scrollToSection(item.sectionElement);\n if (item.sectionElement.tabIndex === -1) {\n item.sectionElement.tabIndex = 0;\n item.sectionElement.focus();\n item.sectionElement.tabIndex = -1;\n }\n }\n this.setButtonExpanded(false);\n }\n\n /**\n * Scrolls the target section into view. On desktop this is a plain scrollIntoView() (unchanged behaviour). On\n * mobile the in-page navigation toggler is sticky at the top, so a top-aligned scroll would hide the heading\n * underneath it; we therefore set `scroll-margin-top` on the target (sticky toggler height + spacing buffer) and\n * let scrollIntoView() honour it. Using scroll-margin-top instead of a manual window.scrollTo() keeps this working\n * regardless of which element is the actual scroll container (window or a nested scrollable wrapper).\n */\n private scrollToSection(sectionElement: HTMLElement): void {\n if (!this.isBrowser) return;\n\n const offset = this.getMobileScrollOffset();\n sectionElement.style.scrollMarginTop = offset > 0 ? `${offset}px` : '';\n sectionElement.scrollIntoView();\n }\n\n /**\n * The offset (px) applied on mobile so that a scrolled-to heading clears the sticky toggler: the toggler height\n * plus a spacing buffer. Returns 0 on desktop (no sticky toggler). Shared by the scroll logic and the scroll-spy\n * so the heading lands exactly where the spy expects it, keeping the active item in sync after a click.\n */\n private getMobileScrollOffset(): number {\n if (!this.isMobileBreakpoint) return 0;\n\n const toggleWrapper = this.toggleWrapper?.nativeElement;\n if (!toggleWrapper) return 0;\n\n return toggleWrapper.getBoundingClientRect().height + this.MOBILE_SCROLL_SPACING;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== this.eclNavigationLinkItems.length - 1) {\n this.eclNavigationLinkItems.get(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems.get(index - 1).onFocus();\n } else {\n if (this.isMobileBreakpoint && this.togglerButton) {\n this.setButtonExpanded(false);\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n\n private onItemTab(item: EclInpageNavigationItemComponent, evt: Event): void {\n if (this.isMobileBreakpoint) {\n if (!(evt as KeyboardEvent).shiftKey) {\n const index = this.eclNavigationLinkItems.toArray().indexOf(item);\n if (index === this.eclNavigationLinkItems.length - 1) {\n evt.preventDefault();\n this.togglerButton.nativeElement.focus();\n }\n }\n }\n }\n\n private subscribeToCDKScrollEvent(): void {\n if (!this.isBrowser) return;\n\n this.scrollDispatcher\n .scrolled()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.zone.run(() => {\n const ids = this.eclNavigationLinkItems.map((item) => item.sectionId);\n\n const sectionElements = ids\n .map((id) => this.doc.querySelector<HTMLElement>(`#${id}`))\n .filter((el): el is HTMLElement => !!el);\n\n this.handleNavigationLinksHighlight(sectionElements);\n this.setListHeight();\n });\n });\n }\n\n private selectNavigationItem(itemElement: HTMLElement): void {\n this.eclNavigationLinkItems.forEach((it) => {\n it.isActive = it.sectionElement === itemElement;\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: Array<HTMLElement>): void {\n const currentSectionElement = this.findActiveSectionElement(sectionElements);\n\n if (currentSectionElement !== this.currentSectionElement) {\n this.currentSectionElement = currentSectionElement ?? undefined as HTMLElement | null;\n if (currentSectionElement) this.selectNavigationItem(currentSectionElement);\n\n const sectionId = this.currentNavigationLinkItem?.sectionId;\n this.sectionEnter.next(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: Array<HTMLElement>): HTMLElement | null {\n if (!this.isBrowser || !this.win) return null;\n\n let currentSection: HTMLElement | null = null;\n // On mobile the heading is scrolled to sit just below the sticky toggler (getMobileScrollOffset). Because the\n // scroll target and the spy threshold would otherwise be the exact same value, a heading landing right on the\n // boundary (with sub-pixel rounding) could be treated as \"not yet reached\" and the previous section would be\n // highlighted instead. Adding MIN_DISTANCE_TOP as a cushion lands the heading just inside the active zone,\n // mirroring how the desktop threshold already uses MIN_DISTANCE_TOP.\n const offset = this.isMobileBreakpoint\n ? this.getMobileScrollOffset() + this.MIN_DISTANCE_TOP\n : this.MIN_DISTANCE_TOP + (this.offsetTop ?? 0);\n\n const isNearBottom =\n this.win.innerHeight + this.win.scrollY >=\n this.doc.documentElement.scrollHeight - 10;\n\n for (const sectionElement of sectionElements) {\n const rect = sectionElement.getBoundingClientRect();\n const isAboveOffset = rect.top <= offset;\n const isVisibleInViewport = rect.top < this.win.innerHeight;\n\n if (isAboveOffset || (isVisibleInViewport && isNearBottom)) {\n currentSection = sectionElement;\n }\n }\n\n return currentSection;\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe([Breakpoints.Handset, Breakpoints.Tablet, Breakpoints.Small])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobileBreakpoint = result.matches;\n });\n }\n}\n","<ecl-sticky-container [marginTop]=\"marginTop\" [marginBottom]=\"marginBottom\">\n <nav aria-labelledby=\"ecl-inpage-navigation-default\" class=\"ecl-inpage-navigation\"\n [class.ecl-inpage-navigation--visible]=\"hasActiveSection\" [class.ecl-inpage-navigation--rtl]=\"isRtl\">\n <div #navTittle id=\"ecl-inpage-navigation-default\" class=\"ecl-inpage-navigation__title\">\n {{ eclTitle || 'ecl.inpage-navigation.PAGE-CONTENTS' | translate }}\n </div>\n <div class=\"ecl-inpage-navigation__body\">\n <div #toggleWrapper class=\"ecl-inpage-navigation__trigger-wrapper\">\n <button #togglerButton id=\"ecl-inpage-navigation-default-trigger\" type=\"button\"\n class=\"ecl-inpage-navigation__trigger\" aria-controls=\"ecl-inpage-navigation-list\"\n [attr.aria-expanded]=\"isButtonExpanded\" (click)=\"onExpandButtonClick()\"\n (keydown)=\"onExpandButtonKeydown($event)\">\n <span class=\"ecl-inpage-navigation__trigger-current\">\n {{ currentNavigationLinkItem?.label }}\n </span>\n <ecl-icon icon=\"corner-arrow\" [size]=\"sizeIcon\" transform=\"rotate-180\"\n class=\"ecl-inpage-navigation__trigger-icon\" title=\"Show full page table of contents\">\n </ecl-icon>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n </nav>\n</ecl-sticky-container>","import { EclInpageNavigationItemComponent } from './ecl-inpage-navigation-item.component';\nimport { EclInpageNavigationListDirective } from './ecl-inpage-navigation-list.directive';\nimport { EclInpageNavigationComponent } from './ecl-inpage-navigation.component';\n\nexport * from './ecl-inpage-navigation.component';\nexport * from './ecl-inpage-navigation-item.component';\nexport * from './ecl-inpage-navigation-list.directive';\nexport * from './services/ecl-inpage-navigation.service';\n\nexport const EUI_ECL_INPAGE_NAVIGATION = [\n EclInpageNavigationComponent, EclInpageNavigationItemComponent, EclInpageNavigationListDirective,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["takeUntil","i1"],"mappings":";;;;;;;;;;;;;;;;;AAMM,MAAO,iCAAkC,SAAQ,YAAY,CAAA;AAC/D,IAAA,WAAA,CAAmB,gBAAwB,EAAA;AACvC,QAAA,KAAK,EAAE;QADQ,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;IAEnC;AACH;AACD;;AAEG;AAaG,MAAO,gCAAiC,SAAQ,gBAAgB,CAAA;AAuClE,IAAA,WAAA,GAAA;AACI,QAAA,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AAE7B,QAAA,KAAK,EAAE;QAzCuC,IAAA,CAAA,QAAQ,GAAG,IAAI;AACjE;;AAEG;QACuB,IAAA,CAAA,IAAI,GAAG,UAAU;AAS3C;;AAEG;AACO,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAqC;AAC3E;;AAEG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAE;AAC1C;;AAEG;AACO,QAAA,IAAA,CAAA,aAAa,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
|
|
|
123
123
|
this.megaMenuLink.nativeElement.focus();
|
|
124
124
|
}
|
|
125
125
|
onKeydown(evt) {
|
|
126
|
-
if (evt.key === KeyCode.ENTER) {
|
|
127
|
-
this.onItemClick(evt);
|
|
128
|
-
}
|
|
129
126
|
this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt));
|
|
130
127
|
}
|
|
131
128
|
/**
|