@eui/ecl 22.0.0-alpha.3 → 22.0.0-alpha.5
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 +239 -0
- package/docs/components/EclDateBlockComponent.html +0 -9
- package/docs/components/EclIconComponent.html +1 -1
- package/docs/components/EclMenuItemComponent.html +46 -0
- package/docs/components/EclSiteFooterRowCommonComponent.html +1 -1
- package/docs/components/EclSiteHeaderLanguageComponent.html +5 -627
- package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +99 -440
- package/docs/components/EclSiteHeaderLoginComponent.html +9 -453
- package/docs/components/EclSiteHeaderSearchComponent.html +18 -470
- package/docs/components/EclSocialMediaFollowComponent.html +28 -39
- package/docs/components/EclSocialMediaFollowItemComponent.html +26 -129
- package/docs/components/EclStoryCardComponent.html +1 -1
- package/docs/directives/ECLClickOutsideDirective.html +3 -0
- package/docs/directives/EclDividerDirective.html +0 -116
- package/docs/directives/EclFileUploadDirective.html +2 -390
- package/docs/directives/EclLinkDirective.html +0 -39
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/EclIconComponent.md +1 -1
- package/docs/json/EclSiteHeaderLanguagePopoverComponent.md +6 -6
- package/docs/json/EclSiteHeaderSearchComponent.md +1 -0
- package/docs/json/EclSocialMediaFollowComponent.md +1 -0
- package/docs/json/documentation.json +725 -1234
- package/docs/llms.txt +22 -46
- package/docs/miscellaneous/variables.html +222 -41
- package/docs/properties.html +1 -1
- package/fesm2022/eui-ecl-components-ecl-date-block.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-date-block.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-divider.mjs +6 -13
- package/fesm2022/eui-ecl-components-ecl-divider.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-file-upload.mjs +13 -27
- package/fesm2022/eui-ecl-components-ecl-file-upload.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-icon.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs +53 -9
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-link.mjs +10 -13
- package/fesm2022/eui-ecl-components-ecl-link.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-menu.mjs +16 -3
- package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs +326 -261
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs +17 -17
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-story-card.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-story-card.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eui-ecl-components-ecl-date-block.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-divider.d.ts +0 -4
- package/types/eui-ecl-components-ecl-divider.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-file-upload.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-inpage-navigation.d.ts +25 -0
- package/types/eui-ecl-components-ecl-inpage-navigation.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-link.d.ts +2 -4
- package/types/eui-ecl-components-ecl-link.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-menu.d.ts +12 -1
- package/types/eui-ecl-components-ecl-menu.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-site-header.d.ts +240 -216
- package/types/eui-ecl-components-ecl-site-header.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-social-media-follow.d.ts +5 -3
- package/types/eui-ecl-components-ecl-social-media-follow.d.ts.map +1 -1
|
@@ -5407,13 +5407,13 @@
|
|
|
5407
5407
|
},
|
|
5408
5408
|
{
|
|
5409
5409
|
"name": "EclInpageNavigationSectionEnterEvent",
|
|
5410
|
-
"id": "class-EclInpageNavigationSectionEnterEvent-
|
|
5410
|
+
"id": "class-EclInpageNavigationSectionEnterEvent-5daafc90fdb4dbac03101fb1ec926edaec22dde8c7ba4699dcece0f2c2d48f01b9c51ed69bb59e72fd63be3a46eae2803257a7e8309d6a6dc7f5932d3148a469",
|
|
5411
5411
|
"file": "packages/ecl/components/ecl-inpage-navigation/ecl-inpage-navigation.component.ts",
|
|
5412
5412
|
"coverageIgnore": false,
|
|
5413
5413
|
"deprecated": false,
|
|
5414
5414
|
"deprecationMessage": "",
|
|
5415
5415
|
"type": "class",
|
|
5416
|
-
"sourceCode": "import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, DOCUMENT, DoCheck, ElementRef, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, PLATFORM_ID, afterNextRender, inject, numberAttribute, output, input, viewChild, contentChildren, contentChild } 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 { TranslatePipe } 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: [TranslatePipe, ...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 readonly eclTitle = input<string>(undefined);\n /**\n * Used to calculate component's position.\n */\n readonly marginTop = input<number>(undefined);\n readonly marginBottom = input<number>(undefined);\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 readonly offsetTop = input<number, unknown>(undefined, { transform: numberAttribute });\n readonly togglerButton = viewChild<ElementRef<HTMLButtonElement>>('togglerButton');\n readonly toggleWrapper = viewChild<ElementRef<HTMLDivElement>>('toggleWrapper');\n readonly navTittle = viewChild<ElementRef<HTMLDivElement>>('navTittle');\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n readonly sectionEnter = output<EclInpageNavigationSectionEnterEvent>();\n\n readonly eclNavigationLinkItems = contentChildren(EclInpageNavigationItemComponent, { descendants: true });\n readonly eclNavigationList = contentChild(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 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 const togglerButton = this.togglerButton();\n if (typeof IntersectionObserver !== 'undefined' && togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(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 const togglerButton = this.togglerButton();\n if (this.intersectionObserver && togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(togglerButton.nativeElement);\n this.intersectionObserver.disconnect();\n }\n }\n\n /**\n * On mobile view - handle the dropdown toggle.\n */\n onExpandButtonClick(): void {\n this.isButtonExpanded = !this.isButtonExpanded;\n this.eclInpageNavigationService.eclInpageNavigationToggle(this.isButtonExpanded);\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 const eclNavigationList = this.eclNavigationList();\n if (!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 = 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 eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.isButtonExpanded = true;\n this.eclNavigationLinkItems().at(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems().at(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 item.sectionElement.scrollIntoView();\n item.sectionElement.focus();\n }\n this.isButtonExpanded = false;\n });\n }\n\n private onItemEnter(item: EclInpageNavigationItemComponent): void {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n item.sectionElement.scrollIntoView();\n if (item.sectionElement.tabIndex === -1) {\n item.sectionElement.tabIndex = 0;\n item.sectionElement.focus();\n item.sectionElement.tabIndex = -1;\n }\n }\n this.isButtonExpanded = false;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems().indexOf(item);\n const eclNavigationLinkItems = this.eclNavigationLinkItems();\n if (index !== eclNavigationLinkItems.length - 1) {\n eclNavigationLinkItems.at(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems().at(index - 1).onFocus();\n } else {\n const togglerButton = this.togglerButton();\n if (this.isMobileBreakpoint && togglerButton) {\n this.isButtonExpanded = false;\n 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().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.set(it.sectionElement === itemElement);\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: 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.emit(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: HTMLElement[]): HTMLElement | null {\n if (!this.isBrowser || !this.win) return null;\n\n let currentSection: HTMLElement | null = null;\n const offset = 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",
|
|
5416
|
+
"sourceCode": "import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { isPlatformBrowser } from '@angular/common';\nimport { AfterViewInit, ChangeDetectorRef, Component, DOCUMENT, DoCheck, ElementRef, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, PLATFORM_ID, afterNextRender, contentChild, contentChildren, inject, input, numberAttribute, output, viewChild } 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 { TranslatePipe } 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';\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: [TranslatePipe, ...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 readonly eclTitle = input<string>(undefined);\n /**\n * Used to calculate component's position.\n */\n readonly marginTop = input<number>(undefined);\n readonly marginBottom = input<number>(undefined);\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 readonly offsetTop = input<number, unknown>(undefined, { transform: numberAttribute });\n readonly togglerButton = viewChild<ElementRef<HTMLButtonElement>>('togglerButton');\n readonly toggleWrapper = viewChild<ElementRef<HTMLDivElement>>('toggleWrapper');\n readonly navTittle = viewChild<ElementRef<HTMLDivElement>>('navTittle');\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n readonly sectionEnter = output<EclInpageNavigationSectionEnterEvent>();\n\n readonly eclNavigationLinkItems = contentChildren(EclInpageNavigationItemComponent, { descendants: true });\n readonly eclNavigationList = contentChild(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 const togglerButton = this.togglerButton();\n if (typeof IntersectionObserver !== 'undefined' && togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(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 const togglerButton = this.togglerButton();\n if (this.intersectionObserver && togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(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 const eclNavigationList = this.eclNavigationList();\n if (!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 = 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 eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.setButtonExpanded(true);\n this.eclNavigationLinkItems().at(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems().at(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 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 const toggleWrapper = this.toggleWrapper()?.nativeElement;\n if (!toggleWrapper) return 0;\n return toggleWrapper.getBoundingClientRect().height + this.MOBILE_SCROLL_SPACING;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems().indexOf(item);\n const eclNavigationLinkItems = this.eclNavigationLinkItems();\n if (index !== eclNavigationLinkItems.length - 1) {\n eclNavigationLinkItems.at(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems().at(index - 1).onFocus();\n } else {\n const togglerButton = this.togglerButton();\n if (this.isMobileBreakpoint && togglerButton) {\n this.setButtonExpanded(false);\n 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().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.set(it.sectionElement === itemElement);\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: 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.emit(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: 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",
|
|
5417
5417
|
"displayName": "EclInpageNavigationSectionEnterEvent",
|
|
5418
5418
|
"constructorObj": {
|
|
5419
5419
|
"name": "constructor",
|
|
@@ -8457,13 +8457,13 @@
|
|
|
8457
8457
|
},
|
|
8458
8458
|
{
|
|
8459
8459
|
"name": "EclSocialMediaFollowItemClickEvent",
|
|
8460
|
-
"id": "class-EclSocialMediaFollowItemClickEvent-
|
|
8460
|
+
"id": "class-EclSocialMediaFollowItemClickEvent-be2bc74a52d7b183206e23fa9c6edd0706816decad401fed2ccd0e2788dead5b1d6dbb066556634b97683220c7111e50c45fd911c2cccbe1ec6738847a5e6fdf",
|
|
8461
8461
|
"file": "packages/ecl/components/ecl-social-media-follow/ecl-social-media-follow-item.component.ts",
|
|
8462
8462
|
"coverageIgnore": false,
|
|
8463
8463
|
"deprecated": false,
|
|
8464
8464
|
"deprecationMessage": "",
|
|
8465
8465
|
"type": "class",
|
|
8466
|
-
"sourceCode": "import { booleanAttribute, Component,
|
|
8466
|
+
"sourceCode": "import { booleanAttribute, Component, inject, input, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclBaseEvent } from '@eui/ecl/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\nimport { RouterLink, RouterLinkWithHref } from '@angular/router';\nimport { EclSocialMediaFollowComponent } from './ecl-social-media-follow.component';\n\nexport class EclSocialMediaFollowItemClickEvent extends EclBaseEvent {}\n\n@Component({\n selector: 'ecl-social-media-follow-item',\n templateUrl: './ecl-social-media-follow-item.component.html',\n imports: [...EUI_ECL_ICON, ...EUI_ECL_LINK, NgTemplateOutlet, RouterLink, RouterLinkWithHref],\n host: {\n role: 'listitem',\n '[class]': 'cssClasses',\n },\n})\nexport class EclSocialMediaFollowItemComponent extends ECLBaseDirective {\n readonly isInverted = input<false, unknown>(undefined, { transform: (booleanAttribute) as any });\n icon = input<string>();\n iconSet = input<string>('social-media');\n readonly href = input('');\n readonly routerLink = input('');\n readonly target = input<string>(undefined);\n readonly size = input('m');\n readonly extraAttributes = input<{\n name: string;\n value?: string | null;\n }[]>(undefined);\n\n get cssClasses(): string {\n return [super.getCssClasses('ecl-social-media-follow__item')].join(' ').trim();\n }\n\n readonly itemClick = output<EclSocialMediaFollowItemClickEvent>();\n\n private parent = inject(EclSocialMediaFollowComponent);\n\n get isIconOnly(): boolean {\n return this.parent?.isIconOnly() ?? false;\n }\n\n onItemClick(evt: Event): void {\n this.itemClick.emit(new EclSocialMediaFollowItemClickEvent());\n if (!this.href() && !this.routerLink()) {\n evt.preventDefault();\n }\n }\n}\n",
|
|
8467
8467
|
"displayName": "EclSocialMediaFollowItemClickEvent",
|
|
8468
8468
|
"inputsClass": [],
|
|
8469
8469
|
"outputsClass": [],
|
|
@@ -13303,6 +13303,11 @@
|
|
|
13303
13303
|
"name": "EclSiteHeaderLoginComponent",
|
|
13304
13304
|
"type": "component",
|
|
13305
13305
|
"description": "Component for login/logout as part of the harmonised site header. Emits events when user logs in and when user opens the login dropdown."
|
|
13306
|
+
},
|
|
13307
|
+
{
|
|
13308
|
+
"name": "EclSiteHeaderSearchComponent",
|
|
13309
|
+
"type": "component",
|
|
13310
|
+
"description": "This component builds the search box in the ecl-site-header component. Adds specific style and functionality, emits events on search and..."
|
|
13306
13311
|
}
|
|
13307
13312
|
],
|
|
13308
13313
|
"outgoing": [
|
|
@@ -18033,12 +18038,12 @@
|
|
|
18033
18038
|
},
|
|
18034
18039
|
{
|
|
18035
18040
|
"name": "EclDividerDirective",
|
|
18036
|
-
"id": "directive-EclDividerDirective-
|
|
18041
|
+
"id": "directive-EclDividerDirective-8335ebb38f5612ec5a4bdd37aaf55f0c013e9f290749f7439a0096a4f3937f6a4c099fbcce510063095dd7b3e20f60dd44158063f777adace5876c68fd0d79a2",
|
|
18037
18042
|
"file": "packages/ecl/components/ecl-divider/ecl-divider.directive.ts",
|
|
18038
18043
|
"type": "directive",
|
|
18039
18044
|
"description": "<p>Directive that applies ECL styling for horizontal separators (<code><hr></code> elements).\nAdds the <code>ecl-separator</code> CSS class to the host element.</p>\n",
|
|
18040
18045
|
"rawdescription": "\n\nDirective that applies ECL styling for horizontal separators (`<hr>` elements).\nAdds the `ecl-separator` CSS class to the host element.\n",
|
|
18041
|
-
"sourceCode": "import { Directive
|
|
18046
|
+
"sourceCode": "import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive that applies ECL styling for horizontal separators (`<hr>` elements).\n * Adds the `ecl-separator` CSS class to the host element.\n */\n@Directive({\n selector: 'hr[eclDivider]',\n host: {\n 'class': 'ecl-separator',\n },\n})\nexport class EclDividerDirective extends ECLBaseDirective {}\n",
|
|
18042
18047
|
"selector": "hr[eclDivider]",
|
|
18043
18048
|
"providers": [],
|
|
18044
18049
|
"hostDirectives": [],
|
|
@@ -18091,46 +18096,9 @@
|
|
|
18091
18096
|
"outputsClass": [],
|
|
18092
18097
|
"deprecated": false,
|
|
18093
18098
|
"deprecationMessage": "",
|
|
18094
|
-
"hostBindings": [
|
|
18095
|
-
{
|
|
18096
|
-
"coverageIgnore": false,
|
|
18097
|
-
"name": "class.ecl-separator",
|
|
18098
|
-
"actualName": "hasClass",
|
|
18099
|
-
"defaultValue": "true",
|
|
18100
|
-
"deprecated": false,
|
|
18101
|
-
"deprecationMessage": "",
|
|
18102
|
-
"rawdescription": "\n\nBinds the `ecl-separator` CSS class to the host `<hr>` element.\n",
|
|
18103
|
-
"description": "<p>Binds the <code>ecl-separator</code> CSS class to the host <code><hr></code> element.</p>\n",
|
|
18104
|
-
"line": 15,
|
|
18105
|
-
"type": "boolean",
|
|
18106
|
-
"decorators": []
|
|
18107
|
-
}
|
|
18108
|
-
],
|
|
18099
|
+
"hostBindings": [],
|
|
18109
18100
|
"hostListeners": [],
|
|
18110
|
-
"propertiesClass": [
|
|
18111
|
-
{
|
|
18112
|
-
"name": "hasClass",
|
|
18113
|
-
"coverageIgnore": false,
|
|
18114
|
-
"defaultValue": "true",
|
|
18115
|
-
"deprecated": false,
|
|
18116
|
-
"deprecationMessage": "",
|
|
18117
|
-
"type": "unknown",
|
|
18118
|
-
"indexKey": "",
|
|
18119
|
-
"optional": false,
|
|
18120
|
-
"description": "<p>Binds the <code>ecl-separator</code> CSS class to the host <code><hr></code> element.</p>\n",
|
|
18121
|
-
"line": 15,
|
|
18122
|
-
"rawdescription": "\n\nBinds the `ecl-separator` CSS class to the host `<hr>` element.\n",
|
|
18123
|
-
"decorators": [
|
|
18124
|
-
{
|
|
18125
|
-
"name": "HostBinding",
|
|
18126
|
-
"stringifiedArguments": "'class.ecl-separator'"
|
|
18127
|
-
}
|
|
18128
|
-
],
|
|
18129
|
-
"modifierKind": [
|
|
18130
|
-
171
|
|
18131
|
-
]
|
|
18132
|
-
}
|
|
18133
|
-
],
|
|
18101
|
+
"propertiesClass": [],
|
|
18134
18102
|
"methodsClass": [
|
|
18135
18103
|
{
|
|
18136
18104
|
"name": "getCssClasses",
|
|
@@ -18174,8 +18142,8 @@
|
|
|
18174
18142
|
"coverageIgnore": false,
|
|
18175
18143
|
"jsdoctags": [
|
|
18176
18144
|
{
|
|
18177
|
-
"pos":
|
|
18178
|
-
"end":
|
|
18145
|
+
"pos": 94,
|
|
18146
|
+
"end": 243,
|
|
18179
18147
|
"kind": 321,
|
|
18180
18148
|
"id": 0,
|
|
18181
18149
|
"flags": 16777216,
|
|
@@ -20015,12 +19983,12 @@
|
|
|
20015
19983
|
},
|
|
20016
19984
|
{
|
|
20017
19985
|
"name": "EclFileUploadDirective",
|
|
20018
|
-
"id": "directive-EclFileUploadDirective-
|
|
19986
|
+
"id": "directive-EclFileUploadDirective-e28d4f19a66fd44eef8fcedc12262c782b173d90e27797eeea41f8f899542b6533c65168a06323331cadeddfdb9014b71d049cb7081b707006db8e611359d24a",
|
|
20019
19987
|
"file": "packages/ecl/components/ecl-file-upload/ecl-file-upload.directive.ts",
|
|
20020
19988
|
"type": "directive",
|
|
20021
19989
|
"description": "<p>Directive that enhances a native input[type=file] with ECL-compliant styling and behavior.\nSupports multiple file selection, dynamic file list rendering, translations and validation state.</p>\n",
|
|
20022
19990
|
"rawdescription": "\n\nDirective that enhances a native input[type=file] with ECL-compliant styling and behavior.\nSupports multiple file selection, dynamic file list rendering, translations and validation state.\n",
|
|
20023
|
-
"sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport {\n Directive,\n DoCheck,\n ElementRef,\n
|
|
19991
|
+
"sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport {\n Directive,\n DoCheck,\n ElementRef,\n inject,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n booleanAttribute,\n output,\n input,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclFileUpload } from './models/ecl-file-upload.model';\nimport { EclFileUploadFileSelectedEvent } from './events/ecl-file-upload-file-selected.event';\n\n/**\n * Directive that enhances a native input[type=file] with ECL-compliant styling and behavior.\n * Supports multiple file selection, dynamic file list rendering, translations and validation state.\n */\n@Directive({\n selector: '[eclFileUpload]',\n host: {\n '[attr.type]': 'type',\n '[attr.id]': 'id()',\n '[attr.disabled]': 'disabled() ? \"\" : null',\n '[attr.multiple]': 'multiple() ? \"\" : null',\n '[class]': 'cssClasses',\n '[class.ecl-file-upload--invalid]': 'invalidState',\n '(click)': 'onClick($event)',\n '(change)': 'onFilesSelected($event)',\n },\n})\nexport class EclFileUploadDirective extends ECLBaseDirective implements OnInit, OnDestroy, DoCheck {\n protected ngControl = inject(NgControl, { optional: true, self: true });\n\n /**\n * Variant of the component's appearance. Currently unused. Default: `'default'`.\n */\n readonly variant = input('default');\n\n /**\n * Marks the component as invalid (if not using Angular form validation).\n */\n readonly isInvalid = input(false, { transform: booleanAttribute });\n\n /**\n * ID attribute applied to the native file input.\n */\n readonly id = input<string>(undefined);\n\n /**\n * Whether the component is disabled.\n */\n readonly disabled = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Allows selecting multiple files.\n */\n readonly multiple = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Event emitted when files are selected.\n */\n readonly filesSelected = output<EclFileUploadFileSelectedEvent>();\n\n /**\n * Host binding to define input type as 'file'.\n */\n type = 'file';\n\n private fileListEl: HTMLElement;\n\n private files: EclFileUpload[] = [];\n private buttonEl: HTMLElement;\n private labelEl: HTMLElement;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly SPAN_BUTTON_CONVERSION_CLASSES = ['ecl-button', 'ecl-button--primary', 'ecl-file-upload__button'];\n private el = inject(ElementRef);\n private translate = inject(TranslateService);\n private renderer = inject(Renderer2);\n private platformId = inject(PLATFORM_ID);\n\n /**\n * Applies the base `ecl-file-upload` class to the host element.\n */\n get cssClasses(): string {\n return [super.getCssClasses('ecl-file-upload')].join(' ').trim();\n }\n\n /**\n * Returns `true` if component should be displayed as invalid.\n * Prioritizes Angular form control status over `isInvalid` input.\n */\n get invalidState(): boolean {\n if (this.ngControl) {\n return this.ngControl.status === 'INVALID' && this.ngControl.touched;\n } else {\n return this.isInvalid();\n }\n }\n\n /**\n * Initializes component structure and translation subscription (browser-only).\n */\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n this.createDOMStructure();\n this.handleTranslations();\n }\n }\n\n /**\n * Clean up resources and RxJS subscriptions.\n */\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Checks component state during change detection to toggle the disabled state of internal elements.\n */\n ngDoCheck(): void {\n if (this.disabled()) {\n this.renderer.setAttribute(this.buttonEl, 'disabled', 'true');\n } else {\n this.renderer.removeAttribute(this.buttonEl, 'disabled');\n }\n }\n\n /**\n * Prevents file dialog from opening when component is disabled.\n * @param evt Click event on the input element.\n */\n onClick(evt: Event): void {\n if (this.disabled()) {\n evt.preventDefault();\n }\n }\n\n /**\n * Handles file selection and emits a structured file selection event.\n * @param evt Change event from input.\n */\n onFilesSelected(evt: Event): void {\n const inputElement: HTMLInputElement = evt.target as HTMLInputElement;\n const fileList: FileList = inputElement.files;\n this.files = this.getFileModels(fileList);\n\n const fileEvent = new EclFileUploadFileSelectedEvent(this.files);\n this.filesSelected.emit(fileEvent);\n\n if (!fileEvent.defaultPrevented) {\n this.handleTranslations();\n this.updateListItemsDOM(this.files);\n }\n }\n\n private handleTranslations(): void {\n const uploadButtonLabelKey = this.geti18nUploadButtonLabelKey();\n\n this.translate\n .stream(uploadButtonLabelKey)\n .pipe(takeUntil(this.destroy$))\n .subscribe((translation: string) => {\n if (this.buttonEl) {\n this.renderer.setProperty(this.buttonEl, 'textContent', translation);\n }\n });\n }\n\n private geti18nUploadButtonLabelKey(): string {\n let key = '';\n\n if (this.files && this.files.length !== 0) {\n if (this.multiple()) {\n key = 'ecl.file-upload.REPLACE-FILES';\n } else {\n key = 'ecl.file-upload.REPLACE-FILE';\n }\n } else {\n if (this.multiple()) {\n key = 'ecl.file-upload.CHOOSE-FILES';\n } else {\n key = 'ecl.file-upload.CHOOSE-FILE';\n }\n }\n\n return key;\n }\n\n private updateListItemsDOM(files: EclFileUpload[]): void {\n this.renderer.setProperty(this.fileListEl, 'textContent', '');\n files.forEach((file) => {\n const item = this.createFileListItemDOMElement(file);\n this.renderer.appendChild(this.fileListEl, item);\n });\n }\n\n private createDOMStructure(): void {\n const labelEl = this.createLabelDOMElement();\n const hostEl = this.getHostDOMElement();\n const fileListEl = this.createFileListDOMElement();\n\n hostEl.insertAdjacentElement('afterend', fileListEl);\n hostEl.insertAdjacentElement('afterend', labelEl);\n\n this.fileListEl = fileListEl;\n }\n\n private getHostDOMElement(): HTMLInputElement {\n return this.el.nativeElement;\n }\n\n private createLabelDOMElement(): HTMLElement {\n this.buttonEl = this.renderer.createElement('span');\n this.addClasses(this.buttonEl, this.SPAN_BUTTON_CONVERSION_CLASSES);\n\n this.labelEl = this.renderer.createElement('label');\n this.renderer.setAttribute(this.labelEl, 'for', this.id());\n this.renderer.addClass(this.labelEl, 'ecl-file-upload__button-container');\n\n this.renderer.appendChild(this.labelEl, this.buttonEl);\n\n return this.labelEl;\n }\n\n private addClasses(element: HTMLElement, classes: string[] ): void {\n classes.forEach(className=> this.renderer.addClass(element, className) )\n }\n\n private createFileListDOMElement(): HTMLElement {\n const element = this.renderer.createElement('ul');\n this.renderer.addClass(element,'ecl-file-upload__list');\n this.renderer.setAttribute(element,'aria-live','polite');\n\n return element;\n }\n\n private createFileListItemDOMElement(fileUpload: EclFileUpload): HTMLElement {\n const liElement = this.renderer.createElement('li');\n this.renderer.addClass(liElement,'ecl-file-upload__item');\n\n const fileNameElement = this.renderer.createElement('span');\n const fileName = this.renderer.createText(fileUpload.name);\n this.renderer.appendChild(fileNameElement, fileName);\n\n this.renderer.addClass( fileNameElement,'ecl-file-upload__item-name' );\n\n const fileMetaElement = this.renderer.createElement('span');\n\n const fileMetaElementText = this.renderer.createText(`(${fileUpload.size} - ${fileUpload.extension})`);\n this.renderer.appendChild(fileMetaElement, fileMetaElementText);\n this.renderer.addClass(fileMetaElement, 'ecl-file-upload__item-meta');\n\n this.renderer.appendChild(liElement, fileNameElement);\n this.renderer.appendChild(liElement, fileMetaElement);\n\n return liElement;\n }\n\n private getFileModels(fileList: FileList): EclFileUpload[] {\n return Array.from(fileList).map((f) => ({\n name: f.name,\n extension: this.getFilenameExtension(f.name),\n size: this.formatBytes(f.size),\n }));\n }\n\n private getFilenameExtension(filename: string): string {\n return filename.split('.').pop();\n }\n\n private formatBytes(bytes, decimals = 2): string {\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['Bytes', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;\n }\n}\n",
|
|
20024
19992
|
"selector": "[eclFileUpload]",
|
|
20025
19993
|
"providers": [],
|
|
20026
19994
|
"hostDirectives": [],
|
|
@@ -20036,16 +20004,9 @@
|
|
|
20036
20004
|
"indexKey": "",
|
|
20037
20005
|
"optional": false,
|
|
20038
20006
|
"description": "<p>Whether the component is disabled.</p>\n",
|
|
20039
|
-
"line":
|
|
20007
|
+
"line": 61,
|
|
20040
20008
|
"rawdescription": "\n\nWhether the component is disabled.\n",
|
|
20041
|
-
"decorators": [
|
|
20042
|
-
{
|
|
20043
|
-
"name": "HostBinding",
|
|
20044
|
-
"stringifiedArguments": "'attr.disabled'"
|
|
20045
|
-
}
|
|
20046
|
-
],
|
|
20047
20009
|
"modifierKind": [
|
|
20048
|
-
171,
|
|
20049
20010
|
148
|
|
20050
20011
|
],
|
|
20051
20012
|
"required": false
|
|
@@ -20060,16 +20021,9 @@
|
|
|
20060
20021
|
"indexKey": "",
|
|
20061
20022
|
"optional": false,
|
|
20062
20023
|
"description": "<p>ID attribute applied to the native file input.</p>\n",
|
|
20063
|
-
"line":
|
|
20024
|
+
"line": 56,
|
|
20064
20025
|
"rawdescription": "\n\nID attribute applied to the native file input.\n",
|
|
20065
|
-
"decorators": [
|
|
20066
|
-
{
|
|
20067
|
-
"name": "HostBinding",
|
|
20068
|
-
"stringifiedArguments": "'attr.id'"
|
|
20069
|
-
}
|
|
20070
|
-
],
|
|
20071
20026
|
"modifierKind": [
|
|
20072
|
-
171,
|
|
20073
20027
|
148
|
|
20074
20028
|
],
|
|
20075
20029
|
"required": false
|
|
@@ -20084,7 +20038,7 @@
|
|
|
20084
20038
|
"indexKey": "",
|
|
20085
20039
|
"optional": false,
|
|
20086
20040
|
"description": "<p>Marks the component as invalid (if not using Angular form validation).</p>\n",
|
|
20087
|
-
"line":
|
|
20041
|
+
"line": 51,
|
|
20088
20042
|
"rawdescription": "\n\nMarks the component as invalid (if not using Angular form validation).\n",
|
|
20089
20043
|
"modifierKind": [
|
|
20090
20044
|
148
|
|
@@ -20101,16 +20055,9 @@
|
|
|
20101
20055
|
"indexKey": "",
|
|
20102
20056
|
"optional": false,
|
|
20103
20057
|
"description": "<p>Allows selecting multiple files.</p>\n",
|
|
20104
|
-
"line":
|
|
20058
|
+
"line": 66,
|
|
20105
20059
|
"rawdescription": "\n\nAllows selecting multiple files.\n",
|
|
20106
|
-
"decorators": [
|
|
20107
|
-
{
|
|
20108
|
-
"name": "HostBinding",
|
|
20109
|
-
"stringifiedArguments": "'attr.multiple'"
|
|
20110
|
-
}
|
|
20111
|
-
],
|
|
20112
20060
|
"modifierKind": [
|
|
20113
|
-
171,
|
|
20114
20061
|
148
|
|
20115
20062
|
],
|
|
20116
20063
|
"required": false
|
|
@@ -20125,7 +20072,7 @@
|
|
|
20125
20072
|
"indexKey": "",
|
|
20126
20073
|
"optional": false,
|
|
20127
20074
|
"description": "<p>Variant of the component's appearance. Currently unused. Default: <code>'default'</code>.</p>\n",
|
|
20128
|
-
"line":
|
|
20075
|
+
"line": 46,
|
|
20129
20076
|
"rawdescription": "\n\nVariant of the component's appearance. Currently unused. Default: `'default'`.\n",
|
|
20130
20077
|
"modifierKind": [
|
|
20131
20078
|
148
|
|
@@ -20186,7 +20133,7 @@
|
|
|
20186
20133
|
"indexKey": "",
|
|
20187
20134
|
"optional": false,
|
|
20188
20135
|
"description": "<p>Event emitted when files are selected.</p>\n",
|
|
20189
|
-
"line":
|
|
20136
|
+
"line": 71,
|
|
20190
20137
|
"rawdescription": "\n\nEvent emitted when files are selected.\n",
|
|
20191
20138
|
"modifierKind": [
|
|
20192
20139
|
148
|
|
@@ -20196,194 +20143,8 @@
|
|
|
20196
20143
|
],
|
|
20197
20144
|
"deprecated": false,
|
|
20198
20145
|
"deprecationMessage": "",
|
|
20199
|
-
"hostBindings": [
|
|
20200
|
-
|
|
20201
|
-
"coverageIgnore": false,
|
|
20202
|
-
"name": "attr.disabled",
|
|
20203
|
-
"actualName": "disabled",
|
|
20204
|
-
"defaultValue": "input<boolean, unknown>(undefined, { transform: booleanAttribute })",
|
|
20205
|
-
"deprecated": false,
|
|
20206
|
-
"deprecationMessage": "",
|
|
20207
|
-
"rawdescription": "\n\nWhether the component is disabled.\n",
|
|
20208
|
-
"description": "<p>Whether the component is disabled.</p>\n",
|
|
20209
|
-
"line": 55,
|
|
20210
|
-
"type": "any",
|
|
20211
|
-
"decorators": []
|
|
20212
|
-
},
|
|
20213
|
-
{
|
|
20214
|
-
"coverageIgnore": false,
|
|
20215
|
-
"name": "attr.id",
|
|
20216
|
-
"actualName": "id",
|
|
20217
|
-
"defaultValue": "input<string>(undefined)",
|
|
20218
|
-
"deprecated": false,
|
|
20219
|
-
"deprecationMessage": "",
|
|
20220
|
-
"rawdescription": "\n\nID attribute applied to the native file input.\n",
|
|
20221
|
-
"description": "<p>ID attribute applied to the native file input.</p>\n",
|
|
20222
|
-
"line": 49,
|
|
20223
|
-
"type": "any",
|
|
20224
|
-
"decorators": []
|
|
20225
|
-
},
|
|
20226
|
-
{
|
|
20227
|
-
"coverageIgnore": false,
|
|
20228
|
-
"name": "attr.multiple",
|
|
20229
|
-
"actualName": "multiple",
|
|
20230
|
-
"defaultValue": "input<boolean, unknown>(undefined, { transform: booleanAttribute })",
|
|
20231
|
-
"deprecated": false,
|
|
20232
|
-
"deprecationMessage": "",
|
|
20233
|
-
"rawdescription": "\n\nAllows selecting multiple files.\n",
|
|
20234
|
-
"description": "<p>Allows selecting multiple files.</p>\n",
|
|
20235
|
-
"line": 61,
|
|
20236
|
-
"type": "any",
|
|
20237
|
-
"decorators": []
|
|
20238
|
-
},
|
|
20239
|
-
{
|
|
20240
|
-
"coverageIgnore": false,
|
|
20241
|
-
"name": "attr.type",
|
|
20242
|
-
"actualName": "type",
|
|
20243
|
-
"defaultValue": "'file'",
|
|
20244
|
-
"deprecated": false,
|
|
20245
|
-
"deprecationMessage": "",
|
|
20246
|
-
"rawdescription": "\n\nHost binding to define input type as 'file'.\n",
|
|
20247
|
-
"description": "<p>Host binding to define input type as 'file'.</p>\n",
|
|
20248
|
-
"line": 71,
|
|
20249
|
-
"type": "string",
|
|
20250
|
-
"decorators": []
|
|
20251
|
-
},
|
|
20252
|
-
{
|
|
20253
|
-
"coverageIgnore": false,
|
|
20254
|
-
"name": "class",
|
|
20255
|
-
"actualName": "cssClasses",
|
|
20256
|
-
"deprecated": false,
|
|
20257
|
-
"deprecationMessage": "",
|
|
20258
|
-
"rawdescription": "\n\nApplies the base `ecl-file-upload` class to the host element.\n",
|
|
20259
|
-
"description": "<p>Applies the base <code>ecl-file-upload</code> class to the host element.</p>\n",
|
|
20260
|
-
"line": 89,
|
|
20261
|
-
"type": "string",
|
|
20262
|
-
"decorators": []
|
|
20263
|
-
},
|
|
20264
|
-
{
|
|
20265
|
-
"coverageIgnore": false,
|
|
20266
|
-
"name": "class.ecl-file-upload--invalid",
|
|
20267
|
-
"actualName": "invalidState",
|
|
20268
|
-
"deprecated": false,
|
|
20269
|
-
"deprecationMessage": "",
|
|
20270
|
-
"rawdescription": "\n\nReturns `true` if component should be displayed as invalid.\nPrioritizes Angular form control status over `isInvalid` input.\n",
|
|
20271
|
-
"description": "<p>Returns <code>true</code> if component should be displayed as invalid.\nPrioritizes Angular form control status over <code>isInvalid</code> input.</p>\n",
|
|
20272
|
-
"line": 98,
|
|
20273
|
-
"type": "boolean",
|
|
20274
|
-
"decorators": []
|
|
20275
|
-
}
|
|
20276
|
-
],
|
|
20277
|
-
"hostListeners": [
|
|
20278
|
-
{
|
|
20279
|
-
"coverageIgnore": false,
|
|
20280
|
-
"name": "change",
|
|
20281
|
-
"args": [
|
|
20282
|
-
{
|
|
20283
|
-
"name": "evt",
|
|
20284
|
-
"type": "Event",
|
|
20285
|
-
"optional": false,
|
|
20286
|
-
"dotDotDotToken": false,
|
|
20287
|
-
"deprecated": false,
|
|
20288
|
-
"deprecationMessage": ""
|
|
20289
|
-
}
|
|
20290
|
-
],
|
|
20291
|
-
"argsDecorator": [
|
|
20292
|
-
"$event"
|
|
20293
|
-
],
|
|
20294
|
-
"deprecated": false,
|
|
20295
|
-
"deprecationMessage": "",
|
|
20296
|
-
"rawdescription": "\n\nHandles file selection and emits a structured file selection event.\n",
|
|
20297
|
-
"description": "<p>Handles file selection and emits a structured file selection event.</p>\n",
|
|
20298
|
-
"jsdoctags": [
|
|
20299
|
-
{
|
|
20300
|
-
"pos": 4493,
|
|
20301
|
-
"end": 4534,
|
|
20302
|
-
"kind": 342,
|
|
20303
|
-
"id": 0,
|
|
20304
|
-
"flags": 16842752,
|
|
20305
|
-
"modifierFlagsCache": 0,
|
|
20306
|
-
"transformFlags": 0,
|
|
20307
|
-
"tagName": {
|
|
20308
|
-
"pos": 4494,
|
|
20309
|
-
"end": 4499,
|
|
20310
|
-
"kind": 80,
|
|
20311
|
-
"id": 0,
|
|
20312
|
-
"flags": 16842752,
|
|
20313
|
-
"transformFlags": 0,
|
|
20314
|
-
"escapedText": "param"
|
|
20315
|
-
},
|
|
20316
|
-
"comment": "<p>Change event from input.</p>\n",
|
|
20317
|
-
"name": {
|
|
20318
|
-
"pos": 4500,
|
|
20319
|
-
"end": 4503,
|
|
20320
|
-
"kind": 80,
|
|
20321
|
-
"id": 0,
|
|
20322
|
-
"flags": 16842752,
|
|
20323
|
-
"transformFlags": 0,
|
|
20324
|
-
"escapedText": "evt"
|
|
20325
|
-
},
|
|
20326
|
-
"isNameFirst": true,
|
|
20327
|
-
"isBracketed": false
|
|
20328
|
-
}
|
|
20329
|
-
],
|
|
20330
|
-
"line": 149
|
|
20331
|
-
},
|
|
20332
|
-
{
|
|
20333
|
-
"coverageIgnore": false,
|
|
20334
|
-
"name": "click",
|
|
20335
|
-
"args": [
|
|
20336
|
-
{
|
|
20337
|
-
"name": "evt",
|
|
20338
|
-
"type": "Event",
|
|
20339
|
-
"optional": false,
|
|
20340
|
-
"dotDotDotToken": false,
|
|
20341
|
-
"deprecated": false,
|
|
20342
|
-
"deprecationMessage": ""
|
|
20343
|
-
}
|
|
20344
|
-
],
|
|
20345
|
-
"argsDecorator": [
|
|
20346
|
-
"$event"
|
|
20347
|
-
],
|
|
20348
|
-
"deprecated": false,
|
|
20349
|
-
"deprecationMessage": "",
|
|
20350
|
-
"rawdescription": "\n\nPrevents file dialog from opening when component is disabled.\n",
|
|
20351
|
-
"description": "<p>Prevents file dialog from opening when component is disabled.</p>\n",
|
|
20352
|
-
"jsdoctags": [
|
|
20353
|
-
{
|
|
20354
|
-
"pos": 4201,
|
|
20355
|
-
"end": 4251,
|
|
20356
|
-
"kind": 342,
|
|
20357
|
-
"id": 0,
|
|
20358
|
-
"flags": 16842752,
|
|
20359
|
-
"modifierFlagsCache": 0,
|
|
20360
|
-
"transformFlags": 0,
|
|
20361
|
-
"tagName": {
|
|
20362
|
-
"pos": 4202,
|
|
20363
|
-
"end": 4207,
|
|
20364
|
-
"kind": 80,
|
|
20365
|
-
"id": 0,
|
|
20366
|
-
"flags": 16842752,
|
|
20367
|
-
"transformFlags": 0,
|
|
20368
|
-
"escapedText": "param"
|
|
20369
|
-
},
|
|
20370
|
-
"comment": "<p>Click event on the input element.</p>\n",
|
|
20371
|
-
"name": {
|
|
20372
|
-
"pos": 4208,
|
|
20373
|
-
"end": 4211,
|
|
20374
|
-
"kind": 80,
|
|
20375
|
-
"id": 0,
|
|
20376
|
-
"flags": 16842752,
|
|
20377
|
-
"transformFlags": 0,
|
|
20378
|
-
"escapedText": "evt"
|
|
20379
|
-
},
|
|
20380
|
-
"isNameFirst": true,
|
|
20381
|
-
"isBracketed": false
|
|
20382
|
-
}
|
|
20383
|
-
],
|
|
20384
|
-
"line": 139
|
|
20385
|
-
}
|
|
20386
|
-
],
|
|
20146
|
+
"hostBindings": [],
|
|
20147
|
+
"hostListeners": [],
|
|
20387
20148
|
"propertiesClass": [
|
|
20388
20149
|
{
|
|
20389
20150
|
"name": "ngControl",
|
|
@@ -20395,7 +20156,7 @@
|
|
|
20395
20156
|
"indexKey": "",
|
|
20396
20157
|
"optional": false,
|
|
20397
20158
|
"description": "",
|
|
20398
|
-
"line":
|
|
20159
|
+
"line": 41,
|
|
20399
20160
|
"rawdescription": "\n",
|
|
20400
20161
|
"modifierKind": [
|
|
20401
20162
|
124
|
|
@@ -20411,17 +20172,8 @@
|
|
|
20411
20172
|
"indexKey": "",
|
|
20412
20173
|
"optional": false,
|
|
20413
20174
|
"description": "<p>Host binding to define input type as 'file'.</p>\n",
|
|
20414
|
-
"line":
|
|
20415
|
-
"rawdescription": "\n\nHost binding to define input type as 'file'.\n"
|
|
20416
|
-
"decorators": [
|
|
20417
|
-
{
|
|
20418
|
-
"name": "HostBinding",
|
|
20419
|
-
"stringifiedArguments": "'attr.type'"
|
|
20420
|
-
}
|
|
20421
|
-
],
|
|
20422
|
-
"modifierKind": [
|
|
20423
|
-
171
|
|
20424
|
-
]
|
|
20175
|
+
"line": 76,
|
|
20176
|
+
"rawdescription": "\n\nHost binding to define input type as 'file'.\n"
|
|
20425
20177
|
}
|
|
20426
20178
|
],
|
|
20427
20179
|
"methodsClass": [
|
|
@@ -20432,7 +20184,7 @@
|
|
|
20432
20184
|
"optional": false,
|
|
20433
20185
|
"returnType": "void",
|
|
20434
20186
|
"typeParameters": [],
|
|
20435
|
-
"line":
|
|
20187
|
+
"line": 130,
|
|
20436
20188
|
"deprecated": false,
|
|
20437
20189
|
"deprecationMessage": "",
|
|
20438
20190
|
"rawdescription": "\n\nChecks component state during change detection to toggle the disabled state of internal elements.\n",
|
|
@@ -20445,7 +20197,7 @@
|
|
|
20445
20197
|
"optional": false,
|
|
20446
20198
|
"returnType": "void",
|
|
20447
20199
|
"typeParameters": [],
|
|
20448
|
-
"line":
|
|
20200
|
+
"line": 122,
|
|
20449
20201
|
"deprecated": false,
|
|
20450
20202
|
"deprecationMessage": "",
|
|
20451
20203
|
"rawdescription": "\n\nClean up resources and RxJS subscriptions.\n",
|
|
@@ -20458,7 +20210,7 @@
|
|
|
20458
20210
|
"optional": false,
|
|
20459
20211
|
"returnType": "void",
|
|
20460
20212
|
"typeParameters": [],
|
|
20461
|
-
"line":
|
|
20213
|
+
"line": 112,
|
|
20462
20214
|
"deprecated": false,
|
|
20463
20215
|
"deprecationMessage": "",
|
|
20464
20216
|
"rawdescription": "\n\nInitializes component structure and translation subscription (browser-only).\n",
|
|
@@ -20480,25 +20232,16 @@
|
|
|
20480
20232
|
"optional": false,
|
|
20481
20233
|
"returnType": "void",
|
|
20482
20234
|
"typeParameters": [],
|
|
20483
|
-
"line":
|
|
20235
|
+
"line": 142,
|
|
20484
20236
|
"deprecated": false,
|
|
20485
20237
|
"deprecationMessage": "",
|
|
20486
20238
|
"rawdescription": "\n\nPrevents file dialog from opening when component is disabled.\n",
|
|
20487
20239
|
"description": "<p>Prevents file dialog from opening when component is disabled.</p>\n",
|
|
20488
|
-
"decorators": [
|
|
20489
|
-
{
|
|
20490
|
-
"name": "HostListener",
|
|
20491
|
-
"stringifiedArguments": "'click', ['$event']"
|
|
20492
|
-
}
|
|
20493
|
-
],
|
|
20494
|
-
"modifierKind": [
|
|
20495
|
-
171
|
|
20496
|
-
],
|
|
20497
20240
|
"jsdoctags": [
|
|
20498
20241
|
{
|
|
20499
20242
|
"name": {
|
|
20500
|
-
"pos":
|
|
20501
|
-
"end":
|
|
20243
|
+
"pos": 4337,
|
|
20244
|
+
"end": 4340,
|
|
20502
20245
|
"kind": 80,
|
|
20503
20246
|
"id": 0,
|
|
20504
20247
|
"flags": 16842752,
|
|
@@ -20511,8 +20254,8 @@
|
|
|
20511
20254
|
"deprecated": false,
|
|
20512
20255
|
"deprecationMessage": "",
|
|
20513
20256
|
"tagName": {
|
|
20514
|
-
"pos":
|
|
20515
|
-
"end":
|
|
20257
|
+
"pos": 4331,
|
|
20258
|
+
"end": 4336,
|
|
20516
20259
|
"kind": 80,
|
|
20517
20260
|
"id": 0,
|
|
20518
20261
|
"flags": 16842752,
|
|
@@ -20539,25 +20282,16 @@
|
|
|
20539
20282
|
"optional": false,
|
|
20540
20283
|
"returnType": "void",
|
|
20541
20284
|
"typeParameters": [],
|
|
20542
|
-
"line":
|
|
20285
|
+
"line": 152,
|
|
20543
20286
|
"deprecated": false,
|
|
20544
20287
|
"deprecationMessage": "",
|
|
20545
20288
|
"rawdescription": "\n\nHandles file selection and emits a structured file selection event.\n",
|
|
20546
20289
|
"description": "<p>Handles file selection and emits a structured file selection event.</p>\n",
|
|
20547
|
-
"decorators": [
|
|
20548
|
-
{
|
|
20549
|
-
"name": "HostListener",
|
|
20550
|
-
"stringifiedArguments": "'change', ['$event']"
|
|
20551
|
-
}
|
|
20552
|
-
],
|
|
20553
|
-
"modifierKind": [
|
|
20554
|
-
171
|
|
20555
|
-
],
|
|
20556
20290
|
"jsdoctags": [
|
|
20557
20291
|
{
|
|
20558
20292
|
"name": {
|
|
20559
|
-
"pos":
|
|
20560
|
-
"end":
|
|
20293
|
+
"pos": 4594,
|
|
20294
|
+
"end": 4597,
|
|
20561
20295
|
"kind": 80,
|
|
20562
20296
|
"id": 0,
|
|
20563
20297
|
"flags": 16842752,
|
|
@@ -20570,8 +20304,8 @@
|
|
|
20570
20304
|
"deprecated": false,
|
|
20571
20305
|
"deprecationMessage": "",
|
|
20572
20306
|
"tagName": {
|
|
20573
|
-
"pos":
|
|
20574
|
-
"end":
|
|
20307
|
+
"pos": 4588,
|
|
20308
|
+
"end": 4593,
|
|
20575
20309
|
"kind": 80,
|
|
20576
20310
|
"id": 0,
|
|
20577
20311
|
"flags": 16842752,
|
|
@@ -20624,8 +20358,8 @@
|
|
|
20624
20358
|
"coverageIgnore": false,
|
|
20625
20359
|
"jsdoctags": [
|
|
20626
20360
|
{
|
|
20627
|
-
"pos":
|
|
20628
|
-
"end":
|
|
20361
|
+
"pos": 632,
|
|
20362
|
+
"end": 834,
|
|
20629
20363
|
"kind": 321,
|
|
20630
20364
|
"id": 0,
|
|
20631
20365
|
"flags": 16777216,
|
|
@@ -20649,7 +20383,7 @@
|
|
|
20649
20383
|
"name": "cssClasses",
|
|
20650
20384
|
"type": "string",
|
|
20651
20385
|
"returnType": "string",
|
|
20652
|
-
"line":
|
|
20386
|
+
"line": 93,
|
|
20653
20387
|
"rawdescription": "\n\nApplies the base `ecl-file-upload` class to the host element.\n",
|
|
20654
20388
|
"description": "<p>Applies the base <code>ecl-file-upload</code> class to the host element.</p>\n"
|
|
20655
20389
|
}
|
|
@@ -20660,7 +20394,7 @@
|
|
|
20660
20394
|
"name": "invalidState",
|
|
20661
20395
|
"type": "boolean",
|
|
20662
20396
|
"returnType": "boolean",
|
|
20663
|
-
"line":
|
|
20397
|
+
"line": 101,
|
|
20664
20398
|
"rawdescription": "\n\nReturns `true` if component should be displayed as invalid.\nPrioritizes Angular form control status over `isInvalid` input.\n",
|
|
20665
20399
|
"description": "<p>Returns <code>true</code> if component should be displayed as invalid.\nPrioritizes Angular form control status over <code>isInvalid</code> input.</p>\n"
|
|
20666
20400
|
}
|
|
@@ -22870,12 +22604,12 @@
|
|
|
22870
22604
|
},
|
|
22871
22605
|
{
|
|
22872
22606
|
"name": "EclLinkDirective",
|
|
22873
|
-
"id": "directive-EclLinkDirective-
|
|
22607
|
+
"id": "directive-EclLinkDirective-fb6b45fe7d77a582abd56929a240d6a1418c1ca58d979b7d3c29ff7989887b38145c46f3cd3c8055fcab7abe78119fa333c24d646e16e636785744a886b96932",
|
|
22874
22608
|
"file": "packages/ecl/components/ecl-link/ecl-link.directive.ts",
|
|
22875
22609
|
"type": "directive",
|
|
22876
22610
|
"description": "<p>'eclLink' directive is used to add some styling to the defalt HTML anchor component. In order to comply with ECL standards.</p>\n",
|
|
22877
22611
|
"rawdescription": "\n\n'eclLink' directive is used to add some styling to the defalt HTML anchor component. In order to comply with ECL standards.\n",
|
|
22878
|
-
"sourceCode": "import {
|
|
22612
|
+
"sourceCode": "import { booleanAttribute, contentChildren, Directive, ElementRef, HostBinding, inject, input, Renderer2, effect, computed, forwardRef } from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * 'eclLink' directive is used to add some styling to the defalt HTML anchor component. In order to comply with ECL standards.\n */\n@Directive({\n selector: '[eclLink]',\n})\nexport class EclLinkDirective extends ECLBaseDirective {\n el = inject(ElementRef);\n renderer = inject(Renderer2);\n\n /**\n * Additional HTML attributes to be set on the link element.\n * Used e.g. by social-media-follow for passing extra_attributes.\n */\n extraAttributes = input<{ name: string; value?: string | null }[] | undefined>();\n\n /**\n * Property to style the component as 'inverted' (with dark background). Can be used alone or with 'standalone' variant.\n */\n isInverted = input(false, { transform: booleanAttribute });\n\n /**\n * Property to style the component if it consist only of an icon.\n */\n isIconOnly = input(false, { transform: booleanAttribute });\n\n /** Adds class for hightlighted link (works only with 'primary' variant)\n * @deprecated - to be removed in v23. Use variant='primary-highlight', as only primary variant can be highlighted.\n */\n isHighlight = input(false, { transform: booleanAttribute });\n\n /**\n * @deprecated - will be removed in v21. Deprecated on ECL side.\n */\n isNoVisited = input(false, { transform: booleanAttribute });\n\n isBranded = input(false, { transform: booleanAttribute });\n\n /**\n * With 'variant' property user can add some more specific styling to the <a> component.\n */\n variant = input<'standalone' | 'primary' | 'secondary' | 'secondary-neutral' | 'primary-neutral' | 'primary-highlight'>();\n\n eclIconComponents = contentChildren(forwardRef(() => EclIconComponent), { descendants: true });\n\n constructor() {\n super();\n effect(() => {\n const attrs = this.extraAttributes();\n if (attrs && attrs.length) {\n attrs.forEach((attr) => {\n if (attr?.name) {\n this.el.nativeElement.setAttribute(attr.name, attr.value ?? '');\n }\n });\n }\n });\n\n // Add 'ecl-link__icon' class to child icons reactively.\n effect(() => {\n const icons = this.eclIconComponents();\n if (icons?.length > 0) {\n icons.forEach((icn) => {\n icn.addExtraClass('ecl-link__icon');\n });\n }\n });\n }\n\n @HostBinding('class.ecl-link--inverted')\n get hostIsInverted(): boolean {\n return (!this.variant() || this.variant() === 'standalone') && this.isInverted();\n }\n\n @HostBinding('class.ecl-link--brand')\n get hostIsBranded(): boolean {\n return (!this.variant() || this.variant() === 'standalone') && this.isBranded();\n }\n\n @HostBinding('class.ecl-link--icon-only')\n get hostIsIconOnly(): boolean {\n return this.isIconOnly();\n }\n\n @HostBinding('class.ecl-link--icon')\n get hasIcon(): boolean {\n return this._hasIcon();\n }\n\n private _hasIcon = computed(() => {\n return this.eclIconComponents()?.length > 0;\n });\n\n /**\n * Adds speific ECL classes to the <a> component.\n */\n @HostBinding('class')\n get cssClasses(): string {\n const variantClass = this.variant()\n ? (this.variant() === 'secondary' && this.isInverted()\n ? 'ecl-link--secondary-inverted'\n : `ecl-link--${this.variant()}`)\n : '';\n\n return [super.getCssClasses('ecl-link'),\n variantClass,\n (this.variant() === 'primary' && this.isHighlight()) ? 'ecl-link--primary-highlight' : '',\n ].join(' ').trim();\n }\n\n /**\n * Calls the native focus() method of the default HTML element.\n */\n onFocus(): void {\n this.el.nativeElement.focus();\n }\n\n /**\n * Calls the native click() method of the default HTML element.\n */\n onClick(): void {\n this.el.nativeElement.click();\n }\n\n /**\n * Calls the native blur() method of the default HTML element.\n */\n onBlur(): void {\n this.el.nativeElement.blur();\n }\n}\n",
|
|
22879
22613
|
"selector": "[eclLink]",
|
|
22880
22614
|
"providers": [],
|
|
22881
22615
|
"hostDirectives": [],
|
|
@@ -22890,7 +22624,7 @@
|
|
|
22890
22624
|
"indexKey": "",
|
|
22891
22625
|
"optional": false,
|
|
22892
22626
|
"description": "<p>Additional HTML attributes to be set on the link element.\nUsed e.g. by social-media-follow for passing extra_attributes.</p>\n",
|
|
22893
|
-
"line":
|
|
22627
|
+
"line": 19,
|
|
22894
22628
|
"rawdescription": "\n\nAdditional HTML attributes to be set on the link element.\nUsed e.g. by social-media-follow for passing extra_attributes.\n",
|
|
22895
22629
|
"required": false
|
|
22896
22630
|
},
|
|
@@ -22904,7 +22638,7 @@
|
|
|
22904
22638
|
"indexKey": "",
|
|
22905
22639
|
"optional": false,
|
|
22906
22640
|
"description": "",
|
|
22907
|
-
"line":
|
|
22641
|
+
"line": 41,
|
|
22908
22642
|
"rawdescription": "\n",
|
|
22909
22643
|
"required": false
|
|
22910
22644
|
},
|
|
@@ -22918,20 +22652,20 @@
|
|
|
22918
22652
|
"indexKey": "",
|
|
22919
22653
|
"optional": false,
|
|
22920
22654
|
"description": "<p>Adds class for hightlighted link (works only with 'primary' variant)</p>\n",
|
|
22921
|
-
"line":
|
|
22655
|
+
"line": 34,
|
|
22922
22656
|
"rawdescription": "\nAdds class for hightlighted link (works only with 'primary' variant)\n",
|
|
22923
22657
|
"jsdoctags": [
|
|
22924
22658
|
{
|
|
22925
|
-
"pos":
|
|
22926
|
-
"end":
|
|
22659
|
+
"pos": 1253,
|
|
22660
|
+
"end": 1370,
|
|
22927
22661
|
"kind": 332,
|
|
22928
22662
|
"id": 0,
|
|
22929
22663
|
"flags": 16842752,
|
|
22930
22664
|
"modifierFlagsCache": 0,
|
|
22931
22665
|
"transformFlags": 0,
|
|
22932
22666
|
"tagName": {
|
|
22933
|
-
"pos":
|
|
22934
|
-
"end":
|
|
22667
|
+
"pos": 1254,
|
|
22668
|
+
"end": 1264,
|
|
22935
22669
|
"kind": 80,
|
|
22936
22670
|
"id": 0,
|
|
22937
22671
|
"flags": 16842752,
|
|
@@ -22953,7 +22687,7 @@
|
|
|
22953
22687
|
"indexKey": "",
|
|
22954
22688
|
"optional": false,
|
|
22955
22689
|
"description": "<p>Property to style the component if it consist only of an icon.</p>\n",
|
|
22956
|
-
"line":
|
|
22690
|
+
"line": 29,
|
|
22957
22691
|
"rawdescription": "\n\nProperty to style the component if it consist only of an icon.\n",
|
|
22958
22692
|
"required": false
|
|
22959
22693
|
},
|
|
@@ -22967,7 +22701,7 @@
|
|
|
22967
22701
|
"indexKey": "",
|
|
22968
22702
|
"optional": false,
|
|
22969
22703
|
"description": "<p>Property to style the component as 'inverted' (with dark background). Can be used alone or with 'standalone' variant.</p>\n",
|
|
22970
|
-
"line":
|
|
22704
|
+
"line": 24,
|
|
22971
22705
|
"rawdescription": "\n\nProperty to style the component as 'inverted' (with dark background). Can be used alone or with 'standalone' variant.\n",
|
|
22972
22706
|
"required": false
|
|
22973
22707
|
},
|
|
@@ -22981,20 +22715,20 @@
|
|
|
22981
22715
|
"indexKey": "",
|
|
22982
22716
|
"optional": false,
|
|
22983
22717
|
"description": "",
|
|
22984
|
-
"line":
|
|
22718
|
+
"line": 39,
|
|
22985
22719
|
"rawdescription": "\n\n",
|
|
22986
22720
|
"jsdoctags": [
|
|
22987
22721
|
{
|
|
22988
|
-
"pos":
|
|
22989
|
-
"end":
|
|
22722
|
+
"pos": 1454,
|
|
22723
|
+
"end": 1521,
|
|
22990
22724
|
"kind": 332,
|
|
22991
22725
|
"id": 0,
|
|
22992
22726
|
"flags": 16842752,
|
|
22993
22727
|
"modifierFlagsCache": 0,
|
|
22994
22728
|
"transformFlags": 0,
|
|
22995
22729
|
"tagName": {
|
|
22996
|
-
"pos":
|
|
22997
|
-
"end":
|
|
22730
|
+
"pos": 1455,
|
|
22731
|
+
"end": 1465,
|
|
22998
22732
|
"kind": 80,
|
|
22999
22733
|
"id": 0,
|
|
23000
22734
|
"flags": 16842752,
|
|
@@ -23015,7 +22749,7 @@
|
|
|
23015
22749
|
"indexKey": "",
|
|
23016
22750
|
"optional": false,
|
|
23017
22751
|
"description": "<p>With 'variant' property user can add some more specific styling to the <a> component.</p>\n",
|
|
23018
|
-
"line":
|
|
22752
|
+
"line": 46,
|
|
23019
22753
|
"rawdescription": "\n\nWith 'variant' property user can add some more specific styling to the <a> component.\n",
|
|
23020
22754
|
"required": false
|
|
23021
22755
|
},
|
|
@@ -23075,7 +22809,7 @@
|
|
|
23075
22809
|
"deprecationMessage": "",
|
|
23076
22810
|
"rawdescription": "\n\nAdds speific ECL classes to the <a> component.\n",
|
|
23077
22811
|
"description": "<p>Adds speific ECL classes to the <a> component.</p>\n",
|
|
23078
|
-
"line":
|
|
22812
|
+
"line": 102,
|
|
23079
22813
|
"type": "string",
|
|
23080
22814
|
"decorators": []
|
|
23081
22815
|
},
|
|
@@ -23087,7 +22821,7 @@
|
|
|
23087
22821
|
"deprecationMessage": "",
|
|
23088
22822
|
"rawdescription": "\n",
|
|
23089
22823
|
"description": "",
|
|
23090
|
-
"line":
|
|
22824
|
+
"line": 80,
|
|
23091
22825
|
"type": "boolean",
|
|
23092
22826
|
"decorators": []
|
|
23093
22827
|
},
|
|
@@ -23099,7 +22833,7 @@
|
|
|
23099
22833
|
"deprecationMessage": "",
|
|
23100
22834
|
"rawdescription": "\n",
|
|
23101
22835
|
"description": "",
|
|
23102
|
-
"line":
|
|
22836
|
+
"line": 90,
|
|
23103
22837
|
"type": "boolean",
|
|
23104
22838
|
"decorators": []
|
|
23105
22839
|
},
|
|
@@ -23111,7 +22845,7 @@
|
|
|
23111
22845
|
"deprecationMessage": "",
|
|
23112
22846
|
"rawdescription": "\n",
|
|
23113
22847
|
"description": "",
|
|
23114
|
-
"line":
|
|
22848
|
+
"line": 85,
|
|
23115
22849
|
"type": "boolean",
|
|
23116
22850
|
"decorators": []
|
|
23117
22851
|
},
|
|
@@ -23123,26 +22857,13 @@
|
|
|
23123
22857
|
"deprecationMessage": "",
|
|
23124
22858
|
"rawdescription": "\n",
|
|
23125
22859
|
"description": "",
|
|
23126
|
-
"line":
|
|
22860
|
+
"line": 75,
|
|
23127
22861
|
"type": "boolean",
|
|
23128
22862
|
"decorators": []
|
|
23129
22863
|
}
|
|
23130
22864
|
],
|
|
23131
22865
|
"hostListeners": [],
|
|
23132
22866
|
"propertiesClass": [
|
|
23133
|
-
{
|
|
23134
|
-
"name": "cd",
|
|
23135
|
-
"coverageIgnore": false,
|
|
23136
|
-
"defaultValue": "inject(ChangeDetectorRef)",
|
|
23137
|
-
"deprecated": false,
|
|
23138
|
-
"deprecationMessage": "",
|
|
23139
|
-
"type": "unknown",
|
|
23140
|
-
"indexKey": "",
|
|
23141
|
-
"optional": false,
|
|
23142
|
-
"description": "",
|
|
23143
|
-
"line": 14,
|
|
23144
|
-
"rawdescription": "\n"
|
|
23145
|
-
},
|
|
23146
22867
|
{
|
|
23147
22868
|
"name": "eclIconComponents",
|
|
23148
22869
|
"coverageIgnore": false,
|
|
@@ -23153,7 +22874,7 @@
|
|
|
23153
22874
|
"indexKey": "",
|
|
23154
22875
|
"optional": false,
|
|
23155
22876
|
"description": "",
|
|
23156
|
-
"line":
|
|
22877
|
+
"line": 48,
|
|
23157
22878
|
"rawdescription": "\n"
|
|
23158
22879
|
},
|
|
23159
22880
|
{
|
|
@@ -23184,19 +22905,6 @@
|
|
|
23184
22905
|
}
|
|
23185
22906
|
],
|
|
23186
22907
|
"methodsClass": [
|
|
23187
|
-
{
|
|
23188
|
-
"name": "ngAfterContentInit",
|
|
23189
|
-
"coverageIgnore": false,
|
|
23190
|
-
"args": [],
|
|
23191
|
-
"optional": false,
|
|
23192
|
-
"returnType": "void",
|
|
23193
|
-
"typeParameters": [],
|
|
23194
|
-
"line": 106,
|
|
23195
|
-
"deprecated": false,
|
|
23196
|
-
"deprecationMessage": "",
|
|
23197
|
-
"rawdescription": "\n",
|
|
23198
|
-
"description": ""
|
|
23199
|
-
},
|
|
23200
22908
|
{
|
|
23201
22909
|
"name": "onBlur",
|
|
23202
22910
|
"coverageIgnore": false,
|
|
@@ -23204,7 +22912,7 @@
|
|
|
23204
22912
|
"optional": false,
|
|
23205
22913
|
"returnType": "void",
|
|
23206
22914
|
"typeParameters": [],
|
|
23207
|
-
"line":
|
|
22915
|
+
"line": 132,
|
|
23208
22916
|
"deprecated": false,
|
|
23209
22917
|
"deprecationMessage": "",
|
|
23210
22918
|
"rawdescription": "\n\nCalls the native blur() method of the default HTML element.\n",
|
|
@@ -23217,7 +22925,7 @@
|
|
|
23217
22925
|
"optional": false,
|
|
23218
22926
|
"returnType": "void",
|
|
23219
22927
|
"typeParameters": [],
|
|
23220
|
-
"line":
|
|
22928
|
+
"line": 125,
|
|
23221
22929
|
"deprecated": false,
|
|
23222
22930
|
"deprecationMessage": "",
|
|
23223
22931
|
"rawdescription": "\n\nCalls the native click() method of the default HTML element.\n",
|
|
@@ -23230,7 +22938,7 @@
|
|
|
23230
22938
|
"optional": false,
|
|
23231
22939
|
"returnType": "void",
|
|
23232
22940
|
"typeParameters": [],
|
|
23233
|
-
"line":
|
|
22941
|
+
"line": 118,
|
|
23234
22942
|
"deprecated": false,
|
|
23235
22943
|
"deprecationMessage": "",
|
|
23236
22944
|
"rawdescription": "\n\nCalls the native focus() method of the default HTML element.\n",
|
|
@@ -23278,8 +22986,8 @@
|
|
|
23278
22986
|
"coverageIgnore": false,
|
|
23279
22987
|
"jsdoctags": [
|
|
23280
22988
|
{
|
|
23281
|
-
"pos":
|
|
23282
|
-
"end":
|
|
22989
|
+
"pos": 275,
|
|
22990
|
+
"end": 409,
|
|
23283
22991
|
"kind": 321,
|
|
23284
22992
|
"id": 0,
|
|
23285
22993
|
"flags": 16777216,
|
|
@@ -23291,16 +22999,13 @@
|
|
|
23291
22999
|
"extends": [
|
|
23292
23000
|
"ECLBaseDirective"
|
|
23293
23001
|
],
|
|
23294
|
-
"implements": [
|
|
23295
|
-
"AfterContentInit"
|
|
23296
|
-
],
|
|
23297
23002
|
"constructorObj": {
|
|
23298
23003
|
"name": "constructor",
|
|
23299
23004
|
"description": "",
|
|
23300
23005
|
"deprecated": false,
|
|
23301
23006
|
"deprecationMessage": "",
|
|
23302
23007
|
"args": [],
|
|
23303
|
-
"line":
|
|
23008
|
+
"line": 48,
|
|
23304
23009
|
"rawdescription": "\n"
|
|
23305
23010
|
},
|
|
23306
23011
|
"accessors": {
|
|
@@ -23310,7 +23015,7 @@
|
|
|
23310
23015
|
"name": "hostIsInverted",
|
|
23311
23016
|
"type": "boolean",
|
|
23312
23017
|
"returnType": "boolean",
|
|
23313
|
-
"line":
|
|
23018
|
+
"line": 75,
|
|
23314
23019
|
"rawdescription": "\n",
|
|
23315
23020
|
"description": ""
|
|
23316
23021
|
}
|
|
@@ -23321,7 +23026,7 @@
|
|
|
23321
23026
|
"name": "hostIsBranded",
|
|
23322
23027
|
"type": "boolean",
|
|
23323
23028
|
"returnType": "boolean",
|
|
23324
|
-
"line":
|
|
23029
|
+
"line": 80,
|
|
23325
23030
|
"rawdescription": "\n",
|
|
23326
23031
|
"description": ""
|
|
23327
23032
|
}
|
|
@@ -23332,7 +23037,7 @@
|
|
|
23332
23037
|
"name": "hostIsIconOnly",
|
|
23333
23038
|
"type": "boolean",
|
|
23334
23039
|
"returnType": "boolean",
|
|
23335
|
-
"line":
|
|
23040
|
+
"line": 85,
|
|
23336
23041
|
"rawdescription": "\n",
|
|
23337
23042
|
"description": ""
|
|
23338
23043
|
}
|
|
@@ -23343,7 +23048,7 @@
|
|
|
23343
23048
|
"name": "hasIcon",
|
|
23344
23049
|
"type": "boolean",
|
|
23345
23050
|
"returnType": "boolean",
|
|
23346
|
-
"line":
|
|
23051
|
+
"line": 90,
|
|
23347
23052
|
"rawdescription": "\n",
|
|
23348
23053
|
"description": ""
|
|
23349
23054
|
}
|
|
@@ -23354,7 +23059,7 @@
|
|
|
23354
23059
|
"name": "cssClasses",
|
|
23355
23060
|
"type": "string",
|
|
23356
23061
|
"returnType": "string",
|
|
23357
|
-
"line":
|
|
23062
|
+
"line": 102,
|
|
23358
23063
|
"rawdescription": "\n\nAdds speific ECL classes to the <a> component.\n",
|
|
23359
23064
|
"description": "<p>Adds speific ECL classes to the <a> component.</p>\n"
|
|
23360
23065
|
}
|
|
@@ -23366,10 +23071,6 @@
|
|
|
23366
23071
|
{
|
|
23367
23072
|
"name": "ECLBaseDirective",
|
|
23368
23073
|
"type": "directive"
|
|
23369
|
-
},
|
|
23370
|
-
{
|
|
23371
|
-
"name": "AfterContentInit",
|
|
23372
|
-
"type": "interface"
|
|
23373
23074
|
}
|
|
23374
23075
|
]
|
|
23375
23076
|
}
|
|
@@ -50424,18 +50125,13 @@
|
|
|
50424
50125
|
},
|
|
50425
50126
|
{
|
|
50426
50127
|
"name": "EclDateBlockComponent",
|
|
50427
|
-
"id": "component-EclDateBlockComponent-
|
|
50128
|
+
"id": "component-EclDateBlockComponent-d9d6a513627794cc2674cf854797813269cbdd31b9d32310cd714ec65c83a83fe2760430a07643b40187cdf4c8207b7f85999cb06622b72758552cb5f56dfbd7",
|
|
50428
50129
|
"file": "packages/ecl/components/ecl-date-block/ecl-date-block.component.ts",
|
|
50429
50130
|
"encapsulation": [],
|
|
50430
50131
|
"entryComponents": [],
|
|
50431
50132
|
"inputs": [],
|
|
50432
50133
|
"outputs": [],
|
|
50433
|
-
"providers": [
|
|
50434
|
-
{
|
|
50435
|
-
"name": "TranslateService",
|
|
50436
|
-
"type": "injectable"
|
|
50437
|
-
}
|
|
50438
|
-
],
|
|
50134
|
+
"providers": [],
|
|
50439
50135
|
"selector": "time[eclDateBlock]",
|
|
50440
50136
|
"styleUrls": [],
|
|
50441
50137
|
"styles": [],
|
|
@@ -50453,7 +50149,7 @@
|
|
|
50453
50149
|
"deprecationMessage": "",
|
|
50454
50150
|
"rawdescription": "\n\nSets the `datetime` attribute of the `<time>` element.\nIf not provided, it is derived from `date` and `dateFormat`.\n",
|
|
50455
50151
|
"description": "<p>Sets the <code>datetime</code> attribute of the <code><time></code> element.\nIf not provided, it is derived from <code>date</code> and <code>dateFormat</code>.</p>\n",
|
|
50456
|
-
"line":
|
|
50152
|
+
"line": 96,
|
|
50457
50153
|
"type": "string",
|
|
50458
50154
|
"decorators": []
|
|
50459
50155
|
},
|
|
@@ -50467,7 +50163,7 @@
|
|
|
50467
50163
|
"indexKey": "",
|
|
50468
50164
|
"optional": false,
|
|
50469
50165
|
"description": "<p>The date to be displayed. If not null, it's used to generate the <code>datetime</code> attribute and visual output.</p>\n",
|
|
50470
|
-
"line":
|
|
50166
|
+
"line": 44,
|
|
50471
50167
|
"rawdescription": "\n\nThe date to be displayed. If not null, it's used to generate the `datetime` attribute and visual output.\n",
|
|
50472
50168
|
"modifierKind": [
|
|
50473
50169
|
148
|
|
@@ -50484,7 +50180,7 @@
|
|
|
50484
50180
|
"indexKey": "",
|
|
50485
50181
|
"optional": false,
|
|
50486
50182
|
"description": "<p>The format to be used when rendering the date string (Angular DatePipe format).\nDefault is <code>'dd/M/yyyy'</code>.</p>\n",
|
|
50487
|
-
"line":
|
|
50183
|
+
"line": 50,
|
|
50488
50184
|
"rawdescription": "\n\nThe format to be used when rendering the date string (Angular DatePipe format).\nDefault is `'dd/M/yyyy'`.\n",
|
|
50489
50185
|
"modifierKind": [
|
|
50490
50186
|
148
|
|
@@ -50501,7 +50197,7 @@
|
|
|
50501
50197
|
"indexKey": "",
|
|
50502
50198
|
"optional": false,
|
|
50503
50199
|
"description": "<p>Explicit string for day part of the date (optional).\nUsed when date is not set or overridden manually.</p>\n",
|
|
50504
|
-
"line":
|
|
50200
|
+
"line": 64,
|
|
50505
50201
|
"rawdescription": "\n\nExplicit string for day part of the date (optional).\nUsed when date is not set or overridden manually.\n",
|
|
50506
50202
|
"modifierKind": [
|
|
50507
50203
|
148
|
|
@@ -50518,7 +50214,7 @@
|
|
|
50518
50214
|
"indexKey": "",
|
|
50519
50215
|
"optional": false,
|
|
50520
50216
|
"description": "<p>Explicit string for month part of the date (optional).\nUsed when date is not set or overridden manually.</p>\n",
|
|
50521
|
-
"line":
|
|
50217
|
+
"line": 70,
|
|
50522
50218
|
"rawdescription": "\n\nExplicit string for month part of the date (optional).\nUsed when date is not set or overridden manually.\n",
|
|
50523
50219
|
"modifierKind": [
|
|
50524
50220
|
148
|
|
@@ -50535,7 +50231,7 @@
|
|
|
50535
50231
|
"indexKey": "",
|
|
50536
50232
|
"optional": false,
|
|
50537
50233
|
"description": "<p>Explicit string used as an accessible or verbose label for the month (optional).</p>\n",
|
|
50538
|
-
"line":
|
|
50234
|
+
"line": 75,
|
|
50539
50235
|
"rawdescription": "\n\nExplicit string used as an accessible or verbose label for the month (optional).\n",
|
|
50540
50236
|
"modifierKind": [
|
|
50541
50237
|
148
|
|
@@ -50552,7 +50248,7 @@
|
|
|
50552
50248
|
"indexKey": "",
|
|
50553
50249
|
"optional": false,
|
|
50554
50250
|
"description": "<p>Optional visual variant of the date block. Can be:</p>\n<ul>\n<li><code>'ongoing'</code>: for ongoing events</li>\n<li><code>'past'</code>: for past events\nThis changes styling only.</li>\n</ul>\n",
|
|
50555
|
-
"line":
|
|
50251
|
+
"line": 58,
|
|
50556
50252
|
"rawdescription": "\n\nOptional visual variant of the date block. Can be:\n- `'ongoing'`: for ongoing events\n- `'past'`: for past events\nThis changes styling only.\n",
|
|
50557
50253
|
"modifierKind": [
|
|
50558
50254
|
148
|
|
@@ -50569,7 +50265,7 @@
|
|
|
50569
50265
|
"indexKey": "",
|
|
50570
50266
|
"optional": false,
|
|
50571
50267
|
"description": "<p>Explicit string for year part of the date (optional).\nUsed when date is not set or overridden manually.</p>\n",
|
|
50572
|
-
"line":
|
|
50268
|
+
"line": 81,
|
|
50573
50269
|
"rawdescription": "\n\nExplicit string for year part of the date (optional).\nUsed when date is not set or overridden manually.\n",
|
|
50574
50270
|
"modifierKind": [
|
|
50575
50271
|
148
|
|
@@ -50632,7 +50328,7 @@
|
|
|
50632
50328
|
"indexKey": "",
|
|
50633
50329
|
"optional": false,
|
|
50634
50330
|
"description": "",
|
|
50635
|
-
"line":
|
|
50331
|
+
"line": 83,
|
|
50636
50332
|
"rawdescription": "\n"
|
|
50637
50333
|
}
|
|
50638
50334
|
],
|
|
@@ -50688,7 +50384,7 @@
|
|
|
50688
50384
|
"deprecationMessage": "",
|
|
50689
50385
|
"rawdescription": "\n",
|
|
50690
50386
|
"description": "",
|
|
50691
|
-
"line":
|
|
50387
|
+
"line": 85,
|
|
50692
50388
|
"type": "string",
|
|
50693
50389
|
"decorators": []
|
|
50694
50390
|
}
|
|
@@ -50704,7 +50400,7 @@
|
|
|
50704
50400
|
"description": "<p>Component used to display a formatted date in a styled time element.\nDesigned for use within content components such as content blocks or items.</p>\n",
|
|
50705
50401
|
"rawdescription": "\n\nComponent used to display a formatted date in a styled time element.\nDesigned for use within content components such as content blocks or items.\n",
|
|
50706
50402
|
"type": "component",
|
|
50707
|
-
"sourceCode": "import { formatDate, DatePipe } from '@angular/common';\nimport { Component, Input, HostBinding, inject, input } from '@angular/core';\nimport '@angular/common/locales/global/bg';\nimport '@angular/common/locales/global/da';\nimport '@angular/common/locales/global/en';\nimport '@angular/common/locales/global/et';\nimport '@angular/common/locales/global/fr';\nimport '@angular/common/locales/global/hr';\nimport '@angular/common/locales/global/lv';\nimport '@angular/common/locales/global/hu';\nimport '@angular/common/locales/global/nl';\nimport '@angular/common/locales/global/pt';\nimport '@angular/common/locales/global/sk';\nimport '@angular/common/locales/global/fi';\nimport '@angular/common/locales/global/cs';\nimport '@angular/common/locales/global/de';\nimport '@angular/common/locales/global/el';\nimport '@angular/common/locales/global/es';\nimport '@angular/common/locales/global/ga';\nimport '@angular/common/locales/global/it';\nimport '@angular/common/locales/global/lt';\nimport '@angular/common/locales/global/mt';\nimport '@angular/common/locales/global/pl';\nimport '@angular/common/locales/global/ro';\nimport '@angular/common/locales/global/sl';\nimport '@angular/common/locales/global/sv';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component used to display a formatted date in a styled time element.\n * Designed for use within content components such as content blocks or items.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'time[eclDateBlock]',\n templateUrl: './ecl-date-block.component.html',\n imports: [DatePipe],\n
|
|
50403
|
+
"sourceCode": "import { formatDate, DatePipe } from '@angular/common';\nimport { Component, Input, HostBinding, inject, input } from '@angular/core';\nimport '@angular/common/locales/global/bg';\nimport '@angular/common/locales/global/da';\nimport '@angular/common/locales/global/en';\nimport '@angular/common/locales/global/et';\nimport '@angular/common/locales/global/fr';\nimport '@angular/common/locales/global/hr';\nimport '@angular/common/locales/global/lv';\nimport '@angular/common/locales/global/hu';\nimport '@angular/common/locales/global/nl';\nimport '@angular/common/locales/global/pt';\nimport '@angular/common/locales/global/sk';\nimport '@angular/common/locales/global/fi';\nimport '@angular/common/locales/global/cs';\nimport '@angular/common/locales/global/de';\nimport '@angular/common/locales/global/el';\nimport '@angular/common/locales/global/es';\nimport '@angular/common/locales/global/ga';\nimport '@angular/common/locales/global/it';\nimport '@angular/common/locales/global/lt';\nimport '@angular/common/locales/global/mt';\nimport '@angular/common/locales/global/pl';\nimport '@angular/common/locales/global/ro';\nimport '@angular/common/locales/global/sl';\nimport '@angular/common/locales/global/sv';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component used to display a formatted date in a styled time element.\n * Designed for use within content components such as content blocks or items.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'time[eclDateBlock]',\n templateUrl: './ecl-date-block.component.html',\n imports: [DatePipe],\n})\nexport class EclDateBlockComponent extends ECLBaseDirective {\n /**\n * The date to be displayed. If not null, it's used to generate the `datetime` attribute and visual output.\n */\n readonly date = input<Date>(undefined);\n\n /**\n * The format to be used when rendering the date string (Angular DatePipe format).\n * Default is `'dd/M/yyyy'`.\n */\n readonly dateFormat = input('dd/M/yyyy');\n\n /**\n * Optional visual variant of the date block. Can be:\n * - `'ongoing'`: for ongoing events\n * - `'past'`: for past events\n * This changes styling only.\n */\n readonly variant = input<'ongoing' | 'past'>(null);\n\n /**\n * Explicit string for day part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly day = input<string>(undefined);\n\n /**\n * Explicit string for month part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly month = input<string>(undefined);\n\n /**\n * Explicit string used as an accessible or verbose label for the month (optional).\n */\n readonly monthTitle = input<string>(undefined);\n\n /**\n * Explicit string for year part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly year = input<string>(undefined);\n\n locale = 'en';\n @HostBinding('class')\n get cssClasses(): string {\n const variant = this.variant();\n return [super.getCssClasses('ecl-date-block'), variant ? `ecl-date-block--${variant}` : ''].join(' ').trim();\n }\n\n /**\n * Sets the `datetime` attribute of the `<time>` element.\n * If not provided, it is derived from `date` and `dateFormat`.\n */\n @Input()\n @HostBinding('attr.datetime')\n get datetime(): string {\n return this.getDatetime();\n }\n set datetime(value) {\n this._datetime = value;\n }\n private _datetime: string = null;\n private translateService = inject(TranslateService);\n\n constructor() {\n super();\n const translateService = this.translateService;\n\n this.locale = translateService.currentLang();\n }\n\n private getDatetime(): string {\n return this._datetime || this.getFormattedDate(this.date(), this.dateFormat());\n }\n\n private getFormattedDate(date: Date, dateFormat: string): string {\n if (date) {\n return formatDate(date, dateFormat, this.translateService.currentLang());\n } else {\n return null;\n }\n }\n}\n",
|
|
50708
50404
|
"assetsDirs": [],
|
|
50709
50405
|
"styleUrlsData": "",
|
|
50710
50406
|
"stylesData": "",
|
|
@@ -50726,7 +50422,7 @@
|
|
|
50726
50422
|
"deprecated": false,
|
|
50727
50423
|
"deprecationMessage": "",
|
|
50728
50424
|
"args": [],
|
|
50729
|
-
"line":
|
|
50425
|
+
"line": 103,
|
|
50730
50426
|
"rawdescription": "\n"
|
|
50731
50427
|
},
|
|
50732
50428
|
"extends": [
|
|
@@ -50739,7 +50435,7 @@
|
|
|
50739
50435
|
"name": "cssClasses",
|
|
50740
50436
|
"type": "string",
|
|
50741
50437
|
"returnType": "string",
|
|
50742
|
-
"line":
|
|
50438
|
+
"line": 85,
|
|
50743
50439
|
"rawdescription": "\n",
|
|
50744
50440
|
"description": ""
|
|
50745
50441
|
}
|
|
@@ -50762,7 +50458,7 @@
|
|
|
50762
50458
|
}
|
|
50763
50459
|
],
|
|
50764
50460
|
"returnType": "void",
|
|
50765
|
-
"line":
|
|
50461
|
+
"line": 99,
|
|
50766
50462
|
"rawdescription": "\n",
|
|
50767
50463
|
"description": "",
|
|
50768
50464
|
"jsdoctags": [
|
|
@@ -50783,7 +50479,7 @@
|
|
|
50783
50479
|
"name": "datetime",
|
|
50784
50480
|
"type": "string",
|
|
50785
50481
|
"returnType": "string",
|
|
50786
|
-
"line":
|
|
50482
|
+
"line": 96,
|
|
50787
50483
|
"rawdescription": "\n\nSets the `datetime` attribute of the `<time>` element.\nIf not provided, it is derived from `date` and `dateFormat`.\n",
|
|
50788
50484
|
"description": "<p>Sets the <code>datetime</code> attribute of the <code><time></code> element.\nIf not provided, it is derived from <code>date</code> and <code>dateFormat</code>.</p>\n"
|
|
50789
50485
|
}
|
|
@@ -50796,10 +50492,6 @@
|
|
|
50796
50492
|
"name": "DatePipe",
|
|
50797
50493
|
"type": "pipe"
|
|
50798
50494
|
},
|
|
50799
|
-
{
|
|
50800
|
-
"name": "TranslateService",
|
|
50801
|
-
"type": "injectable"
|
|
50802
|
-
},
|
|
50803
50495
|
{
|
|
50804
50496
|
"name": "ECLBaseDirective",
|
|
50805
50497
|
"type": "directive"
|
|
@@ -57370,7 +57062,7 @@
|
|
|
57370
57062
|
},
|
|
57371
57063
|
{
|
|
57372
57064
|
"name": "EclIconComponent",
|
|
57373
|
-
"id": "component-EclIconComponent-
|
|
57065
|
+
"id": "component-EclIconComponent-098102385dea8ae19585b13531343588c38d879186ee8a691fc0aeb0f6cef41ef570f2be629b561695d0c3f13ebb52e8869d91e74ca8d7e05471f478e7ad412b",
|
|
57374
57066
|
"file": "packages/ecl/components/ecl-icon/ecl-icon.component.ts",
|
|
57375
57067
|
"encapsulation": [],
|
|
57376
57068
|
"entryComponents": [],
|
|
@@ -57483,7 +57175,7 @@
|
|
|
57483
57175
|
"defaultValue": "'default'",
|
|
57484
57176
|
"deprecated": false,
|
|
57485
57177
|
"deprecationMessage": "",
|
|
57486
|
-
"type": "'default' | 'social' | 'social-media' | 'social-media-color' | 'flag' | 'flag-non-members' | 'phosphor' | string",
|
|
57178
|
+
"type": "'default' | 'social' | 'social-media' | 'social-media-color' | 'flag' | 'flag-non-members' | 'phosphor' | 'phosphor-fill' | string",
|
|
57487
57179
|
"indexKey": "",
|
|
57488
57180
|
"optional": false,
|
|
57489
57181
|
"description": "<p>Defines the icon set to use.\nAvailable sets: <code>default</code>, <code>social</code>, <code>social-media</code>, <code>flag</code>, or a custom URL prefix.\nDefaults to <code>'default'</code>.</p>\n",
|
|
@@ -57903,7 +57595,7 @@
|
|
|
57903
57595
|
"description": "<p>ECL icon component – renders SVG icons from various sets depending on current theme.\nIntegrates with ECL theming and supports accessibility options.</p>\n",
|
|
57904
57596
|
"rawdescription": "\n\nECL icon component – renders SVG icons from various sets depending on current theme.\nIntegrates with ECL theming and supports accessibility options.\n",
|
|
57905
57597
|
"type": "component",
|
|
57906
|
-
"sourceCode": "import { isPlatformBrowser, NgClass } from '@angular/common';\nimport {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n ElementRef,\n HostBinding,\n inject,\n input,\n OnChanges,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n signal,\n SimpleChanges,\n viewChild,\n} from '@angular/core';\nimport { ECLBaseDirective, EclThemeService } from '@eui/ecl/core';\n\n/**\n * ECL icon component – renders SVG icons from various sets depending on current theme.\n * Integrates with ECL theming and supports accessibility options.\n */\n@Component({\n selector: 'ecl-icon',\n templateUrl: './ecl-icon.component.html',\n hostDirectives: [\n {\n directive: ECLBaseDirective,\n },\n ],\n imports: [NgClass],\n providers: [EclThemeService],\n host: {\n '[class.ecl-icon--flip-horizontal]': 'isFlipHorizontal()',\n },\n})\nexport class EclIconComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * Defines the icon set to use.\n * Available sets: `default`, `social`, `social-media`, `flag`, or a custom URL prefix.\n * Defaults to `'default'`.\n */\n iconSet = input<'default' | 'social' | 'social-media' | 'social-media-color' | 'flag' | 'flag-non-members' |\n 'phosphor' | string>('default');\n\n /**\n * Name of the icon to render from the selected set.\n */\n icon = input<string>();\n\n /**\n * Size of the icon.\n * Supported values: `'2xs'`, `'xs'`, `'s'`, `'m'`, `'l'`, `'xl'`, `'2xl'`, `'fluid'`.\n * Defaults to `'xs'`.\n */\n size = input<'2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | 'fluid' | string>('xs');\n\n /**\n * Applies color styling to the icon.\n * Use `'inverted'` for icons on dark backgrounds, or `'primary'` for emphasis.\n */\n color = input<'inverted' | 'primary' | null>(null);\n\n /**\n * Adds a transformation modifier to the icon (e.g., rotation).\n */\n transform = input<string>();\n\n /**\n * ID reference for an external element that labels this icon for screen readers.\n */\n readonly ariaLabelledby = input<string>(undefined);\n\n /**\n * ARIA role of the icon. If a `title` is provided and no role is defined, defaults to `'img'`.\n */\n readonly role = input<string>(undefined);\n\n /**\n * Title used for accessibility. Also affects `aria-hidden` and `role`.\n */\n readonly title = input<string>(undefined);\n\n /**\n * Determines whether the icon should be hidden from assistive technologies.\n * Defaults to `true` unless a title is provided.\n */\n readonly ariaHidden = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Controls whether the icon is focusable via keyboard.\n * Defaults to `false`.\n */\n readonly focusable = input(false, { transform: booleanAttribute });\n\n /**\n * Resolved role: uses the explicit `role` input if provided,\n * otherwise defaults to `'img'` when a `title` is set.\n */\n readonly effectiveRole = computed<string | undefined>(() => {\n const explicit = this.role();\n if (explicit !== undefined) return explicit;\n return this.title() !== undefined ? 'img' : undefined;\n });\n\n /**\n * Resolved aria-hidden: uses the explicit `ariaHidden` input if provided,\n * otherwise hides the icon unless a `title` is set.\n */\n readonly effectiveAriaHidden = computed<boolean>(() => {\n const explicit = this.ariaHidden();\n if (explicit !== undefined) return explicit;\n return this.title() === undefined;\n });\n\n /**\n * Flips the icon horizontally if set to `true`.\n */\n readonly isFlipHorizontal = input(false, { transform: booleanAttribute });\n\n /**\n * Adds a dark background utility class if the color is set to `'inverted'`.\n */\n @HostBinding('class.ecl-u-bg-grey')\n get isColorInverted(): boolean {\n return this.color() === 'inverted';\n }\n\n readonly svgEl = viewChild<ElementRef>('svg');\n\n iconUrl = signal<string>('');\n baseDirective = inject(ECLBaseDirective);\n el = inject(ElementRef);\n private renderer = inject(Renderer2);\n private platformId = inject(PLATFORM_ID);\n\n /**\n * Extra classes added programmatically by parent components\n * (button, link, etc.)\n */\n readonly extraClasses = signal<string>('');\n\n /**\n * Real classes currently present on <ecl-icon>.\n * To support [class.foo] / [ngClass].\n */\n readonly hostClasses = signal<string>('');\n\n readonly svgClasses = computed<Record<string, boolean>>(() => {\n return {\n [this.baseDirective.getCssClasses('ecl-icon')]: true,\n [`ecl-icon--${this.size()}`]: !!this.size(),\n [`ecl-icon--${this.transform()}`]: !!this.transform(),\n [`ecl-icon--${this.color()}`]: !!this.color(),\n ...this.toClassRecord(this.hostClasses()),\n ...this.toClassRecord(this.extraClasses()),\n };\n });\n\n private classObserver?: MutationObserver;\n\n constructor() {\n afterNextRender(() => {\n this.detachHostAndPromoteSvg();\n this.syncHostClassesFromDom();\n this.observeHostClassChanges();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['icon']) {\n this.initiateIconUrl();\n }\n }\n\n ngOnInit(): void {\n this.initiateIconUrl();\n }\n\n ngOnDestroy(): void {\n this.classObserver?.disconnect();\n if (!isPlatformBrowser(this.platformId)) return;\n\n try {\n const svgNative = this.svgEl()?.nativeElement as SVGElement | null;\n const parent = svgNative?.parentElement;\n if (svgNative && parent) parent.removeChild(svgNative);\n } catch {\n /* ignore */\n }\n }\n\n addExtraClass(className: string): void {\n const classes = new Set([\n ...this.tokenize(this.extraClasses()),\n ...this.tokenize(className),\n ]);\n this.extraClasses.set(Array.from(classes).join(' '));\n }\n\n removeExtraClass(className: string): void {\n const classes = this.tokenize(this.extraClasses()).filter((c) => c !== className);\n this.extraClasses.set(classes.join(' '));\n }\n\n setExtraClasses(classes: string): void {\n this.extraClasses.set(classes ?? '');\n }\n\n private syncHostClassesFromDom(): void {\n const host = this.el.nativeElement;\n this.hostClasses.set(host.className || '');\n }\n\n private observeHostClassChanges(): void {\n const host = this.el.nativeElement;\n\n this.classObserver = new MutationObserver(() => {\n this.hostClasses.set(host.className || '');\n });\n\n this.classObserver.observe(host, {\n attributes: true,\n attributeFilter: ['class'],\n });\n }\n\n private toClassRecord(classes?: string | null): Record<string, boolean> {\n return Object.fromEntries(\n this.tokenize(classes).map(c => [c, true])\n );\n }\n\n private tokenize(classes: string | null | undefined): string[] {\n return (classes ?? '')\n .split(/\\s+/)\n .filter(Boolean);\n }\n\n private detachHostAndPromoteSvg(): void {\n const hostEl = this.el.nativeElement as HTMLElement | null;\n const svgNative = this.svgEl()?.nativeElement as SVGElement | null;\n if (!hostEl || !svgNative) return;\n\n const hostParentEl = hostEl.parentElement;\n if (!hostParentEl) return;\n\n // add the svg and remove the parent from the DOM\n this.renderer.setStyle(hostEl, 'visibility', 'hidden');\n hostEl.after(svgNative);\n this.renderer.removeChild(hostParentEl, hostEl);\n }\n\n private initiateIconUrl(): void {\n switch (this.iconSet()) {\n case 'default':\n this.iconUrl.set(`assets/images/ecl/icons/sprite.svg#${this.icon()}`);\n break;\n case 'social': // TODO: Remove this in the next version.\n this.iconUrl.set(`assets/images/ecl/networks/sprite.svg#${this.icon()}`);\n break;\n case 'social-media':\n this.iconUrl.set(`assets/images/ecl/networks/sprite.svg#${this.icon()}`);\n break;\n case 'social-media-color':\n this.iconUrl.set(`assets/images/ecl/networks-color/sprite.svg#${this.icon()}`);\n break;\n case 'flag':\n this.iconUrl.set(`assets/images/ecl/icons-flag/sprites/icons-flag.svg#${this.icon()}`);\n break;\n case 'flag-non-members':\n this.iconUrl.set(`assets/images/ecl/icons-flag/sprites/icons-flag-non-members.svg#${this.icon()}`);\n break;\n case 'phosphor':\n this.iconUrl.set(`assets/icons/sprites/regular.svg#${this.icon()}`);\n break;\n case 'phosphor-fill':\n this.iconUrl.set(`assets/icons/sprites/fill.svg#${this.icon()}`);\n break;\n default:\n this.iconUrl.set(`assets/images/ecl/icons/sprite.svg#${this.icon()}`);\n }\n }\n}\n",
|
|
57598
|
+
"sourceCode": "import { isPlatformBrowser, NgClass } from '@angular/common';\nimport {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n ElementRef,\n HostBinding,\n inject,\n input,\n OnChanges,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n signal,\n SimpleChanges,\n viewChild,\n} from '@angular/core';\nimport { ECLBaseDirective, EclThemeService } from '@eui/ecl/core';\n\n/**\n * ECL icon component – renders SVG icons from various sets depending on current theme.\n * Integrates with ECL theming and supports accessibility options.\n */\n@Component({\n selector: 'ecl-icon',\n templateUrl: './ecl-icon.component.html',\n hostDirectives: [\n {\n directive: ECLBaseDirective,\n },\n ],\n imports: [NgClass],\n providers: [EclThemeService],\n host: {\n '[class.ecl-icon--flip-horizontal]': 'isFlipHorizontal()',\n },\n})\nexport class EclIconComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * Defines the icon set to use.\n * Available sets: `default`, `social`, `social-media`, `flag`, or a custom URL prefix.\n * Defaults to `'default'`.\n */\n iconSet = input<'default' | 'social' | 'social-media' | 'social-media-color' | 'flag' | 'flag-non-members' |\n 'phosphor' | 'phosphor-fill' | string>('default');\n\n /**\n * Name of the icon to render from the selected set.\n */\n icon = input<string>();\n\n /**\n * Size of the icon.\n * Supported values: `'2xs'`, `'xs'`, `'s'`, `'m'`, `'l'`, `'xl'`, `'2xl'`, `'fluid'`.\n * Defaults to `'xs'`.\n */\n size = input<'2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | 'fluid' | string>('xs');\n\n /**\n * Applies color styling to the icon.\n * Use `'inverted'` for icons on dark backgrounds, or `'primary'` for emphasis.\n */\n color = input<'inverted' | 'primary' | null>(null);\n\n /**\n * Adds a transformation modifier to the icon (e.g., rotation).\n */\n transform = input<string>();\n\n /**\n * ID reference for an external element that labels this icon for screen readers.\n */\n readonly ariaLabelledby = input<string>(undefined);\n\n /**\n * ARIA role of the icon. If a `title` is provided and no role is defined, defaults to `'img'`.\n */\n readonly role = input<string>(undefined);\n\n /**\n * Title used for accessibility. Also affects `aria-hidden` and `role`.\n */\n readonly title = input<string>(undefined);\n\n /**\n * Determines whether the icon should be hidden from assistive technologies.\n * Defaults to `true` unless a title is provided.\n */\n readonly ariaHidden = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Controls whether the icon is focusable via keyboard.\n * Defaults to `false`.\n */\n readonly focusable = input(false, { transform: booleanAttribute });\n\n /**\n * Resolved role: uses the explicit `role` input if provided,\n * otherwise defaults to `'img'` when a `title` is set.\n */\n readonly effectiveRole = computed<string | undefined>(() => {\n const explicit = this.role();\n if (explicit !== undefined) return explicit;\n return this.title() !== undefined ? 'img' : undefined;\n });\n\n /**\n * Resolved aria-hidden: uses the explicit `ariaHidden` input if provided,\n * otherwise hides the icon unless a `title` is set.\n */\n readonly effectiveAriaHidden = computed<boolean>(() => {\n const explicit = this.ariaHidden();\n if (explicit !== undefined) return explicit;\n return this.title() === undefined;\n });\n\n /**\n * Flips the icon horizontally if set to `true`.\n */\n readonly isFlipHorizontal = input(false, { transform: booleanAttribute });\n\n /**\n * Adds a dark background utility class if the color is set to `'inverted'`.\n */\n @HostBinding('class.ecl-u-bg-grey')\n get isColorInverted(): boolean {\n return this.color() === 'inverted';\n }\n\n readonly svgEl = viewChild<ElementRef>('svg');\n\n iconUrl = signal<string>('');\n baseDirective = inject(ECLBaseDirective);\n el = inject(ElementRef);\n private renderer = inject(Renderer2);\n private platformId = inject(PLATFORM_ID);\n\n /**\n * Extra classes added programmatically by parent components\n * (button, link, etc.)\n */\n readonly extraClasses = signal<string>('');\n\n /**\n * Real classes currently present on <ecl-icon>.\n * To support [class.foo] / [ngClass].\n */\n readonly hostClasses = signal<string>('');\n\n readonly svgClasses = computed<Record<string, boolean>>(() => {\n return {\n [this.baseDirective.getCssClasses('ecl-icon')]: true,\n [`ecl-icon--${this.size()}`]: !!this.size(),\n [`ecl-icon--${this.transform()}`]: !!this.transform(),\n [`ecl-icon--${this.color()}`]: !!this.color(),\n ...this.toClassRecord(this.hostClasses()),\n ...this.toClassRecord(this.extraClasses()),\n };\n });\n\n private classObserver?: MutationObserver;\n\n constructor() {\n afterNextRender(() => {\n this.detachHostAndPromoteSvg();\n this.syncHostClassesFromDom();\n this.observeHostClassChanges();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['icon']) {\n this.initiateIconUrl();\n }\n }\n\n ngOnInit(): void {\n this.initiateIconUrl();\n }\n\n ngOnDestroy(): void {\n this.classObserver?.disconnect();\n if (!isPlatformBrowser(this.platformId)) return;\n\n try {\n const svgNative = this.svgEl()?.nativeElement as SVGElement | null;\n const parent = svgNative?.parentElement;\n if (svgNative && parent) parent.removeChild(svgNative);\n } catch {\n /* ignore */\n }\n }\n\n addExtraClass(className: string): void {\n const classes = new Set([\n ...this.tokenize(this.extraClasses()),\n ...this.tokenize(className),\n ]);\n this.extraClasses.set(Array.from(classes).join(' '));\n }\n\n removeExtraClass(className: string): void {\n const classes = this.tokenize(this.extraClasses()).filter((c) => c !== className);\n this.extraClasses.set(classes.join(' '));\n }\n\n setExtraClasses(classes: string): void {\n this.extraClasses.set(classes ?? '');\n }\n\n private syncHostClassesFromDom(): void {\n const host = this.el.nativeElement;\n this.hostClasses.set(host.className || '');\n }\n\n private observeHostClassChanges(): void {\n const host = this.el.nativeElement;\n\n this.classObserver = new MutationObserver(() => {\n this.hostClasses.set(host.className || '');\n });\n\n this.classObserver.observe(host, {\n attributes: true,\n attributeFilter: ['class'],\n });\n }\n\n private toClassRecord(classes?: string | null): Record<string, boolean> {\n return Object.fromEntries(\n this.tokenize(classes).map(c => [c, true])\n );\n }\n\n private tokenize(classes: string | null | undefined): string[] {\n return (classes ?? '')\n .split(/\\s+/)\n .filter(Boolean);\n }\n\n private detachHostAndPromoteSvg(): void {\n const hostEl = this.el.nativeElement as HTMLElement | null;\n const svgNative = this.svgEl()?.nativeElement as SVGElement | null;\n if (!hostEl || !svgNative) return;\n\n const hostParentEl = hostEl.parentElement;\n if (!hostParentEl) return;\n\n // add the svg and remove the parent from the DOM\n this.renderer.setStyle(hostEl, 'visibility', 'hidden');\n hostEl.after(svgNative);\n this.renderer.removeChild(hostParentEl, hostEl);\n }\n\n private initiateIconUrl(): void {\n switch (this.iconSet()) {\n case 'default':\n this.iconUrl.set(`assets/images/ecl/icons/sprite.svg#${this.icon()}`);\n break;\n case 'social': // TODO: Remove this in the next version.\n this.iconUrl.set(`assets/images/ecl/networks/sprite.svg#${this.icon()}`);\n break;\n case 'social-media':\n this.iconUrl.set(`assets/images/ecl/networks/sprite.svg#${this.icon()}`);\n break;\n case 'social-media-color':\n this.iconUrl.set(`assets/images/ecl/networks-color/sprite.svg#${this.icon()}`);\n break;\n case 'flag':\n this.iconUrl.set(`assets/images/ecl/icons-flag/sprites/icons-flag.svg#${this.icon()}`);\n break;\n case 'flag-non-members':\n this.iconUrl.set(`assets/images/ecl/icons-flag/sprites/icons-flag-non-members.svg#${this.icon()}`);\n break;\n case 'phosphor':\n this.iconUrl.set(`assets/icons/sprites/regular.svg#${this.icon()}`);\n break;\n case 'phosphor-fill':\n this.iconUrl.set(`assets/icons/sprites/fill.svg#${this.icon()}`);\n break;\n default:\n this.iconUrl.set(`assets/images/ecl/icons/sprite.svg#${this.icon()}`);\n }\n }\n}\n",
|
|
57907
57599
|
"assetsDirs": [],
|
|
57908
57600
|
"styleUrlsData": "",
|
|
57909
57601
|
"stylesData": "",
|
|
@@ -58188,7 +57880,7 @@
|
|
|
58188
57880
|
},
|
|
58189
57881
|
{
|
|
58190
57882
|
"name": "EclInpageNavigationComponent",
|
|
58191
|
-
"id": "component-EclInpageNavigationComponent-
|
|
57883
|
+
"id": "component-EclInpageNavigationComponent-5daafc90fdb4dbac03101fb1ec926edaec22dde8c7ba4699dcece0f2c2d48f01b9c51ed69bb59e72fd63be3a46eae2803257a7e8309d6a6dc7f5932d3148a469",
|
|
58192
57884
|
"file": "packages/ecl/components/ecl-inpage-navigation/ecl-inpage-navigation.component.ts",
|
|
58193
57885
|
"encapsulation": [],
|
|
58194
57886
|
"entryComponents": [],
|
|
@@ -58497,7 +58189,7 @@
|
|
|
58497
58189
|
"optional": false,
|
|
58498
58190
|
"returnType": "void",
|
|
58499
58191
|
"typeParameters": [],
|
|
58500
|
-
"line":
|
|
58192
|
+
"line": 111,
|
|
58501
58193
|
"deprecated": false,
|
|
58502
58194
|
"deprecationMessage": "",
|
|
58503
58195
|
"rawdescription": "\n",
|
|
@@ -58510,7 +58202,7 @@
|
|
|
58510
58202
|
"optional": false,
|
|
58511
58203
|
"returnType": "void",
|
|
58512
58204
|
"typeParameters": [],
|
|
58513
|
-
"line":
|
|
58205
|
+
"line": 150,
|
|
58514
58206
|
"deprecated": false,
|
|
58515
58207
|
"deprecationMessage": "",
|
|
58516
58208
|
"rawdescription": "\n",
|
|
@@ -58523,7 +58215,7 @@
|
|
|
58523
58215
|
"optional": false,
|
|
58524
58216
|
"returnType": "void",
|
|
58525
58217
|
"typeParameters": [],
|
|
58526
|
-
"line":
|
|
58218
|
+
"line": 159,
|
|
58527
58219
|
"deprecated": false,
|
|
58528
58220
|
"deprecationMessage": "",
|
|
58529
58221
|
"rawdescription": "\n",
|
|
@@ -58536,7 +58228,7 @@
|
|
|
58536
58228
|
"optional": false,
|
|
58537
58229
|
"returnType": "void",
|
|
58538
58230
|
"typeParameters": [],
|
|
58539
|
-
"line":
|
|
58231
|
+
"line": 107,
|
|
58540
58232
|
"deprecated": false,
|
|
58541
58233
|
"deprecationMessage": "",
|
|
58542
58234
|
"rawdescription": "\n",
|
|
@@ -58549,7 +58241,7 @@
|
|
|
58549
58241
|
"optional": false,
|
|
58550
58242
|
"returnType": "void",
|
|
58551
58243
|
"typeParameters": [],
|
|
58552
|
-
"line":
|
|
58244
|
+
"line": 172,
|
|
58553
58245
|
"deprecated": false,
|
|
58554
58246
|
"deprecationMessage": "",
|
|
58555
58247
|
"rawdescription": "\n\nOn mobile view - handle the dropdown toggle.\n",
|
|
@@ -58571,7 +58263,7 @@
|
|
|
58571
58263
|
"optional": false,
|
|
58572
58264
|
"returnType": "void",
|
|
58573
58265
|
"typeParameters": [],
|
|
58574
|
-
"line":
|
|
58266
|
+
"line": 189,
|
|
58575
58267
|
"deprecated": false,
|
|
58576
58268
|
"deprecationMessage": "",
|
|
58577
58269
|
"rawdescription": "\n\nDropdown keyboard navigation on mobile view.\n",
|
|
@@ -58579,8 +58271,8 @@
|
|
|
58579
58271
|
"jsdoctags": [
|
|
58580
58272
|
{
|
|
58581
58273
|
"name": {
|
|
58582
|
-
"pos":
|
|
58583
|
-
"end":
|
|
58274
|
+
"pos": 7926,
|
|
58275
|
+
"end": 7929,
|
|
58584
58276
|
"kind": 80,
|
|
58585
58277
|
"id": 0,
|
|
58586
58278
|
"flags": 16842752,
|
|
@@ -58593,8 +58285,8 @@
|
|
|
58593
58285
|
"deprecated": false,
|
|
58594
58286
|
"deprecationMessage": "",
|
|
58595
58287
|
"tagName": {
|
|
58596
|
-
"pos":
|
|
58597
|
-
"end":
|
|
58288
|
+
"pos": 7920,
|
|
58289
|
+
"end": 7925,
|
|
58598
58290
|
"kind": 80,
|
|
58599
58291
|
"id": 0,
|
|
58600
58292
|
"flags": 16842752,
|
|
@@ -58665,14 +58357,14 @@
|
|
|
58665
58357
|
"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",
|
|
58666
58358
|
"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",
|
|
58667
58359
|
"type": "component",
|
|
58668
|
-
"sourceCode": "import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, DOCUMENT, DoCheck, ElementRef, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, PLATFORM_ID, afterNextRender, inject, numberAttribute, output, input, viewChild, contentChildren, contentChild } 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 { TranslatePipe } 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: [TranslatePipe, ...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 readonly eclTitle = input<string>(undefined);\n /**\n * Used to calculate component's position.\n */\n readonly marginTop = input<number>(undefined);\n readonly marginBottom = input<number>(undefined);\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 readonly offsetTop = input<number, unknown>(undefined, { transform: numberAttribute });\n readonly togglerButton = viewChild<ElementRef<HTMLButtonElement>>('togglerButton');\n readonly toggleWrapper = viewChild<ElementRef<HTMLDivElement>>('toggleWrapper');\n readonly navTittle = viewChild<ElementRef<HTMLDivElement>>('navTittle');\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n readonly sectionEnter = output<EclInpageNavigationSectionEnterEvent>();\n\n readonly eclNavigationLinkItems = contentChildren(EclInpageNavigationItemComponent, { descendants: true });\n readonly eclNavigationList = contentChild(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 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 const togglerButton = this.togglerButton();\n if (typeof IntersectionObserver !== 'undefined' && togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(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 const togglerButton = this.togglerButton();\n if (this.intersectionObserver && togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(togglerButton.nativeElement);\n this.intersectionObserver.disconnect();\n }\n }\n\n /**\n * On mobile view - handle the dropdown toggle.\n */\n onExpandButtonClick(): void {\n this.isButtonExpanded = !this.isButtonExpanded;\n this.eclInpageNavigationService.eclInpageNavigationToggle(this.isButtonExpanded);\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 const eclNavigationList = this.eclNavigationList();\n if (!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 = 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 eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.isButtonExpanded = true;\n this.eclNavigationLinkItems().at(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems().at(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 item.sectionElement.scrollIntoView();\n item.sectionElement.focus();\n }\n this.isButtonExpanded = false;\n });\n }\n\n private onItemEnter(item: EclInpageNavigationItemComponent): void {\n this.selectNavigationItem(item.sectionElement);\n if (item.sectionElement) {\n item.sectionElement.scrollIntoView();\n if (item.sectionElement.tabIndex === -1) {\n item.sectionElement.tabIndex = 0;\n item.sectionElement.focus();\n item.sectionElement.tabIndex = -1;\n }\n }\n this.isButtonExpanded = false;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems().indexOf(item);\n const eclNavigationLinkItems = this.eclNavigationLinkItems();\n if (index !== eclNavigationLinkItems.length - 1) {\n eclNavigationLinkItems.at(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems().at(index - 1).onFocus();\n } else {\n const togglerButton = this.togglerButton();\n if (this.isMobileBreakpoint && togglerButton) {\n this.isButtonExpanded = false;\n 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().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.set(it.sectionElement === itemElement);\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: 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.emit(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: HTMLElement[]): HTMLElement | null {\n if (!this.isBrowser || !this.win) return null;\n\n let currentSection: HTMLElement | null = null;\n const offset = 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",
|
|
58360
|
+
"sourceCode": "import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { isPlatformBrowser } from '@angular/common';\nimport { AfterViewInit, ChangeDetectorRef, Component, DOCUMENT, DoCheck, ElementRef, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit, PLATFORM_ID, afterNextRender, contentChild, contentChildren, inject, input, numberAttribute, output, viewChild } 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 { TranslatePipe } 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';\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: [TranslatePipe, ...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 readonly eclTitle = input<string>(undefined);\n /**\n * Used to calculate component's position.\n */\n readonly marginTop = input<number>(undefined);\n readonly marginBottom = input<number>(undefined);\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 readonly offsetTop = input<number, unknown>(undefined, { transform: numberAttribute });\n readonly togglerButton = viewChild<ElementRef<HTMLButtonElement>>('togglerButton');\n readonly toggleWrapper = viewChild<ElementRef<HTMLDivElement>>('toggleWrapper');\n readonly navTittle = viewChild<ElementRef<HTMLDivElement>>('navTittle');\n /**\n * This event will be emitted, when onscroll a new section becomes active.\n */\n readonly sectionEnter = output<EclInpageNavigationSectionEnterEvent>();\n\n readonly eclNavigationLinkItems = contentChildren(EclInpageNavigationItemComponent, { descendants: true });\n readonly eclNavigationList = contentChild(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 const togglerButton = this.togglerButton();\n if (typeof IntersectionObserver !== 'undefined' && togglerButton?.nativeElement) {\n this.intersectionObserver = new IntersectionObserver(() => this.setListHeight());\n this.intersectionObserver.observe(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 const togglerButton = this.togglerButton();\n if (this.intersectionObserver && togglerButton?.nativeElement) {\n this.intersectionObserver.unobserve(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 const eclNavigationList = this.eclNavigationList();\n if (!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 = 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 eclNavigationList.maxHeight.set(this.listMaxHeight);\n }\n }\n\n private onExpandButtonArrowDown(evt: Event): void {\n evt.preventDefault();\n this.setButtonExpanded(true);\n this.eclNavigationLinkItems().at(0).onFocus();\n }\n\n private onExpandButtonTab(evt: Event): void {\n if ((evt as KeyboardEvent).shiftKey) {\n evt.preventDefault();\n this.eclNavigationLinkItems().at(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 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 const toggleWrapper = this.toggleWrapper()?.nativeElement;\n if (!toggleWrapper) return 0;\n return toggleWrapper.getBoundingClientRect().height + this.MOBILE_SCROLL_SPACING;\n }\n\n private onItemArrowDown(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems().indexOf(item);\n const eclNavigationLinkItems = this.eclNavigationLinkItems();\n if (index !== eclNavigationLinkItems.length - 1) {\n eclNavigationLinkItems.at(index + 1).onFocus();\n }\n }\n\n private onItemArrowUp(item: EclInpageNavigationItemComponent): void {\n const index = this.eclNavigationLinkItems().indexOf(item);\n if (index !== 0) {\n this.eclNavigationLinkItems().at(index - 1).onFocus();\n } else {\n const togglerButton = this.togglerButton();\n if (this.isMobileBreakpoint && togglerButton) {\n this.setButtonExpanded(false);\n 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().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.set(it.sectionElement === itemElement);\n });\n this.cdr.markForCheck();\n }\n\n private handleNavigationLinksHighlight(sectionElements: 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.emit(new EclInpageNavigationSectionEnterEvent(sectionId));\n }\n }\n\n private findActiveSectionElement(sectionElements: 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",
|
|
58669
58361
|
"assetsDirs": [],
|
|
58670
58362
|
"styleUrlsData": "",
|
|
58671
58363
|
"stylesData": "\n @media (min-width: 996px) {\n .ecl-inpage-navigation__list {\n display: block !important;\n }\n }\n \n",
|
|
58672
58364
|
"jsdoctags": [
|
|
58673
58365
|
{
|
|
58674
|
-
"pos":
|
|
58675
|
-
"end":
|
|
58366
|
+
"pos": 1262,
|
|
58367
|
+
"end": 1739,
|
|
58676
58368
|
"kind": 321,
|
|
58677
58369
|
"id": 0,
|
|
58678
58370
|
"flags": 16777216,
|
|
@@ -58687,7 +58379,7 @@
|
|
|
58687
58379
|
"deprecated": false,
|
|
58688
58380
|
"deprecationMessage": "",
|
|
58689
58381
|
"args": [],
|
|
58690
|
-
"line":
|
|
58382
|
+
"line": 97,
|
|
58691
58383
|
"rawdescription": "\n"
|
|
58692
58384
|
},
|
|
58693
58385
|
"extends": [
|
|
@@ -58706,7 +58398,7 @@
|
|
|
58706
58398
|
"name": "hasNavigationList",
|
|
58707
58399
|
"type": "boolean",
|
|
58708
58400
|
"returnType": "boolean",
|
|
58709
|
-
"line":
|
|
58401
|
+
"line": 127,
|
|
58710
58402
|
"rawdescription": "\n",
|
|
58711
58403
|
"description": ""
|
|
58712
58404
|
}
|
|
@@ -58717,7 +58409,7 @@
|
|
|
58717
58409
|
"name": "currentNavigationLinkItem",
|
|
58718
58410
|
"type": "unknown",
|
|
58719
58411
|
"returnType": "EclInpageNavigationItemComponent",
|
|
58720
|
-
"line":
|
|
58412
|
+
"line": 131,
|
|
58721
58413
|
"rawdescription": "\n",
|
|
58722
58414
|
"description": ""
|
|
58723
58415
|
}
|
|
@@ -58728,7 +58420,7 @@
|
|
|
58728
58420
|
"name": "sizeIcon",
|
|
58729
58421
|
"type": "string",
|
|
58730
58422
|
"returnType": "string",
|
|
58731
|
-
"line":
|
|
58423
|
+
"line": 138,
|
|
58732
58424
|
"rawdescription": "\n\nthe size of the arrow-down icon, used in mobile view. There are different sizes for EC and EU themes.\n",
|
|
58733
58425
|
"description": "<p>the size of the arrow-down icon, used in mobile view. There are different sizes for EC and EU themes.</p>\n"
|
|
58734
58426
|
}
|
|
@@ -58739,7 +58431,7 @@
|
|
|
58739
58431
|
"name": "hasActiveSection",
|
|
58740
58432
|
"type": "boolean",
|
|
58741
58433
|
"returnType": "boolean",
|
|
58742
|
-
"line":
|
|
58434
|
+
"line": 146,
|
|
58743
58435
|
"rawdescription": "\n",
|
|
58744
58436
|
"description": ""
|
|
58745
58437
|
}
|
|
@@ -64991,7 +64683,7 @@
|
|
|
64991
64683
|
},
|
|
64992
64684
|
{
|
|
64993
64685
|
"name": "EclMenuItemComponent",
|
|
64994
|
-
"id": "component-EclMenuItemComponent-
|
|
64686
|
+
"id": "component-EclMenuItemComponent-2e828b9fa40b69437b34ee8534c8041d5f0329c62e7f0de43e9f6bb1b0fc888748f0edb953a4cbcde823fcc0192e5393d366ce1c2ad78727e2b78670410f86bc",
|
|
64995
64687
|
"file": "packages/ecl/components/ecl-menu/ecl-menu/ecl-menu-item.component.ts",
|
|
64996
64688
|
"encapsulation": [
|
|
64997
64689
|
"ViewEncapsulation.None"
|
|
@@ -65019,7 +64711,7 @@
|
|
|
65019
64711
|
"deprecationMessage": "",
|
|
65020
64712
|
"rawdescription": "\n",
|
|
65021
64713
|
"description": "",
|
|
65022
|
-
"line":
|
|
64714
|
+
"line": 78,
|
|
65023
64715
|
"type": "string",
|
|
65024
64716
|
"decorators": []
|
|
65025
64717
|
},
|
|
@@ -65030,19 +64722,20 @@
|
|
|
65030
64722
|
"deprecationMessage": "",
|
|
65031
64723
|
"rawdescription": "\n",
|
|
65032
64724
|
"description": "",
|
|
65033
|
-
"line":
|
|
64725
|
+
"line": 68,
|
|
65034
64726
|
"type": "string",
|
|
65035
64727
|
"decorators": []
|
|
65036
64728
|
},
|
|
65037
64729
|
{
|
|
65038
64730
|
"coverageIgnore": false,
|
|
64731
|
+
"required": false,
|
|
65039
64732
|
"name": "isCurrent",
|
|
65040
64733
|
"defaultValue": "false",
|
|
65041
64734
|
"deprecated": false,
|
|
65042
64735
|
"deprecationMessage": "",
|
|
65043
64736
|
"rawdescription": "\n",
|
|
65044
64737
|
"description": "",
|
|
65045
|
-
"line":
|
|
64738
|
+
"line": 80,
|
|
65046
64739
|
"type": "boolean",
|
|
65047
64740
|
"decorators": []
|
|
65048
64741
|
},
|
|
@@ -65053,7 +64746,7 @@
|
|
|
65053
64746
|
"deprecationMessage": "",
|
|
65054
64747
|
"rawdescription": "\n",
|
|
65055
64748
|
"description": "",
|
|
65056
|
-
"line":
|
|
64749
|
+
"line": 69,
|
|
65057
64750
|
"type": "string",
|
|
65058
64751
|
"decorators": []
|
|
65059
64752
|
},
|
|
@@ -65067,7 +64760,7 @@
|
|
|
65067
64760
|
"indexKey": "",
|
|
65068
64761
|
"optional": false,
|
|
65069
64762
|
"description": "<p>Custom attributes, to be added to the <a> tag of the menu item.</p>\n",
|
|
65070
|
-
"line":
|
|
64763
|
+
"line": 84,
|
|
65071
64764
|
"rawdescription": "\n\nCustom attributes, to be added to the <a> tag of the menu item.\n",
|
|
65072
64765
|
"modifierKind": [
|
|
65073
64766
|
148
|
|
@@ -65084,7 +64777,7 @@
|
|
|
65084
64777
|
"indexKey": "",
|
|
65085
64778
|
"optional": false,
|
|
65086
64779
|
"description": "",
|
|
65087
|
-
"line":
|
|
64780
|
+
"line": 76,
|
|
65088
64781
|
"rawdescription": "\n",
|
|
65089
64782
|
"modifierKind": [
|
|
65090
64783
|
148
|
|
@@ -65101,7 +64794,7 @@
|
|
|
65101
64794
|
"indexKey": "",
|
|
65102
64795
|
"optional": false,
|
|
65103
64796
|
"description": "",
|
|
65104
|
-
"line":
|
|
64797
|
+
"line": 77,
|
|
65105
64798
|
"rawdescription": "\n",
|
|
65106
64799
|
"modifierKind": [
|
|
65107
64800
|
148
|
|
@@ -65118,7 +64811,7 @@
|
|
|
65118
64811
|
"indexKey": "",
|
|
65119
64812
|
"optional": false,
|
|
65120
64813
|
"description": "",
|
|
65121
|
-
"line":
|
|
64814
|
+
"line": 75,
|
|
65122
64815
|
"rawdescription": "\n",
|
|
65123
64816
|
"modifierKind": [
|
|
65124
64817
|
148
|
|
@@ -65135,7 +64828,7 @@
|
|
|
65135
64828
|
"indexKey": "",
|
|
65136
64829
|
"optional": false,
|
|
65137
64830
|
"description": "",
|
|
65138
|
-
"line":
|
|
64831
|
+
"line": 79,
|
|
65139
64832
|
"rawdescription": "\n",
|
|
65140
64833
|
"modifierKind": [
|
|
65141
64834
|
148
|
|
@@ -65152,7 +64845,7 @@
|
|
|
65152
64845
|
"indexKey": "",
|
|
65153
64846
|
"optional": false,
|
|
65154
64847
|
"description": "<p>When in mobile view, use this property to set aria-label for the toggle items button (to expand item's children).</p>\n",
|
|
65155
|
-
"line":
|
|
64848
|
+
"line": 73,
|
|
65156
64849
|
"rawdescription": "\n\nWhen in mobile view, use this property to set aria-label for the toggle items button (to expand item's children).\n",
|
|
65157
64850
|
"modifierKind": [
|
|
65158
64851
|
148
|
|
@@ -65210,7 +64903,7 @@
|
|
|
65210
64903
|
"defaultValue": "new EventEmitter<EclMenuItemCaretEvent>()",
|
|
65211
64904
|
"deprecated": false,
|
|
65212
64905
|
"deprecationMessage": "",
|
|
65213
|
-
"line":
|
|
64906
|
+
"line": 126,
|
|
65214
64907
|
"type": "EventEmitter"
|
|
65215
64908
|
},
|
|
65216
64909
|
{
|
|
@@ -65219,7 +64912,7 @@
|
|
|
65219
64912
|
"defaultValue": "new EventEmitter<EclMenuItemFocusEvent>()",
|
|
65220
64913
|
"deprecated": false,
|
|
65221
64914
|
"deprecationMessage": "",
|
|
65222
|
-
"line":
|
|
64915
|
+
"line": 133,
|
|
65223
64916
|
"type": "EventEmitter"
|
|
65224
64917
|
},
|
|
65225
64918
|
{
|
|
@@ -65230,7 +64923,7 @@
|
|
|
65230
64923
|
"deprecationMessage": "",
|
|
65231
64924
|
"rawdescription": "\n\nEvent that is emited on clicking the caret button to expand item's children in mobile mode.\n",
|
|
65232
64925
|
"description": "<p>Event that is emited on clicking the caret button to expand item's children in mobile mode.</p>\n",
|
|
65233
|
-
"line":
|
|
64926
|
+
"line": 130,
|
|
65234
64927
|
"type": "EventEmitter"
|
|
65235
64928
|
},
|
|
65236
64929
|
{
|
|
@@ -65239,7 +64932,7 @@
|
|
|
65239
64932
|
"defaultValue": "new EventEmitter<EclMenuItemHoverOutEvent>()",
|
|
65240
64933
|
"deprecated": false,
|
|
65241
64934
|
"deprecationMessage": "",
|
|
65242
|
-
"line":
|
|
64935
|
+
"line": 131,
|
|
65243
64936
|
"type": "EventEmitter"
|
|
65244
64937
|
},
|
|
65245
64938
|
{
|
|
@@ -65248,7 +64941,7 @@
|
|
|
65248
64941
|
"defaultValue": "new EventEmitter<EclMenuItemKeydownEvent>()",
|
|
65249
64942
|
"deprecated": false,
|
|
65250
64943
|
"deprecationMessage": "",
|
|
65251
|
-
"line":
|
|
64944
|
+
"line": 134,
|
|
65252
64945
|
"type": "EventEmitter"
|
|
65253
64946
|
},
|
|
65254
64947
|
{
|
|
@@ -65257,7 +64950,7 @@
|
|
|
65257
64950
|
"defaultValue": "new EventEmitter<EclMenuItemSelectEvent>()",
|
|
65258
64951
|
"deprecated": false,
|
|
65259
64952
|
"deprecationMessage": "",
|
|
65260
|
-
"line":
|
|
64953
|
+
"line": 125,
|
|
65261
64954
|
"type": "EventEmitter"
|
|
65262
64955
|
},
|
|
65263
64956
|
{
|
|
@@ -65266,7 +64959,7 @@
|
|
|
65266
64959
|
"defaultValue": "new EventEmitter<EclMenuItemSelectEvent>()",
|
|
65267
64960
|
"deprecated": false,
|
|
65268
64961
|
"deprecationMessage": "",
|
|
65269
|
-
"line":
|
|
64962
|
+
"line": 132,
|
|
65270
64963
|
"type": "EventEmitter"
|
|
65271
64964
|
},
|
|
65272
64965
|
{
|
|
@@ -65277,7 +64970,7 @@
|
|
|
65277
64970
|
"deprecationMessage": "",
|
|
65278
64971
|
"rawdescription": "\n\nThis event is emited when the keyboard nav reaches the last item in mobile view.\nThen the next focused element should be the 'close' btn.\n",
|
|
65279
64972
|
"description": "<p>This event is emited when the keyboard nav reaches the last item in mobile view.\nThen the next focused element should be the 'close' btn.</p>\n",
|
|
65280
|
-
"line":
|
|
64973
|
+
"line": 139,
|
|
65281
64974
|
"type": "EventEmitter"
|
|
65282
64975
|
}
|
|
65283
64976
|
],
|
|
@@ -65292,7 +64985,7 @@
|
|
|
65292
64985
|
"indexKey": "",
|
|
65293
64986
|
"optional": false,
|
|
65294
64987
|
"description": "",
|
|
65295
|
-
"line":
|
|
64988
|
+
"line": 66,
|
|
65296
64989
|
"rawdescription": "\n"
|
|
65297
64990
|
},
|
|
65298
64991
|
{
|
|
@@ -65304,7 +64997,7 @@
|
|
|
65304
64997
|
"indexKey": "",
|
|
65305
64998
|
"optional": false,
|
|
65306
64999
|
"description": "",
|
|
65307
|
-
"line":
|
|
65000
|
+
"line": 86,
|
|
65308
65001
|
"rawdescription": "\n"
|
|
65309
65002
|
},
|
|
65310
65003
|
{
|
|
@@ -65317,7 +65010,7 @@
|
|
|
65317
65010
|
"indexKey": "",
|
|
65318
65011
|
"optional": false,
|
|
65319
65012
|
"description": "<p>Set to 'true', when item has more than 13 chidren and the overlay needs to use the full available space.</p>\n",
|
|
65320
|
-
"line":
|
|
65013
|
+
"line": 90,
|
|
65321
65014
|
"rawdescription": "\n\nSet to 'true', when item has more than 13 chidren and the overlay needs to use the full available space.\n"
|
|
65322
65015
|
},
|
|
65323
65016
|
{
|
|
@@ -65330,7 +65023,7 @@
|
|
|
65330
65023
|
"indexKey": "",
|
|
65331
65024
|
"optional": false,
|
|
65332
65025
|
"description": "",
|
|
65333
|
-
"line":
|
|
65026
|
+
"line": 91,
|
|
65334
65027
|
"rawdescription": "\n"
|
|
65335
65028
|
},
|
|
65336
65029
|
{
|
|
@@ -65343,7 +65036,7 @@
|
|
|
65343
65036
|
"indexKey": "",
|
|
65344
65037
|
"optional": false,
|
|
65345
65038
|
"description": "",
|
|
65346
|
-
"line":
|
|
65039
|
+
"line": 92,
|
|
65347
65040
|
"rawdescription": "\n"
|
|
65348
65041
|
},
|
|
65349
65042
|
{
|
|
@@ -65356,7 +65049,7 @@
|
|
|
65356
65049
|
"indexKey": "",
|
|
65357
65050
|
"optional": false,
|
|
65358
65051
|
"description": "<p>Used when menu has overlay, to show if the item is currently displayed.</p>\n",
|
|
65359
|
-
"line":
|
|
65052
|
+
"line": 96,
|
|
65360
65053
|
"rawdescription": "\n\nUsed when menu has overlay, to show if the item is currently displayed.\n"
|
|
65361
65054
|
},
|
|
65362
65055
|
{
|
|
@@ -65369,7 +65062,7 @@
|
|
|
65369
65062
|
"indexKey": "",
|
|
65370
65063
|
"optional": false,
|
|
65371
65064
|
"description": "<p>The <button> element of the menu item, when item has children.</p>\n",
|
|
65372
|
-
"line":
|
|
65065
|
+
"line": 123,
|
|
65373
65066
|
"rawdescription": "\n\nThe <button> element of the menu item, when item has children.\n",
|
|
65374
65067
|
"modifierKind": [
|
|
65375
65068
|
148
|
|
@@ -65385,7 +65078,7 @@
|
|
|
65385
65078
|
"indexKey": "",
|
|
65386
65079
|
"optional": false,
|
|
65387
65080
|
"description": "<p>The <a> element of the menu item, when there are no children.</p>\n",
|
|
65388
|
-
"line":
|
|
65081
|
+
"line": 119,
|
|
65389
65082
|
"rawdescription": "\n\nThe <a> element of the menu item, when there are no children.\n",
|
|
65390
65083
|
"modifierKind": [
|
|
65391
65084
|
148
|
|
@@ -65401,7 +65094,7 @@
|
|
|
65401
65094
|
"indexKey": "",
|
|
65402
65095
|
"optional": false,
|
|
65403
65096
|
"description": "",
|
|
65404
|
-
"line":
|
|
65097
|
+
"line": 115,
|
|
65405
65098
|
"rawdescription": "\n",
|
|
65406
65099
|
"modifierKind": [
|
|
65407
65100
|
148
|
|
@@ -65433,7 +65126,7 @@
|
|
|
65433
65126
|
"optional": false,
|
|
65434
65127
|
"returnType": "void",
|
|
65435
65128
|
"typeParameters": [],
|
|
65436
|
-
"line":
|
|
65129
|
+
"line": 374,
|
|
65437
65130
|
"deprecated": false,
|
|
65438
65131
|
"deprecationMessage": "",
|
|
65439
65132
|
"rawdescription": "\n\nThis method calculates height and width of an item, depending the maximum of lines(rows) allowed.\nDepends on the 'maxLines' property of the parent menu component.\n",
|
|
@@ -65441,8 +65134,8 @@
|
|
|
65441
65134
|
"jsdoctags": [
|
|
65442
65135
|
{
|
|
65443
65136
|
"name": {
|
|
65444
|
-
"pos":
|
|
65445
|
-
"end":
|
|
65137
|
+
"pos": 12705,
|
|
65138
|
+
"end": 12713,
|
|
65446
65139
|
"kind": 80,
|
|
65447
65140
|
"id": 0,
|
|
65448
65141
|
"flags": 16842752,
|
|
@@ -65455,8 +65148,8 @@
|
|
|
65455
65148
|
"deprecated": false,
|
|
65456
65149
|
"deprecationMessage": "",
|
|
65457
65150
|
"tagName": {
|
|
65458
|
-
"pos":
|
|
65459
|
-
"end":
|
|
65151
|
+
"pos": 12699,
|
|
65152
|
+
"end": 12704,
|
|
65460
65153
|
"kind": 80,
|
|
65461
65154
|
"id": 0,
|
|
65462
65155
|
"flags": 16842752,
|
|
@@ -65467,8 +65160,8 @@
|
|
|
65467
65160
|
},
|
|
65468
65161
|
{
|
|
65469
65162
|
"name": {
|
|
65470
|
-
"pos":
|
|
65471
|
-
"end":
|
|
65163
|
+
"pos": 12792,
|
|
65164
|
+
"end": 12810,
|
|
65472
65165
|
"kind": 80,
|
|
65473
65166
|
"id": 0,
|
|
65474
65167
|
"flags": 16842752,
|
|
@@ -65481,8 +65174,8 @@
|
|
|
65481
65174
|
"deprecated": false,
|
|
65482
65175
|
"deprecationMessage": "",
|
|
65483
65176
|
"tagName": {
|
|
65484
|
-
"pos":
|
|
65485
|
-
"end":
|
|
65177
|
+
"pos": 12786,
|
|
65178
|
+
"end": 12791,
|
|
65486
65179
|
"kind": 80,
|
|
65487
65180
|
"id": 0,
|
|
65488
65181
|
"flags": 16842752,
|
|
@@ -65493,8 +65186,8 @@
|
|
|
65493
65186
|
},
|
|
65494
65187
|
{
|
|
65495
65188
|
"tagName": {
|
|
65496
|
-
"pos":
|
|
65497
|
-
"end":
|
|
65189
|
+
"pos": 12819,
|
|
65190
|
+
"end": 12826,
|
|
65498
65191
|
"kind": 80,
|
|
65499
65192
|
"id": 0,
|
|
65500
65193
|
"flags": 16842752,
|
|
@@ -65512,7 +65205,7 @@
|
|
|
65512
65205
|
"optional": false,
|
|
65513
65206
|
"returnType": "void",
|
|
65514
65207
|
"typeParameters": [],
|
|
65515
|
-
"line":
|
|
65208
|
+
"line": 196,
|
|
65516
65209
|
"deprecated": false,
|
|
65517
65210
|
"deprecationMessage": "",
|
|
65518
65211
|
"rawdescription": "\n",
|
|
@@ -65525,7 +65218,7 @@
|
|
|
65525
65218
|
"optional": false,
|
|
65526
65219
|
"returnType": "void",
|
|
65527
65220
|
"typeParameters": [],
|
|
65528
|
-
"line":
|
|
65221
|
+
"line": 222,
|
|
65529
65222
|
"deprecated": false,
|
|
65530
65223
|
"deprecationMessage": "",
|
|
65531
65224
|
"rawdescription": "\n",
|
|
@@ -65547,7 +65240,7 @@
|
|
|
65547
65240
|
"optional": false,
|
|
65548
65241
|
"returnType": "void",
|
|
65549
65242
|
"typeParameters": [],
|
|
65550
|
-
"line":
|
|
65243
|
+
"line": 280,
|
|
65551
65244
|
"deprecated": false,
|
|
65552
65245
|
"deprecationMessage": "",
|
|
65553
65246
|
"rawdescription": "\n\nManages the keyboard navigation when the current element is the button of the menu item.\n",
|
|
@@ -65555,8 +65248,8 @@
|
|
|
65555
65248
|
"jsdoctags": [
|
|
65556
65249
|
{
|
|
65557
65250
|
"name": {
|
|
65558
|
-
"pos":
|
|
65559
|
-
"end":
|
|
65251
|
+
"pos": 9586,
|
|
65252
|
+
"end": 9589,
|
|
65560
65253
|
"kind": 80,
|
|
65561
65254
|
"id": 0,
|
|
65562
65255
|
"flags": 16842752,
|
|
@@ -65569,8 +65262,8 @@
|
|
|
65569
65262
|
"deprecated": false,
|
|
65570
65263
|
"deprecationMessage": "",
|
|
65571
65264
|
"tagName": {
|
|
65572
|
-
"pos":
|
|
65573
|
-
"end":
|
|
65265
|
+
"pos": 9580,
|
|
65266
|
+
"end": 9585,
|
|
65574
65267
|
"kind": 80,
|
|
65575
65268
|
"id": 0,
|
|
65576
65269
|
"flags": 16842752,
|
|
@@ -65588,7 +65281,7 @@
|
|
|
65588
65281
|
"optional": false,
|
|
65589
65282
|
"returnType": "void",
|
|
65590
65283
|
"typeParameters": [],
|
|
65591
|
-
"line":
|
|
65284
|
+
"line": 260,
|
|
65592
65285
|
"deprecated": false,
|
|
65593
65286
|
"deprecationMessage": "",
|
|
65594
65287
|
"rawdescription": "\n\nManages the state when the item is focused, when navigating with keyboard and the navigation is coming from\n the next root menu item.\n",
|
|
@@ -65601,7 +65294,7 @@
|
|
|
65601
65294
|
"optional": false,
|
|
65602
65295
|
"returnType": "void",
|
|
65603
65296
|
"typeParameters": [],
|
|
65604
|
-
"line":
|
|
65297
|
+
"line": 272,
|
|
65605
65298
|
"deprecated": false,
|
|
65606
65299
|
"deprecationMessage": "",
|
|
65607
65300
|
"rawdescription": "\n\nManages the state when the item is focused, when navigating with keyboard and the navigation is coming from\n the previous root menu item.\n",
|
|
@@ -65614,7 +65307,7 @@
|
|
|
65614
65307
|
"optional": false,
|
|
65615
65308
|
"returnType": "void",
|
|
65616
65309
|
"typeParameters": [],
|
|
65617
|
-
"line":
|
|
65310
|
+
"line": 250,
|
|
65618
65311
|
"deprecated": false,
|
|
65619
65312
|
"deprecationMessage": "",
|
|
65620
65313
|
"rawdescription": "\n\nManages the state when the item is focused, when navigating with keyboard and the navigation is coming from the submenu.\n",
|
|
@@ -65636,7 +65329,7 @@
|
|
|
65636
65329
|
"optional": false,
|
|
65637
65330
|
"returnType": "void",
|
|
65638
65331
|
"typeParameters": [],
|
|
65639
|
-
"line":
|
|
65332
|
+
"line": 243,
|
|
65640
65333
|
"deprecated": false,
|
|
65641
65334
|
"deprecationMessage": "",
|
|
65642
65335
|
"rawdescription": "\n\nWhen clicking the caret button, to expand item's children. Used in mobile view.\n",
|
|
@@ -65644,8 +65337,8 @@
|
|
|
65644
65337
|
"jsdoctags": [
|
|
65645
65338
|
{
|
|
65646
65339
|
"name": {
|
|
65647
|
-
"pos":
|
|
65648
|
-
"end":
|
|
65340
|
+
"pos": 8493,
|
|
65341
|
+
"end": 8496,
|
|
65649
65342
|
"kind": 80,
|
|
65650
65343
|
"id": 0,
|
|
65651
65344
|
"flags": 16842752,
|
|
@@ -65658,8 +65351,8 @@
|
|
|
65658
65351
|
"deprecated": false,
|
|
65659
65352
|
"deprecationMessage": "",
|
|
65660
65353
|
"tagName": {
|
|
65661
|
-
"pos":
|
|
65662
|
-
"end":
|
|
65354
|
+
"pos": 8487,
|
|
65355
|
+
"end": 8492,
|
|
65663
65356
|
"kind": 80,
|
|
65664
65357
|
"id": 0,
|
|
65665
65358
|
"flags": 16842752,
|
|
@@ -65686,7 +65379,7 @@
|
|
|
65686
65379
|
"optional": false,
|
|
65687
65380
|
"returnType": "void",
|
|
65688
65381
|
"typeParameters": [],
|
|
65689
|
-
"line":
|
|
65382
|
+
"line": 231,
|
|
65690
65383
|
"deprecated": false,
|
|
65691
65384
|
"deprecationMessage": "",
|
|
65692
65385
|
"rawdescription": "\n",
|
|
@@ -65721,7 +65414,7 @@
|
|
|
65721
65414
|
"optional": false,
|
|
65722
65415
|
"returnType": "void",
|
|
65723
65416
|
"typeParameters": [],
|
|
65724
|
-
"line":
|
|
65417
|
+
"line": 227,
|
|
65725
65418
|
"deprecated": false,
|
|
65726
65419
|
"deprecationMessage": "",
|
|
65727
65420
|
"rawdescription": "\n",
|
|
@@ -65756,7 +65449,7 @@
|
|
|
65756
65449
|
"optional": false,
|
|
65757
65450
|
"returnType": "void",
|
|
65758
65451
|
"typeParameters": [],
|
|
65759
|
-
"line":
|
|
65452
|
+
"line": 186,
|
|
65760
65453
|
"deprecated": false,
|
|
65761
65454
|
"deprecationMessage": "",
|
|
65762
65455
|
"rawdescription": "\n",
|
|
@@ -65791,7 +65484,7 @@
|
|
|
65791
65484
|
"optional": false,
|
|
65792
65485
|
"returnType": "void",
|
|
65793
65486
|
"typeParameters": [],
|
|
65794
|
-
"line":
|
|
65487
|
+
"line": 191,
|
|
65795
65488
|
"deprecated": false,
|
|
65796
65489
|
"deprecationMessage": "",
|
|
65797
65490
|
"rawdescription": "\n",
|
|
@@ -65826,7 +65519,7 @@
|
|
|
65826
65519
|
"optional": false,
|
|
65827
65520
|
"returnType": "void",
|
|
65828
65521
|
"typeParameters": [],
|
|
65829
|
-
"line":
|
|
65522
|
+
"line": 330,
|
|
65830
65523
|
"deprecated": false,
|
|
65831
65524
|
"deprecationMessage": "",
|
|
65832
65525
|
"rawdescription": "\n\nManages the keyboard navigation when the current element is the <a> tag of the menu item.\n",
|
|
@@ -65834,8 +65527,8 @@
|
|
|
65834
65527
|
"jsdoctags": [
|
|
65835
65528
|
{
|
|
65836
65529
|
"name": {
|
|
65837
|
-
"pos":
|
|
65838
|
-
"end":
|
|
65530
|
+
"pos": 11332,
|
|
65531
|
+
"end": 11335,
|
|
65839
65532
|
"kind": 80,
|
|
65840
65533
|
"id": 0,
|
|
65841
65534
|
"flags": 16842752,
|
|
@@ -65848,8 +65541,8 @@
|
|
|
65848
65541
|
"deprecated": false,
|
|
65849
65542
|
"deprecationMessage": "",
|
|
65850
65543
|
"tagName": {
|
|
65851
|
-
"pos":
|
|
65852
|
-
"end":
|
|
65544
|
+
"pos": 11326,
|
|
65545
|
+
"end": 11331,
|
|
65853
65546
|
"kind": 80,
|
|
65854
65547
|
"id": 0,
|
|
65855
65548
|
"flags": 16842752,
|
|
@@ -65928,14 +65621,14 @@
|
|
|
65928
65621
|
"description": "<p>This component represents a root menu item. Adds styling and functionality to menu item.</p>\n",
|
|
65929
65622
|
"rawdescription": "\n\nThis component represents a root menu item. Adds styling and functionality to menu item.\n",
|
|
65930
65623
|
"type": "component",
|
|
65931
|
-
"sourceCode": "import { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterContentInit,\n afterNextRender,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n OnDestroy,\n Output,\n Renderer2,\n ViewEncapsulation,\n DOCUMENT,\n input,\n contentChild,\n viewChild,\n} from '@angular/core';\nimport { Params, QueryParamsHandling, RouterLink, RouterLinkWithHref } from '@angular/router';\nimport { EuiAppShellService } from '@eui/core';\nimport { EclButtonComponent, EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\nimport { ECLBaseDirective, KeyCode } from '@eui/ecl/core';\nimport { Subject } from 'rxjs';\nimport { distinctUntilChanged, map, takeUntil } from 'rxjs/operators';\nimport { EclMenuMegaComponent } from '../ecl-menu-mega';\nimport {\n EclMenuItemCaretEvent,\n EclMenuItemFocusEvent,\n EclMenuItemHoverEvent,\n EclMenuItemHoverOutEvent,\n EclMenuItemKeydownEvent,\n EclMenuItemParentFocusEvent,\n EclMenuItemSelectEvent,\n} from '../events';\nimport { EclMenuItem } from '../models/ecl-menu-item.model';\n\nconst enum ColTrigger {\n COL1_TRIGGER = 5,\n COL2_TRIGGER = 9,\n COL3_TRIGGER = 13,\n}\n\n/**\n * This component represents a root menu item. Adds styling and functionality to menu item.\n */\n@Component({\n selector: 'ecl-menu-item',\n templateUrl: './ecl-menu-item.component.html',\n imports: [NgTemplateOutlet, RouterLink, RouterLinkWithHref, ...EUI_ECL_BUTTON, ...EUI_ECL_ICON, ...EUI_ECL_LINK],\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'listitem',\n '[class]': 'cssClasses',\n '[class.ecl-menu__item--has-children]': 'hasEclChildrenDataAttribute',\n '[attr.aria-haspopup]': 'hasEclChildrenDataAttribute',\n '[attr.data-expanded]': 'isDataExpanded',\n '(mouseenter)': 'onItemMouseEnter($event)',\n '(mouseleave)': 'onItemMouseLeave($event)',\n },\n})\nexport class EclMenuItemComponent extends ECLBaseDirective implements EclMenuItem, AfterContentInit, OnDestroy {\n el = inject(ElementRef);\n\n @Input() id: string;\n @Input() label: string;\n /**\n * When in mobile view, use this property to set aria-label for the toggle items button (to expand item's children).\n */\n readonly toggleAriaLabel = input<string>(undefined);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly routerLink = input<string | any[]>(null);\n readonly queryParams = input<Params | null>(null);\n readonly queryParamsHandling = input<QueryParamsHandling>(null);\n @Input() href = '';\n readonly target = input('');\n @Input() isCurrent = false;\n /**\n * Custom attributes, to be added to the <a> tag of the menu item.\n */\n readonly linkExtraAttributes = input<Record<string, string>>(undefined);\n\n isExpanded: boolean;\n /**\n * Set to 'true', when item has more than 13 chidren and the overlay needs to use the full available space.\n */\n isFull = false;\n isHovered = false;\n isMobileBreakpoint = false;\n /**\n * Used when menu has overlay, to show if the item is currently displayed.\n */\n isVisible = true;\n\n private readonly doc = inject(DOCUMENT);\n private readonly window = this.doc.defaultView; // Window | null\n\n /**\n * The default role of the item is 'listitem' and should not be changed.\n */\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-menu__item'),\n this.isCurrent ? 'ecl-menu__item--current' : '',\n this.isExpanded ? 'ecl-menu__item--expanded' : '',\n this.getClassDependingChildrenCnt(),\n ]\n .join(' ')\n .trim();\n }\n\n readonly submenu = contentChild(forwardRef(() => EclMenuMegaComponent));\n /**\n * The <a> element of the menu item, when there are no children.\n */\n readonly menuLink = viewChild<ElementRef<HTMLAnchorElement>>('menuLink');\n /**\n * The <button> element of the menu item, when item has children.\n */\n readonly menuButton = viewChild(EclButtonComponent);\n\n @Output() menuItemSelect = new EventEmitter<EclMenuItemSelectEvent>();\n @Output() menuItemCaret = new EventEmitter<EclMenuItemCaretEvent>();\n /**\n * Event that is emited on clicking the caret button to expand item's children in mobile mode.\n */\n @Output() menuItemHover = new EventEmitter<EclMenuItemHoverEvent>();\n @Output() menuItemHoverOut = new EventEmitter<EclMenuItemHoverOutEvent>();\n @Output() menuMegaItemSelect = new EventEmitter<EclMenuItemSelectEvent>();\n @Output() menuItemFocus = new EventEmitter<EclMenuItemFocusEvent>();\n @Output() menuItemKeydown = new EventEmitter<EclMenuItemKeydownEvent>();\n /**\n * This event is emited when the keyboard nav reaches the last item in mobile view.\n * Then the next focused element should be the 'close' btn.\n */\n @Output() menuMegaLastItemTab = new EventEmitter<void>();\n\n get hasEclChildrenDataAttribute(): boolean {\n return this.hasChildren || undefined;\n }\n\n get isDataExpanded(): boolean {\n return this.hasChildren ? this.isHovered : null;\n }\n\n get ariaCurrent(): boolean {\n return this.isCurrent ? true : null;\n }\n\n get hasChildren(): boolean {\n return !!this.submenu();\n }\n\n get children(): EclMenuItem[] {\n return this.hasChildren ? this.submenu().eclMenuMegaItems.toArray() : [];\n }\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private renderer = inject(Renderer2);\n private appShell = inject(EuiAppShellService);\n\n constructor() {\n super();\n afterNextRender(() => {\n this.observeBreakpointChanges();\n this.setExtraAttributesForLink(this.menuLink()?.nativeElement, this.linkExtraAttributes());\n });\n }\n\n onItemMouseEnter(evt: MouseEvent): void {\n if (this.isMobileBreakpoint) return;\n this.menuItemHover.next(new EclMenuItemHoverEvent(this, evt));\n }\n\n onItemMouseLeave(evt: MouseEvent): void {\n if (this.isMobileBreakpoint) return;\n this.menuItemHoverOut.next(new EclMenuItemHoverOutEvent(this, evt));\n }\n\n ngAfterContentInit(): void {\n // Subscibe to submenu component events.\n const submenu = this.submenu();\n if (submenu) {\n submenu.menuItemSelect.pipe(takeUntil(this.destroy$)).subscribe((it: EclMenuItemSelectEvent) => {\n this.menuMegaItemSelect.next(new EclMenuItemSelectEvent(it.menuItem, it.domEvent));\n });\n submenu.menuMegaItemParentFocus.pipe(takeUntil(this.destroy$)).subscribe((it: EclMenuItemParentFocusEvent) => {\n if (!this.isMobileBreakpoint) {\n this.onFocusFromSubmenu();\n }\n });\n submenu.menuMegaLastItemTab.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.isMobileBreakpoint) {\n this.menuMegaLastItemTab.next();\n }\n });\n\n if (this.hasSubmenuAnySelections()) {\n this.isCurrent = true;\n }\n }\n\n // this.tabindex = this.routerLink || this.href ? 0 : -1;\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n onItemFocus(evt: FocusEvent): void {\n this.menuItemFocus.next(new EclMenuItemFocusEvent(this, evt));\n }\n\n onItemClick(evt: Event): void {\n this.menuItemSelect.next(new EclMenuItemSelectEvent(this, evt));\n\n if (!this.href) {\n evt.stopPropagation();\n }\n }\n\n /**\n * When clicking the caret button, to expand item's children. Used in mobile view.\n * @param evt\n */\n onItemCaretClick(evt: MouseEvent): void {\n this.menuItemCaret.next(new EclMenuItemCaretEvent(this, evt));\n }\n\n /**\n * Manages the state when the item is focused, when navigating with keyboard and the navigation is coming from the submenu.\n */\n onFocusFromSubmenu(): void {\n this.onButtonFocus();\n this.isHovered = false;\n this.isExpanded = false;\n }\n\n /**\n * Manages the state when the item is focused, when navigating with keyboard and the navigation is coming from\n * the next root menu item.\n */\n onFocusFromNext(): void {\n if (this.menuButton()) {\n this.onButtonFocus();\n } else {\n this.onLinkFocus();\n }\n }\n\n /**\n * Manages the state when the item is focused, when navigating with keyboard and the navigation is coming from\n * the previous root menu item.\n */\n onFocusFromPrev(): void {\n this.onLinkFocus();\n }\n\n /**\n * Manages the keyboard navigation when the current element is the button of the menu item.\n * @param evt\n */\n onButtonKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case KeyCode.ARROW_DOWN: {\n evt.preventDefault();\n if (this.isHovered) {\n this.selectFirstMegaMenuItem();\n } else {\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n }\n break;\n }\n case KeyCode.ARROW_UP: {\n evt.preventDefault();\n this.onLinkFocus();\n break;\n }\n case KeyCode.ARROW_RIGHT: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ARROW_LEFT: {\n evt.preventDefault();\n this.onLinkFocus();\n break;\n }\n case KeyCode.TAB: {\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ENTER: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ESCAPE: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n default: {\n break;\n }\n }\n }\n\n /**\n * Manages the keyboard navigation when the current element is the <a> tag of the menu item.\n * @param evt\n */\n onLinkKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case KeyCode.ARROW_DOWN: {\n evt.preventDefault();\n this.onLinkNextFocus(evt);\n break;\n }\n case KeyCode.ARROW_UP: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ARROW_RIGHT: {\n evt.preventDefault();\n this.onLinkNextFocus(evt);\n break;\n }\n case KeyCode.ARROW_LEFT: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ENTER: {\n this.onItemClick(evt);\n break;\n }\n case KeyCode.ESCAPE: {\n evt.preventDefault();\n this.onLinkEscape(evt);\n break;\n }\n default: {\n break;\n }\n }\n }\n\n /**\n * This method calculates height and width of an item, depending the maximum of lines(rows) allowed.\n * Depends on the 'maxLines' property of the parent menu component.\n * @param maxLines - property that sets the maximum possible lines in a menu item.\n * @param isMobileBreakpoint\n * @returns\n */\n checkMenuItem(maxLines: number, isMobileBreakpoint: boolean): void {\n if (maxLines < 1) return;\n\n const currentItem = this.el.nativeElement;\n const currentLink = this.menuLink().nativeElement;\n if (isMobileBreakpoint) {\n this.renderer.setStyle(currentLink, 'width', '100%');\n return;\n }\n this.renderer.setStyle(currentItem, 'alignItems', 'flex-start');\n const linkStyle = this.window.getComputedStyle(currentLink);\n\n const maxHeight = this.getMenuItemLinkMaxHeight(linkStyle, maxLines);\n\n if (currentLink.offsetHeight > maxHeight) {\n this.changeMenuItemLinkWidth(currentLink, maxLines, linkStyle);\n }\n this.renderer.removeStyle(currentItem, 'alignItems');\n }\n\n private onLinkEscape(evt: Event): void {\n const menuButton = this.menuButton();\n if (menuButton) {\n menuButton.el.nativeElement.focus();\n evt.stopPropagation();\n } else {\n this.menuLink().nativeElement.blur();\n }\n }\n\n private selectFirstMegaMenuItem(): void {\n this.submenu().selectFirstSubItem();\n }\n\n private onLinkFocus(): void {\n this.menuLink().nativeElement.focus();\n }\n\n private onLinkNextFocus(evt: Event): void {\n if (this.menuButton()) {\n this.onButtonFocus();\n } else {\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n }\n }\n\n private onButtonFocus(): void {\n this.menuButton().el.nativeElement.focus();\n }\n\n private getMenuItemLinkMaxHeight(linkStyle: CSSStyleDeclaration, maxLines: number): number {\n return parseInt(linkStyle.lineHeight, 10) * maxLines + parseInt(linkStyle.paddingTop, 10) + parseInt(linkStyle.paddingBottom, 10);\n }\n\n /**\n * Calculates width of a menu item, depending on maximum lines of text allowed.\n * @param currentLink\n * @param maxLines\n * @param linkStyle\n * @returns\n */\n private changeMenuItemLinkWidth(currentLink: HTMLAnchorElement, maxLines: number, linkStyle: CSSStyleDeclaration): void {\n this.renderer.setStyle(currentLink, 'white-space', 'nowrap');\n const linkWidth = currentLink.offsetWidth;\n if (maxLines === 1) {\n this.renderer.setStyle(currentLink, 'width', `${linkWidth + parseInt(linkStyle.paddingLeft, 10) + parseInt(linkStyle.paddingRight, 10)}px`);\n this.renderer.removeStyle(currentLink, 'white-space');\n return;\n }\n const textSize = currentLink.text.length;\n const letterWidth = Math.ceil(linkWidth / textSize);\n const wordsArray = currentLink.text.trim().split(' ');\n const goalWidth = Math.ceil(linkWidth / maxLines);\n const firstWord = wordsArray[0];\n let cnt = 1;\n let wordWidth = Math.ceil((firstWord.length + 1) * letterWidth);\n while (wordWidth < goalWidth) {\n wordWidth += Math.ceil((wordsArray[cnt].length + 1) * letterWidth);\n cnt++;\n }\n this.renderer.setStyle(currentLink, 'width', `${wordWidth + parseInt(linkStyle.paddingLeft, 10) + parseInt(linkStyle.paddingRight, 10)}px`);\n this.renderer.removeStyle(currentLink, 'white-space');\n }\n\n private getClassDependingChildrenCnt(): string {\n if (this.hasChildren) {\n if (this.submenu().eclMenuMegaItems.length < ColTrigger.COL1_TRIGGER) {\n return 'ecl-menu__item--col1';\n } else if (this.submenu().eclMenuMegaItems.length < ColTrigger.COL2_TRIGGER) {\n return 'ecl-menu__item--col2';\n } else if (this.submenu().eclMenuMegaItems.length < ColTrigger.COL3_TRIGGER) {\n return 'ecl-menu__item--col3';\n } else {\n this.isFull = true;\n return 'ecl-menu__item--full';\n }\n }\n return '';\n }\n\n private hasSubmenuAnySelections(): boolean {\n const submenu = this.submenu();\n return submenu && !!submenu.eclMenuMegaItems.find((it) => it.isCurrent);\n }\n\n private setExtraAttributesForLink(link: HTMLElement, linkExtraAttributes: Record<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 private observeBreakpointChanges(): void {\n this.appShell.getState<any>('breakpoints')\n .pipe(\n map(bp => !!(bp?.isMobile || bp?.isTablet || bp?.isLtLargeTablet)), // xs/sm/md/lg (< 1140px)\n distinctUntilChanged(),\n takeUntil(this.destroy$),\n )\n .subscribe((isMobile) => {\n this.isMobileBreakpoint = isMobile;\n });\n }\n}\n",
|
|
65624
|
+
"sourceCode": "import { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterContentInit,\n afterNextRender,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n OnDestroy,\n Output,\n Renderer2,\n ViewEncapsulation,\n DOCUMENT,\n booleanAttribute,\n input,\n contentChild,\n viewChild,\n} from '@angular/core';\nimport { Params, QueryParamsHandling, RouterLink, RouterLinkWithHref } from '@angular/router';\nimport { EuiAppShellService } from '@eui/core';\nimport { EclButtonComponent, EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\nimport { ECLBaseDirective, KeyCode } from '@eui/ecl/core';\nimport { Subject } from 'rxjs';\nimport { distinctUntilChanged, map, takeUntil } from 'rxjs/operators';\nimport { EclMenuMegaComponent } from '../ecl-menu-mega';\nimport {\n EclMenuItemCaretEvent,\n EclMenuItemFocusEvent,\n EclMenuItemHoverEvent,\n EclMenuItemHoverOutEvent,\n EclMenuItemKeydownEvent,\n EclMenuItemParentFocusEvent,\n EclMenuItemSelectEvent,\n} from '../events';\nimport { EclMenuItem } from '../models/ecl-menu-item.model';\n\nconst enum ColTrigger {\n COL1_TRIGGER = 5,\n COL2_TRIGGER = 9,\n COL3_TRIGGER = 13,\n}\n\n/**\n * This component represents a root menu item. Adds styling and functionality to menu item.\n */\n@Component({\n selector: 'ecl-menu-item',\n templateUrl: './ecl-menu-item.component.html',\n imports: [NgTemplateOutlet, RouterLink, RouterLinkWithHref, ...EUI_ECL_BUTTON, ...EUI_ECL_ICON, ...EUI_ECL_LINK],\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'listitem',\n '[class]': 'cssClasses',\n '[class.ecl-menu__item--has-children]': 'hasEclChildrenDataAttribute',\n '[attr.aria-haspopup]': 'hasEclChildrenDataAttribute',\n '[attr.data-expanded]': 'isDataExpanded',\n '(mouseenter)': 'onItemMouseEnter($event)',\n '(mouseleave)': 'onItemMouseLeave($event)',\n },\n})\nexport class EclMenuItemComponent extends ECLBaseDirective implements EclMenuItem, AfterContentInit, OnDestroy {\n el = inject(ElementRef);\n\n @Input() id: string;\n @Input() label: string;\n /**\n * When in mobile view, use this property to set aria-label for the toggle items button (to expand item's children).\n */\n readonly toggleAriaLabel = input<string>(undefined);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly routerLink = input<string | any[]>(null);\n readonly queryParams = input<Params | null>(null);\n readonly queryParamsHandling = input<QueryParamsHandling>(null);\n @Input() href = '';\n readonly target = input('');\n @Input({ transform: booleanAttribute }) isCurrent = false;\n /**\n * Custom attributes, to be added to the <a> tag of the menu item.\n */\n readonly linkExtraAttributes = input<Record<string, string>>(undefined);\n\n isExpanded: boolean;\n /**\n * Set to 'true', when item has more than 13 chidren and the overlay needs to use the full available space.\n */\n isFull = false;\n isHovered = false;\n isMobileBreakpoint = false;\n /**\n * Used when menu has overlay, to show if the item is currently displayed.\n */\n isVisible = true;\n\n private readonly doc = inject(DOCUMENT);\n private readonly window = this.doc.defaultView; // Window | null\n\n /**\n * The default role of the item is 'listitem' and should not be changed.\n */\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-menu__item'),\n this.isCurrent ? 'ecl-menu__item--current' : '',\n this.isExpanded ? 'ecl-menu__item--expanded' : '',\n this.getClassDependingChildrenCnt(),\n ]\n .join(' ')\n .trim();\n }\n\n readonly submenu = contentChild(forwardRef(() => EclMenuMegaComponent));\n /**\n * The <a> element of the menu item, when there are no children.\n */\n readonly menuLink = viewChild<ElementRef<HTMLAnchorElement>>('menuLink');\n /**\n * The <button> element of the menu item, when item has children.\n */\n readonly menuButton = viewChild(EclButtonComponent);\n\n @Output() menuItemSelect = new EventEmitter<EclMenuItemSelectEvent>();\n @Output() menuItemCaret = new EventEmitter<EclMenuItemCaretEvent>();\n /**\n * Event that is emited on clicking the caret button to expand item's children in mobile mode.\n */\n @Output() menuItemHover = new EventEmitter<EclMenuItemHoverEvent>();\n @Output() menuItemHoverOut = new EventEmitter<EclMenuItemHoverOutEvent>();\n @Output() menuMegaItemSelect = new EventEmitter<EclMenuItemSelectEvent>();\n @Output() menuItemFocus = new EventEmitter<EclMenuItemFocusEvent>();\n @Output() menuItemKeydown = new EventEmitter<EclMenuItemKeydownEvent>();\n /**\n * This event is emited when the keyboard nav reaches the last item in mobile view.\n * Then the next focused element should be the 'close' btn.\n */\n @Output() menuMegaLastItemTab = new EventEmitter<void>();\n\n get hasEclChildrenDataAttribute(): boolean {\n return this.hasChildren || undefined;\n }\n\n get isDataExpanded(): boolean {\n return this.hasChildren ? this.isHovered : null;\n }\n\n /**\n * 'aria-current' is set to 'page' only when this item itself is the current page, and not when it is\n * marked current merely because one of its children is the active item (in that case the child link\n * carries 'aria-current=\"page\"'). Derived from live state so it stays correct whether 'isCurrent' is set\n * at render time or updated on selection.\n */\n get ariaCurrent(): string | null {\n return this.isCurrent && !this.hasCurrentChild ? 'page' : null;\n }\n\n /**\n * Whether any child (sub-item) is the current item.\n */\n get hasCurrentChild(): boolean {\n return this.children.some((child) => child.isCurrent);\n }\n\n get hasChildren(): boolean {\n return !!this.submenu();\n }\n\n get children(): EclMenuItem[] {\n return this.hasChildren ? this.submenu().eclMenuMegaItems.toArray() : [];\n }\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private renderer = inject(Renderer2);\n private appShell = inject(EuiAppShellService);\n\n constructor() {\n super();\n afterNextRender(() => {\n this.observeBreakpointChanges();\n this.setExtraAttributesForLink(this.menuLink()?.nativeElement, this.linkExtraAttributes());\n });\n }\n\n onItemMouseEnter(evt: MouseEvent): void {\n if (this.isMobileBreakpoint) return;\n this.menuItemHover.next(new EclMenuItemHoverEvent(this, evt));\n }\n\n onItemMouseLeave(evt: MouseEvent): void {\n if (this.isMobileBreakpoint) return;\n this.menuItemHoverOut.next(new EclMenuItemHoverOutEvent(this, evt));\n }\n\n ngAfterContentInit(): void {\n // Subscibe to submenu component events.\n const submenu = this.submenu();\n if (submenu) {\n submenu.menuItemSelect.pipe(takeUntil(this.destroy$)).subscribe((it: EclMenuItemSelectEvent) => {\n this.menuMegaItemSelect.next(new EclMenuItemSelectEvent(it.menuItem, it.domEvent));\n });\n submenu.menuMegaItemParentFocus.pipe(takeUntil(this.destroy$)).subscribe((it: EclMenuItemParentFocusEvent) => {\n if (!this.isMobileBreakpoint) {\n this.onFocusFromSubmenu();\n }\n });\n submenu.menuMegaLastItemTab.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.isMobileBreakpoint) {\n this.menuMegaLastItemTab.next();\n }\n });\n\n if (this.hasSubmenuAnySelections()) {\n this.isCurrent = true;\n }\n }\n\n // this.tabindex = this.routerLink || this.href ? 0 : -1;\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n onItemFocus(evt: FocusEvent): void {\n this.menuItemFocus.next(new EclMenuItemFocusEvent(this, evt));\n }\n\n onItemClick(evt: Event): void {\n this.menuItemSelect.next(new EclMenuItemSelectEvent(this, evt));\n\n if (!this.href) {\n evt.stopPropagation();\n }\n }\n\n /**\n * When clicking the caret button, to expand item's children. Used in mobile view.\n * @param evt\n */\n onItemCaretClick(evt: MouseEvent): void {\n this.menuItemCaret.next(new EclMenuItemCaretEvent(this, evt));\n }\n\n /**\n * Manages the state when the item is focused, when navigating with keyboard and the navigation is coming from the submenu.\n */\n onFocusFromSubmenu(): void {\n this.onButtonFocus();\n this.isHovered = false;\n this.isExpanded = false;\n }\n\n /**\n * Manages the state when the item is focused, when navigating with keyboard and the navigation is coming from\n * the next root menu item.\n */\n onFocusFromNext(): void {\n if (this.menuButton()) {\n this.onButtonFocus();\n } else {\n this.onLinkFocus();\n }\n }\n\n /**\n * Manages the state when the item is focused, when navigating with keyboard and the navigation is coming from\n * the previous root menu item.\n */\n onFocusFromPrev(): void {\n this.onLinkFocus();\n }\n\n /**\n * Manages the keyboard navigation when the current element is the button of the menu item.\n * @param evt\n */\n onButtonKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case KeyCode.ARROW_DOWN: {\n evt.preventDefault();\n if (this.isHovered) {\n this.selectFirstMegaMenuItem();\n } else {\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n }\n break;\n }\n case KeyCode.ARROW_UP: {\n evt.preventDefault();\n this.onLinkFocus();\n break;\n }\n case KeyCode.ARROW_RIGHT: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ARROW_LEFT: {\n evt.preventDefault();\n this.onLinkFocus();\n break;\n }\n case KeyCode.TAB: {\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ENTER: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ESCAPE: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n default: {\n break;\n }\n }\n }\n\n /**\n * Manages the keyboard navigation when the current element is the <a> tag of the menu item.\n * @param evt\n */\n onLinkKeydown(evt: Event): void {\n switch ((evt as KeyboardEvent).key) {\n case KeyCode.ARROW_DOWN: {\n evt.preventDefault();\n this.onLinkNextFocus(evt);\n break;\n }\n case KeyCode.ARROW_UP: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ARROW_RIGHT: {\n evt.preventDefault();\n this.onLinkNextFocus(evt);\n break;\n }\n case KeyCode.ARROW_LEFT: {\n evt.preventDefault();\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n break;\n }\n case KeyCode.ENTER: {\n this.onItemClick(evt);\n break;\n }\n case KeyCode.ESCAPE: {\n evt.preventDefault();\n this.onLinkEscape(evt);\n break;\n }\n default: {\n break;\n }\n }\n }\n\n /**\n * This method calculates height and width of an item, depending the maximum of lines(rows) allowed.\n * Depends on the 'maxLines' property of the parent menu component.\n * @param maxLines - property that sets the maximum possible lines in a menu item.\n * @param isMobileBreakpoint\n * @returns\n */\n checkMenuItem(maxLines: number, isMobileBreakpoint: boolean): void {\n if (maxLines < 1) return;\n\n const currentItem = this.el.nativeElement;\n const currentLink = this.menuLink().nativeElement;\n if (isMobileBreakpoint) {\n this.renderer.setStyle(currentLink, 'width', '100%');\n return;\n }\n this.renderer.setStyle(currentItem, 'alignItems', 'flex-start');\n const linkStyle = this.window.getComputedStyle(currentLink);\n\n const maxHeight = this.getMenuItemLinkMaxHeight(linkStyle, maxLines);\n\n if (currentLink.offsetHeight > maxHeight) {\n this.changeMenuItemLinkWidth(currentLink, maxLines, linkStyle);\n }\n this.renderer.removeStyle(currentItem, 'alignItems');\n }\n\n private onLinkEscape(evt: Event): void {\n const menuButton = this.menuButton();\n if (menuButton) {\n menuButton.el.nativeElement.focus();\n evt.stopPropagation();\n } else {\n this.menuLink().nativeElement.blur();\n }\n }\n\n private selectFirstMegaMenuItem(): void {\n this.submenu().selectFirstSubItem();\n }\n\n private onLinkFocus(): void {\n this.menuLink().nativeElement.focus();\n }\n\n private onLinkNextFocus(evt: Event): void {\n if (this.menuButton()) {\n this.onButtonFocus();\n } else {\n this.menuItemKeydown.next(new EclMenuItemKeydownEvent(this, evt as KeyboardEvent));\n }\n }\n\n private onButtonFocus(): void {\n this.menuButton().el.nativeElement.focus();\n }\n\n private getMenuItemLinkMaxHeight(linkStyle: CSSStyleDeclaration, maxLines: number): number {\n return parseInt(linkStyle.lineHeight, 10) * maxLines + parseInt(linkStyle.paddingTop, 10) + parseInt(linkStyle.paddingBottom, 10);\n }\n\n /**\n * Calculates width of a menu item, depending on maximum lines of text allowed.\n * @param currentLink\n * @param maxLines\n * @param linkStyle\n * @returns\n */\n private changeMenuItemLinkWidth(currentLink: HTMLAnchorElement, maxLines: number, linkStyle: CSSStyleDeclaration): void {\n this.renderer.setStyle(currentLink, 'white-space', 'nowrap');\n const linkWidth = currentLink.offsetWidth;\n if (maxLines === 1) {\n this.renderer.setStyle(currentLink, 'width', `${linkWidth + parseInt(linkStyle.paddingLeft, 10) + parseInt(linkStyle.paddingRight, 10)}px`);\n this.renderer.removeStyle(currentLink, 'white-space');\n return;\n }\n const textSize = currentLink.text.length;\n const letterWidth = Math.ceil(linkWidth / textSize);\n const wordsArray = currentLink.text.trim().split(' ');\n const goalWidth = Math.ceil(linkWidth / maxLines);\n const firstWord = wordsArray[0];\n let cnt = 1;\n let wordWidth = Math.ceil((firstWord.length + 1) * letterWidth);\n while (wordWidth < goalWidth) {\n wordWidth += Math.ceil((wordsArray[cnt].length + 1) * letterWidth);\n cnt++;\n }\n this.renderer.setStyle(currentLink, 'width', `${wordWidth + parseInt(linkStyle.paddingLeft, 10) + parseInt(linkStyle.paddingRight, 10)}px`);\n this.renderer.removeStyle(currentLink, 'white-space');\n }\n\n private getClassDependingChildrenCnt(): string {\n if (this.hasChildren) {\n if (this.submenu().eclMenuMegaItems.length < ColTrigger.COL1_TRIGGER) {\n return 'ecl-menu__item--col1';\n } else if (this.submenu().eclMenuMegaItems.length < ColTrigger.COL2_TRIGGER) {\n return 'ecl-menu__item--col2';\n } else if (this.submenu().eclMenuMegaItems.length < ColTrigger.COL3_TRIGGER) {\n return 'ecl-menu__item--col3';\n } else {\n this.isFull = true;\n return 'ecl-menu__item--full';\n }\n }\n return '';\n }\n\n private hasSubmenuAnySelections(): boolean {\n const submenu = this.submenu();\n return submenu && !!submenu.eclMenuMegaItems.find((it) => it.isCurrent);\n }\n\n private setExtraAttributesForLink(link: HTMLElement, linkExtraAttributes: Record<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 private observeBreakpointChanges(): void {\n this.appShell.getState<any>('breakpoints')\n .pipe(\n map(bp => !!(bp?.isMobile || bp?.isTablet || bp?.isLtLargeTablet)), // xs/sm/md/lg (< 1140px)\n distinctUntilChanged(),\n takeUntil(this.destroy$),\n )\n .subscribe((isMobile) => {\n this.isMobileBreakpoint = isMobile;\n });\n }\n}\n",
|
|
65932
65625
|
"assetsDirs": [],
|
|
65933
65626
|
"styleUrlsData": "",
|
|
65934
65627
|
"stylesData": "",
|
|
65935
65628
|
"jsdoctags": [
|
|
65936
65629
|
{
|
|
65937
|
-
"pos":
|
|
65938
|
-
"end":
|
|
65630
|
+
"pos": 1316,
|
|
65631
|
+
"end": 1415,
|
|
65939
65632
|
"kind": 321,
|
|
65940
65633
|
"id": 0,
|
|
65941
65634
|
"flags": 16777216,
|
|
@@ -65950,7 +65643,7 @@
|
|
|
65950
65643
|
"deprecated": false,
|
|
65951
65644
|
"deprecationMessage": "",
|
|
65952
65645
|
"args": [],
|
|
65953
|
-
"line":
|
|
65646
|
+
"line": 176,
|
|
65954
65647
|
"rawdescription": "\n"
|
|
65955
65648
|
},
|
|
65956
65649
|
"extends": [
|
|
@@ -65968,7 +65661,7 @@
|
|
|
65968
65661
|
"name": "cssClasses",
|
|
65969
65662
|
"type": "string",
|
|
65970
65663
|
"returnType": "string",
|
|
65971
|
-
"line":
|
|
65664
|
+
"line": 104,
|
|
65972
65665
|
"rawdescription": "\n\nThe default role of the item is 'listitem' and should not be changed.\n",
|
|
65973
65666
|
"description": "<p>The default role of the item is 'listitem' and should not be changed.</p>\n"
|
|
65974
65667
|
}
|
|
@@ -65979,7 +65672,7 @@
|
|
|
65979
65672
|
"name": "hasEclChildrenDataAttribute",
|
|
65980
65673
|
"type": "boolean",
|
|
65981
65674
|
"returnType": "boolean",
|
|
65982
|
-
"line":
|
|
65675
|
+
"line": 141,
|
|
65983
65676
|
"rawdescription": "\n",
|
|
65984
65677
|
"description": ""
|
|
65985
65678
|
}
|
|
@@ -65990,7 +65683,7 @@
|
|
|
65990
65683
|
"name": "isDataExpanded",
|
|
65991
65684
|
"type": "boolean",
|
|
65992
65685
|
"returnType": "boolean",
|
|
65993
|
-
"line":
|
|
65686
|
+
"line": 145,
|
|
65994
65687
|
"rawdescription": "\n",
|
|
65995
65688
|
"description": ""
|
|
65996
65689
|
}
|
|
@@ -65999,11 +65692,22 @@
|
|
|
65999
65692
|
"name": "ariaCurrent",
|
|
66000
65693
|
"getSignature": {
|
|
66001
65694
|
"name": "ariaCurrent",
|
|
65695
|
+
"type": "unknown",
|
|
65696
|
+
"returnType": "string | null",
|
|
65697
|
+
"line": 155,
|
|
65698
|
+
"rawdescription": "\n\n'aria-current' is set to 'page' only when this item itself is the current page, and not when it is\nmarked current merely because one of its children is the active item (in that case the child link\ncarries 'aria-current=\"page\"'). Derived from live state so it stays correct whether 'isCurrent' is set\nat render time or updated on selection.\n",
|
|
65699
|
+
"description": "<p>'aria-current' is set to 'page' only when this item itself is the current page, and not when it is\nmarked current merely because one of its children is the active item (in that case the child link\ncarries 'aria-current="page"'). Derived from live state so it stays correct whether 'isCurrent' is set\nat render time or updated on selection.</p>\n"
|
|
65700
|
+
}
|
|
65701
|
+
},
|
|
65702
|
+
"hasCurrentChild": {
|
|
65703
|
+
"name": "hasCurrentChild",
|
|
65704
|
+
"getSignature": {
|
|
65705
|
+
"name": "hasCurrentChild",
|
|
66002
65706
|
"type": "boolean",
|
|
66003
65707
|
"returnType": "boolean",
|
|
66004
|
-
"line":
|
|
66005
|
-
"rawdescription": "\n",
|
|
66006
|
-
"description": ""
|
|
65708
|
+
"line": 162,
|
|
65709
|
+
"rawdescription": "\n\nWhether any child (sub-item) is the current item.\n",
|
|
65710
|
+
"description": "<p>Whether any child (sub-item) is the current item.</p>\n"
|
|
66007
65711
|
}
|
|
66008
65712
|
},
|
|
66009
65713
|
"hasChildren": {
|
|
@@ -66012,7 +65716,7 @@
|
|
|
66012
65716
|
"name": "hasChildren",
|
|
66013
65717
|
"type": "boolean",
|
|
66014
65718
|
"returnType": "boolean",
|
|
66015
|
-
"line":
|
|
65719
|
+
"line": 166,
|
|
66016
65720
|
"rawdescription": "\n",
|
|
66017
65721
|
"description": ""
|
|
66018
65722
|
}
|
|
@@ -66023,7 +65727,7 @@
|
|
|
66023
65727
|
"name": "children",
|
|
66024
65728
|
"type": "[]",
|
|
66025
65729
|
"returnType": "EclMenuItem[]",
|
|
66026
|
-
"line":
|
|
65730
|
+
"line": 170,
|
|
66027
65731
|
"rawdescription": "\n",
|
|
66028
65732
|
"description": ""
|
|
66029
65733
|
}
|
|
@@ -82815,7 +82519,7 @@
|
|
|
82815
82519
|
}
|
|
82816
82520
|
]
|
|
82817
82521
|
},
|
|
82818
|
-
"templateData": "<div class=\"ecl-site-footer__section ecl-site-footer__section--common\">\n @if (!isCore()) {\n <a href=\"https://commission.europa.eu/index_{{languageCode()}}\"\n class=\"ecl-link ecl-link--standalone ecl-link--inverted ecl-site-footer__logo-link\">\n <picture class=\"ecl-picture ecl-site-footer__picture\"><img class=\"ecl-site-footer__logo-image\"\n src=\"assets/images/ecl/logo/ec/negative/logo-ec--{{logoLanguageCode}}.svg\" alt=\"European Commission\">\n </picture>\n </a>\n <div class=\"ecl-site-footer__extra-links-container\">\n <ecl-social-media-follow description=\"{{'ecl.footer.FOLLOW-EUROPEAN-COMMISSION' | translate}}\"\n class=\"ecl-social-media-follow--description_inline ecl-site-footer__social-media\">\n <ecl-social-media-follow-item icon=\"mastodon\" href=\"https://ec.social-network.europa.eu/@EUCommission\"\n isInverted
|
|
82522
|
+
"templateData": "<div class=\"ecl-site-footer__section ecl-site-footer__section--common\">\n @if (!isCore()) {\n <a href=\"https://commission.europa.eu/index_{{languageCode()}}\"\n class=\"ecl-link ecl-link--standalone ecl-link--inverted ecl-site-footer__logo-link\">\n <picture class=\"ecl-picture ecl-site-footer__picture\"><img class=\"ecl-site-footer__logo-image\"\n src=\"assets/images/ecl/logo/ec/negative/logo-ec--{{logoLanguageCode}}.svg\" alt=\"European Commission\">\n </picture>\n </a>\n <div class=\"ecl-site-footer__extra-links-container\">\n <ecl-social-media-follow isIconOnly description=\"{{'ecl.footer.FOLLOW-EUROPEAN-COMMISSION' | translate}}\"\n class=\"ecl-social-media-follow--description_inline ecl-site-footer__social-media\">\n <ecl-social-media-follow-item icon=\"mastodon\" href=\"https://ec.social-network.europa.eu/@EUCommission\"\n isInverted>Mastodon</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"linkedin\" href=\"https://www.linkedin.com/company/european-commission\"\n isInverted>LinkedIn</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"bluesky\" href=\"https://bsky.app/profile/ec.europa.eu\"\n isInverted>Bluesky</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"facebook\" href=\"https://www.facebook.com/EuropeanCommission\"\n isInverted>Facebook</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"youtube\" href=\"https://www.youtube.com/user/eutube\"\n isInverted>YouTube</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"chain\"\n href=\"https://european-union.europa.eu/contact-eu/social-media-channels_{{languageCode()}}\"\n isInverted>Other</ecl-social-media-follow-item>\n </ecl-social-media-follow>\n <ul eclSiteFooterList isInline>\n <li eclSiteFooterListItem><a\n href=\"https://commission.europa.eu/about-european-commission/contact_{{languageCode()}}\"\n class=\"ecl-link ecl-link--standalone ecl-link--inverted ecl-site-footer__link\">{{ 'ecl.footer.CONTACT' | translate }}</a></li>\n </ul>\n </div>\n } @else {\n <ecl-social-media-follow isIconOnly description=\"{{'ecl.footer.FOLLOW-US' | translate}}\"\n class=\"ecl-social-media-follow--description_inline ecl-site-footer__social-media\">\n <ecl-social-media-follow-item icon=\"mastodon\" href=\"https://ec.social-network.europa.eu/@EUCommission\"\n isInverted>Mastodon</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"linkedin\" href=\"https://www.linkedin.com/company/european-commission\"\n isInverted>LinkedIn</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"bluesky\" href=\"https://bsky.app/profile/ec.europa.eu\"\n isInverted>Bluesky</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"facebook\" href=\"https://www.facebook.com/EuropeanCommission\"\n isInverted>Facebook</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"youtube\" href=\"https://www.youtube.com/user/eutube\"\n isInverted>YouTube</ecl-social-media-follow-item>\n <ecl-social-media-follow-item icon=\"chain\"\n href=\"https://european-union.europa.eu/contact-eu/social-media-channels_{{languageCode()}}\"\n isInverted>Other</ecl-social-media-follow-item>\n </ecl-social-media-follow>\n }\n <ul eclSiteFooterList isInline>\n <li eclSiteFooterListItem><a\n href=\"https://commission.europa.eu/legal-notice/vulnerability-disclosure-policy_{{languageCode()}}\"\n eclLink isInverted variant=\"standalone\" eclSiteFooterLink>{{ 'ecl.footer.REPORT-IT-VULNERABILITY' | translate }}</a></li>\n <li eclSiteFooterListItem><a href=\"https://commission.europa.eu/languages-our-websites_{{languageCode()}}\" eclLink\n isInverted variant=\"standalone\" eclSiteFooterLink>{{ 'ecl.footer.LANGUAGES' | translate }}</a></li>\n <li eclSiteFooterListItem><a href=\"https://commission.europa.eu/cookies_{{languageCode()}}\" eclLink isInverted\n variant=\"standalone\" eclSiteFooterLink>{{ 'ecl.footer.COOKIES' | translate }}</a></li>\n <li eclSiteFooterListItem><a href=\"https://commission.europa.eu/privacy-policy_{{languageCode()}}\" eclLink\n isInverted variant=\"standalone\" eclSiteFooterLink>{{ 'ecl.footer.PRIVACY-POLICY' | translate }}</a></li>\n <li eclSiteFooterListItem><a href=\"https://commission.europa.eu/legal-notice_{{languageCode()}}\" eclLink\n isInverted variant=\"standalone\" eclSiteFooterLink>{{ 'ecl.footer.LEGAL-NOTICE' | translate }}</a></li>\n <li eclSiteFooterListItem><a href=\"{{ a11yStatementRef() }}\"\n eclLink isInverted variant=\"standalone\" eclSiteFooterLink>{{ 'ecl.footer.ACCESSIBILITY' | translate }}</a></li>\n </ul>\n</div>\n"
|
|
82819
82523
|
},
|
|
82820
82524
|
{
|
|
82821
82525
|
"name": "EclSiteHeaderActionComponent",
|
|
@@ -84430,10 +84134,11 @@
|
|
|
84430
84134
|
},
|
|
84431
84135
|
{
|
|
84432
84136
|
"name": "EclSiteHeaderLanguageComponent",
|
|
84433
|
-
"id": "component-EclSiteHeaderLanguageComponent-
|
|
84137
|
+
"id": "component-EclSiteHeaderLanguageComponent-6d5a8dabfc452efabf51524b958206330b0e8d969c92a72ff623dbe1b45bee987ed4a81174ab72b108458c5b8639f088adba2c57c6cb65b7ccf06266d617d7e0",
|
|
84434
84138
|
"file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts",
|
|
84435
84139
|
"encapsulation": [],
|
|
84436
84140
|
"entryComponents": [],
|
|
84141
|
+
"host": {},
|
|
84437
84142
|
"inputs": [],
|
|
84438
84143
|
"outputs": [],
|
|
84439
84144
|
"providers": [],
|
|
@@ -84510,7 +84215,7 @@
|
|
|
84510
84215
|
"deprecationMessage": "",
|
|
84511
84216
|
"rawdescription": "\n\nThie event is emited, when language link, showing the current language is clicked.\n",
|
|
84512
84217
|
"description": "<p>Thie event is emited, when language link, showing the current language is clicked.</p>\n",
|
|
84513
|
-
"line":
|
|
84218
|
+
"line": 62,
|
|
84514
84219
|
"type": "EventEmitter"
|
|
84515
84220
|
},
|
|
84516
84221
|
{
|
|
@@ -84521,7 +84226,7 @@
|
|
|
84521
84226
|
"deprecationMessage": "",
|
|
84522
84227
|
"rawdescription": "\n\nThie event is emited, when user selects a new language from the dropdown.\n",
|
|
84523
84228
|
"description": "<p>Thie event is emited, when user selects a new language from the dropdown.</p>\n",
|
|
84524
|
-
"line":
|
|
84229
|
+
"line": 66,
|
|
84525
84230
|
"type": "EventEmitter"
|
|
84526
84231
|
}
|
|
84527
84232
|
],
|
|
@@ -84536,7 +84241,7 @@
|
|
|
84536
84241
|
"indexKey": "",
|
|
84537
84242
|
"optional": false,
|
|
84538
84243
|
"description": "",
|
|
84539
|
-
"line":
|
|
84244
|
+
"line": 56,
|
|
84540
84245
|
"rawdescription": "\n",
|
|
84541
84246
|
"modifierKind": [
|
|
84542
84247
|
124
|
|
@@ -84552,7 +84257,7 @@
|
|
|
84552
84257
|
"indexKey": "",
|
|
84553
84258
|
"optional": false,
|
|
84554
84259
|
"description": "",
|
|
84555
|
-
"line":
|
|
84260
|
+
"line": 55,
|
|
84556
84261
|
"rawdescription": "\n",
|
|
84557
84262
|
"modifierKind": [
|
|
84558
84263
|
124
|
|
@@ -84568,7 +84273,7 @@
|
|
|
84568
84273
|
"indexKey": "",
|
|
84569
84274
|
"optional": false,
|
|
84570
84275
|
"description": "",
|
|
84571
|
-
"line":
|
|
84276
|
+
"line": 100,
|
|
84572
84277
|
"rawdescription": "\n"
|
|
84573
84278
|
},
|
|
84574
84279
|
{
|
|
@@ -84581,7 +84286,7 @@
|
|
|
84581
84286
|
"indexKey": "",
|
|
84582
84287
|
"optional": false,
|
|
84583
84288
|
"description": "<p>Array of EU languages, that can be selected for the current site.</p>\n",
|
|
84584
|
-
"line":
|
|
84289
|
+
"line": 95,
|
|
84585
84290
|
"rawdescription": "\n\nArray of EU languages, that can be selected for the current site.\n"
|
|
84586
84291
|
},
|
|
84587
84292
|
{
|
|
@@ -84594,7 +84299,7 @@
|
|
|
84594
84299
|
"indexKey": "",
|
|
84595
84300
|
"optional": false,
|
|
84596
84301
|
"description": "",
|
|
84597
|
-
"line":
|
|
84302
|
+
"line": 57,
|
|
84598
84303
|
"rawdescription": "\n",
|
|
84599
84304
|
"modifierKind": [
|
|
84600
84305
|
124
|
|
@@ -84609,7 +84314,7 @@
|
|
|
84609
84314
|
"indexKey": "",
|
|
84610
84315
|
"optional": false,
|
|
84611
84316
|
"description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
|
|
84612
|
-
"line":
|
|
84317
|
+
"line": 84,
|
|
84613
84318
|
"rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
|
|
84614
84319
|
},
|
|
84615
84320
|
{
|
|
@@ -84622,7 +84327,7 @@
|
|
|
84622
84327
|
"indexKey": "",
|
|
84623
84328
|
"optional": false,
|
|
84624
84329
|
"description": "",
|
|
84625
|
-
"line":
|
|
84330
|
+
"line": 68,
|
|
84626
84331
|
"rawdescription": "\n"
|
|
84627
84332
|
},
|
|
84628
84333
|
{
|
|
@@ -84634,7 +84339,7 @@
|
|
|
84634
84339
|
"indexKey": "",
|
|
84635
84340
|
"optional": false,
|
|
84636
84341
|
"description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
|
|
84637
|
-
"line":
|
|
84342
|
+
"line": 76,
|
|
84638
84343
|
"rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
|
|
84639
84344
|
},
|
|
84640
84345
|
{
|
|
@@ -84646,7 +84351,7 @@
|
|
|
84646
84351
|
"indexKey": "",
|
|
84647
84352
|
"optional": false,
|
|
84648
84353
|
"description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
|
|
84649
|
-
"line":
|
|
84354
|
+
"line": 72,
|
|
84650
84355
|
"rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
|
|
84651
84356
|
},
|
|
84652
84357
|
{
|
|
@@ -84658,25 +84363,9 @@
|
|
|
84658
84363
|
"indexKey": "",
|
|
84659
84364
|
"optional": false,
|
|
84660
84365
|
"description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
|
|
84661
|
-
"line":
|
|
84366
|
+
"line": 80,
|
|
84662
84367
|
"rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
|
|
84663
84368
|
},
|
|
84664
|
-
{
|
|
84665
|
-
"name": "LANGUAGE_MAX_COLUMNS",
|
|
84666
|
-
"coverageIgnore": false,
|
|
84667
|
-
"defaultValue": "8",
|
|
84668
|
-
"deprecated": false,
|
|
84669
|
-
"deprecationMessage": "",
|
|
84670
|
-
"type": "number",
|
|
84671
|
-
"indexKey": "",
|
|
84672
|
-
"optional": false,
|
|
84673
|
-
"description": "",
|
|
84674
|
-
"line": 73,
|
|
84675
|
-
"rawdescription": "\n",
|
|
84676
|
-
"modifierKind": [
|
|
84677
|
-
148
|
|
84678
|
-
]
|
|
84679
|
-
},
|
|
84680
84369
|
{
|
|
84681
84370
|
"name": "languageArrowPosition",
|
|
84682
84371
|
"coverageIgnore": false,
|
|
@@ -84686,7 +84375,7 @@
|
|
|
84686
84375
|
"indexKey": "",
|
|
84687
84376
|
"optional": false,
|
|
84688
84377
|
"description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
|
|
84689
|
-
"line":
|
|
84378
|
+
"line": 88,
|
|
84690
84379
|
"rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
|
|
84691
84380
|
},
|
|
84692
84381
|
{
|
|
@@ -84699,41 +84388,9 @@
|
|
|
84699
84388
|
"indexKey": "",
|
|
84700
84389
|
"optional": false,
|
|
84701
84390
|
"description": "",
|
|
84702
|
-
"line":
|
|
84391
|
+
"line": 89,
|
|
84703
84392
|
"rawdescription": "\n"
|
|
84704
84393
|
},
|
|
84705
|
-
{
|
|
84706
|
-
"name": "languageLinkElement",
|
|
84707
|
-
"coverageIgnore": false,
|
|
84708
|
-
"defaultValue": "viewChild('languageLink', { read: ElementRef })",
|
|
84709
|
-
"deprecated": false,
|
|
84710
|
-
"deprecationMessage": "",
|
|
84711
|
-
"type": "unknown",
|
|
84712
|
-
"indexKey": "",
|
|
84713
|
-
"optional": false,
|
|
84714
|
-
"description": "<p>The link to open the popover dialog.</p>\n",
|
|
84715
|
-
"line": 61,
|
|
84716
|
-
"rawdescription": "\n\nThe link to open the popover dialog.\n",
|
|
84717
|
-
"modifierKind": [
|
|
84718
|
-
148
|
|
84719
|
-
]
|
|
84720
|
-
},
|
|
84721
|
-
{
|
|
84722
|
-
"name": "languagePopover",
|
|
84723
|
-
"coverageIgnore": false,
|
|
84724
|
-
"defaultValue": "viewChild(EclSiteHeaderLanguagePopoverComponent)",
|
|
84725
|
-
"deprecated": false,
|
|
84726
|
-
"deprecationMessage": "",
|
|
84727
|
-
"type": "unknown",
|
|
84728
|
-
"indexKey": "",
|
|
84729
|
-
"optional": false,
|
|
84730
|
-
"description": "<p>The language popover, that shows all available languages (configured in the config file of the current site).</p>\n",
|
|
84731
|
-
"line": 57,
|
|
84732
|
-
"rawdescription": "\n\nThe language popover, that shows all available languages (configured in the config file of the current site).\n",
|
|
84733
|
-
"modifierKind": [
|
|
84734
|
-
148
|
|
84735
|
-
]
|
|
84736
|
-
},
|
|
84737
84394
|
{
|
|
84738
84395
|
"name": "leftPosition",
|
|
84739
84396
|
"coverageIgnore": false,
|
|
@@ -84743,25 +84400,9 @@
|
|
|
84743
84400
|
"indexKey": "",
|
|
84744
84401
|
"optional": false,
|
|
84745
84402
|
"description": "",
|
|
84746
|
-
"line":
|
|
84403
|
+
"line": 91,
|
|
84747
84404
|
"rawdescription": "\n"
|
|
84748
84405
|
},
|
|
84749
|
-
{
|
|
84750
|
-
"name": "MOBILE_BREAKPOINT",
|
|
84751
|
-
"coverageIgnore": false,
|
|
84752
|
-
"defaultValue": "768",
|
|
84753
|
-
"deprecated": false,
|
|
84754
|
-
"deprecationMessage": "",
|
|
84755
|
-
"type": "number",
|
|
84756
|
-
"indexKey": "",
|
|
84757
|
-
"optional": false,
|
|
84758
|
-
"description": "",
|
|
84759
|
-
"line": 72,
|
|
84760
|
-
"rawdescription": "\n",
|
|
84761
|
-
"modifierKind": [
|
|
84762
|
-
148
|
|
84763
|
-
]
|
|
84764
|
-
},
|
|
84765
84406
|
{
|
|
84766
84407
|
"name": "nonEuColumnsCount",
|
|
84767
84408
|
"coverageIgnore": false,
|
|
@@ -84772,7 +84413,7 @@
|
|
|
84772
84413
|
"indexKey": "",
|
|
84773
84414
|
"optional": false,
|
|
84774
84415
|
"description": "",
|
|
84775
|
-
"line":
|
|
84416
|
+
"line": 101,
|
|
84776
84417
|
"rawdescription": "\n"
|
|
84777
84418
|
},
|
|
84778
84419
|
{
|
|
@@ -84785,7 +84426,7 @@
|
|
|
84785
84426
|
"indexKey": "",
|
|
84786
84427
|
"optional": false,
|
|
84787
84428
|
"description": "<p>Array of non-EU languages, that can be selected for the current site.</p>\n",
|
|
84788
|
-
"line":
|
|
84429
|
+
"line": 99,
|
|
84789
84430
|
"rawdescription": "\n\nArray of non-EU languages, that can be selected for the current site.\n"
|
|
84790
84431
|
},
|
|
84791
84432
|
{
|
|
@@ -84797,7 +84438,7 @@
|
|
|
84797
84438
|
"indexKey": "",
|
|
84798
84439
|
"optional": false,
|
|
84799
84440
|
"description": "",
|
|
84800
|
-
"line":
|
|
84441
|
+
"line": 90,
|
|
84801
84442
|
"rawdescription": "\n"
|
|
84802
84443
|
}
|
|
84803
84444
|
],
|
|
@@ -84809,11 +84450,14 @@
|
|
|
84809
84450
|
"optional": false,
|
|
84810
84451
|
"returnType": "string",
|
|
84811
84452
|
"typeParameters": [],
|
|
84812
|
-
"line":
|
|
84453
|
+
"line": 145,
|
|
84813
84454
|
"deprecated": false,
|
|
84814
84455
|
"deprecationMessage": "",
|
|
84815
84456
|
"rawdescription": "\n",
|
|
84816
|
-
"description": ""
|
|
84457
|
+
"description": "",
|
|
84458
|
+
"modifierKind": [
|
|
84459
|
+
124
|
|
84460
|
+
]
|
|
84817
84461
|
},
|
|
84818
84462
|
{
|
|
84819
84463
|
"name": "hasLanguageCodes",
|
|
@@ -84822,14 +84466,11 @@
|
|
|
84822
84466
|
"optional": false,
|
|
84823
84467
|
"returnType": "boolean",
|
|
84824
84468
|
"typeParameters": [],
|
|
84825
|
-
"line":
|
|
84469
|
+
"line": 196,
|
|
84826
84470
|
"deprecated": false,
|
|
84827
84471
|
"deprecationMessage": "",
|
|
84828
84472
|
"rawdescription": "\n",
|
|
84829
|
-
"description": ""
|
|
84830
|
-
"modifierKind": [
|
|
84831
|
-
125
|
|
84832
|
-
]
|
|
84473
|
+
"description": ""
|
|
84833
84474
|
},
|
|
84834
84475
|
{
|
|
84835
84476
|
"name": "ngAfterViewInit",
|
|
@@ -84838,11 +84479,11 @@
|
|
|
84838
84479
|
"optional": false,
|
|
84839
84480
|
"returnType": "void",
|
|
84840
84481
|
"typeParameters": [],
|
|
84841
|
-
"line":
|
|
84482
|
+
"line": 135,
|
|
84842
84483
|
"deprecated": false,
|
|
84843
84484
|
"deprecationMessage": "",
|
|
84844
|
-
"rawdescription": "\n\nAfter view is initialized ->
|
|
84845
|
-
"description": "<p>After view is initialized ->
|
|
84485
|
+
"rawdescription": "\n\nAfter view is initialized -> set up resize repositioning and initialize languages, that are configured in the config file\n of the current site.\n",
|
|
84486
|
+
"description": "<p>After view is initialized -> set up resize repositioning and initialize languages, that are configured in the config file\n of the current site.</p>\n"
|
|
84846
84487
|
},
|
|
84847
84488
|
{
|
|
84848
84489
|
"name": "ngOnDestroy",
|
|
@@ -84851,7 +84492,7 @@
|
|
|
84851
84492
|
"optional": false,
|
|
84852
84493
|
"returnType": "void",
|
|
84853
84494
|
"typeParameters": [],
|
|
84854
|
-
"line":
|
|
84495
|
+
"line": 140,
|
|
84855
84496
|
"deprecated": false,
|
|
84856
84497
|
"deprecationMessage": "",
|
|
84857
84498
|
"rawdescription": "\n",
|
|
@@ -84864,7 +84505,7 @@
|
|
|
84864
84505
|
"optional": false,
|
|
84865
84506
|
"returnType": "void",
|
|
84866
84507
|
"typeParameters": [],
|
|
84867
|
-
"line":
|
|
84508
|
+
"line": 127,
|
|
84868
84509
|
"deprecated": false,
|
|
84869
84510
|
"deprecationMessage": "",
|
|
84870
84511
|
"rawdescription": "\n",
|
|
@@ -84877,19 +84518,13 @@
|
|
|
84877
84518
|
"optional": false,
|
|
84878
84519
|
"returnType": "void",
|
|
84879
84520
|
"typeParameters": [],
|
|
84880
|
-
"line":
|
|
84521
|
+
"line": 185,
|
|
84881
84522
|
"deprecated": false,
|
|
84882
84523
|
"deprecationMessage": "",
|
|
84883
84524
|
"rawdescription": "\n\nClose the dropdown, when clicking outside of the component.\n",
|
|
84884
84525
|
"description": "<p>Close the dropdown, when clicking outside of the component.</p>\n",
|
|
84885
|
-
"decorators": [
|
|
84886
|
-
{
|
|
84887
|
-
"name": "HostListener",
|
|
84888
|
-
"stringifiedArguments": "'eclClickOutside'"
|
|
84889
|
-
}
|
|
84890
|
-
],
|
|
84891
84526
|
"modifierKind": [
|
|
84892
|
-
|
|
84527
|
+
124
|
|
84893
84528
|
]
|
|
84894
84529
|
},
|
|
84895
84530
|
{
|
|
@@ -84899,19 +84534,13 @@
|
|
|
84899
84534
|
"optional": false,
|
|
84900
84535
|
"returnType": "void",
|
|
84901
84536
|
"typeParameters": [],
|
|
84902
|
-
"line":
|
|
84537
|
+
"line": 192,
|
|
84903
84538
|
"deprecated": false,
|
|
84904
84539
|
"deprecationMessage": "",
|
|
84905
84540
|
"rawdescription": "\n\nClose the dropdown, when pressing ESC key.\n",
|
|
84906
84541
|
"description": "<p>Close the dropdown, when pressing ESC key.</p>\n",
|
|
84907
|
-
"decorators": [
|
|
84908
|
-
{
|
|
84909
|
-
"name": "HostListener",
|
|
84910
|
-
"stringifiedArguments": "'document:keydown.escape'"
|
|
84911
|
-
}
|
|
84912
|
-
],
|
|
84913
84542
|
"modifierKind": [
|
|
84914
|
-
|
|
84543
|
+
124
|
|
84915
84544
|
]
|
|
84916
84545
|
},
|
|
84917
84546
|
{
|
|
@@ -84930,16 +84559,19 @@
|
|
|
84930
84559
|
"optional": false,
|
|
84931
84560
|
"returnType": "void",
|
|
84932
84561
|
"typeParameters": [],
|
|
84933
|
-
"line":
|
|
84562
|
+
"line": 153,
|
|
84934
84563
|
"deprecated": false,
|
|
84935
84564
|
"deprecationMessage": "",
|
|
84936
84565
|
"rawdescription": "\n\nToggle the language dropdown when clicking the link, showing the current language.\n",
|
|
84937
84566
|
"description": "<p>Toggle the language dropdown when clicking the link, showing the current language.</p>\n",
|
|
84567
|
+
"modifierKind": [
|
|
84568
|
+
124
|
|
84569
|
+
],
|
|
84938
84570
|
"jsdoctags": [
|
|
84939
84571
|
{
|
|
84940
84572
|
"name": {
|
|
84941
|
-
"pos":
|
|
84942
|
-
"end":
|
|
84573
|
+
"pos": 5258,
|
|
84574
|
+
"end": 5261,
|
|
84943
84575
|
"kind": 80,
|
|
84944
84576
|
"id": 0,
|
|
84945
84577
|
"flags": 16842752,
|
|
@@ -84952,8 +84584,8 @@
|
|
|
84952
84584
|
"deprecated": false,
|
|
84953
84585
|
"deprecationMessage": "",
|
|
84954
84586
|
"tagName": {
|
|
84955
|
-
"pos":
|
|
84956
|
-
"end":
|
|
84587
|
+
"pos": 5252,
|
|
84588
|
+
"end": 5257,
|
|
84957
84589
|
"kind": 80,
|
|
84958
84590
|
"id": 0,
|
|
84959
84591
|
"flags": 16842752,
|
|
@@ -84980,11 +84612,14 @@
|
|
|
84980
84612
|
"optional": false,
|
|
84981
84613
|
"returnType": "void",
|
|
84982
84614
|
"typeParameters": [],
|
|
84983
|
-
"line":
|
|
84615
|
+
"line": 171,
|
|
84984
84616
|
"deprecated": false,
|
|
84985
84617
|
"deprecationMessage": "",
|
|
84986
84618
|
"rawdescription": "\n",
|
|
84987
84619
|
"description": "",
|
|
84620
|
+
"modifierKind": [
|
|
84621
|
+
124
|
|
84622
|
+
],
|
|
84988
84623
|
"jsdoctags": [
|
|
84989
84624
|
{
|
|
84990
84625
|
"name": "evt",
|
|
@@ -85015,11 +84650,14 @@
|
|
|
85015
84650
|
"optional": false,
|
|
85016
84651
|
"returnType": "void",
|
|
85017
84652
|
"typeParameters": [],
|
|
85018
|
-
"line":
|
|
84653
|
+
"line": 175,
|
|
85019
84654
|
"deprecated": false,
|
|
85020
84655
|
"deprecationMessage": "",
|
|
85021
84656
|
"rawdescription": "\n",
|
|
85022
84657
|
"description": "",
|
|
84658
|
+
"modifierKind": [
|
|
84659
|
+
124
|
|
84660
|
+
],
|
|
85023
84661
|
"jsdoctags": [
|
|
85024
84662
|
{
|
|
85025
84663
|
"name": "evt",
|
|
@@ -85076,44 +84714,8 @@
|
|
|
85076
84714
|
"coverageIgnore": false,
|
|
85077
84715
|
"deprecated": false,
|
|
85078
84716
|
"deprecationMessage": "",
|
|
85079
|
-
"hostBindings": [
|
|
85080
|
-
|
|
85081
|
-
"coverageIgnore": false,
|
|
85082
|
-
"name": "class",
|
|
85083
|
-
"actualName": "cssClasses",
|
|
85084
|
-
"deprecated": false,
|
|
85085
|
-
"deprecationMessage": "",
|
|
85086
|
-
"rawdescription": "\n",
|
|
85087
|
-
"description": "",
|
|
85088
|
-
"line": 118,
|
|
85089
|
-
"type": "string",
|
|
85090
|
-
"decorators": []
|
|
85091
|
-
}
|
|
85092
|
-
],
|
|
85093
|
-
"hostListeners": [
|
|
85094
|
-
{
|
|
85095
|
-
"coverageIgnore": false,
|
|
85096
|
-
"name": "document:keydown.escape",
|
|
85097
|
-
"args": [],
|
|
85098
|
-
"argsDecorator": [],
|
|
85099
|
-
"deprecated": false,
|
|
85100
|
-
"deprecationMessage": "",
|
|
85101
|
-
"rawdescription": "\n\nClose the dropdown, when pressing ESC key.\n",
|
|
85102
|
-
"description": "<p>Close the dropdown, when pressing ESC key.</p>\n",
|
|
85103
|
-
"line": 196
|
|
85104
|
-
},
|
|
85105
|
-
{
|
|
85106
|
-
"coverageIgnore": false,
|
|
85107
|
-
"name": "eclClickOutside",
|
|
85108
|
-
"args": [],
|
|
85109
|
-
"argsDecorator": [],
|
|
85110
|
-
"deprecated": false,
|
|
85111
|
-
"deprecationMessage": "",
|
|
85112
|
-
"rawdescription": "\n\nClose the dropdown, when clicking outside of the component.\n",
|
|
85113
|
-
"description": "<p>Close the dropdown, when clicking outside of the component.</p>\n",
|
|
85114
|
-
"line": 188
|
|
85115
|
-
}
|
|
85116
|
-
],
|
|
84717
|
+
"hostBindings": [],
|
|
84718
|
+
"hostListeners": [],
|
|
85117
84719
|
"standalone": false,
|
|
85118
84720
|
"imports": [
|
|
85119
84721
|
{
|
|
@@ -85139,14 +84741,14 @@
|
|
|
85139
84741
|
"description": "<p>This component is used to switch between the languages of the application. Shows the current language, when clicked,\n opens a language selector.</p>\n",
|
|
85140
84742
|
"rawdescription": "\n\nThis component is used to switch between the languages of the application. Shows the current language, when clicked,\n opens a language selector.\n",
|
|
85141
84743
|
"type": "component",
|
|
85142
|
-
"sourceCode": "import {\n AfterViewInit,\n Component,\n DOCUMENT,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n inject,\n OnDestroy,\n OnInit,\n Output,\n viewChild,\n} from '@angular/core';\nimport { UpperCasePipe } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EuiEuLanguages, GLOBAL_CONFIG_TOKEN, GlobalConfig, I18nService } from '@eui/core';\nimport { EuiLanguage } from '@eui/base';\nimport { ECLBaseDirective, ECLClickOutsideDirective, EclRtlService, EclThemeService } from '@eui/ecl/core';\nimport { Subject, takeUntil } from 'rxjs';\nimport { EclSiteHeaderLanguageClickEvent, EclSiteHeaderLanguageCloseEvent, EclSiteHeaderLanguageSelectedEvent } from '../events';\nimport { EclSiteHeaderLanguagePopoverComponent } from './ecl-site-header-language-popover.component';\nimport { EclAreaDataService } from '../services/ecl-area-data.service';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/**\n * This component is used to switch between the languages of the application. Shows the current language, when clicked,\n * opens a language selector.\n */\n@Component({\n selector: 'ecl-site-header-language',\n templateUrl: './ecl-site-header-language.component.html',\n imports: [A11yModule, TranslatePipe, UpperCasePipe, ...EUI_ECL_ICON, EclSiteHeaderLanguagePopoverComponent],\n hostDirectives: [\n {\n directive: ECLClickOutsideDirective,\n outputs: ['eclClickOutside'],\n },\n ],\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclSiteHeaderLanguageComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy {\n protected eclThemeService = inject(EclThemeService);\n protected config = inject<GlobalConfig>(GLOBAL_CONFIG_TOKEN, { optional: true });\n protected i18nService = inject(I18nService);\n\n /**\n * The language popover, that shows all available languages (configured in the config file of the current site).\n */\n readonly languagePopover = viewChild(EclSiteHeaderLanguagePopoverComponent);\n /**\n * The link to open the popover dialog.\n */\n readonly languageLinkElement = viewChild('languageLink', { read: ElementRef });\n\n /**\n * Thie event is emited, when language link, showing the current language is clicked.\n */\n @Output() languageClick = new EventEmitter<EclSiteHeaderLanguageClickEvent>();\n /**\n * Thie event is emited, when user selects a new language from the dropdown.\n */\n @Output() languageSelected = new EventEmitter<EclSiteHeaderLanguageSelectedEvent>();\n\n readonly MOBILE_BREAKPOINT = 768;\n readonly LANGUAGE_MAX_COLUMNS = 8;\n isLanguagesDropdownVisible = false;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n isPushRight: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n isPushLeft: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n isStack: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n isFull: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n languageArrowPosition: string;\n languageCode = 'en';\n rightPosition: number;\n leftPosition: number;\n /**\n * Array of EU languages, that can be selected for the current site.\n */\n euLanguages: EuiLanguage[] = [];\n /**\n * Array of non-EU languages, that can be selected for the current site.\n */\n nonEuLanguages: EuiLanguage[] = [];\n euColumnsCount = 1;\n nonEuColumnsCount = 1;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private _languages: EuiLanguage[] = [];\n private parentHeaderWidth: number;\n private isRtl = false;\n private eclAreaDataService = inject(EclAreaDataService);\n private eclRtlService = inject(EclRtlService);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView; // Window | null\n\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-site-header__language')].join(' ').trim();\n }\n\n ngOnInit(): void {\n this.handleRtlChangeState();\n }\n\n /**\n * After view is initialized -> calculate popover position and initialize languages, that are configured in the config file\n * of the current site.\n */\n ngAfterViewInit(): void {\n this.eclAreaDataService.dataSubject$.pipe(takeUntil(this.destroy$)).subscribe(\n parentHeaderRect => {\n this.calculatePopoverPosition(parentHeaderRect.right, parentHeaderRect.left);\n });\n this.handleInitialConfiguredLanguages();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n getLanguageLabel(): string {\n return `${EuiEuLanguages.getLanguageByCode(this.languageCode)?.label} - ${this.languageCode.toUpperCase()}`;\n }\n\n /**\n * Toggle the language dropdown when clicking the link, showing the current language.\n * @param evt\n */\n onLanguageClick(evt: Event): void {\n this.isLanguagesDropdownVisible = !this.isLanguagesDropdownVisible;\n if( !this.isLanguagesDropdownVisible ) {\n setTimeout(() => {\n this.isFull = false;\n this.isStack = false;\n this.isPushRight = false;\n this.rightPosition = undefined;\n this.leftPosition = undefined;\n this.languageArrowPosition = undefined;\n });\n }\n\n // If the dropdown is visible, we set the max-height of the dropdown, so that it can be scrolled.\n if (this.isLanguagesDropdownVisible) {\n setTimeout(() => this.languagePopover().setLanguageContentMaxHeight());\n }\n this.languageClick.next(new EclSiteHeaderLanguageClickEvent());\n\n evt.preventDefault();\n }\n\n onLanguageClosed(evt: EclSiteHeaderLanguageCloseEvent): void {\n this.isLanguagesDropdownVisible = false;\n }\n\n onLanguageSelected(evt: EclSiteHeaderLanguageSelectedEvent): void {\n this.languageCode = evt.language.code;\n this.updateCurrentLanguage(evt.language.code);\n this.isLanguagesDropdownVisible = false;\n this.languageSelected.next(new EclSiteHeaderLanguageSelectedEvent(evt.language));\n }\n\n /**\n * Close the dropdown, when clicking outside of the component.\n */\n @HostListener('eclClickOutside')\n onClickOutside(): void {\n this.isLanguagesDropdownVisible = false;\n }\n\n /**\n * Close the dropdown, when pressing ESC key.\n */\n @HostListener('document:keydown.escape')\n onEscapeKeydownHandler(): void {\n this.isLanguagesDropdownVisible = false;\n }\n\n public hasLanguageCodes(): boolean {\n return this._languages && this._languages.length > 0;\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 * Calculate the number of columns for EU and non-EU languages, depending on languages' count.\n */\n private updateLanguages(): void {\n\n this.euLanguages = this._languages.filter((item) => EuiEuLanguages.isEuLanguage(item.code));\n\n this.nonEuLanguages = this._languages.filter((item) => !EuiEuLanguages.isEuLanguage(item.code));\n\n this.euColumnsCount = Math.ceil(this.euLanguages.length / this.LANGUAGE_MAX_COLUMNS);\n\n this.nonEuColumnsCount = Math.ceil(this.nonEuLanguages.length / this.LANGUAGE_MAX_COLUMNS);\n }\n\n private calculatePopoverPosition( parentHeaderRight: number, parentHeaderLeft: number): void {\n setTimeout(() => {\n if (this.hasLanguageCodes()) {\n const arrowSize = '0.5rem';\n const linkRect = this.languageLinkElement().nativeElement.getBoundingClientRect();\n const popoverRect = this.languagePopover()?.el.nativeElement.getBoundingClientRect();\n const screenWidth = this.window.innerWidth;\n const vw = Math.max(document.documentElement.clientWidth || 0, this.window.innerWidth || 0);\n\n this.isFull = false;\n this.isStack = false;\n this.isPushRight = false;\n this.isPushLeft = false;\n this.rightPosition = undefined;\n this.leftPosition = undefined;\n this.languageArrowPosition = undefined;\n\n if (popoverRect?.width > this.parentHeaderWidth) {\n this.isStack = true;\n if (this.nonEuLanguages.length) {\n this.nonEuColumnsCount = Math.max(this.euColumnsCount, this.nonEuColumnsCount);\n }\n }\n if (this.isRtl && popoverRect?.left < 0) {\n const arrowPosition = linkRect.right - parentHeaderLeft - linkRect.width / 2;\n this.isPushLeft = true;\n this.leftPosition = -linkRect.left + parentHeaderLeft;\n this.languageArrowPosition = `${arrowPosition}px`;\n } else if (!this.isRtl && popoverRect?.right > screenWidth) {\n const arrowPosition = parentHeaderRight - linkRect.right + linkRect.width / 2;\n\n this.isPushRight = true;\n this.rightPosition = -parentHeaderRight + linkRect.right;\n this.languageArrowPosition = `calc(${arrowPosition}px - ${arrowSize})`;\n }\n\n if (vw < this.MOBILE_BREAKPOINT) {\n const arrowPosition = popoverRect?.right - linkRect.right + linkRect.width / 2;\n\n this.isFull = true;\n this.languageArrowPosition = `calc(${arrowPosition}px - ${arrowSize})`;\n }\n }\n });\n }\n\n private getConfiguredLanguages(): void {\n const languages: string[] = this.config?.i18n?.i18nService?.languages.map(lang => {\n return (typeof lang !== 'string') ? (lang as EuiLanguage).code : lang\n }) || [];\n this._languages = EuiEuLanguages.getAllLanguagesByCodes(languages);\n\n if (this.config?.i18n?.i18nService?.defaultLanguage) {\n this.languageCode = this.config?.i18n?.i18nService?.defaultLanguage;\n } else {\n if (this._languages && this._languages.length > 0) {\n this.languageCode = this._languages[0].code;\n }\n }\n }\n\n private updateCurrentLanguage(lang: string): void {\n this.i18nService.updateState({\n activeLang: lang,\n });\n }\n\n private handleInitialConfiguredLanguages(): void {\n setTimeout(() => {\n if (this._languages === undefined || this._languages.length === 0) {\n this.getConfiguredLanguages();\n }\n this.updateLanguages();\n });\n }\n}\n",
|
|
84744
|
+
"sourceCode": "import {\n AfterViewInit,\n Component,\n DOCUMENT,\n ElementRef,\n EventEmitter,\n inject,\n OnDestroy,\n OnInit,\n Output,\n viewChild,\n} from '@angular/core';\nimport { UpperCasePipe } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EuiEuLanguages, GLOBAL_CONFIG_TOKEN, GlobalConfig, I18nService } from '@eui/core';\nimport { EuiLanguage } from '@eui/base';\nimport { ECLBaseDirective, ECLClickOutsideDirective, EclRtlService, EclThemeService } from '@eui/ecl/core';\nimport { debounceTime, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { EclSiteHeaderLanguageClickEvent, EclSiteHeaderLanguageCloseEvent, EclSiteHeaderLanguageSelectedEvent } from '../events';\nimport { EclSiteHeaderLanguagePopoverComponent } from './ecl-site-header-language-popover.component';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/** Half the arrow's own width, matching ECL's `arrowSize`. */\nconst ARROW_SIZE = '0.5rem';\n\n/**\n * This component is used to switch between the languages of the application. Shows the current language, when clicked,\n * opens a language selector.\n */\n@Component({\n selector: 'ecl-site-header-language',\n templateUrl: './ecl-site-header-language.component.html',\n imports: [A11yModule, TranslatePipe, UpperCasePipe, ...EUI_ECL_ICON, EclSiteHeaderLanguagePopoverComponent],\n hostDirectives: [\n {\n directive: ECLClickOutsideDirective,\n outputs: ['eclClickOutside'],\n },\n ],\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n host: {\n '[class]': 'cssClasses',\n '(eclClickOutside)': 'onClickOutside()',\n '(document:keydown.escape)': 'onEscapeKeydownHandler()',\n },\n})\nexport class EclSiteHeaderLanguageComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy {\n protected eclThemeService = inject(EclThemeService);\n protected config = inject<GlobalConfig>(GLOBAL_CONFIG_TOKEN, { optional: true });\n protected i18nService = inject(I18nService);\n\n /**\n * Thie event is emited, when language link, showing the current language is clicked.\n */\n @Output() languageClick = new EventEmitter<EclSiteHeaderLanguageClickEvent>();\n /**\n * Thie event is emited, when user selects a new language from the dropdown.\n */\n @Output() languageSelected = new EventEmitter<EclSiteHeaderLanguageSelectedEvent>();\n\n isLanguagesDropdownVisible = false;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n isPushRight: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n isPushLeft: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n isStack: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n isFull: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n languageArrowPosition: string;\n languageCode = 'en';\n rightPosition: number;\n leftPosition: number;\n /**\n * Array of EU languages, that can be selected for the current site.\n */\n euLanguages: EuiLanguage[] = [];\n /**\n * Array of non-EU languages, that can be selected for the current site.\n */\n nonEuLanguages: EuiLanguage[] = [];\n euColumnsCount = 1;\n nonEuColumnsCount = 1;\n\n /**\n * The language popover, that shows all available languages (configured in the config file of the current site).\n */\n private readonly languagePopover = viewChild(EclSiteHeaderLanguagePopoverComponent);\n /**\n * The link to open the popover dialog.\n */\n private readonly languageLinkElement = viewChild('languageLink', { read: ElementRef });\n\n private readonly MOBILE_BREAKPOINT = 768;\n private readonly LANGUAGE_MAX_COLUMNS = 8;\n private readonly RESIZE_DEBOUNCE = 200;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private _languages: EuiLanguage[] = [];\n private isRtl = false;\n private readonly eclRtlService = inject(EclRtlService);\n private readonly el = inject(ElementRef);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView; // Window | null\n\n protected get cssClasses(): string {\n return [super.getCssClasses('ecl-site-header__language')].join(' ').trim();\n }\n\n ngOnInit(): void {\n this.handleRtlChangeState();\n }\n\n /**\n * After view is initialized -> set up resize repositioning and initialize languages, that are configured in the config file\n * of the current site.\n */\n ngAfterViewInit(): void {\n this.handleResize();\n this.handleInitialConfiguredLanguages();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n protected getLanguageLabel(): string {\n return `${EuiEuLanguages.getLanguageByCode(this.languageCode)?.label} - ${this.languageCode.toUpperCase()}`;\n }\n\n /**\n * Toggle the language dropdown when clicking the link, showing the current language.\n * @param evt\n */\n protected onLanguageClick(evt: Event): void {\n this.isLanguagesDropdownVisible = !this.isLanguagesDropdownVisible;\n if (!this.isLanguagesDropdownVisible) {\n setTimeout(() => this.resetPositioning());\n }\n\n // If the dropdown is visible, we set the max-height of the dropdown, so that it can be scrolled.\n if (this.isLanguagesDropdownVisible) {\n setTimeout(() => this.languagePopover().setLanguageContentMaxHeight());\n // Position the popover and its arrow after the popover is rendered and reflowed.\n // Matches ECL's updateOverlayPosition call in toggleOverlay.\n requestAnimationFrame(() => this.calculatePopoverPosition());\n }\n this.languageClick.next(new EclSiteHeaderLanguageClickEvent());\n\n evt.preventDefault();\n }\n\n protected onLanguageClosed(evt: EclSiteHeaderLanguageCloseEvent): void {\n this.isLanguagesDropdownVisible = false;\n }\n\n protected onLanguageSelected(evt: EclSiteHeaderLanguageSelectedEvent): void {\n this.languageCode = evt.language.code;\n this.updateCurrentLanguage(evt.language.code);\n this.isLanguagesDropdownVisible = false;\n this.languageSelected.next(new EclSiteHeaderLanguageSelectedEvent(evt.language));\n }\n\n /**\n * Close the dropdown, when clicking outside of the component.\n */\n protected onClickOutside(): void {\n this.isLanguagesDropdownVisible = false;\n }\n\n /**\n * Close the dropdown, when pressing ESC key.\n */\n protected onEscapeKeydownHandler(): void {\n this.isLanguagesDropdownVisible = false;\n }\n\n hasLanguageCodes(): boolean {\n return this._languages && this._languages.length > 0;\n }\n\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n this.isRtl = rtlState;\n if (this.isLanguagesDropdownVisible) {\n this.calculatePopoverPosition();\n }\n });\n }\n\n /**\n * Calculate the number of columns for EU and non-EU languages, depending on languages' count.\n */\n private updateLanguages(): void {\n\n this.euLanguages = this._languages.filter((item) => EuiEuLanguages.isEuLanguage(item.code));\n\n this.nonEuLanguages = this._languages.filter((item) => !EuiEuLanguages.isEuLanguage(item.code));\n\n this.euColumnsCount = Math.ceil(this.euLanguages.length / this.LANGUAGE_MAX_COLUMNS);\n\n this.nonEuColumnsCount = Math.ceil(this.nonEuLanguages.length / this.LANGUAGE_MAX_COLUMNS);\n }\n\n /**\n * Clears every positioning flag/offset so a fresh calculation (or a close) starts from a known state.\n */\n private resetPositioning(): void {\n this.isFull = false;\n this.isStack = false;\n this.isPushRight = false;\n this.isPushLeft = false;\n this.rightPosition = undefined;\n this.leftPosition = undefined;\n this.languageArrowPosition = undefined;\n }\n\n /**\n * Positions the language popover and its arrow, matching ECL's updateOverlayPosition.\n * The container is the site-header top area (ECL's '[data-ecl-site-header-top]'), resolved from\n * the DOM rather than a shared service so the measurement is taken at the right time (on open/resize).\n */\n private calculatePopoverPosition(): void {\n if (!this.isLanguagesDropdownVisible || !this.hasLanguageCodes()) return;\n\n const container = this.el.nativeElement.closest('.ecl-site-header__top') as HTMLElement | null;\n const languagePopover = this.languagePopover();\n if (!container || !languagePopover) return;\n\n const toggleButtonRect = this.languageLinkElement().nativeElement.getBoundingClientRect();\n const popoverRect = languagePopover.el.nativeElement.getBoundingClientRect();\n const containerRect = container.getBoundingClientRect();\n const screenWidth = this.window.innerWidth;\n const clientWidth = Math.max(this.document.documentElement.clientWidth || 0, this.window.innerWidth || 0);\n\n this.resetPositioning();\n\n // Stack the EU / non-EU lists when the popover is wider than the container.\n if (popoverRect.width > containerRect.width) {\n this.isStack = true;\n if (this.nonEuLanguages.length) {\n this.nonEuColumnsCount = Math.max(this.euColumnsCount, this.nonEuColumnsCount);\n }\n }\n\n // Mobile: the popover is full width. The arrow is anchored from the box's right edge,\n // so the offset is measured against popoverRect.right. Exclusive with push-right/left,\n // matching ECL's updateOverlayPosition (mobile branch returns early).\n if (clientWidth < this.MOBILE_BREAKPOINT) {\n const arrowOffset = popoverRect.right - toggleButtonRect.right + toggleButtonRect.width / 2;\n this.isFull = true;\n this.languageArrowPosition = `calc(${arrowOffset}px - ${ARROW_SIZE})`;\n return;\n }\n\n // RTL: popover overflows the left edge -> push it right against the container's left edge.\n if (this.isRtl && popoverRect.left < 0) {\n const arrowOffset = toggleButtonRect.right - containerRect.left - toggleButtonRect.width / 2;\n this.isPushLeft = true;\n this.leftPosition = -toggleButtonRect.left + containerRect.left;\n this.languageArrowPosition = `${arrowOffset}px`;\n } else if (!this.isRtl && popoverRect.right > screenWidth) {\n // LTR: popover overflows the right edge -> push it left against the container's right edge.\n const arrowOffset = containerRect.right - toggleButtonRect.right + toggleButtonRect.width / 2;\n this.isPushRight = true;\n this.rightPosition = -containerRect.right + toggleButtonRect.right;\n this.languageArrowPosition = `calc(${arrowOffset}px - ${ARROW_SIZE})`;\n }\n }\n\n /**\n * On window resize -> reposition the popover, but only while it is open.\n * Debounced for performance, matching ECL's handleResize.\n */\n private handleResize(): void {\n const win = this.window;\n if (!win) return;\n fromEvent(win, 'resize')\n .pipe(debounceTime(this.RESIZE_DEBOUNCE), takeUntil(this.destroy$))\n .subscribe(() => {\n if (this.isLanguagesDropdownVisible) {\n this.calculatePopoverPosition();\n }\n });\n }\n\n private getConfiguredLanguages(): void {\n const languages: string[] = this.config?.i18n?.i18nService?.languages.map(lang => {\n return (typeof lang !== 'string') ? (lang as EuiLanguage).code : lang\n }) || [];\n this._languages = EuiEuLanguages.getAllLanguagesByCodes(languages);\n\n if (this.config?.i18n?.i18nService?.defaultLanguage) {\n this.languageCode = this.config?.i18n?.i18nService?.defaultLanguage;\n } else {\n if (this._languages && this._languages.length > 0) {\n this.languageCode = this._languages[0].code;\n }\n }\n }\n\n private updateCurrentLanguage(lang: string): void {\n this.i18nService.updateState({\n activeLang: lang,\n });\n }\n\n private handleInitialConfiguredLanguages(): void {\n setTimeout(() => {\n if (this._languages === undefined || this._languages.length === 0) {\n this.getConfiguredLanguages();\n }\n this.updateLanguages();\n });\n }\n}\n",
|
|
85143
84745
|
"assetsDirs": [],
|
|
85144
84746
|
"styleUrlsData": "",
|
|
85145
84747
|
"stylesData": "\n :host {\n display: block;\n }\n \n",
|
|
85146
84748
|
"jsdoctags": [
|
|
85147
84749
|
{
|
|
85148
|
-
"pos":
|
|
85149
|
-
"end":
|
|
84750
|
+
"pos": 1027,
|
|
84751
|
+
"end": 1185,
|
|
85150
84752
|
"kind": 321,
|
|
85151
84753
|
"id": 0,
|
|
85152
84754
|
"flags": 16777216,
|
|
@@ -85170,7 +84772,7 @@
|
|
|
85170
84772
|
"name": "cssClasses",
|
|
85171
84773
|
"type": "string",
|
|
85172
84774
|
"returnType": "string",
|
|
85173
|
-
"line":
|
|
84775
|
+
"line": 123,
|
|
85174
84776
|
"rawdescription": "\n",
|
|
85175
84777
|
"description": ""
|
|
85176
84778
|
}
|
|
@@ -85226,10 +84828,11 @@
|
|
|
85226
84828
|
},
|
|
85227
84829
|
{
|
|
85228
84830
|
"name": "EclSiteHeaderLanguagePopoverComponent",
|
|
85229
|
-
"id": "component-EclSiteHeaderLanguagePopoverComponent-
|
|
84831
|
+
"id": "component-EclSiteHeaderLanguagePopoverComponent-e1d84a0bf4a937ce3e593bdd02f17dca9b853cc426819d4e57f144f50f918762e5340d2d90f1a0428c1e121c76d983d3378cbb1b91a0dd7b4a991de29be1315b",
|
|
85230
84832
|
"file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language-popover.component.ts",
|
|
85231
84833
|
"encapsulation": [],
|
|
85232
84834
|
"entryComponents": [],
|
|
84835
|
+
"host": {},
|
|
85233
84836
|
"inputs": [],
|
|
85234
84837
|
"outputs": [],
|
|
85235
84838
|
"providers": [],
|
|
@@ -85244,85 +84847,34 @@
|
|
|
85244
84847
|
"hostDirectives": [],
|
|
85245
84848
|
"inputsClass": [
|
|
85246
84849
|
{
|
|
84850
|
+
"name": "euColumnsCount",
|
|
85247
84851
|
"coverageIgnore": false,
|
|
85248
|
-
"
|
|
85249
|
-
"defaultValue": "[]",
|
|
85250
|
-
"deprecated": false,
|
|
85251
|
-
"deprecationMessage": "",
|
|
85252
|
-
"rawdescription": "\n",
|
|
85253
|
-
"description": "",
|
|
85254
|
-
"line": 35,
|
|
85255
|
-
"type": "EuiLanguage[]",
|
|
85256
|
-
"decorators": []
|
|
85257
|
-
},
|
|
85258
|
-
{
|
|
85259
|
-
"coverageIgnore": false,
|
|
85260
|
-
"name": "languageArrowPosition",
|
|
85261
|
-
"deprecated": false,
|
|
85262
|
-
"deprecationMessage": "",
|
|
85263
|
-
"rawdescription": "\n\nProperty to position the arrow of the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
85264
|
-
"description": "<p>Property to position the arrow of the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85265
|
-
"line": 76,
|
|
85266
|
-
"type": "string",
|
|
85267
|
-
"decorators": []
|
|
85268
|
-
},
|
|
85269
|
-
{
|
|
85270
|
-
"coverageIgnore": false,
|
|
85271
|
-
"name": "languageCode",
|
|
85272
|
-
"deprecated": false,
|
|
85273
|
-
"deprecationMessage": "",
|
|
85274
|
-
"rawdescription": "\n\nCurrent language\n",
|
|
85275
|
-
"description": "<p>Current language</p>\n",
|
|
85276
|
-
"line": 34,
|
|
85277
|
-
"type": "string",
|
|
85278
|
-
"decorators": []
|
|
85279
|
-
},
|
|
85280
|
-
{
|
|
85281
|
-
"coverageIgnore": false,
|
|
85282
|
-
"name": "leftPosition",
|
|
84852
|
+
"defaultValue": "undefined",
|
|
85283
84853
|
"deprecated": false,
|
|
85284
84854
|
"deprecationMessage": "",
|
|
85285
|
-
"rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
85286
|
-
"description": "<p>Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85287
|
-
"line": 72,
|
|
85288
84855
|
"type": "number",
|
|
85289
|
-
"
|
|
84856
|
+
"indexKey": "",
|
|
84857
|
+
"optional": false,
|
|
84858
|
+
"description": "<p>Number of columns for eu languages. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
84859
|
+
"line": 52,
|
|
84860
|
+
"rawdescription": "\n\nNumber of columns for eu languages. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
84861
|
+
"modifierKind": [
|
|
84862
|
+
148
|
|
84863
|
+
],
|
|
84864
|
+
"required": false
|
|
85290
84865
|
},
|
|
85291
84866
|
{
|
|
84867
|
+
"name": "euLanguages",
|
|
85292
84868
|
"coverageIgnore": false,
|
|
85293
|
-
"name": "nonEuLanguages",
|
|
85294
84869
|
"defaultValue": "[]",
|
|
85295
84870
|
"deprecated": false,
|
|
85296
84871
|
"deprecationMessage": "",
|
|
85297
|
-
"rawdescription": "\n",
|
|
85298
|
-
"description": "",
|
|
85299
|
-
"line": 36,
|
|
85300
84872
|
"type": "EuiLanguage[]",
|
|
85301
|
-
"decorators": []
|
|
85302
|
-
},
|
|
85303
|
-
{
|
|
85304
|
-
"coverageIgnore": false,
|
|
85305
|
-
"name": "rightPosition",
|
|
85306
|
-
"deprecated": false,
|
|
85307
|
-
"deprecationMessage": "",
|
|
85308
|
-
"rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
85309
|
-
"description": "<p>Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85310
|
-
"line": 68,
|
|
85311
|
-
"type": "number",
|
|
85312
|
-
"decorators": []
|
|
85313
|
-
},
|
|
85314
|
-
{
|
|
85315
|
-
"name": "euColumnsCount",
|
|
85316
|
-
"coverageIgnore": false,
|
|
85317
|
-
"defaultValue": "undefined",
|
|
85318
|
-
"deprecated": false,
|
|
85319
|
-
"deprecationMessage": "",
|
|
85320
|
-
"type": "number",
|
|
85321
84873
|
"indexKey": "",
|
|
85322
84874
|
"optional": false,
|
|
85323
|
-
"description": "
|
|
85324
|
-
"line":
|
|
85325
|
-
"rawdescription": "\n
|
|
84875
|
+
"description": "",
|
|
84876
|
+
"line": 47,
|
|
84877
|
+
"rawdescription": "\n",
|
|
85326
84878
|
"modifierKind": [
|
|
85327
84879
|
148
|
|
85328
84880
|
],
|
|
@@ -85338,7 +84890,7 @@
|
|
|
85338
84890
|
"indexKey": "",
|
|
85339
84891
|
"optional": false,
|
|
85340
84892
|
"description": "<p>Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85341
|
-
"line":
|
|
84893
|
+
"line": 76,
|
|
85342
84894
|
"rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
85343
84895
|
"modifierKind": [
|
|
85344
84896
|
148
|
|
@@ -85355,7 +84907,7 @@
|
|
|
85355
84907
|
"indexKey": "",
|
|
85356
84908
|
"optional": false,
|
|
85357
84909
|
"description": "<p>Property to show/hide the dialog.</p>\n",
|
|
85358
|
-
"line":
|
|
84910
|
+
"line": 60,
|
|
85359
84911
|
"rawdescription": "\n\nProperty to show/hide the dialog.\n",
|
|
85360
84912
|
"modifierKind": [
|
|
85361
84913
|
148
|
|
@@ -85372,7 +84924,7 @@
|
|
|
85372
84924
|
"indexKey": "",
|
|
85373
84925
|
"optional": false,
|
|
85374
84926
|
"description": "<p>Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85375
|
-
"line":
|
|
84927
|
+
"line": 68,
|
|
85376
84928
|
"rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
85377
84929
|
"modifierKind": [
|
|
85378
84930
|
148
|
|
@@ -85389,7 +84941,7 @@
|
|
|
85389
84941
|
"indexKey": "",
|
|
85390
84942
|
"optional": false,
|
|
85391
84943
|
"description": "<p>Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85392
|
-
"line":
|
|
84944
|
+
"line": 64,
|
|
85393
84945
|
"rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
85394
84946
|
"modifierKind": [
|
|
85395
84947
|
148
|
|
@@ -85406,7 +84958,58 @@
|
|
|
85406
84958
|
"indexKey": "",
|
|
85407
84959
|
"optional": false,
|
|
85408
84960
|
"description": "<p>Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85409
|
-
"line":
|
|
84961
|
+
"line": 72,
|
|
84962
|
+
"rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
84963
|
+
"modifierKind": [
|
|
84964
|
+
148
|
|
84965
|
+
],
|
|
84966
|
+
"required": false
|
|
84967
|
+
},
|
|
84968
|
+
{
|
|
84969
|
+
"name": "languageArrowPosition",
|
|
84970
|
+
"coverageIgnore": false,
|
|
84971
|
+
"defaultValue": "undefined",
|
|
84972
|
+
"deprecated": false,
|
|
84973
|
+
"deprecationMessage": "",
|
|
84974
|
+
"type": "string",
|
|
84975
|
+
"indexKey": "",
|
|
84976
|
+
"optional": false,
|
|
84977
|
+
"description": "<p>Property to position the arrow of the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
84978
|
+
"line": 88,
|
|
84979
|
+
"rawdescription": "\n\nProperty to position the arrow of the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
84980
|
+
"modifierKind": [
|
|
84981
|
+
148
|
|
84982
|
+
],
|
|
84983
|
+
"required": false
|
|
84984
|
+
},
|
|
84985
|
+
{
|
|
84986
|
+
"name": "languageCode",
|
|
84987
|
+
"coverageIgnore": false,
|
|
84988
|
+
"defaultValue": "undefined",
|
|
84989
|
+
"deprecated": false,
|
|
84990
|
+
"deprecationMessage": "",
|
|
84991
|
+
"type": "string",
|
|
84992
|
+
"indexKey": "",
|
|
84993
|
+
"optional": false,
|
|
84994
|
+
"description": "<p>Current language</p>\n",
|
|
84995
|
+
"line": 46,
|
|
84996
|
+
"rawdescription": "\n\nCurrent language\n",
|
|
84997
|
+
"modifierKind": [
|
|
84998
|
+
148
|
|
84999
|
+
],
|
|
85000
|
+
"required": false
|
|
85001
|
+
},
|
|
85002
|
+
{
|
|
85003
|
+
"name": "leftPosition",
|
|
85004
|
+
"coverageIgnore": false,
|
|
85005
|
+
"defaultValue": "undefined",
|
|
85006
|
+
"deprecated": false,
|
|
85007
|
+
"deprecationMessage": "",
|
|
85008
|
+
"type": "number",
|
|
85009
|
+
"indexKey": "",
|
|
85010
|
+
"optional": false,
|
|
85011
|
+
"description": "<p>Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85012
|
+
"line": 84,
|
|
85410
85013
|
"rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
85411
85014
|
"modifierKind": [
|
|
85412
85015
|
148
|
|
@@ -85423,13 +85026,47 @@
|
|
|
85423
85026
|
"indexKey": "",
|
|
85424
85027
|
"optional": false,
|
|
85425
85028
|
"description": "<p>Number of columns for non-eu languages. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85426
|
-
"line":
|
|
85029
|
+
"line": 56,
|
|
85427
85030
|
"rawdescription": "\n\nNumber of columns for non-eu languages. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
85428
85031
|
"modifierKind": [
|
|
85429
85032
|
148
|
|
85430
85033
|
],
|
|
85431
85034
|
"required": false
|
|
85432
85035
|
},
|
|
85036
|
+
{
|
|
85037
|
+
"name": "nonEuLanguages",
|
|
85038
|
+
"coverageIgnore": false,
|
|
85039
|
+
"defaultValue": "[]",
|
|
85040
|
+
"deprecated": false,
|
|
85041
|
+
"deprecationMessage": "",
|
|
85042
|
+
"type": "EuiLanguage[]",
|
|
85043
|
+
"indexKey": "",
|
|
85044
|
+
"optional": false,
|
|
85045
|
+
"description": "",
|
|
85046
|
+
"line": 48,
|
|
85047
|
+
"rawdescription": "\n",
|
|
85048
|
+
"modifierKind": [
|
|
85049
|
+
148
|
|
85050
|
+
],
|
|
85051
|
+
"required": false
|
|
85052
|
+
},
|
|
85053
|
+
{
|
|
85054
|
+
"name": "rightPosition",
|
|
85055
|
+
"coverageIgnore": false,
|
|
85056
|
+
"defaultValue": "undefined",
|
|
85057
|
+
"deprecated": false,
|
|
85058
|
+
"deprecationMessage": "",
|
|
85059
|
+
"type": "number",
|
|
85060
|
+
"indexKey": "",
|
|
85061
|
+
"optional": false,
|
|
85062
|
+
"description": "<p>Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.</p>\n",
|
|
85063
|
+
"line": 80,
|
|
85064
|
+
"rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
|
|
85065
|
+
"modifierKind": [
|
|
85066
|
+
148
|
|
85067
|
+
],
|
|
85068
|
+
"required": false
|
|
85069
|
+
},
|
|
85433
85070
|
{
|
|
85434
85071
|
"coverageIgnore": false,
|
|
85435
85072
|
"name": "class",
|
|
@@ -85484,7 +85121,7 @@
|
|
|
85484
85121
|
"indexKey": "",
|
|
85485
85122
|
"optional": false,
|
|
85486
85123
|
"description": "",
|
|
85487
|
-
"line":
|
|
85124
|
+
"line": 90,
|
|
85488
85125
|
"rawdescription": "\n",
|
|
85489
85126
|
"modifierKind": [
|
|
85490
85127
|
148
|
|
@@ -85500,7 +85137,7 @@
|
|
|
85500
85137
|
"indexKey": "",
|
|
85501
85138
|
"optional": false,
|
|
85502
85139
|
"description": "",
|
|
85503
|
-
"line":
|
|
85140
|
+
"line": 91,
|
|
85504
85141
|
"rawdescription": "\n",
|
|
85505
85142
|
"modifierKind": [
|
|
85506
85143
|
148
|
|
@@ -85519,7 +85156,7 @@
|
|
|
85519
85156
|
"indexKey": "",
|
|
85520
85157
|
"optional": false,
|
|
85521
85158
|
"description": "",
|
|
85522
|
-
"line":
|
|
85159
|
+
"line": 37,
|
|
85523
85160
|
"rawdescription": "\n",
|
|
85524
85161
|
"modifierKind": [
|
|
85525
85162
|
124
|
|
@@ -85535,31 +85172,9 @@
|
|
|
85535
85172
|
"indexKey": "",
|
|
85536
85173
|
"optional": false,
|
|
85537
85174
|
"description": "",
|
|
85538
|
-
"line":
|
|
85175
|
+
"line": 36,
|
|
85539
85176
|
"rawdescription": "\n"
|
|
85540
85177
|
},
|
|
85541
|
-
{
|
|
85542
|
-
"name": "labelledBy",
|
|
85543
|
-
"coverageIgnore": false,
|
|
85544
|
-
"defaultValue": "'ecl-site-header__language-title'",
|
|
85545
|
-
"deprecated": false,
|
|
85546
|
-
"deprecationMessage": "",
|
|
85547
|
-
"type": "string",
|
|
85548
|
-
"indexKey": "",
|
|
85549
|
-
"optional": false,
|
|
85550
|
-
"description": "",
|
|
85551
|
-
"line": 85,
|
|
85552
|
-
"rawdescription": "\n",
|
|
85553
|
-
"decorators": [
|
|
85554
|
-
{
|
|
85555
|
-
"name": "HostBinding",
|
|
85556
|
-
"stringifiedArguments": "'attr.aria-labelledby'"
|
|
85557
|
-
}
|
|
85558
|
-
],
|
|
85559
|
-
"modifierKind": [
|
|
85560
|
-
171
|
|
85561
|
-
]
|
|
85562
|
-
},
|
|
85563
85178
|
{
|
|
85564
85179
|
"name": "languageContent",
|
|
85565
85180
|
"coverageIgnore": false,
|
|
@@ -85570,7 +85185,7 @@
|
|
|
85570
85185
|
"indexKey": "",
|
|
85571
85186
|
"optional": false,
|
|
85572
85187
|
"description": "<p>The div, that wraps all the languages.</p>\n",
|
|
85573
|
-
"line":
|
|
85188
|
+
"line": 42,
|
|
85574
85189
|
"rawdescription": "\n\nThe div, that wraps all the languages.\n",
|
|
85575
85190
|
"modifierKind": [
|
|
85576
85191
|
148
|
|
@@ -85585,30 +85200,8 @@
|
|
|
85585
85200
|
"indexKey": "",
|
|
85586
85201
|
"optional": false,
|
|
85587
85202
|
"description": "",
|
|
85588
|
-
"line":
|
|
85203
|
+
"line": 93,
|
|
85589
85204
|
"rawdescription": "\n"
|
|
85590
|
-
},
|
|
85591
|
-
{
|
|
85592
|
-
"name": "role",
|
|
85593
|
-
"coverageIgnore": false,
|
|
85594
|
-
"defaultValue": "'dialog'",
|
|
85595
|
-
"deprecated": false,
|
|
85596
|
-
"deprecationMessage": "",
|
|
85597
|
-
"type": "string",
|
|
85598
|
-
"indexKey": "",
|
|
85599
|
-
"optional": false,
|
|
85600
|
-
"description": "<p>The role of the dialog is 'dialog'. Should not be changed.</p>\n",
|
|
85601
|
-
"line": 84,
|
|
85602
|
-
"rawdescription": "\n\nThe role of the dialog is 'dialog'. Should not be changed.\n",
|
|
85603
|
-
"decorators": [
|
|
85604
|
-
{
|
|
85605
|
-
"name": "HostBinding",
|
|
85606
|
-
"stringifiedArguments": "'attr.role'"
|
|
85607
|
-
}
|
|
85608
|
-
],
|
|
85609
|
-
"modifierKind": [
|
|
85610
|
-
171
|
|
85611
|
-
]
|
|
85612
85205
|
}
|
|
85613
85206
|
],
|
|
85614
85207
|
"methodsClass": [
|
|
@@ -85619,7 +85212,7 @@
|
|
|
85619
85212
|
"optional": false,
|
|
85620
85213
|
"returnType": "void",
|
|
85621
85214
|
"typeParameters": [],
|
|
85622
|
-
"line":
|
|
85215
|
+
"line": 136,
|
|
85623
85216
|
"deprecated": false,
|
|
85624
85217
|
"deprecationMessage": "",
|
|
85625
85218
|
"rawdescription": "\n",
|
|
@@ -85632,7 +85225,7 @@
|
|
|
85632
85225
|
"optional": false,
|
|
85633
85226
|
"returnType": "void",
|
|
85634
85227
|
"typeParameters": [],
|
|
85635
|
-
"line":
|
|
85228
|
+
"line": 141,
|
|
85636
85229
|
"deprecated": false,
|
|
85637
85230
|
"deprecationMessage": "",
|
|
85638
85231
|
"rawdescription": "\n",
|
|
@@ -85662,7 +85255,7 @@
|
|
|
85662
85255
|
"optional": false,
|
|
85663
85256
|
"returnType": "void",
|
|
85664
85257
|
"typeParameters": [],
|
|
85665
|
-
"line":
|
|
85258
|
+
"line": 145,
|
|
85666
85259
|
"deprecated": false,
|
|
85667
85260
|
"deprecationMessage": "",
|
|
85668
85261
|
"rawdescription": "\n",
|
|
@@ -85699,7 +85292,7 @@
|
|
|
85699
85292
|
"optional": false,
|
|
85700
85293
|
"returnType": "void",
|
|
85701
85294
|
"typeParameters": [],
|
|
85702
|
-
"line":
|
|
85295
|
+
"line": 154,
|
|
85703
85296
|
"deprecated": false,
|
|
85704
85297
|
"deprecationMessage": "",
|
|
85705
85298
|
"rawdescription": "\n\nSet the max-height property of the component. It is calculated depending on the viewport.\n",
|
|
@@ -85747,82 +85340,7 @@
|
|
|
85747
85340
|
"coverageIgnore": false,
|
|
85748
85341
|
"deprecated": false,
|
|
85749
85342
|
"deprecationMessage": "",
|
|
85750
|
-
"hostBindings": [
|
|
85751
|
-
{
|
|
85752
|
-
"coverageIgnore": false,
|
|
85753
|
-
"name": "attr.aria-labelledby",
|
|
85754
|
-
"actualName": "labelledBy",
|
|
85755
|
-
"defaultValue": "'ecl-site-header__language-title'",
|
|
85756
|
-
"deprecated": false,
|
|
85757
|
-
"deprecationMessage": "",
|
|
85758
|
-
"rawdescription": "\n",
|
|
85759
|
-
"description": "",
|
|
85760
|
-
"line": 85,
|
|
85761
|
-
"type": "string",
|
|
85762
|
-
"decorators": []
|
|
85763
|
-
},
|
|
85764
|
-
{
|
|
85765
|
-
"coverageIgnore": false,
|
|
85766
|
-
"name": "attr.aria-modal",
|
|
85767
|
-
"actualName": "isModal",
|
|
85768
|
-
"deprecated": false,
|
|
85769
|
-
"deprecationMessage": "",
|
|
85770
|
-
"rawdescription": "\n",
|
|
85771
|
-
"description": "",
|
|
85772
|
-
"line": 124,
|
|
85773
|
-
"type": "boolean | undefined",
|
|
85774
|
-
"decorators": []
|
|
85775
|
-
},
|
|
85776
|
-
{
|
|
85777
|
-
"coverageIgnore": false,
|
|
85778
|
-
"name": "attr.hidden",
|
|
85779
|
-
"actualName": "isDropdownHidden",
|
|
85780
|
-
"deprecated": false,
|
|
85781
|
-
"deprecationMessage": "",
|
|
85782
|
-
"rawdescription": "\n",
|
|
85783
|
-
"description": "",
|
|
85784
|
-
"line": 129,
|
|
85785
|
-
"type": "boolean | undefined",
|
|
85786
|
-
"decorators": []
|
|
85787
|
-
},
|
|
85788
|
-
{
|
|
85789
|
-
"coverageIgnore": false,
|
|
85790
|
-
"name": "attr.role",
|
|
85791
|
-
"actualName": "role",
|
|
85792
|
-
"defaultValue": "'dialog'",
|
|
85793
|
-
"deprecated": false,
|
|
85794
|
-
"deprecationMessage": "",
|
|
85795
|
-
"rawdescription": "\n\nThe role of the dialog is 'dialog'. Should not be changed.\n",
|
|
85796
|
-
"description": "<p>The role of the dialog is 'dialog'. Should not be changed.</p>\n",
|
|
85797
|
-
"line": 84,
|
|
85798
|
-
"type": "string",
|
|
85799
|
-
"decorators": []
|
|
85800
|
-
},
|
|
85801
|
-
{
|
|
85802
|
-
"coverageIgnore": false,
|
|
85803
|
-
"name": "class",
|
|
85804
|
-
"actualName": "cssClasses",
|
|
85805
|
-
"deprecated": false,
|
|
85806
|
-
"deprecationMessage": "",
|
|
85807
|
-
"rawdescription": "\n",
|
|
85808
|
-
"description": "",
|
|
85809
|
-
"line": 112,
|
|
85810
|
-
"type": "string",
|
|
85811
|
-
"decorators": []
|
|
85812
|
-
},
|
|
85813
|
-
{
|
|
85814
|
-
"coverageIgnore": false,
|
|
85815
|
-
"name": "style.display",
|
|
85816
|
-
"actualName": "display",
|
|
85817
|
-
"deprecated": false,
|
|
85818
|
-
"deprecationMessage": "",
|
|
85819
|
-
"rawdescription": "\n",
|
|
85820
|
-
"description": "",
|
|
85821
|
-
"line": 87,
|
|
85822
|
-
"type": "string",
|
|
85823
|
-
"decorators": []
|
|
85824
|
-
}
|
|
85825
|
-
],
|
|
85343
|
+
"hostBindings": [],
|
|
85826
85344
|
"hostListeners": [],
|
|
85827
85345
|
"standalone": false,
|
|
85828
85346
|
"imports": [
|
|
@@ -85843,14 +85361,14 @@
|
|
|
85843
85361
|
"description": "<p>This component is a popover, that appears after the user clicks on language link. It contains all the available languages,\n configured for the current site. Adds styling and functionality for the dialog.\nEmits events when language is selected and when dialog is closed.</p>\n",
|
|
85844
85362
|
"rawdescription": "\n\nThis component is a popover, that appears after the user clicks on language link. It contains all the available languages,\n configured for the current site. Adds styling and functionality for the dialog.\nEmits events when language is selected and when dialog is closed.\n",
|
|
85845
85363
|
"type": "component",
|
|
85846
|
-
"sourceCode": "import { ScrollDispatcher } from '@angular/cdk/scrolling';\nimport { Component, DOCUMENT, ElementRef,
|
|
85364
|
+
"sourceCode": "import { ScrollDispatcher } from '@angular/cdk/scrolling';\nimport { Component, DOCUMENT, ElementRef, NgZone, OnDestroy, afterNextRender, booleanAttribute, inject, output, input, viewChild } from '@angular/core';\nimport { auditTime, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EuiLanguage } from '@eui/base';\nimport { EclThemeService } from '@eui/ecl/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclSiteHeaderLanguageCloseEvent, EclSiteHeaderLanguageSelectedEvent } from '../events';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\n\n/**\n * This component is a popover, that appears after the user clicks on language link. It contains all the available languages,\n * configured for the current site. Adds styling and functionality for the dialog.\n * Emits events when language is selected and when dialog is closed.\n */\n@Component({\n selector: 'ecl-site-header-language-popover',\n templateUrl: './ecl-site-header-language-popover.component.html',\n imports: [TranslatePipe, ...EUI_ECL_BUTTON, ...EUI_ECL_ICON, ...EUI_ECL_LINK],\n host: {\n // The role of the dialog is 'dialog'. Should not be changed.\n role: 'dialog',\n 'aria-labelledby': 'ecl-site-header__language-title',\n '[class]': 'cssClasses',\n '[style.display]': 'display',\n '[style.right.px]': 'rightPosition()',\n '[style.left.px]': 'leftPosition()',\n '[style.--ecl-overlay-arrow-position]': 'languageArrowPosition()',\n '[attr.aria-modal]': 'isModal',\n '[attr.hidden]': 'isDropdownHidden',\n },\n})\nexport class EclSiteHeaderLanguagePopoverComponent extends ECLBaseDirective implements OnDestroy {\n el = inject(ElementRef);\n protected eclThemeService = inject(EclThemeService);\n\n /**\n * The div, that wraps all the languages.\n */\n readonly languageContent = viewChild<ElementRef>('languageContent');\n /**\n * Current language\n */\n readonly languageCode = input<string>(undefined);\n readonly euLanguages = input<EuiLanguage[]>([]);\n readonly nonEuLanguages = input<EuiLanguage[]>([]);\n /**\n * Number of columns for eu languages. Calculated by the parent component 'ecl-site-header-language'.\n */\n readonly euColumnsCount = input<number>(undefined);\n /**\n * Number of columns for non-eu languages. Calculated by the parent component 'ecl-site-header-language'.\n */\n readonly nonEuColumnsCount = input<number>(undefined);\n /**\n * Property to show/hide the dialog.\n */\n readonly isHidden = input(false, { transform: booleanAttribute });\n /**\n * Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n */\n readonly isPushRight = input(false, { transform: booleanAttribute });\n /**\n * Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n */\n readonly isPushLeft = input(false, { transform: booleanAttribute });\n /**\n * Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n */\n readonly isStack = input(false, { transform: booleanAttribute });\n /**\n * Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n */\n readonly isFull = input(false, { transform: booleanAttribute });\n /**\n * Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n */\n readonly rightPosition = input<number>(undefined);\n /**\n * Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n */\n readonly leftPosition = input<number>(undefined);\n /**\n * Property to position the arrow of the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n */\n readonly languageArrowPosition = input<string>(undefined);\n\n readonly languageClosed = output<EclSiteHeaderLanguageCloseEvent>();\n readonly languageSelected = output<EclSiteHeaderLanguageSelectedEvent>();\n\n languageContentMaxHeight: number;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private scrollDispatcher = inject(ScrollDispatcher);\n private zone = inject(NgZone);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView; // Window | null\n\n constructor() {\n super();\n afterNextRender(() => {\n this.subscribeToCDKScrollEvent();\n fromEvent(this.window, 'resize').pipe(\n auditTime(50),\n takeUntil(this.destroy$)).subscribe(() => {\n // Calculate the height after resize. If the window is too small -> scroll should appear.\n setTimeout(() => this.setLanguageContentMaxHeight());\n });\n });\n }\n\n protected get cssClasses(): string {\n return [\n super.getCssClasses('ecl-site-header__language-container'),\n this.isPushRight() ? 'ecl-site-header__language-container--push-right' : '',\n this.isPushLeft() ? 'ecl-site-header__language-container--push-left' : '',\n this.isFull() ? 'ecl-site-header__language-container--full' : '',\n ]\n .join(' ')\n .trim();\n }\n\n protected get display(): string {\n return this.isHidden() ? 'none' : 'block';\n }\n\n protected get isModal(): boolean | undefined {\n return !this.isHidden() || undefined;\n }\n\n protected get isDropdownHidden(): boolean | undefined {\n return this.isHidden() || undefined;\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n onCloseClick(): void {\n this.languageClosed.emit(new EclSiteHeaderLanguageCloseEvent());\n }\n\n onLanguageClick(language: EuiLanguage, evt: MouseEvent): void {\n this.languageSelected.emit(new EclSiteHeaderLanguageSelectedEvent(language));\n\n evt.preventDefault();\n }\n\n /**\n * Set the max-height property of the component. It is calculated depending on the viewport.\n */\n setLanguageContentMaxHeight(): void {\n const viewportHeight = this.window.innerHeight;\n const languageContent = this.languageContent();\n if (languageContent) {\n const listTop = languageContent.nativeElement.getBoundingClientRect().top;\n const availableSpace = viewportHeight - listTop;\n if (availableSpace > 0) {\n this.languageContentMaxHeight = availableSpace;\n }\n }\n }\n\n private subscribeToCDKScrollEvent(): void {\n this.scrollDispatcher.scrolled().pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.zone.run(() => {\n this.setLanguageContentMaxHeight();\n });\n });\n }\n}\n",
|
|
85847
85365
|
"assetsDirs": [],
|
|
85848
85366
|
"styleUrlsData": "",
|
|
85849
85367
|
"stylesData": "",
|
|
85850
85368
|
"jsdoctags": [
|
|
85851
85369
|
{
|
|
85852
|
-
"pos":
|
|
85853
|
-
"end":
|
|
85370
|
+
"pos": 755,
|
|
85371
|
+
"end": 1041,
|
|
85854
85372
|
"kind": 321,
|
|
85855
85373
|
"id": 0,
|
|
85856
85374
|
"flags": 16777216,
|
|
@@ -85865,7 +85383,7 @@
|
|
|
85865
85383
|
"deprecated": false,
|
|
85866
85384
|
"deprecationMessage": "",
|
|
85867
85385
|
"args": [],
|
|
85868
|
-
"line":
|
|
85386
|
+
"line": 98,
|
|
85869
85387
|
"rawdescription": "\n"
|
|
85870
85388
|
},
|
|
85871
85389
|
"extends": [
|
|
@@ -85875,24 +85393,24 @@
|
|
|
85875
85393
|
"OnDestroy"
|
|
85876
85394
|
],
|
|
85877
85395
|
"accessors": {
|
|
85878
|
-
"
|
|
85879
|
-
"name": "
|
|
85396
|
+
"cssClasses": {
|
|
85397
|
+
"name": "cssClasses",
|
|
85880
85398
|
"getSignature": {
|
|
85881
|
-
"name": "
|
|
85399
|
+
"name": "cssClasses",
|
|
85882
85400
|
"type": "string",
|
|
85883
85401
|
"returnType": "string",
|
|
85884
|
-
"line":
|
|
85402
|
+
"line": 113,
|
|
85885
85403
|
"rawdescription": "\n",
|
|
85886
85404
|
"description": ""
|
|
85887
85405
|
}
|
|
85888
85406
|
},
|
|
85889
|
-
"
|
|
85890
|
-
"name": "
|
|
85407
|
+
"display": {
|
|
85408
|
+
"name": "display",
|
|
85891
85409
|
"getSignature": {
|
|
85892
|
-
"name": "
|
|
85410
|
+
"name": "display",
|
|
85893
85411
|
"type": "string",
|
|
85894
85412
|
"returnType": "string",
|
|
85895
|
-
"line":
|
|
85413
|
+
"line": 124,
|
|
85896
85414
|
"rawdescription": "\n",
|
|
85897
85415
|
"description": ""
|
|
85898
85416
|
}
|
|
@@ -85903,7 +85421,7 @@
|
|
|
85903
85421
|
"name": "isModal",
|
|
85904
85422
|
"type": "unknown",
|
|
85905
85423
|
"returnType": "boolean | undefined",
|
|
85906
|
-
"line":
|
|
85424
|
+
"line": 128,
|
|
85907
85425
|
"rawdescription": "\n",
|
|
85908
85426
|
"description": ""
|
|
85909
85427
|
}
|
|
@@ -85914,7 +85432,7 @@
|
|
|
85914
85432
|
"name": "isDropdownHidden",
|
|
85915
85433
|
"type": "unknown",
|
|
85916
85434
|
"returnType": "boolean | undefined",
|
|
85917
|
-
"line":
|
|
85435
|
+
"line": 132,
|
|
85918
85436
|
"rawdescription": "\n",
|
|
85919
85437
|
"description": ""
|
|
85920
85438
|
}
|
|
@@ -85955,14 +85473,15 @@
|
|
|
85955
85473
|
}
|
|
85956
85474
|
]
|
|
85957
85475
|
},
|
|
85958
|
-
"templateData": "<div class=\"ecl-site-header__language-header\">\n <div class=\"ecl-site-header__language-title\">\n {{ 'ecl.language-list.SELECT-LANGUAGE' | translate }}\n </div>\n <button eclButton variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly class=\"ecl-site-header__language-close\" (click)=\"onCloseClick()\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </span>\n </button>\n</div>\n\n<div #languageContent class=\"ecl-site-header__language-content\" [style.max-height.px]=\"languageContentMaxHeight\"\n [class.ecl-site-header__language-content--stack]=\"isStack()\">\n @if (euLanguages.length) {\n <div class=\"ecl-site-header__language-category ecl-site-header__language-category--{{ euColumnsCount() }}-col\">\n <div class=\"ecl-site-header__language-category-title\">\n {{ 'ecl.language-list.EU-LANGUAGES' | translate }}\n </div>\n <ul class=\"ecl-site-header__language-list\" [attr.translate]=\"'no'\">\n @for (item of euLanguages; track item.code) {\n <li class=\"ecl-site-header__language-item\">\n <a\n eclLink\n href=\"#\"\n variant=\"standalone\"\n [lang]=\"item.code\"\n [hreflang]=\"item.code\"\n class=\"ecl-site-header__language-link\"\n [class.ecl-site-header__language-link--active]=\"item.code === languageCode\"\n (click)=\"onLanguageClick(item, $event)\">\n <span class=\"ecl-site-header__language-link-code\">{{ item.code }}</span>\n <span class=\"ecl-site-header__language-link-label\">{{ item.label }}</span>\n </a>\n </li>\n }\n </ul>\n </div>\n }\n @if (nonEuLanguages.length) {\n <div class=\"ecl-site-header__language-category ecl-site-header__language-category--{{ nonEuColumnsCount() }}-col\">\n <div class=\"ecl-site-header__language-category-title\">\n {{ 'ecl.language-list.NON-EU-LANGUAGES' | translate }}\n </div>\n <ul class=\"ecl-site-header__language-list\" [attr.translate]=\"'no'\">\n @for (item of nonEuLanguages; track item.code) {\n <li class=\"ecl-site-header__language-item\">\n <a\n eclLink\n href=\"#\"\n [lang]=\"item.code\"\n [hreflang]=\"item.code\"\n variant=\"standalone\"\n class=\"ecl-site-header__language-link\"\n [class.ecl-site-header__language-link--active]=\"item.code === languageCode\"\n (click)=\"onLanguageClick(item, $event)\">\n <span class=\"ecl-site-header__language-link-code\">{{ item.code }}</span>\n <span class=\"ecl-site-header__language-link-label\">{{ item.label }}</span>\n </a>\n </li>\n }\n </ul>\n </div>\n }\n</div>\n"
|
|
85476
|
+
"templateData": "<div class=\"ecl-site-header__language-header\">\n <div class=\"ecl-site-header__language-title\">\n {{ 'ecl.language-list.SELECT-LANGUAGE' | translate }}\n </div>\n <button eclButton variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly class=\"ecl-site-header__language-close\" (click)=\"onCloseClick()\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </span>\n </button>\n</div>\n\n<div #languageContent class=\"ecl-site-header__language-content\" [style.max-height.px]=\"languageContentMaxHeight\"\n [class.ecl-site-header__language-content--stack]=\"isStack()\">\n @if (euLanguages().length) {\n <div class=\"ecl-site-header__language-category ecl-site-header__language-category--{{ euColumnsCount() }}-col\">\n <div class=\"ecl-site-header__language-category-title\">\n {{ 'ecl.language-list.EU-LANGUAGES' | translate }}\n </div>\n <ul class=\"ecl-site-header__language-list\" [attr.translate]=\"'no'\">\n @for (item of euLanguages(); track item.code) {\n <li class=\"ecl-site-header__language-item\">\n <a\n eclLink\n href=\"#\"\n variant=\"standalone\"\n [lang]=\"item.code\"\n [hreflang]=\"item.code\"\n class=\"ecl-site-header__language-link\"\n [class.ecl-site-header__language-link--active]=\"item.code === languageCode()\"\n (click)=\"onLanguageClick(item, $event)\">\n <span class=\"ecl-site-header__language-link-code\">{{ item.code }}</span>\n <span class=\"ecl-site-header__language-link-label\">{{ item.label }}</span>\n </a>\n </li>\n }\n </ul>\n </div>\n }\n @if (nonEuLanguages().length) {\n <div class=\"ecl-site-header__language-category ecl-site-header__language-category--{{ nonEuColumnsCount() }}-col\">\n <div class=\"ecl-site-header__language-category-title\">\n {{ 'ecl.language-list.NON-EU-LANGUAGES' | translate }}\n </div>\n <ul class=\"ecl-site-header__language-list\" [attr.translate]=\"'no'\">\n @for (item of nonEuLanguages(); track item.code) {\n <li class=\"ecl-site-header__language-item\">\n <a\n eclLink\n href=\"#\"\n [lang]=\"item.code\"\n [hreflang]=\"item.code\"\n variant=\"standalone\"\n class=\"ecl-site-header__language-link\"\n [class.ecl-site-header__language-link--active]=\"item.code === languageCode()\"\n (click)=\"onLanguageClick(item, $event)\">\n <span class=\"ecl-site-header__language-link-code\">{{ item.code }}</span>\n <span class=\"ecl-site-header__language-link-label\">{{ item.label }}</span>\n </a>\n </li>\n }\n </ul>\n </div>\n }\n</div>\n"
|
|
85959
85477
|
},
|
|
85960
85478
|
{
|
|
85961
85479
|
"name": "EclSiteHeaderLoginComponent",
|
|
85962
|
-
"id": "component-EclSiteHeaderLoginComponent-
|
|
85480
|
+
"id": "component-EclSiteHeaderLoginComponent-19cf290d806bdaee64ed7b5689860e5d3113d6c5ebbfad60be450af5436bbb1012751c4ad894f93127962cf02d3e5439962e464de02158c40d0e7663b76b451e",
|
|
85963
85481
|
"file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts",
|
|
85964
85482
|
"encapsulation": [],
|
|
85965
85483
|
"entryComponents": [],
|
|
85484
|
+
"host": {},
|
|
85966
85485
|
"inputs": [],
|
|
85967
85486
|
"outputs": [],
|
|
85968
85487
|
"providers": [],
|
|
@@ -85977,11 +85496,6 @@
|
|
|
85977
85496
|
"templateVariables": [],
|
|
85978
85497
|
"viewProviders": [],
|
|
85979
85498
|
"hostDirectives": [
|
|
85980
|
-
{
|
|
85981
|
-
"name": "ECLBaseDirective",
|
|
85982
|
-
"inputs": [],
|
|
85983
|
-
"outputs": []
|
|
85984
|
-
},
|
|
85985
85499
|
{
|
|
85986
85500
|
"name": "ECLClickOutsideDirective",
|
|
85987
85501
|
"inputs": [],
|
|
@@ -86001,7 +85515,7 @@
|
|
|
86001
85515
|
"indexKey": "",
|
|
86002
85516
|
"optional": false,
|
|
86003
85517
|
"description": "",
|
|
86004
|
-
"line":
|
|
85518
|
+
"line": 41,
|
|
86005
85519
|
"rawdescription": "\n",
|
|
86006
85520
|
"modifierKind": [
|
|
86007
85521
|
148
|
|
@@ -86059,7 +85573,7 @@
|
|
|
86059
85573
|
"defaultValue": "new EventEmitter<EclSiteHeaderLoginBoxToggleEvent>()",
|
|
86060
85574
|
"deprecated": false,
|
|
86061
85575
|
"deprecationMessage": "",
|
|
86062
|
-
"line":
|
|
85576
|
+
"line": 44,
|
|
86063
85577
|
"type": "EventEmitter"
|
|
86064
85578
|
},
|
|
86065
85579
|
{
|
|
@@ -86071,7 +85585,7 @@
|
|
|
86071
85585
|
"indexKey": "",
|
|
86072
85586
|
"optional": false,
|
|
86073
85587
|
"description": "",
|
|
86074
|
-
"line":
|
|
85588
|
+
"line": 43,
|
|
86075
85589
|
"rawdescription": "\n",
|
|
86076
85590
|
"modifierKind": [
|
|
86077
85591
|
148
|
|
@@ -86080,28 +85594,6 @@
|
|
|
86080
85594
|
}
|
|
86081
85595
|
],
|
|
86082
85596
|
"propertiesClass": [
|
|
86083
|
-
{
|
|
86084
|
-
"name": "class",
|
|
86085
|
-
"coverageIgnore": false,
|
|
86086
|
-
"defaultValue": "'ecl-site-header__login-container'",
|
|
86087
|
-
"deprecated": false,
|
|
86088
|
-
"deprecationMessage": "",
|
|
86089
|
-
"type": "string",
|
|
86090
|
-
"indexKey": "",
|
|
86091
|
-
"optional": false,
|
|
86092
|
-
"description": "",
|
|
86093
|
-
"line": 38,
|
|
86094
|
-
"rawdescription": "\n",
|
|
86095
|
-
"decorators": [
|
|
86096
|
-
{
|
|
86097
|
-
"name": "HostBinding",
|
|
86098
|
-
"stringifiedArguments": "'class'"
|
|
86099
|
-
}
|
|
86100
|
-
],
|
|
86101
|
-
"modifierKind": [
|
|
86102
|
-
171
|
|
86103
|
-
]
|
|
86104
|
-
},
|
|
86105
85597
|
{
|
|
86106
85598
|
"name": "isLoginBoxActive",
|
|
86107
85599
|
"coverageIgnore": false,
|
|
@@ -86111,57 +85603,24 @@
|
|
|
86111
85603
|
"type": "unknown",
|
|
86112
85604
|
"indexKey": "",
|
|
86113
85605
|
"optional": false,
|
|
86114
|
-
"description": "<p>If login popover is open (true) or closed (false).</p>\n",
|
|
86115
|
-
"line":
|
|
86116
|
-
"rawdescription": "\n\nIf login popover is open (true) or closed (false).\n"
|
|
86117
|
-
"modifierKind": [
|
|
86118
|
-
125
|
|
86119
|
-
]
|
|
85606
|
+
"description": "<p>If login popover is open (true) or closed (false). Kept public because the parent\n<code>ecl-site-header</code> resets it directly when the search box opens.</p>\n",
|
|
85607
|
+
"line": 50,
|
|
85608
|
+
"rawdescription": "\n\nIf login popover is open (true) or closed (false). Kept public because the parent\n`ecl-site-header` resets it directly when the search box opens.\n"
|
|
86120
85609
|
},
|
|
86121
85610
|
{
|
|
86122
85611
|
"name": "loginArrowPosition",
|
|
86123
85612
|
"coverageIgnore": false,
|
|
86124
|
-
"
|
|
86125
|
-
"deprecationMessage": "",
|
|
86126
|
-
"type": "string",
|
|
86127
|
-
"indexKey": "",
|
|
86128
|
-
"optional": false,
|
|
86129
|
-
"description": "<p>The position of the arrow of the popover.</p>\n",
|
|
86130
|
-
"line": 52,
|
|
86131
|
-
"rawdescription": "\n\nThe position of the arrow of the popover.\n",
|
|
86132
|
-
"modifierKind": [
|
|
86133
|
-
125
|
|
86134
|
-
]
|
|
86135
|
-
},
|
|
86136
|
-
{
|
|
86137
|
-
"name": "loginLinkElement",
|
|
86138
|
-
"coverageIgnore": false,
|
|
86139
|
-
"defaultValue": "viewChild('loginLink', { read: ElementRef })",
|
|
85613
|
+
"defaultValue": "signal<string | undefined>(undefined)",
|
|
86140
85614
|
"deprecated": false,
|
|
86141
85615
|
"deprecationMessage": "",
|
|
86142
85616
|
"type": "unknown",
|
|
86143
85617
|
"indexKey": "",
|
|
86144
85618
|
"optional": false,
|
|
86145
|
-
"description": "",
|
|
86146
|
-
"line":
|
|
86147
|
-
"rawdescription": "\n",
|
|
86148
|
-
"modifierKind": [
|
|
86149
|
-
148
|
|
86150
|
-
]
|
|
86151
|
-
},
|
|
86152
|
-
{
|
|
86153
|
-
"name": "TABLET_BREAKPOINT",
|
|
86154
|
-
"coverageIgnore": false,
|
|
86155
|
-
"defaultValue": "996",
|
|
86156
|
-
"deprecated": false,
|
|
86157
|
-
"deprecationMessage": "",
|
|
86158
|
-
"type": "number",
|
|
86159
|
-
"indexKey": "",
|
|
86160
|
-
"optional": false,
|
|
86161
|
-
"description": "",
|
|
86162
|
-
"line": 53,
|
|
86163
|
-
"rawdescription": "\n",
|
|
85619
|
+
"description": "<p>The position of the arrow of the popover, when in mobile (full-width) mode.</p>\n",
|
|
85620
|
+
"line": 55,
|
|
85621
|
+
"rawdescription": "\n\nThe position of the arrow of the popover, when in mobile (full-width) mode.\n",
|
|
86164
85622
|
"modifierKind": [
|
|
85623
|
+
124,
|
|
86165
85624
|
148
|
|
86166
85625
|
]
|
|
86167
85626
|
}
|
|
@@ -86174,16 +85633,19 @@
|
|
|
86174
85633
|
"optional": false,
|
|
86175
85634
|
"returnType": "string",
|
|
86176
85635
|
"typeParameters": [],
|
|
86177
|
-
"line":
|
|
85636
|
+
"line": 108,
|
|
86178
85637
|
"deprecated": false,
|
|
86179
85638
|
"deprecationMessage": "",
|
|
86180
85639
|
"rawdescription": "\n\n",
|
|
86181
85640
|
"description": "",
|
|
85641
|
+
"modifierKind": [
|
|
85642
|
+
124
|
|
85643
|
+
],
|
|
86182
85644
|
"jsdoctags": [
|
|
86183
85645
|
{
|
|
86184
85646
|
"tagName": {
|
|
86185
|
-
"pos":
|
|
86186
|
-
"end":
|
|
85647
|
+
"pos": 3907,
|
|
85648
|
+
"end": 3914,
|
|
86187
85649
|
"kind": 80,
|
|
86188
85650
|
"id": 0,
|
|
86189
85651
|
"flags": 16842752,
|
|
@@ -86210,7 +85672,7 @@
|
|
|
86210
85672
|
"optional": false,
|
|
86211
85673
|
"returnType": "void",
|
|
86212
85674
|
"typeParameters": [],
|
|
86213
|
-
"line":
|
|
85675
|
+
"line": 86,
|
|
86214
85676
|
"deprecated": false,
|
|
86215
85677
|
"deprecationMessage": "",
|
|
86216
85678
|
"rawdescription": "\n",
|
|
@@ -86236,32 +85698,26 @@
|
|
|
86236
85698
|
"optional": false,
|
|
86237
85699
|
"returnType": "void",
|
|
86238
85700
|
"typeParameters": [],
|
|
86239
|
-
"line":
|
|
85701
|
+
"line": 93,
|
|
86240
85702
|
"deprecated": false,
|
|
86241
85703
|
"deprecationMessage": "",
|
|
86242
85704
|
"rawdescription": "\n",
|
|
86243
85705
|
"description": ""
|
|
86244
85706
|
},
|
|
86245
85707
|
{
|
|
86246
|
-
"name": "
|
|
85708
|
+
"name": "onClickOutside",
|
|
86247
85709
|
"coverageIgnore": false,
|
|
86248
85710
|
"args": [],
|
|
86249
85711
|
"optional": false,
|
|
86250
85712
|
"returnType": "void",
|
|
86251
85713
|
"typeParameters": [],
|
|
86252
|
-
"line":
|
|
85714
|
+
"line": 101,
|
|
86253
85715
|
"deprecated": false,
|
|
86254
85716
|
"deprecationMessage": "",
|
|
86255
85717
|
"rawdescription": "\n\nClose the login popover on click outside.\n",
|
|
86256
85718
|
"description": "<p>Close the login popover on click outside.</p>\n",
|
|
86257
|
-
"decorators": [
|
|
86258
|
-
{
|
|
86259
|
-
"name": "HostListener",
|
|
86260
|
-
"stringifiedArguments": "'eclClickOutside'"
|
|
86261
|
-
}
|
|
86262
|
-
],
|
|
86263
85719
|
"modifierKind": [
|
|
86264
|
-
|
|
85720
|
+
124
|
|
86265
85721
|
]
|
|
86266
85722
|
},
|
|
86267
85723
|
{
|
|
@@ -86280,11 +85736,14 @@
|
|
|
86280
85736
|
"optional": false,
|
|
86281
85737
|
"returnType": "void",
|
|
86282
85738
|
"typeParameters": [],
|
|
86283
|
-
"line":
|
|
85739
|
+
"line": 118,
|
|
86284
85740
|
"deprecated": false,
|
|
86285
85741
|
"deprecationMessage": "",
|
|
86286
85742
|
"rawdescription": "\n",
|
|
86287
85743
|
"description": "",
|
|
85744
|
+
"modifierKind": [
|
|
85745
|
+
124
|
|
85746
|
+
],
|
|
86288
85747
|
"jsdoctags": [
|
|
86289
85748
|
{
|
|
86290
85749
|
"name": "evt",
|
|
@@ -86315,11 +85774,14 @@
|
|
|
86315
85774
|
"optional": false,
|
|
86316
85775
|
"returnType": "void",
|
|
86317
85776
|
"typeParameters": [],
|
|
86318
|
-
"line":
|
|
85777
|
+
"line": 112,
|
|
86319
85778
|
"deprecated": false,
|
|
86320
85779
|
"deprecationMessage": "",
|
|
86321
85780
|
"rawdescription": "\n",
|
|
86322
85781
|
"description": "",
|
|
85782
|
+
"modifierKind": [
|
|
85783
|
+
124
|
|
85784
|
+
],
|
|
86323
85785
|
"jsdoctags": [
|
|
86324
85786
|
{
|
|
86325
85787
|
"name": "evt",
|
|
@@ -86376,34 +85838,8 @@
|
|
|
86376
85838
|
"coverageIgnore": false,
|
|
86377
85839
|
"deprecated": false,
|
|
86378
85840
|
"deprecationMessage": "",
|
|
86379
|
-
"hostBindings": [
|
|
86380
|
-
|
|
86381
|
-
"coverageIgnore": false,
|
|
86382
|
-
"name": "class",
|
|
86383
|
-
"actualName": "class",
|
|
86384
|
-
"defaultValue": "'ecl-site-header__login-container'",
|
|
86385
|
-
"deprecated": false,
|
|
86386
|
-
"deprecationMessage": "",
|
|
86387
|
-
"rawdescription": "\n",
|
|
86388
|
-
"description": "",
|
|
86389
|
-
"line": 38,
|
|
86390
|
-
"type": "string",
|
|
86391
|
-
"decorators": []
|
|
86392
|
-
}
|
|
86393
|
-
],
|
|
86394
|
-
"hostListeners": [
|
|
86395
|
-
{
|
|
86396
|
-
"coverageIgnore": false,
|
|
86397
|
-
"name": "eclClickOutside",
|
|
86398
|
-
"args": [],
|
|
86399
|
-
"argsDecorator": [],
|
|
86400
|
-
"deprecated": false,
|
|
86401
|
-
"deprecationMessage": "",
|
|
86402
|
-
"rawdescription": "\n\nClose the login popover on click outside.\n",
|
|
86403
|
-
"description": "<p>Close the login popover on click outside.</p>\n",
|
|
86404
|
-
"line": 84
|
|
86405
|
-
}
|
|
86406
|
-
],
|
|
85841
|
+
"hostBindings": [],
|
|
85842
|
+
"hostListeners": [],
|
|
86407
85843
|
"standalone": false,
|
|
86408
85844
|
"imports": [
|
|
86409
85845
|
{
|
|
@@ -86417,14 +85853,14 @@
|
|
|
86417
85853
|
"description": "<p>Component for login/logout as part of the harmonised site header. Emits events when user logs in and when user opens the\nlogin dropdown.</p>\n",
|
|
86418
85854
|
"rawdescription": "\n\nComponent for login/logout as part of the harmonised site header. Emits events when user logs in and when user opens the\nlogin dropdown.\n",
|
|
86419
85855
|
"type": "component",
|
|
86420
|
-
"sourceCode": "import { Component, DOCUMENT, ElementRef, EventEmitter,
|
|
85856
|
+
"sourceCode": "import { Component, DOCUMENT, ElementRef, EventEmitter, OnChanges, OnDestroy, Output, SimpleChanges, afterNextRender, booleanAttribute, inject, signal, output, input, viewChild } from '@angular/core';\nimport { Subject, debounceTime, fromEvent, takeUntil } from 'rxjs';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ECLBaseDirective, ECLClickOutsideDirective } from '@eui/ecl/core';\nimport { EclRtlService } from '@eui/ecl/core';\nimport { EclSiteHeaderLoginBoxToggleEvent, EclSiteHeaderLoginEvent } from '../events';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/** Half the arrow's own width, matching ECL's `arrowSize`. */\nconst ARROW_SIZE = '0.5rem';\n/** Debounce for the resize recomputation, matching ECL's `handleResize`. */\nconst RESIZE_DEBOUNCE = 200;\n\n/**\n * Component for login/logout as part of the harmonised site header. Emits events when user logs in and when user opens the\n * login dropdown.\n */\n@Component({\n selector: 'ecl-site-header-login',\n templateUrl: './ecl-site-header-login.component.html',\n imports: [TranslatePipe, ...EUI_ECL_ICON],\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n hostDirectives: [\n {\n directive: ECLClickOutsideDirective,\n outputs: ['eclClickOutside'],\n },\n ],\n host: {\n class: 'ecl-site-header__login-container',\n '(eclClickOutside)': 'onClickOutside()',\n },\n})\nexport class EclSiteHeaderLoginComponent extends ECLBaseDirective implements OnChanges, OnDestroy {\n readonly isLoggedIn = input(false, { transform: booleanAttribute });\n\n readonly login = output<EclSiteHeaderLoginEvent>();\n @Output() loginBoxToggle = new EventEmitter<EclSiteHeaderLoginBoxToggleEvent>();\n\n /**\n * If login popover is open (true) or closed (false). Kept public because the parent\n * `ecl-site-header` resets it directly when the search box opens.\n */\n isLoginBoxActive = false;\n\n /**\n * The position of the arrow of the popover, when in mobile (full-width) mode.\n */\n protected readonly loginArrowPosition = signal<string | undefined>(undefined);\n\n /**\n * The login link element from the view, i.e. the login button (the toggle).\n */\n private readonly loginLinkElement = viewChild('loginLink', { read: ElementRef });\n /**\n * The login box element from the view, i.e. the dropdown the arrow points at.\n */\n private readonly loginBoxElement = viewChild('loginBox', { read: ElementRef });\n\n private readonly destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly eclRtlService = inject(EclRtlService);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView;\n\n constructor() {\n super();\n afterNextRender(() => {\n // Recompute the arrow only while the box is open.\n this.eclRtlService.currentRtlState$.pipe(debounceTime(50), takeUntil(this.destroy$)).subscribe(() => {\n if (this.isLoginBoxActive) this.setLoginArrow();\n });\n if (this.window) {\n fromEvent(this.window, 'resize').pipe(debounceTime(RESIZE_DEBOUNCE), takeUntil(this.destroy$)).subscribe(() => {\n if (this.isLoginBoxActive) this.setLoginArrow();\n });\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const isLoggedInChange = changes.isLoggedIn;\n if (isLoggedInChange && isLoggedInChange.previousValue === true) {\n this.isLoginBoxActive = false;\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Close the login popover on click outside.\n */\n protected onClickOutside(): void {\n this.onLoginBoxClose();\n }\n\n /**\n * @returns classes for the login popover.\n */\n protected getLoginBoxCssClasses(): string {\n return ['ecl-site-header__login-box', this.isLoginBoxActive ? 'ecl-site-header__login-box--active' : ''].join(' ');\n }\n\n protected onLoginClick(evt: MouseEvent): void {\n const event = new EclSiteHeaderLoginEvent();\n this.login.emit(event);\n evt.preventDefault();\n }\n\n protected onLoginBoxToggle(evt: MouseEvent): void {\n this.isLoginBoxActive = !this.isLoginBoxActive;\n const event = new EclSiteHeaderLoginBoxToggleEvent(this.isLoginBoxActive);\n this.loginBoxToggle.next(event);\n evt.preventDefault();\n\n if (this.isLoginBoxActive) {\n // Measure after the '--active' class is applied and the box reflows to full width.\n this.window?.requestAnimationFrame(() => this.setLoginArrow());\n }\n }\n\n private onLoginBoxClose(): void {\n if (this.isLoginBoxActive) {\n this.isLoginBoxActive = false;\n const event = new EclSiteHeaderLoginBoxToggleEvent(this.isLoginBoxActive);\n this.loginBoxToggle.next(event);\n this.loginArrowPosition.set(undefined);\n }\n }\n\n /**\n * Position the dropdown arrow so it points at the toggle button.\n * The arrow only exists on the mobile full-width dropdown, so the calculation is gated on the box\n * spanning (almost) the full viewport width. The offset is relative to the box's own left edge.\n * Mirrors ECL's 'setLoginArrow' in site-header.js.\n */\n private setLoginArrow(): void {\n const loginBoxRect = this.loginBoxElement()?.nativeElement.getBoundingClientRect();\n const toggleButtonRect = this.loginLinkElement()?.nativeElement.getBoundingClientRect();\n if (!loginBoxRect || !toggleButtonRect) return;\n\n const clientWidth = this.document.documentElement.clientWidth;\n if (loginBoxRect.width >= clientWidth - 1) {\n const arrowOffset = toggleButtonRect.left - loginBoxRect.left + toggleButtonRect.width / 2;\n this.loginArrowPosition.set(`calc(${arrowOffset}px - ${ARROW_SIZE})`);\n } else {\n this.loginArrowPosition.set(undefined);\n }\n }\n}\n",
|
|
86421
85857
|
"assetsDirs": [],
|
|
86422
85858
|
"styleUrlsData": "",
|
|
86423
85859
|
"stylesData": "\n :host {\n display: block;\n }\n \n",
|
|
86424
85860
|
"jsdoctags": [
|
|
86425
85861
|
{
|
|
86426
|
-
"pos":
|
|
86427
|
-
"end":
|
|
85862
|
+
"pos": 793,
|
|
85863
|
+
"end": 943,
|
|
86428
85864
|
"kind": 321,
|
|
86429
85865
|
"id": 0,
|
|
86430
85866
|
"flags": 16777216,
|
|
@@ -86439,7 +85875,7 @@
|
|
|
86439
85875
|
"deprecated": false,
|
|
86440
85876
|
"deprecationMessage": "",
|
|
86441
85877
|
"args": [],
|
|
86442
|
-
"line":
|
|
85878
|
+
"line": 69,
|
|
86443
85879
|
"rawdescription": "\n"
|
|
86444
85880
|
},
|
|
86445
85881
|
"extends": [
|
|
@@ -86461,11 +85897,11 @@
|
|
|
86461
85897
|
"type": "module"
|
|
86462
85898
|
},
|
|
86463
85899
|
{
|
|
86464
|
-
"name": "
|
|
85900
|
+
"name": "ECLClickOutsideDirective",
|
|
86465
85901
|
"type": "directive"
|
|
86466
85902
|
},
|
|
86467
85903
|
{
|
|
86468
|
-
"name": "
|
|
85904
|
+
"name": "ECLBaseDirective",
|
|
86469
85905
|
"type": "directive"
|
|
86470
85906
|
},
|
|
86471
85907
|
{
|
|
@@ -86478,7 +85914,7 @@
|
|
|
86478
85914
|
}
|
|
86479
85915
|
]
|
|
86480
85916
|
},
|
|
86481
|
-
"templateData": "@if (isLoggedIn()) {\n <a\n #loginLink\n href=\"#\"\n class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__login-toggle\"\n aria-controls=\"login-box-id\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginBoxToggle($event)\">\n <ecl-icon icon=\"logged-in\" size=\"m\" class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGGED-IN' | translate }}\n </a>\n <div\n id=\"login-box-id\"\n [style]=\"{'--ecl-login-arrow-position': loginArrowPosition}\"\n class=\"{{ getLoginBoxCssClasses() }}\">\n <ng-content></ng-content>\n </div>\n} @else {\n <a\n href=\"#\"\n class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__login-toggle\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginClick($event)\">\n <ecl-icon icon=\"log-in\" size=\"m\" class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGIN' | translate }}\n </a>\n}\n"
|
|
85917
|
+
"templateData": "@if (isLoggedIn()) {\n <a\n #loginLink\n href=\"#\"\n class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__login-toggle\"\n aria-controls=\"login-box-id\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginBoxToggle($event)\">\n <ecl-icon icon=\"logged-in\" size=\"m\" class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGGED-IN' | translate }}\n </a>\n <div\n #loginBox\n id=\"login-box-id\"\n [style]=\"{'--ecl-login-arrow-position': loginArrowPosition()}\"\n class=\"{{ getLoginBoxCssClasses() }}\">\n <ng-content></ng-content>\n </div>\n} @else {\n <a\n href=\"#\"\n class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__login-toggle\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginClick($event)\">\n <ecl-icon icon=\"log-in\" size=\"m\" class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGIN' | translate }}\n </a>\n}\n"
|
|
86482
85918
|
},
|
|
86483
85919
|
{
|
|
86484
85920
|
"name": "EclSiteHeaderNotificationComponent",
|
|
@@ -86716,10 +86152,11 @@
|
|
|
86716
86152
|
},
|
|
86717
86153
|
{
|
|
86718
86154
|
"name": "EclSiteHeaderSearchComponent",
|
|
86719
|
-
"id": "component-EclSiteHeaderSearchComponent-
|
|
86155
|
+
"id": "component-EclSiteHeaderSearchComponent-f2c0c32058c22e107aa32c83d7149c58b3c0b5f941191d41160d6a1cb598d61204cdd35709bde16564d408b29b6baa2a4fc1d59a815075d744b7a06bd0e874c7",
|
|
86720
86156
|
"file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
|
|
86721
86157
|
"encapsulation": [],
|
|
86722
86158
|
"entryComponents": [],
|
|
86159
|
+
"host": {},
|
|
86723
86160
|
"inputs": [],
|
|
86724
86161
|
"outputs": [],
|
|
86725
86162
|
"providers": [
|
|
@@ -86737,7 +86174,15 @@
|
|
|
86737
86174
|
],
|
|
86738
86175
|
"templateVariables": [],
|
|
86739
86176
|
"viewProviders": [],
|
|
86740
|
-
"hostDirectives": [
|
|
86177
|
+
"hostDirectives": [
|
|
86178
|
+
{
|
|
86179
|
+
"name": "ECLClickOutsideDirective",
|
|
86180
|
+
"inputs": [],
|
|
86181
|
+
"outputs": [
|
|
86182
|
+
"eclClickOutside"
|
|
86183
|
+
]
|
|
86184
|
+
}
|
|
86185
|
+
],
|
|
86741
86186
|
"inputsClass": [
|
|
86742
86187
|
{
|
|
86743
86188
|
"coverageIgnore": false,
|
|
@@ -86746,7 +86191,7 @@
|
|
|
86746
86191
|
"deprecationMessage": "",
|
|
86747
86192
|
"rawdescription": "\n",
|
|
86748
86193
|
"description": "",
|
|
86749
|
-
"line":
|
|
86194
|
+
"line": 56,
|
|
86750
86195
|
"type": "string",
|
|
86751
86196
|
"decorators": []
|
|
86752
86197
|
},
|
|
@@ -86760,7 +86205,7 @@
|
|
|
86760
86205
|
"indexKey": "",
|
|
86761
86206
|
"optional": false,
|
|
86762
86207
|
"description": "",
|
|
86763
|
-
"line":
|
|
86208
|
+
"line": 58,
|
|
86764
86209
|
"rawdescription": "\n",
|
|
86765
86210
|
"modifierKind": [
|
|
86766
86211
|
148
|
|
@@ -86777,7 +86222,7 @@
|
|
|
86777
86222
|
"indexKey": "",
|
|
86778
86223
|
"optional": false,
|
|
86779
86224
|
"description": "",
|
|
86780
|
-
"line":
|
|
86225
|
+
"line": 57,
|
|
86781
86226
|
"rawdescription": "\n",
|
|
86782
86227
|
"modifierKind": [
|
|
86783
86228
|
148
|
|
@@ -86835,7 +86280,7 @@
|
|
|
86835
86280
|
"defaultValue": "new EventEmitter<EclSiteHeaderSearchToggleEvent>()",
|
|
86836
86281
|
"deprecated": false,
|
|
86837
86282
|
"deprecationMessage": "",
|
|
86838
|
-
"line":
|
|
86283
|
+
"line": 61,
|
|
86839
86284
|
"type": "EventEmitter"
|
|
86840
86285
|
},
|
|
86841
86286
|
{
|
|
@@ -86847,7 +86292,7 @@
|
|
|
86847
86292
|
"indexKey": "",
|
|
86848
86293
|
"optional": false,
|
|
86849
86294
|
"description": "",
|
|
86850
|
-
"line":
|
|
86295
|
+
"line": 60,
|
|
86851
86296
|
"rawdescription": "\n",
|
|
86852
86297
|
"modifierKind": [
|
|
86853
86298
|
148
|
|
@@ -86856,28 +86301,6 @@
|
|
|
86856
86301
|
}
|
|
86857
86302
|
],
|
|
86858
86303
|
"propertiesClass": [
|
|
86859
|
-
{
|
|
86860
|
-
"name": "class",
|
|
86861
|
-
"coverageIgnore": false,
|
|
86862
|
-
"defaultValue": "'ecl-site-header__search-container'",
|
|
86863
|
-
"deprecated": false,
|
|
86864
|
-
"deprecationMessage": "",
|
|
86865
|
-
"type": "string",
|
|
86866
|
-
"indexKey": "",
|
|
86867
|
-
"optional": false,
|
|
86868
|
-
"description": "",
|
|
86869
|
-
"line": 40,
|
|
86870
|
-
"rawdescription": "\n",
|
|
86871
|
-
"decorators": [
|
|
86872
|
-
{
|
|
86873
|
-
"name": "HostBinding",
|
|
86874
|
-
"stringifiedArguments": "'class'"
|
|
86875
|
-
}
|
|
86876
|
-
],
|
|
86877
|
-
"modifierKind": [
|
|
86878
|
-
171
|
|
86879
|
-
]
|
|
86880
|
-
},
|
|
86881
86304
|
{
|
|
86882
86305
|
"name": "isSearchBoxActive",
|
|
86883
86306
|
"coverageIgnore": false,
|
|
@@ -86887,63 +86310,24 @@
|
|
|
86887
86310
|
"type": "unknown",
|
|
86888
86311
|
"indexKey": "",
|
|
86889
86312
|
"optional": false,
|
|
86890
|
-
"description": "",
|
|
86891
|
-
"line":
|
|
86892
|
-
"rawdescription": "\n"
|
|
86893
|
-
"modifierKind": [
|
|
86894
|
-
125
|
|
86895
|
-
]
|
|
86896
|
-
},
|
|
86897
|
-
{
|
|
86898
|
-
"name": "role",
|
|
86899
|
-
"coverageIgnore": false,
|
|
86900
|
-
"defaultValue": "'search'",
|
|
86901
|
-
"deprecated": false,
|
|
86902
|
-
"deprecationMessage": "",
|
|
86903
|
-
"type": "string",
|
|
86904
|
-
"indexKey": "",
|
|
86905
|
-
"optional": false,
|
|
86906
|
-
"description": "<p>The default role of the component is 'search', should not be changed.</p>\n",
|
|
86907
|
-
"line": 44,
|
|
86908
|
-
"rawdescription": "\n\nThe default role of the component is 'search', should not be changed.\n",
|
|
86909
|
-
"decorators": [
|
|
86910
|
-
{
|
|
86911
|
-
"name": "HostBinding",
|
|
86912
|
-
"stringifiedArguments": "'attr.role'"
|
|
86913
|
-
}
|
|
86914
|
-
],
|
|
86915
|
-
"modifierKind": [
|
|
86916
|
-
171
|
|
86917
|
-
]
|
|
86313
|
+
"description": "<p>Whether the search dropdown is open. Kept public because the parent\n<code>ecl-site-header</code> resets it directly when the login box opens.</p>\n",
|
|
86314
|
+
"line": 67,
|
|
86315
|
+
"rawdescription": "\n\nWhether the search dropdown is open. Kept public because the parent\n`ecl-site-header` resets it directly when the login box opens.\n"
|
|
86918
86316
|
},
|
|
86919
86317
|
{
|
|
86920
86318
|
"name": "searchArrowPosition",
|
|
86921
86319
|
"coverageIgnore": false,
|
|
86922
|
-
"
|
|
86923
|
-
"deprecationMessage": "",
|
|
86924
|
-
"type": "string",
|
|
86925
|
-
"indexKey": "",
|
|
86926
|
-
"optional": false,
|
|
86927
|
-
"description": "<p>The arrow position of the serahc dropdown, when in mobile mode.</p>\n",
|
|
86928
|
-
"line": 61,
|
|
86929
|
-
"rawdescription": "\n\nThe arrow position of the serahc dropdown, when in mobile mode.\n",
|
|
86930
|
-
"modifierKind": [
|
|
86931
|
-
125
|
|
86932
|
-
]
|
|
86933
|
-
},
|
|
86934
|
-
{
|
|
86935
|
-
"name": "searchLinkElement",
|
|
86936
|
-
"coverageIgnore": false,
|
|
86937
|
-
"defaultValue": "viewChild('searchLink', { read: ElementRef })",
|
|
86320
|
+
"defaultValue": "signal<string | undefined>(undefined)",
|
|
86938
86321
|
"deprecated": false,
|
|
86939
86322
|
"deprecationMessage": "",
|
|
86940
86323
|
"type": "unknown",
|
|
86941
86324
|
"indexKey": "",
|
|
86942
86325
|
"optional": false,
|
|
86943
|
-
"description": "<p>The
|
|
86944
|
-
"line":
|
|
86945
|
-
"rawdescription": "\n\nThe
|
|
86326
|
+
"description": "<p>The arrow position of the search dropdown, when in mobile (full-width) mode.</p>\n",
|
|
86327
|
+
"line": 72,
|
|
86328
|
+
"rawdescription": "\n\nThe arrow position of the search dropdown, when in mobile (full-width) mode.\n",
|
|
86946
86329
|
"modifierKind": [
|
|
86330
|
+
124,
|
|
86947
86331
|
148
|
|
86948
86332
|
]
|
|
86949
86333
|
}
|
|
@@ -86956,16 +86340,19 @@
|
|
|
86956
86340
|
"optional": false,
|
|
86957
86341
|
"returnType": "string",
|
|
86958
86342
|
"typeParameters": [],
|
|
86959
|
-
"line":
|
|
86343
|
+
"line": 158,
|
|
86960
86344
|
"deprecated": false,
|
|
86961
86345
|
"deprecationMessage": "",
|
|
86962
86346
|
"rawdescription": "\n\n\n",
|
|
86963
86347
|
"description": "",
|
|
86348
|
+
"modifierKind": [
|
|
86349
|
+
124
|
|
86350
|
+
],
|
|
86964
86351
|
"jsdoctags": [
|
|
86965
86352
|
{
|
|
86966
86353
|
"tagName": {
|
|
86967
|
-
"pos":
|
|
86968
|
-
"end":
|
|
86354
|
+
"pos": 5933,
|
|
86355
|
+
"end": 5940,
|
|
86969
86356
|
"kind": 80,
|
|
86970
86357
|
"id": 0,
|
|
86971
86358
|
"flags": 16842752,
|
|
@@ -86983,7 +86370,7 @@
|
|
|
86983
86370
|
"optional": false,
|
|
86984
86371
|
"returnType": "void",
|
|
86985
86372
|
"typeParameters": [],
|
|
86986
|
-
"line":
|
|
86373
|
+
"line": 94,
|
|
86987
86374
|
"deprecated": false,
|
|
86988
86375
|
"deprecationMessage": "",
|
|
86989
86376
|
"rawdescription": "\n",
|
|
@@ -86996,12 +86383,28 @@
|
|
|
86996
86383
|
"optional": false,
|
|
86997
86384
|
"returnType": "void",
|
|
86998
86385
|
"typeParameters": [],
|
|
86999
|
-
"line":
|
|
86386
|
+
"line": 108,
|
|
87000
86387
|
"deprecated": false,
|
|
87001
86388
|
"deprecationMessage": "",
|
|
87002
86389
|
"rawdescription": "\n",
|
|
87003
86390
|
"description": ""
|
|
87004
86391
|
},
|
|
86392
|
+
{
|
|
86393
|
+
"name": "onClickOutside",
|
|
86394
|
+
"coverageIgnore": false,
|
|
86395
|
+
"args": [],
|
|
86396
|
+
"optional": false,
|
|
86397
|
+
"returnType": "void",
|
|
86398
|
+
"typeParameters": [],
|
|
86399
|
+
"line": 131,
|
|
86400
|
+
"deprecated": false,
|
|
86401
|
+
"deprecationMessage": "",
|
|
86402
|
+
"rawdescription": "\n\nClose the search dropdown on click outside, matching ECL's `handleClickGlobal`.\n",
|
|
86403
|
+
"description": "<p>Close the search dropdown on click outside, matching ECL's <code>handleClickGlobal</code>.</p>\n",
|
|
86404
|
+
"modifierKind": [
|
|
86405
|
+
124
|
|
86406
|
+
]
|
|
86407
|
+
},
|
|
87005
86408
|
{
|
|
87006
86409
|
"name": "onModelChange",
|
|
87007
86410
|
"coverageIgnore": false,
|
|
@@ -87018,11 +86421,14 @@
|
|
|
87018
86421
|
"optional": false,
|
|
87019
86422
|
"returnType": "void",
|
|
87020
86423
|
"typeParameters": [],
|
|
87021
|
-
"line":
|
|
86424
|
+
"line": 162,
|
|
87022
86425
|
"deprecated": false,
|
|
87023
86426
|
"deprecationMessage": "",
|
|
87024
86427
|
"rawdescription": "\n",
|
|
87025
86428
|
"description": "",
|
|
86429
|
+
"modifierKind": [
|
|
86430
|
+
124
|
|
86431
|
+
],
|
|
87026
86432
|
"jsdoctags": [
|
|
87027
86433
|
{
|
|
87028
86434
|
"name": "newValue",
|
|
@@ -87053,11 +86459,14 @@
|
|
|
87053
86459
|
"optional": false,
|
|
87054
86460
|
"returnType": "boolean",
|
|
87055
86461
|
"typeParameters": [],
|
|
87056
|
-
"line":
|
|
86462
|
+
"line": 135,
|
|
87057
86463
|
"deprecated": false,
|
|
87058
86464
|
"deprecationMessage": "",
|
|
87059
86465
|
"rawdescription": "\n",
|
|
87060
86466
|
"description": "",
|
|
86467
|
+
"modifierKind": [
|
|
86468
|
+
124
|
|
86469
|
+
],
|
|
87061
86470
|
"jsdoctags": [
|
|
87062
86471
|
{
|
|
87063
86472
|
"name": "evt",
|
|
@@ -87088,11 +86497,14 @@
|
|
|
87088
86497
|
"optional": false,
|
|
87089
86498
|
"returnType": "void",
|
|
87090
86499
|
"typeParameters": [],
|
|
87091
|
-
"line":
|
|
86500
|
+
"line": 141,
|
|
87092
86501
|
"deprecated": false,
|
|
87093
86502
|
"deprecationMessage": "",
|
|
87094
86503
|
"rawdescription": "\n",
|
|
87095
86504
|
"description": "",
|
|
86505
|
+
"modifierKind": [
|
|
86506
|
+
124
|
|
86507
|
+
],
|
|
87096
86508
|
"jsdoctags": [
|
|
87097
86509
|
{
|
|
87098
86510
|
"name": "evt",
|
|
@@ -87123,7 +86535,7 @@
|
|
|
87123
86535
|
"optional": false,
|
|
87124
86536
|
"returnType": "void",
|
|
87125
86537
|
"typeParameters": [],
|
|
87126
|
-
"line":
|
|
86538
|
+
"line": 119,
|
|
87127
86539
|
"deprecated": false,
|
|
87128
86540
|
"deprecationMessage": "",
|
|
87129
86541
|
"rawdescription": "\n",
|
|
@@ -87158,7 +86570,7 @@
|
|
|
87158
86570
|
"optional": false,
|
|
87159
86571
|
"returnType": "void",
|
|
87160
86572
|
"typeParameters": [],
|
|
87161
|
-
"line":
|
|
86573
|
+
"line": 124,
|
|
87162
86574
|
"deprecated": false,
|
|
87163
86575
|
"deprecationMessage": "",
|
|
87164
86576
|
"rawdescription": "\n",
|
|
@@ -87193,7 +86605,7 @@
|
|
|
87193
86605
|
"optional": false,
|
|
87194
86606
|
"returnType": "void",
|
|
87195
86607
|
"typeParameters": [],
|
|
87196
|
-
"line":
|
|
86608
|
+
"line": 114,
|
|
87197
86609
|
"deprecated": false,
|
|
87198
86610
|
"deprecationMessage": "",
|
|
87199
86611
|
"rawdescription": "\n",
|
|
@@ -87254,34 +86666,7 @@
|
|
|
87254
86666
|
"coverageIgnore": false,
|
|
87255
86667
|
"deprecated": false,
|
|
87256
86668
|
"deprecationMessage": "",
|
|
87257
|
-
"hostBindings": [
|
|
87258
|
-
{
|
|
87259
|
-
"coverageIgnore": false,
|
|
87260
|
-
"name": "attr.role",
|
|
87261
|
-
"actualName": "role",
|
|
87262
|
-
"defaultValue": "'search'",
|
|
87263
|
-
"deprecated": false,
|
|
87264
|
-
"deprecationMessage": "",
|
|
87265
|
-
"rawdescription": "\n\nThe default role of the component is 'search', should not be changed.\n",
|
|
87266
|
-
"description": "<p>The default role of the component is 'search', should not be changed.</p>\n",
|
|
87267
|
-
"line": 44,
|
|
87268
|
-
"type": "string",
|
|
87269
|
-
"decorators": []
|
|
87270
|
-
},
|
|
87271
|
-
{
|
|
87272
|
-
"coverageIgnore": false,
|
|
87273
|
-
"name": "class",
|
|
87274
|
-
"actualName": "class",
|
|
87275
|
-
"defaultValue": "'ecl-site-header__search-container'",
|
|
87276
|
-
"deprecated": false,
|
|
87277
|
-
"deprecationMessage": "",
|
|
87278
|
-
"rawdescription": "\n",
|
|
87279
|
-
"description": "",
|
|
87280
|
-
"line": 40,
|
|
87281
|
-
"type": "string",
|
|
87282
|
-
"decorators": []
|
|
87283
|
-
}
|
|
87284
|
-
],
|
|
86669
|
+
"hostBindings": [],
|
|
87285
86670
|
"hostListeners": [],
|
|
87286
86671
|
"standalone": false,
|
|
87287
86672
|
"imports": [
|
|
@@ -87303,14 +86688,14 @@
|
|
|
87303
86688
|
"description": "<p>This component builds the search box in the ecl-site-header component. Adds specific style and functionality, emits\n events on search and search toggle.</p>\n",
|
|
87304
86689
|
"rawdescription": "\n\nThis component builds the search box in the ecl-site-header component. Adds specific style and functionality, emits\n events on search and search toggle.\n",
|
|
87305
86690
|
"type": "component",
|
|
87306
|
-
"sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport { AfterViewInit,
|
|
86691
|
+
"sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport { AfterViewInit, Component, DOCUMENT, ElementRef, EventEmitter, forwardRef, inject, Input, OnDestroy, Output, PLATFORM_ID, Provider, output, input, signal, viewChild } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclSearchFormEvent, EUI_ECL_SEARCH_FORM } from '@eui/ecl/components/ecl-search-form';\nimport { ECLBaseDirective, ECLClickOutsideDirective, EclRtlService } from '@eui/ecl/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { debounceTime, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { EclSiteHeaderSearchEvent, EclSiteHeaderSearchToggleEvent } from '../events';\n\nexport const ECL_SITE_HEADER_SEARCH_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EclSiteHeaderSearchComponent),\n multi: true,\n};\n\nconst noop = (): void => {\n /** empty*/\n};\n\n/** Half the arrow's own width, matching ECL's `arrowSize`. */\nconst ARROW_SIZE = '0.5rem';\n/** Debounce for the resize recomputation, matching ECL's `handleResize`. */\nconst RESIZE_DEBOUNCE = 200;\n\n/**\n * This component builds the search box in the ecl-site-header component. Adds specific style and functionality, emits\n * events on search and search toggle.\n */\n@Component({\n selector: 'ecl-site-header-search',\n templateUrl: './ecl-site-header-search.component.html',\n imports: [FormsModule, TranslatePipe, ...EUI_ECL_SEARCH_FORM, ...EUI_ECL_ICON],\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n providers: [ECL_SITE_HEADER_SEARCH_VALUE_ACCESSOR],\n hostDirectives: [\n {\n directive: ECLClickOutsideDirective,\n outputs: ['eclClickOutside'],\n },\n ],\n host: {\n class: 'ecl-site-header__search-container',\n // The default role of the component is 'search', should not be changed.\n role: 'search',\n '(eclClickOutside)': 'onClickOutside()',\n },\n})\nexport class EclSiteHeaderSearchComponent extends ECLBaseDirective implements ControlValueAccessor, AfterViewInit, OnDestroy {\n @Input() searchInputText: string;\n readonly searchInputPlaceholder = input<string>(undefined);\n readonly searchButtonLabel = input<string>(undefined);\n\n readonly searchEvent = output<EclSiteHeaderSearchEvent>();\n @Output() searchToggle = new EventEmitter<EclSiteHeaderSearchToggleEvent>();\n\n /**\n * Whether the search dropdown is open. Kept public because the parent\n * `ecl-site-header` resets it directly when the login box opens.\n */\n isSearchBoxActive = false;\n\n /**\n * The arrow position of the search dropdown, when in mobile (full-width) mode.\n */\n protected readonly searchArrowPosition = signal<string | undefined>(undefined);\n\n /**\n * The search link element from the view, i.e. the search button (the toggle).\n */\n private readonly searchLinkElement = viewChild('searchLink', { read: ElementRef });\n /**\n * The search form element from the view, i.e. the dropdown box the arrow points from.\n */\n private readonly searchFormElement = viewChild('searchForm', { read: ElementRef });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private onChange: (_: any) => void = noop;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private onTouched: (_: any) => void = noop;\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly eclRtlService = inject(EclRtlService);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView; // Window | null\n\n ngAfterViewInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n // Recompute while open on resize (debounced, matching ECL's handleResize).\n if (this.window) {\n fromEvent(this.window, 'resize')\n .pipe(debounceTime(RESIZE_DEBOUNCE), takeUntil(this.destroy$))\n .subscribe(() => this.setSearchArrow());\n }\n\n // Recompute while open on RTL direction change.\n this.eclRtlService.currentRtlState$.pipe(debounceTime(50), takeUntil(this.destroy$)).subscribe(() => this.setSearchArrow());\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n writeValue(value: any): void {\n this.searchInputText = value;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /**\n * Close the search dropdown on click outside, matching ECL's `handleClickGlobal`.\n */\n protected onClickOutside(): void {\n this.closeSearchBox();\n }\n\n protected onSearch(evt: EclSearchFormEvent): boolean {\n this.searchEvent.emit(new EclSiteHeaderSearchEvent(evt.keyword));\n this.onChange(evt.keyword);\n return false;\n }\n\n protected onSearchBoxToggle(evt: MouseEvent): void {\n this.isSearchBoxActive = !this.isSearchBoxActive;\n const event = new EclSiteHeaderSearchToggleEvent(this.isSearchBoxActive);\n this.searchToggle.next(event);\n evt.preventDefault();\n\n // Measure after the `--active` class is applied and the box reflows to\n // full width (matching ECL's toggleSearch -> setSearchArrow order).\n if (this.isSearchBoxActive) {\n this.window?.requestAnimationFrame(() => this.setSearchArrow());\n }\n }\n\n /**\n *\n * @returns The classes for the ecl search form.\n */\n protected getSearchBoxCssClasses(): string {\n return ['ecl-site-header__search', this.isSearchBoxActive ? 'ecl-site-header__search--active' : ''].join(' ');\n }\n\n protected onModelChange(newValue: string): void {\n this.searchInputText = newValue;\n this.onChange(newValue);\n }\n\n private closeSearchBox(): void {\n if (!this.isSearchBoxActive) return;\n\n this.isSearchBoxActive = false;\n this.searchToggle.next(new EclSiteHeaderSearchToggleEvent(this.isSearchBoxActive));\n this.searchArrowPosition.set(undefined);\n }\n\n /**\n * Positions the dropdown arrow so it points at the center of the search toggle button.\n * Mirrors ECL's `setSearchArrow`: the arrow position is an offset relative to the\n * search form's own left edge, and it only applies to the mobile full-width dropdown\n * (`searchFormRect.width >= clientWidth - 1`, the `- 1` absorbing subpixel rounding).\n */\n private setSearchArrow(): void {\n if (!this.isSearchBoxActive) return;\n\n const searchFormRect = this.searchFormElement()?.nativeElement.getBoundingClientRect();\n const toggleButtonRect = this.searchLinkElement()?.nativeElement.getBoundingClientRect();\n if (!searchFormRect || !toggleButtonRect) return;\n\n const clientWidth = this.document.documentElement.clientWidth;\n if (searchFormRect.width >= clientWidth - 1) {\n const arrowOffset = toggleButtonRect.left - searchFormRect.left + toggleButtonRect.width / 2;\n this.searchArrowPosition.set(`calc(${arrowOffset}px - ${ARROW_SIZE})`);\n } else {\n this.searchArrowPosition.set(undefined);\n }\n }\n}\n",
|
|
87307
86692
|
"assetsDirs": [],
|
|
87308
86693
|
"styleUrlsData": "",
|
|
87309
86694
|
"stylesData": "\n :host {\n display: block;\n }\n \n",
|
|
87310
86695
|
"jsdoctags": [
|
|
87311
86696
|
{
|
|
87312
|
-
"pos":
|
|
87313
|
-
"end":
|
|
86697
|
+
"pos": 1221,
|
|
86698
|
+
"end": 1387,
|
|
87314
86699
|
"kind": 321,
|
|
87315
86700
|
"id": 0,
|
|
87316
86701
|
"flags": 16777216,
|
|
@@ -87350,6 +86735,10 @@
|
|
|
87350
86735
|
"name": "ECL_SITE_HEADER_SEARCH_VALUE_ACCESSOR",
|
|
87351
86736
|
"type": "injectable"
|
|
87352
86737
|
},
|
|
86738
|
+
{
|
|
86739
|
+
"name": "ECLClickOutsideDirective",
|
|
86740
|
+
"type": "directive"
|
|
86741
|
+
},
|
|
87353
86742
|
{
|
|
87354
86743
|
"name": "ECLBaseDirective",
|
|
87355
86744
|
"type": "directive"
|
|
@@ -87368,7 +86757,7 @@
|
|
|
87368
86757
|
}
|
|
87369
86758
|
]
|
|
87370
86759
|
},
|
|
87371
|
-
"templateData": "<a\n #searchLink\n href=\"#\"\n class=\"ecl-button ecl-button--tertiary ecl-site-header__search-toggle ecl-button--neutral\"\n data-ecl-search-toggle=\"true\"\n aria-controls=\"search-form-id\"\n [attr.aria-expanded]=\"isSearchBoxActive\"\n (click)=\"onSearchBoxToggle($event)\">\n <ecl-icon icon=\"search\" size=\"m\" class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.common.SEARCH' | translate }}\n</a>\n\n<ecl-search-form\n [style]=\"{'--ecl-search-arrow-position': searchArrowPosition}\"\n (searchEvent)=\"onSearch($event)\"\n [placeholder]=\"searchInputPlaceholder()\"\n (ngModelChange)=\"onModelChange($event)\"\n [(ngModel)]=\"searchInputText\"\n [searchButtonLabel]=\"searchButtonLabel()\"\n [class]=\"getSearchBoxCssClasses()\">\n</ecl-search-form>\n"
|
|
86760
|
+
"templateData": "<a\n #searchLink\n href=\"#\"\n class=\"ecl-button ecl-button--tertiary ecl-site-header__search-toggle ecl-button--neutral\"\n data-ecl-search-toggle=\"true\"\n aria-controls=\"search-form-id\"\n [attr.aria-expanded]=\"isSearchBoxActive\"\n (click)=\"onSearchBoxToggle($event)\">\n <ecl-icon icon=\"search\" size=\"m\" class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.common.SEARCH' | translate }}\n</a>\n\n<ecl-search-form\n #searchForm\n [style]=\"{'--ecl-search-arrow-position': searchArrowPosition()}\"\n (searchEvent)=\"onSearch($event)\"\n [placeholder]=\"searchInputPlaceholder()\"\n (ngModelChange)=\"onModelChange($event)\"\n [(ngModel)]=\"searchInputText\"\n [searchButtonLabel]=\"searchButtonLabel()\"\n [class]=\"getSearchBoxCssClasses()\">\n</ecl-search-form>\n"
|
|
87372
86761
|
},
|
|
87373
86762
|
{
|
|
87374
86763
|
"name": "EclSloganTickerComponent",
|
|
@@ -87894,10 +87283,11 @@
|
|
|
87894
87283
|
},
|
|
87895
87284
|
{
|
|
87896
87285
|
"name": "EclSocialMediaFollowComponent",
|
|
87897
|
-
"id": "component-EclSocialMediaFollowComponent-
|
|
87286
|
+
"id": "component-EclSocialMediaFollowComponent-fcab917e6198b64e907ac28615dad1cf477fb287a17e38ee55f63e5c5cebf077dd13d234b452e0e45a6191fd24561c50be0befe539635a09637022fc41c5ad91",
|
|
87898
87287
|
"file": "packages/ecl/components/ecl-social-media-follow/ecl-social-media-follow.component.ts",
|
|
87899
87288
|
"encapsulation": [],
|
|
87900
87289
|
"entryComponents": [],
|
|
87290
|
+
"host": {},
|
|
87901
87291
|
"inputs": [],
|
|
87902
87292
|
"outputs": [],
|
|
87903
87293
|
"providers": [],
|
|
@@ -87921,7 +87311,7 @@
|
|
|
87921
87311
|
"indexKey": "",
|
|
87922
87312
|
"optional": false,
|
|
87923
87313
|
"description": "",
|
|
87924
|
-
"line":
|
|
87314
|
+
"line": 12,
|
|
87925
87315
|
"rawdescription": "\n",
|
|
87926
87316
|
"modifierKind": [
|
|
87927
87317
|
148
|
|
@@ -87938,7 +87328,24 @@
|
|
|
87938
87328
|
"indexKey": "",
|
|
87939
87329
|
"optional": false,
|
|
87940
87330
|
"description": "",
|
|
87941
|
-
"line":
|
|
87331
|
+
"line": 15,
|
|
87332
|
+
"rawdescription": "\n",
|
|
87333
|
+
"modifierKind": [
|
|
87334
|
+
148
|
|
87335
|
+
],
|
|
87336
|
+
"required": false
|
|
87337
|
+
},
|
|
87338
|
+
{
|
|
87339
|
+
"name": "isIconOnly",
|
|
87340
|
+
"coverageIgnore": false,
|
|
87341
|
+
"defaultValue": "false",
|
|
87342
|
+
"deprecated": false,
|
|
87343
|
+
"deprecationMessage": "",
|
|
87344
|
+
"type": "boolean",
|
|
87345
|
+
"indexKey": "",
|
|
87346
|
+
"optional": false,
|
|
87347
|
+
"description": "",
|
|
87348
|
+
"line": 13,
|
|
87942
87349
|
"rawdescription": "\n",
|
|
87943
87350
|
"modifierKind": [
|
|
87944
87351
|
148
|
|
@@ -87955,7 +87362,7 @@
|
|
|
87955
87362
|
"indexKey": "",
|
|
87956
87363
|
"optional": false,
|
|
87957
87364
|
"description": "",
|
|
87958
|
-
"line":
|
|
87365
|
+
"line": 14,
|
|
87959
87366
|
"rawdescription": "\n",
|
|
87960
87367
|
"modifierKind": [
|
|
87961
87368
|
148
|
|
@@ -88051,27 +87458,14 @@
|
|
|
88051
87458
|
"coverageIgnore": false,
|
|
88052
87459
|
"deprecated": false,
|
|
88053
87460
|
"deprecationMessage": "",
|
|
88054
|
-
"hostBindings": [
|
|
88055
|
-
{
|
|
88056
|
-
"coverageIgnore": false,
|
|
88057
|
-
"name": "class",
|
|
88058
|
-
"actualName": "cssClasses",
|
|
88059
|
-
"deprecated": false,
|
|
88060
|
-
"deprecationMessage": "",
|
|
88061
|
-
"rawdescription": "\n",
|
|
88062
|
-
"description": "",
|
|
88063
|
-
"line": 14,
|
|
88064
|
-
"type": "string",
|
|
88065
|
-
"decorators": []
|
|
88066
|
-
}
|
|
88067
|
-
],
|
|
87461
|
+
"hostBindings": [],
|
|
88068
87462
|
"hostListeners": [],
|
|
88069
87463
|
"standalone": false,
|
|
88070
87464
|
"imports": [],
|
|
88071
87465
|
"description": "",
|
|
88072
87466
|
"rawdescription": "\n",
|
|
88073
87467
|
"type": "component",
|
|
88074
|
-
"sourceCode": "import { Component,
|
|
87468
|
+
"sourceCode": "import { Component, booleanAttribute, input } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n@Component({\n selector: 'ecl-social-media-follow',\n templateUrl: './ecl-social-media-follow.component.html',\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclSocialMediaFollowComponent extends ECLBaseDirective {\n readonly description = input<string>(undefined);\n readonly isIconOnly = input(false, { transform: booleanAttribute });\n readonly isVertical = input(false, { transform: booleanAttribute });\n readonly horizontalAlignment = input<'right' | 'left' | string>('left');\n\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-social-media-follow'),\n this.isVertical() ? 'ecl-social-media-follow--vertical' : '',\n `ecl-social-media-follow--${this.horizontalAlignment()}`,\n ]\n .join(' ')\n .trim();\n }\n}\n",
|
|
88075
87469
|
"assetsDirs": [],
|
|
88076
87470
|
"styleUrlsData": "",
|
|
88077
87471
|
"stylesData": "",
|
|
@@ -88085,7 +87479,7 @@
|
|
|
88085
87479
|
"name": "cssClasses",
|
|
88086
87480
|
"type": "string",
|
|
88087
87481
|
"returnType": "string",
|
|
88088
|
-
"line":
|
|
87482
|
+
"line": 17,
|
|
88089
87483
|
"rawdescription": "\n",
|
|
88090
87484
|
"description": ""
|
|
88091
87485
|
}
|
|
@@ -88104,10 +87498,11 @@
|
|
|
88104
87498
|
},
|
|
88105
87499
|
{
|
|
88106
87500
|
"name": "EclSocialMediaFollowItemComponent",
|
|
88107
|
-
"id": "component-EclSocialMediaFollowItemComponent-
|
|
87501
|
+
"id": "component-EclSocialMediaFollowItemComponent-be2bc74a52d7b183206e23fa9c6edd0706816decad401fed2ccd0e2788dead5b1d6dbb066556634b97683220c7111e50c45fd911c2cccbe1ec6738847a5e6fdf",
|
|
88108
87502
|
"file": "packages/ecl/components/ecl-social-media-follow/ecl-social-media-follow-item.component.ts",
|
|
88109
87503
|
"encapsulation": [],
|
|
88110
87504
|
"entryComponents": [],
|
|
87505
|
+
"host": {},
|
|
88111
87506
|
"inputs": [],
|
|
88112
87507
|
"outputs": [],
|
|
88113
87508
|
"providers": [],
|
|
@@ -88131,7 +87526,7 @@
|
|
|
88131
87526
|
"indexKey": "",
|
|
88132
87527
|
"optional": false,
|
|
88133
87528
|
"description": "",
|
|
88134
|
-
"line":
|
|
87529
|
+
"line": 29,
|
|
88135
87530
|
"rawdescription": "\n",
|
|
88136
87531
|
"modifierKind": [
|
|
88137
87532
|
148
|
|
@@ -88148,7 +87543,7 @@
|
|
|
88148
87543
|
"indexKey": "",
|
|
88149
87544
|
"optional": false,
|
|
88150
87545
|
"description": "",
|
|
88151
|
-
"line":
|
|
87546
|
+
"line": 25,
|
|
88152
87547
|
"rawdescription": "\n",
|
|
88153
87548
|
"modifierKind": [
|
|
88154
87549
|
148
|
|
@@ -88164,7 +87559,7 @@
|
|
|
88164
87559
|
"indexKey": "",
|
|
88165
87560
|
"optional": false,
|
|
88166
87561
|
"description": "",
|
|
88167
|
-
"line":
|
|
87562
|
+
"line": 23,
|
|
88168
87563
|
"rawdescription": "\n",
|
|
88169
87564
|
"required": false
|
|
88170
87565
|
},
|
|
@@ -88178,7 +87573,7 @@
|
|
|
88178
87573
|
"indexKey": "",
|
|
88179
87574
|
"optional": false,
|
|
88180
87575
|
"description": "",
|
|
88181
|
-
"line":
|
|
87576
|
+
"line": 24,
|
|
88182
87577
|
"rawdescription": "\n",
|
|
88183
87578
|
"required": false
|
|
88184
87579
|
},
|
|
@@ -88192,7 +87587,7 @@
|
|
|
88192
87587
|
"indexKey": "",
|
|
88193
87588
|
"optional": false,
|
|
88194
87589
|
"description": "",
|
|
88195
|
-
"line":
|
|
87590
|
+
"line": 22,
|
|
88196
87591
|
"rawdescription": "\n",
|
|
88197
87592
|
"modifierKind": [
|
|
88198
87593
|
148
|
|
@@ -88209,7 +87604,7 @@
|
|
|
88209
87604
|
"indexKey": "",
|
|
88210
87605
|
"optional": false,
|
|
88211
87606
|
"description": "",
|
|
88212
|
-
"line":
|
|
87607
|
+
"line": 26,
|
|
88213
87608
|
"rawdescription": "\n",
|
|
88214
87609
|
"modifierKind": [
|
|
88215
87610
|
148
|
|
@@ -88226,7 +87621,7 @@
|
|
|
88226
87621
|
"indexKey": "",
|
|
88227
87622
|
"optional": false,
|
|
88228
87623
|
"description": "",
|
|
88229
|
-
"line":
|
|
87624
|
+
"line": 28,
|
|
88230
87625
|
"rawdescription": "\n",
|
|
88231
87626
|
"modifierKind": [
|
|
88232
87627
|
148
|
|
@@ -88243,7 +87638,7 @@
|
|
|
88243
87638
|
"indexKey": "",
|
|
88244
87639
|
"optional": false,
|
|
88245
87640
|
"description": "",
|
|
88246
|
-
"line":
|
|
87641
|
+
"line": 27,
|
|
88247
87642
|
"rawdescription": "\n",
|
|
88248
87643
|
"modifierKind": [
|
|
88249
87644
|
148
|
|
@@ -88304,7 +87699,7 @@
|
|
|
88304
87699
|
"indexKey": "",
|
|
88305
87700
|
"optional": false,
|
|
88306
87701
|
"description": "",
|
|
88307
|
-
"line":
|
|
87702
|
+
"line": 38,
|
|
88308
87703
|
"rawdescription": "\n",
|
|
88309
87704
|
"modifierKind": [
|
|
88310
87705
|
148
|
|
@@ -88312,30 +87707,7 @@
|
|
|
88312
87707
|
"required": false
|
|
88313
87708
|
}
|
|
88314
87709
|
],
|
|
88315
|
-
"propertiesClass": [
|
|
88316
|
-
{
|
|
88317
|
-
"name": "role",
|
|
88318
|
-
"coverageIgnore": false,
|
|
88319
|
-
"defaultValue": "'listitem'",
|
|
88320
|
-
"deprecated": false,
|
|
88321
|
-
"deprecationMessage": "",
|
|
88322
|
-
"type": "string",
|
|
88323
|
-
"indexKey": "",
|
|
88324
|
-
"optional": false,
|
|
88325
|
-
"description": "",
|
|
88326
|
-
"line": 18,
|
|
88327
|
-
"rawdescription": "\n",
|
|
88328
|
-
"decorators": [
|
|
88329
|
-
{
|
|
88330
|
-
"name": "HostBinding",
|
|
88331
|
-
"stringifiedArguments": "'attr.role'"
|
|
88332
|
-
}
|
|
88333
|
-
],
|
|
88334
|
-
"modifierKind": [
|
|
88335
|
-
171
|
|
88336
|
-
]
|
|
88337
|
-
}
|
|
88338
|
-
],
|
|
87710
|
+
"propertiesClass": [],
|
|
88339
87711
|
"methodsClass": [
|
|
88340
87712
|
{
|
|
88341
87713
|
"name": "onItemClick",
|
|
@@ -88343,7 +87715,7 @@
|
|
|
88343
87715
|
"args": [
|
|
88344
87716
|
{
|
|
88345
87717
|
"name": "evt",
|
|
88346
|
-
"type": "
|
|
87718
|
+
"type": "Event",
|
|
88347
87719
|
"optional": false,
|
|
88348
87720
|
"dotDotDotToken": false,
|
|
88349
87721
|
"deprecated": false,
|
|
@@ -88353,7 +87725,7 @@
|
|
|
88353
87725
|
"optional": false,
|
|
88354
87726
|
"returnType": "void",
|
|
88355
87727
|
"typeParameters": [],
|
|
88356
|
-
"line":
|
|
87728
|
+
"line": 46,
|
|
88357
87729
|
"deprecated": false,
|
|
88358
87730
|
"deprecationMessage": "",
|
|
88359
87731
|
"rawdescription": "\n",
|
|
@@ -88361,7 +87733,7 @@
|
|
|
88361
87733
|
"jsdoctags": [
|
|
88362
87734
|
{
|
|
88363
87735
|
"name": "evt",
|
|
88364
|
-
"type": "
|
|
87736
|
+
"type": "Event",
|
|
88365
87737
|
"optional": false,
|
|
88366
87738
|
"dotDotDotToken": false,
|
|
88367
87739
|
"deprecated": false,
|
|
@@ -88414,33 +87786,7 @@
|
|
|
88414
87786
|
"coverageIgnore": false,
|
|
88415
87787
|
"deprecated": false,
|
|
88416
87788
|
"deprecationMessage": "",
|
|
88417
|
-
"hostBindings": [
|
|
88418
|
-
{
|
|
88419
|
-
"coverageIgnore": false,
|
|
88420
|
-
"name": "attr.role",
|
|
88421
|
-
"actualName": "role",
|
|
88422
|
-
"defaultValue": "'listitem'",
|
|
88423
|
-
"deprecated": false,
|
|
88424
|
-
"deprecationMessage": "",
|
|
88425
|
-
"rawdescription": "\n",
|
|
88426
|
-
"description": "",
|
|
88427
|
-
"line": 18,
|
|
88428
|
-
"type": "string",
|
|
88429
|
-
"decorators": []
|
|
88430
|
-
},
|
|
88431
|
-
{
|
|
88432
|
-
"coverageIgnore": false,
|
|
88433
|
-
"name": "class",
|
|
88434
|
-
"actualName": "cssClasses",
|
|
88435
|
-
"deprecated": false,
|
|
88436
|
-
"deprecationMessage": "",
|
|
88437
|
-
"rawdescription": "\n",
|
|
88438
|
-
"description": "",
|
|
88439
|
-
"line": 31,
|
|
88440
|
-
"type": "string",
|
|
88441
|
-
"decorators": []
|
|
88442
|
-
}
|
|
88443
|
-
],
|
|
87789
|
+
"hostBindings": [],
|
|
88444
87790
|
"hostListeners": [],
|
|
88445
87791
|
"standalone": false,
|
|
88446
87792
|
"imports": [
|
|
@@ -88463,7 +87809,7 @@
|
|
|
88463
87809
|
"description": "",
|
|
88464
87810
|
"rawdescription": "\n",
|
|
88465
87811
|
"type": "component",
|
|
88466
|
-
"sourceCode": "import { booleanAttribute, Component,
|
|
87812
|
+
"sourceCode": "import { booleanAttribute, Component, inject, input, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclBaseEvent } from '@eui/ecl/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\nimport { RouterLink, RouterLinkWithHref } from '@angular/router';\nimport { EclSocialMediaFollowComponent } from './ecl-social-media-follow.component';\n\nexport class EclSocialMediaFollowItemClickEvent extends EclBaseEvent {}\n\n@Component({\n selector: 'ecl-social-media-follow-item',\n templateUrl: './ecl-social-media-follow-item.component.html',\n imports: [...EUI_ECL_ICON, ...EUI_ECL_LINK, NgTemplateOutlet, RouterLink, RouterLinkWithHref],\n host: {\n role: 'listitem',\n '[class]': 'cssClasses',\n },\n})\nexport class EclSocialMediaFollowItemComponent extends ECLBaseDirective {\n readonly isInverted = input<false, unknown>(undefined, { transform: (booleanAttribute) as any });\n icon = input<string>();\n iconSet = input<string>('social-media');\n readonly href = input('');\n readonly routerLink = input('');\n readonly target = input<string>(undefined);\n readonly size = input('m');\n readonly extraAttributes = input<{\n name: string;\n value?: string | null;\n }[]>(undefined);\n\n get cssClasses(): string {\n return [super.getCssClasses('ecl-social-media-follow__item')].join(' ').trim();\n }\n\n readonly itemClick = output<EclSocialMediaFollowItemClickEvent>();\n\n private parent = inject(EclSocialMediaFollowComponent);\n\n get isIconOnly(): boolean {\n return this.parent?.isIconOnly() ?? false;\n }\n\n onItemClick(evt: Event): void {\n this.itemClick.emit(new EclSocialMediaFollowItemClickEvent());\n if (!this.href() && !this.routerLink()) {\n evt.preventDefault();\n }\n }\n}\n",
|
|
88467
87813
|
"assetsDirs": [],
|
|
88468
87814
|
"styleUrlsData": "",
|
|
88469
87815
|
"stylesData": "",
|
|
@@ -88477,7 +87823,18 @@
|
|
|
88477
87823
|
"name": "cssClasses",
|
|
88478
87824
|
"type": "string",
|
|
88479
87825
|
"returnType": "string",
|
|
88480
|
-
"line":
|
|
87826
|
+
"line": 34,
|
|
87827
|
+
"rawdescription": "\n",
|
|
87828
|
+
"description": ""
|
|
87829
|
+
}
|
|
87830
|
+
},
|
|
87831
|
+
"isIconOnly": {
|
|
87832
|
+
"name": "isIconOnly",
|
|
87833
|
+
"getSignature": {
|
|
87834
|
+
"name": "isIconOnly",
|
|
87835
|
+
"type": "boolean",
|
|
87836
|
+
"returnType": "boolean",
|
|
87837
|
+
"line": 42,
|
|
88481
87838
|
"rawdescription": "\n",
|
|
88482
87839
|
"description": ""
|
|
88483
87840
|
}
|
|
@@ -88512,7 +87869,7 @@
|
|
|
88512
87869
|
}
|
|
88513
87870
|
]
|
|
88514
87871
|
},
|
|
88515
|
-
"templateData": "@if(href()) {\n<a eclLink (click)=\"onItemClick($event)\" variant=\"standalone\" [href]=\"href()\" [attr.target]=\"target()\"\n class=\"ecl-social-media-follow__link\" [isInverted]=\"isInverted()\" [extraAttributes]=\"extraAttributes()\">\n @if(icon()) {\n <ecl-icon [iconSet]=\"iconSet()\" icon=\"{{ icon() }}\" [size]=\"size()\" class=\"ecl-social-media-follow__icon\"> </ecl-icon>\n }\n <span eclLinkLabel>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </span>\n</a>\n}\n\n@if(!href() && routerLink()) {\n<a eclLink (click)=\"onItemClick($event)\" variant=\"standalone\" [routerLink]=\"routerLink()\" [attr.target]=\"target()\"\n class=\"ecl-social-media-follow__link\" [isInverted]=\"isInverted()\" [extraAttributes]=\"extraAttributes()\">\n @if(icon()) {\n <ecl-icon [iconSet]=\"iconSet()\" icon=\"{{ icon() }}\" [size]=\"size()\" class=\"ecl-social-media-follow__icon\"> </ecl-icon>\n }\n <span eclLinkLabel>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </span>\n</a>\n}\n\n@if(!href() && !routerLink()) {\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n}\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n"
|
|
87872
|
+
"templateData": "@if(href()) {\n<a eclLink (click)=\"onItemClick($event)\" variant=\"standalone\" [href]=\"href()\" [attr.target]=\"target()\"\n class=\"ecl-social-media-follow__link\" [isInverted]=\"isInverted()\" [isIconOnly]=\"isIconOnly\" [extraAttributes]=\"extraAttributes()\">\n @if(icon()) {\n <ecl-icon [iconSet]=\"iconSet()\" icon=\"{{ icon() }}\" [size]=\"size()\" class=\"ecl-social-media-follow__icon\"> </ecl-icon>\n }\n <span eclLinkLabel>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </span>\n</a>\n}\n\n@if(!href() && routerLink()) {\n<a eclLink (click)=\"onItemClick($event)\" variant=\"standalone\" [routerLink]=\"routerLink()\" [attr.target]=\"target()\"\n class=\"ecl-social-media-follow__link\" [isInverted]=\"isInverted()\" [isIconOnly]=\"isIconOnly\" [extraAttributes]=\"extraAttributes()\">\n @if(icon()) {\n <ecl-icon [iconSet]=\"iconSet()\" icon=\"{{ icon() }}\" [size]=\"size()\" class=\"ecl-social-media-follow__icon\"> </ecl-icon>\n }\n <span eclLinkLabel>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </span>\n</a>\n}\n\n@if(!href() && !routerLink()) {\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n}\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n"
|
|
88516
87873
|
},
|
|
88517
87874
|
{
|
|
88518
87875
|
"name": "EclSplashPageComponent",
|
|
@@ -90834,7 +90191,7 @@
|
|
|
90834
90191
|
}
|
|
90835
90192
|
]
|
|
90836
90193
|
},
|
|
90837
|
-
"templateData": "@if (eclTitle() || eclDescription()) {\n<div class=\"ecl-story-card__header\">\n @if (eclTitle()) {\n <div class=\"ecl-story-card__title\" [attr.id]=\"titleId()\">{{ eclTitle() }}</div>\n }\n @if (eclDescription()) {\n <div class=\"ecl-story-card__description\">{{ eclDescription() }}</div>\n }\n</div>\n}\n\n<!-- Mobile: Embla Carousel (auto-generated from items + details) -->\n<div class=\"ecl-story-card__carousel\">\n <div class=\"ecl-story-card__carousel-viewport\"\n role=\"region\"\n [attr.aria-label]=\"'ecl.story-card.SLIDER-LABEL' | translate\"\n emblaCarousel\n [options]=\"emblaOptions\"\n [subscribeToEvents]=\"subscribeToEvents\"\n (emblaChange)=\"onEmblaChange($event)\">\n <ul class=\"ecl-story-card__carousel-container\">\n @for (item of items(); track i; let i = $index) {\n <li class=\"ecl-story-card__carousel-slide\"\n [attr.aria-hidden]=\"i !== activeSlideIndex() ? true : null\">\n <article class=\"ecl-story-card__card\">\n <div class=\"ecl-story-card__image-wrapper\" #carouselImageWrapper>\n </div>\n <div class=\"ecl-story-card__content\" #carouselContentWrapper>\n @if (detailsPanels()[i]; as panel) {\n @if (panel.eclTitle()) {\n <div class=\"ecl-story-card__card-title\">{{ panel.eclTitle() }}</div>\n }\n @if (panel.description()) {\n <div class=\"ecl-story-card__card-description\">{{ panel.description() }}</div>\n }\n }\n </div>\n </article>\n </li>\n }\n </ul>\n </div>\n\n <!-- Carousel Controls -->\n @if (totalSlides() > 1) {\n <div class=\"ecl-story-card__pager\">\n <button class=\"ecl-story-card__prev\"\n [disabled]=\"prevDisabled()\"\n (click)=\"onCarouselPrevClick()\"\n [attr.aria-label]=\"'ecl.story-card.SHOW-PREV-SLIDE' | translate\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-270\"></ecl-icon>\n <span class=\"ecl-story-card__prev-label\">\n {{ 'ecl.story-card.PREVIOUS' | translate }}\n </span>\n </button>\n\n <div class=\"ecl-story-card__dots\">\n @for (dotIndex of getDotIndices(); track dotIndex) {\n <button\n #dotButton\n class=\"ecl-story-card__dot\"\n [class.ecl-story-card__dot--active]=\"dotIndex === activeSlideIndex()\"\n [class.is-prev]=\"dotIndex === activeSlideIndex() - 1\"\n [attr.aria-label]=\"'ecl.story-card.GO-TO-SLIDE' | translate: { current: dotIndex + 1, total: totalSlides() }\"\n (click)=\"goToSlide(dotIndex)\">\n </button>\n }\n </div>\n\n <button class=\"ecl-story-card__next\"\n [disabled]=\"nextDisabled()\"\n (click)=\"onCarouselNextClick()\"\n [attr.aria-label]=\"'ecl.story-card.SHOW-NEXT-SLIDE' | translate\">\n <span class=\"ecl-story-card__next-label\">\n {{ 'ecl.story-card.NEXT' | translate }}\n </span>\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-90\"></ecl-icon>\n </button>\n </div>\n }\n</div>\n\n<!-- Desktop: Grid with Accordion (user-authored content projected here) -->\n<div class=\"ecl-story-card__grid\">\n <ng-content select=\"ul[eclStoryCardList]\"></ng-content>\n <ng-content select=\"[eclStoryCardGridDetails]\"></ng-content>\n\n <!-- Grid Controls -->\n @if (totalSlides() > 1) {\n <div class=\"ecl-story-card__grid-controls\">\n <button class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-story-card__grid-prev ecl-button--icon-only\"\n type=\"button\"\n (click)=\"onGridPrevClick()\"\n [attr.aria-label]=\"'ecl.story-card.PREVIOUS' | translate\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\"
|
|
90194
|
+
"templateData": "@if (eclTitle() || eclDescription()) {\n<div class=\"ecl-story-card__header\">\n @if (eclTitle()) {\n <div class=\"ecl-story-card__title\" [attr.id]=\"titleId()\">{{ eclTitle() }}</div>\n }\n @if (eclDescription()) {\n <div class=\"ecl-story-card__description\">{{ eclDescription() }}</div>\n }\n</div>\n}\n\n<!-- Mobile: Embla Carousel (auto-generated from items + details) -->\n<div class=\"ecl-story-card__carousel\">\n <div class=\"ecl-story-card__carousel-viewport\"\n role=\"region\"\n [attr.aria-label]=\"'ecl.story-card.SLIDER-LABEL' | translate\"\n emblaCarousel\n [options]=\"emblaOptions\"\n [subscribeToEvents]=\"subscribeToEvents\"\n (emblaChange)=\"onEmblaChange($event)\">\n <ul class=\"ecl-story-card__carousel-container\">\n @for (item of items(); track i; let i = $index) {\n <li class=\"ecl-story-card__carousel-slide\"\n [attr.aria-hidden]=\"i !== activeSlideIndex() ? true : null\">\n <article class=\"ecl-story-card__card\">\n <div class=\"ecl-story-card__image-wrapper\" #carouselImageWrapper>\n </div>\n <div class=\"ecl-story-card__content\" #carouselContentWrapper>\n @if (detailsPanels()[i]; as panel) {\n @if (panel.eclTitle()) {\n <div class=\"ecl-story-card__card-title\">{{ panel.eclTitle() }}</div>\n }\n @if (panel.description()) {\n <div class=\"ecl-story-card__card-description\">{{ panel.description() }}</div>\n }\n }\n </div>\n </article>\n </li>\n }\n </ul>\n </div>\n\n <!-- Carousel Controls -->\n @if (totalSlides() > 1) {\n <div class=\"ecl-story-card__pager\">\n <button class=\"ecl-story-card__prev\"\n [disabled]=\"prevDisabled()\"\n (click)=\"onCarouselPrevClick()\"\n [attr.aria-label]=\"'ecl.story-card.SHOW-PREV-SLIDE' | translate\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-270\"></ecl-icon>\n <span class=\"ecl-story-card__prev-label\">\n {{ 'ecl.story-card.PREVIOUS' | translate }}\n </span>\n </button>\n\n <div class=\"ecl-story-card__dots\">\n @for (dotIndex of getDotIndices(); track dotIndex) {\n <button\n #dotButton\n class=\"ecl-story-card__dot\"\n [class.ecl-story-card__dot--active]=\"dotIndex === activeSlideIndex()\"\n [class.is-prev]=\"dotIndex === activeSlideIndex() - 1\"\n [attr.aria-label]=\"'ecl.story-card.GO-TO-SLIDE' | translate: { current: dotIndex + 1, total: totalSlides() }\"\n (click)=\"goToSlide(dotIndex)\">\n </button>\n }\n </div>\n\n <button class=\"ecl-story-card__next\"\n [disabled]=\"nextDisabled()\"\n (click)=\"onCarouselNextClick()\"\n [attr.aria-label]=\"'ecl.story-card.SHOW-NEXT-SLIDE' | translate\">\n <span class=\"ecl-story-card__next-label\">\n {{ 'ecl.story-card.NEXT' | translate }}\n </span>\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-90\"></ecl-icon>\n </button>\n </div>\n }\n</div>\n\n<!-- Desktop: Grid with Accordion (user-authored content projected here) -->\n<div class=\"ecl-story-card__grid\">\n <ng-content select=\"ul[eclStoryCardList]\"></ng-content>\n <ng-content select=\"[eclStoryCardGridDetails]\"></ng-content>\n\n <!-- Grid Controls -->\n @if (totalSlides() > 1) {\n <div class=\"ecl-story-card__grid-controls\">\n <button class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-story-card__grid-prev ecl-button--icon-only\"\n type=\"button\"\n (click)=\"onGridPrevClick()\"\n [attr.aria-label]=\"'ecl.story-card.PREVIOUS' | translate\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.story-card.PREVIOUS' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"caret-left\" size=\"l\"></ecl-icon>\n </span>\n </button>\n\n <button class=\"ecl-button ecl-button--secondary ecl-button--neutral ecl-story-card__grid-play ecl-button--icon-only\"\n type=\"button\"\n [style.display]=\"isAutoPlaying() ? 'none' : 'flex'\"\n (click)=\"onPlayClick()\"\n [attr.aria-label]=\"'ecl.story-card.PLAY' | translate\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.story-card.PLAY' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor-fill\" icon=\"play\" size=\"l\"></ecl-icon>\n </span>\n </button>\n\n <button class=\"ecl-button ecl-button--secondary ecl-button--neutral ecl-story-card__grid-pause ecl-button--icon-only\"\n type=\"button\"\n [style.display]=\"isAutoPlaying() ? 'flex' : 'none'\"\n (click)=\"onPauseClick()\"\n [attr.aria-label]=\"'ecl.story-card.PAUSE' | translate\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.story-card.PAUSE' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor-fill\" icon=\"pause\" size=\"l\"></ecl-icon>\n </span>\n </button>\n\n <button class=\"ecl-button ecl-button--tertiary ecl-button--neutral ecl-story-card__grid-next ecl-button--icon-only\"\n type=\"button\"\n (click)=\"onGridNextClick()\"\n [attr.aria-label]=\"'ecl.story-card.NEXT' | translate\">\n <span class=\"ecl-button__container\">\n <span class=\"ecl-button__label\">\n {{ 'ecl.story-card.NEXT' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"caret-right\" size=\"l\"></ecl-icon>\n </span>\n </button>\n </div>\n }\n</div>\n"
|
|
90838
90195
|
},
|
|
90839
90196
|
{
|
|
90840
90197
|
"name": "EclStoryCardGridDetailsComponent",
|
|
@@ -95634,6 +94991,45 @@
|
|
|
95634
94991
|
],
|
|
95635
94992
|
"miscellaneous": {
|
|
95636
94993
|
"variables": [
|
|
94994
|
+
{
|
|
94995
|
+
"name": "ARROW_SIZE",
|
|
94996
|
+
"ctype": "miscellaneous",
|
|
94997
|
+
"subtype": "variable",
|
|
94998
|
+
"file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts",
|
|
94999
|
+
"coverageIgnore": false,
|
|
95000
|
+
"deprecated": false,
|
|
95001
|
+
"deprecationMessage": "",
|
|
95002
|
+
"type": "string",
|
|
95003
|
+
"defaultValue": "'0.5rem'",
|
|
95004
|
+
"rawdescription": "Half the arrow's own width, matching ECL's `arrowSize`.",
|
|
95005
|
+
"description": "<p>Half the arrow's own width, matching ECL's <code>arrowSize</code>.</p>\n"
|
|
95006
|
+
},
|
|
95007
|
+
{
|
|
95008
|
+
"name": "ARROW_SIZE",
|
|
95009
|
+
"ctype": "miscellaneous",
|
|
95010
|
+
"subtype": "variable",
|
|
95011
|
+
"file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts",
|
|
95012
|
+
"coverageIgnore": false,
|
|
95013
|
+
"deprecated": false,
|
|
95014
|
+
"deprecationMessage": "",
|
|
95015
|
+
"type": "string",
|
|
95016
|
+
"defaultValue": "'0.5rem'",
|
|
95017
|
+
"rawdescription": "Half the arrow's own width, matching ECL's `arrowSize`.",
|
|
95018
|
+
"description": "<p>Half the arrow's own width, matching ECL's <code>arrowSize</code>.</p>\n"
|
|
95019
|
+
},
|
|
95020
|
+
{
|
|
95021
|
+
"name": "ARROW_SIZE",
|
|
95022
|
+
"ctype": "miscellaneous",
|
|
95023
|
+
"subtype": "variable",
|
|
95024
|
+
"file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
|
|
95025
|
+
"coverageIgnore": false,
|
|
95026
|
+
"deprecated": false,
|
|
95027
|
+
"deprecationMessage": "",
|
|
95028
|
+
"type": "string",
|
|
95029
|
+
"defaultValue": "'0.5rem'",
|
|
95030
|
+
"rawdescription": "Half the arrow's own width, matching ECL's `arrowSize`.",
|
|
95031
|
+
"description": "<p>Half the arrow's own width, matching ECL's <code>arrowSize</code>.</p>\n"
|
|
95032
|
+
},
|
|
95637
95033
|
{
|
|
95638
95034
|
"name": "AVAILABLE_NON_EU_LOGO_COUNTRY_CODES",
|
|
95639
95035
|
"ctype": "miscellaneous",
|
|
@@ -96577,6 +95973,32 @@
|
|
|
96577
95973
|
"type": "unknown",
|
|
96578
95974
|
"defaultValue": "(): void => {\n /** empty*/\n}"
|
|
96579
95975
|
},
|
|
95976
|
+
{
|
|
95977
|
+
"name": "RESIZE_DEBOUNCE",
|
|
95978
|
+
"ctype": "miscellaneous",
|
|
95979
|
+
"subtype": "variable",
|
|
95980
|
+
"file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts",
|
|
95981
|
+
"coverageIgnore": false,
|
|
95982
|
+
"deprecated": false,
|
|
95983
|
+
"deprecationMessage": "",
|
|
95984
|
+
"type": "number",
|
|
95985
|
+
"defaultValue": "200",
|
|
95986
|
+
"rawdescription": "Debounce for the resize recomputation, matching ECL's `handleResize`.",
|
|
95987
|
+
"description": "<p>Debounce for the resize recomputation, matching ECL's <code>handleResize</code>.</p>\n"
|
|
95988
|
+
},
|
|
95989
|
+
{
|
|
95990
|
+
"name": "RESIZE_DEBOUNCE",
|
|
95991
|
+
"ctype": "miscellaneous",
|
|
95992
|
+
"subtype": "variable",
|
|
95993
|
+
"file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
|
|
95994
|
+
"coverageIgnore": false,
|
|
95995
|
+
"deprecated": false,
|
|
95996
|
+
"deprecationMessage": "",
|
|
95997
|
+
"type": "number",
|
|
95998
|
+
"defaultValue": "200",
|
|
95999
|
+
"rawdescription": "Debounce for the resize recomputation, matching ECL's `handleResize`.",
|
|
96000
|
+
"description": "<p>Debounce for the resize recomputation, matching ECL's <code>handleResize</code>.</p>\n"
|
|
96001
|
+
},
|
|
96580
96002
|
{
|
|
96581
96003
|
"name": "testBed",
|
|
96582
96004
|
"ctype": "miscellaneous",
|
|
@@ -97043,6 +96465,99 @@
|
|
|
97043
96465
|
}
|
|
97044
96466
|
],
|
|
97045
96467
|
"groupedVariables": {
|
|
96468
|
+
"packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts": [
|
|
96469
|
+
{
|
|
96470
|
+
"name": "ARROW_SIZE",
|
|
96471
|
+
"ctype": "miscellaneous",
|
|
96472
|
+
"subtype": "variable",
|
|
96473
|
+
"file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts",
|
|
96474
|
+
"coverageIgnore": false,
|
|
96475
|
+
"deprecated": false,
|
|
96476
|
+
"deprecationMessage": "",
|
|
96477
|
+
"type": "string",
|
|
96478
|
+
"defaultValue": "'0.5rem'",
|
|
96479
|
+
"rawdescription": "Half the arrow's own width, matching ECL's `arrowSize`.",
|
|
96480
|
+
"description": "<p>Half the arrow's own width, matching ECL's <code>arrowSize</code>.</p>\n"
|
|
96481
|
+
}
|
|
96482
|
+
],
|
|
96483
|
+
"packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts": [
|
|
96484
|
+
{
|
|
96485
|
+
"name": "ARROW_SIZE",
|
|
96486
|
+
"ctype": "miscellaneous",
|
|
96487
|
+
"subtype": "variable",
|
|
96488
|
+
"file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts",
|
|
96489
|
+
"coverageIgnore": false,
|
|
96490
|
+
"deprecated": false,
|
|
96491
|
+
"deprecationMessage": "",
|
|
96492
|
+
"type": "string",
|
|
96493
|
+
"defaultValue": "'0.5rem'",
|
|
96494
|
+
"rawdescription": "Half the arrow's own width, matching ECL's `arrowSize`.",
|
|
96495
|
+
"description": "<p>Half the arrow's own width, matching ECL's <code>arrowSize</code>.</p>\n"
|
|
96496
|
+
},
|
|
96497
|
+
{
|
|
96498
|
+
"name": "RESIZE_DEBOUNCE",
|
|
96499
|
+
"ctype": "miscellaneous",
|
|
96500
|
+
"subtype": "variable",
|
|
96501
|
+
"file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts",
|
|
96502
|
+
"coverageIgnore": false,
|
|
96503
|
+
"deprecated": false,
|
|
96504
|
+
"deprecationMessage": "",
|
|
96505
|
+
"type": "number",
|
|
96506
|
+
"defaultValue": "200",
|
|
96507
|
+
"rawdescription": "Debounce for the resize recomputation, matching ECL's `handleResize`.",
|
|
96508
|
+
"description": "<p>Debounce for the resize recomputation, matching ECL's <code>handleResize</code>.</p>\n"
|
|
96509
|
+
}
|
|
96510
|
+
],
|
|
96511
|
+
"packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts": [
|
|
96512
|
+
{
|
|
96513
|
+
"name": "ARROW_SIZE",
|
|
96514
|
+
"ctype": "miscellaneous",
|
|
96515
|
+
"subtype": "variable",
|
|
96516
|
+
"file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
|
|
96517
|
+
"coverageIgnore": false,
|
|
96518
|
+
"deprecated": false,
|
|
96519
|
+
"deprecationMessage": "",
|
|
96520
|
+
"type": "string",
|
|
96521
|
+
"defaultValue": "'0.5rem'",
|
|
96522
|
+
"rawdescription": "Half the arrow's own width, matching ECL's `arrowSize`.",
|
|
96523
|
+
"description": "<p>Half the arrow's own width, matching ECL's <code>arrowSize</code>.</p>\n"
|
|
96524
|
+
},
|
|
96525
|
+
{
|
|
96526
|
+
"name": "ECL_SITE_HEADER_SEARCH_VALUE_ACCESSOR",
|
|
96527
|
+
"ctype": "miscellaneous",
|
|
96528
|
+
"subtype": "variable",
|
|
96529
|
+
"file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
|
|
96530
|
+
"coverageIgnore": false,
|
|
96531
|
+
"deprecated": false,
|
|
96532
|
+
"deprecationMessage": "",
|
|
96533
|
+
"type": "Provider",
|
|
96534
|
+
"defaultValue": "{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EclSiteHeaderSearchComponent),\n multi: true,\n}"
|
|
96535
|
+
},
|
|
96536
|
+
{
|
|
96537
|
+
"name": "noop",
|
|
96538
|
+
"ctype": "miscellaneous",
|
|
96539
|
+
"subtype": "variable",
|
|
96540
|
+
"file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
|
|
96541
|
+
"coverageIgnore": false,
|
|
96542
|
+
"deprecated": false,
|
|
96543
|
+
"deprecationMessage": "",
|
|
96544
|
+
"type": "unknown",
|
|
96545
|
+
"defaultValue": "(): void => {\n /** empty*/\n}"
|
|
96546
|
+
},
|
|
96547
|
+
{
|
|
96548
|
+
"name": "RESIZE_DEBOUNCE",
|
|
96549
|
+
"ctype": "miscellaneous",
|
|
96550
|
+
"subtype": "variable",
|
|
96551
|
+
"file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
|
|
96552
|
+
"coverageIgnore": false,
|
|
96553
|
+
"deprecated": false,
|
|
96554
|
+
"deprecationMessage": "",
|
|
96555
|
+
"type": "number",
|
|
96556
|
+
"defaultValue": "200",
|
|
96557
|
+
"rawdescription": "Debounce for the resize recomputation, matching ECL's `handleResize`.",
|
|
96558
|
+
"description": "<p>Debounce for the resize recomputation, matching ECL's <code>handleResize</code>.</p>\n"
|
|
96559
|
+
}
|
|
96560
|
+
],
|
|
97046
96561
|
"packages/ecl/core/utils/constants/constants.ts": [
|
|
97047
96562
|
{
|
|
97048
96563
|
"name": "AVAILABLE_NON_EU_LOGO_COUNTRY_CODES",
|
|
@@ -97128,30 +96643,6 @@
|
|
|
97128
96643
|
"defaultValue": "(): void => {\n /** empty*/\n}"
|
|
97129
96644
|
}
|
|
97130
96645
|
],
|
|
97131
|
-
"packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts": [
|
|
97132
|
-
{
|
|
97133
|
-
"name": "ECL_SITE_HEADER_SEARCH_VALUE_ACCESSOR",
|
|
97134
|
-
"ctype": "miscellaneous",
|
|
97135
|
-
"subtype": "variable",
|
|
97136
|
-
"file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
|
|
97137
|
-
"coverageIgnore": false,
|
|
97138
|
-
"deprecated": false,
|
|
97139
|
-
"deprecationMessage": "",
|
|
97140
|
-
"type": "Provider",
|
|
97141
|
-
"defaultValue": "{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EclSiteHeaderSearchComponent),\n multi: true,\n}"
|
|
97142
|
-
},
|
|
97143
|
-
{
|
|
97144
|
-
"name": "noop",
|
|
97145
|
-
"ctype": "miscellaneous",
|
|
97146
|
-
"subtype": "variable",
|
|
97147
|
-
"file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
|
|
97148
|
-
"coverageIgnore": false,
|
|
97149
|
-
"deprecated": false,
|
|
97150
|
-
"deprecationMessage": "",
|
|
97151
|
-
"type": "unknown",
|
|
97152
|
-
"defaultValue": "(): void => {\n /** empty*/\n}"
|
|
97153
|
-
}
|
|
97154
|
-
],
|
|
97155
96646
|
"packages/ecl/components/ecl-accordion/index.ts": [
|
|
97156
96647
|
{
|
|
97157
96648
|
"name": "EUI_ECL_ACCORDION",
|