@eui/ecl 22.0.0-alpha.34 → 22.0.0-alpha.35

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.
Files changed (50) hide show
  1. package/docs/changelog.html +11 -0
  2. package/docs/components/EclIconComponent.html +3 -2
  3. package/docs/components/EclSiteHeaderActionComponent.html +4 -104
  4. package/docs/components/EclSiteHeaderBannerTopComponent.html +4 -104
  5. package/docs/components/EclSiteHeaderComponent.html +55 -101
  6. package/docs/components/EclSiteHeaderCustomActionComponent.html +6 -330
  7. package/docs/components/EclSiteHeaderEnvironmentComponent.html +4 -39
  8. package/docs/components/EclSiteHeaderLanguageComponent.html +3 -364
  9. package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +3 -58
  10. package/docs/components/EclSiteHeaderLoginComponent.html +8 -8
  11. package/docs/components/EclSiteHeaderNotificationComponent.html +4 -68
  12. package/docs/components/EclSiteHeaderSearchComponent.html +42 -23
  13. package/docs/components/EclSocialMediaFollowItemComponent.html +1 -1
  14. package/docs/directives/EclSiteHeaderCtaDirective.html +0 -104
  15. package/docs/directives/EclSiteHeaderCustomActionContentDirective.html +0 -104
  16. package/docs/directives/EclSiteHeaderCustomActionLinkDirective.html +16 -253
  17. package/docs/directives/EclSiteHeaderCustomActionTitleDirective.html +0 -104
  18. package/docs/directives/EclSiteHeaderImageDirective.html +0 -39
  19. package/docs/directives/EclSiteHeaderLinkDirective.html +0 -104
  20. package/docs/directives/EclSiteHeaderLoginDescriptionDirective.html +0 -104
  21. package/docs/directives/EclSiteHeaderLoginSeparatorDirective.html +0 -104
  22. package/docs/directives/EclSiteHeaderPictureDirective.html +0 -104
  23. package/docs/js/search/search_index.js +2 -2
  24. package/docs/json/EclIconComponent.md +1 -1
  25. package/docs/json/EclSiteHeaderComponent.md +3 -2
  26. package/docs/json/EclSiteHeaderCustomActionLinkDirective.md +2 -1
  27. package/docs/json/EclSiteHeaderLanguageComponent.md +2 -2
  28. package/docs/json/EclSiteHeaderLoginComponent.md +1 -1
  29. package/docs/json/EclSiteHeaderSearchComponent.md +3 -2
  30. package/docs/json/EclSocialMediaFollowItemComponent.md +1 -1
  31. package/docs/json/documentation.json +662 -1092
  32. package/docs/llms.txt +20 -68
  33. package/docs/miscellaneous/typealiases.html +28 -0
  34. package/docs/miscellaneous/variables.html +20 -20
  35. package/docs/properties.html +1 -1
  36. package/fesm2022/eui-ecl-components-ecl-app.mjs +5 -1
  37. package/fesm2022/eui-ecl-components-ecl-app.mjs.map +1 -1
  38. package/fesm2022/eui-ecl-components-ecl-icon.mjs +2 -1
  39. package/fesm2022/eui-ecl-components-ecl-icon.mjs.map +1 -1
  40. package/fesm2022/eui-ecl-components-ecl-site-header.mjs +168 -224
  41. package/fesm2022/eui-ecl-components-ecl-site-header.mjs.map +1 -1
  42. package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs.map +1 -1
  43. package/package.json +1 -1
  44. package/types/eui-ecl-components-ecl-app.d.ts.map +1 -1
  45. package/types/eui-ecl-components-ecl-icon.d.ts +8 -2
  46. package/types/eui-ecl-components-ecl-icon.d.ts.map +1 -1
  47. package/types/eui-ecl-components-ecl-site-header.d.ts +87 -90
  48. package/types/eui-ecl-components-ecl-site-header.d.ts.map +1 -1
  49. package/types/eui-ecl-components-ecl-social-media-follow.d.ts +2 -2
  50. package/types/eui-ecl-components-ecl-social-media-follow.d.ts.map +1 -1
@@ -3374,13 +3374,13 @@
3374
3374
  },
3375
3375
  {
3376
3376
  "name": "EclAppLanguageDismissEvent",
3377
- "id": "class-EclAppLanguageDismissEvent-32f3eb5490c2804bf33df7ed94dc1abe890f04d2c1e8f48b981387c5afc4b888b2fd1b529c314dcbf4bbf25786f7772f81075ac1e6e2e18f88ae5009783c1072",
3377
+ "id": "class-EclAppLanguageDismissEvent-0cf3387d1e3b4afd626393c991447eacabd7a17d1deb38542b887de02a8d87b838c3fdb91942e035cc5c45480c7ad7bff86ebba4f1fc5990c566c542d15e9c7c",
3378
3378
  "file": "packages/ecl/components/ecl-app/ecl-app.component.ts",
3379
3379
  "coverageIgnore": false,
3380
3380
  "deprecated": false,
3381
3381
  "deprecationMessage": "",
3382
3382
  "type": "class",
3383
- "sourceCode": "import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { AfterViewInit, Component, contentChild, OnDestroy, OnInit, PLATFORM_ID, inject, output, signal } from '@angular/core';\nimport { CssUtils, EuiAppShellService } from '@eui/core';\nimport { EuiLanguage } from '@eui/base';\nimport { EclSiteHeaderLanguageComponent, EclSiteHeaderLanguageSelectedEvent } from '@eui/ecl/components/ecl-site-header';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService } from '@eui/ecl/core';\nimport { fromEvent, Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\n\n/**\n * The wrapper component for an ecl application. Has some important global properties.\n */\nexport class EclAppLanguageDismissEvent extends EclBaseEvent {\n constructor(public language?: EuiLanguage) {\n super();\n }\n}\n\n@Component({\n selector: 'ecl-app',\n templateUrl: './ecl-app.component.html',\n host: {\n '[attr.dir]': 'textDirection()',\n },\n})\nexport class EclAppComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy {\n /**\n * Text direction, by default is 'ltr' - left-to-write. Can also be 'rtl' - right-to-left, which will\n * make all components within <ecl-app> to lign to the right, and apply some special styling and functionality.\n */\n readonly textDirection = signal('ltr');\n\n readonly eclSiteHeaderLanguage = contentChild(EclSiteHeaderLanguageComponent);\n\n readonly languageDismiss = output<EclAppLanguageDismissEvent>();\n\n protected destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly eclRtlService = inject(EclRtlService);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly appShellService = inject(EuiAppShellService);\n\n ngOnInit(): void {\n\n // Only initialize CSS vars if no parent app shell is already active\n const isNestedInAppShell = this.appShellService.state.hasHeader || this.appShellService.state.hasSidebar || this.appShellService.state.hasToolbar;\n if (!isNestedInAppShell) {\n CssUtils.initCssVars(this.document, this.platformId);\n }\n if (isPlatformBrowser(this.platformId)) {\n const browserAgent = window.navigator.userAgent.toLowerCase();\n\n this.appShellService.setState({\n ...this.appShellService.state,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth,\n deviceInfo: {\n isChrome: browserAgent.indexOf('chrome') > -1,\n isIE: browserAgent.indexOf('trident') > -1,\n isFF: browserAgent.indexOf('firefox') > -1,\n },\n appBaseFontSize: this.appShellService.getBaseFontSize(),\n });\n }\n\n if (isPlatformBrowser(this.platformId)) {\n fromEvent(window, 'resize')\n .pipe(debounceTime(50), takeUntil(this.destroy$))\n .subscribe(() => {\n this.appShellService?.setState({\n ...this.appShellService.state,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth,\n });\n CssUtils.setAppViewportCssVars(this.platformId);\n });\n }\n }\n\n ngAfterViewInit(): void {\n // Adds global class, which is used to apply the correct styling for eui-21.\n CssUtils.setHtmlClass('eui-21', this.document);\n this.handleRtlChangeState();\n this.handleUIEvents();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Changes the text direction from 'ltr' to 'rtl' and vice versa.\n */\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n if (rtlState) {\n this.textDirection.set('rtl');\n } else {\n this.textDirection.set('ltr');\n }\n });\n }\n\n private handleUIEvents(): void {\n this.eclSiteHeaderLanguage()?.languageSelected\n .pipe(takeUntil(this.destroy$))\n .subscribe((evt: EclSiteHeaderLanguageSelectedEvent) => {\n this.languageDismiss.emit(new EclAppLanguageDismissEvent(evt.language));\n });\n }\n}\n",
3383
+ "sourceCode": "import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { AfterViewInit, Component, contentChild, OnDestroy, OnInit, PLATFORM_ID, inject, output, signal } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { CssUtils, EuiAppShellService } from '@eui/core';\nimport { EuiLanguage } from '@eui/base';\nimport { EclSiteHeaderLanguageComponent, EclSiteHeaderLanguageSelectedEvent } from '@eui/ecl/components/ecl-site-header';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService } from '@eui/ecl/core';\nimport { fromEvent, Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\n\n/**\n * The wrapper component for an ecl application. Has some important global properties.\n */\nexport class EclAppLanguageDismissEvent extends EclBaseEvent {\n constructor(public language?: EuiLanguage) {\n super();\n }\n}\n\n@Component({\n selector: 'ecl-app',\n templateUrl: './ecl-app.component.html',\n host: {\n '[attr.dir]': 'textDirection()',\n },\n})\nexport class EclAppComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy {\n /**\n * Text direction, by default is 'ltr' - left-to-write. Can also be 'rtl' - right-to-left, which will\n * make all components within <ecl-app> to lign to the right, and apply some special styling and functionality.\n */\n readonly textDirection = signal('ltr');\n\n readonly eclSiteHeaderLanguage = contentChild(EclSiteHeaderLanguageComponent);\n\n readonly languageDismiss = output<EclAppLanguageDismissEvent>();\n\n protected destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly eclRtlService = inject(EclRtlService);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly appShellService = inject(EuiAppShellService);\n\n ngOnInit(): void {\n\n // Only initialize CSS vars if no parent app shell is already active\n const isNestedInAppShell = this.appShellService.state.hasHeader || this.appShellService.state.hasSidebar || this.appShellService.state.hasToolbar;\n if (!isNestedInAppShell) {\n CssUtils.initCssVars(this.document, this.platformId);\n }\n if (isPlatformBrowser(this.platformId)) {\n const browserAgent = window.navigator.userAgent.toLowerCase();\n\n this.appShellService.setState({\n ...this.appShellService.state,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth,\n deviceInfo: {\n isChrome: browserAgent.indexOf('chrome') > -1,\n isIE: browserAgent.indexOf('trident') > -1,\n isFF: browserAgent.indexOf('firefox') > -1,\n },\n appBaseFontSize: this.appShellService.getBaseFontSize(),\n });\n }\n\n if (isPlatformBrowser(this.platformId)) {\n fromEvent(window, 'resize')\n .pipe(debounceTime(50), takeUntil(this.destroy$))\n .subscribe(() => {\n this.appShellService?.setState({\n ...this.appShellService.state,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth,\n });\n CssUtils.setAppViewportCssVars(this.platformId);\n });\n }\n }\n\n ngAfterViewInit(): void {\n // Adds global class, which is used to apply the correct styling for eui-21.\n CssUtils.setHtmlClass('eui-21', this.document);\n this.handleRtlChangeState();\n this.handleUIEvents();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Changes the text direction from 'ltr' to 'rtl' and vice versa.\n */\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n if (rtlState) {\n this.textDirection.set('rtl');\n } else {\n this.textDirection.set('ltr');\n }\n });\n }\n\n private handleUIEvents(): void {\n const eclSiteHeaderLanguage = this.eclSiteHeaderLanguage();\n if (!eclSiteHeaderLanguage) return;\n\n outputToObservable(eclSiteHeaderLanguage.languageSelected)\n .pipe(takeUntil(this.destroy$))\n .subscribe((evt: EclSiteHeaderLanguageSelectedEvent) => {\n this.languageDismiss.emit(new EclAppLanguageDismissEvent(evt.language));\n });\n }\n}\n",
3384
3384
  "displayName": "EclAppLanguageDismissEvent",
3385
3385
  "constructorObj": {
3386
3386
  "name": "constructor",
@@ -3397,7 +3397,7 @@
3397
3397
  "deprecationMessage": ""
3398
3398
  }
3399
3399
  ],
3400
- "line": 13,
3400
+ "line": 14,
3401
3401
  "rawdescription": "\n",
