@eui/ecl 21.0.0-alpha.30 → 21.0.0-alpha.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/assets/i18n-ecl/bg.json +1 -0
  2. package/assets/i18n-ecl/cs.json +1 -0
  3. package/assets/i18n-ecl/da.json +1 -0
  4. package/assets/i18n-ecl/de.json +1 -0
  5. package/assets/i18n-ecl/el.json +1 -0
  6. package/assets/i18n-ecl/en.json +1 -0
  7. package/assets/i18n-ecl/es.json +1 -0
  8. package/assets/i18n-ecl/et.json +1 -0
  9. package/assets/i18n-ecl/fi.json +1 -0
  10. package/assets/i18n-ecl/fr.json +1 -0
  11. package/assets/i18n-ecl/ga.json +1 -0
  12. package/assets/i18n-ecl/hr.json +1 -0
  13. package/assets/i18n-ecl/hu.json +1 -0
  14. package/assets/i18n-ecl/it.json +1 -0
  15. package/assets/i18n-ecl/lt.json +1 -0
  16. package/assets/i18n-ecl/lv.json +1 -0
  17. package/assets/i18n-ecl/mt.json +1 -0
  18. package/assets/i18n-ecl/nl.json +1 -0
  19. package/assets/i18n-ecl/pl.json +1 -0
  20. package/assets/i18n-ecl/pt.json +1 -0
  21. package/assets/i18n-ecl/ro.json +1 -0
  22. package/assets/i18n-ecl/sk.json +1 -0
  23. package/assets/i18n-ecl/sl.json +1 -0
  24. package/assets/i18n-ecl/sv.json +1 -0
  25. package/components/ecl-accordion/index.d.ts +8 -4
  26. package/components/ecl-accordion/index.d.ts.map +1 -1
  27. package/components/ecl-banner/index.d.ts +8 -1
  28. package/components/ecl-banner/index.d.ts.map +1 -1
  29. package/components/ecl-divider/index.d.ts +31 -0
  30. package/components/ecl-divider/index.d.ts.map +1 -0
  31. package/components/ecl-divider/package.json +3 -0
  32. package/components/ecl-featured/index.d.ts +13 -35
  33. package/components/ecl-featured/index.d.ts.map +1 -1
  34. package/components/ecl-feedback-message/index.d.ts.map +1 -1
  35. package/components/ecl-mega-menu/index.d.ts +7 -3
  36. package/components/ecl-mega-menu/index.d.ts.map +1 -1
  37. package/components/ecl-menu/index.d.ts +12 -4
  38. package/components/ecl-menu/index.d.ts.map +1 -1
  39. package/components/ecl-popover/index.d.ts +17 -12
  40. package/components/ecl-popover/index.d.ts.map +1 -1
  41. package/components/ecl-site-footer/index.d.ts +61 -32
  42. package/components/ecl-site-footer/index.d.ts.map +1 -1
  43. package/components/ecl-site-header/index.d.ts +6 -3
  44. package/components/ecl-site-header/index.d.ts.map +1 -1
  45. package/components/ecl-social-media-follow/index.d.ts +3 -1
  46. package/components/ecl-social-media-follow/index.d.ts.map +1 -1
  47. package/core/index.d.ts +7 -1
  48. package/core/index.d.ts.map +1 -1
  49. package/docs/changelog.html +152 -0
  50. package/docs/components/EclAccordionComponent.html +43 -2
  51. package/docs/components/EclAccordionItemComponent.html +3 -3
  52. package/docs/components/EclAppComponent.html +2 -2
  53. package/docs/components/EclBannerComponent.html +33 -2
  54. package/docs/components/EclBlockquoteComponent.html +2 -2
  55. package/docs/components/EclBreadcrumbComponent.html +2 -2
  56. package/docs/components/EclBreadcrumbSegmentComponent.html +2 -2
  57. package/docs/components/EclButtonComponent.html +2 -2
  58. package/docs/components/EclCardBodyComponent.html +2 -2
  59. package/docs/components/EclCardComponent.html +2 -2
  60. package/docs/components/EclCarouselComponent.html +2 -2
  61. package/docs/components/EclCarouselItemComponent.html +2 -2
  62. package/docs/components/EclCategoryFilterComponent.html +2 -2
  63. package/docs/components/EclCategoryFilterItemComponent.html +2 -2
  64. package/docs/components/EclCategoryFilterListComponent.html +2 -2
  65. package/docs/components/EclCheckboxHelpComponent.html +2 -2
  66. package/docs/components/EclCheckboxLabelComponent.html +3 -3
  67. package/docs/components/EclContentBlockComponent.html +2 -2
  68. package/docs/components/EclContentItemComponent.html +2 -2
  69. package/docs/components/EclDateBlockComponent.html +2 -2
  70. package/docs/components/EclDescriptionListDefinitionComponent.html +2 -2
  71. package/docs/components/EclExpandableComponent.html +2 -2
  72. package/docs/components/EclFactFiguresComponent.html +2 -2
  73. package/docs/components/EclFactFiguresDescriptionComponent.html +2 -2
  74. package/docs/components/EclFactFiguresItemComponent.html +2 -2
  75. package/docs/components/EclFactFiguresTitleComponent.html +2 -2
  76. package/docs/components/EclFactFiguresValueComponent.html +2 -2
  77. package/docs/components/EclFactFiguresViewAllComponent.html +2 -2
  78. package/docs/components/EclFeaturedComponent.html +33 -15
  79. package/docs/components/EclFeaturedItemComponent.html +27 -3
  80. package/docs/components/EclFeaturedItemDescriptionComponent.html +2 -2
  81. package/docs/components/EclFileComponent.html +2 -2
  82. package/docs/components/EclFileItemComponent.html +2 -2
  83. package/docs/components/EclFileItemsComponent.html +2 -2
  84. package/docs/components/EclFileTaxonomyComponent.html +2 -2
  85. package/docs/components/EclFormGroupComponent.html +2 -2
  86. package/docs/components/EclFormLabelComponent.html +3 -3
  87. package/docs/components/EclGalleryComponent.html +3 -3
  88. package/docs/components/EclGalleryFooterComponent.html +2 -2
  89. package/docs/components/EclGalleryItemComponent.html +3 -3
  90. package/docs/components/EclIconComponent.html +2 -2
  91. package/docs/components/EclInpageNavigationComponent.html +2 -2
  92. package/docs/components/EclInpageNavigationItemComponent.html +2 -2
  93. package/docs/components/EclListIllustrationComponent.html +2 -2
  94. package/docs/components/EclListIllustrationItemComponent.html +2 -2
  95. package/docs/components/EclLoadingIndicatorComponent.html +2 -2
  96. package/docs/components/EclMediaContainerComponent.html +2 -2
  97. package/docs/components/EclMegaMenuComponent.html +46 -2
  98. package/docs/components/EclMegaMenuFeaturedComponent.html +2 -2
  99. package/docs/components/EclMegaMenuInfoComponent.html +2 -2
  100. package/docs/components/EclMegaMenuItemComponent.html +2 -2
  101. package/docs/components/EclMegaMenuSubitemComponent.html +2 -2
  102. package/docs/components/EclMenuComponent.html +194 -14
  103. package/docs/components/EclMenuItemComponent.html +3 -3
  104. package/docs/components/EclMenuMegaComponent.html +2 -2
  105. package/docs/components/EclMenuMegaItemComponent.html +2 -2
  106. package/docs/components/EclModalBodyComponent.html +2 -2
  107. package/docs/components/EclModalComponent.html +2 -2
  108. package/docs/components/EclModalFooterComponent.html +2 -2
  109. package/docs/components/EclModalHeaderComponent.html +2 -2
  110. package/docs/components/EclMultiselectComponent.html +2 -2
  111. package/docs/components/EclMultiselectDropdownComponent.html +2 -2
  112. package/docs/components/EclMultiselectInputComponent.html +2 -2
  113. package/docs/components/EclMultiselectOptgroupComponent.html +2 -2
  114. package/docs/components/EclMultiselectOptionComponent.html +2 -2
  115. package/docs/components/EclNavigationListComponent.html +2 -2
  116. package/docs/components/EclNavigationListItemComponent.html +2 -2
  117. package/docs/components/EclNewsTickerComponent.html +2 -2
  118. package/docs/components/EclNewsTickerItemComponent.html +2 -2
  119. package/docs/components/EclNotificationComponent.html +3 -3
  120. package/docs/components/EclPageHeaderComponent.html +2 -2
  121. package/docs/components/EclPaginationComponent.html +2 -2
  122. package/docs/components/EclPaginationItemComponent.html +2 -2
  123. package/docs/components/EclPopoverComponent.html +96 -27
  124. package/docs/components/EclRadioHelpComponent.html +2 -2
  125. package/docs/components/EclRadioLabelComponent.html +2 -2
  126. package/docs/components/EclRangeBubbleComponent.html +2 -2
  127. package/docs/components/EclRangeValueComponent.html +2 -2
  128. package/docs/components/EclRatingFieldComponent.html +2 -2
  129. package/docs/components/EclSearchFormComponent.html +3 -3
  130. package/docs/components/EclSelectContainerComponent.html +2 -2
  131. package/docs/components/EclSiteFooterComponent.html +47 -5
  132. package/docs/components/{EclSocialMediaShareComponent.html → EclSiteFooterCoreComponent.html} +31 -40
  133. package/docs/components/EclSiteFooterFixedContentEUComponent.html +2 -2
  134. package/docs/components/EclSiteFooterRowCommonComponent.html +647 -0
  135. package/docs/components/EclSiteHeaderActionComponent.html +2 -2
  136. package/docs/components/EclSiteHeaderBannerTopComponent.html +2 -2
  137. package/docs/components/EclSiteHeaderComponent.html +33 -3
  138. package/docs/components/EclSiteHeaderCustomActionComponent.html +2 -2
  139. package/docs/components/EclSiteHeaderEnvironmentComponent.html +2 -2
  140. package/docs/components/EclSiteHeaderLanguageComponent.html +3 -3
  141. package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +3 -3
  142. package/docs/components/EclSiteHeaderLoginComponent.html +3 -3
  143. package/docs/components/EclSiteHeaderNotificationComponent.html +2 -2
  144. package/docs/components/EclSiteHeaderSearchComponent.html +2 -2
  145. package/docs/components/EclSocialMediaFollowComponent.html +2 -2
  146. package/docs/components/EclSocialMediaFollowItemComponent.html +16 -3
  147. package/docs/components/EclSplashPageComponent.html +2 -2
  148. package/docs/components/EclSplashPageLanguageCategoryComponent.html +2 -2
  149. package/docs/components/EclSplashPageLanguageContainerComponent.html +2 -2
  150. package/docs/components/EclSplashPageLanguageLinkComponent.html +2 -2
  151. package/docs/components/EclStickyContainerComponent.html +2 -2
  152. package/docs/components/EclTabComponent.html +2 -2
  153. package/docs/components/EclTabLabelComponent.html +2 -2
  154. package/docs/components/EclTabMoreComponent.html +2 -2
  155. package/docs/components/EclTableSortButtonComponent.html +2 -2
  156. package/docs/components/EclTabsComponent.html +2 -2
  157. package/docs/components/EclTagComponent.html +2 -2
  158. package/docs/components/EclTimelineComponent.html +2 -2
  159. package/docs/components/EclTimelineItemComponent.html +2 -2
  160. package/docs/components/EclTimelineItemTogglerComponent.html +2 -2
  161. package/docs/directives/EclBannerDescriptionLinkDirective.html +65 -1
  162. package/docs/directives/EclBannerTitleLinkDirective.html +64 -1
  163. package/docs/directives/{EclSeparatorDirective.html → EclDividerDirective.html} +4 -4
  164. package/docs/directives/EclSiteFooterColumnDirective.html +1 -1
  165. package/docs/directives/{EclSiteFooterContentDirective.html → EclSiteFooterDescriptionNameDirective.html} +10 -18
  166. package/docs/directives/EclSiteFooterRowDirective.html +1 -1
  167. package/docs/directives/EclSiteFooterSectionDirective.html +341 -8
  168. package/docs/directives/{EclFeaturedItemFooterLinkDirective.html → EclSiteFooterSocialMediaDirective.html} +14 -14
  169. package/docs/js/menu-wc.js +45 -112
  170. package/docs/js/menu-wc_es5.js +1 -1
  171. package/docs/js/search/search_index.js +2 -2
  172. package/docs/{classes/EclSocialMediaShareItemClickEvent.html → miscellaneous/functions.html} +56 -80
  173. package/docs/miscellaneous/variables.html +100 -104
  174. package/docs/modules/{EclSeparatorModule.html → EclDividerModule.html} +6 -6
  175. package/docs/modules.html +12 -24
  176. package/docs/overview.html +4 -4
  177. package/docs/properties.html +1 -1
  178. package/fesm2022/eui-ecl-components-ecl-accordion.mjs +63 -45
  179. package/fesm2022/eui-ecl-components-ecl-accordion.mjs.map +1 -1
  180. package/fesm2022/eui-ecl-components-ecl-app.mjs +2 -2
  181. package/fesm2022/eui-ecl-components-ecl-app.mjs.map +1 -1
  182. package/fesm2022/eui-ecl-components-ecl-banner.mjs +22 -6
  183. package/fesm2022/eui-ecl-components-ecl-banner.mjs.map +1 -1
  184. package/fesm2022/eui-ecl-components-ecl-checkbox.mjs +2 -2
  185. package/fesm2022/eui-ecl-components-ecl-checkbox.mjs.map +1 -1
  186. package/fesm2022/eui-ecl-components-ecl-divider.mjs +57 -0
  187. package/fesm2022/eui-ecl-components-ecl-divider.mjs.map +1 -0
  188. package/fesm2022/eui-ecl-components-ecl-featured.mjs +21 -83
  189. package/fesm2022/eui-ecl-components-ecl-featured.mjs.map +1 -1
  190. package/fesm2022/eui-ecl-components-ecl-feedback-message.mjs +1 -0
  191. package/fesm2022/eui-ecl-components-ecl-feedback-message.mjs.map +1 -1
  192. package/fesm2022/eui-ecl-components-ecl-form-label.mjs +2 -2
  193. package/fesm2022/eui-ecl-components-ecl-form-label.mjs.map +1 -1
  194. package/fesm2022/eui-ecl-components-ecl-gallery.mjs +4 -4
  195. package/fesm2022/eui-ecl-components-ecl-gallery.mjs.map +1 -1
  196. package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs +45 -18
  197. package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs.map +1 -1
  198. package/fesm2022/eui-ecl-components-ecl-menu.mjs +57 -22
  199. package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
  200. package/fesm2022/eui-ecl-components-ecl-notification.mjs +2 -2
  201. package/fesm2022/eui-ecl-components-ecl-notification.mjs.map +1 -1
  202. package/fesm2022/eui-ecl-components-ecl-popover.mjs +169 -98
  203. package/fesm2022/eui-ecl-components-ecl-popover.mjs.map +1 -1
  204. package/fesm2022/eui-ecl-components-ecl-search-form.mjs +2 -2
  205. package/fesm2022/eui-ecl-components-ecl-search-form.mjs.map +1 -1
  206. package/fesm2022/eui-ecl-components-ecl-site-footer.mjs +251 -161
  207. package/fesm2022/eui-ecl-components-ecl-site-footer.mjs.map +1 -1
  208. package/fesm2022/eui-ecl-components-ecl-site-header.mjs +43 -43
  209. package/fesm2022/eui-ecl-components-ecl-site-header.mjs.map +1 -1
  210. package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs +7 -3
  211. package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs.map +1 -1
  212. package/fesm2022/eui-ecl-core.mjs +153 -139
  213. package/fesm2022/eui-ecl-core.mjs.map +1 -1
  214. package/fesm2022/eui-ecl.mjs +46 -49
  215. package/fesm2022/eui-ecl.mjs.map +1 -1
  216. package/index.d.ts +44 -45
  217. package/index.d.ts.map +1 -1
  218. package/package.json +43 -47
  219. package/components/ecl-separator/index.d.ts +0 -31
  220. package/components/ecl-separator/index.d.ts.map +0 -1
  221. package/components/ecl-separator/package.json +0 -3
  222. package/components/ecl-social-media-share/index.d.ts +0 -54
  223. package/components/ecl-social-media-share/index.d.ts.map +0 -1
  224. package/components/ecl-social-media-share/package.json +0 -3
  225. package/docs/components/EclFeaturedItemFooterComponent.html +0 -560
  226. package/docs/components/EclSiteFooterFixedContentECComponent.html +0 -591
  227. package/docs/components/EclSocialMediaShareItemComponent.html +0 -829
  228. package/docs/directives/EclFeaturedItemFooterPictureDirective.html +0 -502
  229. package/docs/directives/EclSocialMediaShareLinkDirective.html +0 -553
  230. package/docs/modules/EclSocialMediaShareModule.html +0 -321
  231. package/fesm2022/eui-ecl-components-ecl-separator.mjs +0 -57
  232. package/fesm2022/eui-ecl-components-ecl-separator.mjs.map +0 -1
  233. package/fesm2022/eui-ecl-components-ecl-social-media-share.mjs +0 -136
  234. package/fesm2022/eui-ecl-components-ecl-social-media-share.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-notification.mjs","sources":["../../components/ecl-notification/events/ecl-notification-close.event.ts","../../components/ecl-notification/ecl-notification.component.ts","../../components/ecl-notification/ecl-notification.component.html","../../components/ecl-notification/ecl-notification-title.directive.ts","../../components/ecl-notification/ecl-notification.module.ts","../../components/ecl-notification/index.ts","../../components/ecl-notification/eui-ecl-components-ecl-notification.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\n\n/**\n * Event emitted when the notification is closed.\n *\n * Can be used to prevent default close behavior by calling `event.preventDefault()`.\n */\nexport class EclNotificationCloseEvent extends EclBaseEvent {\n}\n","import { Component, Input, Output, EventEmitter, HostBinding, booleanAttribute, inject } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclThemeService } from '@eui/ecl/core';\nimport { EclNotificationCloseEvent } from './events/ecl-notification-close.event';\nimport { AsyncPipe, TitleCasePipe } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n@Component({\n selector: 'ecl-notification',\n templateUrl: './ecl-notification.component.html',\n imports: [\n AsyncPipe,\n TitleCasePipe,\n ...EUI_ECL_ICON,\n ...EUI_ECL_BUTTON,\n TranslateModule,\n ],\n})\nexport class EclNotificationComponent extends ECLBaseDirective {\n eclThemeService = inject(EclThemeService);\n\n /**\n * The title of the notification. This is displayed inside the component.\n */\n @Input() notificationTitle: string;\n\n /**\n * Defines the visual style of the notification.\n * Can be one of: 'info' | 'success' | 'warning' | 'error'.\n * Default is 'info'.\n */\n @Input() variant: 'info' | 'success' | 'warning' | 'error' = 'info';\n\n /**\n * Controls the visibility of the notification.\n * When false, the component is hidden using CSS utility class.\n */\n @Input({ transform: booleanAttribute }) isVisible = true;\n\n /**\n * Indicates whether the close button is displayed.\n */\n @Input({ transform: booleanAttribute }) isCloseable = true;\n\n /**\n * Emits an event when the close button is clicked.\n * Consumers can call `preventDefault()` on the emitted event to prevent the notification from closing.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() close = new EventEmitter<EclNotificationCloseEvent>();\n\n /**\n * The ARIA role for the component. Set to \"alert\" by default.\n */\n @HostBinding('attr.role')\n role = 'alert';\n\n private variantTitleIconMapping = new Map<string, { title: string, icon: string }>([\n ['info', { title: 'information', icon: 'information' }],\n ['success', { title: 'success', icon: 'check-filled' }],\n ['warning', { title: 'warning', icon: 'warning' }],\n ['error', { title: 'error', icon: 'error' }],\n ]);\n\n /**\n * Applies the `ecl-u-d-none` utility class when the notification is not visible.\n */\n @HostBinding('class.ecl-u-d-none')\n get isHidden(): boolean {\n return !this.isVisible;\n }\n\n /**\n * Computes the CSS classes applied to the host element, including the modifier for the current variant.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-notification'), this.variant ? `ecl-notification--${this.variant}` : ''].join(' ').trim();\n }\n\n /**\n * Returns the default title text based on the current variant.\n */\n get title(): string {\n return this.titleAndIconBaseOnVariant.title;\n }\n\n /**\n * Returns the icon name based on the current variant.\n */\n get icon(): string {\n return this.titleAndIconBaseOnVariant.icon;\n }\n\n /**\n * Returns a mapping of title and icon based on the current variant.\n */\n get titleAndIconBaseOnVariant(): { title: string, icon: string } {\n return this.variantTitleIconMapping.get(this.variant) || { title: 'information', icon: 'information' };\n }\n\n /**\n * Handles the click event on the close button.\n * Emits a `close` event with an instance of `EclNotificationCloseEvent`.\n * If the event is not prevented, the notification is hidden.\n */\n onCloseClick(evt: Event): void {\n const event = new EclNotificationCloseEvent();\n this.close.next(event);\n if (!event.defaultPrevented) {\n this.isVisible = false;\n }\n }\n}\n","@if( eclThemeService.isEC$ | async ){\n <ecl-icon size=\"l\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n} @else {\n <ecl-icon size=\"m\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n}\n\n<div class=\"ecl-notification__content\">\n @if(isCloseable){\n <button eclButton variant=\"tertiary\" class=\"ecl-notification__close\" isIconOnly (click)=\"onCloseClick($event)\">\n <span eclButtonLabel>\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n }\n\n <ng-content select=\"[eclNotificationTitle]\"></ng-content>\n <div class=\"ecl-notification__description\"><ng-content></ng-content></div>\n</div>\n","import { Directive, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive applied to a notification title element.\n * Adds the appropriate ECL class for styling the notification title.\n */\n@Directive({\n selector: '[eclNotificationTitle]',\n})\nexport class EclNotificationTitleDirective extends ECLBaseDirective {\n /**\n * Host binding for applying the ECL notification title CSS class.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-notification__title')].join(' ').trim();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { EclNotificationComponent } from './ecl-notification.component';\nimport { EclNotificationTitleDirective } from './ecl-notification-title.directive';\n\n/**\n * @description\n * Module that provides the EclNotification component and its dependencies.\n *\n * @deprecated Use {@link EUI_ECL_NOTIFICATION} instead.\n */\n@NgModule({\n imports: [EclNotificationComponent, EclNotificationTitleDirective],\n exports: [EclNotificationComponent, EclNotificationTitleDirective],\n})\nexport class EclNotificationModule {}\n","import { EclNotificationComponent } from './ecl-notification.component';\nimport { EclNotificationTitleDirective } from './ecl-notification-title.directive';\n\nexport * from './ecl-notification.module';\nexport * from './ecl-notification.component';\nexport * from './ecl-notification-title.directive';\nexport * from './events/ecl-notification-close.event';\n\nexport const EUI_ECL_NOTIFICATION = [\n EclNotificationComponent,\n EclNotificationTitleDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEA;;;;AAIG;AACG,MAAO,yBAA0B,SAAQ,YAAY,CAAA;AAC1D;;ACYK,MAAO,wBAAyB,SAAQ,gBAAgB,CAAA;AAX9D,IAAA,WAAA,GAAA;;AAYI,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AAOzC;;;;AAIG;QACM,IAAA,CAAA,OAAO,GAA6C,MAAM;AAEnE;;;AAGG;QACqC,IAAA,CAAA,SAAS,GAAG,IAAI;AAExD;;AAEG;QACqC,IAAA,CAAA,WAAW,GAAG,IAAI;AAE1D;;;AAGG;;AAEO,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,EAA6B;AAE/D;;AAEG;QAEH,IAAA,CAAA,IAAI,GAAG,OAAO;QAEN,IAAA,CAAA,uBAAuB,GAAG,IAAI,GAAG,CAA0C;YAC/E,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;YACvD,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;YACvD,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;YAClD,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC/C,SAAA,CAAC;AAmDL,IAAA;AAjDG;;AAEG;AACH,IAAA,IACI,QAAQ,GAAA;AACR,QAAA,OAAO,CAAC,IAAI,CAAC,SAAS;IAC1B;AAEA;;AAEG;AACH,IAAA,IACI,UAAU,GAAA;AACV,QAAA,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAC,OAAO,GAAG,CAAA,kBA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KG;MAKU,qBAAqB,CAAA;qHAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAHtB,wBAAwB,EAAE,6BAA6B,CAAA,EAAA,OAAA,EAAA,CACvD,wBAAwB,EAAE,6BAA6B,CAAA,EAAA,CAAA,CAAA;AAEtD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAHtB,wBAAwB,CAAA,EAAA,CAAA,CAAA;;kGAGvB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,6BAA6B,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,6BAA6B,CAAC;AACnE,iBAAA;;;ACLM,MAAM,oBAAoB,GAAG;IAClC,wBAAwB;IACxB,6BAA6B;;;ACV/B;;AAEG;;;;"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-notification.mjs","sources":["../../components/ecl-notification/events/ecl-notification-close.event.ts","../../components/ecl-notification/ecl-notification.component.ts","../../components/ecl-notification/ecl-notification.component.html","../../components/ecl-notification/ecl-notification-title.directive.ts","../../components/ecl-notification/ecl-notification.module.ts","../../components/ecl-notification/index.ts","../../components/ecl-notification/eui-ecl-components-ecl-notification.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\n\n/**\n * Event emitted when the notification is closed.\n *\n * Can be used to prevent default close behavior by calling `event.preventDefault()`.\n */\nexport class EclNotificationCloseEvent extends EclBaseEvent {\n}\n","import { Component, Input, Output, EventEmitter, HostBinding, booleanAttribute, inject } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclThemeService } from '@eui/ecl/core';\nimport { EclNotificationCloseEvent } from './events/ecl-notification-close.event';\nimport { AsyncPipe, TitleCasePipe } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n@Component({\n selector: 'ecl-notification',\n templateUrl: './ecl-notification.component.html',\n imports: [\n AsyncPipe,\n TitleCasePipe,\n ...EUI_ECL_ICON,\n ...EUI_ECL_BUTTON,\n TranslateModule,\n ],\n})\nexport class EclNotificationComponent extends ECLBaseDirective {\n eclThemeService = inject(EclThemeService);\n\n /**\n * The title of the notification. This is displayed inside the component.\n */\n @Input() notificationTitle: string;\n\n /**\n * Defines the visual style of the notification.\n * Can be one of: 'info' | 'success' | 'warning' | 'error'.\n * Default is 'info'.\n */\n @Input() variant: 'info' | 'success' | 'warning' | 'error' = 'info';\n\n /**\n * Controls the visibility of the notification.\n * When false, the component is hidden using CSS utility class.\n */\n @Input({ transform: booleanAttribute }) isVisible = true;\n\n /**\n * Indicates whether the close button is displayed.\n */\n @Input({ transform: booleanAttribute }) isCloseable = true;\n\n /**\n * Emits an event when the close button is clicked.\n * Consumers can call `preventDefault()` on the emitted event to prevent the notification from closing.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() close = new EventEmitter<EclNotificationCloseEvent>();\n\n /**\n * The ARIA role for the component. Set to \"alert\" by default.\n */\n @HostBinding('attr.role')\n role = 'alert';\n\n private variantTitleIconMapping = new Map<string, { title: string, icon: string }>([\n ['info', { title: 'information', icon: 'information' }],\n ['success', { title: 'success', icon: 'check-filled' }],\n ['warning', { title: 'warning', icon: 'warning' }],\n ['error', { title: 'error', icon: 'error' }],\n ]);\n\n /**\n * Applies the `ecl-u-d-none` utility class when the notification is not visible.\n */\n @HostBinding('class.ecl-u-d-none')\n get isHidden(): boolean {\n return !this.isVisible;\n }\n\n /**\n * Computes the CSS classes applied to the host element, including the modifier for the current variant.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-notification'), this.variant ? `ecl-notification--${this.variant}` : ''].join(' ').trim();\n }\n\n /**\n * Returns the default title text based on the current variant.\n */\n get title(): string {\n return this.titleAndIconBaseOnVariant.title;\n }\n\n /**\n * Returns the icon name based on the current variant.\n */\n get icon(): string {\n return this.titleAndIconBaseOnVariant.icon;\n }\n\n /**\n * Returns a mapping of title and icon based on the current variant.\n */\n get titleAndIconBaseOnVariant(): { title: string, icon: string } {\n return this.variantTitleIconMapping.get(this.variant) || { title: 'information', icon: 'information' };\n }\n\n /**\n * Handles the click event on the close button.\n * Emits a `close` event with an instance of `EclNotificationCloseEvent`.\n * If the event is not prevented, the notification is hidden.\n */\n onCloseClick(evt: Event): void {\n const event = new EclNotificationCloseEvent();\n this.close.next(event);\n if (!event.defaultPrevented) {\n this.isVisible = false;\n }\n }\n}\n","@if( eclThemeService.isEC$ | async ){\n <ecl-icon size=\"l\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n} @else {\n <ecl-icon size=\"m\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n}\n\n<div class=\"ecl-notification__content\">\n @if(isCloseable){\n <button eclButton variant=\"tertiary\" class=\"ecl-notification__close ecl-button--neutral\" isIconOnly (click)=\"onCloseClick($event)\">\n <span eclButtonLabel>\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n }\n\n <ng-content select=\"[eclNotificationTitle]\"></ng-content>\n <div class=\"ecl-notification__description\"><ng-content></ng-content></div>\n</div>\n","import { Directive, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive applied to a notification title element.\n * Adds the appropriate ECL class for styling the notification title.\n */\n@Directive({\n selector: '[eclNotificationTitle]',\n})\nexport class EclNotificationTitleDirective extends ECLBaseDirective {\n /**\n * Host binding for applying the ECL notification title CSS class.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-notification__title')].join(' ').trim();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { EclNotificationComponent } from './ecl-notification.component';\nimport { EclNotificationTitleDirective } from './ecl-notification-title.directive';\n\n/**\n * @description\n * Module that provides the EclNotification component and its dependencies.\n *\n * @deprecated Use {@link EUI_ECL_NOTIFICATION} instead.\n */\n@NgModule({\n imports: [EclNotificationComponent, EclNotificationTitleDirective],\n exports: [EclNotificationComponent, EclNotificationTitleDirective],\n})\nexport class EclNotificationModule {}\n","import { EclNotificationComponent } from './ecl-notification.component';\nimport { EclNotificationTitleDirective } from './ecl-notification-title.directive';\n\nexport * from './ecl-notification.module';\nexport * from './ecl-notification.component';\nexport * from './ecl-notification-title.directive';\nexport * from './events/ecl-notification-close.event';\n\nexport const EUI_ECL_NOTIFICATION = [\n EclNotificationComponent,\n EclNotificationTitleDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEA;;;;AAIG;AACG,MAAO,yBAA0B,SAAQ,YAAY,CAAA;AAC1D;;ACYK,MAAO,wBAAyB,SAAQ,gBAAgB,CAAA;AAX9D,IAAA,WAAA,GAAA;;AAYI,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AAOzC;;;;AAIG;QACM,IAAA,CAAA,OAAO,GAA6C,MAAM;AAEnE;;;AAGG;QACqC,IAAA,CAAA,SAAS,GAAG,IAAI;AAExD;;AAEG;QACqC,IAAA,CAAA,WAAW,GAAG,IAAI;AAE1D;;;AAGG;;AA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A,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAHtB,wBAAwB,CAAA,EAAA,CAAA,CAAA;;kGAGvB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,6BAA6B,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,6BAA6B,CAAC;AACnE,iBAAA;;;ACLM,MAAM,oBAAoB,GAAG;IAClC,wBAAwB;IACxB,6BAA6B;;;ACV/B;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, EventEmitter, HostListener, HostBinding, Output, Directive, Renderer2, ContentChild, ViewChild, Component, NgModule } from '@angular/core';
2
+ import { inject, ElementRef, EventEmitter, HostListener, HostBinding, Output, Directive, output, Renderer2, ContentChild, ViewChild, Component, NgModule } from '@angular/core';
3
3
  import { Subject, takeUntil } from 'rxjs';
4
4
  import * as i1 from '@eui/ecl/core';
5
5
  import { ECLBaseDirective, ECLClickOutsideDirective } from '@eui/ecl/core';
@@ -80,6 +80,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.5",
80
80
  class EclPopoverComponent extends ECLBaseDirective {
81
81
  constructor() {
82
82
  super(...arguments);
83
+ this.onOpen = output();
84
+ this.onClose = output();
83
85
  /**
84
86
  * Controls visibility of the popover. `true` means hidden.
85
87
  */
@@ -93,6 +95,8 @@ class EclPopoverComponent extends ECLBaseDirective {
93
95
  this.pushBottomClass = 'ecl-popover--push-bottom';
94
96
  this.pushLeftClass = 'ecl-popover--push-left';
95
97
  this.pushRightClass = 'ecl-popover--push-right';
98
+ this.toggleRect = null;
99
+ this.scrollableParent = null;
96
100
  this.el = inject(ElementRef);
97
101
  this.renderer = inject(Renderer2);
98
102
  }
@@ -108,9 +112,15 @@ class EclPopoverComponent extends ECLBaseDirective {
108
112
  */
109
113
  ngAfterContentInit() {
110
114
  this.eclPopoverToggle?.click.pipe(takeUntil(this.destroy$)).subscribe(() => {
111
- this.isHidden = !this.isHidden;
115
+ if (this.isHidden) {
116
+ this.doOpen();
117
+ }
118
+ else {
119
+ this.doClose();
120
+ }
112
121
  this.checkPosition(); // TODO: wrap on a platformBrowser check as it calls window and document
113
122
  });
123
+ this.scrollableParent = this.getClosestScrollableParent(this.eclPopoverToggle.hostElementRef.nativeElement);
114
124
  }
115
125
  /**
116
126
  * Lifecycle hook that cleans up subscriptions on destroy.
@@ -132,14 +142,14 @@ class EclPopoverComponent extends ECLBaseDirective {
132
142
  */
133
143
  onClickOutsidePopover() {
134
144
  if (!this.isHidden) {
135
- this.onClose();
145
+ this.doClose();
136
146
  }
137
147
  }
138
148
  /**
139
149
  * Closes the popover when the Escape key is pressed.
140
150
  */
141
151
  onEscapeKeydownHandler() {
142
- this.isHidden = true;
152
+ this.doClose();
143
153
  }
144
154
  /**
145
155
  * Recalculates popover position when the window is resized.
@@ -154,11 +164,70 @@ class EclPopoverComponent extends ECLBaseDirective {
154
164
  this.checkPosition();
155
165
  }
156
166
  /**
157
- * Public method used to close the popover and reset related styles.
167
+ * Protected method used to close the popover and reset related styles.
158
168
  */
159
- onClose() {
169
+ doClose() {
160
170
  this.isHidden = true;
161
- this.resetStyless();
171
+ this.resetStyles();
172
+ this.onClose.emit();
173
+ }
174
+ doOpen() {
175
+ this.isHidden = false;
176
+ this.onOpen.emit();
177
+ }
178
+ getClosestScrollableParent(element) {
179
+ let parent = element.parentElement;
180
+ while (parent) {
181
+ const { overflowY, overflowX } = getComputedStyle(parent);
182
+ const isScrollableY = (overflowY === 'auto' || overflowY === 'scroll') &&
183
+ parent.scrollHeight > parent.clientHeight;
184
+ const isScrollableX = (overflowX === 'auto' || overflowX === 'scroll') &&
185
+ parent.scrollWidth > parent.clientWidth;
186
+ if (isScrollableY || isScrollableX) {
187
+ return parent; // Found the closest scrollable parent
188
+ }
189
+ parent = parent.parentElement;
190
+ }
191
+ return document.body;
192
+ }
193
+ calculateAvailableSpace(toggleElement, scrollableParent = null) {
194
+ // Get the bounding rect for the toggle element
195
+ this.toggleRect = toggleElement.getBoundingClientRect();
196
+ // If no scrollable parent is provided, use the viewport
197
+ const containerRect = scrollableParent
198
+ ? scrollableParent.getBoundingClientRect()
199
+ : {
200
+ top: 0,
201
+ left: 0,
202
+ right: window.innerWidth,
203
+ bottom: window.innerHeight,
204
+ };
205
+ const containerWidth = containerRect.right - containerRect.left;
206
+ const containerHeight = containerRect.bottom - containerRect.top;
207
+ // Calculate the space available in the four directions
208
+ const containerBottom = Math.max(0, window.innerHeight - containerRect.bottom);
209
+ const toggleBottom = Math.max(0, window.innerHeight - this.toggleRect.bottom);
210
+ const spaceBottom = Math.max(0, toggleBottom - containerBottom);
211
+ // Top Space (from toggle's top to container's top)
212
+ const containerTop = Math.max(0, containerRect.top);
213
+ const toggleTop = Math.max(0, this.toggleRect.top);
214
+ const spaceTop = Math.max(0, toggleTop - containerTop);
215
+ // Right Space (from toggle's right to container's right)
216
+ const containerRight = Math.max(0, window.innerWidth - containerRect.right);
217
+ const toggleRight = Math.max(0, window.innerWidth - this.toggleRect.right);
218
+ const spaceRight = Math.max(0, toggleRight - containerRight);
219
+ // Left Space (from toggle's left to container's left)
220
+ const containerLeft = Math.max(0, containerRect.left);
221
+ const toggleLeft = Math.max(0, this.toggleRect.left);
222
+ const spaceLeft = Math.max(0, toggleLeft - containerLeft);
223
+ return {
224
+ containerWidth,
225
+ containerHeight,
226
+ spaceTop,
227
+ spaceBottom,
228
+ spaceLeft,
229
+ spaceRight,
230
+ };
162
231
  }
163
232
  checkPosition() {
164
233
  setTimeout(() => {
@@ -168,69 +237,58 @@ class EclPopoverComponent extends ECLBaseDirective {
168
237
  });
169
238
  }
170
239
  positionPopover() {
171
- this.resetStyless();
172
- const toggleElement = this.eclPopoverToggle.getHostElement();
173
- const toggleRect = toggleElement.getBoundingClientRect();
174
- const screenHeight = window.innerHeight;
175
- const screenWidth = window.innerWidth;
176
- // Calculate available space in each direction
177
- const spaceTop = toggleRect.top;
178
- const spaceBottom = screenHeight - toggleRect.bottom;
179
- const spaceLeft = toggleRect.left;
180
- const spaceRight = screenWidth - toggleRect.right;
240
+ this.resetStyles();
241
+ const { containerWidth, spaceTop, spaceBottom, spaceLeft, spaceRight } = this.calculateAvailableSpace(this.eclPopoverToggle.getHostElement(), this.scrollableParent);
181
242
  // Find the direction with the most available space
182
- if ((spaceTop > spaceBottom) && (spaceTop > spaceLeft) && (spaceTop > spaceRight)) {
183
- this.renderer.addClass(this.el.nativeElement, this.topClass);
243
+ const positioningClass = 'ecl-popover--';
244
+ let direction = '';
245
+ if (spaceTop > spaceBottom &&
246
+ spaceTop > spaceLeft &&
247
+ spaceTop > spaceRight) {
248
+ direction = 'top';
184
249
  }
185
- else if ((spaceBottom > spaceLeft) && (spaceBottom > spaceRight)) {
186
- this.renderer.addClass(this.el.nativeElement, this.bottomClass);
250
+ else if (spaceBottom > spaceLeft && spaceBottom > spaceRight) {
251
+ direction = 'bottom';
187
252
  }
188
253
  else if (spaceLeft > spaceRight) {
189
- this.isLeft = true;
190
- this.renderer.addClass(this.el.nativeElement, this.leftClass);
254
+ direction = 'left';
191
255
  }
192
256
  else {
193
- this.isRight = true;
194
- this.renderer.addClass(this.el.nativeElement, this.rightClass);
257
+ direction = 'right';
195
258
  }
196
- this.handleScrollableWidth(spaceLeft, spaceRight, screenWidth);
197
- this.handlePushClass(screenWidth, screenHeight);
198
- }
199
- handleScrollableWidth(spaceLeft, spaceRight, screenWidth) {
259
+ this.renderer.addClass(this.el.nativeElement, `${positioningClass}${direction}`);
200
260
  // Try to use as much of the available width, respecting the max-width set.
201
- const scrollable = this.eclPopoverScrollableElement.nativeElement;
202
- const styles = getComputedStyle(scrollable);
261
+ const styles = window.getComputedStyle(this.eclPopoverScrollableElement.nativeElement);
203
262
  const maxWidth = parseInt(styles.getPropertyValue('max-width'), 10);
204
263
  const minWidth = parseInt(styles.getPropertyValue('min-width'), 10);
205
264
  const padding = parseInt(styles.getPropertyValue('padding-left'), 10) * 2;
206
- const toggleElement = this.eclPopoverToggle.getHostElement();
207
- const toggleRect = toggleElement.getBoundingClientRect();
208
- let availableSpace = 0;
209
- if (this.isLeft || this.isRight) {
210
- availableSpace = (this.isLeft ? spaceLeft : spaceRight) * 0.9;
211
- }
212
- else {
213
- const centerPosition = (toggleRect.right - toggleRect.left) / 2;
214
- availableSpace = (screenWidth - centerPosition + this.eclPopoverContainerElement.nativeElement.offsetWidth / 2) * 0.9;
265
+ // We consider 90% of the biggest space available
266
+ const horizontalSpace = Math.max(spaceLeft, spaceRight) * 0.9;
267
+ let targetWidth;
268
+ // If the available space is larger than maxWidth (plus padding), set to maxWidth
269
+ if (maxWidth + padding < horizontalSpace ||
270
+ (direction !== 'left' &&
271
+ direction !== 'right' &&
272
+ containerWidth > maxWidth)) {
273
+ targetWidth = maxWidth;
215
274
  }
216
- if (maxWidth + padding < availableSpace) {
217
- this.renderer.setStyle(scrollable, 'width', `${maxWidth}px`);
275
+ // If the available space is smaller than minWidth (plus padding), set to minWidth
276
+ else if (horizontalSpace < minWidth + padding) {
277
+ targetWidth = minWidth;
218
278
  }
219
- else if (availableSpace < minWidth + padding) {
220
- this.renderer.setStyle(scrollable, 'width', `${minWidth}px`);
279
+ // Otherwise, set the width to the available space minus the padding
280
+ else if (direction === 'left' || direction === 'right') {
281
+ targetWidth = horizontalSpace - padding;
221
282
  }
222
283
  else {
223
- this.renderer.setStyle(scrollable, 'width', `${availableSpace - padding}px`);
284
+ targetWidth = (horizontalSpace - padding) * 2;
224
285
  }
286
+ // Ensure the width does not exceed available space
287
+ this.renderer.setStyle(this.eclPopoverScrollableElement.nativeElement, 'width', `${targetWidth}px`);
288
+ this.handlePushClass(direction);
225
289
  }
226
- resetStyless() {
290
+ resetStyles() {
227
291
  const popoverContainer = this.eclPopoverContainerElement.nativeElement;
228
- this.isPushLeft = false;
229
- this.isPushRight = false;
230
- this.isPushTop = false;
231
- this.isPushBottom = false;
232
- this.isLeft = false;
233
- this.isRight = false;
234
292
  this.popoverPosition = null;
235
293
  this.renderer.removeClass(this.el.nativeElement, this.topClass);
236
294
  this.renderer.removeClass(this.el.nativeElement, this.bottomClass);
@@ -240,6 +298,7 @@ class EclPopoverComponent extends ECLBaseDirective {
240
298
  this.renderer.removeClass(this.el.nativeElement, this.pushBottomClass);
241
299
  this.renderer.removeClass(this.el.nativeElement, this.pushLeftClass);
242
300
  this.renderer.removeClass(this.el.nativeElement, this.pushRightClass);
301
+ this.renderer.removeStyle(popoverContainer, '--ecl-popover-position');
243
302
  this.renderer.removeStyle(popoverContainer, 'top');
244
303
  this.renderer.removeStyle(popoverContainer, 'right');
245
304
  this.renderer.removeStyle(popoverContainer, 'left');
@@ -247,64 +306,76 @@ class EclPopoverComponent extends ECLBaseDirective {
247
306
  this.renderer.removeStyle(popoverContainer, 'transform');
248
307
  this.renderer.removeStyle(this.eclPopoverScrollableElement.nativeElement, 'width');
249
308
  }
250
- handlePushClass(screenWidth, screenHeight) {
251
- const toggleElement = this.eclPopoverToggle.getHostElement();
252
- const toggleRect = toggleElement.getBoundingClientRect();
253
- const popoverRect = this.eclPopoverContainerElement.nativeElement.getBoundingClientRect();
254
- const popoverContainer = this.eclPopoverContainerElement.nativeElement;
255
- if (this.isLeft || this.isRight) {
256
- if (popoverRect.top < 0) {
257
- this.renderer.addClass(this.el.nativeElement, this.pushTopClass);
258
- this.renderer.setStyle(popoverContainer, 'top', `-${Math.round(toggleRect.top)}px`);
259
- this.isPushTop = true;
260
- }
261
- else if (popoverRect.bottom > screenHeight) {
262
- this.renderer.addClass(this.el.nativeElement, this.pushBottomClass);
263
- this.renderer.setStyle(popoverContainer, 'bottom', `-${Math.round(screenHeight - (toggleRect.bottom + 8))}px`);
264
- this.isPushBottom = true;
265
- }
266
- }
267
- else {
268
- if (popoverRect.left < 0) {
269
- this.renderer.addClass(this.el.nativeElement, this.pushLeftClass);
270
- this.renderer.setStyle(popoverContainer, 'left', `-${toggleRect.left}px`);
271
- this.renderer.setStyle(popoverContainer, 'right', 'auto');
272
- this.renderer.setStyle(popoverContainer, 'transform', 'none');
273
- this.isPushLeft = true;
309
+ /**
310
+ * Check whether the popover is going out of its scrollable container and apply the needed repositioning.
311
+ *
312
+ * @param {string} direction
313
+ */
314
+ handlePushClass(direction) {
315
+ requestAnimationFrame(() => {
316
+ const popoverRect = this.eclPopoverContainerElement.nativeElement.getBoundingClientRect();
317
+ const scrollableRect = this.scrollableParent.getBoundingClientRect();
318
+ const containerBottom = scrollableRect.bottom > window.innerHeight ? 0 : window.innerHeight - scrollableRect.bottom;
319
+ const containerTop = scrollableRect.top > window.innerHeight ? 0 : scrollableRect.top;
320
+ const leftOverflow = scrollableRect.left > popoverRect.left;
321
+ const rightOverflow = scrollableRect.right < popoverRect.right;
322
+ const topOverflow = popoverRect.top < containerTop;
323
+ const bottomOverflow = containerBottom > window.innerHeight - popoverRect.bottom;
324
+ if (direction === 'left' || direction === 'right') {
325
+ if (topOverflow) {
326
+ this.renderer.addClass(this.el.nativeElement, this.pushTopClass);
327
+ // Push the popover to the top edge of the container
328
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'top', `-${Math.round(this.toggleRect.top)}px`);
329
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'bottom', '');
330
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'transform', '');
331
+ }
332
+ if (bottomOverflow) {
333
+ this.renderer.addClass(this.el.nativeElement, this.pushBottomClass);
334
+ // Push the popover to the bottom edge of the container
335
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'bottom', `-${window.innerHeight - this.toggleRect.bottom - containerBottom}px`);
336
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'top', '');
337
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'transform', '');
338
+ }
274
339
  }
275
- if (popoverRect.right > screenWidth) {
276
- this.renderer.addClass(this.el.nativeElement, this.pushRightClass);
277
- this.renderer.setStyle(popoverContainer, 'left', `-${screenWidth - toggleRect.right}px`);
278
- this.renderer.setStyle(popoverContainer, 'right', 'auto');
279
- this.renderer.setStyle(popoverContainer, 'transform', 'none');
280
- this.isPushRight = true;
340
+ else {
341
+ if (leftOverflow) {
342
+ this.renderer.addClass(this.el.nativeElement, this.pushLeftClass);
343
+ // Push the popover 8px to the left edge of the container
344
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'left', `-${this.toggleRect.left - scrollableRect.left - 8}px`);
345
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'right', 'auto');
346
+ }
347
+ if (rightOverflow) {
348
+ this.renderer.addClass(this.el.nativeElement, this.pushRightClass);
349
+ // Push the popover 8px to the right edge of the container
350
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'right', `-${scrollableRect.right - this.toggleRect.right - 8}px`);
351
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, 'left', 'auto');
352
+ }
281
353
  }
282
- }
283
- this.handleArrowPosition();
354
+ this.handleArrowPosition(direction);
355
+ });
284
356
  }
285
- handleArrowPosition() {
286
- const toggleElement = this.eclPopoverToggle.getHostElement();
287
- const toggleRect = toggleElement.getBoundingClientRect();
357
+ handleArrowPosition(direction) {
288
358
  const popoverRect = this.eclPopoverContainerElement.nativeElement.getBoundingClientRect();
289
- if (this.isLeft || this.isRight) {
290
- if (this.isPushBottom) {
291
- this.popoverPosition = `${Math.round(toggleRect.top - popoverRect.top + toggleRect.height / 2)}px`;
359
+ if (direction === 'left' || direction === 'right') {
360
+ if (this.el.nativeElement.classList.contains(this.pushBottomClass)) {
361
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, '--ecl-popover-position', `${Math.round(this.toggleRect.top - popoverRect.top + this.toggleRect.height / 2)}px`);
292
362
  }
293
- else if (this.isPushTop) {
294
- this.popoverPosition = `${Math.round(popoverRect.top + toggleRect.top + toggleRect.height / 2)}px`;
363
+ else if (this.el.nativeElement.classList.contains(this.pushTopClass)) {
364
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, '--ecl-popover-position', `${Math.round(popoverRect.top + this.toggleRect.top + this.toggleRect.height / 2)}px`);
295
365
  }
296
366
  }
297
367
  else {
298
- if (this.isPushRight) {
299
- this.popoverPosition = `${Math.round(popoverRect.right - (toggleRect.right - toggleRect.width / 2))}px`;
368
+ // eslint-disable-next-line no-lonely-if
369
+ if (this.el.nativeElement.classList.contains(this.pushRightClass)) {
370
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, '--ecl-popover-position', `${Math.round(popoverRect.right - (this.toggleRect.right - this.toggleRect.width / 2))}px`);
300
371
  }
301
- else if (this.isPushLeft) {
302
- this.popoverPosition = `${Math.round(popoverRect.left + toggleRect.left + toggleRect.width / 2)}px`;
372
+ else if (this.el.nativeElement.classList.contains(this.pushLeftClass)) {
373
+ this.renderer.setStyle(this.eclPopoverContainerElement.nativeElement, '--ecl-popover-position', `${Math.round(this.toggleRect.left - popoverRect.left + this.toggleRect.width / 2)}px`);
303
374
  }
304
375
  }
305
376
  }
306
377
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: EclPopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
307
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.5", type: EclPopoverComponent, isStandalone: true, selector: "ecl-popover", host: { listeners: { "eclClickOutside": "onClickOutsidePopover()", "document:keydown.escape": "onEscapeKeydownHandler()", "window:resize": "onWindowResize()", "document:scroll": "onDocumentScroll()" }, properties: { "class": "this.cssClasses" } }, queries: [{ propertyName: "eclPopoverToggle", first: true, predicate: EclPopoverToggleDirective, descendants: true }], viewQueries: [{ propertyName: "eclPopoverContainerElement", first: true, predicate: ["container"], descendants: true }, { propertyName: "eclPopoverScrollableElement", first: true, predicate: ["scrollable"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.ECLClickOutsideDirective, outputs: ["eclClickOutside", "eclClickOutside"] }], ngImport: i0, template: "<ng-content select=\"[eclPopoverToggle]\"></ng-content>\n\n<div #container class=\"ecl-popover__container\" [style.--ecl-popover-position]=\"popoverPosition\" [hidden]=\"isHidden\" [attr.id]=\"popoverToggleAriaControls\">\n <div #scrollable class=\"ecl-popover__scrollable\">\n <button eclButton variant=\"tertiary\" (click)=\"onClose()\" class=\"ecl-popover__close\" isIconOnly>\n <span eclButtonLabel>Close</span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n <ng-content select=\"[eclPopoverContent]\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "containerStyleClass"] }, { kind: "directive", type: i2.EclButtonLabelDirective, selector: "[eclButtonLabel]" }, { kind: "component", type: i3.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }] }); }
378
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.5", type: EclPopoverComponent, isStandalone: true, selector: "ecl-popover", outputs: { onOpen: "onOpen", onClose: "onClose" }, host: { listeners: { "eclClickOutside": "onClickOutsidePopover()", "document:keydown.escape": "onEscapeKeydownHandler()", "window:resize": "onWindowResize()", "document:scroll": "onDocumentScroll()" }, properties: { "class": "this.cssClasses" } }, queries: [{ propertyName: "eclPopoverToggle", first: true, predicate: EclPopoverToggleDirective, descendants: true }], viewQueries: [{ propertyName: "eclPopoverContainerElement", first: true, predicate: ["container"], descendants: true }, { propertyName: "eclPopoverScrollableElement", first: true, predicate: ["scrollable"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.ECLClickOutsideDirective, outputs: ["eclClickOutside", "eclClickOutside"] }], ngImport: i0, template: "<ng-content select=\"[eclPopoverToggle]\"></ng-content>\n\n<div #container class=\"ecl-popover__container\" [style.--ecl-popover-position]=\"popoverPosition\" [hidden]=\"isHidden\"\n [attr.id]=\"popoverToggleAriaControls\">\n <div #scrollable class=\"ecl-popover__scrollable\">\n <button eclButton variant=\"tertiary\" (click)=\"doClose()\" class=\"ecl-popover__close\" isIconOnly>\n <span eclButtonLabel>Close</span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n <ng-content select=\"[eclPopoverContent]\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "containerStyleClass"] }, { kind: "directive", type: i2.EclButtonLabelDirective, selector: "[eclButtonLabel]" }, { kind: "component", type: i3.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }] }); }
308
379
  }
309
380
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: EclPopoverComponent, decorators: [{
310
381
  type: Component,
@@ -317,7 +388,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.5",
317
388
  ], imports: [
318
389
  ...EUI_ECL_BUTTON,
319
390
  ...EUI_ECL_ICON,
320
- ], template: "<ng-content select=\"[eclPopoverToggle]\"></ng-content>\n\n<div #container class=\"ecl-popover__container\" [style.--ecl-popover-position]=\"popoverPosition\" [hidden]=\"isHidden\" [attr.id]=\"popoverToggleAriaControls\">\n <div #scrollable class=\"ecl-popover__scrollable\">\n <button eclButton variant=\"tertiary\" (click)=\"onClose()\" class=\"ecl-popover__close\" isIconOnly>\n <span eclButtonLabel>Close</span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n <ng-content select=\"[eclPopoverContent]\"></ng-content>\n </div>\n</div>\n" }]
391
+ ], template: "<ng-content select=\"[eclPopoverToggle]\"></ng-content>\n\n<div #container class=\"ecl-popover__container\" [style.--ecl-popover-position]=\"popoverPosition\" [hidden]=\"isHidden\"\n [attr.id]=\"popoverToggleAriaControls\">\n <div #scrollable class=\"ecl-popover__scrollable\">\n <button eclButton variant=\"tertiary\" (click)=\"doClose()\" class=\"ecl-popover__close\" isIconOnly>\n <span eclButtonLabel>Close</span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n <ng-content select=\"[eclPopoverContent]\"></ng-content>\n </div>\n</div>\n" }]
321
392
  }], propDecorators: { eclPopoverContainerElement: [{
322
393
  type: ViewChild,
323
394
  args: ['container']