3402
3402
  "jsdoctags": [
3403
3403
  {
@@ -3425,7 +3425,7 @@
3425
3425
  "indexKey": "",
3426
3426
  "optional": true,
3427
3427
  "description": "",
3428
- "line": 14,
3428
+ "line": 15,
3429
3429
  "rawdescription": "\n",
3430
3430
  "modifierKind": [
3431
3431
  125
@@ -8457,13 +8457,13 @@
8457
8457
  },
8458
8458
  {
8459
8459
  "name": "EclSocialMediaFollowItemClickEvent",
8460
- "id": "class-EclSocialMediaFollowItemClickEvent-be2bc74a52d7b183206e23fa9c6edd0706816decad401fed2ccd0e2788dead5b1d6dbb066556634b97683220c7111e50c45fd911c2cccbe1ec6738847a5e6fdf",
8460
+ "id": "class-EclSocialMediaFollowItemClickEvent-af10cb7ce22e295e87d200282d4f934d3d9096be034a20300e19f49c8cea2c18a23ec6525da489ec0de9592f023fbdde2a73cd8a9fc87a270818f5214e0f73b7",
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, 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",
8466
+ "sourceCode": "import { booleanAttribute, Component, inject, input, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { EclIconSet, 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<EclIconSet>('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": [],
@@ -33462,12 +33462,12 @@
33462
33462
  },
33463
33463
  {
33464
33464
  "name": "EclSiteHeaderCtaDirective",
33465
- "id": "directive-EclSiteHeaderCtaDirective-eb7b867969df601dd77f9321766e821fa3401761aa35bf9396413d2737a500ee3d444a551cc40e56f22d4664355d3755eb6529137cd3383f14bcd536c8c96574",
33465
+ "id": "directive-EclSiteHeaderCtaDirective-dea4aa3bd7f18c7deb53610c6a79edc1db4cd176f8ef6134b53929b1c174781670c840fd62eacb168070ee3ef14737772a729db7dd7826ec630b00627de2ce4b",
33466
33466
  "file": "packages/ecl/components/ecl-site-header/cta/ecl-site-header-cta.directive.ts",
33467
33467
  "type": "directive",
33468
33468
  "description": "<p>This directive is used, when we want to show call-to-action link in the site-header. Used in harmonised and standardised header\n variants.</p>\n",
33469
33469
  "rawdescription": "\n\nThis directive is used, when we want to show call-to-action link in the site-header. Used in harmonised and standardised header\n variants.\n",
33470
- "sourceCode": "import { Directive, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This directive is used, when we want to show call-to-action link in the site-header. Used in harmonised and standardised header\n * variants.\n */\n@Directive({\n selector: '[eclSiteHeaderCta]',\n})\nexport class EclSiteHeaderCtaDirective extends ECLBaseDirective {\n @HostBinding('class.ecl-site-header__cta') className = true;\n}\n",
33470
+ "sourceCode": "import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This directive is used, when we want to show call-to-action link in the site-header. Used in harmonised and standardised header\n * variants.\n */\n@Directive({\n selector: '[eclSiteHeaderCta]',\n host: {\n class: 'ecl-site-header__cta',\n },\n})\nexport class EclSiteHeaderCtaDirective extends ECLBaseDirective {}\n",
33471
33471
  "selector": "[eclSiteHeaderCta]",
33472
33472
  "providers": [],
33473
33473
  "hostDirectives": [],
@@ -33520,46 +33520,9 @@
33520
33520
  "outputsClass": [],
33521
33521
  "deprecated": false,
33522
33522
  "deprecationMessage": "",
33523
- "hostBindings": [
33524
- {
33525
- "coverageIgnore": false,
33526
- "name": "class.ecl-site-header__cta",
33527
- "actualName": "className",
33528
- "defaultValue": "true",
33529
- "deprecated": false,
33530
- "deprecationMessage": "",
33531
- "rawdescription": "\n",
33532
- "description": "",
33533
- "line": 12,
33534
- "type": "boolean",
33535
- "decorators": []
33536
- }
33537
- ],
33523
+ "hostBindings": [],
33538
33524
  "hostListeners": [],
33539
- "propertiesClass": [
33540
- {
33541
- "name": "className",
33542
- "coverageIgnore": false,
33543
- "defaultValue": "true",
33544
- "deprecated": false,
33545
- "deprecationMessage": "",
33546
- "type": "unknown",
33547
- "indexKey": "",
33548
- "optional": false,
33549
- "description": "",
33550
- "line": 12,
33551
- "rawdescription": "\n",
33552
- "decorators": [
33553
- {
33554
- "name": "HostBinding",
33555
- "stringifiedArguments": "'class.ecl-site-header__cta'"
33556
- }
33557
- ],
33558
- "modifierKind": [
33559
- 171
33560
- ]
33561
- }
33562
- ],
33525
+ "propertiesClass": [],
33563
33526
  "methodsClass": [
33564
33527
  {
33565
33528
  "name": "getCssClasses",
@@ -33603,8 +33566,8 @@
33603
33566
  "coverageIgnore": false,
33604
33567
  "jsdoctags": [
33605
33568
  {
33606
- "pos": 107,
33607
- "end": 259,
33569
+ "pos": 94,
33570
+ "end": 246,
33608
33571
  "kind": 321,
33609
33572
  "id": 0,
33610
33573
  "flags": 16777216,
@@ -33628,12 +33591,12 @@
33628
33591
  },
33629
33592
  {
33630
33593
  "name": "EclSiteHeaderCustomActionContentDirective",
33631
- "id": "directive-EclSiteHeaderCustomActionContentDirective-7633b68559d061143bf803abd31054048a346ed3359883aad14adb39c4c0701559617ff4ce17fd2920b2b4bcd6d4da0fbe6973c890d33dbe77ea2c872c584b01",
33594
+ "id": "directive-EclSiteHeaderCustomActionContentDirective-ea8212434a9aafb02f5d5305967fce291788d14004351f818db683e8e52d89f73e46ba8366a7ef10ec15d97c64c6368cc8c5ac235344d1999d7c7ecfd2e1243f",
33632
33595
  "file": "packages/ecl/components/ecl-site-header/custom-action/ecl-site-header-custom-action.directive.ts",
33633
33596
  "type": "directive",
33634
33597
  "description": "",
33635
33598
  "rawdescription": "\n",
33636
- "sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, Directive, EventEmitter, HostBinding, HostListener, Input, Output, PLATFORM_ID, contentChild, forwardRef, inject, input } from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n@Directive({\n selector: 'a[eclSiteHeaderCustomActionLink]',\n})\nexport class EclSiteHeaderCustomActionLinkDirective extends ECLBaseDirective implements AfterContentInit {\n @HostBinding('class') className = 'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary ecl-button--neutral ecl-button--icon-only';\n @HostBinding('attr.aria-expanded') isOverlayExpanded : boolean;\n @HostBinding('attr.aria-controls') ariaControls : string;\n @Input() @HostBinding('attr.href') href : string;\n @Input() @HostBinding('attr.routerLink') routerLink : string;\n @Output() customActionOverlayToggle = new EventEmitter<boolean>();\n eclIconComponent = contentChild<EclIconComponent>(forwardRef(() => EclIconComponent), { descendants: true });\n private readonly ARIA_CONTROLS = 'custom-action-overlay';\n private platformId = inject(PLATFORM_ID);\n\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n if (this.eclIconComponent()) {\n this.eclIconComponent().addExtraClass('ecl-site-header__icon');\n }\n if (!this.hasLink()) {\n this.href = '#';\n this.isOverlayExpanded = false;\n this.ariaControls = this.ARIA_CONTROLS;\n }\n }\n\n @HostListener('click', ['$event']) onClick(evt: Event): void {\n if (!this.hasLink()) {\n this.isOverlayExpanded = !this.isOverlayExpanded;\n evt.preventDefault();\n this.customActionOverlayToggle.emit(this.isOverlayExpanded);\n }\n }\n\n hasLink(): boolean {\n return (!!this.href && this.href !== '#') || !!this.routerLink;\n }\n}\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionContent]',\n})\nexport class EclSiteHeaderCustomActionContentDirective extends ECLBaseDirective {\n @HostBinding('class.ecl-site-header__custom-action-content') className = true;\n}\n\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionTitle]',\n})\nexport class EclSiteHeaderCustomActionTitleDirective extends ECLBaseDirective {\n @HostBinding('class.ecl-site-header__custom-action-title') className = true;\n @HostBinding('attr.id')\n @Input() id = 'custom-action-overlay-title';\n\n}",
33599
+ "sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, Directive, PLATFORM_ID, contentChild, forwardRef, inject, input, model, output } from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n@Directive({\n selector: 'a[eclSiteHeaderCustomActionLink]',\n host: {\n class: 'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary ecl-button--neutral ecl-button--icon-only',\n '[attr.aria-expanded]': 'isOverlayExpanded',\n '[attr.aria-controls]': 'ariaControls',\n '[attr.href]': 'href()',\n '[attr.routerLink]': 'routerLink()',\n '(click)': 'onClick($event)',\n },\n})\nexport class EclSiteHeaderCustomActionLinkDirective extends ECLBaseDirective implements AfterContentInit {\n readonly href = model<string>();\n readonly routerLink = input<string>();\n\n readonly customActionOverlayToggle = output<boolean>();\n\n /**\n * Whether the overlay is expanded. Set by the parent `ecl-site-header-custom-action`.\n */\n isOverlayExpanded : boolean;\n\n protected ariaControls : string;\n\n private readonly eclIconComponent = contentChild<EclIconComponent>(forwardRef(() => EclIconComponent), { descendants: true });\n private readonly ARIA_CONTROLS = 'custom-action-overlay';\n private readonly platformId = inject(PLATFORM_ID);\n\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n if (this.eclIconComponent()) {\n this.eclIconComponent().addExtraClass('ecl-site-header__icon');\n }\n if (!this.hasLink()) {\n this.href.set('#');\n this.isOverlayExpanded = false;\n this.ariaControls = this.ARIA_CONTROLS;\n }\n }\n\n onClick(evt: Event): void {\n if (!this.hasLink()) {\n this.isOverlayExpanded = !this.isOverlayExpanded;\n evt.preventDefault();\n this.customActionOverlayToggle.emit(this.isOverlayExpanded);\n }\n }\n\n hasLink(): boolean {\n return (!!this.href() && this.href() !== '#') || !!this.routerLink();\n }\n}\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionContent]',\n host: {\n class: 'ecl-site-header__custom-action-content',\n },\n})\nexport class EclSiteHeaderCustomActionContentDirective extends ECLBaseDirective {}\n\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionTitle]',\n host: {\n class: 'ecl-site-header__custom-action-title',\n '[attr.id]': 'id()',\n },\n})\nexport class EclSiteHeaderCustomActionTitleDirective extends ECLBaseDirective {\n readonly id = input('custom-action-overlay-title');\n}",
33637
33600
  "selector": "div[eclSiteHeaderCustomActionContent]",
33638
33601
  "providers": [],
33639
33602
  "hostDirectives": [],
@@ -33686,46 +33649,9 @@
33686
33649
  "outputsClass": [],
33687
33650
  "deprecated": false,
33688
33651
  "deprecationMessage": "",
33689
- "hostBindings": [
33690
- {
33691
- "coverageIgnore": false,
33692
- "name": "class.ecl-site-header__custom-action-content",
33693
- "actualName": "className",
33694
- "defaultValue": "true",
33695
- "deprecated": false,
33696
- "deprecationMessage": "",
33697
- "rawdescription": "\n",
33698
- "description": "",
33699
- "line": 48,
33700
- "type": "boolean",
33701
- "decorators": []
33702
- }
33703
- ],
33652
+ "hostBindings": [],
33704
33653
  "hostListeners": [],
33705
- "propertiesClass": [
33706
- {
33707
- "name": "className",
33708
- "coverageIgnore": false,
33709
- "defaultValue": "true",
33710
- "deprecated": false,
33711
- "deprecationMessage": "",
33712
- "type": "unknown",
33713
- "indexKey": "",
33714
- "optional": false,
33715
- "description": "",
33716
- "line": 48,
33717
- "rawdescription": "\n",
33718
- "decorators": [
33719
- {
33720
- "name": "HostBinding",
33721
- "stringifiedArguments": "'class.ecl-site-header__custom-action-content'"
33722
- }
33723
- ],
33724
- "modifierKind": [
33725
- 171
33726
- ]
33727
- }
33728
- ],
33654
+ "propertiesClass": [],
33729
33655
  "methodsClass": [
33730
33656
  {
33731
33657
  "name": "getCssClasses",
@@ -33782,38 +33708,48 @@
33782
33708
  },
33783
33709
  {
33784
33710
  "name": "EclSiteHeaderCustomActionLinkDirective",
33785
- "id": "directive-EclSiteHeaderCustomActionLinkDirective-7633b68559d061143bf803abd31054048a346ed3359883aad14adb39c4c0701559617ff4ce17fd2920b2b4bcd6d4da0fbe6973c890d33dbe77ea2c872c584b01",
33711
+ "id": "directive-EclSiteHeaderCustomActionLinkDirective-ea8212434a9aafb02f5d5305967fce291788d14004351f818db683e8e52d89f73e46ba8366a7ef10ec15d97c64c6368cc8c5ac235344d1999d7c7ecfd2e1243f",
33786
33712
  "file": "packages/ecl/components/ecl-site-header/custom-action/ecl-site-header-custom-action.directive.ts",
33787
33713
  "type": "directive",
33788
33714
  "description": "",
33789
33715
  "rawdescription": "\n",
33790
- "sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, Directive, EventEmitter, HostBinding, HostListener, Input, Output, PLATFORM_ID, contentChild, forwardRef, inject, input } from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n@Directive({\n selector: 'a[eclSiteHeaderCustomActionLink]',\n})\nexport class EclSiteHeaderCustomActionLinkDirective extends ECLBaseDirective implements AfterContentInit {\n @HostBinding('class') className = 'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary ecl-button--neutral ecl-button--icon-only';\n @HostBinding('attr.aria-expanded') isOverlayExpanded : boolean;\n @HostBinding('attr.aria-controls') ariaControls : string;\n @Input() @HostBinding('attr.href') href : string;\n @Input() @HostBinding('attr.routerLink') routerLink : string;\n @Output() customActionOverlayToggle = new EventEmitter<boolean>();\n eclIconComponent = contentChild<EclIconComponent>(forwardRef(() => EclIconComponent), { descendants: true });\n private readonly ARIA_CONTROLS = 'custom-action-overlay';\n private platformId = inject(PLATFORM_ID);\n\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n if (this.eclIconComponent()) {\n this.eclIconComponent().addExtraClass('ecl-site-header__icon');\n }\n if (!this.hasLink()) {\n this.href = '#';\n this.isOverlayExpanded = false;\n this.ariaControls = this.ARIA_CONTROLS;\n }\n }\n\n @HostListener('click', ['$event']) onClick(evt: Event): void {\n if (!this.hasLink()) {\n this.isOverlayExpanded = !this.isOverlayExpanded;\n evt.preventDefault();\n this.customActionOverlayToggle.emit(this.isOverlayExpanded);\n }\n }\n\n hasLink(): boolean {\n return (!!this.href && this.href !== '#') || !!this.routerLink;\n }\n}\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionContent]',\n})\nexport class EclSiteHeaderCustomActionContentDirective extends ECLBaseDirective {\n @HostBinding('class.ecl-site-header__custom-action-content') className = true;\n}\n\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionTitle]',\n})\nexport class EclSiteHeaderCustomActionTitleDirective extends ECLBaseDirective {\n @HostBinding('class.ecl-site-header__custom-action-title') className = true;\n @HostBinding('attr.id')\n @Input() id = 'custom-action-overlay-title';\n\n}",
33716
+ "sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, Directive, PLATFORM_ID, contentChild, forwardRef, inject, input, model, output } from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n@Directive({\n selector: 'a[eclSiteHeaderCustomActionLink]',\n host: {\n class: 'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary ecl-button--neutral ecl-button--icon-only',\n '[attr.aria-expanded]': 'isOverlayExpanded',\n '[attr.aria-controls]': 'ariaControls',\n '[attr.href]': 'href()',\n '[attr.routerLink]': 'routerLink()',\n '(click)': 'onClick($event)',\n },\n})\nexport class EclSiteHeaderCustomActionLinkDirective extends ECLBaseDirective implements AfterContentInit {\n readonly href = model<string>();\n readonly routerLink = input<string>();\n\n readonly customActionOverlayToggle = output<boolean>();\n\n /**\n * Whether the overlay is expanded. Set by the parent `ecl-site-header-custom-action`.\n */\n isOverlayExpanded : boolean;\n\n protected ariaControls : string;\n\n private readonly eclIconComponent = contentChild<EclIconComponent>(forwardRef(() => EclIconComponent), { descendants: true });\n private readonly ARIA_CONTROLS = 'custom-action-overlay';\n private readonly platformId = inject(PLATFORM_ID);\n\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n if (this.eclIconComponent()) {\n this.eclIconComponent().addExtraClass('ecl-site-header__icon');\n }\n if (!this.hasLink()) {\n this.href.set('#');\n this.isOverlayExpanded = false;\n this.ariaControls = this.ARIA_CONTROLS;\n }\n }\n\n onClick(evt: Event): void {\n if (!this.hasLink()) {\n this.isOverlayExpanded = !this.isOverlayExpanded;\n evt.preventDefault();\n this.customActionOverlayToggle.emit(this.isOverlayExpanded);\n }\n }\n\n hasLink(): boolean {\n return (!!this.href() && this.href() !== '#') || !!this.routerLink();\n }\n}\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionContent]',\n host: {\n class: 'ecl-site-header__custom-action-content',\n },\n})\nexport class EclSiteHeaderCustomActionContentDirective extends ECLBaseDirective {}\n\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionTitle]',\n host: {\n class: 'ecl-site-header__custom-action-title',\n '[attr.id]': 'id()',\n },\n})\nexport class EclSiteHeaderCustomActionTitleDirective extends ECLBaseDirective {\n readonly id = input('custom-action-overlay-title');\n}",
33791
33717
  "selector": "a[eclSiteHeaderCustomActionLink]",
33792
33718
  "providers": [],
33793
33719
  "hostDirectives": [],
33794
33720
  "standalone": false,
33795
33721
  "inputsClass": [
33796
33722
  {
33797
- "coverageIgnore": false,
33798
33723
  "name": "href",
33724
+ "coverageIgnore": false,
33799
33725
  "deprecated": false,
33800
33726
  "deprecationMessage": "",
33801
- "rawdescription": "\n",
33802
- "description": "",
33803
- "line": 13,
33804
33727
  "type": "string",
33805
- "decorators": []
33728
+ "indexKey": "",
33729
+ "optional": false,
33730
+ "description": "",
33731
+ "line": 18,
33732
+ "rawdescription": "\n",
33733
+ "modifierKind": [
33734
+ 148
33735
+ ],
33736
+ "required": false
33806
33737
  },
33807
33738
  {
33808
- "coverageIgnore": false,
33809
33739
  "name": "routerLink",
33740
+ "coverageIgnore": false,
33810
33741
  "deprecated": false,
33811
33742
  "deprecationMessage": "",
33812
- "rawdescription": "\n",
33813
- "description": "",
33814
- "line": 14,
33815
33743
  "type": "string",
33816
- "decorators": []
33744
+ "indexKey": "",
33745
+ "optional": false,
33746
+ "description": "",
33747
+ "line": 19,
33748
+ "rawdescription": "\n",
33749
+ "modifierKind": [
33750
+ 148
33751
+ ],
33752
+ "required": false
33817
33753
  },
33818
33754
  {
33819
33755
  "coverageIgnore": false,
@@ -33863,132 +33799,55 @@
33863
33799
  {
33864
33800
  "name": "customActionOverlayToggle",
33865
33801
  "coverageIgnore": false,
33866
- "defaultValue": "new EventEmitter<boolean>()",
33867
- "deprecated": false,
33868
- "deprecationMessage": "",
33869
- "line": 15,
33870
- "type": "EventEmitter"
33871
- }
33872
- ],
33873
- "deprecated": false,
33874
- "deprecationMessage": "",
33875
- "hostBindings": [
33876
- {
33877
- "coverageIgnore": false,
33878
- "name": "attr.aria-controls",
33879
- "actualName": "ariaControls",
33880
- "deprecated": false,
33881
- "deprecationMessage": "",
33882
- "rawdescription": "\n",
33883
- "description": "",
33884
- "line": 12,
33885
- "type": "string",
33886
- "decorators": []
33887
- },
33888
- {
33889
- "coverageIgnore": false,
33890
- "name": "attr.aria-expanded",
33891
- "actualName": "isOverlayExpanded",
33892
33802
  "deprecated": false,
33893
33803
  "deprecationMessage": "",
33894
- "rawdescription": "\n",
33895
- "description": "",
33896
- "line": 11,
33897
33804
  "type": "boolean",
33898
- "decorators": []
33899
- },
33900
- {
33901
- "coverageIgnore": false,
33902
- "name": "class",
33903
- "actualName": "className",
33904
- "defaultValue": "'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary ecl-button--neutral ecl-button--icon-only'",
33905
- "deprecated": false,
33906
- "deprecationMessage": "",
33907
- "rawdescription": "\n",
33908
- "description": "",
33909
- "line": 10,
33910
- "type": "string",
33911
- "decorators": []
33912
- }
33913
- ],
33914
- "hostListeners": [
33915
- {
33916
- "coverageIgnore": false,
33917
- "name": "click",
33918
- "args": [
33919
- {
33920
- "name": "evt",
33921
- "type": "Event",
33922
- "optional": false,
33923
- "dotDotDotToken": false,
33924
- "deprecated": false,
33925
- "deprecationMessage": ""
33926
- }
33927
- ],
33928
- "argsDecorator": [
33929
- "$event"
33930
- ],
33931
- "deprecated": false,
33932
- "deprecationMessage": "",
33933
- "line": 32
33934
- }
33935
- ],
33936
- "propertiesClass": [
33937
- {
33938
- "name": "ariaControls",
33939
- "coverageIgnore": false,
33940
- "deprecated": false,
33941
- "deprecationMessage": "",
33942
- "type": "string",
33943
33805
  "indexKey": "",
33944
33806
  "optional": false,
33945
33807
  "description": "",
33946
- "line": 12,
33808
+ "line": 21,
33947
33809
  "rawdescription": "\n",
33948
- "decorators": [
33949
- {
33950
- "name": "HostBinding",
33951
- "stringifiedArguments": "'attr.aria-controls'"
33952
- }
33953
- ],
33954
33810
  "modifierKind": [
33955
- 171
33956
- ]
33811
+ 148
33812
+ ],
33813
+ "required": false
33957
33814
  },
33958
33815
  {
33959
- "name": "className",
33816
+ "name": "href",
33960
33817
  "coverageIgnore": false,
33961
- "defaultValue": "'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary ecl-button--neutral ecl-button--icon-only'",
33962
33818
  "deprecated": false,
33963
33819
  "deprecationMessage": "",
33964
33820
  "type": "string",
33965
33821
  "indexKey": "",
33966
33822
  "optional": false,
33967
33823
  "description": "",
33968
- "line": 10,
33824
+ "line": 18,
33969
33825
  "rawdescription": "\n",
33970
- "decorators": [
33971
- {
33972
- "name": "HostBinding",
33973
- "stringifiedArguments": "'class'"
33974
- }
33975
- ],
33976
33826
  "modifierKind": [
33977
- 171
33978
- ]
33979
- },
33827
+ 148
33828
+ ],
33829
+ "required": false
33830
+ }
33831
+ ],
33832
+ "deprecated": false,
33833
+ "deprecationMessage": "",
33834
+ "hostBindings": [],
33835
+ "hostListeners": [],
33836
+ "propertiesClass": [
33980
33837
  {
33981
- "name": "eclIconComponent",
33838
+ "name": "ariaControls",
33982
33839
  "coverageIgnore": false,
33983
- "defaultValue": "contentChild<EclIconComponent>(forwardRef(() => EclIconComponent), { descendants: true })",
33984
33840
  "deprecated": false,
33985
33841
  "deprecationMessage": "",
33986
- "type": "unknown",
33842
+ "type": "string",
33987
33843
  "indexKey": "",
33988
33844
  "optional": false,
33989
33845
  "description": "",
33990
- "line": 16,
33991
- "rawdescription": "\n"
33846
+ "line": 28,
33847
+ "rawdescription": "\n",
33848
+ "modifierKind": [
33849
+ 124
33850
+ ]
33992
33851
  },
33993
33852
  {
33994
33853
  "name": "isOverlayExpanded",
@@ -33998,18 +33857,9 @@
33998
33857
  "type": "boolean",
33999
33858
  "indexKey": "",
34000
33859
  "optional": false,
34001
- "description": "",
34002
- "line": 11,
34003
- "rawdescription": "\n",
34004
- "decorators": [
34005
- {
34006
- "name": "HostBinding",
34007
- "stringifiedArguments": "'attr.aria-expanded'"
34008
- }
34009
- ],
34010
- "modifierKind": [
34011
- 171
34012
- ]
33860
+ "description": "<p>Whether the overlay is expanded. Set by the parent <code>ecl-site-header-custom-action</code>.</p>\n",
33861
+ "line": 26,
33862
+ "rawdescription": "\n\nWhether the overlay is expanded. Set by the parent `ecl-site-header-custom-action`.\n"
34013
33863
  }
34014
33864
  ],
34015
33865
  "methodsClass": [
@@ -34020,7 +33870,7 @@
34020
33870
  "optional": false,
34021
33871
  "returnType": "boolean",
34022
33872
  "typeParameters": [],
34023
- "line": 40,
33873
+ "line": 54,
34024
33874
  "deprecated": false,
34025
33875
  "deprecationMessage": "",
34026
33876
  "rawdescription": "\n",
@@ -34033,7 +33883,7 @@
34033
33883
  "optional": false,
34034
33884
  "returnType": "void",
34035
33885
  "typeParameters": [],
34036
- "line": 20,
33886
+ "line": 34,
34037
33887
  "deprecated": false,
34038
33888
  "deprecationMessage": "",
34039
33889
  "rawdescription": "\n",
@@ -34055,20 +33905,11 @@
34055
33905
  "optional": false,
34056
33906
  "returnType": "void",
34057
33907
  "typeParameters": [],
34058
- "line": 32,
33908
+ "line": 46,
34059
33909
  "deprecated": false,
34060
33910
  "deprecationMessage": "",
34061
33911
  "rawdescription": "\n",
34062
33912
  "description": "",
34063
- "decorators": [
34064
- {
34065
- "name": "HostListener",
34066
- "stringifiedArguments": "'click', ['$event']"
34067
- }
34068
- ],
34069
- "modifierKind": [
34070
- 171
34071
- ],
34072
33913
  "jsdoctags": [
34073
33914
  {
34074
33915
  "name": "evt",
@@ -34145,28 +33986,33 @@
34145
33986
  },
34146
33987
  {
34147
33988
  "name": "EclSiteHeaderCustomActionTitleDirective",
34148
- "id": "directive-EclSiteHeaderCustomActionTitleDirective-7633b68559d061143bf803abd31054048a346ed3359883aad14adb39c4c0701559617ff4ce17fd2920b2b4bcd6d4da0fbe6973c890d33dbe77ea2c872c584b01",
33989
+ "id": "directive-EclSiteHeaderCustomActionTitleDirective-ea8212434a9aafb02f5d5305967fce291788d14004351f818db683e8e52d89f73e46ba8366a7ef10ec15d97c64c6368cc8c5ac235344d1999d7c7ecfd2e1243f",
34149
33990
  "file": "packages/ecl/components/ecl-site-header/custom-action/ecl-site-header-custom-action.directive.ts",
34150
33991
  "type": "directive",
34151
33992
  "description": "",
34152
33993
  "rawdescription": "\n",
34153
- "sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, Directive, EventEmitter, HostBinding, HostListener, Input, Output, PLATFORM_ID, contentChild, forwardRef, inject, input } from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n@Directive({\n selector: 'a[eclSiteHeaderCustomActionLink]',\n})\nexport class EclSiteHeaderCustomActionLinkDirective extends ECLBaseDirective implements AfterContentInit {\n @HostBinding('class') className = 'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary ecl-button--neutral ecl-button--icon-only';\n @HostBinding('attr.aria-expanded') isOverlayExpanded : boolean;\n @HostBinding('attr.aria-controls') ariaControls : string;\n @Input() @HostBinding('attr.href') href : string;\n @Input() @HostBinding('attr.routerLink') routerLink : string;\n @Output() customActionOverlayToggle = new EventEmitter<boolean>();\n eclIconComponent = contentChild<EclIconComponent>(forwardRef(() => EclIconComponent), { descendants: true });\n private readonly ARIA_CONTROLS = 'custom-action-overlay';\n private platformId = inject(PLATFORM_ID);\n\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n if (this.eclIconComponent()) {\n this.eclIconComponent().addExtraClass('ecl-site-header__icon');\n }\n if (!this.hasLink()) {\n this.href = '#';\n this.isOverlayExpanded = false;\n this.ariaControls = this.ARIA_CONTROLS;\n }\n }\n\n @HostListener('click', ['$event']) onClick(evt: Event): void {\n if (!this.hasLink()) {\n this.isOverlayExpanded = !this.isOverlayExpanded;\n evt.preventDefault();\n this.customActionOverlayToggle.emit(this.isOverlayExpanded);\n }\n }\n\n hasLink(): boolean {\n return (!!this.href && this.href !== '#') || !!this.routerLink;\n }\n}\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionContent]',\n})\nexport class EclSiteHeaderCustomActionContentDirective extends ECLBaseDirective {\n @HostBinding('class.ecl-site-header__custom-action-content') className = true;\n}\n\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionTitle]',\n})\nexport class EclSiteHeaderCustomActionTitleDirective extends ECLBaseDirective {\n @HostBinding('class.ecl-site-header__custom-action-title') className = true;\n @HostBinding('attr.id')\n @Input() id = 'custom-action-overlay-title';\n\n}",
33994
+ "sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, Directive, PLATFORM_ID, contentChild, forwardRef, inject, input, model, output } from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n@Directive({\n selector: 'a[eclSiteHeaderCustomActionLink]',\n host: {\n class: 'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary ecl-button--neutral ecl-button--icon-only',\n '[attr.aria-expanded]': 'isOverlayExpanded',\n '[attr.aria-controls]': 'ariaControls',\n '[attr.href]': 'href()',\n '[attr.routerLink]': 'routerLink()',\n '(click)': 'onClick($event)',\n },\n})\nexport class EclSiteHeaderCustomActionLinkDirective extends ECLBaseDirective implements AfterContentInit {\n readonly href = model<string>();\n readonly routerLink = input<string>();\n\n readonly customActionOverlayToggle = output<boolean>();\n\n /**\n * Whether the overlay is expanded. Set by the parent `ecl-site-header-custom-action`.\n */\n isOverlayExpanded : boolean;\n\n protected ariaControls : string;\n\n private readonly eclIconComponent = contentChild<EclIconComponent>(forwardRef(() => EclIconComponent), { descendants: true });\n private readonly ARIA_CONTROLS = 'custom-action-overlay';\n private readonly platformId = inject(PLATFORM_ID);\n\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n if (this.eclIconComponent()) {\n this.eclIconComponent().addExtraClass('ecl-site-header__icon');\n }\n if (!this.hasLink()) {\n this.href.set('#');\n this.isOverlayExpanded = false;\n this.ariaControls = this.ARIA_CONTROLS;\n }\n }\n\n onClick(evt: Event): void {\n if (!this.hasLink()) {\n this.isOverlayExpanded = !this.isOverlayExpanded;\n evt.preventDefault();\n this.customActionOverlayToggle.emit(this.isOverlayExpanded);\n }\n }\n\n hasLink(): boolean {\n return (!!this.href() && this.href() !== '#') || !!this.routerLink();\n }\n}\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionContent]',\n host: {\n class: 'ecl-site-header__custom-action-content',\n },\n})\nexport class EclSiteHeaderCustomActionContentDirective extends ECLBaseDirective {}\n\n@Directive({\n selector: 'div[eclSiteHeaderCustomActionTitle]',\n host: {\n class: 'ecl-site-header__custom-action-title',\n '[attr.id]': 'id()',\n },\n})\nexport class EclSiteHeaderCustomActionTitleDirective extends ECLBaseDirective {\n readonly id = input('custom-action-overlay-title');\n}",
34154
33995
  "selector": "div[eclSiteHeaderCustomActionTitle]",
34155
33996
  "providers": [],
34156
33997
  "hostDirectives": [],
34157
33998
  "standalone": false,
34158
33999
  "inputsClass": [
34159
34000
  {
34160
- "coverageIgnore": false,
34161
34001
  "name": "id",
34002
+ "coverageIgnore": false,
34162
34003
  "defaultValue": "'custom-action-overlay-title'",
34163
34004
  "deprecated": false,
34164
34005
  "deprecationMessage": "",
34165
- "rawdescription": "\n",
34166
- "description": "",
34167
- "line": 57,
34168
34006
  "type": "string",
34169
- "decorators": []
34007
+ "indexKey": "",
34008
+ "optional": false,
34009
+ "description": "",
34010
+ "line": 74,
34011
+ "rawdescription": "\n",
34012
+ "modifierKind": [
34013
+ 148
34014
+ ],
34015
+ "required": false
34170
34016
  },
34171
34017
  {
34172
34018
  "coverageIgnore": false,
@@ -34215,46 +34061,9 @@
34215
34061
  "outputsClass": [],
34216
34062
  "deprecated": false,
34217
34063
  "deprecationMessage": "",
34218
- "hostBindings": [
34219
- {
34220
- "coverageIgnore": false,
34221
- "name": "class.ecl-site-header__custom-action-title",
34222
- "actualName": "className",
34223
- "defaultValue": "true",
34224
- "deprecated": false,
34225
- "deprecationMessage": "",
34226
- "rawdescription": "\n",
34227
- "description": "",
34228
- "line": 55,
34229
- "type": "boolean",
34230
- "decorators": []
34231
- }
34232
- ],
34064
+ "hostBindings": [],
34233
34065
  "hostListeners": [],
34234
- "propertiesClass": [
34235
- {
34236
- "name": "className",
34237
- "coverageIgnore": false,
34238
- "defaultValue": "true",
34239
- "deprecated": false,
34240
- "deprecationMessage": "",
34241
- "type": "unknown",
34242
- "indexKey": "",
34243
- "optional": false,
34244
- "description": "",
34245
- "line": 55,
34246
- "rawdescription": "\n",
34247
- "decorators": [
34248
- {
34249
- "name": "HostBinding",
34250
- "stringifiedArguments": "'class.ecl-site-header__custom-action-title'"
34251
- }
34252
- ],
34253
- "modifierKind": [
34254
- 171
34255
- ]
34256
- }
34257
- ],
34066
+ "propertiesClass": [],
34258
34067
  "methodsClass": [
34259
34068
  {
34260
34069
  "name": "getCssClasses",
@@ -34311,12 +34120,12 @@
34311
34120
  },
34312
34121
  {
34313
34122
  "name": "EclSiteHeaderImageDirective",
34314
- "id": "directive-EclSiteHeaderImageDirective-41ca38909899e8390597823b2cffcf827cbba69370f688880a68bdbff907deddb8e4680252cfc8cfa992b6b2a859484d83df4dae2dd6bbde16d2a5af9cf40060",
34123
+ "id": "directive-EclSiteHeaderImageDirective-ef9136c9dce89a68075874f34b7b3a5b80aad478e15097f6dbaea4a7596340c6233e699f08bde921e65379a9a5a221bf30075af3bd0c007f1aad9d5efbd6e291",
34315
34124
  "file": "packages/ecl/components/ecl-site-header/picture/ecl-site-header-picture.directive.ts",
34316
34125
  "type": "directive",
34317
34126
  "description": "<p>Adds some specific classes for <img> element, when used in the site header logo.</p>\n",
34318
34127
  "rawdescription": "\n\nAdds some specific classes for <img> element, when used in the site header logo.\n",
34319
- "sourceCode": "import { Directive, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Adds some specific classes for picture element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderPicture]',\n})\nexport class EclSiteHeaderPictureDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-site-header__picture ecl-picture';\n}\n\n/**\n * Adds some specific classes for <img> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderImage]',\n})\nexport class EclSiteHeaderImageDirective extends ECLBaseDirective {\n logoSize: string;\n\n @HostBinding('class')\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-site-header__logo-image'),\n `ecl-site-header__logo-image--${this.logoSize}`,\n ].join(' ').trim();\n }\n}\n\n/**\n * Adds some specific classes for <a> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderLink]',\n})\nexport class EclSiteHeaderLinkDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-link ecl-link--standalone ecl-site-header__logo-link';\n}\n",
34128
+ "sourceCode": "import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Adds some specific classes for picture element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderPicture]',\n host: {\n class: 'ecl-site-header__picture ecl-picture',\n },\n})\nexport class EclSiteHeaderPictureDirective extends ECLBaseDirective {}\n\n/**\n * Adds some specific classes for <img> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderImage]',\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclSiteHeaderImageDirective extends ECLBaseDirective {\n logoSize: string;\n\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-site-header__logo-image'),\n `ecl-site-header__logo-image--${this.logoSize}`,\n ].join(' ').trim();\n }\n}\n\n/**\n * Adds some specific classes for <a> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderLink]',\n host: {\n class: 'ecl-link ecl-link--standalone ecl-site-header__logo-link',\n },\n})\nexport class EclSiteHeaderLinkDirective extends ECLBaseDirective {}\n",
34320
34129
  "selector": "[eclSiteHeaderImage]",
34321
34130
  "providers": [],
34322
34131
  "hostDirectives": [],
@@ -34369,20 +34178,7 @@
34369
34178
  "outputsClass": [],
34370
34179
  "deprecated": false,
34371
34180
  "deprecationMessage": "",
34372
- "hostBindings": [
34373
- {
34374
- "coverageIgnore": false,
34375
- "name": "class",
34376
- "actualName": "cssClasses",
34377
- "deprecated": false,
34378
- "deprecationMessage": "",
34379
- "rawdescription": "\n",
34380
- "description": "",
34381
- "line": 24,
34382
- "type": "string",
34383
- "decorators": []
34384
- }
34385
- ],
34181
+ "hostBindings": [],
34386
34182
  "hostListeners": [],
34387
34183
  "propertiesClass": [
34388
34184
  {
@@ -34394,7 +34190,7 @@
34394
34190
  "indexKey": "",
34395
34191
  "optional": false,
34396
34192
  "description": "",
34397
- "line": 21,
34193
+ "line": 25,
34398
34194
  "rawdescription": "\n"
34399
34195
  }
34400
34196
  ],
@@ -34441,8 +34237,8 @@
34441
34237
  "coverageIgnore": false,
34442
34238
  "jsdoctags": [
34443
34239
  {
34444
- "pos": 408,
34445
- "end": 499,
34240
+ "pos": 390,
34241
+ "end": 481,
34446
34242
  "kind": 321,
34447
34243
  "id": 0,
34448
34244
  "flags": 16777216,
@@ -34461,7 +34257,7 @@
34461
34257
  "name": "cssClasses",
34462
34258
  "type": "string",
34463
34259
  "returnType": "string",
34464
- "line": 24,
34260
+ "line": 27,
34465
34261
  "rawdescription": "\n",
34466
34262
  "description": ""
34467
34263
  }
@@ -34479,12 +34275,12 @@
34479
34275
  },
34480
34276
  {
34481
34277
  "name": "EclSiteHeaderLinkDirective",
34482
- "id": "directive-EclSiteHeaderLinkDirective-41ca38909899e8390597823b2cffcf827cbba69370f688880a68bdbff907deddb8e4680252cfc8cfa992b6b2a859484d83df4dae2dd6bbde16d2a5af9cf40060",
34278
+ "id": "directive-EclSiteHeaderLinkDirective-ef9136c9dce89a68075874f34b7b3a5b80aad478e15097f6dbaea4a7596340c6233e699f08bde921e65379a9a5a221bf30075af3bd0c007f1aad9d5efbd6e291",
34483
34279
  "file": "packages/ecl/components/ecl-site-header/picture/ecl-site-header-picture.directive.ts",
34484
34280
  "type": "directive",
34485
34281
  "description": "<p>Adds some specific classes for <a> element, when used in the site header logo.</p>\n",
34486
34282
  "rawdescription": "\n\nAdds some specific classes for <a> element, when used in the site header logo.\n",
34487
- "sourceCode": "import { Directive, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Adds some specific classes for picture element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderPicture]',\n})\nexport class EclSiteHeaderPictureDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-site-header__picture ecl-picture';\n}\n\n/**\n * Adds some specific classes for <img> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderImage]',\n})\nexport class EclSiteHeaderImageDirective extends ECLBaseDirective {\n logoSize: string;\n\n @HostBinding('class')\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-site-header__logo-image'),\n `ecl-site-header__logo-image--${this.logoSize}`,\n ].join(' ').trim();\n }\n}\n\n/**\n * Adds some specific classes for <a> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderLink]',\n})\nexport class EclSiteHeaderLinkDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-link ecl-link--standalone ecl-site-header__logo-link';\n}\n",
34283
+ "sourceCode": "import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Adds some specific classes for picture element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderPicture]',\n host: {\n class: 'ecl-site-header__picture ecl-picture',\n },\n})\nexport class EclSiteHeaderPictureDirective extends ECLBaseDirective {}\n\n/**\n * Adds some specific classes for <img> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderImage]',\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclSiteHeaderImageDirective extends ECLBaseDirective {\n logoSize: string;\n\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-site-header__logo-image'),\n `ecl-site-header__logo-image--${this.logoSize}`,\n ].join(' ').trim();\n }\n}\n\n/**\n * Adds some specific classes for <a> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderLink]',\n host: {\n class: 'ecl-link ecl-link--standalone ecl-site-header__logo-link',\n },\n})\nexport class EclSiteHeaderLinkDirective extends ECLBaseDirective {}\n",
34488
34284
  "selector": "[eclSiteHeaderLink]",
34489
34285
  "providers": [],
34490
34286
  "hostDirectives": [],
@@ -34537,46 +34333,9 @@
34537
34333
  "outputsClass": [],
34538
34334
  "deprecated": false,
34539
34335
  "deprecationMessage": "",
34540
- "hostBindings": [
34541
- {
34542
- "coverageIgnore": false,
34543
- "name": "class",
34544
- "actualName": "className",
34545
- "defaultValue": "'ecl-link ecl-link--standalone ecl-site-header__logo-link'",
34546
- "deprecated": false,
34547
- "deprecationMessage": "",
34548
- "rawdescription": "\n",
34549
- "description": "",
34550
- "line": 39,
34551
- "type": "string",
34552
- "decorators": []
34553
- }
34554
- ],
34336
+ "hostBindings": [],
34555
34337
  "hostListeners": [],
34556
- "propertiesClass": [
34557
- {
34558
- "name": "className",
34559
- "coverageIgnore": false,
34560
- "defaultValue": "'ecl-link ecl-link--standalone ecl-site-header__logo-link'",
34561
- "deprecated": false,
34562
- "deprecationMessage": "",
34563
- "type": "string",
34564
- "indexKey": "",
34565
- "optional": false,
34566
- "description": "",
34567
- "line": 39,
34568
- "rawdescription": "\n",
34569
- "decorators": [
34570
- {
34571
- "name": "HostBinding",
34572
- "stringifiedArguments": "'class'"
34573
- }
34574
- ],
34575
- "modifierKind": [
34576
- 171
34577
- ]
34578
- }
34579
- ],
34338
+ "propertiesClass": [],
34580
34339
  "methodsClass": [
34581
34340
  {
34582
34341
  "name": "getCssClasses",
@@ -34620,8 +34379,8 @@
34620
34379
  "coverageIgnore": false,
34621
34380
  "jsdoctags": [
34622
34381
  {
34623
- "pos": 881,
34624
- "end": 970,
34382
+ "pos": 889,
34383
+ "end": 978,
34625
34384
  "kind": 321,
34626
34385
  "id": 0,
34627
34386
  "flags": 16777216,
@@ -34645,12 +34404,12 @@
34645
34404
  },
34646
34405
  {
34647
34406
  "name": "EclSiteHeaderLoginDescriptionDirective",
34648
- "id": "directive-EclSiteHeaderLoginDescriptionDirective-ea5d55ce16df2636e377a1e271e59793360830a9407fab3c59109d5eef8b0ed527c23879d95429471ee3c8704e5857aba04280541a0c343a132b479ac95b4ada",
34407
+ "id": "directive-EclSiteHeaderLoginDescriptionDirective-cc36e31651c096616d8f27eef5f0e4702d3cf6290fb94dcf53146d267549554d9f304256e37007ff232ea23612001ebdc18d7c08c650e3f6188803646ec837bc",
34649
34408
  "file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login-details.directive.ts",
34650
34409
  "type": "directive",
34651
34410
  "description": "<p>This directive is used to add specific class for the login description element, within the login dropdown.</p>\n",
34652
34411
  "rawdescription": "\n\nThis directive is used to add specific class for the login description element, within the login dropdown.\n",
34653
- "sourceCode": "import { Directive, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This directive is used to add specific class for the login description element, within the login dropdown.\n */\n@Directive({\n selector: '[eclSiteHeaderLoginDescription]',\n})\nexport class EclSiteHeaderLoginDescriptionDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-site-header__login-description';\n}\n\n/**\n * This directive is used to add specific class for the horizontal line, that separates\n * description from the 'Logout' link.\n */\n@Directive({\n selector: '[eclSiteHeaderLoginSeparator]',\n})\nexport class EclSiteHeaderLoginSeparatorDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-site-header__login-separator';\n}\n",
34412
+ "sourceCode": "import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This directive is used to add specific class for the login description element, within the login dropdown.\n */\n@Directive({\n selector: '[eclSiteHeaderLoginDescription]',\n host: {\n class: 'ecl-site-header__login-description',\n },\n})\nexport class EclSiteHeaderLoginDescriptionDirective extends ECLBaseDirective {}\n\n/**\n * This directive is used to add specific class for the horizontal line, that separates\n * description from the 'Logout' link.\n */\n@Directive({\n selector: '[eclSiteHeaderLoginSeparator]',\n host: {\n class: 'ecl-site-header__login-separator',\n },\n})\nexport class EclSiteHeaderLoginSeparatorDirective extends ECLBaseDirective {}\n",
34654
34413
  "selector": "[eclSiteHeaderLoginDescription]",
34655
34414
  "providers": [],
34656
34415
  "hostDirectives": [],
@@ -34703,46 +34462,9 @@
34703
34462
  "outputsClass": [],
34704
34463
  "deprecated": false,
34705
34464
  "deprecationMessage": "",
34706
- "hostBindings": [
34707
- {
34708
- "coverageIgnore": false,
34709
- "name": "class",
34710
- "actualName": "className",
34711
- "defaultValue": "'ecl-site-header__login-description'",
34712
- "deprecated": false,
34713
- "deprecationMessage": "",
34714
- "rawdescription": "\n",
34715
- "description": "",
34716
- "line": 11,
34717
- "type": "string",
34718
- "decorators": []
34719
- }
34720
- ],
34465
+ "hostBindings": [],
34721
34466
  "hostListeners": [],
34722
- "propertiesClass": [
34723
- {
34724
- "name": "className",
34725
- "coverageIgnore": false,
34726
- "defaultValue": "'ecl-site-header__login-description'",
34727
- "deprecated": false,
34728
- "deprecationMessage": "",
34729
- "type": "string",
34730
- "indexKey": "",
34731
- "optional": false,
34732
- "description": "",
34733
- "line": 11,
34734
- "rawdescription": "\n",
34735
- "decorators": [
34736
- {
34737
- "name": "HostBinding",
34738
- "stringifiedArguments": "'class'"
34739
- }
34740
- ],
34741
- "modifierKind": [
34742
- 171
34743
- ]
34744
- }
34745
- ],
34467
+ "propertiesClass": [],
34746
34468
  "methodsClass": [
34747
34469
  {
34748
34470
  "name": "getCssClasses",
@@ -34786,8 +34508,8 @@
34786
34508
  "coverageIgnore": false,
34787
34509
  "jsdoctags": [
34788
34510
  {
34789
- "pos": 107,
34790
- "end": 224,
34511
+ "pos": 94,
34512
+ "end": 211,
34791
34513
  "kind": 321,
34792
34514
  "id": 0,
34793
34515
  "flags": 16777216,
@@ -34811,12 +34533,12 @@
34811
34533
  },
34812
34534
  {
34813
34535
  "name": "EclSiteHeaderLoginSeparatorDirective",
34814
- "id": "directive-EclSiteHeaderLoginSeparatorDirective-ea5d55ce16df2636e377a1e271e59793360830a9407fab3c59109d5eef8b0ed527c23879d95429471ee3c8704e5857aba04280541a0c343a132b479ac95b4ada",
34536
+ "id": "directive-EclSiteHeaderLoginSeparatorDirective-cc36e31651c096616d8f27eef5f0e4702d3cf6290fb94dcf53146d267549554d9f304256e37007ff232ea23612001ebdc18d7c08c650e3f6188803646ec837bc",
34815
34537
  "file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login-details.directive.ts",
34816
34538
  "type": "directive",
34817
34539
  "description": "<p>This directive is used to add specific class for the horizontal line, that separates\n description from the &#39;Logout&#39; link.</p>\n",
34818
34540
  "rawdescription": "\n\nThis directive is used to add specific class for the horizontal line, that separates\n description from the 'Logout' link.\n",
34819
- "sourceCode": "import { Directive, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This directive is used to add specific class for the login description element, within the login dropdown.\n */\n@Directive({\n selector: '[eclSiteHeaderLoginDescription]',\n})\nexport class EclSiteHeaderLoginDescriptionDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-site-header__login-description';\n}\n\n/**\n * This directive is used to add specific class for the horizontal line, that separates\n * description from the 'Logout' link.\n */\n@Directive({\n selector: '[eclSiteHeaderLoginSeparator]',\n})\nexport class EclSiteHeaderLoginSeparatorDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-site-header__login-separator';\n}\n",
34541
+ "sourceCode": "import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This directive is used to add specific class for the login description element, within the login dropdown.\n */\n@Directive({\n selector: '[eclSiteHeaderLoginDescription]',\n host: {\n class: 'ecl-site-header__login-description',\n },\n})\nexport class EclSiteHeaderLoginDescriptionDirective extends ECLBaseDirective {}\n\n/**\n * This directive is used to add specific class for the horizontal line, that separates\n * description from the 'Logout' link.\n */\n@Directive({\n selector: '[eclSiteHeaderLoginSeparator]',\n host: {\n class: 'ecl-site-header__login-separator',\n },\n})\nexport class EclSiteHeaderLoginSeparatorDirective extends ECLBaseDirective {}\n",
34820
34542
  "selector": "[eclSiteHeaderLoginSeparator]",
34821
34543
  "providers": [],
34822
34544
  "hostDirectives": [],
@@ -34869,46 +34591,138 @@
34869
34591
  "outputsClass": [],
34870
34592
  "deprecated": false,
34871
34593
  "deprecationMessage": "",
34872
- "hostBindings": [
34594
+ "hostBindings": [],
34595
+ "hostListeners": [],
34596
+ "propertiesClass": [],
34597
+ "methodsClass": [
34873
34598
  {
34599
+ "name": "getCssClasses",
34874
34600
  "coverageIgnore": false,
34875
- "name": "class",
34876
- "actualName": "className",
34877
- "defaultValue": "'ecl-site-header__login-separator'",
34601
+ "args": [
34602
+ {
34603
+ "name": "rootClass",
34604
+ "type": "string",
34605
+ "optional": false,
34606
+ "dotDotDotToken": false,
34607
+ "deprecated": false,
34608
+ "deprecationMessage": ""
34609
+ }
34610
+ ],
34611
+ "optional": false,
34612
+ "returnType": "string",
34613
+ "typeParameters": [],
34614
+ "line": 15,
34878
34615
  "deprecated": false,
34879
34616
  "deprecationMessage": "",
34880
34617
  "rawdescription": "\n",
34881
34618
  "description": "",
34882
- "line": 22,
34883
- "type": "string",
34884
- "decorators": []
34619
+ "jsdoctags": [
34620
+ {
34621
+ "name": "rootClass",
34622
+ "type": "string",
34623
+ "optional": false,
34624
+ "dotDotDotToken": false,
34625
+ "deprecated": false,
34626
+ "deprecationMessage": "",
34627
+ "tagName": {
34628
+ "text": "param"
34629
+ }
34630
+ }
34631
+ ],
34632
+ "inheritance": {
34633
+ "file": "ECLBaseDirective"
34634
+ }
34885
34635
  }
34886
34636
  ],
34887
- "hostListeners": [],
34888
- "propertiesClass": [
34637
+ "coverageIgnore": false,
34638
+ "jsdoctags": [
34639
+ {
34640
+ "pos": 430,
34641
+ "end": 565,
34642
+ "kind": 321,
34643
+ "id": 0,
34644
+ "flags": 16777216,
34645
+ "modifierFlagsCache": 0,
34646
+ "transformFlags": 0,
34647
+ "comment": "This directive is used to add specific class for the horizontal line, that separates\n description from the 'Logout' link."
34648
+ }
34649
+ ],
34650
+ "extends": [
34651
+ "ECLBaseDirective"
34652
+ ],
34653
+ "relationships": {
34654
+ "incoming": [],
34655
+ "outgoing": [
34656
+ {
34657
+ "name": "ECLBaseDirective",
34658
+ "type": "directive"
34659
+ }
34660
+ ]
34661
+ }
34662
+ },
34663
+ {
34664
+ "name": "EclSiteHeaderPictureDirective",
34665
+ "id": "directive-EclSiteHeaderPictureDirective-ef9136c9dce89a68075874f34b7b3a5b80aad478e15097f6dbaea4a7596340c6233e699f08bde921e65379a9a5a221bf30075af3bd0c007f1aad9d5efbd6e291",
34666
+ "file": "packages/ecl/components/ecl-site-header/picture/ecl-site-header-picture.directive.ts",
34667
+ "type": "directive",
34668
+ "description": "<p>Adds some specific classes for picture element, when used in the site header logo.</p>\n",
34669
+ "rawdescription": "\n\nAdds some specific classes for picture element, when used in the site header logo.\n",
34670
+ "sourceCode": "import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Adds some specific classes for picture element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderPicture]',\n host: {\n class: 'ecl-site-header__picture ecl-picture',\n },\n})\nexport class EclSiteHeaderPictureDirective extends ECLBaseDirective {}\n\n/**\n * Adds some specific classes for <img> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderImage]',\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclSiteHeaderImageDirective extends ECLBaseDirective {\n logoSize: string;\n\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-site-header__logo-image'),\n `ecl-site-header__logo-image--${this.logoSize}`,\n ].join(' ').trim();\n }\n}\n\n/**\n * Adds some specific classes for <a> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderLink]',\n host: {\n class: 'ecl-link ecl-link--standalone ecl-site-header__logo-link',\n },\n})\nexport class EclSiteHeaderLinkDirective extends ECLBaseDirective {}\n",
34671
+ "selector": "[eclSiteHeaderPicture]",
34672
+ "providers": [],
34673
+ "hostDirectives": [],
34674
+ "standalone": false,
34675
+ "inputsClass": [
34889
34676
  {
34890
- "name": "className",
34891
34677
  "coverageIgnore": false,
34892
- "defaultValue": "'ecl-site-header__login-separator'",
34678
+ "name": "class",
34893
34679
  "deprecated": false,
34894
34680
  "deprecationMessage": "",
34681
+ "rawdescription": "\n",
34682
+ "description": "",
34683
+ "line": 8,
34895
34684
  "type": "string",
34896
- "indexKey": "",
34897
- "optional": false,
34685
+ "decorators": [],
34686
+ "inheritance": {
34687
+ "file": "ECLBaseDirective"
34688
+ }
34689
+ },
34690
+ {
34691
+ "coverageIgnore": false,
34692
+ "name": "e2eAttr",
34693
+ "deprecated": false,
34694
+ "deprecationMessage": "",
34695
+ "rawdescription": "\n",
34898
34696
  "description": "",
34899
- "line": 22,
34697
+ "line": 10,
34698
+ "type": "any",
34699
+ "decorators": [],
34700
+ "inheritance": {
34701
+ "file": "ECLBaseDirective"
34702
+ }
34703
+ },
34704
+ {
34705
+ "coverageIgnore": false,
34706
+ "required": false,
34707
+ "name": "tabindex",
34708
+ "deprecated": false,
34709
+ "deprecationMessage": "",
34900
34710
  "rawdescription": "\n",
34901
- "decorators": [
34902
- {
34903
- "name": "HostBinding",
34904
- "stringifiedArguments": "'class'"
34905
- }
34906
- ],
34907
- "modifierKind": [
34908
- 171
34909
- ]
34711
+ "description": "",
34712
+ "line": 13,
34713
+ "type": "number",
34714
+ "decorators": [],
34715
+ "inheritance": {
34716
+ "file": "ECLBaseDirective"
34717
+ }
34910
34718
  }
34911
34719
  ],
34720
+ "outputsClass": [],
34721
+ "deprecated": false,
34722
+ "deprecationMessage": "",
34723
+ "hostBindings": [],
34724
+ "hostListeners": [],
34725
+ "propertiesClass": [],
34912
34726
  "methodsClass": [
34913
34727
  {
34914
34728
  "name": "getCssClasses",
@@ -34952,174 +34766,8 @@
34952
34766
  "coverageIgnore": false,
34953
34767
  "jsdoctags": [
34954
34768
  {
34955
- "pos": 448,
34956
- "end": 583,
34957
- "kind": 321,
34958
- "id": 0,
34959
- "flags": 16777216,
34960
- "modifierFlagsCache": 0,
34961
- "transformFlags": 0,
34962
- "comment": "This directive is used to add specific class for the horizontal line, that separates\n description from the 'Logout' link."
34963
- }
34964
- ],
34965
- "extends": [
34966
- "ECLBaseDirective"
34967
- ],
34968
- "relationships": {
34969
- "incoming": [],
34970
- "outgoing": [
34971
- {
34972
- "name": "ECLBaseDirective",
34973
- "type": "directive"
34974
- }
34975
- ]
34976
- }
34977
- },
34978
- {
34979
- "name": "EclSiteHeaderPictureDirective",
34980
- "id": "directive-EclSiteHeaderPictureDirective-41ca38909899e8390597823b2cffcf827cbba69370f688880a68bdbff907deddb8e4680252cfc8cfa992b6b2a859484d83df4dae2dd6bbde16d2a5af9cf40060",
34981
- "file": "packages/ecl/components/ecl-site-header/picture/ecl-site-header-picture.directive.ts",
34982
- "type": "directive",
34983
- "description": "<p>Adds some specific classes for picture element, when used in the site header logo.</p>\n",
34984
- "rawdescription": "\n\nAdds some specific classes for picture element, when used in the site header logo.\n",
34985
- "sourceCode": "import { Directive, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Adds some specific classes for picture element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderPicture]',\n})\nexport class EclSiteHeaderPictureDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-site-header__picture ecl-picture';\n}\n\n/**\n * Adds some specific classes for <img> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderImage]',\n})\nexport class EclSiteHeaderImageDirective extends ECLBaseDirective {\n logoSize: string;\n\n @HostBinding('class')\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-site-header__logo-image'),\n `ecl-site-header__logo-image--${this.logoSize}`,\n ].join(' ').trim();\n }\n}\n\n/**\n * Adds some specific classes for <a> element, when used in the site header logo.\n */\n@Directive({\n selector: '[eclSiteHeaderLink]',\n})\nexport class EclSiteHeaderLinkDirective extends ECLBaseDirective {\n @HostBinding('class') className = 'ecl-link ecl-link--standalone ecl-site-header__logo-link';\n}\n",
34986
- "selector": "[eclSiteHeaderPicture]",
34987
- "providers": [],
34988
- "hostDirectives": [],
34989
- "standalone": false,
34990
- "inputsClass": [
34991
- {
34992
- "coverageIgnore": false,
34993
- "name": "class",
34994
- "deprecated": false,
34995
- "deprecationMessage": "",
34996
- "rawdescription": "\n",
34997
- "description": "",
34998
- "line": 8,
34999
- "type": "string",
35000
- "decorators": [],
35001
- "inheritance": {
35002
- "file": "ECLBaseDirective"
35003
- }
35004
- },
35005
- {
35006
- "coverageIgnore": false,
35007
- "name": "e2eAttr",
35008
- "deprecated": false,
35009
- "deprecationMessage": "",
35010
- "rawdescription": "\n",
35011
- "description": "",
35012
- "line": 10,
35013
- "type": "any",
35014
- "decorators": [],
35015
- "inheritance": {
35016
- "file": "ECLBaseDirective"
35017
- }
35018
- },
35019
- {
35020
- "coverageIgnore": false,
35021
- "required": false,
35022
- "name": "tabindex",
35023
- "deprecated": false,
35024
- "deprecationMessage": "",
35025
- "rawdescription": "\n",
35026
- "description": "",
35027
- "line": 13,
35028
- "type": "number",
35029
- "decorators": [],
35030
- "inheritance": {
35031
- "file": "ECLBaseDirective"
35032
- }
35033
- }
35034
- ],
35035
- "outputsClass": [],
35036
- "deprecated": false,
35037
- "deprecationMessage": "",
35038
- "hostBindings": [
35039
- {
35040
- "coverageIgnore": false,
35041
- "name": "class",
35042
- "actualName": "className",
35043
- "defaultValue": "'ecl-site-header__picture ecl-picture'",
35044
- "deprecated": false,
35045
- "deprecationMessage": "",
35046
- "rawdescription": "\n",
35047
- "description": "",
35048
- "line": 11,
35049
- "type": "string",
35050
- "decorators": []
35051
- }
35052
- ],
35053
- "hostListeners": [],
35054
- "propertiesClass": [
35055
- {
35056
- "name": "className",
35057
- "coverageIgnore": false,
35058
- "defaultValue": "'ecl-site-header__picture ecl-picture'",
35059
- "deprecated": false,
35060
- "deprecationMessage": "",
35061
- "type": "string",
35062
- "indexKey": "",
35063
- "optional": false,
35064
- "description": "",
35065
- "line": 11,
35066
- "rawdescription": "\n",
35067
- "decorators": [
35068
- {
35069
- "name": "HostBinding",
35070
- "stringifiedArguments": "'class'"
35071
- }
35072
- ],
35073
- "modifierKind": [
35074
- 171
35075
- ]
35076
- }
35077
- ],
35078
- "methodsClass": [
35079
- {
35080
- "name": "getCssClasses",
35081
- "coverageIgnore": false,
35082
- "args": [
35083
- {
35084
- "name": "rootClass",
35085
- "type": "string",
35086
- "optional": false,
35087
- "dotDotDotToken": false,
35088
- "deprecated": false,
35089
- "deprecationMessage": ""
35090
- }
35091
- ],
35092
- "optional": false,
35093
- "returnType": "string",
35094
- "typeParameters": [],
35095
- "line": 15,
35096
- "deprecated": false,
35097
- "deprecationMessage": "",
35098
- "rawdescription": "\n",
35099
- "description": "",
35100
- "jsdoctags": [
35101
- {
35102
- "name": "rootClass",
35103
- "type": "string",
35104
- "optional": false,
35105
- "dotDotDotToken": false,
35106
- "deprecated": false,
35107
- "deprecationMessage": "",
35108
- "tagName": {
35109
- "text": "param"
35110
- }
35111
- }
35112
- ],
35113
- "inheritance": {
35114
- "file": "ECLBaseDirective"
35115
- }
35116
- }
35117
- ],
35118
- "coverageIgnore": false,
35119
- "jsdoctags": [
35120
- {
35121
- "pos": 107,
35122
- "end": 200,
34769
+ "pos": 94,
34770
+ "end": 187,
35123
34771
  "kind": 321,
35124
34772
  "id": 0,
35125
34773
  "flags": 16777216,
@@ -41970,7 +41618,7 @@
41970
41618
  },
41971
41619
  {
41972
41620
  "name": "EclAppComponent",
41973
- "id": "component-EclAppComponent-32f3eb5490c2804bf33df7ed94dc1abe890f04d2c1e8f48b981387c5afc4b888b2fd1b529c314dcbf4bbf25786f7772f81075ac1e6e2e18f88ae5009783c1072",
41621
+ "id": "component-EclAppComponent-0cf3387d1e3b4afd626393c991447eacabd7a17d1deb38542b887de02a8d87b838c3fdb91942e035cc5c45480c7ad7bff86ebba4f1fc5990c566c542d15e9c7c",
41974
41622
  "file": "packages/ecl/components/ecl-app/ecl-app.component.ts",
41975
41623
  "encapsulation": [],
41976
41624
  "entryComponents": [],
@@ -42042,7 +41690,7 @@
42042
41690
  "indexKey": "",
42043
41691
  "optional": false,
42044
41692
  "description": "",
42045
- "line": 35,
41693
+ "line": 36,
42046
41694
  "rawdescription": "\n",
42047
41695
  "modifierKind": [
42048
41696
  148
@@ -42061,7 +41709,7 @@
42061
41709
  "indexKey": "",
42062
41710
  "optional": false,
42063
41711
  "description": "",
42064
- "line": 37,
41712
+ "line": 38,
42065
41713
  "rawdescription": "\n",
42066
41714
  "modifierKind": [
42067
41715
  124
@@ -42077,7 +41725,7 @@
42077
41725
  "indexKey": "",
42078
41726
  "optional": false,
42079
41727
  "description": "",
42080
- "line": 33,
41728
+ "line": 34,
42081
41729
  "rawdescription": "\n",
42082
41730
  "modifierKind": [
42083
41731
  148
@@ -42093,7 +41741,7 @@
42093
41741
  "indexKey": "",
42094
41742
  "optional": false,
42095
41743
  "description": "<p>Text direction, by default is &#39;ltr&#39; - left-to-write. Can also be &#39;rtl&#39; - right-to-left, which will\n make all components within <ecl-app> to lign to the right, and apply some special styling and functionality.</p>\n",
42096
- "line": 31,
41744
+ "line": 32,
42097
41745
  "rawdescription": "\n\nText direction, by default is 'ltr' - left-to-write. Can also be 'rtl' - right-to-left, which will\n make all components within <ecl-app> to lign to the right, and apply some special styling and functionality.\n",
42098
41746
  "modifierKind": [
42099
41747
  148
@@ -42108,7 +41756,7 @@
42108
41756
  "optional": false,
42109
41757
  "returnType": "void",
42110
41758
  "typeParameters": [],
42111
- "line": 80,
41759
+ "line": 81,
42112
41760
  "deprecated": false,
42113
41761
  "deprecationMessage": "",
42114
41762
  "rawdescription": "\n",
@@ -42121,7 +41769,7 @@
42121
41769
  "optional": false,
42122
41770
  "returnType": "void",
42123
41771
  "typeParameters": [],
42124
- "line": 87,
41772
+ "line": 88,
42125
41773
  "deprecated": false,
42126
41774
  "deprecationMessage": "",
42127
41775
  "rawdescription": "\n",
@@ -42134,7 +41782,7 @@
42134
41782
  "optional": false,
42135
41783
  "returnType": "void",
42136
41784
  "typeParameters": [],
42137
- "line": 43,
41785
+ "line": 44,
42138
41786
  "deprecated": false,
42139
41787
  "deprecationMessage": "",
42140
41788
  "rawdescription": "\n",
@@ -42189,7 +41837,7 @@
42189
41837
  "description": "",
42190
41838
  "rawdescription": "\n",
42191
41839
  "type": "component",
42192
- "sourceCode": "import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { AfterViewInit, Component, contentChild, OnDestroy, OnInit, PLATFORM_ID, inject, output, signal } from '@angular/core';\nimport { CssUtils, EuiAppShellService } from '@eui/core';\nimport { EuiLanguage } from '@eui/base';\nimport { EclSiteHeaderLanguageComponent, EclSiteHeaderLanguageSelectedEvent } from '@eui/ecl/components/ecl-site-header';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService } from '@eui/ecl/core';\nimport { fromEvent, Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\n\n/**\n * The wrapper component for an ecl application. Has some important global properties.\n */\nexport class EclAppLanguageDismissEvent extends EclBaseEvent {\n constructor(public language?: EuiLanguage) {\n super();\n }\n}\n\n@Component({\n selector: 'ecl-app',\n templateUrl: './ecl-app.component.html',\n host: {\n '[attr.dir]': 'textDirection()',\n },\n})\nexport class EclAppComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy {\n /**\n * Text direction, by default is 'ltr' - left-to-write. Can also be 'rtl' - right-to-left, which will\n * make all components within <ecl-app> to lign to the right, and apply some special styling and functionality.\n */\n readonly textDirection = signal('ltr');\n\n readonly eclSiteHeaderLanguage = contentChild(EclSiteHeaderLanguageComponent);\n\n readonly languageDismiss = output<EclAppLanguageDismissEvent>();\n\n protected destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly eclRtlService = inject(EclRtlService);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly appShellService = inject(EuiAppShellService);\n\n ngOnInit(): void {\n\n // Only initialize CSS vars if no parent app shell is already active\n const isNestedInAppShell = this.appShellService.state.hasHeader || this.appShellService.state.hasSidebar || this.appShellService.state.hasToolbar;\n if (!isNestedInAppShell) {\n CssUtils.initCssVars(this.document, this.platformId);\n }\n if (isPlatformBrowser(this.platformId)) {\n const browserAgent = window.navigator.userAgent.toLowerCase();\n\n this.appShellService.setState({\n ...this.appShellService.state,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth,\n deviceInfo: {\n isChrome: browserAgent.indexOf('chrome') > -1,\n isIE: browserAgent.indexOf('trident') > -1,\n isFF: browserAgent.indexOf('firefox') > -1,\n },\n appBaseFontSize: this.appShellService.getBaseFontSize(),\n });\n }\n\n if (isPlatformBrowser(this.platformId)) {\n fromEvent(window, 'resize')\n .pipe(debounceTime(50), takeUntil(this.destroy$))\n .subscribe(() => {\n this.appShellService?.setState({\n ...this.appShellService.state,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth,\n });\n CssUtils.setAppViewportCssVars(this.platformId);\n });\n }\n }\n\n ngAfterViewInit(): void {\n // Adds global class, which is used to apply the correct styling for eui-21.\n CssUtils.setHtmlClass('eui-21', this.document);\n this.handleRtlChangeState();\n this.handleUIEvents();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Changes the text direction from 'ltr' to 'rtl' and vice versa.\n */\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n if (rtlState) {\n this.textDirection.set('rtl');\n } else {\n this.textDirection.set('ltr');\n }\n });\n }\n\n private handleUIEvents(): void {\n this.eclSiteHeaderLanguage()?.languageSelected\n .pipe(takeUntil(this.destroy$))\n .subscribe((evt: EclSiteHeaderLanguageSelectedEvent) => {\n this.languageDismiss.emit(new EclAppLanguageDismissEvent(evt.language));\n });\n }\n}\n",
41840
+ "sourceCode": "import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { AfterViewInit, Component, contentChild, OnDestroy, OnInit, PLATFORM_ID, inject, output, signal } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { CssUtils, EuiAppShellService } from '@eui/core';\nimport { EuiLanguage } from '@eui/base';\nimport { EclSiteHeaderLanguageComponent, EclSiteHeaderLanguageSelectedEvent } from '@eui/ecl/components/ecl-site-header';\nimport { ECLBaseDirective, EclBaseEvent, EclRtlService } from '@eui/ecl/core';\nimport { fromEvent, Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\n\n/**\n * The wrapper component for an ecl application. Has some important global properties.\n */\nexport class EclAppLanguageDismissEvent extends EclBaseEvent {\n constructor(public language?: EuiLanguage) {\n super();\n }\n}\n\n@Component({\n selector: 'ecl-app',\n templateUrl: './ecl-app.component.html',\n host: {\n '[attr.dir]': 'textDirection()',\n },\n})\nexport class EclAppComponent extends ECLBaseDirective implements OnInit, AfterViewInit, OnDestroy {\n /**\n * Text direction, by default is 'ltr' - left-to-write. Can also be 'rtl' - right-to-left, which will\n * make all components within <ecl-app> to lign to the right, and apply some special styling and functionality.\n */\n readonly textDirection = signal('ltr');\n\n readonly eclSiteHeaderLanguage = contentChild(EclSiteHeaderLanguageComponent);\n\n readonly languageDismiss = output<EclAppLanguageDismissEvent>();\n\n protected destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly eclRtlService = inject(EclRtlService);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly appShellService = inject(EuiAppShellService);\n\n ngOnInit(): void {\n\n // Only initialize CSS vars if no parent app shell is already active\n const isNestedInAppShell = this.appShellService.state.hasHeader || this.appShellService.state.hasSidebar || this.appShellService.state.hasToolbar;\n if (!isNestedInAppShell) {\n CssUtils.initCssVars(this.document, this.platformId);\n }\n if (isPlatformBrowser(this.platformId)) {\n const browserAgent = window.navigator.userAgent.toLowerCase();\n\n this.appShellService.setState({\n ...this.appShellService.state,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth,\n deviceInfo: {\n isChrome: browserAgent.indexOf('chrome') > -1,\n isIE: browserAgent.indexOf('trident') > -1,\n isFF: browserAgent.indexOf('firefox') > -1,\n },\n appBaseFontSize: this.appShellService.getBaseFontSize(),\n });\n }\n\n if (isPlatformBrowser(this.platformId)) {\n fromEvent(window, 'resize')\n .pipe(debounceTime(50), takeUntil(this.destroy$))\n .subscribe(() => {\n this.appShellService?.setState({\n ...this.appShellService.state,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth,\n });\n CssUtils.setAppViewportCssVars(this.platformId);\n });\n }\n }\n\n ngAfterViewInit(): void {\n // Adds global class, which is used to apply the correct styling for eui-21.\n CssUtils.setHtmlClass('eui-21', this.document);\n this.handleRtlChangeState();\n this.handleUIEvents();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Changes the text direction from 'ltr' to 'rtl' and vice versa.\n */\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n if (rtlState) {\n this.textDirection.set('rtl');\n } else {\n this.textDirection.set('ltr');\n }\n });\n }\n\n private handleUIEvents(): void {\n const eclSiteHeaderLanguage = this.eclSiteHeaderLanguage();\n if (!eclSiteHeaderLanguage) return;\n\n outputToObservable(eclSiteHeaderLanguage.languageSelected)\n .pipe(takeUntil(this.destroy$))\n .subscribe((evt: EclSiteHeaderLanguageSelectedEvent) => {\n this.languageDismiss.emit(new EclAppLanguageDismissEvent(evt.language));\n });\n }\n}\n",
42193
41841
  "assetsDirs": [],
42194
41842
  "styleUrlsData": "",
42195
41843
  "stylesData": "",
@@ -54800,7 +54448,7 @@
54800
54448
  },
54801
54449
  {
54802
54450
  "name": "EclIconComponent",
54803
- "id": "component-EclIconComponent-098102385dea8ae19585b13531343588c38d879186ee8a691fc0aeb0f6cef41ef570f2be629b561695d0c3f13ebb52e8869d91e74ca8d7e05471f478e7ad412b",
54451
+ "id": "component-EclIconComponent-96ea975b519f26633f3e68e55e05c5b6d406bf0630655f1a30edb29b7bef31bbf7d66877310a850f9d9e60f880b24a0ac149027c643ad1061196f21bca1b6613",
54804
54452
  "file": "packages/ecl/components/ecl-icon/ecl-icon.component.ts",
54805
54453
  "encapsulation": [],
54806
54454
  "entryComponents": [],
@@ -54839,7 +54487,7 @@
54839
54487
  "indexKey": "",
54840
54488
  "optional": false,
54841
54489
  "description": "<p>Determines whether the icon should be hidden from assistive technologies.\nDefaults to <code>true</code> unless a title is provided.</p>\n",
54842
- "line": 91,
54490
+ "line": 104,
54843
54491
  "rawdescription": "\n\nDetermines whether the icon should be hidden from assistive technologies.\nDefaults to `true` unless a title is provided.\n",
54844
54492
  "modifierKind": [
54845
54493
  148
@@ -54856,7 +54504,7 @@
54856
54504
  "indexKey": "",
54857
54505
  "optional": false,
54858
54506
  "description": "<p>ID reference for an external element that labels this icon for screen readers.</p>\n",
54859
- "line": 75,
54507
+ "line": 88,
54860
54508
  "rawdescription": "\n\nID reference for an external element that labels this icon for screen readers.\n",
54861
54509
  "modifierKind": [
54862
54510
  148
@@ -54873,7 +54521,7 @@
54873
54521
  "indexKey": "",
54874
54522
  "optional": false,
54875
54523
  "description": "<p>Applies color styling to the icon.\nUse <code>&#39;inverted&#39;</code> for icons on dark backgrounds, or <code>&#39;primary&#39;</code> for emphasis.</p>\n",
54876
- "line": 65,
54524
+ "line": 78,
54877
54525
  "rawdescription": "\n\nApplies color styling to the icon.\nUse `'inverted'` for icons on dark backgrounds, or `'primary'` for emphasis.\n",
54878
54526
  "required": false
54879
54527
  },
@@ -54887,7 +54535,7 @@
54887
54535
  "indexKey": "",
54888
54536
  "optional": false,
54889
54537
  "description": "<p>Controls whether the icon is focusable via keyboard.\nDefaults to <code>false</code>.</p>\n",
54890
- "line": 97,
54538
+ "line": 110,
54891
54539
  "rawdescription": "\n\nControls whether the icon is focusable via keyboard.\nDefaults to `false`.\n",
54892
54540
  "modifierKind": [
54893
54541
  148
@@ -54903,7 +54551,7 @@
54903
54551
  "indexKey": "",
54904
54552
  "optional": false,
54905
54553
  "description": "<p>Name of the icon to render from the selected set.</p>\n",
54906
- "line": 52,
54554
+ "line": 65,
54907
54555
  "rawdescription": "\n\nName of the icon to render from the selected set.\n",
54908
54556
  "required": false
54909
54557
  },
@@ -54913,12 +54561,12 @@
54913
54561
  "defaultValue": "'default'",
54914
54562
  "deprecated": false,
54915
54563
  "deprecationMessage": "",
54916
- "type": "'default' | 'social' | 'social-media' | 'social-media-color' | 'flag' | 'flag-non-members' | 'phosphor' | 'phosphor-fill' | string",
54564
+ "type": "EclIconSet",
54917
54565
  "indexKey": "",
54918
54566
  "optional": false,
54919
- "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>&#39;default&#39;</code>.</p>\n",
54920
- "line": 46,
54921
- "rawdescription": "\n\nDefines the icon set to use.\nAvailable sets: `default`, `social`, `social-media`, `flag`, or a custom URL prefix.\nDefaults to `'default'`.\n",
54567
+ "description": "<p>Defines the icon set to use.\nAvailable sets: <code>default</code>, <code>social</code>, <code>social-media</code>, <code>social-media-color</code>, <code>flag</code>,\n<code>flag-non-members</code>, <code>phosphor</code>, <code>phosphor-fill</code>.\nDefaults to <code>&#39;default&#39;</code>.</p>\n",
54568
+ "line": 60,
54569
+ "rawdescription": "\n\nDefines the icon set to use.\nAvailable sets: `default`, `social`, `social-media`, `social-media-color`, `flag`,\n`flag-non-members`, `phosphor`, `phosphor-fill`.\nDefaults to `'default'`.\n",
54922
54570
  "required": false
54923
54571
  },
54924
54572
  {
@@ -54931,7 +54579,7 @@
54931
54579
  "indexKey": "",
54932
54580
  "optional": false,
54933
54581
  "description": "<p>Flips the icon horizontally if set to <code>true</code>.</p>\n",
54934
- "line": 122,
54582
+ "line": 135,
54935
54583
  "rawdescription": "\n\nFlips the icon horizontally if set to `true`.\n",
54936
54584
  "modifierKind": [
54937
54585
  148
@@ -54948,7 +54596,7 @@
54948
54596
  "indexKey": "",
54949
54597
  "optional": false,
54950
54598
  "description": "<p>ARIA role of the icon. If a <code>title</code> is provided and no role is defined, defaults to <code>&#39;img&#39;</code>.</p>\n",
54951
- "line": 80,
54599
+ "line": 93,
54952
54600
  "rawdescription": "\n\nARIA role of the icon. If a `title` is provided and no role is defined, defaults to `'img'`.\n",
54953
54601
  "modifierKind": [
54954
54602
  148
@@ -54965,7 +54613,7 @@
54965
54613
  "indexKey": "",
54966
54614
  "optional": false,
54967
54615
  "description": "<p>Size of the icon.\nSupported values: <code>&#39;2xs&#39;</code>, <code>&#39;xs&#39;</code>, <code>&#39;s&#39;</code>, <code>&#39;m&#39;</code>, <code>&#39;l&#39;</code>, <code>&#39;xl&#39;</code>, <code>&#39;2xl&#39;</code>, <code>&#39;fluid&#39;</code>.\nDefaults to <code>&#39;xs&#39;</code>.</p>\n",
54968
- "line": 59,
54616
+ "line": 72,
54969
54617
  "rawdescription": "\n\nSize of the icon.\nSupported values: `'2xs'`, `'xs'`, `'s'`, `'m'`, `'l'`, `'xl'`, `'2xl'`, `'fluid'`.\nDefaults to `'xs'`.\n",
54970
54618
  "required": false
54971
54619
  },
@@ -54979,7 +54627,7 @@
54979
54627
  "indexKey": "",
54980
54628
  "optional": false,
54981
54629
  "description": "<p>Title used for accessibility. Also affects <code>aria-hidden</code> and <code>role</code>.</p>\n",
54982
- "line": 85,
54630
+ "line": 98,
54983
54631
  "rawdescription": "\n\nTitle used for accessibility. Also affects `aria-hidden` and `role`.\n",
54984
54632
  "modifierKind": [
54985
54633
  148
@@ -54995,7 +54643,7 @@
54995
54643
  "indexKey": "",
54996
54644
  "optional": false,
54997
54645
  "description": "<p>Adds a transformation modifier to the icon (e.g., rotation).</p>\n",
54998
- "line": 70,
54646
+ "line": 83,
54999
54647
  "rawdescription": "\n\nAdds a transformation modifier to the icon (e.g., rotation).\n",
55000
54648
  "required": false
55001
54649
  }
@@ -55012,7 +54660,7 @@
55012
54660
  "indexKey": "",
55013
54661
  "optional": false,
55014
54662
  "description": "",
55015
- "line": 135,
54663
+ "line": 148,
55016
54664
  "rawdescription": "\n"
55017
54665
  },
55018
54666
  {
@@ -55025,7 +54673,7 @@
55025
54673
  "indexKey": "",
55026
54674
  "optional": false,
55027
54675
  "description": "<p>Resolved aria-hidden: uses the explicit <code>ariaHidden</code> input if provided,\notherwise hides the icon unless a <code>title</code> is set.</p>\n",
55028
- "line": 113,
54676
+ "line": 126,
55029
54677
  "rawdescription": "\n\nResolved aria-hidden: uses the explicit `ariaHidden` input if provided,\notherwise hides the icon unless a `title` is set.\n",
55030
54678
  "modifierKind": [
55031
54679
  148
@@ -55041,7 +54689,7 @@
55041
54689
  "indexKey": "",
55042
54690
  "optional": false,
55043
54691
  "description": "<p>Resolved role: uses the explicit <code>role</code> input if provided,\notherwise defaults to <code>&#39;img&#39;</code> when a <code>title</code> is set.</p>\n",
55044
- "line": 103,
54692
+ "line": 116,
55045
54693
  "rawdescription": "\n\nResolved role: uses the explicit `role` input if provided,\notherwise defaults to `'img'` when a `title` is set.\n",
55046
54694
  "modifierKind": [
55047
54695
  148
@@ -55057,7 +54705,7 @@
55057
54705
  "indexKey": "",
55058
54706
  "optional": false,
55059
54707
  "description": "",
55060
- "line": 136,
54708
+ "line": 149,
55061
54709
  "rawdescription": "\n"
55062
54710
  },
55063
54711
  {
@@ -55070,7 +54718,7 @@
55070
54718
  "indexKey": "",
55071
54719
  "optional": false,
55072
54720
  "description": "<p>Extra classes added programmatically by parent components\n(button, link, etc.)</p>\n",
55073
- "line": 144,
54721
+ "line": 157,
55074
54722
  "rawdescription": "\n\nExtra classes added programmatically by parent components\n(button, link, etc.)\n",
55075
54723
  "modifierKind": [
55076
54724
  148
@@ -55086,7 +54734,7 @@
55086
54734
  "indexKey": "",
55087
54735
  "optional": false,
55088
54736
  "description": "<p>Real classes currently present on <ecl-icon>.\nTo support [class.foo] / [ngClass].</p>\n",
55089
- "line": 150,
54737
+ "line": 163,
55090
54738
  "rawdescription": "\n\nReal classes currently present on <ecl-icon>.\nTo support [class.foo] / [ngClass].\n",
55091
54739
  "modifierKind": [
55092
54740
  148
@@ -55102,7 +54750,7 @@
55102
54750
  "indexKey": "",
55103
54751
  "optional": false,
55104
54752
  "description": "",
55105
- "line": 134,
54753
+ "line": 147,
55106
54754
  "rawdescription": "\n"
55107
54755
  },
55108
54756
  {
@@ -55115,7 +54763,7 @@
55115
54763
  "indexKey": "",
55116
54764
  "optional": false,
55117
54765
  "description": "",
55118
- "line": 152,
54766
+ "line": 165,
55119
54767
  "rawdescription": "\n",
55120
54768
  "modifierKind": [
55121
54769
  148
@@ -55131,7 +54779,7 @@
55131
54779
  "indexKey": "",
55132
54780
  "optional": false,
55133
54781
  "description": "",
55134
- "line": 132,
54782
+ "line": 145,
55135
54783
  "rawdescription": "\n",
55136
54784
  "modifierKind": [
55137
54785
  148
@@ -55155,7 +54803,7 @@
55155
54803
  "optional": false,
55156
54804
  "returnType": "void",
55157
54805
  "typeParameters": [],
55158
- "line": 196,
54806
+ "line": 209,
55159
54807
  "deprecated": false,
55160
54808
  "deprecationMessage": "",
55161
54809
  "rawdescription": "\n",
@@ -55190,7 +54838,7 @@
55190
54838
  "optional": false,
55191
54839
  "returnType": "void",
55192
54840
  "typeParameters": [],
55193
- "line": 173,
54841
+ "line": 186,
55194
54842
  "deprecated": false,
55195
54843
  "deprecationMessage": "",
55196
54844
  "rawdescription": "\n",
@@ -55216,7 +54864,7 @@
55216
54864
  "optional": false,
55217
54865
  "returnType": "void",
55218
54866
  "typeParameters": [],
55219
- "line": 183,
54867
+ "line": 196,
55220
54868
  "deprecated": false,
55221
54869
  "deprecationMessage": "",
55222
54870
  "rawdescription": "\n",
@@ -55229,7 +54877,7 @@
55229
54877
  "optional": false,
55230
54878
  "returnType": "void",
55231
54879
  "typeParameters": [],
55232
- "line": 179,
54880
+ "line": 192,
55233
54881
  "deprecated": false,
55234
54882
  "deprecationMessage": "",
55235
54883
  "rawdescription": "\n",
@@ -55251,7 +54899,7 @@
55251
54899
  "optional": false,
55252
54900
  "returnType": "void",
55253
54901
  "typeParameters": [],
55254
- "line": 204,
54902
+ "line": 217,
55255
54903
  "deprecated": false,
55256
54904
  "deprecationMessage": "",
55257
54905
  "rawdescription": "\n",
@@ -55286,7 +54934,7 @@
55286
54934
  "optional": false,
55287
54935
  "returnType": "void",
55288
54936
  "typeParameters": [],
55289
- "line": 209,
54937
+ "line": 222,
55290
54938
  "deprecated": false,
55291
54939
  "deprecationMessage": "",
55292
54940
  "rawdescription": "\n",
@@ -55318,7 +54966,7 @@
55318
54966
  "deprecationMessage": "",
55319
54967
  "rawdescription": "\n\nAdds a dark background utility class if the color is set to `'inverted'`.\n",
55320
54968
  "description": "<p>Adds a dark background utility class if the color is set to <code>&#39;inverted&#39;</code>.</p>\n",
55321
- "line": 128,
54969
+ "line": 141,
55322
54970
  "type": "boolean",
55323
54971
  "decorators": []
55324
54972
  }
@@ -55333,14 +54981,14 @@
55333
54981
  "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",
55334
54982
  "rawdescription": "\n\nECL icon component – renders SVG icons from various sets depending on current theme.\nIntegrates with ECL theming and supports accessibility options.\n",
55335
54983
  "type": "component",
55336
- "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",
54984
+ "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 * Available icon sets supported by {@link EclIconComponent}.\n */\nexport type EclIconSet =\n | 'default'\n | 'social'\n | 'social-media'\n | 'social-media-color'\n | 'flag'\n | 'flag-non-members'\n | 'phosphor'\n | 'phosphor-fill';\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`, `social-media-color`, `flag`,\n * `flag-non-members`, `phosphor`, `phosphor-fill`.\n * Defaults to `'default'`.\n */\n iconSet = input<EclIconSet>('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",
55337
54985
  "assetsDirs": [],
55338
54986
  "styleUrlsData": "",
55339
54987
  "stylesData": "",
55340
54988
  "jsdoctags": [
55341
54989
  {
55342
- "pos": 411,
55343
- "end": 573,
54990
+ "pos": 664,
54991
+ "end": 826,
55344
54992
  "kind": 321,
55345
54993
  "id": 0,
55346
54994
  "flags": 16777216,
@@ -55355,7 +55003,7 @@
55355
55003
  "deprecated": false,
55356
55004
  "deprecationMessage": "",
55357
55005
  "args": [],
55358
- "line": 163,
55006
+ "line": 176,
55359
55007
  "rawdescription": "\n"
55360
55008
  },
55361
55009
  "extends": [],
@@ -55371,7 +55019,7 @@
55371
55019
  "name": "isColorInverted",
55372
55020
  "type": "boolean",
55373
55021
  "returnType": "boolean",
55374
- "line": 128,
55022
+ "line": 141,
55375
55023
  "rawdescription": "\n\nAdds a dark background utility class if the color is set to `'inverted'`.\n",
55376
55024
  "description": "<p>Adds a dark background utility class if the color is set to <code>&#39;inverted&#39;</code>.</p>\n"
55377
55025
  }
@@ -78793,10 +78441,11 @@
78793
78441
  },
78794
78442
  {
78795
78443
  "name": "EclSiteHeaderActionComponent",
78796
- "id": "component-EclSiteHeaderActionComponent-1defa0053b63fb316912c581f8d6bd5fd7e952e17ec832928bfd565000f8e2b033b2913dee8720baca802383e0c31f42ffb55e3f7b6820c45131e158acd52c60",
78444
+ "id": "component-EclSiteHeaderActionComponent-f3dce85620ac5f46ed35524d8b25aa20a367fb0042328dc928c9a3872ed37127835c71c6e882bf7b283fe0fb0d484657ea75dc9aaccddfe4181a3aaf0ddd7a1b",
78797
78445
  "file": "packages/ecl/components/ecl-site-header/action/ecl-site-header-action.component.ts",
78798
78446
  "encapsulation": [],
78799
78447
  "entryComponents": [],
78448
+ "host": {},
78800
78449
  "inputs": [],
78801
78450
  "outputs": [],
78802
78451
  "providers": [],
@@ -78855,30 +78504,7 @@
78855
78504
  }
78856
78505
  ],
78857
78506
  "outputsClass": [],
78858
- "propertiesClass": [
78859
- {
78860
- "name": "class",
78861
- "coverageIgnore": false,
78862
- "defaultValue": "'ecl-site-header__action'",
78863
- "deprecated": false,
78864
- "deprecationMessage": "",
78865
- "type": "string",
78866
- "indexKey": "",
78867
- "optional": false,
78868
- "description": "",
78869
- "line": 13,
78870
- "rawdescription": "\n",
78871
- "decorators": [
78872
- {
78873
- "name": "HostBinding",
78874
- "stringifiedArguments": "'class'"
78875
- }
78876
- ],
78877
- "modifierKind": [
78878
- 171
78879
- ]
78880
- }
78881
- ],
78507
+ "propertiesClass": [],
78882
78508
  "methodsClass": [
78883
78509
  {
78884
78510
  "name": "getCssClasses",
@@ -78922,35 +78548,21 @@
78922
78548
  "coverageIgnore": false,
78923
78549
  "deprecated": false,
78924
78550
  "deprecationMessage": "",
78925
- "hostBindings": [
78926
- {
78927
- "coverageIgnore": false,
78928
- "name": "class",
78929
- "actualName": "class",
78930
- "defaultValue": "'ecl-site-header__action'",
78931
- "deprecated": false,
78932
- "deprecationMessage": "",
78933
- "rawdescription": "\n",
78934
- "description": "",
78935
- "line": 13,
78936
- "type": "string",
78937
- "decorators": []
78938
- }
78939
- ],
78551
+ "hostBindings": [],
78940
78552
  "hostListeners": [],
78941
78553
  "standalone": false,
78942
78554
  "imports": [],
78943
78555
  "description": "<p>This components is a container element for custom action, login, language and search components.</p>\n",
78944
78556
  "rawdescription": "\n\nThis components is a container element for custom action, login, language and search components.\n",
78945
78557
  "type": "component",
78946
- "sourceCode": "import { Component, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This components is a container element for custom action, login, language and search components.\n */\n// TODO: maybe could be part of the header, and we don't need this component?\n@Component({\n selector: 'ecl-site-header-action',\n templateUrl: './ecl-site-header-action.component.html',\n})\nexport class EclSiteHeaderActionComponent extends ECLBaseDirective {\n @HostBinding('class') class = 'ecl-site-header__action';\n}\n",
78558
+ "sourceCode": "import { Component } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This components is a container element for custom action, login, language and search components.\n */\n// TODO: maybe could be part of the header, and we don't need this component?\n@Component({\n selector: 'ecl-site-header-action',\n templateUrl: './ecl-site-header-action.component.html',\n host: {\n class: 'ecl-site-header__action',\n },\n})\nexport class EclSiteHeaderActionComponent extends ECLBaseDirective {}\n",
78947
78559
  "assetsDirs": [],
78948
78560
  "styleUrlsData": "",
78949
78561
  "stylesData": "",
78950
78562
  "jsdoctags": [
78951
78563
  {
78952
- "pos": 107,
78953
- "end": 214,
78564
+ "pos": 94,
78565
+ "end": 201,
78954
78566
  "kind": 321,
78955
78567
  "id": 0,
78956
78568
  "flags": 16777216,
@@ -78975,10 +78587,11 @@
78975
78587
  },
78976
78588
  {
78977
78589
  "name": "EclSiteHeaderBannerTopComponent",
78978
- "id": "component-EclSiteHeaderBannerTopComponent-dd0166c9cbd95560344f59cd16a78b18d89b61906c3bd44854a2f47d7fb1d2742dc963a064d6b6a981ff4f49b74c58b09cc5791e0031a94bf2bdcda4948961d0",
78590
+ "id": "component-EclSiteHeaderBannerTopComponent-cdaded481e90821a578e2eb1fa53ef985c42288b2b57db8b0e641fbea4db7ea89a75c16070be03d5417a848bdd0f4474c9678ee40f7f33f5706907227b3eb19f",
78979
78591
  "file": "packages/ecl/components/ecl-site-header/banner-top/ecl-site-header-banner-top.component.ts",
78980
78592
  "encapsulation": [],
78981
78593
  "entryComponents": [],
78594
+ "host": {},
78982
78595
  "inputs": [],
78983
78596
  "outputs": [],
78984
78597
  "providers": [],
@@ -79039,30 +78652,7 @@
79039
78652
  }
79040
78653
  ],
79041
78654
  "outputsClass": [],
79042
- "propertiesClass": [
79043
- {
79044
- "name": "className",
79045
- "coverageIgnore": false,
79046
- "defaultValue": "true",
79047
- "deprecated": false,
79048
- "deprecationMessage": "",
79049
- "type": "unknown",
79050
- "indexKey": "",
79051
- "optional": false,
79052
- "description": "",
79053
- "line": 22,
79054
- "rawdescription": "\n",
79055
- "decorators": [
79056
- {
79057
- "name": "HostBinding",
79058
- "stringifiedArguments": "'class.ecl-site-header__banner-top'"
79059
- }
79060
- ],
79061
- "modifierKind": [
79062
- 171
79063
- ]
79064
- }
79065
- ],
78655
+ "propertiesClass": [],
79066
78656
  "methodsClass": [
79067
78657
  {
79068
78658
  "name": "ngOnInit",
@@ -79071,7 +78661,7 @@
79071
78661
  "optional": false,
79072
78662
  "returnType": "void",
79073
78663
  "typeParameters": [],
79074
- "line": 26,
78664
+ "line": 27,
79075
78665
  "deprecated": false,
79076
78666
  "deprecationMessage": "",
79077
78667
  "rawdescription": "\n",
@@ -79119,43 +78709,29 @@
79119
78709
  "coverageIgnore": false,
79120
78710
  "deprecated": true,
79121
78711
  "deprecationMessage": "This component is deprecated and will be removed in v23. Not used anymore.\n\nThis component is used, when we want to show class name (used in standardised variant of site-header).",
79122
- "hostBindings": [
79123
- {
79124
- "coverageIgnore": false,
79125
- "name": "class.ecl-site-header__banner-top",
79126
- "actualName": "className",
79127
- "defaultValue": "true",
79128
- "deprecated": false,
79129
- "deprecationMessage": "",
79130
- "rawdescription": "\n",
79131
- "description": "",
79132
- "line": 22,
79133
- "type": "boolean",
79134
- "decorators": []
79135
- }
79136
- ],
78712
+ "hostBindings": [],
79137
78713
  "hostListeners": [],
79138
78714
  "standalone": false,
79139
78715
  "imports": [],
79140
78716
  "description": "<p>This component is used, when we want to show class name (used in standardised variant of site-header).</p>\n",
79141
78717
  "rawdescription": "\n\n\nThis component is used, when we want to show class name (used in standardised variant of site-header).\n",
79142
78718
  "type": "component",
79143
- "sourceCode": "import { Component, HostBinding, inject, OnInit, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * @deprecated This component is deprecated and will be removed in v23. Not used anymore.\n *\n * This component is used, when we want to show class name (used in standardised variant of site-header).\n */\n@Component({\n selector: 'ecl-site-header-banner-top',\n templateUrl: 'ecl-site-header-banner-top.component.html',\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclSiteHeaderBannerTopComponent extends ECLBaseDirective implements OnInit {\n @HostBinding('class.ecl-site-header__banner-top') className = true;\n\n private platformId = inject(PLATFORM_ID);\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n console.warn(\n 'EclSiteHeaderBannerTopComponent: <ecl-site-header-banner-top> is deprecated and will be removed in v23.',\n );\n }\n }\n}\n",
78719
+ "sourceCode": "import { Component, inject, OnInit, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * @deprecated This component is deprecated and will be removed in v23. Not used anymore.\n *\n * This component is used, when we want to show class name (used in standardised variant of site-header).\n */\n@Component({\n selector: 'ecl-site-header-banner-top',\n templateUrl: 'ecl-site-header-banner-top.component.html',\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n host: {\n class: 'ecl-site-header__banner-top',\n },\n})\nexport class EclSiteHeaderBannerTopComponent extends ECLBaseDirective implements OnInit {\n private platformId = inject(PLATFORM_ID);\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n console.warn(\n 'EclSiteHeaderBannerTopComponent: <ecl-site-header-banner-top> is deprecated and will be removed in v23.',\n );\n }\n }\n}\n",
79144
78720
  "assetsDirs": [],
79145
78721
  "styleUrlsData": "",
79146
78722
  "stylesData": "\n :host {\n display: block;\n }\n \n",
79147
78723
  "jsdoctags": [
79148
78724
  {
79149
- "pos": 196,
79150
- "end": 393,
78725
+ "pos": 183,
78726
+ "end": 380,
79151
78727
  "kind": 332,
79152
78728
  "id": 0,
79153
78729
  "flags": 16777216,
79154
78730
  "modifierFlagsCache": 0,
79155
78731
  "transformFlags": 0,
79156
78732
  "tagName": {
79157
- "pos": 197,
79158
- "end": 207,
78733
+ "pos": 184,
78734
+ "end": 194,
79159
78735
  "kind": 80,
79160
78736
  "id": 0,
79161
78737
  "flags": 16777216,
@@ -79188,10 +78764,11 @@
79188
78764
  },
79189
78765
  {
79190
78766
  "name": "EclSiteHeaderComponent",
79191
- "id": "component-EclSiteHeaderComponent-d2f47ffc4d1d9b29852345f6420fdfcf23c33201b717963bebeb9a175ed8319bff8cfc47ad8ab1fa257aa186039640ba95249c15072739ac71a33d5060ecb8f7",
78767
+ "id": "component-EclSiteHeaderComponent-95b64b76f096eb54a34d75ede5b1f451009261a51052da10a41830d5d4040b3e07b6a1c3a52f08920d1cd02a4f767638f7977987b162cc7187d8db14618259ad",
79192
78768
  "file": "packages/ecl/components/ecl-site-header/ecl-site-header.component.ts",
79193
78769
  "encapsulation": [],
79194
78770
  "entryComponents": [],
78771
+ "host": {},
79195
78772
  "inputs": [],
79196
78773
  "outputs": [],
79197
78774
  "providers": [],
@@ -79208,40 +78785,34 @@
79208
78785
  "hostDirectives": [],
79209
78786
  "inputsClass": [
79210
78787
  {
78788
+ "name": "isSiteNameMobileOnly",
79211
78789
  "coverageIgnore": false,
79212
- "name": "languageCode",
79213
- "defaultValue": "'en'",
78790
+ "defaultValue": "false",
79214
78791
  "deprecated": false,
79215
78792
  "deprecationMessage": "",
79216
- "rawdescription": "\n\nLanguage code of the current language of the site.\n",
79217
- "description": "<p>Language code of the current language of the site.</p>\n",
79218
- "line": 51,
79219
- "type": "string",
79220
- "decorators": []
78793
+ "type": "boolean",
78794
+ "indexKey": "",
78795
+ "optional": false,
78796
+ "description": "<p>Determines if the site name should be displayed only on mobile devices.</p>\n",
78797
+ "line": 59,
78798
+ "rawdescription": "\n\nDetermines if the site name should be displayed only on mobile devices.\n",
78799
+ "modifierKind": [
78800
+ 148
78801
+ ],
78802
+ "required": false
79221
78803
  },
79222
78804
  {
78805
+ "name": "languageCode",
79223
78806
  "coverageIgnore": false,
79224
- "name": "siteName",
78807
+ "defaultValue": "'en'",
79225
78808
  "deprecated": false,
79226
78809
  "deprecationMessage": "",
79227
- "rawdescription": "\n\nThe name of the site, to be added in the header, next to the logo.\n",
79228
- "description": "<p>The name of the site, to be added in the header, next to the logo.</p>\n",
79229
- "line": 47,
79230
78810
  "type": "string",
79231
- "decorators": []
79232
- },
79233
- {
79234
- "name": "isSiteNameMobileOnly",
79235
- "coverageIgnore": false,
79236
- "defaultValue": "false",
79237
- "deprecated": false,
79238
- "deprecationMessage": "",
79239
- "type": "boolean",
79240
78811
  "indexKey": "",
79241
78812
  "optional": false,
79242
- "description": "<p>Determines if the site name should be displayed only on mobile devices.</p>\n",
79243
- "line": 60,
79244
- "rawdescription": "\n\nDetermines if the site name should be displayed only on mobile devices.\n",
78813
+ "description": "<p>Language code of the current language of the site.</p>\n",
78814
+ "line": 51,
78815
+ "rawdescription": "\n\nLanguage code of the current language of the site.\n",
79245
78816
  "modifierKind": [
79246
78817
  148
79247
78818
  ],
@@ -79264,6 +78835,22 @@
79264
78835
  ],
79265
78836
  "required": false
79266
78837
  },
78838
+ {
78839
+ "name": "siteName",
78840
+ "coverageIgnore": false,
78841
+ "deprecated": false,
78842
+ "deprecationMessage": "",
78843
+ "type": "string",
78844
+ "indexKey": "",
78845
+ "optional": false,
78846
+ "description": "<p>The name of the site, to be added in the header, next to the logo.</p>\n",
78847
+ "line": 47,
78848
+ "rawdescription": "\n\nThe name of the site, to be added in the header, next to the logo.\n",
78849
+ "modifierKind": [
78850
+ 148
78851
+ ],
78852
+ "required": false
78853
+ },
79267
78854
  {
79268
78855
  "coverageIgnore": false,
79269
78856
  "name": "class",
@@ -79318,13 +78905,30 @@
79318
78905
  "indexKey": "",
79319
78906
  "optional": false,
79320
78907
  "description": "",
79321
- "line": 79,
78908
+ "line": 62,
79322
78909
  "rawdescription": "\n",
79323
78910
  "modifierKind": [
79324
78911
  148
79325
78912
  ],
79326
78913
  "required": false
79327
78914
  },
78915
+ {
78916
+ "name": "languageCode",
78917
+ "coverageIgnore": false,
78918
+ "defaultValue": "'en'",
78919
+ "deprecated": false,
78920
+ "deprecationMessage": "",
78921
+ "type": "string",
78922
+ "indexKey": "",
78923
+ "optional": false,
78924
+ "description": "<p>Language code of the current language of the site.</p>\n",
78925
+ "line": 51,
78926
+ "rawdescription": "\n\nLanguage code of the current language of the site.\n",
78927
+ "modifierKind": [
78928
+ 148
78929
+ ],
78930
+ "required": false
78931
+ },
79328
78932
  {
79329
78933
  "name": "logoClick",
79330
78934
  "coverageIgnore": false,
@@ -79334,7 +78938,7 @@
79334
78938
  "indexKey": "",
79335
78939
  "optional": false,
79336
78940
  "description": "",
79337
- "line": 78,
78941
+ "line": 61,
79338
78942
  "rawdescription": "\n",
79339
78943
  "modifierKind": [
79340
78944
  148
@@ -79353,7 +78957,7 @@
79353
78957
  "indexKey": "",
79354
78958
  "optional": false,
79355
78959
  "description": "",
79356
- "line": 83,
78960
+ "line": 66,
79357
78961
  "rawdescription": "\n",
79358
78962
  "modifierKind": [
79359
78963
  148
@@ -79369,7 +78973,7 @@
79369
78973
  "indexKey": "",
79370
78974
  "optional": false,
79371
78975
  "description": "",
79372
- "line": 93,
78976
+ "line": 78,
79373
78977
  "rawdescription": "\n",
79374
78978
  "modifierKind": [
79375
78979
  124
@@ -79385,7 +78989,7 @@
79385
78989
  "indexKey": "",
79386
78990
  "optional": false,
79387
78991
  "description": "",
79388
- "line": 91,
78992
+ "line": 74,
79389
78993
  "rawdescription": "\n",
79390
78994
  "modifierKind": [
79391
78995
  148
@@ -79401,7 +79005,7 @@
79401
79005
  "indexKey": "",
79402
79006
  "optional": false,
79403
79007
  "description": "",
79404
- "line": 90,
79008
+ "line": 73,
79405
79009
  "rawdescription": "\n",
79406
79010
  "modifierKind": [
79407
79011
  148
@@ -79417,7 +79021,7 @@
79417
79021
  "indexKey": "",
79418
79022
  "optional": false,
79419
79023
  "description": "",
79420
- "line": 88,
79024
+ "line": 71,
79421
79025
  "rawdescription": "\n",
79422
79026
  "modifierKind": [
79423
79027
  148
@@ -79433,7 +79037,7 @@
79433
79037
  "indexKey": "",
79434
79038
  "optional": false,
79435
79039
  "description": "",
79436
- "line": 84,
79040
+ "line": 67,
79437
79041
  "rawdescription": "\n",
79438
79042
  "modifierKind": [
79439
79043
  148
@@ -79449,7 +79053,7 @@
79449
79053
  "indexKey": "",
79450
79054
  "optional": false,
79451
79055
  "description": "",
79452
- "line": 86,
79056
+ "line": 69,
79453
79057
  "rawdescription": "\n",
79454
79058
  "modifierKind": [
79455
79059
  148
@@ -79465,7 +79069,7 @@
79465
79069
  "indexKey": "",
79466
79070
  "optional": false,
79467
79071
  "description": "",
79468
- "line": 85,
79072
+ "line": 68,
79469
79073
  "rawdescription": "\n",
79470
79074
  "modifierKind": [
79471
79075
  148
@@ -79481,7 +79085,7 @@
79481
79085
  "indexKey": "",
79482
79086
  "optional": false,
79483
79087
  "description": "",
79484
- "line": 89,
79088
+ "line": 72,
79485
79089
  "rawdescription": "\n",
79486
79090
  "modifierKind": [
79487
79091
  148
@@ -79497,7 +79101,7 @@
79497
79101
  "indexKey": "",
79498
79102
  "optional": false,
79499
79103
  "description": "",
79500
- "line": 87,
79104
+ "line": 70,
79501
79105
  "rawdescription": "\n",
79502
79106
  "modifierKind": [
79503
79107
  148
@@ -79513,8 +79117,12 @@
79513
79117
  "indexKey": "",
79514
79118
  "optional": false,
79515
79119
  "description": "",
79516
- "line": 41,
79517
- "rawdescription": "\n"
79120
+ "line": 76,
79121
+ "rawdescription": "\n",
79122
+ "modifierKind": [
79123
+ 124,
79124
+ 148
79125
+ ]
79518
79126
  },
79519
79127
  {
79520
79128
  "name": "i18nService",
@@ -79526,10 +79134,11 @@
79526
79134
  "indexKey": "",
79527
79135
  "optional": false,
79528
79136
  "description": "",
79529
- "line": 42,
79137
+ "line": 77,
79530
79138
  "rawdescription": "\n",
79531
79139
  "modifierKind": [
79532
- 124
79140
+ 124,
79141
+ 148
79533
79142
  ]
79534
79143
  },
79535
79144
  {
@@ -79542,7 +79151,7 @@
79542
79151
  "indexKey": "",
79543
79152
  "optional": false,
79544
79153
  "description": "",
79545
- "line": 82,
79154
+ "line": 65,
79546
79155
  "rawdescription": "\n",
79547
79156
  "modifierKind": [
79548
79157
  148
@@ -79558,7 +79167,7 @@
79558
79167
  "indexKey": "",
79559
79168
  "optional": false,
79560
79169
  "description": "",
79561
- "line": 81,
79170
+ "line": 64,
79562
79171
  "rawdescription": "\n",
79563
79172
  "modifierKind": [
79564
79173
  148
@@ -79573,7 +79182,7 @@
79573
79182
  "optional": false,
79574
79183
  "returnType": "boolean",
79575
79184
  "typeParameters": [],
79576
- "line": 193,
79185
+ "line": 194,
79577
79186
  "deprecated": false,
79578
79187
  "deprecationMessage": "",
79579
79188
  "rawdescription": "\n",
@@ -79586,7 +79195,7 @@
79586
79195
  "optional": false,
79587
79196
  "returnType": "void",
79588
79197
  "typeParameters": [],
79589
- "line": 124,
79198
+ "line": 125,
79590
79199
  "deprecated": false,
79591
79200
  "deprecationMessage": "",
79592
79201
  "rawdescription": "\n\nSubscibe to some child components' events.\n",
@@ -79599,7 +79208,7 @@
79599
79208
  "optional": false,
79600
79209
  "returnType": "void",
79601
79210
  "typeParameters": [],
79602
- "line": 172,
79211
+ "line": 173,
79603
79212
  "deprecated": false,
79604
79213
  "deprecationMessage": "",
79605
79214
  "rawdescription": "\n",
@@ -79621,7 +79230,7 @@
79621
79230
  "optional": false,
79622
79231
  "returnType": "void",
79623
79232
  "typeParameters": [],
79624
- "line": 185,
79233
+ "line": 186,
79625
79234
  "deprecated": false,
79626
79235
  "deprecationMessage": "",
79627
79236
  "rawdescription": "\n",
@@ -79682,20 +79291,7 @@
79682
79291
  "coverageIgnore": false,
79683
79292
  "deprecated": false,
79684
79293
  "deprecationMessage": "",
79685
- "hostBindings": [
79686
- {
79687
- "coverageIgnore": false,
79688
- "name": "class",
79689
- "actualName": "cssClasses",
79690
- "deprecated": false,
79691
- "deprecationMessage": "",
79692
- "rawdescription": "\n\nAdds specific classes to the main element. Depending , logo size, menu and menu status, rtl status.\n",
79693
- "description": "<p>Adds specific classes to the main element. Depending , logo size, menu and menu status, rtl status.</p>\n",
79694
- "line": 66,
79695
- "type": "string",
79696
- "decorators": []
79697
- }
79698
- ],
79294
+ "hostBindings": [],
79699
79295
  "hostListeners": [],
79700
79296
  "standalone": false,
79701
79297
  "imports": [
@@ -79718,14 +79314,14 @@
79718
79314
  "description": "<p>The Site header offers easily recognisable elements (such as the logo) and the most essential functionality of\nevery site (such as Language switcher or Search form). Additionally it can host the name of the site,\nthe class name to which it belongs and the main navigation. The header is always placed at the top of the page.\nThe elements required in the site header are different depending wether it is the corporate, standardised or an harmonised website.</p>\n",
79719
79315
  "rawdescription": "\n\nThe Site header offers easily recognisable elements (such as the logo) and the most essential functionality of\nevery site (such as Language switcher or Search form). Additionally it can host the name of the site,\nthe class name to which it belongs and the main navigation. The header is always placed at the top of the page.\nThe elements required in the site header are different depending wether it is the corporate, standardised or an harmonised website.\n",
79720
79316
  "type": "component",
79721
- "sourceCode": "import { BreakpointObserver } from '@angular/cdk/layout';\nimport { AsyncPipe, isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, Component, ElementRef, HostBinding, Input, OnDestroy, PLATFORM_ID, afterNextRender, booleanAttribute, forwardRef, inject, output, input, viewChild, contentChild } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { I18nService } from '@eui/core';\nimport { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\nimport { EclMegaMenuComponent } from '@eui/ecl/components/ecl-mega-menu';\nimport { EclMenuComponent } from '@eui/ecl/components/ecl-menu';\nimport { ECLBaseDirective, EclRtlService, EclThemeService, logoLanguageCode } from '@eui/ecl/core';\nimport { EclHeaderMenuComunicationService } from '@eui/ecl/shared';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { Subject, takeUntil } from 'rxjs';\nimport { EclSiteHeaderLanguageClickEvent, EclSiteHeaderLogoClickEvent } from './events';\nimport { EclAreaChangeEvent } from './events/ecl-area-change.event';\nimport { EclSiteHeaderLanguageComponent } from './language';\nimport { EclSiteHeaderLoginComponent } from './login';\nimport { EclSiteHeaderNotificationComponent } from './notification';\nimport { EclSiteHeaderImageDirective, EclSiteHeaderLinkDirective, EclSiteHeaderPictureDirective } from './picture';\nimport { EclSiteHeaderSearchComponent } from './search';\nimport { EclAreaDataService } from './services/ecl-area-data.service';\n\n/**\n * The Site header offers easily recognisable elements (such as the logo) and the most essential functionality of\n * every site (such as Language switcher or Search form). Additionally it can host the name of the site,\n * the class name to which it belongs and the main navigation. The header is always placed at the top of the page.\n * The elements required in the site header are different depending wether it is the corporate, standardised or an harmonised website.\n */\n@Component({\n selector: 'ecl-site-header',\n templateUrl: './ecl-site-header.component.html',\n imports: [AsyncPipe, TranslatePipe, ...EUI_ECL_LINK, EclSiteHeaderPictureDirective],\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclSiteHeaderComponent extends ECLBaseDirective implements AfterContentInit, OnDestroy {\n eclThemeService = inject(EclThemeService);\n protected i18nService = inject(I18nService);\n\n /**\n * The name of the site, to be added in the header, next to the logo.\n */\n @Input() siteName: string;\n /**\n * Language code of the current language of the site.\n */\n @Input() languageCode = 'en';\n /**\n * The size of the logo, 's', 'm' or 'l', default to 'm'.\n */\n readonly logoSize = input<'s' | 'm' | 'l'>('m');\n\n /**\n * Determines if the site name should be displayed only on mobile devices.\n */\n readonly isSiteNameMobileOnly = input(false, { transform: booleanAttribute });\n\n /**\n * Adds specific classes to the main element. Depending , logo size, menu and menu status, rtl status.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-site-header'),\n `ecl-site-header-with-logo-${this.logoSize()}`,\n this.eclMenuComponent() ? 'ecl-site-header--has-menu' : '',\n this.eclMegaMenuComponent() ? 'ecl-site-header--has-mega-menu' : '',\n this.isEclMegaMenuOpen ? 'ecl-site-header--open-menu' : '',\n this.isEclMegaMenuStart ? 'ecl-site-header--open-menu-start' : '',\n this.isRtl ? 'ecl-site-header--rtl' : '',\n ].join(' ').trim();\n }\n\n readonly logoClick = output<EclSiteHeaderLogoClickEvent>();\n readonly languageClick = output<EclSiteHeaderLanguageClickEvent>();\n\n readonly topContainerElement = viewChild<ElementRef>('topContainer');\n readonly siteHeaderHeader = viewChild<ElementRef>('siteHeaderHeader');\n readonly bannerHeader = viewChild<ElementRef>('bannerHeader');\n readonly eclLoginComponent = contentChild(EclSiteHeaderLoginComponent);\n readonly eclMenuComponent = contentChild(EclMenuComponent);\n readonly eclMegaMenuComponent = contentChild(EclMegaMenuComponent);\n readonly eclSearchComponent = contentChild(EclSiteHeaderSearchComponent);\n readonly eclLanguageComponent = contentChild(EclSiteHeaderLanguageComponent);\n readonly eclNotificationComponent = contentChild(EclSiteHeaderNotificationComponent);\n readonly eclHeaderLink = contentChild(forwardRef(() => EclSiteHeaderLinkDirective));\n readonly eclHeaderImage = contentChild(forwardRef(() => EclSiteHeaderImageDirective));\n\n protected destroy$: Subject<boolean> = new Subject<boolean>();\n private isEclMegaMenuOpen = false;\n private isEclMegaMenuStart = false;\n private isMobileBreakpoint = false;\n private isRtl = false;\n private readonly TIMEOUT_INTERVAL = 100;\n private eclRtlService = inject(EclRtlService);\n private eclHeaderMenuComunicationService = inject(EclHeaderMenuComunicationService);\n private eclAreaDataService = inject(EclAreaDataService);\n private cdkBreakpointObserver = inject(BreakpointObserver);\n private el = inject(ElementRef);\n private platformId = inject(PLATFORM_ID);\n\n constructor() {\n super();\n\n afterNextRender(() => {\n this.observeBreakpointChanges();\n this.subscribeToMegaMenuEvents();\n // Observe size changes of the component, for some child components size need to be also adjusted accordingly.\n new ResizeObserver(() => {\n setTimeout(() => {\n this.sendResizeEventToChildComponents();\n }, this.TIMEOUT_INTERVAL)\n }).observe(this.topContainerElement().nativeElement)\n });\n }\n\n /**\n * Subscibe to some child components' events.\n */\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n this.handleRtlChangeState();\n this.handleLanguageChangeState();\n const eclHeaderImage = this.eclHeaderImage();\n if (eclHeaderImage) {\n eclHeaderImage.logoSize = this.logoSize();\n }\n\n const eclLoginComponent = this.eclLoginComponent();\n const eclSearchComponent = this.eclSearchComponent();\n if (eclLoginComponent && eclSearchComponent) {\n eclLoginComponent.loginBoxToggle.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.eclSearchComponent().isSearchBoxActive = false;\n this.sendResizeEventToChildComponents();\n });\n\n eclSearchComponent.searchToggle.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.eclLoginComponent().isLoginBoxActive = false;\n this.sendResizeEventToChildComponents();\n });\n }\n\n const eclLanguageComponent = this.eclLanguageComponent();\n if (eclLanguageComponent) {\n eclLanguageComponent.languageClick.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.languageClick.emit(new EclSiteHeaderLanguageClickEvent());\n this.sendResizeEventToChildComponents();\n });\n\n eclLanguageComponent.languageSelected.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.languageCode = evt.language?.code;\n });\n }\n\n if (eclLanguageComponent) {\n this.languageCode = eclLanguageComponent?.languageCode;\n }\n\n const eclMenuComponent = this.eclMenuComponent();\n if (eclMenuComponent) {\n outputToObservable(eclMenuComponent.openHamburgerMenu).pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.positionMenu();\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * This method is used, when current language is not present for our available logo collection.\n * In this case, a default logo is returned.\n */\n get partOfLogoName(): string {\n return logoLanguageCode(this.languageCode);\n }\n\n onECLogoClick(evt: MouseEvent): void {\n const event = new EclSiteHeaderLogoClickEvent();\n this.logoClick.emit(event);\n if (event.defaultPrevented) {\n evt.preventDefault();\n }\n }\n\n hasCustomLink(): boolean {\n return !!this.eclHeaderLink();\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 * Some child components need position and size to be set according to the parent site-header. So we share some site-header's measurements\n * via the 'eclAreaDataService'.\n */\n private sendResizeEventToChildComponents(): void {\n const topContainerElement = this.topContainerElement();\n if (topContainerElement.nativeElement.getBoundingClientRect().width !== undefined) {\n const topContainerRect = topContainerElement.nativeElement.getBoundingClientRect();\n const siteHeaderAreaChangeEvent = new EclAreaChangeEvent(\n topContainerRect.width,\n topContainerRect.left,\n topContainerRect.right);\n\n this.eclAreaDataService.publishEvent(siteHeaderAreaChangeEvent);\n }\n }\n\n private subscribeToMegaMenuEvents(): void {\n this.eclHeaderMenuComunicationService.isMobileObjectOpen$.pipe(takeUntil(this.destroy$)).subscribe(isExpanded => {\n if (this.isMobileBreakpoint) {\n this.isEclMegaMenuStart = isExpanded;\n this.isEclMegaMenuOpen = isExpanded;\n }\n if (isExpanded) {\n const bottomSpaceY = this.el.nativeElement.getBoundingClientRect().bottom;\n this.eclMegaMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n });\n\n this.eclHeaderMenuComunicationService.isObjectExpanded$.pipe(takeUntil(this.destroy$)).subscribe(isExpanded => {\n if (this.isMobileBreakpoint) {\n if (isExpanded) {\n this.onMegaMenuItemExpandMobile();\n } else {\n this.onMegaMenuItemCollapseMobile();\n }\n } else {\n this.isEclMegaMenuOpen = isExpanded;\n if (isExpanded) {\n const bottomSpaceY = this.el.nativeElement.getBoundingClientRect().bottom;\n this.eclMegaMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n }\n });\n }\n\n private onMegaMenuItemExpandMobile(): void {\n this.isEclMegaMenuStart = false;\n const eclNotificationComponent = this.eclNotificationComponent();\n if (eclNotificationComponent) {\n eclNotificationComponent.onHide();\n }\n const bannerHeader = this.bannerHeader();\n if (bannerHeader) {\n bannerHeader.nativeElement.style.display = 'none';\n }\n const bottomSpaceY = this.siteHeaderHeader().nativeElement.getBoundingClientRect().bottom;\n this.eclMegaMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n\n private onMegaMenuItemCollapseMobile(): void {\n this.isEclMegaMenuStart = true;\n const eclNotificationComponent = this.eclNotificationComponent();\n if (eclNotificationComponent) {\n eclNotificationComponent.onShow();\n }\n const bannerHeader = this.bannerHeader();\n if (bannerHeader) {\n bannerHeader.nativeElement.style.display = '';\n }\n const bottomSpaceY = this.el.nativeElement.getBoundingClientRect().bottom;\n this.eclMegaMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe(['(max-width: 996px)'])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobileBreakpoint = result.matches;\n });\n }\n\n private positionMenu(): void {\n const bottomSpaceY = this.siteHeaderHeader().nativeElement.getBoundingClientRect().bottom;\n this.eclMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n\n private handleLanguageChangeState(): void {\n this.i18nService.getState().pipe(takeUntil(this.destroy$)).subscribe((lang) => {\n this.languageCode = lang.activeLang;\n const eclLanguageComponent = this.eclLanguageComponent();\n if (eclLanguageComponent) {\n eclLanguageComponent.languageCode = lang.activeLang;\n }\n });\n }\n}\n",
79317
+ "sourceCode": "import { BreakpointObserver } from '@angular/cdk/layout';\nimport { AsyncPipe, isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, Component, ElementRef, OnDestroy, PLATFORM_ID, afterNextRender, booleanAttribute, forwardRef, inject, output, input, model, signal, viewChild, contentChild } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { I18nService } from '@eui/core';\nimport { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\nimport { EclMegaMenuComponent } from '@eui/ecl/components/ecl-mega-menu';\nimport { EclMenuComponent } from '@eui/ecl/components/ecl-menu';\nimport { ECLBaseDirective, EclRtlService, EclThemeService, logoLanguageCode } from '@eui/ecl/core';\nimport { EclHeaderMenuComunicationService } from '@eui/ecl/shared';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { Subject, takeUntil } from 'rxjs';\nimport { EclSiteHeaderLanguageClickEvent, EclSiteHeaderLogoClickEvent } from './events';\nimport { EclAreaChangeEvent } from './events/ecl-area-change.event';\nimport { EclSiteHeaderLanguageComponent } from './language';\nimport { EclSiteHeaderLoginComponent } from './login';\nimport { EclSiteHeaderNotificationComponent } from './notification';\nimport { EclSiteHeaderImageDirective, EclSiteHeaderLinkDirective, EclSiteHeaderPictureDirective } from './picture';\nimport { EclSiteHeaderSearchComponent } from './search';\nimport { EclAreaDataService } from './services/ecl-area-data.service';\n\n/**\n * The Site header offers easily recognisable elements (such as the logo) and the most essential functionality of\n * every site (such as Language switcher or Search form). Additionally it can host the name of the site,\n * the class name to which it belongs and the main navigation. The header is always placed at the top of the page.\n * The elements required in the site header are different depending wether it is the corporate, standardised or an harmonised website.\n */\n@Component({\n selector: 'ecl-site-header',\n templateUrl: './ecl-site-header.component.html',\n imports: [AsyncPipe, TranslatePipe, ...EUI_ECL_LINK, EclSiteHeaderPictureDirective],\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclSiteHeaderComponent extends ECLBaseDirective implements AfterContentInit, OnDestroy {\n /**\n * The name of the site, to be added in the header, next to the logo.\n */\n readonly siteName = input<string>();\n /**\n * Language code of the current language of the site.\n */\n readonly languageCode = model('en');\n /**\n * The size of the logo, 's', 'm' or 'l', default to 'm'.\n */\n readonly logoSize = input<'s' | 'm' | 'l'>('m');\n /**\n * Determines if the site name should be displayed only on mobile devices.\n */\n readonly isSiteNameMobileOnly = input(false, { transform: booleanAttribute });\n\n readonly logoClick = output<EclSiteHeaderLogoClickEvent>();\n readonly languageClick = output<EclSiteHeaderLanguageClickEvent>();\n\n readonly topContainerElement = viewChild<ElementRef>('topContainer');\n readonly siteHeaderHeader = viewChild<ElementRef>('siteHeaderHeader');\n readonly bannerHeader = viewChild<ElementRef>('bannerHeader');\n readonly eclLoginComponent = contentChild(EclSiteHeaderLoginComponent);\n readonly eclMenuComponent = contentChild(EclMenuComponent);\n readonly eclMegaMenuComponent = contentChild(EclMegaMenuComponent);\n readonly eclSearchComponent = contentChild(EclSiteHeaderSearchComponent);\n readonly eclLanguageComponent = contentChild(EclSiteHeaderLanguageComponent);\n readonly eclNotificationComponent = contentChild(EclSiteHeaderNotificationComponent);\n readonly eclHeaderLink = contentChild(forwardRef(() => EclSiteHeaderLinkDirective));\n readonly eclHeaderImage = contentChild(forwardRef(() => EclSiteHeaderImageDirective));\n\n protected readonly eclThemeService = inject(EclThemeService);\n protected readonly i18nService = inject(I18nService);\n protected destroy$: Subject<boolean> = new Subject<boolean>();\n\n private readonly isEclMegaMenuOpen = signal(false);\n private readonly isEclMegaMenuStart = signal(false);\n private isMobileBreakpoint = false;\n private readonly isRtl = signal(false);\n private readonly TIMEOUT_INTERVAL = 100;\n private readonly eclRtlService = inject(EclRtlService);\n private readonly eclHeaderMenuComunicationService = inject(EclHeaderMenuComunicationService);\n private readonly eclAreaDataService = inject(EclAreaDataService);\n private readonly cdkBreakpointObserver = inject(BreakpointObserver);\n private readonly el = inject(ElementRef);\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Adds specific classes to the main element. Depending , logo size, menu and menu status, rtl status.\n */\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-site-header'),\n `ecl-site-header-with-logo-${this.logoSize()}`,\n this.eclMenuComponent() ? 'ecl-site-header--has-menu' : '',\n this.eclMegaMenuComponent() ? 'ecl-site-header--has-mega-menu' : '',\n this.isEclMegaMenuOpen() ? 'ecl-site-header--open-menu' : '',\n this.isEclMegaMenuStart() ? 'ecl-site-header--open-menu-start' : '',\n this.isRtl() ? 'ecl-site-header--rtl' : '',\n ].join(' ').trim();\n }\n\n constructor() {\n super();\n\n afterNextRender(() => {\n this.observeBreakpointChanges();\n this.subscribeToMegaMenuEvents();\n // Observe size changes of the component, for some child components size need to be also adjusted accordingly.\n new ResizeObserver(() => {\n setTimeout(() => {\n this.sendResizeEventToChildComponents();\n }, this.TIMEOUT_INTERVAL)\n }).observe(this.topContainerElement().nativeElement)\n });\n }\n\n /**\n * Subscibe to some child components' events.\n */\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n this.handleRtlChangeState();\n this.handleLanguageChangeState();\n const eclHeaderImage = this.eclHeaderImage();\n if (eclHeaderImage) {\n eclHeaderImage.logoSize = this.logoSize();\n }\n\n const eclLoginComponent = this.eclLoginComponent();\n const eclSearchComponent = this.eclSearchComponent();\n if (eclLoginComponent && eclSearchComponent) {\n outputToObservable(eclLoginComponent.loginBoxToggle).pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.eclSearchComponent().isSearchBoxActive = false;\n this.sendResizeEventToChildComponents();\n });\n\n outputToObservable(eclSearchComponent.searchToggle).pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.eclLoginComponent().isLoginBoxActive = false;\n this.sendResizeEventToChildComponents();\n });\n }\n\n const eclLanguageComponent = this.eclLanguageComponent();\n if (eclLanguageComponent) {\n outputToObservable(eclLanguageComponent.languageClick).pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.languageClick.emit(new EclSiteHeaderLanguageClickEvent());\n this.sendResizeEventToChildComponents();\n });\n\n outputToObservable(eclLanguageComponent.languageSelected).pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.languageCode.set(evt.language?.code);\n });\n }\n\n if (eclLanguageComponent) {\n this.languageCode.set(eclLanguageComponent?.languageCode);\n }\n\n const eclMenuComponent = this.eclMenuComponent();\n if (eclMenuComponent) {\n outputToObservable(eclMenuComponent.openHamburgerMenu).pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.positionMenu();\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * This method is used, when current language is not present for our available logo collection.\n * In this case, a default logo is returned.\n */\n get partOfLogoName(): string {\n return logoLanguageCode(this.languageCode());\n }\n\n onECLogoClick(evt: MouseEvent): void {\n const event = new EclSiteHeaderLogoClickEvent();\n this.logoClick.emit(event);\n if (event.defaultPrevented) {\n evt.preventDefault();\n }\n }\n\n hasCustomLink(): boolean {\n return !!this.eclHeaderLink();\n }\n\n private handleRtlChangeState(): void {\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((rtlState) => {\n this.isRtl.set(rtlState);\n });\n }\n\n /**\n * Some child components need position and size to be set according to the parent site-header. So we share some site-header's measurements\n * via the 'eclAreaDataService'.\n */\n private sendResizeEventToChildComponents(): void {\n const topContainerElement = this.topContainerElement();\n if (topContainerElement.nativeElement.getBoundingClientRect().width !== undefined) {\n const topContainerRect = topContainerElement.nativeElement.getBoundingClientRect();\n const siteHeaderAreaChangeEvent = new EclAreaChangeEvent(\n topContainerRect.width,\n topContainerRect.left,\n topContainerRect.right);\n\n this.eclAreaDataService.publishEvent(siteHeaderAreaChangeEvent);\n }\n }\n\n private subscribeToMegaMenuEvents(): void {\n this.eclHeaderMenuComunicationService.isMobileObjectOpen$.pipe(takeUntil(this.destroy$)).subscribe(isExpanded => {\n if (this.isMobileBreakpoint) {\n this.isEclMegaMenuStart.set(isExpanded);\n this.isEclMegaMenuOpen.set(isExpanded);\n }\n if (isExpanded) {\n const bottomSpaceY = this.el.nativeElement.getBoundingClientRect().bottom;\n this.eclMegaMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n });\n\n this.eclHeaderMenuComunicationService.isObjectExpanded$.pipe(takeUntil(this.destroy$)).subscribe(isExpanded => {\n if (this.isMobileBreakpoint) {\n if (isExpanded) {\n this.onMegaMenuItemExpandMobile();\n } else {\n this.onMegaMenuItemCollapseMobile();\n }\n } else {\n this.isEclMegaMenuOpen.set(isExpanded);\n if (isExpanded) {\n const bottomSpaceY = this.el.nativeElement.getBoundingClientRect().bottom;\n this.eclMegaMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n }\n });\n }\n\n private onMegaMenuItemExpandMobile(): void {\n this.isEclMegaMenuStart.set(false);\n const eclNotificationComponent = this.eclNotificationComponent();\n if (eclNotificationComponent) {\n eclNotificationComponent.onHide();\n }\n const bannerHeader = this.bannerHeader();\n if (bannerHeader) {\n bannerHeader.nativeElement.style.display = 'none';\n }\n const bottomSpaceY = this.siteHeaderHeader().nativeElement.getBoundingClientRect().bottom;\n this.eclMegaMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n\n private onMegaMenuItemCollapseMobile(): void {\n this.isEclMegaMenuStart.set(true);\n const eclNotificationComponent = this.eclNotificationComponent();\n if (eclNotificationComponent) {\n eclNotificationComponent.onShow();\n }\n const bannerHeader = this.bannerHeader();\n if (bannerHeader) {\n bannerHeader.nativeElement.style.display = '';\n }\n const bottomSpaceY = this.el.nativeElement.getBoundingClientRect().bottom;\n this.eclMegaMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe(['(max-width: 996px)'])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobileBreakpoint = result.matches;\n });\n }\n\n private positionMenu(): void {\n const bottomSpaceY = this.siteHeaderHeader().nativeElement.getBoundingClientRect().bottom;\n this.eclMenuComponent().positionMenuOverlay(bottomSpaceY);\n }\n\n private handleLanguageChangeState(): void {\n this.i18nService.getState().pipe(takeUntil(this.destroy$)).subscribe((lang) => {\n this.languageCode.set(lang.activeLang);\n const eclLanguageComponent = this.eclLanguageComponent();\n if (eclLanguageComponent) {\n eclLanguageComponent.languageCode = lang.activeLang;\n }\n });\n }\n}\n",
79722
79318
  "assetsDirs": [],
79723
79319
  "styleUrlsData": "",
79724
79320
  "stylesData": "\n :host {\n display: block;\n }\n \n",
79725
79321
  "jsdoctags": [
79726
79322
  {
79727
- "pos": 1492,
79728
- "end": 1968,
79323
+ "pos": 1487,
79324
+ "end": 1963,
79729
79325
  "kind": 321,
79730
79326
  "id": 0,
79731
79327
  "flags": 16777216,
@@ -79740,7 +79336,7 @@
79740
79336
  "deprecated": false,
79741
79337
  "deprecationMessage": "",
79742
79338
  "args": [],
79743
- "line": 104,
79339
+ "line": 105,
79744
79340
  "rawdescription": "\n"
79745
79341
  },
79746
79342
  "extends": [
@@ -79757,7 +79353,7 @@
79757
79353
  "name": "cssClasses",
79758
79354
  "type": "string",
79759
79355
  "returnType": "string",
79760
- "line": 66,
79356
+ "line": 95,
79761
79357
  "rawdescription": "\n\nAdds specific classes to the main element. Depending , logo size, menu and menu status, rtl status.\n",
79762
79358
  "description": "<p>Adds specific classes to the main element. Depending , logo size, menu and menu status, rtl status.</p>\n"
79763
79359
  }
@@ -79768,7 +79364,7 @@
79768
79364
  "name": "partOfLogoName",
79769
79365
  "type": "string",
79770
79366
  "returnType": "string",
79771
- "line": 181,
79367
+ "line": 182,
79772
79368
  "rawdescription": "\n\nThis method is used, when current language is not present for our available logo collection.\nIn this case, a default logo is returned.\n",
79773
79369
  "description": "<p>This method is used, when current language is not present for our available logo collection.\nIn this case, a default logo is returned.</p>\n"
79774
79370
  }
@@ -79808,14 +79404,15 @@
79808
79404
  }
79809
79405
  ]
79810
79406
  },
79811
- "templateData": "<div class=\"ecl-site-header__background\">\n <div class=\"ecl-site-header__header\" #siteHeaderHeader>\n <div class=\"ecl-site-header__container ecl-container\">\n <div #topContainer class=\"ecl-site-header__top\">\n @if(hasCustomLink()) {\n <ng-content select=\"[eclSiteHeaderLink]\"></ng-content>\n } @else {\n <a eclLink variant=\"standalone\" class=\"ecl-site-header__logo-link\"\n href=\"https://commission.europa.eu/index_{{ languageCode }}\" (click)=\"onECLogoClick($event)\"\n [attr.aria-label]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\"\n style=\"display: flex; align-items: center; position: relative;\">\n <ng-content select=\"[eclSiteHeaderEnvironment]\" media=\"(min-width: 1140px)\"></ng-content>\n\n @if (eclThemeService.isEC$ | async) {\n <picture eclSiteHeaderPicture\n [attr.title]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\">\n <source\n srcset=\"./assets/images/ecl/logo/ec/positive/logo-ec--{{ partOfLogoName }}.svg\"\n media=\"(min-width: 415px)\" />\n <img class=\"ecl-site-header__logo-image ecl-site-header__logo-image--{{logoSize()}}\"\n src=\"./assets/images/ecl/logo/ec/logo-ec--mute.svg\"\n [attr.alt]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\" />\n </picture>\n }\n @if (eclThemeService.isEU$ | async) {\n <picture eclSiteHeaderPicture\n [attr.title]=\"'ecl.footer.EUROPEAN-UNION' | translate\">\n <source\n srcset=\"./assets/images/ecl/logo/eu/standard-version/positive/logo-eu--{{ partOfLogoName }}.svg\"\n media=\"(min-width: 415px)\" />\n <img class=\"ecl-site-header__logo-image ecl-site-header__logo-image--{{logoSize()}}\"\n src=\"./assets/images/ecl/logo/eu/condensed-version/positive/logo-eu--{{ partOfLogoName }}.svg\"\n alt=\"European Union\" />\n </picture>\n }\n </a>\n }\n <ng-content select=\"ecl-site-header-action\"></ng-content>\n </div>\n </div>\n </div>\n <ng-content select=\"ecl-site-header-notification\"></ng-content>\n</div>\n\n\n<ng-content select=\"ecl-site-header-banner-top\"></ng-content>\n@if (siteName) {\n <div class=\"ecl-site-header__banner\" #bannerHeader [class.ecl-site-header__site-name--mobile-only]=\"isSiteNameMobileOnly()\">\n <div class=\"ecl-container\">\n <div class=\"ecl-site-header__site-name\">{{ siteName }}</div>\n <ng-content select=\"[eclSiteHeaderCta]\"></ng-content>\n </div>\n </div>\n}\n\n<ng-content select=\"ecl-menu\"></ng-content>\n<ng-content select=\"[eclMegaMenu]\"></ng-content>\n"
79407
+ "templateData": "<div class=\"ecl-site-header__background\">\n <div class=\"ecl-site-header__header\" #siteHeaderHeader>\n <div class=\"ecl-site-header__container ecl-container\">\n <div #topContainer class=\"ecl-site-header__top\">\n @if(hasCustomLink()) {\n <ng-content select=\"[eclSiteHeaderLink]\"></ng-content>\n } @else {\n <a eclLink variant=\"standalone\" class=\"ecl-site-header__logo-link\"\n href=\"https://commission.europa.eu/index_{{ languageCode() }}\" (click)=\"onECLogoClick($event)\"\n [attr.aria-label]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\"\n style=\"display: flex; align-items: center; position: relative;\">\n <ng-content select=\"[eclSiteHeaderEnvironment]\" media=\"(min-width: 1140px)\"></ng-content>\n\n @if (eclThemeService.isEC$ | async) {\n <picture eclSiteHeaderPicture\n [attr.title]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\">\n <source\n srcset=\"./assets/images/ecl/logo/ec/positive/logo-ec--{{ partOfLogoName }}.svg\"\n media=\"(min-width: 415px)\" />\n <img class=\"ecl-site-header__logo-image ecl-site-header__logo-image--{{logoSize()}}\"\n src=\"./assets/images/ecl/logo/ec/logo-ec--mute.svg\"\n [attr.alt]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\" />\n </picture>\n }\n @if (eclThemeService.isEU$ | async) {\n <picture eclSiteHeaderPicture\n [attr.title]=\"'ecl.footer.EUROPEAN-UNION' | translate\">\n <source\n srcset=\"./assets/images/ecl/logo/eu/standard-version/positive/logo-eu--{{ partOfLogoName }}.svg\"\n media=\"(min-width: 415px)\" />\n <img class=\"ecl-site-header__logo-image ecl-site-header__logo-image--{{logoSize()}}\"\n src=\"./assets/images/ecl/logo/eu/condensed-version/positive/logo-eu--{{ partOfLogoName }}.svg\"\n alt=\"European Union\" />\n </picture>\n }\n </a>\n }\n <ng-content select=\"ecl-site-header-action\"></ng-content>\n </div>\n </div>\n </div>\n <ng-content select=\"ecl-site-header-notification\"></ng-content>\n</div>\n\n\n<ng-content select=\"ecl-site-header-banner-top\"></ng-content>\n@if (siteName()) {\n <div class=\"ecl-site-header__banner\" #bannerHeader [class.ecl-site-header__site-name--mobile-only]=\"isSiteNameMobileOnly()\">\n <div class=\"ecl-container\">\n <div class=\"ecl-site-header__site-name\">{{ siteName() }}</div>\n <ng-content select=\"[eclSiteHeaderCta]\"></ng-content>\n </div>\n </div>\n}\n\n<ng-content select=\"ecl-menu\"></ng-content>\n<ng-content select=\"[eclMegaMenu]\"></ng-content>\n"
79812
79408
  },
79813
79409
  {
79814
79410
  "name": "EclSiteHeaderCustomActionComponent",
79815
- "id": "component-EclSiteHeaderCustomActionComponent-b4ed191cf90ee2acaa621d4785e529e00d3537a7fd8da9b24127d8946f2df2746fe5d20ebc2e86debd49306410e0cfe627d23aec4bd6347fb79bd4aabe8f7bdb",
79411
+ "id": "component-EclSiteHeaderCustomActionComponent-87ce749e772227cbcad8a64d96570607f2ba12b67a783fa5b77b68bbc5363d0496901b692d389514e5232714c94be442ff669021f3eb2933e3ea7a9a16a1fc95",
79816
79412
  "file": "packages/ecl/components/ecl-site-header/custom-action/ecl-site-header-custom-action.component.ts",
79817
79413
  "encapsulation": [],
79818
79414
  "entryComponents": [],
79415
+ "host": {},
79819
79416
  "inputs": [],
79820
79417
  "outputs": [],
79821
79418
  "providers": [],
@@ -79883,44 +79480,6 @@
79883
79480
  ],
79884
79481
  "outputsClass": [],
79885
79482
  "propertiesClass": [
79886
- {
79887
- "name": "class",
79888
- "coverageIgnore": false,
79889
- "defaultValue": "'ecl-site-header__custom-action'",
79890
- "deprecated": false,
79891
- "deprecationMessage": "",
79892
- "type": "string",
79893
- "indexKey": "",
79894
- "optional": false,
79895
- "description": "",
79896
- "line": 26,
79897
- "rawdescription": "\n",
79898
- "decorators": [
79899
- {
79900
- "name": "HostBinding",
79901
- "stringifiedArguments": "'class'"
79902
- }
79903
- ],
79904
- "modifierKind": [
79905
- 171
79906
- ]
79907
- },
79908
- {
79909
- "name": "eclSiteHeaderCustomActionLink",
79910
- "coverageIgnore": false,
79911
- "defaultValue": "contentChild(EclSiteHeaderCustomActionLinkDirective)",
79912
- "deprecated": false,
79913
- "deprecationMessage": "",
79914
- "type": "unknown",
79915
- "indexKey": "",
79916
- "optional": false,
79917
- "description": "",
79918
- "line": 28,
79919
- "rawdescription": "\n",
79920
- "modifierKind": [
79921
- 148
79922
- ]
79923
- },
79924
79483
  {
79925
79484
  "name": "isOverlayExpanded",
79926
79485
  "coverageIgnore": false,
@@ -79931,23 +79490,10 @@
79931
79490
  "indexKey": "",
79932
79491
  "optional": false,
79933
79492
  "description": "<p>Used to expand/collapse the dropdown, if any.</p>\n",
79934
- "line": 32,
79935
- "rawdescription": "\n\nUsed to expand/collapse the dropdown, if any.\n"
79936
- },
79937
- {
79938
- "name": "title",
79939
- "coverageIgnore": false,
79940
- "defaultValue": "contentChild(EclSiteHeaderCustomActionTitleDirective)",
79941
- "deprecated": false,
79942
- "deprecationMessage": "",
79943
- "type": "unknown",
79944
- "indexKey": "",
79945
- "optional": false,
79946
- "description": "",
79947
- "line": 27,
79948
- "rawdescription": "\n",
79493
+ "line": 35,
79494
+ "rawdescription": "\n\nUsed to expand/collapse the dropdown, if any.\n",
79949
79495
  "modifierKind": [
79950
- 148
79496
+ 124
79951
79497
  ]
79952
79498
  },
79953
79499
  {
@@ -79959,8 +79505,11 @@
79959
79505
  "indexKey": "",
79960
79506
  "optional": false,
79961
79507
  "description": "",
79962
- "line": 33,
79963
- "rawdescription": "\n"
79508
+ "line": 36,
79509
+ "rawdescription": "\n",
79510
+ "modifierKind": [
79511
+ 124
79512
+ ]
79964
79513
  }
79965
79514
  ],
79966
79515
  "methodsClass": [
@@ -79971,7 +79520,7 @@
79971
79520
  "optional": false,
79972
79521
  "returnType": "void",
79973
79522
  "typeParameters": [],
79974
- "line": 36,
79523
+ "line": 42,
79975
79524
  "deprecated": false,
79976
79525
  "deprecationMessage": "",
79977
79526
  "rawdescription": "\n",
@@ -79984,7 +79533,7 @@
79984
79533
  "optional": false,
79985
79534
  "returnType": "void",
79986
79535
  "typeParameters": [],
79987
- "line": 51,
79536
+ "line": 57,
79988
79537
  "deprecated": false,
79989
79538
  "deprecationMessage": "",
79990
79539
  "rawdescription": "\n",
@@ -79997,20 +79546,11 @@
79997
79546
  "optional": false,
79998
79547
  "returnType": "void",
79999
79548
  "typeParameters": [],
80000
- "line": 69,
79549
+ "line": 74,
80001
79550
  "deprecated": false,
80002
79551
  "deprecationMessage": "",
80003
79552
  "rawdescription": "\n\nClose the overlay, when clicking outside of it.\n",
80004
- "description": "<p>Close the overlay, when clicking outside of it.</p>\n",
80005
- "decorators": [
80006
- {
80007
- "name": "HostListener",
80008
- "stringifiedArguments": "'eclClickOutside'"
80009
- }
80010
- ],
80011
- "modifierKind": [
80012
- 171
80013
- ]
79553
+ "description": "<p>Close the overlay, when clicking outside of it.</p>\n"
80014
79554
  },
80015
79555
  {
80016
79556
  "name": "onCustomActionOverlayClose",
@@ -80019,7 +79559,7 @@
80019
79559
  "optional": false,
80020
79560
  "returnType": "void",
80021
79561
  "typeParameters": [],
80022
- "line": 59,
79562
+ "line": 65,
80023
79563
  "deprecated": false,
80024
79564
  "deprecationMessage": "",
80025
79565
  "rawdescription": "\n\nClose the overlay.\n",
@@ -80032,20 +79572,11 @@
80032
79572
  "optional": false,
80033
79573
  "returnType": "void",
80034
79574
  "typeParameters": [],
80035
- "line": 77,
79575
+ "line": 81,
80036
79576
  "deprecated": false,
80037
79577
  "deprecationMessage": "",
80038
79578
  "rawdescription": "\n\nClose the overlay with ESC key.\n",
80039
- "description": "<p>Close the overlay with ESC key.</p>\n",
80040
- "decorators": [
80041
- {
80042
- "name": "HostListener",
80043
- "stringifiedArguments": "'document:keydown.escape'"
80044
- }
80045
- ],
80046
- "modifierKind": [
80047
- 171
80048
- ]
79579
+ "description": "<p>Close the overlay with ESC key.</p>\n"
80049
79580
  },
80050
79581
  {
80051
79582
  "name": "getCssClasses",
@@ -80089,45 +79620,8 @@
80089
79620
  "coverageIgnore": false,
80090
79621
  "deprecated": false,
80091
79622
  "deprecationMessage": "",
80092
- "hostBindings": [
80093
- {
80094
- "coverageIgnore": false,
80095
- "name": "class",
80096
- "actualName": "class",
80097
- "defaultValue": "'ecl-site-header__custom-action'",
80098
- "deprecated": false,
80099
- "deprecationMessage": "",
80100
- "rawdescription": "\n",
80101
- "description": "",
80102
- "line": 26,
80103
- "type": "string",
80104
- "decorators": []
80105
- }
80106
- ],
80107
- "hostListeners": [
80108
- {
80109
- "coverageIgnore": false,
80110
- "name": "document:keydown.escape",
80111
- "args": [],
80112
- "argsDecorator": [],
80113
- "deprecated": false,
80114
- "deprecationMessage": "",
80115
- "rawdescription": "\n\nClose the overlay with ESC key.\n",
80116
- "description": "<p>Close the overlay with ESC key.</p>\n",
80117
- "line": 77
80118
- },
80119
- {
80120
- "coverageIgnore": false,
80121
- "name": "eclClickOutside",
80122
- "args": [],
80123
- "argsDecorator": [],
80124
- "deprecated": false,
80125
- "deprecationMessage": "",
80126
- "rawdescription": "\n\nClose the overlay, when clicking outside of it.\n",
80127
- "description": "<p>Close the overlay, when clicking outside of it.</p>\n",
80128
- "line": 69
80129
- }
80130
- ],
79623
+ "hostBindings": [],
79624
+ "hostListeners": [],
80131
79625
  "standalone": false,
80132
79626
  "imports": [
80133
79627
  {
@@ -80144,14 +79638,14 @@
80144
79638
  "description": "<p>This components gives opportunity for user to add a custom action. It will appear at first place, before log-in and language\n and search (if any of these exist). Adds specific styling and functionality. Opens a dropdown with some more content.</p>\n",
80145
79639
  "rawdescription": "\n\nThis components gives opportunity for user to add a custom action. It will appear at first place, before log-in and language\n and search (if any of these exist). Adds specific styling and functionality. Opens a dropdown with some more content.\n",
80146
79640
  "type": "component",
80147
- "sourceCode": "import { Component, HostBinding, HostListener, AfterContentInit, OnDestroy, contentChild } from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { ECLBaseDirective, ECLClickOutsideDirective } from '@eui/ecl/core';\nimport { EclSiteHeaderCustomActionLinkDirective, EclSiteHeaderCustomActionTitleDirective } from './ecl-site-header-custom-action.directive';\nimport { takeUntil, Subject } from 'rxjs';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/**\n * This components gives opportunity for user to add a custom action. It will appear at first place, before log-in and language\n * and search (if any of these exist). Adds specific styling and functionality. Opens a dropdown with some more content.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'div[eclSiteHeaderCustomAction]',\n templateUrl: './ecl-site-header-custom-action.component.html',\n imports: [A11yModule, ...EUI_ECL_BUTTON, ...EUI_ECL_ICON],\n hostDirectives: [\n {\n directive: ECLClickOutsideDirective,\n outputs: ['eclClickOutside'],\n },\n ],\n})\nexport class EclSiteHeaderCustomActionComponent extends ECLBaseDirective implements AfterContentInit, OnDestroy {\n @HostBinding('class') class = 'ecl-site-header__custom-action';\n readonly title = contentChild(EclSiteHeaderCustomActionTitleDirective);\n readonly eclSiteHeaderCustomActionLink = contentChild(EclSiteHeaderCustomActionLinkDirective);\n /**\n * Used to expand/collapse the dropdown, if any.\n */\n isOverlayExpanded = false;\n titleId: string;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n\n ngAfterContentInit(): void {\n const title = this.title();\n if (title) {\n this.titleId = title.id;\n }\n\n // Subscribe to link output, which toggles the dropdown.\n const eclSiteHeaderCustomActionLink = this.eclSiteHeaderCustomActionLink();\n if (eclSiteHeaderCustomActionLink) {\n eclSiteHeaderCustomActionLink.customActionOverlayToggle.pipe(takeUntil(this.destroy$)).subscribe((isExpanded) => {\n this.isOverlayExpanded = isExpanded;\n })\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Close the overlay.\n */\n onCustomActionOverlayClose(): void {\n this.isOverlayExpanded = false;\n const eclSiteHeaderCustomActionLink = this.eclSiteHeaderCustomActionLink();\n if (!eclSiteHeaderCustomActionLink.hasLink()) eclSiteHeaderCustomActionLink.isOverlayExpanded = false;\n }\n\n /**\n * Close the overlay, when clicking outside of it.\n */\n @HostListener('eclClickOutside')\n onClickOutsideHandler(): void {\n this.onCustomActionOverlayClose();\n }\n\n /**\n * Close the overlay with ESC key.\n */\n @HostListener('document:keydown.escape')\n onEscapeKeydownHandler(): void {\n this.onCustomActionOverlayClose();\n }\n}\n",
79641
+ "sourceCode": "import { Component, AfterContentInit, OnDestroy, contentChild } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { ECLBaseDirective, ECLClickOutsideDirective } from '@eui/ecl/core';\nimport { EclSiteHeaderCustomActionLinkDirective, EclSiteHeaderCustomActionTitleDirective } from './ecl-site-header-custom-action.directive';\nimport { takeUntil, Subject } from 'rxjs';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/**\n * This components gives opportunity for user to add a custom action. It will appear at first place, before log-in and language\n * and search (if any of these exist). Adds specific styling and functionality. Opens a dropdown with some more content.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'div[eclSiteHeaderCustomAction]',\n templateUrl: './ecl-site-header-custom-action.component.html',\n imports: [A11yModule, ...EUI_ECL_BUTTON, ...EUI_ECL_ICON],\n hostDirectives: [\n {\n directive: ECLClickOutsideDirective,\n outputs: ['eclClickOutside'],\n },\n ],\n host: {\n class: 'ecl-site-header__custom-action',\n '(eclClickOutside)': 'onClickOutsideHandler()',\n '(document:keydown.escape)': 'onEscapeKeydownHandler()',\n },\n})\nexport class EclSiteHeaderCustomActionComponent extends ECLBaseDirective implements AfterContentInit, OnDestroy {\n /**\n * Used to expand/collapse the dropdown, if any.\n */\n protected isOverlayExpanded = false;\n protected titleId: string;\n\n private readonly title = contentChild(EclSiteHeaderCustomActionTitleDirective);\n private readonly eclSiteHeaderCustomActionLink = contentChild(EclSiteHeaderCustomActionLinkDirective);\n private destroy$: Subject<boolean> = new Subject<boolean>();\n\n ngAfterContentInit(): void {\n const title = this.title();\n if (title) {\n this.titleId = title.id();\n }\n\n // Subscribe to link output, which toggles the dropdown.\n const eclSiteHeaderCustomActionLink = this.eclSiteHeaderCustomActionLink();\n if (eclSiteHeaderCustomActionLink) {\n outputToObservable(eclSiteHeaderCustomActionLink.customActionOverlayToggle).pipe(takeUntil(this.destroy$)).subscribe((isExpanded) => {\n this.isOverlayExpanded = isExpanded;\n })\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Close the overlay.\n */\n onCustomActionOverlayClose(): void {\n this.isOverlayExpanded = false;\n const eclSiteHeaderCustomActionLink = this.eclSiteHeaderCustomActionLink();\n if (!eclSiteHeaderCustomActionLink.hasLink()) eclSiteHeaderCustomActionLink.isOverlayExpanded = false;\n }\n\n /**\n * Close the overlay, when clicking outside of it.\n */\n onClickOutsideHandler(): void {\n this.onCustomActionOverlayClose();\n }\n\n /**\n * Close the overlay with ESC key.\n */\n onEscapeKeydownHandler(): void {\n this.onCustomActionOverlayClose();\n }\n}\n",
80148
79642
  "assetsDirs": [],
80149
79643
  "styleUrlsData": "",
80150
79644
  "stylesData": "",
80151
79645
  "jsdoctags": [
80152
79646
  {
80153
- "pos": 548,
80154
- "end": 805,
79647
+ "pos": 586,
79648
+ "end": 843,
80155
79649
  "kind": 321,
80156
79650
  "id": 0,
80157
79651
  "flags": 16777216,
@@ -80204,10 +79698,11 @@
80204
79698
  },
80205
79699
  {
80206
79700
  "name": "EclSiteHeaderEnvironmentComponent",
80207
- "id": "component-EclSiteHeaderEnvironmentComponent-72f5efc0bb0cd86bd3dc746b097b0a5f05105521023825fe561d0cfe77205a72308a2ed2faf8fedd3e93fc836db509c6ef1226a448b93e8661ab7af520cc2c84",
79701
+ "id": "component-EclSiteHeaderEnvironmentComponent-2d708b6d2a3c37360397ec55406c481382ca2145bd93b525af639e03ff7a56e67eb2eb9b4ef52aa202bb9f3b316ce0c2ce844b37a28ee14444aeca3afeceb0d8",
80208
79702
  "file": "packages/ecl/components/ecl-site-header/ecl-site-header-environment/ecl-site-header-environment.component.ts",
80209
79703
  "encapsulation": [],
80210
79704
  "entryComponents": [],
79705
+ "host": {},
80211
79706
  "inputs": [],
80212
79707
  "outputs": [],
80213
79708
  "providers": [],
@@ -80276,7 +79771,7 @@
80276
79771
  "optional": false,
80277
79772
  "returnType": "void",
80278
79773
  "typeParameters": [],
80279
- "line": 62,
79774
+ "line": 64,
80280
79775
  "deprecated": false,
80281
79776
  "deprecationMessage": "",
80282
79777
  "rawdescription": "\n",
@@ -80324,34 +79819,21 @@
80324
79819
  "coverageIgnore": false,
80325
79820
  "deprecated": false,
80326
79821
  "deprecationMessage": "",
80327
- "hostBindings": [
80328
- {
80329
- "coverageIgnore": false,
80330
- "name": "class",
80331
- "actualName": "cssClasses",
80332
- "deprecated": false,
80333
- "deprecationMessage": "",
80334
- "rawdescription": "\n",
80335
- "description": "",
80336
- "line": 40,
80337
- "type": "string",
80338
- "decorators": []
80339
- }
80340
- ],
79822
+ "hostBindings": [],
80341
79823
  "hostListeners": [],
80342
79824
  "standalone": false,
80343
79825
  "imports": [],
80344
79826
  "description": "<p>Custom component, that shows the current environment of the application, for example &#39;develop&#39;, &#39;acceptance&#39;, etc.\nAdds some custom styling, so that the text will appear over the EU/EC logo.</p>\n",
80345
79827
  "rawdescription": "\n\nCustom component, that shows the current environment of the application, for example 'develop', 'acceptance', etc.\nAdds some custom styling, so that the text will appear over the EU/EC logo.\n",
80346
79828
  "type": "component",
80347
- "sourceCode": "import { BreakpointObserver } from '@angular/cdk/layout';\nimport { Component, ElementRef, HostBinding, OnDestroy, Renderer2, afterNextRender, inject } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Custom component, that shows the current environment of the application, for example 'develop', 'acceptance', etc.\n * Adds some custom styling, so that the text will appear over the EU/EC logo.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclSiteHeaderEnvironment]',\n template: '<ng-content></ng-content>',\n styles: [\n `\n :host {\n position: absolute;\n width: 100%;\n font-size: 1.3rem;\n padding: 0.3rem;\n opacity: 0.6;\n text-align: center;\n transform: rotate(-10deg);\n }\n @media print {\n :host {\n display: none;\n }\n }\n `,\n ],\n})\nexport class EclSiteHeaderEnvironmentComponent extends ECLBaseDirective implements OnDestroy {\n private el = inject(ElementRef);\n private cdkBreakpointObserver = inject(BreakpointObserver);\n private renderer = inject(Renderer2);\n\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses(''), 'ecl-u-type-xl ecl-u-bg-error ecl-u-type-color-white'].join(' ');\n }\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private isMobile = false;\n private parentEl: HTMLElement;\n\n constructor() {\n super();\n afterNextRender(() => {\n const el: HTMLElement = this.el.nativeElement;\n this.parentEl = this.renderer.parentNode(el);\n\n if (this.parentEl) {\n this.renderer.setStyle(this.parentEl, 'display', 'flex');\n this.renderer.setStyle(this.parentEl, 'alignItems', 'center');\n this.renderer.setStyle(this.parentEl, 'position', 'relative');\n }\n this.observeBreakpointChanges();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe(['(max-width: 480px)'])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobile = result.matches;\n if (this.isMobile) {\n this.manageMobile();\n } else {\n this.manageDesktop();\n }\n });\n }\n\n private manageMobile(): void {\n if (this.parentEl) {\n this.renderer.setStyle(this.parentEl, 'display', 'block');\n this.renderer.setStyle(this.el.nativeElement, 'width', 'unset');\n }\n }\n\n private manageDesktop(): void {\n if (this.parentEl) {\n this.renderer.setStyle(this.parentEl, 'display', 'flex');\n this.renderer.setStyle(this.el.nativeElement, 'width', '100%');\n }\n }\n}\n",
79829
+ "sourceCode": "import { BreakpointObserver } from '@angular/cdk/layout';\nimport { Component, ElementRef, OnDestroy, Renderer2, afterNextRender, inject } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Custom component, that shows the current environment of the application, for example 'develop', 'acceptance', etc.\n * Adds some custom styling, so that the text will appear over the EU/EC logo.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclSiteHeaderEnvironment]',\n template: '<ng-content></ng-content>',\n styles: [\n `\n :host {\n position: absolute;\n width: 100%;\n font-size: 1.3rem;\n padding: 0.3rem;\n opacity: 0.6;\n text-align: center;\n transform: rotate(-10deg);\n }\n @media print {\n :host {\n display: none;\n }\n }\n `,\n ],\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclSiteHeaderEnvironmentComponent extends ECLBaseDirective implements OnDestroy {\n private el = inject(ElementRef);\n private cdkBreakpointObserver = inject(BreakpointObserver);\n private renderer = inject(Renderer2);\n\n get cssClasses(): string {\n return [super.getCssClasses(''), 'ecl-u-type-xl ecl-u-bg-error ecl-u-type-color-white'].join(' ');\n }\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private isMobile = false;\n private parentEl: HTMLElement;\n\n constructor() {\n super();\n afterNextRender(() => {\n const el: HTMLElement = this.el.nativeElement;\n this.parentEl = this.renderer.parentNode(el);\n\n if (this.parentEl) {\n this.renderer.setStyle(this.parentEl, 'display', 'flex');\n this.renderer.setStyle(this.parentEl, 'alignItems', 'center');\n this.renderer.setStyle(this.parentEl, 'position', 'relative');\n }\n this.observeBreakpointChanges();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe(['(max-width: 480px)'])\n .pipe(takeUntil(this.destroy$))\n .subscribe((result) => {\n this.isMobile = result.matches;\n if (this.isMobile) {\n this.manageMobile();\n } else {\n this.manageDesktop();\n }\n });\n }\n\n private manageMobile(): void {\n if (this.parentEl) {\n this.renderer.setStyle(this.parentEl, 'display', 'block');\n this.renderer.setStyle(this.el.nativeElement, 'width', 'unset');\n }\n }\n\n private manageDesktop(): void {\n if (this.parentEl) {\n this.renderer.setStyle(this.parentEl, 'display', 'flex');\n this.renderer.setStyle(this.el.nativeElement, 'width', '100%');\n }\n }\n}\n",
80348
79830
  "assetsDirs": [],
80349
79831
  "styleUrlsData": "",
80350
79832
  "stylesData": "\n :host {\n position: absolute;\n width: 100%;\n font-size: 1.3rem;\n padding: 0.3rem;\n opacity: 0.6;\n text-align: center;\n transform: rotate(-10deg);\n }\n @media print {\n :host {\n display: none;\n }\n }\n \n",
80351
79833
  "jsdoctags": [
80352
79834
  {
80353
- "pos": 300,
80354
- "end": 504,
79835
+ "pos": 287,
79836
+ "end": 491,
80355
79837
  "kind": 321,
80356
79838
  "id": 0,
80357
79839
  "flags": 16777216,
@@ -80366,7 +79848,7 @@
80366
79848
  "deprecated": false,
80367
79849
  "deprecationMessage": "",
80368
79850
  "args": [],
80369
- "line": 45,
79851
+ "line": 47,
80370
79852
  "rawdescription": "\n"
80371
79853
  },
80372
79854
  "extends": [
@@ -80382,7 +79864,7 @@
80382
79864
  "name": "cssClasses",
80383
79865
  "type": "string",
80384
79866
  "returnType": "string",
80385
- "line": 40,
79867
+ "line": 42,
80386
79868
  "rawdescription": "\n",
80387
79869
  "description": ""
80388
79870
  }
@@ -80404,7 +79886,7 @@
80404
79886
  },
80405
79887
  {
80406
79888
  "name": "EclSiteHeaderLanguageComponent",
80407
- "id": "component-EclSiteHeaderLanguageComponent-6d5a8dabfc452efabf51524b958206330b0e8d969c92a72ff623dbe1b45bee987ed4a81174ab72b108458c5b8639f088adba2c57c6cb65b7ccf06266d617d7e0",
79889
+ "id": "component-EclSiteHeaderLanguageComponent-2e479eb60d3b1d2e3d78c1af995ee1779283733b017720cbf199a9b82ab84745698f292d8d5f3120eebb4cc0f5990485d747c8bd0e677f682620dc886a04ebe1",
80408
79890
  "file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts",
80409
79891
  "encapsulation": [],
80410
79892
  "entryComponents": [],
@@ -80480,24 +79962,34 @@
80480
79962
  {
80481
79963
  "name": "languageClick",
80482
79964
  "coverageIgnore": false,
80483
- "defaultValue": "new EventEmitter<EclSiteHeaderLanguageClickEvent>()",
80484
79965
  "deprecated": false,
80485
79966
  "deprecationMessage": "",
80486
- "rawdescription": "\n\nThie event is emited, when language link, showing the current language is clicked.\n",
79967
+ "type": "EclSiteHeaderLanguageClickEvent",
79968
+ "indexKey": "",
79969
+ "optional": false,
80487
79970
  "description": "<p>Thie event is emited, when language link, showing the current language is clicked.</p>\n",
80488
- "line": 62,
80489
- "type": "EventEmitter"
79971
+ "line": 57,
79972
+ "rawdescription": "\n\nThie event is emited, when language link, showing the current language is clicked.\n",
79973
+ "modifierKind": [
79974
+ 148
79975
+ ],
79976
+ "required": false
80490
79977
  },
80491
79978
  {
80492
79979
  "name": "languageSelected",
80493
79980
  "coverageIgnore": false,
80494
- "defaultValue": "new EventEmitter<EclSiteHeaderLanguageSelectedEvent>()",
80495
79981
  "deprecated": false,
80496
79982
  "deprecationMessage": "",
80497
- "rawdescription": "\n\nThie event is emited, when user selects a new language from the dropdown.\n",
79983
+ "type": "EclSiteHeaderLanguageSelectedEvent",
79984
+ "indexKey": "",
79985
+ "optional": false,
80498
79986
  "description": "<p>Thie event is emited, when user selects a new language from the dropdown.</p>\n",
80499
- "line": 66,
80500
- "type": "EventEmitter"
79987
+ "line": 61,
79988
+ "rawdescription": "\n\nThie event is emited, when user selects a new language from the dropdown.\n",
79989
+ "modifierKind": [
79990
+ 148
79991
+ ],
79992
+ "required": false
80501
79993
  }
80502
79994
  ],
80503
79995
  "propertiesClass": [
@@ -80511,10 +80003,11 @@
80511
80003
  "indexKey": "",
80512
80004
  "optional": false,
80513
80005
  "description": "",
80514
- "line": 56,
80006
+ "line": 69,
80515
80007
  "rawdescription": "\n",
80516
80008
  "modifierKind": [
80517
- 124
80009
+ 124,
80010
+ 148
80518
80011
  ]
80519
80012
  },
80520
80013
  {
@@ -80527,10 +80020,11 @@
80527
80020
  "indexKey": "",
80528
80021
  "optional": false,
80529
80022
  "description": "",
80530
- "line": 55,
80023
+ "line": 68,
80531
80024
  "rawdescription": "\n",
80532
80025
  "modifierKind": [
80533
- 124
80026
+ 124,
80027
+ 148
80534
80028
  ]
80535
80029
  },
80536
80030
  {
@@ -80543,8 +80037,11 @@
80543
80037
  "indexKey": "",
80544
80038
  "optional": false,
80545
80039
  "description": "",
80546
- "line": 100,
80547
- "rawdescription": "\n"
80040
+ "line": 103,
80041
+ "rawdescription": "\n",
80042
+ "modifierKind": [
80043
+ 124
80044
+ ]
80548
80045
  },
80549
80046
  {
80550
80047
  "name": "euLanguages",
@@ -80556,8 +80053,11 @@
80556
80053
  "indexKey": "",
80557
80054
  "optional": false,
80558
80055
  "description": "<p>Array of EU languages, that can be selected for the current site.</p>\n",
80559
- "line": 95,
80560
- "rawdescription": "\n\nArray of EU languages, that can be selected for the current site.\n"
80056
+ "line": 98,
80057
+ "rawdescription": "\n\nArray of EU languages, that can be selected for the current site.\n",
80058
+ "modifierKind": [
80059
+ 124
80060
+ ]
80561
80061
  },
80562
80062
  {
80563
80063
  "name": "i18nService",
@@ -80569,10 +80069,11 @@
80569
80069
  "indexKey": "",
80570
80070
  "optional": false,
80571
80071
  "description": "",
80572
- "line": 57,
80072
+ "line": 70,
80573
80073
  "rawdescription": "\n",
80574
80074
  "modifierKind": [
80575
- 124
80075
+ 124,
80076
+ 148
80576
80077
  ]
80577
80078
  },
80578
80079
  {
@@ -80584,8 +80085,11 @@
80584
80085
  "indexKey": "",
80585
80086
  "optional": false,
80586
80087
  "description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
80587
- "line": 84,
80588
- "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
80088
+ "line": 88,
80089
+ "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n",
80090
+ "modifierKind": [
80091
+ 124
80092
+ ]
80589
80093
  },
80590
80094
  {
80591
80095
  "name": "isLanguagesDropdownVisible",
@@ -80597,8 +80101,11 @@
80597
80101
  "indexKey": "",
80598
80102
  "optional": false,
80599
80103
  "description": "",
80600
- "line": 68,
80601
- "rawdescription": "\n"
80104
+ "line": 72,
80105
+ "rawdescription": "\n",
80106
+ "modifierKind": [
80107
+ 124
80108
+ ]
80602
80109
  },
80603
80110
  {
80604
80111
  "name": "isPushLeft",
@@ -80609,8 +80116,11 @@
80609
80116
  "indexKey": "",
80610
80117
  "optional": false,
80611
80118
  "description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
80612
- "line": 76,
80613
- "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
80119
+ "line": 80,
80120
+ "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n",
80121
+ "modifierKind": [
80122
+ 124
80123
+ ]
80614
80124
  },
80615
80125
  {
80616
80126
  "name": "isPushRight",
@@ -80621,8 +80131,11 @@
80621
80131
  "indexKey": "",
80622
80132
  "optional": false,
80623
80133
  "description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
80624
- "line": 72,
80625
- "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
80134
+ "line": 76,
80135
+ "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n",
80136
+ "modifierKind": [
80137
+ 124
80138
+ ]
80626
80139
  },
80627
80140
  {
80628
80141
  "name": "isStack",
@@ -80633,8 +80146,11 @@
80633
80146
  "indexKey": "",
80634
80147
  "optional": false,
80635
80148
  "description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
80636
- "line": 80,
80637
- "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
80149
+ "line": 84,
80150
+ "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n",
80151
+ "modifierKind": [
80152
+ 124
80153
+ ]
80638
80154
  },
80639
80155
  {
80640
80156
  "name": "languageArrowPosition",
@@ -80645,8 +80161,11 @@
80645
80161
  "indexKey": "",
80646
80162
  "optional": false,
80647
80163
  "description": "<p>This property is used for dropdown positioning on the screen.</p>\n",
80648
- "line": 88,
80649
- "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n"
80164
+ "line": 92,
80165
+ "rawdescription": "\n\nThis property is used for dropdown positioning on the screen.\n",
80166
+ "modifierKind": [
80167
+ 124
80168
+ ]
80650
80169
  },
80651
80170
  {
80652
80171
  "name": "languageCode",
@@ -80657,9 +80176,9 @@
80657
80176
  "type": "string",
80658
80177
  "indexKey": "",
80659
80178
  "optional": false,
80660
- "description": "",
80661
- "line": 89,
80662
- "rawdescription": "\n"
80179
+ "description": "<p>Current language code. Read and written by the parent <code>ecl-site-header</code>.</p>\n",
80180
+ "line": 66,
80181
+ "rawdescription": "\n\nCurrent language code. Read and written by the parent `ecl-site-header`.\n"
80663
80182
  },
80664
80183
  {
80665
80184
  "name": "leftPosition",
@@ -80670,8 +80189,11 @@
80670
80189
  "indexKey": "",
80671
80190
  "optional": false,
80672
80191
  "description": "",
80673
- "line": 91,
80674
- "rawdescription": "\n"
80192
+ "line": 94,
80193
+ "rawdescription": "\n",
80194
+ "modifierKind": [
80195
+ 124
80196
+ ]
80675
80197
  },
80676
80198
  {
80677
80199
  "name": "nonEuColumnsCount",
@@ -80683,8 +80205,11 @@
80683
80205
  "indexKey": "",
80684
80206
  "optional": false,
80685
80207
  "description": "",
80686
- "line": 101,
80687
- "rawdescription": "\n"
80208
+ "line": 104,
80209
+ "rawdescription": "\n",
80210
+ "modifierKind": [
80211
+ 124
80212
+ ]
80688
80213
  },
80689
80214
  {
80690
80215
  "name": "nonEuLanguages",
@@ -80696,8 +80221,11 @@
80696
80221
  "indexKey": "",
80697
80222
  "optional": false,
80698
80223
  "description": "<p>Array of non-EU languages, that can be selected for the current site.</p>\n",
80699
- "line": 99,
80700
- "rawdescription": "\n\nArray of non-EU languages, that can be selected for the current site.\n"
80224
+ "line": 102,
80225
+ "rawdescription": "\n\nArray of non-EU languages, that can be selected for the current site.\n",
80226
+ "modifierKind": [
80227
+ 124
80228
+ ]
80701
80229
  },
80702
80230
  {
80703
80231
  "name": "rightPosition",
@@ -80708,8 +80236,11 @@
80708
80236
  "indexKey": "",
80709
80237
  "optional": false,
80710
80238
  "description": "",
80711
- "line": 90,
80712
- "rawdescription": "\n"
80239
+ "line": 93,
80240
+ "rawdescription": "\n",
80241
+ "modifierKind": [
80242
+ 124
80243
+ ]
80713
80244
  }
80714
80245
  ],
80715
80246
  "methodsClass": [
@@ -80720,7 +80251,7 @@
80720
80251
  "optional": false,
80721
80252
  "returnType": "string",
80722
80253
  "typeParameters": [],
80723
- "line": 145,
80254
+ "line": 148,
80724
80255
  "deprecated": false,
80725
80256
  "deprecationMessage": "",
80726
80257
  "rawdescription": "\n",
@@ -80736,7 +80267,7 @@
80736
80267
  "optional": false,
80737
80268
  "returnType": "boolean",
80738
80269
  "typeParameters": [],
80739
- "line": 196,
80270
+ "line": 199,
80740
80271
  "deprecated": false,
80741
80272
  "deprecationMessage": "",
80742
80273
  "rawdescription": "\n",
@@ -80749,7 +80280,7 @@
80749
80280
  "optional": false,
80750
80281
  "returnType": "void",
80751
80282
  "typeParameters": [],
80752
- "line": 135,
80283
+ "line": 138,
80753
80284
  "deprecated": false,
80754
80285
  "deprecationMessage": "",
80755
80286
  "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",
@@ -80762,7 +80293,7 @@
80762
80293
  "optional": false,
80763
80294
  "returnType": "void",
80764
80295
  "typeParameters": [],
80765
- "line": 140,
80296
+ "line": 143,
80766
80297
  "deprecated": false,
80767
80298
  "deprecationMessage": "",
80768
80299
  "rawdescription": "\n",
@@ -80775,7 +80306,7 @@
80775
80306
  "optional": false,
80776
80307
  "returnType": "void",
80777
80308
  "typeParameters": [],
80778
- "line": 127,
80309
+ "line": 130,
80779
80310
  "deprecated": false,
80780
80311
  "deprecationMessage": "",
80781
80312
  "rawdescription": "\n",
@@ -80788,7 +80319,7 @@
80788
80319
  "optional": false,
80789
80320
  "returnType": "void",
80790
80321
  "typeParameters": [],
80791
- "line": 185,
80322
+ "line": 188,
80792
80323
  "deprecated": false,
80793
80324
  "deprecationMessage": "",
80794
80325
  "rawdescription": "\n\nClose the dropdown, when clicking outside of the component.\n",
@@ -80804,7 +80335,7 @@
80804
80335
  "optional": false,
80805
80336
  "returnType": "void",
80806
80337
  "typeParameters": [],
80807
- "line": 192,
80338
+ "line": 195,
80808
80339
  "deprecated": false,
80809
80340
  "deprecationMessage": "",
80810
80341
  "rawdescription": "\n\nClose the dropdown, when pressing ESC key.\n",
@@ -80829,7 +80360,7 @@
80829
80360
  "optional": false,
80830
80361
  "returnType": "void",
80831
80362
  "typeParameters": [],
80832
- "line": 153,
80363
+ "line": 156,
80833
80364
  "deprecated": false,
80834
80365
  "deprecationMessage": "",
80835
80366
  "rawdescription": "\n\nToggle the language dropdown when clicking the link, showing the current language.\n",
@@ -80840,8 +80371,8 @@
80840
80371
  "jsdoctags": [
80841
80372
  {
80842
80373
  "name": {
80843
- "pos": 5258,
80844
- "end": 5261,
80374
+ "pos": 5462,
80375
+ "end": 5465,
80845
80376
  "kind": 80,
80846
80377
  "id": 0,
80847
80378
  "flags": 16842752,
@@ -80854,8 +80385,8 @@
80854
80385
  "deprecated": false,
80855
80386
  "deprecationMessage": "",
80856
80387
  "tagName": {
80857
- "pos": 5252,
80858
- "end": 5257,
80388
+ "pos": 5456,
80389
+ "end": 5461,
80859
80390
  "kind": 80,
80860
80391
  "id": 0,
80861
80392
  "flags": 16842752,
@@ -80882,7 +80413,7 @@
80882
80413
  "optional": false,
80883
80414
  "returnType": "void",
80884
80415
  "typeParameters": [],
80885
- "line": 171,
80416
+ "line": 174,
80886
80417
  "deprecated": false,
80887
80418
  "deprecationMessage": "",
80888
80419
  "rawdescription": "\n",
@@ -80920,7 +80451,7 @@
80920
80451
  "optional": false,
80921
80452
  "returnType": "void",
80922
80453
  "typeParameters": [],
80923
- "line": 175,
80454
+ "line": 178,
80924
80455
  "deprecated": false,
80925
80456
  "deprecationMessage": "",
80926
80457
  "rawdescription": "\n",
@@ -81011,14 +80542,14 @@
81011
80542
  "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",
81012
80543
  "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",
81013
80544
  "type": "component",
81014
- "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",
80545
+ "sourceCode": "import {\n AfterViewInit,\n Component,\n DOCUMENT,\n ElementRef,\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 /**\n * Thie event is emited, when language link, showing the current language is clicked.\n */\n readonly languageClick = output<EclSiteHeaderLanguageClickEvent>();\n /**\n * Thie event is emited, when user selects a new language from the dropdown.\n */\n readonly languageSelected = output<EclSiteHeaderLanguageSelectedEvent>();\n\n /**\n * Current language code. Read and written by the parent `ecl-site-header`.\n */\n languageCode = 'en';\n\n protected readonly eclThemeService = inject(EclThemeService);\n protected readonly config = inject<GlobalConfig>(GLOBAL_CONFIG_TOKEN, { optional: true });\n protected readonly i18nService = inject(I18nService);\n\n protected isLanguagesDropdownVisible = false;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n protected isPushRight: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n protected isPushLeft: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n protected isStack: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n protected isFull: boolean;\n /**\n * This property is used for dropdown positioning on the screen.\n */\n protected languageArrowPosition: string;\n protected rightPosition: number;\n protected leftPosition: number;\n /**\n * Array of EU languages, that can be selected for the current site.\n */\n protected euLanguages: EuiLanguage[] = [];\n /**\n * Array of non-EU languages, that can be selected for the current site.\n */\n protected nonEuLanguages: EuiLanguage[] = [];\n protected euColumnsCount = 1;\n protected 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.emit(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.emit(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",
81015
80546
  "assetsDirs": [],
81016
80547
  "styleUrlsData": "",
81017
80548
  "stylesData": "\n :host {\n display: block;\n }\n \n",
81018
80549
  "jsdoctags": [
81019
80550
  {
81020
- "pos": 1027,
81021
- "end": 1185,
80551
+ "pos": 1009,
80552
+ "end": 1167,
81022
80553
  "kind": 321,
81023
80554
  "id": 0,
81024
80555
  "flags": 16777216,
@@ -81042,7 +80573,7 @@
81042
80573
  "name": "cssClasses",
81043
80574
  "type": "string",
81044
80575
  "returnType": "string",
81045
- "line": 123,
80576
+ "line": 126,
81046
80577
  "rawdescription": "\n",
81047
80578
  "description": ""
81048
80579
  }
@@ -81098,7 +80629,7 @@
81098
80629
  },
81099
80630
  {
81100
80631
  "name": "EclSiteHeaderLanguagePopoverComponent",
81101
- "id": "component-EclSiteHeaderLanguagePopoverComponent-e1d84a0bf4a937ce3e593bdd02f17dca9b853cc426819d4e57f144f50f918762e5340d2d90f1a0428c1e121c76d983d3378cbb1b91a0dd7b4a991de29be1315b",
80632
+ "id": "component-EclSiteHeaderLanguagePopoverComponent-36ba031bec694db35e71160fb537f9fe7da45ab6d0e938b3e8565fb08453b67dfa4a4c3969ee3cc5d4b1e6cfc638d6cd08482daf3e91ec642fce11b71f4ba111",
81102
80633
  "file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language-popover.component.ts",
81103
80634
  "encapsulation": [],
81104
80635
  "entryComponents": [],
@@ -81126,7 +80657,7 @@
81126
80657
  "indexKey": "",
81127
80658
  "optional": false,
81128
80659
  "description": "<p>Number of columns for eu languages. Calculated by the parent component &#39;ecl-site-header-language&#39;.</p>\n",
81129
- "line": 52,
80660
+ "line": 50,
81130
80661
  "rawdescription": "\n\nNumber of columns for eu languages. Calculated by the parent component 'ecl-site-header-language'.\n",
81131
80662
  "modifierKind": [
81132
80663
  148
@@ -81143,7 +80674,7 @@
81143
80674
  "indexKey": "",
81144
80675
  "optional": false,
81145
80676
  "description": "",
81146
- "line": 47,
80677
+ "line": 45,
81147
80678
  "rawdescription": "\n",
81148
80679
  "modifierKind": [
81149
80680
  148
@@ -81160,7 +80691,7 @@
81160
80691
  "indexKey": "",
81161
80692
  "optional": false,
81162
80693
  "description": "<p>Property to position the dialog correctly. Calculated by the parent component &#39;ecl-site-header-language&#39;.</p>\n",
81163
- "line": 76,
80694
+ "line": 74,
81164
80695
  "rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
81165
80696
  "modifierKind": [
81166
80697
  148
@@ -81177,7 +80708,7 @@
81177
80708
  "indexKey": "",
81178
80709
  "optional": false,
81179
80710
  "description": "<p>Property to show/hide the dialog.</p>\n",
81180
- "line": 60,
80711
+ "line": 58,
81181
80712
  "rawdescription": "\n\nProperty to show/hide the dialog.\n",
81182
80713
  "modifierKind": [
81183
80714
  148
@@ -81194,7 +80725,7 @@
81194
80725
  "indexKey": "",
81195
80726
  "optional": false,
81196
80727
  "description": "<p>Property to position the dialog correctly. Calculated by the parent component &#39;ecl-site-header-language&#39;.</p>\n",
81197
- "line": 68,
80728
+ "line": 66,
81198
80729
  "rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
81199
80730
  "modifierKind": [
81200
80731
  148
@@ -81211,7 +80742,7 @@
81211
80742
  "indexKey": "",
81212
80743
  "optional": false,
81213
80744
  "description": "<p>Property to position the dialog correctly. Calculated by the parent component &#39;ecl-site-header-language&#39;.</p>\n",
81214
- "line": 64,
80745
+ "line": 62,
81215
80746
  "rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
81216
80747
  "modifierKind": [
81217
80748
  148
@@ -81228,7 +80759,7 @@
81228
80759
  "indexKey": "",
81229
80760
  "optional": false,
81230
80761
  "description": "<p>Property to position the dialog correctly. Calculated by the parent component &#39;ecl-site-header-language&#39;.</p>\n",
81231
- "line": 72,
80762
+ "line": 70,
81232
80763
  "rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
81233
80764
  "modifierKind": [
81234
80765
  148
@@ -81245,7 +80776,7 @@
81245
80776
  "indexKey": "",
81246
80777
  "optional": false,
81247
80778
  "description": "<p>Property to position the arrow of the dialog correctly. Calculated by the parent component &#39;ecl-site-header-language&#39;.</p>\n",
81248
- "line": 88,
80779
+ "line": 86,
81249
80780
  "rawdescription": "\n\nProperty to position the arrow of the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
81250
80781
  "modifierKind": [
81251
80782
  148
@@ -81262,7 +80793,7 @@
81262
80793
  "indexKey": "",
81263
80794
  "optional": false,
81264
80795
  "description": "<p>Current language</p>\n",
81265
- "line": 46,
80796
+ "line": 44,
81266
80797
  "rawdescription": "\n\nCurrent language\n",
81267
80798
  "modifierKind": [
81268
80799
  148
@@ -81279,7 +80810,7 @@
81279
80810
  "indexKey": "",
81280
80811
  "optional": false,
81281
80812
  "description": "<p>Property to position the dialog correctly. Calculated by the parent component &#39;ecl-site-header-language&#39;.</p>\n",
81282
- "line": 84,
80813
+ "line": 82,
81283
80814
  "rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
81284
80815
  "modifierKind": [
81285
80816
  148
@@ -81296,7 +80827,7 @@
81296
80827
  "indexKey": "",
81297
80828
  "optional": false,
81298
80829
  "description": "<p>Number of columns for non-eu languages. Calculated by the parent component &#39;ecl-site-header-language&#39;.</p>\n",
81299
- "line": 56,
80830
+ "line": 54,
81300
80831
  "rawdescription": "\n\nNumber of columns for non-eu languages. Calculated by the parent component 'ecl-site-header-language'.\n",
81301
80832
  "modifierKind": [
81302
80833
  148
@@ -81313,7 +80844,7 @@
81313
80844
  "indexKey": "",
81314
80845
  "optional": false,
81315
80846
  "description": "",
81316
- "line": 48,
80847
+ "line": 46,
81317
80848
  "rawdescription": "\n",
81318
80849
  "modifierKind": [
81319
80850
  148
@@ -81330,7 +80861,7 @@
81330
80861
  "indexKey": "",
81331
80862
  "optional": false,
81332
80863
  "description": "<p>Property to position the dialog correctly. Calculated by the parent component &#39;ecl-site-header-language&#39;.</p>\n",
81333
- "line": 80,
80864
+ "line": 78,
81334
80865
  "rawdescription": "\n\nProperty to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.\n",
81335
80866
  "modifierKind": [
81336
80867
  148
@@ -81391,7 +80922,7 @@
81391
80922
  "indexKey": "",
81392
80923
  "optional": false,
81393
80924
  "description": "",
81394
- "line": 90,
80925
+ "line": 88,
81395
80926
  "rawdescription": "\n",
81396
80927
  "modifierKind": [
81397
80928
  148
@@ -81407,7 +80938,7 @@
81407
80938
  "indexKey": "",
81408
80939
  "optional": false,
81409
80940
  "description": "",
81410
- "line": 91,
80941
+ "line": 89,
81411
80942
  "rawdescription": "\n",
81412
80943
  "modifierKind": [
81413
80944
  148
@@ -81426,10 +80957,11 @@
81426
80957
  "indexKey": "",
81427
80958
  "optional": false,
81428
80959
  "description": "",
81429
- "line": 37,
80960
+ "line": 91,
81430
80961
  "rawdescription": "\n",
81431
80962
  "modifierKind": [
81432
- 124
80963
+ 124,
80964
+ 148
81433
80965
  ]
81434
80966
  },
81435
80967
  {
@@ -81441,9 +80973,12 @@
81441
80973
  "type": "unknown",
81442
80974
  "indexKey": "",
81443
80975
  "optional": false,
81444
- "description": "",
81445
- "line": 36,
81446
- "rawdescription": "\n"
80976
+ "description": "<p>Host element reference. Read by the parent <code>ecl-site-header-language</code> for positioning.</p>\n",
80977
+ "line": 39,
80978
+ "rawdescription": "\n\nHost element reference. Read by the parent `ecl-site-header-language` for positioning.\n",
80979
+ "modifierKind": [
80980
+ 148
80981
+ ]
81447
80982
  },
81448
80983
  {
81449
80984
  "name": "languageContent",
@@ -81455,9 +80990,10 @@
81455
80990
  "indexKey": "",
81456
80991
  "optional": false,
81457
80992
  "description": "<p>The div, that wraps all the languages.</p>\n",
81458
- "line": 42,
80993
+ "line": 95,
81459
80994
  "rawdescription": "\n\nThe div, that wraps all the languages.\n",
81460
80995
  "modifierKind": [
80996
+ 124,
81461
80997
  148
81462
80998
  ]
81463
80999
  },
@@ -81470,8 +81006,11 @@
81470
81006
  "indexKey": "",
81471
81007
  "optional": false,
81472
81008
  "description": "",
81473
- "line": 93,
81474
- "rawdescription": "\n"
81009
+ "line": 96,
81010
+ "rawdescription": "\n",
81011
+ "modifierKind": [
81012
+ 124
81013
+ ]
81475
81014
  }
81476
81015
  ],
81477
81016
  "methodsClass": [
@@ -81482,7 +81021,7 @@
81482
81021
  "optional": false,
81483
81022
  "returnType": "void",
81484
81023
  "typeParameters": [],
81485
- "line": 136,
81024
+ "line": 140,
81486
81025
  "deprecated": false,
81487
81026
  "deprecationMessage": "",
81488
81027
  "rawdescription": "\n",
@@ -81495,7 +81034,7 @@
81495
81034
  "optional": false,
81496
81035
  "returnType": "void",
81497
81036
  "typeParameters": [],
81498
- "line": 141,
81037
+ "line": 145,
81499
81038
  "deprecated": false,
81500
81039
  "deprecationMessage": "",
81501
81040
  "rawdescription": "\n",
@@ -81525,7 +81064,7 @@
81525
81064
  "optional": false,
81526
81065
  "returnType": "void",
81527
81066
  "typeParameters": [],
81528
- "line": 145,
81067
+ "line": 149,
81529
81068
  "deprecated": false,
81530
81069
  "deprecationMessage": "",
81531
81070
  "rawdescription": "\n",
@@ -81562,7 +81101,7 @@
81562
81101
  "optional": false,
81563
81102
  "returnType": "void",
81564
81103
  "typeParameters": [],
81565
- "line": 154,
81104
+ "line": 158,
81566
81105
  "deprecated": false,
81567
81106
  "deprecationMessage": "",
81568
81107
  "rawdescription": "\n\nSet the max-height property of the component. It is calculated depending on the viewport.\n",
@@ -81631,7 +81170,7 @@
81631
81170
  "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",
81632
81171
  "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",
81633
81172
  "type": "component",
81634
- "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",
81173
+ "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 /**\n * Host element reference. Read by the parent `ecl-site-header-language` for positioning.\n */\n readonly el = inject(ElementRef);\n\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 protected readonly eclThemeService = inject(EclThemeService);\n /**\n * The div, that wraps all the languages.\n */\n protected readonly languageContent = viewChild<ElementRef>('languageContent');\n protected languageContentMaxHeight: number;\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly scrollDispatcher = inject(ScrollDispatcher);\n private readonly 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",
81635
81174
  "assetsDirs": [],
81636
81175
  "styleUrlsData": "",
81637
81176
  "stylesData": "",
@@ -81653,7 +81192,7 @@
81653
81192
  "deprecated": false,
81654
81193
  "deprecationMessage": "",
81655
81194
  "args": [],
81656
- "line": 98,
81195
+ "line": 102,
81657
81196
  "rawdescription": "\n"
81658
81197
  },
81659
81198
  "extends": [
@@ -81669,7 +81208,7 @@
81669
81208
  "name": "cssClasses",
81670
81209
  "type": "string",
81671
81210
  "returnType": "string",
81672
- "line": 113,
81211
+ "line": 117,
81673
81212
  "rawdescription": "\n",
81674
81213
  "description": ""
81675
81214
  }
@@ -81680,7 +81219,7 @@
81680
81219
  "name": "display",
81681
81220
  "type": "string",
81682
81221
  "returnType": "string",
81683
- "line": 124,
81222
+ "line": 128,
81684
81223
  "rawdescription": "\n",
81685
81224
  "description": ""
81686
81225
  }
@@ -81691,7 +81230,7 @@
81691
81230
  "name": "isModal",
81692
81231
  "type": "unknown",
81693
81232
  "returnType": "boolean | undefined",
81694
- "line": 128,
81233
+ "line": 132,
81695
81234
  "rawdescription": "\n",
81696
81235
  "description": ""
81697
81236
  }
@@ -81702,7 +81241,7 @@
81702
81241
  "name": "isDropdownHidden",
81703
81242
  "type": "unknown",
81704
81243
  "returnType": "boolean | undefined",
81705
- "line": 132,
81244
+ "line": 136,
81706
81245
  "rawdescription": "\n",
81707
81246
  "description": ""
81708
81247
  }
@@ -81747,7 +81286,7 @@
81747
81286
  },
81748
81287
  {
81749
81288
  "name": "EclSiteHeaderLoginComponent",
81750
- "id": "component-EclSiteHeaderLoginComponent-19cf290d806bdaee64ed7b5689860e5d3113d6c5ebbfad60be450af5436bbb1012751c4ad894f93127962cf02d3e5439962e464de02158c40d0e7663b76b451e",
81289
+ "id": "component-EclSiteHeaderLoginComponent-2706438b1c588ce876cbe469775407fa471973a3bca35c4bf62268932e6ab52e4f6dcdfc1e6857d59ccabccc5fa41d32811d9eba411a74aadd0a257e7a8c72bf",
81751
81290
  "file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts",
81752
81291
  "encapsulation": [],
81753
81292
  "entryComponents": [],
@@ -81838,24 +81377,31 @@
81838
81377
  ],
81839
81378
  "outputsClass": [
81840
81379
  {
81841
- "name": "loginBoxToggle",
81380
+ "name": "login",
81842
81381
  "coverageIgnore": false,
81843
- "defaultValue": "new EventEmitter<EclSiteHeaderLoginBoxToggleEvent>()",
81844
81382
  "deprecated": false,
81845
81383
  "deprecationMessage": "",
81846
- "line": 44,
81847
- "type": "EventEmitter"
81384
+ "type": "EclSiteHeaderLoginEvent",
81385
+ "indexKey": "",
81386
+ "optional": false,
81387
+ "description": "",
81388
+ "line": 43,
81389
+ "rawdescription": "\n",
81390
+ "modifierKind": [
81391
+ 148
81392
+ ],
81393
+ "required": false
81848
81394
  },
81849
81395
  {
81850
- "name": "login",
81396
+ "name": "loginBoxToggle",
81851
81397
  "coverageIgnore": false,
81852
81398
  "deprecated": false,
81853
81399
  "deprecationMessage": "",
81854
- "type": "EclSiteHeaderLoginEvent",
81400
+ "type": "EclSiteHeaderLoginBoxToggleEvent",
81855
81401
  "indexKey": "",
81856
81402
  "optional": false,
81857
81403
  "description": "",
81858
- "line": 43,
81404
+ "line": 44,
81859
81405
  "rawdescription": "\n",
81860
81406
  "modifierKind": [
81861
81407
  148
@@ -81914,8 +81460,8 @@
81914
81460
  "jsdoctags": [
81915
81461
  {
81916
81462
  "tagName": {
81917
- "pos": 3907,
81918
- "end": 3914,
81463
+ "pos": 3874,
81464
+ "end": 3881,
81919
81465
  "kind": 80,
81920
81466
  "id": 0,
81921
81467
  "flags": 16842752,
@@ -82123,14 +81669,14 @@
82123
81669
  "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",
82124
81670
  "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",
82125
81671
  "type": "component",
82126
- "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",
81672
+ "sourceCode": "import { Component, DOCUMENT, ElementRef, OnChanges, OnDestroy, 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 readonly loginBoxToggle = output<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.emit(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.emit(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",
82127
81673
  "assetsDirs": [],
82128
81674
  "styleUrlsData": "",
82129
81675
  "stylesData": "\n :host {\n display: block;\n }\n \n",
82130
81676
  "jsdoctags": [
82131
81677
  {
82132
- "pos": 793,
82133
- "end": 943,
81678
+ "pos": 771,
81679
+ "end": 921,
82134
81680
  "kind": 321,
82135
81681
  "id": 0,
82136
81682
  "flags": 16777216,
@@ -82188,10 +81734,11 @@
82188
81734
  },
82189
81735
  {
82190
81736
  "name": "EclSiteHeaderNotificationComponent",
82191
- "id": "component-EclSiteHeaderNotificationComponent-b7b138dd5e07717062fada83981db270cdc143118a7427d29613c4ab47dfa1587f375cd415b114e6e2cef84f0c155c31357b60ccc5e00cea20431f4caec0a914",
81737
+ "id": "component-EclSiteHeaderNotificationComponent-655daf5c9d8fdd3df4c819ea9e6ec6529b373e7b4da867f34074f2390dc98253a5a38d66a14be09edd07f2d3e419e8d29820e22a62ecf3676109a3a794f31948",
82192
81738
  "file": "packages/ecl/components/ecl-site-header/notification/ecl-site-header-notification.component.ts",
82193
81739
  "encapsulation": [],
82194
81740
  "entryComponents": [],
81741
+ "host": {},
82195
81742
  "inputs": [],
82196
81743
  "outputs": [],
82197
81744
  "providers": [],
@@ -82263,14 +81810,7 @@
82263
81810
  "description": "",
82264
81811
  "line": 17,
82265
81812
  "rawdescription": "\n",
82266
- "decorators": [
82267
- {
82268
- "name": "HostBinding",
82269
- "stringifiedArguments": "'style.display'"
82270
- }
82271
- ],
82272
81813
  "modifierKind": [
82273
- 171,
82274
81814
  124
82275
81815
  ]
82276
81816
  }
@@ -82283,7 +81823,7 @@
82283
81823
  "optional": false,
82284
81824
  "returnType": "void",
82285
81825
  "typeParameters": [],
82286
- "line": 19,
81826
+ "line": 23,
82287
81827
  "deprecated": false,
82288
81828
  "deprecationMessage": "",
82289
81829
  "rawdescription": "\n",
@@ -82296,7 +81836,7 @@
82296
81836
  "optional": false,
82297
81837
  "returnType": "void",
82298
81838
  "typeParameters": [],
82299
- "line": 23,
81839
+ "line": 27,
82300
81840
  "deprecated": false,
82301
81841
  "deprecationMessage": "",
82302
81842
  "rawdescription": "\n",
@@ -82344,47 +81884,21 @@
82344
81884
  "coverageIgnore": false,
82345
81885
  "deprecated": false,
82346
81886
  "deprecationMessage": "",
82347
- "hostBindings": [
82348
- {
82349
- "coverageIgnore": false,
82350
- "name": "class",
82351
- "actualName": "cssClasses",
82352
- "deprecated": false,
82353
- "deprecationMessage": "",
82354
- "rawdescription": "\n",
82355
- "description": "",
82356
- "line": 14,
82357
- "type": "string",
82358
- "decorators": []
82359
- },
82360
- {
82361
- "coverageIgnore": false,
82362
- "name": "style.display",
82363
- "actualName": "display",
82364
- "defaultValue": "''",
82365
- "deprecated": false,
82366
- "deprecationMessage": "",
82367
- "rawdescription": "\n",
82368
- "description": "",
82369
- "line": 17,
82370
- "type": "string",
82371
- "decorators": []
82372
- }
82373
- ],
81887
+ "hostBindings": [],
82374
81888
  "hostListeners": [],
82375
81889
  "standalone": false,
82376
81890
  "imports": [],
82377
81891
  "description": "<p>This component is used as a wrapper around ecl-notification component, when used in the site-header. Adds specific class\n and methods to show/hide the notification.</p>\n",
82378
81892
  "rawdescription": "\n\nThis component is used as a wrapper around ecl-notification component, when used in the site-header. Adds specific class\n and methods to show/hide the notification.\n",
82379
81893
  "type": "component",
82380
- "sourceCode": "import { Component, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This component is used as a wrapper around ecl-notification component, when used in the site-header. Adds specific class\n * and methods to show/hide the notification.\n */\n@Component({\n selector: 'ecl-site-header-notification',\n templateUrl: 'ecl-site-header-notification.component.html',\n})\nexport class EclSiteHeaderNotificationComponent extends ECLBaseDirective {\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-site-header__notification')].join(' ').trim();\n }\n @HostBinding('style.display') protected display = '';\n\n onHide(): void {\n this.display = 'none';\n }\n\n onShow(): void {\n this.display = '';\n }\n}\n",
81894
+ "sourceCode": "import { Component } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This component is used as a wrapper around ecl-notification component, when used in the site-header. Adds specific class\n * and methods to show/hide the notification.\n */\n@Component({\n selector: 'ecl-site-header-notification',\n templateUrl: 'ecl-site-header-notification.component.html',\n host: {\n '[class]': 'cssClasses',\n '[style.display]': 'display',\n },\n})\nexport class EclSiteHeaderNotificationComponent extends ECLBaseDirective {\n protected display = '';\n\n get cssClasses(): string {\n return [super.getCssClasses('ecl-site-header__notification')].join(' ').trim();\n }\n\n onHide(): void {\n this.display = 'none';\n }\n\n onShow(): void {\n this.display = '';\n }\n}\n",
82381
81895
  "assetsDirs": [],
82382
81896
  "styleUrlsData": "",
82383
81897
  "stylesData": "",
82384
81898
  "jsdoctags": [
82385
81899
  {
82386
- "pos": 107,
82387
- "end": 285,
81900
+ "pos": 94,
81901
+ "end": 272,
82388
81902
  "kind": 321,
82389
81903
  "id": 0,
82390
81904
  "flags": 16777216,
@@ -82403,7 +81917,7 @@
82403
81917
  "name": "cssClasses",
82404
81918
  "type": "string",
82405
81919
  "returnType": "string",
82406
- "line": 14,
81920
+ "line": 19,
82407
81921
  "rawdescription": "\n",
82408
81922
  "description": ""
82409
81923
  }
@@ -82422,7 +81936,7 @@
82422
81936
  },
82423
81937
  {
82424
81938
  "name": "EclSiteHeaderSearchComponent",
82425
- "id": "component-EclSiteHeaderSearchComponent-f2c0c32058c22e107aa32c83d7149c58b3c0b5f941191d41160d6a1cb598d61204cdd35709bde16564d408b29b6baa2a4fc1d59a815075d744b7a06bd0e874c7",
81939
+ "id": "component-EclSiteHeaderSearchComponent-8356b9fd133a3a34ff2e43eb9cb138f5a215af633200c110b14792b9731f9f4b44b47a5c58d16b1e56514ad16d078b644fe02902d74d3a3b6dcc64eadcfee530",
82426
81940
  "file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
82427
81941
  "encapsulation": [],
82428
81942
  "entryComponents": [],
@@ -82455,18 +81969,24 @@
82455
81969
  ],
82456
81970
  "inputsClass": [
82457
81971
  {
81972
+ "name": "searchButtonLabel",
82458
81973
  "coverageIgnore": false,
82459
- "name": "searchInputText",
81974
+ "defaultValue": "undefined",
82460
81975
  "deprecated": false,
82461
81976
  "deprecationMessage": "",
82462
- "rawdescription": "\n",
82463
- "description": "",
82464
- "line": 56,
82465
81977
  "type": "string",
82466
- "decorators": []
81978
+ "indexKey": "",
81979
+ "optional": false,
81980
+ "description": "",
81981
+ "line": 58,
81982
+ "rawdescription": "\n",
81983
+ "modifierKind": [
81984
+ 148
81985
+ ],
81986
+ "required": false
82467
81987
  },
82468
81988
  {
82469
- "name": "searchButtonLabel",
81989
+ "name": "searchInputPlaceholder",
82470
81990
  "coverageIgnore": false,
82471
81991
  "defaultValue": "undefined",
82472
81992
  "deprecated": false,
@@ -82475,7 +81995,7 @@
82475
81995
  "indexKey": "",
82476
81996
  "optional": false,
82477
81997
  "description": "",
82478
- "line": 58,
81998
+ "line": 57,
82479
81999
  "rawdescription": "\n",
82480
82000
  "modifierKind": [
82481
82001
  148
@@ -82483,16 +82003,15 @@
82483
82003
  "required": false
82484
82004
  },
82485
82005
  {
82486
- "name": "searchInputPlaceholder",
82006
+ "name": "searchInputText",
82487
82007
  "coverageIgnore": false,
82488
- "defaultValue": "undefined",
82489
82008
  "deprecated": false,
82490
82009
  "deprecationMessage": "",
82491
82010
  "type": "string",
82492
82011
  "indexKey": "",
82493
82012
  "optional": false,
82494
82013
  "description": "",
82495
- "line": 57,
82014
+ "line": 56,
82496
82015
  "rawdescription": "\n",
82497
82016
  "modifierKind": [
82498
82017
  148
@@ -82545,24 +82064,47 @@
82545
82064
  ],
82546
82065
  "outputsClass": [
82547
82066
  {
82548
- "name": "searchToggle",
82067
+ "name": "searchEvent",
82549
82068
  "coverageIgnore": false,
82550
- "defaultValue": "new EventEmitter<EclSiteHeaderSearchToggleEvent>()",
82551
82069
  "deprecated": false,
82552
82070
  "deprecationMessage": "",
82553
- "line": 61,
82554
- "type": "EventEmitter"
82071
+ "type": "EclSiteHeaderSearchEvent",
82072
+ "indexKey": "",
82073
+ "optional": false,
82074
+ "description": "",
82075
+ "line": 60,
82076
+ "rawdescription": "\n",
82077
+ "modifierKind": [
82078
+ 148
82079
+ ],
82080
+ "required": false
82555
82081
  },
82556
82082
  {
82557
- "name": "searchEvent",
82083
+ "name": "searchInputText",
82558
82084
  "coverageIgnore": false,
82559
82085
  "deprecated": false,
82560
82086
  "deprecationMessage": "",
82561
- "type": "EclSiteHeaderSearchEvent",
82087
+ "type": "string",
82562
82088
  "indexKey": "",
82563
82089
  "optional": false,
82564
82090
  "description": "",
82565
- "line": 60,
82091
+ "line": 56,
82092
+ "rawdescription": "\n",
82093
+ "modifierKind": [
82094
+ 148
82095
+ ],
82096
+ "required": false
82097
+ },
82098
+ {
82099
+ "name": "searchToggle",
82100
+ "coverageIgnore": false,
82101
+ "deprecated": false,
82102
+ "deprecationMessage": "",
82103
+ "type": "EclSiteHeaderSearchToggleEvent",
82104
+ "indexKey": "",
82105
+ "optional": false,
82106
+ "description": "",
82107
+ "line": 61,
82566
82108
  "rawdescription": "\n",
82567
82109
  "modifierKind": [
82568
82110
  148
@@ -82621,8 +82163,8 @@
82621
82163
  "jsdoctags": [
82622
82164
  {
82623
82165
  "tagName": {
82624
- "pos": 5933,
82625
- "end": 5940,
82166
+ "pos": 5913,
82167
+ "end": 5920,
82626
82168
  "kind": 80,
82627
82169
  "id": 0,
82628
82170
  "flags": 16842752,
@@ -82958,14 +82500,14 @@
82958
82500
  "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",
82959
82501
  "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",
82960
82502
  "type": "component",
82961
- "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",
82503
+ "sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport { AfterViewInit, Component, DOCUMENT, ElementRef, forwardRef, inject, OnDestroy, PLATFORM_ID, Provider, output, input, model, 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 readonly searchInputText = model<string>();\n readonly searchInputPlaceholder = input<string>(undefined);\n readonly searchButtonLabel = input<string>(undefined);\n\n readonly searchEvent = output<EclSiteHeaderSearchEvent>();\n readonly searchToggle = output<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.set(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.emit(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.set(newValue);\n this.onChange(newValue);\n }\n\n private closeSearchBox(): void {\n if (!this.isSearchBoxActive) return;\n\n this.isSearchBoxActive = false;\n this.searchToggle.emit(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",
82962
82504
  "assetsDirs": [],
82963
82505
  "styleUrlsData": "",
82964
82506
  "stylesData": "\n :host {\n display: block;\n }\n \n",
82965
82507
  "jsdoctags": [
82966
82508
  {
82967
- "pos": 1221,
82968
- "end": 1387,
82509
+ "pos": 1199,
82510
+ "end": 1365,
82969
82511
  "kind": 321,
82970
82512
  "id": 0,
82971
82513
  "flags": 16777216,
@@ -83027,7 +82569,7 @@
83027
82569
  }
83028
82570
  ]
83029
82571
  },
83030
- "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"
82572
+ "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"
83031
82573
  },
83032
82574
  {
83033
82575
  "name": "EclSloganTickerComponent",
@@ -83768,7 +83310,7 @@
83768
83310
  },
83769
83311
  {
83770
83312
  "name": "EclSocialMediaFollowItemComponent",
83771
- "id": "component-EclSocialMediaFollowItemComponent-be2bc74a52d7b183206e23fa9c6edd0706816decad401fed2ccd0e2788dead5b1d6dbb066556634b97683220c7111e50c45fd911c2cccbe1ec6738847a5e6fdf",
83313
+ "id": "component-EclSocialMediaFollowItemComponent-af10cb7ce22e295e87d200282d4f934d3d9096be034a20300e19f49c8cea2c18a23ec6525da489ec0de9592f023fbdde2a73cd8a9fc87a270818f5214e0f73b7",
83772
83314
  "file": "packages/ecl/components/ecl-social-media-follow/ecl-social-media-follow-item.component.ts",
83773
83315
  "encapsulation": [],
83774
83316
  "entryComponents": [],
@@ -83839,7 +83381,7 @@
83839
83381
  "defaultValue": "'social-media'",
83840
83382
  "deprecated": false,
83841
83383
  "deprecationMessage": "",
83842
- "type": "string",
83384
+ "type": "EclIconSet",
83843
83385
  "indexKey": "",
83844
83386
  "optional": false,
83845
83387
  "description": "",
@@ -84079,7 +83621,7 @@
84079
83621
  "description": "",
84080
83622
  "rawdescription": "\n",
84081
83623
  "type": "component",
84082
- "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",
83624
+ "sourceCode": "import { booleanAttribute, Component, inject, input, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { EclIconSet, 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<EclIconSet>('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",
84083
83625
  "assetsDirs": [],
84084
83626
  "styleUrlsData": "",
84085
83627
  "stylesData": "",
@@ -92495,6 +92037,19 @@
92495
92037
  "description": "",
92496
92038
  "kind": 188
92497
92039
  },
92040
+ {
92041
+ "name": "EclIconSet",
92042
+ "ctype": "miscellaneous",
92043
+ "subtype": "typealias",
92044
+ "coverageIgnore": false,
92045
+ "rawtype": "\"default\" | \"social\" | \"social-media\" | \"social-media-color\" | \"flag\" | \"flag-non-members\" | \"phosphor\" | \"phosphor-fill\"",
92046
+ "file": "packages/ecl/components/ecl-icon/ecl-icon.component.ts",
92047
+ "deprecated": false,
92048
+ "deprecationMessage": "",
92049
+ "rawdescription": "Available icon sets supported by {@link EclIconComponent}.",
92050
+ "description": "<p>Available icon sets supported by {@link EclIconComponent}.</p>\n",
92051
+ "kind": 193
92052
+ },
92498
92053
  {
92499
92054
  "name": "ModelValue",
92500
92055
  "ctype": "miscellaneous",
@@ -94398,6 +93953,21 @@
94398
93953
  "description": "",
94399
93954
  "kind": 188
94400
93955
  }
93956
+ ],
93957
+ "packages/ecl/components/ecl-icon/ecl-icon.component.ts": [
93958
+ {
93959
+ "name": "EclIconSet",
93960
+ "ctype": "miscellaneous",
93961
+ "subtype": "typealias",
93962
+ "coverageIgnore": false,
93963
+ "rawtype": "\"default\" | \"social\" | \"social-media\" | \"social-media-color\" | \"flag\" | \"flag-non-members\" | \"phosphor\" | \"phosphor-fill\"",
93964
+ "file": "packages/ecl/components/ecl-icon/ecl-icon.component.ts",
93965
+ "deprecated": false,
93966
+ "deprecationMessage": "",
93967
+ "rawdescription": "Available icon sets supported by {@link EclIconComponent}.",
93968
+ "description": "<p>Available icon sets supported by {@link EclIconComponent}.</p>\n",
93969
+ "kind": 193
93970
+ }
94401
93971
  ]
94402
93972
  }
94403
93973
  },