@eui/ecl 22.0.0-alpha.71 → 22.0.0-alpha.73

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 (153) hide show
  1. package/docs/changelog.html +42 -0
  2. package/docs/classes/EclFileUploadFileSelectedEvent.html +3 -3
  3. package/docs/components/EclAccordionSummaryComponent.html +1 -1
  4. package/docs/components/EclAnimatedNumbersComponent.html +5 -5
  5. package/docs/components/EclAnimatedNumbersItemComponent.html +8 -8
  6. package/docs/components/EclBannerComponent.html +1 -1
  7. package/docs/components/EclBreadcrumbComponent.html +7 -7
  8. package/docs/components/EclBreadcrumbSegmentComponent.html +6 -6
  9. package/docs/components/EclInpageNavigationItemComponent.html +2 -2
  10. package/docs/components/EclMenuComponent.html +0 -4
  11. package/docs/components/EclNotificationComponent.html +1 -1
  12. package/docs/components/EclPageHeaderComponent.html +3 -3
  13. package/docs/components/EclPageHeaderDescriptionContainerComponent.html +1 -1
  14. package/docs/components/EclPageSummaryComponent.html +1 -1
  15. package/docs/components/EclPaginationItemComponent.html +5 -5
  16. package/docs/components/EclQuizCardComponent.html +1 -1
  17. package/docs/components/EclSiteFooterComponent.html +2 -2
  18. package/docs/directives/EclCheckboxDirective.html +3 -3
  19. package/docs/directives/EclDatePickerDuetDirective.html +4 -4
  20. package/docs/directives/EclSelectDirective.html +1 -1
  21. package/docs/js/search/search_index.js +2 -2
  22. package/docs/json/EclAccordionSummaryComponent.md +1 -1
  23. package/docs/json/EclAnimatedNumbersComponent.md +5 -5
  24. package/docs/json/EclAnimatedNumbersItemComponent.md +8 -8
  25. package/docs/json/EclBannerComponent.md +1 -1
  26. package/docs/json/EclBreadcrumbComponent.md +6 -6
  27. package/docs/json/EclBreadcrumbSegmentComponent.md +6 -6
  28. package/docs/json/EclCheckboxDirective.md +3 -3
  29. package/docs/json/EclDatePickerDuetDirective.md +4 -4
  30. package/docs/json/EclInpageNavigationItemComponent.md +2 -2
  31. package/docs/json/EclNotificationComponent.md +1 -1
  32. package/docs/json/EclPageHeaderComponent.md +3 -3
  33. package/docs/json/EclPageHeaderDescriptionContainerComponent.md +1 -1
  34. package/docs/json/EclPageSummaryComponent.md +1 -1
  35. package/docs/json/EclPaginationItemComponent.md +5 -5
  36. package/docs/json/EclQuizCardComponent.md +1 -1
  37. package/docs/json/EclSelectDirective.md +1 -1
  38. package/docs/json/EclSiteFooterComponent.md +2 -2
  39. package/docs/json/documentation.json +988 -1006
  40. package/docs/llms.txt +25 -25
  41. package/docs/miscellaneous/variables.html +20 -20
  42. package/docs/properties.html +1 -1
  43. package/fesm2022/eui-ecl-components-ecl-accordion.mjs.map +1 -1
  44. package/fesm2022/eui-ecl-components-ecl-add-to-calendar.mjs.map +1 -1
  45. package/fesm2022/eui-ecl-components-ecl-animated-numbers.mjs.map +1 -1
  46. package/fesm2022/eui-ecl-components-ecl-banner.mjs.map +1 -1
  47. package/fesm2022/eui-ecl-components-ecl-breadcrumb.mjs +1 -1
  48. package/fesm2022/eui-ecl-components-ecl-breadcrumb.mjs.map +1 -1
  49. package/fesm2022/eui-ecl-components-ecl-button.mjs.map +1 -1
  50. package/fesm2022/eui-ecl-components-ecl-card.mjs +1 -1
  51. package/fesm2022/eui-ecl-components-ecl-card.mjs.map +1 -1
  52. package/fesm2022/eui-ecl-components-ecl-carousel.mjs.map +1 -1
  53. package/fesm2022/eui-ecl-components-ecl-category-filter.mjs +6 -6
  54. package/fesm2022/eui-ecl-components-ecl-category-filter.mjs.map +1 -1
  55. package/fesm2022/eui-ecl-components-ecl-checkbox.mjs.map +1 -1
  56. package/fesm2022/eui-ecl-components-ecl-content-block.mjs.map +1 -1
  57. package/fesm2022/eui-ecl-components-ecl-date-block.mjs.map +1 -1
  58. package/fesm2022/eui-ecl-components-ecl-date-picker.mjs.map +1 -1
  59. package/fesm2022/eui-ecl-components-ecl-divider.mjs +1 -1
  60. package/fesm2022/eui-ecl-components-ecl-divider.mjs.map +1 -1
  61. package/fesm2022/eui-ecl-components-ecl-fact-figures.mjs.map +1 -1
  62. package/fesm2022/eui-ecl-components-ecl-featured.mjs +4 -4
  63. package/fesm2022/eui-ecl-components-ecl-featured.mjs.map +1 -1
  64. package/fesm2022/eui-ecl-components-ecl-file-upload.mjs.map +1 -1
  65. package/fesm2022/eui-ecl-components-ecl-gallery.mjs +1 -1
  66. package/fesm2022/eui-ecl-components-ecl-gallery.mjs.map +1 -1
  67. package/fesm2022/eui-ecl-components-ecl-highlighted-search.mjs +3 -3
  68. package/fesm2022/eui-ecl-components-ecl-highlighted-search.mjs.map +1 -1
  69. package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs +3 -3
  70. package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs.map +1 -1
  71. package/fesm2022/eui-ecl-components-ecl-list-illustration.mjs +3 -3
  72. package/fesm2022/eui-ecl-components-ecl-list-illustration.mjs.map +1 -1
  73. package/fesm2022/eui-ecl-components-ecl-list.mjs +5 -5
  74. package/fesm2022/eui-ecl-components-ecl-list.mjs.map +1 -1
  75. package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs.map +1 -1
  76. package/fesm2022/eui-ecl-components-ecl-menu.mjs +1 -2
  77. package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
  78. package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs +1 -1
  79. package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs.map +1 -1
  80. package/fesm2022/eui-ecl-components-ecl-notification.mjs.map +1 -1
  81. package/fesm2022/eui-ecl-components-ecl-page-header.mjs +12 -12
  82. package/fesm2022/eui-ecl-components-ecl-page-header.mjs.map +1 -1
  83. package/fesm2022/eui-ecl-components-ecl-page-information.mjs.map +1 -1
  84. package/fesm2022/eui-ecl-components-ecl-page-summary.mjs.map +1 -1
  85. package/fesm2022/eui-ecl-components-ecl-pagination.mjs.map +1 -1
  86. package/fesm2022/eui-ecl-components-ecl-popover.mjs.map +1 -1
  87. package/fesm2022/eui-ecl-components-ecl-quiz.mjs +1 -1
  88. package/fesm2022/eui-ecl-components-ecl-quiz.mjs.map +1 -1
  89. package/fesm2022/eui-ecl-components-ecl-radio.mjs.map +1 -1
  90. package/fesm2022/eui-ecl-components-ecl-range.mjs.map +1 -1
  91. package/fesm2022/eui-ecl-components-ecl-select.mjs.map +1 -1
  92. package/fesm2022/eui-ecl-components-ecl-site-footer.mjs +1 -1
  93. package/fesm2022/eui-ecl-components-ecl-site-footer.mjs.map +1 -1
  94. package/fesm2022/eui-ecl-components-ecl-slider.mjs.map +1 -1
  95. package/fesm2022/eui-ecl-components-ecl-slogan-ticker.mjs.map +1 -1
  96. package/fesm2022/eui-ecl-components-ecl-spotlight.mjs.map +1 -1
  97. package/fesm2022/eui-ecl-components-ecl-story-card.mjs.map +1 -1
  98. package/fesm2022/eui-ecl-components-ecl-tabs.mjs +1 -1
  99. package/fesm2022/eui-ecl-components-ecl-tabs.mjs.map +1 -1
  100. package/fesm2022/eui-ecl-components-ecl-tag.mjs +1 -1
  101. package/fesm2022/eui-ecl-components-ecl-tag.mjs.map +1 -1
  102. package/fesm2022/eui-ecl-components-ecl-text-media.mjs.map +1 -1
  103. package/fesm2022/eui-ecl-components-ecl-timeline.mjs +1 -1
  104. package/fesm2022/eui-ecl-components-ecl-timeline.mjs.map +1 -1
  105. package/package.json +1 -1
  106. package/types/eui-ecl-components-ecl-accordion.d.ts +1 -1
  107. package/types/eui-ecl-components-ecl-accordion.d.ts.map +1 -1
  108. package/types/eui-ecl-components-ecl-animated-numbers.d.ts +13 -13
  109. package/types/eui-ecl-components-ecl-animated-numbers.d.ts.map +1 -1
  110. package/types/eui-ecl-components-ecl-banner.d.ts +1 -1
  111. package/types/eui-ecl-components-ecl-breadcrumb.d.ts +12 -12
  112. package/types/eui-ecl-components-ecl-breadcrumb.d.ts.map +1 -1
  113. package/types/eui-ecl-components-ecl-button.d.ts.map +1 -1
  114. package/types/eui-ecl-components-ecl-carousel.d.ts.map +1 -1
  115. package/types/eui-ecl-components-ecl-category-filter.d.ts.map +1 -1
  116. package/types/eui-ecl-components-ecl-checkbox.d.ts +3 -3
  117. package/types/eui-ecl-components-ecl-checkbox.d.ts.map +1 -1
  118. package/types/eui-ecl-components-ecl-date-block.d.ts.map +1 -1
  119. package/types/eui-ecl-components-ecl-date-picker.d.ts +4 -4
  120. package/types/eui-ecl-components-ecl-date-picker.d.ts.map +1 -1
  121. package/types/eui-ecl-components-ecl-file-upload.d.ts +2 -2
  122. package/types/eui-ecl-components-ecl-file-upload.d.ts.map +1 -1
  123. package/types/eui-ecl-components-ecl-inpage-navigation.d.ts +2 -2
  124. package/types/eui-ecl-components-ecl-inpage-navigation.d.ts.map +1 -1
  125. package/types/eui-ecl-components-ecl-mega-menu.d.ts.map +1 -1
  126. package/types/eui-ecl-components-ecl-menu.d.ts +1 -2
  127. package/types/eui-ecl-components-ecl-menu.d.ts.map +1 -1
  128. package/types/eui-ecl-components-ecl-news-ticker.d.ts.map +1 -1
  129. package/types/eui-ecl-components-ecl-notification.d.ts +1 -1
  130. package/types/eui-ecl-components-ecl-notification.d.ts.map +1 -1
  131. package/types/eui-ecl-components-ecl-page-header.d.ts +4 -4
  132. package/types/eui-ecl-components-ecl-page-header.d.ts.map +1 -1
  133. package/types/eui-ecl-components-ecl-page-summary.d.ts +1 -1
  134. package/types/eui-ecl-components-ecl-page-summary.d.ts.map +1 -1
  135. package/types/eui-ecl-components-ecl-pagination.d.ts +5 -5
  136. package/types/eui-ecl-components-ecl-pagination.d.ts.map +1 -1
  137. package/types/eui-ecl-components-ecl-popover.d.ts.map +1 -1
  138. package/types/eui-ecl-components-ecl-quiz.d.ts +1 -1
  139. package/types/eui-ecl-components-ecl-quiz.d.ts.map +1 -1
  140. package/types/eui-ecl-components-ecl-radio.d.ts.map +1 -1
  141. package/types/eui-ecl-components-ecl-range.d.ts.map +1 -1
  142. package/types/eui-ecl-components-ecl-select.d.ts +2 -2
  143. package/types/eui-ecl-components-ecl-select.d.ts.map +1 -1
  144. package/types/eui-ecl-components-ecl-site-footer.d.ts +2 -2
  145. package/types/eui-ecl-components-ecl-site-footer.d.ts.map +1 -1
  146. package/types/eui-ecl-components-ecl-slider.d.ts.map +1 -1
  147. package/types/eui-ecl-components-ecl-slogan-ticker.d.ts +1 -1
  148. package/types/eui-ecl-components-ecl-slogan-ticker.d.ts.map +1 -1
  149. package/types/eui-ecl-components-ecl-spotlight.d.ts.map +1 -1
  150. package/types/eui-ecl-components-ecl-story-card.d.ts.map +1 -1
  151. package/types/eui-ecl-components-ecl-tabs.d.ts.map +1 -1
  152. package/types/eui-ecl-components-ecl-text-media.d.ts.map +1 -1
  153. package/types/eui-ecl-components-ecl-timeline.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-pagination.mjs","names":[],"sources":["../../components/ecl-pagination/ecl-pagination-item.component.ts","../../components/ecl-pagination/ecl-pagination-item.component.html","../../components/ecl-pagination/ecl-pagination-list.directive.ts","../../components/ecl-pagination/events/ecl-pagination.event.ts","../../components/ecl-pagination/ecl-pagination.component.ts","../../components/ecl-pagination/ecl-pagination.component.html","../../components/ecl-pagination/index.ts"],"sourcesContent":["import { Component, computed, ElementRef, ViewEncapsulation, booleanAttribute, inject, output, input } from '@angular/core';\nimport { Params, QueryParamsHandling, RouterLink, RouterLinkWithHref } from '@angular/router';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EclBaseEvent } from '@eui/ecl/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\n\n/**\n * Event emitted when a pagination item is clicked.\n */\nexport class EclPaginationItemClickEvent extends EclBaseEvent {}\n\n/**\n * Individual item inside an `EclPaginationComponent` rendered as an `<li>` element.\n * Supports numeric page links, previous/next navigation controls, and truncation placeholders.\n * Navigation can use Angular `routerLink` or a plain `href`, and emits `pageClick` on interaction.\n *\n * - Selector: `li[eclPaginationItem]`.\n * - `isCurrent` / `isNext` / `isPrevious` — boolean modifiers that apply the matching ECL class.\n * - `isTruncated` — renders the item as a truncation placeholder (e.g. \"…\").\n * - `routerLink` / `queryParams` / `queryParamsHandling` — Angular router navigation.\n * - `href` — plain anchor navigation when router is not in use.\n * - `pageClick` — emits `EclPaginationItemClickEvent` when the item is clicked.\n */\n@Component({\n selector: 'li[eclPaginationItem]',\n templateUrl: './ecl-pagination-item.component.html',\n imports: [RouterLink, RouterLinkWithHref, TranslatePipe, ...EUI_ECL_ICON, ...EUI_ECL_LINK],\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'cssClasses()',\n role: 'listitem',\n '[class.ecl-pagination__item--truncation]': 'isTruncated()',\n },\n})\nexport class EclPaginationItemComponent extends ECLBaseDirective {\n el = inject(ElementRef);\n\n protected readonly cssClasses = computed<string>(() =>\n [\n super.getCssClasses('ecl-pagination__item'),\n this.isCurrent() ? 'ecl-pagination__item--current' : '',\n this.isNext() ? 'ecl-pagination__item--next' : '',\n this.isPrevious() ? 'ecl-pagination__item--previous' : '',\n ]\n .join(' ')\n .trim());\n\n /**\n * Text content of the pagination item.\n */\n readonly label = input<string>();\n\n /**\n * Value for the `aria-label` attribute used for accessibility.\n */\n readonly ariaLabel = input<string>();\n\n /**\n * Total number of pages displayed by the pagination component.\n */\n readonly pagesCount = input<string>();\n\n /**\n * Adds the `ecl-pagination__item--current` class when true.\n */\n readonly isCurrent = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Adds the `ecl-pagination__item--next` class when true.\n */\n readonly isNext = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Adds the `ecl-pagination__item--previous` class when true.\n */\n readonly isPrevious = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Adds the `ecl-pagination__item--truncation` class when true.\n */\n readonly isTruncated = input(false, { transform: booleanAttribute });\n\n /**\n * Router navigation link for Angular routing.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly routerLink = input<string | any[] | null>(null);\n\n /**\n * Query parameters for the router link.\n */\n readonly queryParams = input<Params | null>(null);\n\n /**\n * Determines how query parameters are handled during navigation.\n */\n readonly queryParamsHandling = input<QueryParamsHandling | null>(null);\n\n /**\n * Href link for navigation.\n */\n readonly href = input<string | null>(null);\n\n /**\n * Emits when the pagination item is clicked.\n */\n readonly pageClick = output<EclPaginationItemClickEvent>();\n\n get anchorRole(): string | null {\n return !this.href() && !this.routerLink() ? 'button' : null;\n }\n\n /**\n * Returns true if this item is an icon-only element (previous or next page).\n */\n get isIconOnly(): boolean {\n return this.isPrevOrNextVisible();\n }\n\n /**\n * Handles the click event and emits the `pageClick` output.\n * Prevents event propagation if no href is defined.\n *\n * @param evt Event object from the DOM click event.\n */\n onPageClick(evt: Event): void {\n this.pageClick.emit(new EclPaginationItemClickEvent());\n if (!this.href()) {\n evt.stopPropagation();\n }\n }\n\n /**\n * Returns the i18n translation key for the ARIA label.\n */\n geti18nPageAriaLabelKey(): string {\n let key = '';\n\n if (this.isNext()) {\n key = 'ecl.pagination.GO-TO-NEXT-PAGE';\n } else if (this.isPrevious()) {\n key = 'ecl.pagination.GO-TO-PREV-PAGE';\n } else {\n key = 'ecl.pagination.GO-TO-PAGE';\n }\n return key;\n }\n\n /**\n * Returns the i18n translation key for the visible label.\n */\n geti18nPageLabelKey(): string {\n let key = '';\n\n if (this.isNext()) {\n key = 'ecl.pagination.NEXT';\n } else if (this.isPrevious()) {\n key = 'ecl.pagination.PREVIOUS';\n }\n return key;\n }\n\n /**\n * Returns true if the item is either previous or next.\n */\n isPrevOrNextVisible(): boolean {\n return !!(this.isPrevious() || this.isNext());\n }\n}\n","@if (!isCurrent() && !isTruncated()) {\n@if(routerLink()){\n<a eclLink [isIconOnly]=\"isIconOnly\" (keydown.enter)=\"onPageClick($event)\" (click)=\"onPageClick($event)\" variant=\"standalone\"\n attr.aria-label=\"{{ ariaLabel() || geti18nPageAriaLabelKey() | translate: { pageNumber: label() } }}\" [attr.role]=\"anchorRole\"\n [routerLink]=\"routerLink()\" [queryParams]=\"queryParams()\" [queryParamsHandling]=\"queryParamsHandling()\"\n class=\"ecl-pagination__link eui-ecl-u-cursor-pointer\" tabindex=\"{{tabindex() ? tabindex() : 0}}\">\n @if (isPrevious()) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-270\"></ecl-icon>\n }\n <span eclLinkLabel>{{ label() || geti18nPageLabelKey() | translate }}</span>\n @if (isNext()) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-90\"></ecl-icon>\n }\n</a>\n}\n\n@if (!routerLink()) {\n<a eclLink [isIconOnly]=\"isIconOnly\" (keydown.enter)=\"onPageClick($event)\" (click)=\"onPageClick($event)\" variant=\"standalone\"\n attr.aria-label=\"{{ ariaLabel() || geti18nPageAriaLabelKey() | translate: { pageNumber: label() } }}\" [attr.href]=\"href()\"\n class=\"ecl-pagination__link eui-ecl-u-cursor-pointer\" tabindex=\"{{tabindex() ? tabindex() : 0}}\" [attr.role]=\"anchorRole\">\n @if (isPrevious()) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-270\"></ecl-icon>\n }\n <span eclLinkLabel>{{ label() || geti18nPageLabelKey() | translate }}</span>\n @if (isNext()) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-90\"></ecl-icon>\n }\n</a>\n}\n}\n\n@else if (isTruncated()) {\n<span class=\"ecl-pagination__text ecl-pagination__text--summary\" aria-current=\"true\">\n {{ label() }}\n</span>\n}\n@else {\n<span class=\"ecl-pagination__text ecl-pagination__text--summary\" aria-current=\"true\">\n {{ label() }}\n</span>\n\n<span class=\"ecl-pagination__text ecl-pagination__text--full\" aria-current=\"true\">\n {{ 'ecl.pagination.PAGE' | translate: { pageNumber: label() } }}\n @if(pagesCount()) {\n {{ 'ecl.common.OF' | translate}} {{pagesCount()}}\n }\n</span>\n}\n","import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive to apply ECL styles to the pagination list element.\n * Adds the `ecl-pagination__list` class to the host element.\n */\n@Directive({\n selector: '[eclPaginationList]',\n host: {\n class: 'ecl-pagination__list',\n },\n})\nexport class EclPaginationListDirective extends ECLBaseDirective {}\n","import { EclBaseEvent } from '@eui/ecl/core';\n\n/**\n * Event emitted by EclPaginationComponent when the page changes.\n * Contains information about the current page and visible item range.\n */\nexport class EclPaginationEvent extends EclBaseEvent {\n /**\n * Current page number after the change.\n */\n constructor(\n public readonly page: number,\n\n /**\n * Index of the first item shown on the current page.\n */\n public readonly showingFrom: number,\n\n /**\n * Index of the last item shown on the current page.\n */\n public readonly showingTo: number,\n ) {\n super();\n }\n}\n","import { Component, DestroyRef, OnChanges, OnInit, inject, numberAttribute, output, input, contentChild } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DefaultConfig, EuiPagination } from '@eui/base';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclPaginationEvent } from './events/ecl-pagination.event';\nimport { EclPaginationListDirective } from './ecl-pagination-list.directive';\nimport { EclPaginationItemComponent } from './ecl-pagination-item.component';\n\n/**\n * Renders an ECL pagination control in `manual` or `auto` mode.\n * In `auto` mode the component creates and maintains an internal pagination model and fires an initial page event on init.\n * In `manual` mode the consumer drives page changes by listening to the `page` output and updating inputs.\n *\n * - `mode` input: `'manual'` (default) | `'auto'`.\n * - `totalItems`, `pageSize`, `currentPage`, `pageWindowSize`: pagination parameters (numeric inputs, all optional with defaults).\n * - `page` output: emits `EclPaginationEvent` on every page change.\n * - Sub-components: `li[eclPaginationItem]` (previous/next/numbered items); `[eclPaginationList]` directive wraps the list.\n * - `onPreviousPage()`, `onNextPage()`, `onPage(page)`: programmatic navigation.\n */\n@Component({\n selector: 'ecl-pagination',\n templateUrl: './ecl-pagination.component.html',\n imports: [NgTemplateOutlet, EclPaginationItemComponent],\n host: {\n class: 'ecl-pagination',\n role: 'navigation',\n },\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclPaginationComponent extends ECLBaseDirective implements OnInit, OnChanges {\n /**\n * Defines the pagination mode.\n * - `manual` - component waits for external events to change pages.\n * - `auto` - component manages the pages automatically based on inputs.\n */\n readonly mode = input<'manual' | 'auto'>('manual');\n\n /**\n * Total number of items in the list.\n */\n readonly totalItems = input<number, unknown>(DefaultConfig.totalItems!, { transform: numberAttribute });\n\n /**\n * Number of items displayed on a single page.\n */\n readonly pageSize = input<number, unknown>(DefaultConfig.pageSize!, { transform: numberAttribute });\n\n /**\n * Currently selected page number.\n */\n readonly currentPage = input<number, unknown>(DefaultConfig.currentPage!, { transform: numberAttribute });\n\n /**\n * Number of pagination links visible around the current page.\n */\n readonly pageWindowSize = input<number, unknown>(DefaultConfig.pageWindowSize!, { transform: numberAttribute });\n\n /**\n * Emits a pagination event each time the page changes.\n */\n readonly page = output<EclPaginationEvent>();\n\n /**\n * Reference to the pagination list directive inside the component's content.\n */\n readonly eclPaginationList = contentChild(EclPaginationListDirective);\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Internal pagination model storing pagination data and logic.\n */\n public model = EuiPagination.create();\n\n /**\n * Lifecycle hook that runs once after component initialization.\n * In automatic mode, triggers an initial page event.\n */\n ngOnInit(): void {\n if (this.isModeAuto()) {\n // Cancel the pending timer on destroy to avoid emitting on a destroyed OutputRef (NG0953).\n const timeoutId = setTimeout(() => {\n this.firePageEvent();\n });\n this.destroyRef.onDestroy(() => clearTimeout(timeoutId));\n }\n }\n\n /**\n * Lifecycle hook called on input changes.\n * Re-creates the pagination model in automatic mode.\n */\n ngOnChanges(): void {\n if (this.isModeAuto()) {\n this.model = EuiPagination.create({\n totalItems: this.totalItems(),\n pageSize: this.pageSize(),\n currentPage: this.currentPage(),\n pageWindowSize: this.pageWindowSize(),\n });\n }\n }\n\n /**\n * Returns true if the pagination list exists in the template.\n */\n get hasList(): boolean {\n return !!this.eclPaginationList();\n }\n\n /**\n * Navigates to the previous page and emits a page change event.\n */\n onPreviousPage(): void {\n this.model.goToPreviousPage();\n this.firePageEvent();\n }\n\n /**\n * Navigates to the next page and emits a page change event.\n */\n onNextPage(): void {\n this.model.goToNextPage();\n this.firePageEvent();\n }\n\n /**\n * Navigates to a specific page and emits a page change event.\n *\n * @param page The page number to navigate to.\n */\n onPage(page: number): void {\n this.model.goToPage(page);\n this.firePageEvent();\n }\n\n /**\n * Checks if the component is in automatic mode.\n */\n isModeAuto(): boolean {\n return this.mode() === 'auto';\n }\n\n /**\n * Emits the page change event with the current pagination state.\n */\n private firePageEvent(): void {\n const evt = new EclPaginationEvent(this.model.getCurrentPage(), this.model.getShowingFrom(), this.model.getShowingTo());\n\n this.page.emit(evt);\n }\n}\n","@if(!hasList) {\n <ul class=\"ecl-pagination__list\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </ul>\n } @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n \n <ng-template #content>\n @if (isModeAuto()){\n @if(model.hasPreviousPage()){\n <li eclPaginationItem [isPrevious]=\"true\" (pageClick)=\"onPreviousPage()\"> </li>\n }\n @for (page of model.getPages(); track page) {\n <li eclPaginationItem\n [label]=\"page.toString()\"\n [isCurrent]=\"model.getCurrentPage() === page\"\n (pageClick)=\"onPage(page)\"\n [pagesCount]=\"model.getPagesCount().toString()\">\n </li>\n }\n \n @if(model.hasNextPage()){\n <li eclPaginationItem [isNext]=\"true\" (pageClick)=\"onNextPage()\"> </li>\n }\n }\n \n @if(!isModeAuto()) {\n <ng-content></ng-content>\n }\n </ng-template>","import { EclPaginationItemComponent } from './ecl-pagination-item.component';\nimport { EclPaginationListDirective } from './ecl-pagination-list.directive';\nimport { EclPaginationComponent } from './ecl-pagination.component';\n\nexport * from './ecl-pagination.component';\nexport * from './ecl-pagination-item.component';\nexport * from './events/ecl-pagination.event';\nexport * from './ecl-pagination-list.directive';\n\nexport const EUI_ECL_PAGINATION = [\n EclPaginationComponent, EclPaginationItemComponent, EclPaginationListDirective,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gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,MAAA;EAAA,CAAA;EAAA,mBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,0BAA0B,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AE9DxE,MAAa,qBAAqB;CAC9B;CAAwB;CAA4B;AAC9C"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-pagination.mjs","names":[],"sources":["../../components/ecl-pagination/ecl-pagination-item.component.ts","../../components/ecl-pagination/ecl-pagination-item.component.html","../../components/ecl-pagination/ecl-pagination-list.directive.ts","../../components/ecl-pagination/events/ecl-pagination.event.ts","../../components/ecl-pagination/ecl-pagination.component.ts","../../components/ecl-pagination/ecl-pagination.component.html","../../components/ecl-pagination/index.ts"],"sourcesContent":["import { Component, computed, ElementRef, ViewEncapsulation, booleanAttribute, inject, output, input } from '@angular/core';\nimport { Params, QueryParamsHandling, RouterLink, RouterLinkWithHref } from '@angular/router';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EclBaseEvent } from '@eui/ecl/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';\n\n/**\n * Event emitted when a pagination item is clicked.\n */\nexport class EclPaginationItemClickEvent extends EclBaseEvent {}\n\n/**\n * Individual item inside an `EclPaginationComponent` rendered as an `<li>` element.\n * Supports numeric page links, previous/next navigation controls, and truncation placeholders.\n * Navigation can use Angular `routerLink` or a plain `href`, and emits `pageClick` on interaction.\n *\n * - Selector: `li[eclPaginationItem]`.\n * - `isCurrent` / `isNext` / `isPrevious` — boolean modifiers that apply the matching ECL class.\n * - `isTruncated` — renders the item as a truncation placeholder (e.g. \"…\").\n * - `routerLink` / `queryParams` / `queryParamsHandling` — Angular router navigation.\n * - `href` — plain anchor navigation when router is not in use.\n * - `pageClick` — emits `EclPaginationItemClickEvent` when the item is clicked.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'li[eclPaginationItem]',\n templateUrl: './ecl-pagination-item.component.html',\n imports: [RouterLink, RouterLinkWithHref, TranslatePipe, ...EUI_ECL_ICON, ...EUI_ECL_LINK],\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'cssClasses()',\n role: 'listitem',\n '[class.ecl-pagination__item--truncation]': 'isTruncated()',\n },\n})\nexport class EclPaginationItemComponent extends ECLBaseDirective {\n el = inject(ElementRef);\n\n protected readonly cssClasses = computed<string>(() =>\n [\n super.getCssClasses('ecl-pagination__item'),\n this.isCurrent() ? 'ecl-pagination__item--current' : '',\n this.isNext() ? 'ecl-pagination__item--next' : '',\n this.isPrevious() ? 'ecl-pagination__item--previous' : '',\n ]\n .join(' ')\n .trim());\n\n /**\n * Text content of the pagination item.\n */\n readonly label = input<string>();\n\n /**\n * Value for the `aria-label` attribute used for accessibility.\n */\n readonly ariaLabel = input<string>();\n\n /**\n * Total number of pages displayed by the pagination component.\n */\n readonly pagesCount = input<string>();\n\n /**\n * Adds the `ecl-pagination__item--current` class when true.\n */\n readonly isCurrent = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Adds the `ecl-pagination__item--next` class when true.\n */\n readonly isNext = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Adds the `ecl-pagination__item--previous` class when true.\n */\n readonly isPrevious = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Adds the `ecl-pagination__item--truncation` class when true.\n */\n readonly isTruncated = input(false, { transform: booleanAttribute });\n\n /**\n * Router navigation link for Angular routing.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly routerLink = input<string | any[] | null>(null);\n\n /**\n * Query parameters for the router link.\n */\n readonly queryParams = input<Params | null>(null);\n\n /**\n * Determines how query parameters are handled during navigation.\n */\n readonly queryParamsHandling = input<QueryParamsHandling | null>(null);\n\n /**\n * Href link for navigation.\n */\n readonly href = input<string | null>(null);\n\n /**\n * Emits when the pagination item is clicked.\n */\n readonly pageClick = output<EclPaginationItemClickEvent>();\n\n get anchorRole(): string | null {\n return !this.href() && !this.routerLink() ? 'button' : null;\n }\n\n /**\n * Returns true if this item is an icon-only element (previous or next page).\n */\n get isIconOnly(): boolean {\n return this.isPrevOrNextVisible();\n }\n\n /**\n * Handles the click event and emits the `pageClick` output.\n * Prevents event propagation if no href is defined.\n *\n * @param evt Event object from the DOM click event.\n */\n onPageClick(evt: Event): void {\n this.pageClick.emit(new EclPaginationItemClickEvent());\n if (!this.href()) {\n evt.stopPropagation();\n }\n }\n\n /**\n * Returns the i18n translation key for the ARIA label.\n */\n geti18nPageAriaLabelKey(): string {\n let key = '';\n\n if (this.isNext()) {\n key = 'ecl.pagination.GO-TO-NEXT-PAGE';\n } else if (this.isPrevious()) {\n key = 'ecl.pagination.GO-TO-PREV-PAGE';\n } else {\n key = 'ecl.pagination.GO-TO-PAGE';\n }\n return key;\n }\n\n /**\n * Returns the i18n translation key for the visible label.\n */\n geti18nPageLabelKey(): string {\n let key = '';\n\n if (this.isNext()) {\n key = 'ecl.pagination.NEXT';\n } else if (this.isPrevious()) {\n key = 'ecl.pagination.PREVIOUS';\n }\n return key;\n }\n\n /**\n * Returns true if the item is either previous or next.\n */\n isPrevOrNextVisible(): boolean {\n return !!(this.isPrevious() || this.isNext());\n }\n}\n","@if (!isCurrent() && !isTruncated()) {\n@if(routerLink()){\n<a eclLink [isIconOnly]=\"isIconOnly\" (keydown.enter)=\"onPageClick($event)\" (click)=\"onPageClick($event)\" variant=\"standalone\"\n attr.aria-label=\"{{ ariaLabel() || geti18nPageAriaLabelKey() | translate: { pageNumber: label() } }}\" [attr.role]=\"anchorRole\"\n [routerLink]=\"routerLink()\" [queryParams]=\"queryParams()\" [queryParamsHandling]=\"queryParamsHandling()\"\n class=\"ecl-pagination__link eui-ecl-u-cursor-pointer\" tabindex=\"{{tabindex() ? tabindex() : 0}}\">\n @if (isPrevious()) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-270\"></ecl-icon>\n }\n <span eclLinkLabel>{{ label() || geti18nPageLabelKey() | translate }}</span>\n @if (isNext()) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-90\"></ecl-icon>\n }\n</a>\n}\n\n@if (!routerLink()) {\n<a eclLink [isIconOnly]=\"isIconOnly\" (keydown.enter)=\"onPageClick($event)\" (click)=\"onPageClick($event)\" variant=\"standalone\"\n attr.aria-label=\"{{ ariaLabel() || geti18nPageAriaLabelKey() | translate: { pageNumber: label() } }}\" [attr.href]=\"href()\"\n class=\"ecl-pagination__link eui-ecl-u-cursor-pointer\" tabindex=\"{{tabindex() ? tabindex() : 0}}\" [attr.role]=\"anchorRole\">\n @if (isPrevious()) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-270\"></ecl-icon>\n }\n <span eclLinkLabel>{{ label() || geti18nPageLabelKey() | translate }}</span>\n @if (isNext()) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-90\"></ecl-icon>\n }\n</a>\n}\n}\n\n@else if (isTruncated()) {\n<span class=\"ecl-pagination__text ecl-pagination__text--summary\" aria-current=\"true\">\n {{ label() }}\n</span>\n}\n@else {\n<span class=\"ecl-pagination__text ecl-pagination__text--summary\" aria-current=\"true\">\n {{ label() }}\n</span>\n\n<span class=\"ecl-pagination__text ecl-pagination__text--full\" aria-current=\"true\">\n {{ 'ecl.pagination.PAGE' | translate: { pageNumber: label() } }}\n @if(pagesCount()) {\n {{ 'ecl.common.OF' | translate}} {{pagesCount()}}\n }\n</span>\n}\n","import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive to apply ECL styles to the pagination list element.\n * Adds the `ecl-pagination__list` class to the host element.\n */\n@Directive({\n selector: '[eclPaginationList]',\n host: {\n class: 'ecl-pagination__list',\n },\n})\nexport class EclPaginationListDirective extends ECLBaseDirective {}\n","import { EclBaseEvent } from '@eui/ecl/core';\n\n/**\n * Event emitted by EclPaginationComponent when the page changes.\n * Contains information about the current page and visible item range.\n */\nexport class EclPaginationEvent extends EclBaseEvent {\n /**\n * Current page number after the change.\n */\n constructor(\n public readonly page: number,\n\n /**\n * Index of the first item shown on the current page.\n */\n public readonly showingFrom: number,\n\n /**\n * Index of the last item shown on the current page.\n */\n public readonly showingTo: number,\n ) {\n super();\n }\n}\n","import { Component, DestroyRef, OnChanges, OnInit, inject, numberAttribute, output, input, contentChild } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DefaultConfig, EuiPagination } from '@eui/base';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclPaginationEvent } from './events/ecl-pagination.event';\nimport { EclPaginationListDirective } from './ecl-pagination-list.directive';\nimport { EclPaginationItemComponent } from './ecl-pagination-item.component';\n\n/**\n * Renders an ECL pagination control in `manual` or `auto` mode.\n * In `auto` mode the component creates and maintains an internal pagination model and fires an initial page event on init.\n * In `manual` mode the consumer drives page changes by listening to the `page` output and updating inputs.\n *\n * - `mode` input: `'manual'` (default) | `'auto'`.\n * - `totalItems`, `pageSize`, `currentPage`, `pageWindowSize`: pagination parameters (numeric inputs, all optional with defaults).\n * - `page` output: emits `EclPaginationEvent` on every page change.\n * - Sub-components: `li[eclPaginationItem]` (previous/next/numbered items); `[eclPaginationList]` directive wraps the list.\n * - `onPreviousPage()`, `onNextPage()`, `onPage(page)`: programmatic navigation.\n */\n@Component({\n selector: 'ecl-pagination',\n templateUrl: './ecl-pagination.component.html',\n imports: [NgTemplateOutlet, EclPaginationItemComponent],\n host: {\n class: 'ecl-pagination',\n role: 'navigation',\n },\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclPaginationComponent extends ECLBaseDirective implements OnInit, OnChanges {\n /**\n * Defines the pagination mode.\n * - `manual` - component waits for external events to change pages.\n * - `auto` - component manages the pages automatically based on inputs.\n */\n readonly mode = input<'manual' | 'auto'>('manual');\n\n /**\n * Total number of items in the list.\n */\n readonly totalItems = input<number, unknown>(DefaultConfig.totalItems!, { transform: numberAttribute });\n\n /**\n * Number of items displayed on a single page.\n */\n readonly pageSize = input<number, unknown>(DefaultConfig.pageSize!, { transform: numberAttribute });\n\n /**\n * Currently selected page number.\n */\n readonly currentPage = input<number, unknown>(DefaultConfig.currentPage!, { transform: numberAttribute });\n\n /**\n * Number of pagination links visible around the current page.\n */\n readonly pageWindowSize = input<number, unknown>(DefaultConfig.pageWindowSize!, { transform: numberAttribute });\n\n /**\n * Emits a pagination event each time the page changes.\n */\n readonly page = output<EclPaginationEvent>();\n\n /**\n * Reference to the pagination list directive inside the component's content.\n */\n readonly eclPaginationList = contentChild(EclPaginationListDirective);\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Internal pagination model storing pagination data and logic.\n */\n public model = EuiPagination.create();\n\n /**\n * Lifecycle hook that runs once after component initialization.\n * In automatic mode, triggers an initial page event.\n */\n ngOnInit(): void {\n if (this.isModeAuto()) {\n // Cancel the pending timer on destroy to avoid emitting on a destroyed OutputRef (NG0953).\n const timeoutId = setTimeout(() => {\n this.firePageEvent();\n });\n this.destroyRef.onDestroy(() => clearTimeout(timeoutId));\n }\n }\n\n /**\n * Lifecycle hook called on input changes.\n * Re-creates the pagination model in automatic mode.\n */\n ngOnChanges(): void {\n if (this.isModeAuto()) {\n this.model = EuiPagination.create({\n totalItems: this.totalItems(),\n pageSize: this.pageSize(),\n currentPage: this.currentPage(),\n pageWindowSize: this.pageWindowSize(),\n });\n }\n }\n\n /**\n * Returns true if the pagination list exists in the template.\n */\n get hasList(): boolean {\n return !!this.eclPaginationList();\n }\n\n /**\n * Navigates to the previous page and emits a page change event.\n */\n onPreviousPage(): void {\n this.model.goToPreviousPage();\n this.firePageEvent();\n }\n\n /**\n * Navigates to the next page and emits a page change event.\n */\n onNextPage(): void {\n this.model.goToNextPage();\n this.firePageEvent();\n }\n\n /**\n * Navigates to a specific page and emits a page change event.\n *\n * @param page The page number to navigate to.\n */\n onPage(page: number): void {\n this.model.goToPage(page);\n this.firePageEvent();\n }\n\n /**\n * Checks if the component is in automatic mode.\n */\n isModeAuto(): boolean {\n return this.mode() === 'auto';\n }\n\n /**\n * Emits the page change event with the current pagination state.\n */\n private firePageEvent(): void {\n const evt = new EclPaginationEvent(this.model.getCurrentPage(), this.model.getShowingFrom(), this.model.getShowingTo());\n\n this.page.emit(evt);\n }\n}\n","@if(!hasList) {\n <ul class=\"ecl-pagination__list\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </ul>\n } @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n \n <ng-template #content>\n @if (isModeAuto()){\n @if(model.hasPreviousPage()){\n <li eclPaginationItem [isPrevious]=\"true\" (pageClick)=\"onPreviousPage()\"> </li>\n }\n @for (page of model.getPages(); track page) {\n <li eclPaginationItem\n [label]=\"page.toString()\"\n [isCurrent]=\"model.getCurrentPage() === page\"\n (pageClick)=\"onPage(page)\"\n [pagesCount]=\"model.getPagesCount().toString()\">\n </li>\n }\n \n @if(model.hasNextPage()){\n <li eclPaginationItem [isNext]=\"true\" (pageClick)=\"onNextPage()\"> </li>\n }\n }\n \n @if(!isModeAuto()) {\n <ng-content></ng-content>\n }\n </ng-template>","import { EclPaginationItemComponent } from './ecl-pagination-item.component';\nimport { EclPaginationListDirective } from './ecl-pagination-list.directive';\nimport { EclPaginationComponent } from './ecl-pagination.component';\n\nexport * from './ecl-pagination.component';\nexport * from './ecl-pagination-item.component';\nexport * from './events/ecl-pagination.event';\nexport * from './ecl-pagination-list.directive';\n\nexport const EUI_ECL_PAGINATION = [\n EclPaginationComponent, EclPaginationItemComponent, EclPaginationListDirective,\n] as const;"],"mappings":";;;;;;;;;;;AAW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;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,MAAA;EAAA,CAAA;EAAA,mBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,0BAA0B,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AE9DxE,MAAa,qBAAqB;CAC9B;CAAwB;CAA4B;AAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-popover.mjs","names":[],"sources":["../../components/ecl-popover/ecl-popover-toggle.directive.ts","../../components/ecl-popover/ecl-popover.component.ts","../../components/ecl-popover/ecl-popover.component.html","../../components/ecl-popover/ecl-popover-content.directive.ts","../../components/ecl-popover/index.ts"],"sourcesContent":["import { computed, Directive, ElementRef, inject, output, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive used to toggle the visibility of an `ecl-popover` component.\n *\n * This directive emits a custom click event and manages accessibility attributes.\n */\n@Directive({\n selector: '[eclPopoverToggle]',\n host: {\n '[attr.aria-expanded]': 'isExpanded()',\n '[class]': 'cssClasses()',\n '(mouseup)': 'onClick($event)',\n '(keydown.enter)': 'onKeyboardActivate($event)',\n '(keydown.space)': 'onKeyboardActivate($event)',\n },\n})\nexport class EclPopoverToggleDirective extends ECLBaseDirective {\n hostElementRef = inject(ElementRef);\n\n /**\n * Sets the `aria-expanded` attribute to reflect the popover's open state.\n * This should be updated by the parent popover component.\n */\n readonly isExpanded = signal(false);\n\n /**\n * Event emitted when the toggle element is clicked with the left mouse button.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly click = output();\n\n /**\n * Host binding that applies the appropriate CSS class to the toggle element.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-popover__toggle'));\n\n /**\n * Emits the `click` event only for left mouse button clicks.\n * Used by the popover component to toggle visibility.\n */\n onClick(evt: MouseEvent): void {\n const LEFT_BUTTON = 0;\n\n if (evt.button === LEFT_BUTTON) {\n this.click.emit();\n }\n }\n\n /**\n * Triggers the click event on Enter or Space keydown and prevents default behavior.\n */\n onKeyboardActivate(evt: Event): void {\n evt.preventDefault();\n this.click.emit();\n }\n\n /**\n * Returns the native HTML element of the directive.\n * Used internally by the popover to query attributes.\n */\n public getHostElement(): HTMLElement {\n return this.hostElementRef.nativeElement;\n }\n}\n","import { AfterContentInit, AfterViewInit, Component, computed, DOCUMENT, ElementRef, Injector, OnDestroy, PLATFORM_ID, Renderer2, inject, output, runInInjectionContext, viewChild, contentChild } from '@angular/core';\nimport { auditTime, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ECLClickOutsideDirective } from '@eui/ecl/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclPopoverToggleDirective } from './ecl-popover-toggle.directive';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { isPlatformBrowser } from '@angular/common';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\n\n/**\n * An ECL popover component that shows and hides a floating content panel relative to a toggle trigger.\n * Applied via `ecl-popover`; auto-positions itself (top/bottom/left/right) based on available viewport space.\n *\n * - Toggle trigger: apply `[eclPopoverToggle]` to any child element — clicking it opens/closes the popover.\n * - Content slot: apply `[eclPopoverContent]` to the content element inside the popover.\n * - `openEvent` output: emitted when the popover opens; `closeEvent` output: emitted when it closes.\n * - Closes on outside click (via `ECLClickOutsideDirective`), ESC key, and document scroll.\n */\n@Component({\n selector: 'ecl-popover',\n templateUrl: './ecl-popover.component.html',\n host: {\n '[class]': 'cssClasses()',\n '(eclClickOutside)': 'onClickOutsidePopover()',\n '(document:keydown.escape)': 'onEscapeKeydownHandler()',\n '(document:scroll)': 'onDocumentScroll()',\n },\n hostDirectives: [\n {\n directive: ECLClickOutsideDirective,\n\n outputs: ['eclClickOutside'],\n },\n ],\n imports: [\n ...EUI_ECL_BUTTON,\n ...EUI_ECL_ICON,\n ],\n})\nexport class EclPopoverComponent extends ECLBaseDirective implements AfterViewInit, AfterContentInit, OnDestroy {\n /**\n * Reference to the popover container element.\n */\n readonly eclPopoverContainerElement = viewChild<ElementRef>('container');\n\n /**\n * Reference to the scrollable content element inside the popover.\n */\n readonly eclPopoverScrollableElement = viewChild<ElementRef>('scrollable');\n\n /**\n * Reference to the toggle element used to open/close the popover.\n */\n readonly eclPopoverToggle = contentChild(EclPopoverToggleDirective);\n\n openEvent = output();\n closeEvent = output();\n\n /**\n * Controls visibility of the popover. `true` means hidden.\n */\n protected isHidden = true;\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n\n private readonly topClass = 'ecl-popover--top';\n private readonly bottomClass = 'ecl-popover--bottom';\n private readonly leftClass = 'ecl-popover--left';\n private readonly rightClass = 'ecl-popover--right';\n private readonly pushTopClass = 'ecl-popover--push-top';\n private readonly pushBottomClass = 'ecl-popover--push-bottom';\n private readonly pushLeftClass = 'ecl-popover--push-left';\n private readonly pushRightClass = 'ecl-popover--push-right';\n private toggleRect!: DOMRect;\n private scrollableParent: HTMLElement | null = null;\n private el = inject(ElementRef);\n private renderer = inject(Renderer2);\n private readonly injector = inject(Injector);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView as Window; // null on server; browser-only usage is guarded\n private platformId = inject(PLATFORM_ID);\n\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-popover'));\n\n /**\n * Recalculates popover position when the window is resized.\n */\n ngAfterViewInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n if (this.window) {\n fromEvent(this.window, 'resize').pipe(\n auditTime(50),\n takeUntil(this.destroy$)).subscribe(() => {\n this.checkPosition();\n });\n }\n }\n\n /**\n * Initializes event subscriptions for toggle button.\n */\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n const toggle = this.eclPopoverToggle();\n if (toggle) {\n runInInjectionContext(this.injector, () => outputToObservable(toggle.click))\n .pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.isHidden) {\n this.doOpen();\n } else {\n this.doClose();\n }\n this.checkPosition(); // TODO: wrap on a platformBrowser check as it calls window and document\n });\n }\n\n this.scrollableParent = this.getClosestScrollableParent(toggle?.hostElementRef.nativeElement);\n }\n\n /**\n * Lifecycle hook that cleans up subscriptions on destroy.\n */\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Returns the value of the `aria-controls` attribute from the toggle element,\n * if available. Used for accessibility linking.\n */\n get popoverToggleAriaControls(): string | null {\n return this.eclPopoverToggle()?.hostElementRef.nativeElement.getAttribute('aria-controls');\n }\n\n /**\n * Handler triggered when a click outside the popover is detected.\n * Closes the popover if it is open.\n */\n onClickOutsidePopover(): void {\n if (!this.isHidden) {\n this.doClose();\n }\n }\n\n /**\n * Closes the popover when the Escape key is pressed.\n */\n onEscapeKeydownHandler(): void {\n this.doClose();\n }\n\n /**\n * Recalculates popover position when the document is scrolled.\n */\n onDocumentScroll(): void {\n this.checkPosition();\n }\n\n /**\n * Protected method used to close the popover and reset related styles.\n */\n protected doClose(): void {\n this.isHidden = true;\n this.eclPopoverToggle()?.isExpanded.set(false);\n this.resetStyles();\n this.closeEvent.emit();\n }\n\n private doOpen(): void {\n this.isHidden = false;\n this.eclPopoverToggle()?.isExpanded.set(true);\n this.openEvent.emit();\n }\n\n private getClosestScrollableParent(element: HTMLElement): HTMLElement {\n let parent = element.parentElement;\n\n while (parent) {\n const { overflowY, overflowX } = getComputedStyle(parent);\n const isScrollableY =\n (overflowY === 'auto' || overflowY === 'scroll') &&\n parent.scrollHeight > parent.clientHeight;\n const isScrollableX =\n (overflowX === 'auto' || overflowX === 'scroll') &&\n parent.scrollWidth > parent.clientWidth;\n\n if (isScrollableY || isScrollableX) {\n return parent; // Found the closest scrollable parent\n }\n\n parent = parent.parentElement;\n }\n\n return this.document.body;\n }\n\n private calculateAvailableSpace(toggleElement: HTMLElement, scrollableParent: HTMLElement | null = null) {\n // Get the bounding rect for the toggle element\n this.toggleRect = toggleElement.getBoundingClientRect();\n\n // If no scrollable parent is provided, use the viewport\n const containerRect = scrollableParent\n ? scrollableParent.getBoundingClientRect()\n : {\n top: 0,\n left: 0,\n right: this.window.innerWidth,\n bottom: this.window.innerHeight,\n };\n const containerWidth = containerRect.right - containerRect.left;\n const containerHeight = containerRect.bottom - containerRect.top;\n // Calculate the space available in the four directions\n const containerBottom = Math.max(\n 0,\n this.window.innerHeight - containerRect.bottom,\n );\n const toggleBottom = Math.max(\n 0,\n this.window.innerHeight - this.toggleRect.bottom,\n );\n const spaceBottom = Math.max(0, toggleBottom - containerBottom);\n\n // Top Space (from toggle's top to container's top)\n const containerTop = Math.max(0, containerRect.top);\n const toggleTop = Math.max(0, this.toggleRect.top);\n const spaceTop = Math.max(0, toggleTop - containerTop);\n\n // Right Space (from toggle's right to container's right)\n const containerRight = Math.max(0, this.window.innerWidth - containerRect.right);\n const toggleRight = Math.max(0, this.window.innerWidth - this.toggleRect.right);\n const spaceRight = Math.max(0, toggleRight - containerRight);\n\n // Left Space (from toggle's left to container's left)\n const containerLeft = Math.max(0, containerRect.left);\n const toggleLeft = Math.max(0, this.toggleRect.left);\n const spaceLeft = Math.max(0, toggleLeft - containerLeft);\n\n return {\n containerWidth,\n containerHeight,\n spaceTop,\n spaceBottom,\n spaceLeft,\n spaceRight,\n };\n }\n\n private checkPosition(): void {\n setTimeout(() => {\n if (!this.isHidden) {\n this.positionPopover();\n }\n });\n }\n\n private positionPopover(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n this.resetStyles();\n\n const { containerWidth, spaceTop, spaceBottom, spaceLeft, spaceRight } =\n this.calculateAvailableSpace(this.eclPopoverToggle()!.getHostElement(), this.scrollableParent);\n\n // Find the direction with the most available space\n const positioningClass = 'ecl-popover--';\n let direction = '';\n\n if (\n spaceTop > spaceBottom &&\n spaceTop > spaceLeft &&\n spaceTop > spaceRight\n ) {\n direction = 'top';\n } else if (spaceBottom > spaceLeft && spaceBottom > spaceRight) {\n direction = 'bottom';\n } else if (spaceLeft > spaceRight) {\n direction = 'left';\n } else {\n direction = 'right';\n }\n\n this.renderer.addClass(this.el.nativeElement, `${positioningClass}${direction}`);\n\n // Try to use as much of the available width, respecting the max-width set.\n const styles = this.window.getComputedStyle(this.eclPopoverScrollableElement()!.nativeElement);\n const maxWidth = parseInt(styles.getPropertyValue('max-width'), 10);\n const minWidth = parseInt(styles.getPropertyValue('min-width'), 10);\n const padding = parseInt(styles.getPropertyValue('padding-left'), 10) * 2;\n\n // We consider 90% of the biggest space available\n const horizontalSpace = Math.max(spaceLeft, spaceRight) * 0.9;\n let targetWidth;\n\n // If the available space is larger than maxWidth (plus padding), set to maxWidth\n if (\n maxWidth + padding < horizontalSpace ||\n (direction !== 'left' &&\n direction !== 'right' &&\n containerWidth > maxWidth)\n ) {\n targetWidth = maxWidth;\n }\n // If the available space is smaller than minWidth (plus padding), set to minWidth\n else if (horizontalSpace < minWidth + padding) {\n targetWidth = minWidth;\n }\n // Otherwise, set the width to the available space minus the padding\n else if (direction === 'left' || direction === 'right') {\n targetWidth = horizontalSpace - padding;\n } else {\n targetWidth = (horizontalSpace - padding) * 2;\n }\n\n // Ensure the width does not exceed available space\n this.renderer.setStyle(this.eclPopoverScrollableElement()!.nativeElement, 'width', `${targetWidth}px`);\n\n this.handlePushClass(direction);\n }\n\n private resetStyles(): void {\n const popoverContainer = this.eclPopoverContainerElement()!.nativeElement;\n this.renderer.removeClass(this.el.nativeElement, this.topClass);\n this.renderer.removeClass(this.el.nativeElement, this.bottomClass);\n this.renderer.removeClass(this.el.nativeElement, this.leftClass);\n this.renderer.removeClass(this.el.nativeElement, this.rightClass);\n this.renderer.removeClass(this.el.nativeElement, this.pushTopClass);\n this.renderer.removeClass(this.el.nativeElement, this.pushBottomClass);\n this.renderer.removeClass(this.el.nativeElement, this.pushLeftClass);\n this.renderer.removeClass(this.el.nativeElement, this.pushRightClass);\n this.renderer.removeStyle(popoverContainer, '--ecl-popover-position');\n this.renderer.removeStyle(popoverContainer, 'top');\n this.renderer.removeStyle(popoverContainer, 'right');\n this.renderer.removeStyle(popoverContainer, 'left');\n this.renderer.removeStyle(popoverContainer, 'bottom');\n this.renderer.removeStyle(popoverContainer, 'transform');\n this.renderer.removeStyle(this.eclPopoverScrollableElement()!.nativeElement, 'width');\n }\n\n /**\n * Check whether the popover is going out of its scrollable container and apply the needed repositioning.\n *\n * @param {string} direction\n */\n handlePushClass(direction: string): void {\n requestAnimationFrame(() => {\n const popoverRect = this.eclPopoverContainerElement()!.nativeElement.getBoundingClientRect();\n const scrollableRect = this.scrollableParent!.getBoundingClientRect();\n const containerBottom =\n scrollableRect.bottom > this.window.innerHeight ? 0 : this.window.innerHeight - scrollableRect.bottom;\n const containerTop =\n scrollableRect.top > this.window.innerHeight ? 0 : scrollableRect.top;\n const leftOverflow = scrollableRect.left > popoverRect.left;\n const rightOverflow = scrollableRect.right < popoverRect.right;\n const topOverflow = popoverRect.top < containerTop;\n const bottomOverflow =\n containerBottom > this.window.innerHeight - popoverRect.bottom;\n\n if (direction === 'left' || direction === 'right') {\n const eclPopoverContainerElement = this.eclPopoverContainerElement()!;\n if (topOverflow) {\n this.renderer.addClass(this.el.nativeElement, this.pushTopClass);\n // Push the popover to the top edge of the container\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'top', `-${Math.round(this.toggleRect.top)}px`);\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'bottom', '');\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'transform', '');\n }\n if (bottomOverflow) {\n this.renderer.addClass(this.el.nativeElement, this.pushBottomClass);\n // Push the popover to the bottom edge of the container\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'bottom', `-${this.window.innerHeight - this.toggleRect.bottom - containerBottom}px`);\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'top', '');\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'transform', '');\n }\n } else {\n const eclPopoverContainerElement = this.eclPopoverContainerElement()!;\n if (leftOverflow) {\n this.renderer.addClass(this.el.nativeElement, this.pushLeftClass);\n // Push the popover 8px to the left edge of the container\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'left', `-${this.toggleRect.left - scrollableRect.left - 8}px`);\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'right', 'auto');\n }\n if (rightOverflow) {\n this.renderer.addClass(this.el.nativeElement, this.pushRightClass);\n // Push the popover 8px to the right edge of the container\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'right', `-${scrollableRect.right - this.toggleRect.right - 8}px`);\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'left', 'auto');\n }\n }\n\n this.handleArrowPosition(direction);\n });\n }\n\n private handleArrowPosition(direction: string): void {\n const popoverRect = this.eclPopoverContainerElement()!.nativeElement.getBoundingClientRect();\n\n if (direction === 'left' || direction === 'right') {\n if (this.el.nativeElement.classList.contains(this.pushBottomClass)) {\n this.renderer.setStyle(this.eclPopoverContainerElement()!.nativeElement, '--ecl-popover-position',\n `${Math.round(this.toggleRect.top - popoverRect.top + this.toggleRect.height / 2)}px`);\n } else if (this.el.nativeElement.classList.contains(this.pushTopClass)) {\n this.renderer.setStyle(this.eclPopoverContainerElement()!.nativeElement, '--ecl-popover-position',\n `${Math.round(popoverRect.top + this.toggleRect.top + this.toggleRect.height / 2)}px`);\n }\n } else {\n\n if (this.el.nativeElement.classList.contains(this.pushRightClass)) {\n this.renderer.setStyle(this.eclPopoverContainerElement()!.nativeElement, '--ecl-popover-position',\n `${Math.round(popoverRect.right - (this.toggleRect.right - this.toggleRect.width / 2))}px`);\n } else if (this.el.nativeElement.classList.contains(this.pushLeftClass)) {\n this.renderer.setStyle(this.eclPopoverContainerElement()!.nativeElement, '--ecl-popover-position',\n `${Math.round(this.toggleRect.left - popoverRect.left + this.toggleRect.width / 2)}px`);\n }\n }\n }\n}\n","<ng-content select=\"[eclPopoverToggle]\"></ng-content>\n\n<div #container class=\"ecl-popover__container\" [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 type=\"button\">\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","import { computed, Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive applied to the content section of an `ecl-popover` component.\n *\n * Responsible for applying the appropriate CSS class to the popover content container.\n */\n@Directive({\n selector: '[eclPopoverContent]',\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclPopoverContentDirective extends ECLBaseDirective {\n /**\n * Host binding that applies the CSS class to style the popover content.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-popover__content'));\n}\n","import { EclPopoverComponent } from './ecl-popover.component';\nimport { EclPopoverContentDirective } from './ecl-popover-content.directive';\nimport { EclPopoverToggleDirective } from './ecl-popover-toggle.directive';\n\nexport * from './ecl-popover.component';\nexport * from './ecl-popover-content.directive';\nexport * from './ecl-popover-toggle.directive';\n\nexport const EUI_ECL_POPOVER = [\n EclPopoverComponent,\n EclPopoverContentDirective,\n EclPopoverToggleDirective,\n] as const;\n"],"mappings":";;;;;;;;;;;AAkBA,IAAa,4BAAb,MAAa,kCAAkC,iBAAgB;CAV/D,cAAA;;EAWI,KAAA,iBAAiB,OAAO,UAAU;EAMzB,KAAA,aAAa,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAM1B,KAAA,QAAQ,OAAM;EAKJ,KAAA,aAAa,eAC5B,MAAM,cAAc,qBAAqB,GAAE,GAAA,YAA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,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA0B,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,YAAA,EAAA,SAAA,eAAA,EAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAA1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EANtC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM,EACF,WAAW,eACd;EACJ,CAAA;;;ACLD,MAAa,kBAAkB;CAC3B;CACA;CACA;AACM"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-popover.mjs","names":[],"sources":["../../components/ecl-popover/ecl-popover-toggle.directive.ts","../../components/ecl-popover/ecl-popover.component.ts","../../components/ecl-popover/ecl-popover.component.html","../../components/ecl-popover/ecl-popover-content.directive.ts","../../components/ecl-popover/index.ts"],"sourcesContent":["import { computed, Directive, ElementRef, inject, output, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive used to toggle the visibility of an `ecl-popover` component.\n *\n * This directive emits a custom click event and manages accessibility attributes.\n */\n@Directive({\n selector: '[eclPopoverToggle]',\n host: {\n '[attr.aria-expanded]': 'isExpanded()',\n '[class]': 'cssClasses()',\n '(mouseup)': 'onClick($event)',\n '(keydown.enter)': 'onKeyboardActivate($event)',\n '(keydown.space)': 'onKeyboardActivate($event)',\n },\n})\nexport class EclPopoverToggleDirective extends ECLBaseDirective {\n hostElementRef = inject(ElementRef);\n\n /**\n * Sets the `aria-expanded` attribute to reflect the popover's open state.\n * This should be updated by the parent popover component.\n */\n readonly isExpanded = signal(false);\n\n /**\n * Event emitted when the toggle element is clicked with the left mouse button.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly click = output();\n\n /**\n * Host binding that applies the appropriate CSS class to the toggle element.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-popover__toggle'));\n\n /**\n * Emits the `click` event only for left mouse button clicks.\n * Used by the popover component to toggle visibility.\n */\n onClick(evt: MouseEvent): void {\n const LEFT_BUTTON = 0;\n\n if (evt.button === LEFT_BUTTON) {\n this.click.emit();\n }\n }\n\n /**\n * Triggers the click event on Enter or Space keydown and prevents default behavior.\n */\n onKeyboardActivate(evt: Event): void {\n evt.preventDefault();\n this.click.emit();\n }\n\n /**\n * Returns the native HTML element of the directive.\n * Used internally by the popover to query attributes.\n */\n public getHostElement(): HTMLElement {\n return this.hostElementRef.nativeElement;\n }\n}\n","import { AfterContentInit, AfterViewInit, Component, computed, DOCUMENT, ElementRef, Injector, OnDestroy, PLATFORM_ID, Renderer2, inject, output, runInInjectionContext, viewChild, contentChild } from '@angular/core';\nimport { auditTime, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ECLClickOutsideDirective } from '@eui/ecl/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclPopoverToggleDirective } from './ecl-popover-toggle.directive';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { isPlatformBrowser } from '@angular/common';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\n\n/**\n * An ECL popover component that shows and hides a floating content panel relative to a toggle trigger.\n * Applied via `ecl-popover`; auto-positions itself (top/bottom/left/right) based on available viewport space.\n *\n * - Toggle trigger: apply `[eclPopoverToggle]` to any child element — clicking it opens/closes the popover.\n * - Content slot: apply `[eclPopoverContent]` to the content element inside the popover.\n * - `openEvent` output: emitted when the popover opens; `closeEvent` output: emitted when it closes.\n * - Closes on outside click (via `ECLClickOutsideDirective`), ESC key, and document scroll.\n */\n@Component({\n selector: 'ecl-popover',\n templateUrl: './ecl-popover.component.html',\n host: {\n '[class]': 'cssClasses()',\n '(eclClickOutside)': 'onClickOutsidePopover()',\n '(document:keydown.escape)': 'onEscapeKeydownHandler()',\n '(document:scroll)': 'onDocumentScroll()',\n },\n hostDirectives: [\n {\n directive: ECLClickOutsideDirective,\n\n outputs: ['eclClickOutside'],\n },\n ],\n imports: [\n ...EUI_ECL_BUTTON,\n ...EUI_ECL_ICON,\n ],\n})\nexport class EclPopoverComponent extends ECLBaseDirective implements AfterViewInit, AfterContentInit, OnDestroy {\n /**\n * Reference to the popover container element.\n */\n readonly eclPopoverContainerElement = viewChild<ElementRef>('container');\n\n /**\n * Reference to the scrollable content element inside the popover.\n */\n readonly eclPopoverScrollableElement = viewChild<ElementRef>('scrollable');\n\n /**\n * Reference to the toggle element used to open/close the popover.\n */\n readonly eclPopoverToggle = contentChild(EclPopoverToggleDirective);\n\n openEvent = output();\n closeEvent = output();\n\n /**\n * Controls visibility of the popover. `true` means hidden.\n */\n protected isHidden = true;\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n\n private readonly topClass = 'ecl-popover--top';\n private readonly bottomClass = 'ecl-popover--bottom';\n private readonly leftClass = 'ecl-popover--left';\n private readonly rightClass = 'ecl-popover--right';\n private readonly pushTopClass = 'ecl-popover--push-top';\n private readonly pushBottomClass = 'ecl-popover--push-bottom';\n private readonly pushLeftClass = 'ecl-popover--push-left';\n private readonly pushRightClass = 'ecl-popover--push-right';\n private toggleRect!: DOMRect;\n private scrollableParent: HTMLElement | null = null;\n private el = inject(ElementRef);\n private renderer = inject(Renderer2);\n private readonly injector = inject(Injector);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView as Window; // null on server; browser-only usage is guarded\n private platformId = inject(PLATFORM_ID);\n\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-popover'));\n\n /**\n * Recalculates popover position when the window is resized.\n */\n ngAfterViewInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n if (this.window) {\n fromEvent(this.window, 'resize').pipe(\n auditTime(50),\n takeUntil(this.destroy$)).subscribe(() => {\n this.checkPosition();\n });\n }\n }\n\n /**\n * Initializes event subscriptions for toggle button.\n */\n ngAfterContentInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n const toggle = this.eclPopoverToggle();\n if (toggle) {\n runInInjectionContext(this.injector, () => outputToObservable(toggle.click))\n .pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.isHidden) {\n this.doOpen();\n } else {\n this.doClose();\n }\n this.checkPosition(); // TODO: wrap on a platformBrowser check as it calls window and document\n });\n }\n\n this.scrollableParent = this.getClosestScrollableParent(toggle?.hostElementRef.nativeElement);\n }\n\n /**\n * Lifecycle hook that cleans up subscriptions on destroy.\n */\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Returns the value of the `aria-controls` attribute from the toggle element,\n * if available. Used for accessibility linking.\n */\n get popoverToggleAriaControls(): string | null {\n return this.eclPopoverToggle()?.hostElementRef.nativeElement.getAttribute('aria-controls');\n }\n\n /**\n * Handler triggered when a click outside the popover is detected.\n * Closes the popover if it is open.\n */\n onClickOutsidePopover(): void {\n if (!this.isHidden) {\n this.doClose();\n }\n }\n\n /**\n * Closes the popover when the Escape key is pressed.\n */\n onEscapeKeydownHandler(): void {\n this.doClose();\n }\n\n /**\n * Recalculates popover position when the document is scrolled.\n */\n onDocumentScroll(): void {\n this.checkPosition();\n }\n\n /**\n * Protected method used to close the popover and reset related styles.\n */\n protected doClose(): void {\n this.isHidden = true;\n this.eclPopoverToggle()?.isExpanded.set(false);\n this.resetStyles();\n this.closeEvent.emit();\n }\n\n private doOpen(): void {\n this.isHidden = false;\n this.eclPopoverToggle()?.isExpanded.set(true);\n this.openEvent.emit();\n }\n\n private getClosestScrollableParent(element: HTMLElement): HTMLElement {\n let parent = element.parentElement;\n\n while (parent) {\n const { overflowY, overflowX } = getComputedStyle(parent);\n const isScrollableY =\n (overflowY === 'auto' || overflowY === 'scroll') &&\n parent.scrollHeight > parent.clientHeight;\n const isScrollableX =\n (overflowX === 'auto' || overflowX === 'scroll') &&\n parent.scrollWidth > parent.clientWidth;\n\n if (isScrollableY || isScrollableX) {\n return parent; // Found the closest scrollable parent\n }\n\n parent = parent.parentElement;\n }\n\n return this.document.body;\n }\n\n private calculateAvailableSpace(toggleElement: HTMLElement, scrollableParent: HTMLElement | null = null) {\n // Get the bounding rect for the toggle element\n this.toggleRect = toggleElement.getBoundingClientRect();\n\n // If no scrollable parent is provided, use the viewport\n const containerRect = scrollableParent\n ? scrollableParent.getBoundingClientRect()\n : {\n top: 0,\n left: 0,\n right: this.window.innerWidth,\n bottom: this.window.innerHeight,\n };\n const containerWidth = containerRect.right - containerRect.left;\n const containerHeight = containerRect.bottom - containerRect.top;\n // Calculate the space available in the four directions\n const containerBottom = Math.max(\n 0,\n this.window.innerHeight - containerRect.bottom,\n );\n const toggleBottom = Math.max(\n 0,\n this.window.innerHeight - this.toggleRect.bottom,\n );\n const spaceBottom = Math.max(0, toggleBottom - containerBottom);\n\n // Top Space (from toggle's top to container's top)\n const containerTop = Math.max(0, containerRect.top);\n const toggleTop = Math.max(0, this.toggleRect.top);\n const spaceTop = Math.max(0, toggleTop - containerTop);\n\n // Right Space (from toggle's right to container's right)\n const containerRight = Math.max(0, this.window.innerWidth - containerRect.right);\n const toggleRight = Math.max(0, this.window.innerWidth - this.toggleRect.right);\n const spaceRight = Math.max(0, toggleRight - containerRight);\n\n // Left Space (from toggle's left to container's left)\n const containerLeft = Math.max(0, containerRect.left);\n const toggleLeft = Math.max(0, this.toggleRect.left);\n const spaceLeft = Math.max(0, toggleLeft - containerLeft);\n\n return {\n containerWidth,\n containerHeight,\n spaceTop,\n spaceBottom,\n spaceLeft,\n spaceRight,\n };\n }\n\n private checkPosition(): void {\n setTimeout(() => {\n if (!this.isHidden) {\n this.positionPopover();\n }\n });\n }\n\n private positionPopover(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n this.resetStyles();\n\n const { containerWidth, spaceTop, spaceBottom, spaceLeft, spaceRight } =\n this.calculateAvailableSpace(this.eclPopoverToggle()!.getHostElement(), this.scrollableParent);\n\n // Find the direction with the most available space\n const positioningClass = 'ecl-popover--';\n let direction = '';\n\n if (\n spaceTop > spaceBottom &&\n spaceTop > spaceLeft &&\n spaceTop > spaceRight\n ) {\n direction = 'top';\n } else if (spaceBottom > spaceLeft && spaceBottom > spaceRight) {\n direction = 'bottom';\n } else if (spaceLeft > spaceRight) {\n direction = 'left';\n } else {\n direction = 'right';\n }\n\n this.renderer.addClass(this.el.nativeElement, `${positioningClass}${direction}`);\n\n // Try to use as much of the available width, respecting the max-width set.\n const styles = this.window.getComputedStyle(this.eclPopoverScrollableElement()!.nativeElement);\n const maxWidth = parseInt(styles.getPropertyValue('max-width'), 10);\n const minWidth = parseInt(styles.getPropertyValue('min-width'), 10);\n const padding = parseInt(styles.getPropertyValue('padding-left'), 10) * 2;\n\n // We consider 90% of the biggest space available\n const horizontalSpace = Math.max(spaceLeft, spaceRight) * 0.9;\n let targetWidth;\n\n // If the available space is larger than maxWidth (plus padding), set to maxWidth\n if (\n maxWidth + padding < horizontalSpace ||\n (direction !== 'left' &&\n direction !== 'right' &&\n containerWidth > maxWidth)\n ) {\n targetWidth = maxWidth;\n // If the available space is smaller than minWidth (plus padding), set to minWidth\n } else if (horizontalSpace < minWidth + padding) {\n targetWidth = minWidth;\n // Otherwise, set the width to the available space minus the padding\n } else if (direction === 'left' || direction === 'right') {\n targetWidth = horizontalSpace - padding;\n } else {\n targetWidth = (horizontalSpace - padding) * 2;\n }\n\n // Ensure the width does not exceed available space\n this.renderer.setStyle(this.eclPopoverScrollableElement()!.nativeElement, 'width', `${targetWidth}px`);\n\n this.handlePushClass(direction);\n }\n\n private resetStyles(): void {\n const popoverContainer = this.eclPopoverContainerElement()!.nativeElement;\n this.renderer.removeClass(this.el.nativeElement, this.topClass);\n this.renderer.removeClass(this.el.nativeElement, this.bottomClass);\n this.renderer.removeClass(this.el.nativeElement, this.leftClass);\n this.renderer.removeClass(this.el.nativeElement, this.rightClass);\n this.renderer.removeClass(this.el.nativeElement, this.pushTopClass);\n this.renderer.removeClass(this.el.nativeElement, this.pushBottomClass);\n this.renderer.removeClass(this.el.nativeElement, this.pushLeftClass);\n this.renderer.removeClass(this.el.nativeElement, this.pushRightClass);\n this.renderer.removeStyle(popoverContainer, '--ecl-popover-position');\n this.renderer.removeStyle(popoverContainer, 'top');\n this.renderer.removeStyle(popoverContainer, 'right');\n this.renderer.removeStyle(popoverContainer, 'left');\n this.renderer.removeStyle(popoverContainer, 'bottom');\n this.renderer.removeStyle(popoverContainer, 'transform');\n this.renderer.removeStyle(this.eclPopoverScrollableElement()!.nativeElement, 'width');\n }\n\n /**\n * Check whether the popover is going out of its scrollable container and apply the needed repositioning.\n *\n * @param {string} direction\n */\n handlePushClass(direction: string): void {\n requestAnimationFrame(() => {\n const popoverRect = this.eclPopoverContainerElement()!.nativeElement.getBoundingClientRect();\n const scrollableRect = this.scrollableParent!.getBoundingClientRect();\n const containerBottom =\n scrollableRect.bottom > this.window.innerHeight ? 0 : this.window.innerHeight - scrollableRect.bottom;\n const containerTop =\n scrollableRect.top > this.window.innerHeight ? 0 : scrollableRect.top;\n const leftOverflow = scrollableRect.left > popoverRect.left;\n const rightOverflow = scrollableRect.right < popoverRect.right;\n const topOverflow = popoverRect.top < containerTop;\n const bottomOverflow =\n containerBottom > this.window.innerHeight - popoverRect.bottom;\n\n if (direction === 'left' || direction === 'right') {\n const eclPopoverContainerElement = this.eclPopoverContainerElement()!;\n if (topOverflow) {\n this.renderer.addClass(this.el.nativeElement, this.pushTopClass);\n // Push the popover to the top edge of the container\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'top', `-${Math.round(this.toggleRect.top)}px`);\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'bottom', '');\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'transform', '');\n }\n if (bottomOverflow) {\n this.renderer.addClass(this.el.nativeElement, this.pushBottomClass);\n // Push the popover to the bottom edge of the container\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'bottom', `-${this.window.innerHeight - this.toggleRect.bottom - containerBottom}px`);\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'top', '');\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'transform', '');\n }\n } else {\n const eclPopoverContainerElement = this.eclPopoverContainerElement()!;\n if (leftOverflow) {\n this.renderer.addClass(this.el.nativeElement, this.pushLeftClass);\n // Push the popover 8px to the left edge of the container\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'left', `-${this.toggleRect.left - scrollableRect.left - 8}px`);\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'right', 'auto');\n }\n if (rightOverflow) {\n this.renderer.addClass(this.el.nativeElement, this.pushRightClass);\n // Push the popover 8px to the right edge of the container\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'right', `-${scrollableRect.right - this.toggleRect.right - 8}px`);\n this.renderer.setStyle(eclPopoverContainerElement.nativeElement, 'left', 'auto');\n }\n }\n\n this.handleArrowPosition(direction);\n });\n }\n\n private handleArrowPosition(direction: string): void {\n const popoverRect = this.eclPopoverContainerElement()!.nativeElement.getBoundingClientRect();\n\n if (direction === 'left' || direction === 'right') {\n if (this.el.nativeElement.classList.contains(this.pushBottomClass)) {\n this.renderer.setStyle(this.eclPopoverContainerElement()!.nativeElement, '--ecl-popover-position',\n `${Math.round(this.toggleRect.top - popoverRect.top + this.toggleRect.height / 2)}px`);\n } else if (this.el.nativeElement.classList.contains(this.pushTopClass)) {\n this.renderer.setStyle(this.eclPopoverContainerElement()!.nativeElement, '--ecl-popover-position',\n `${Math.round(popoverRect.top + this.toggleRect.top + this.toggleRect.height / 2)}px`);\n }\n } else {\n\n if (this.el.nativeElement.classList.contains(this.pushRightClass)) {\n this.renderer.setStyle(this.eclPopoverContainerElement()!.nativeElement, '--ecl-popover-position',\n `${Math.round(popoverRect.right - (this.toggleRect.right - this.toggleRect.width / 2))}px`);\n } else if (this.el.nativeElement.classList.contains(this.pushLeftClass)) {\n this.renderer.setStyle(this.eclPopoverContainerElement()!.nativeElement, '--ecl-popover-position',\n `${Math.round(this.toggleRect.left - popoverRect.left + this.toggleRect.width / 2)}px`);\n }\n }\n }\n}\n","<ng-content select=\"[eclPopoverToggle]\"></ng-content>\n\n<div #container class=\"ecl-popover__container\" [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 type=\"button\">\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","import { computed, Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive applied to the content section of an `ecl-popover` component.\n *\n * Responsible for applying the appropriate CSS class to the popover content container.\n */\n@Directive({\n selector: '[eclPopoverContent]',\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclPopoverContentDirective extends ECLBaseDirective {\n /**\n * Host binding that applies the CSS class to style the popover content.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-popover__content'));\n}\n","import { EclPopoverComponent } from './ecl-popover.component';\nimport { EclPopoverContentDirective } from './ecl-popover-content.directive';\nimport { EclPopoverToggleDirective } from './ecl-popover-toggle.directive';\n\nexport * from './ecl-popover.component';\nexport * from './ecl-popover-content.directive';\nexport * from './ecl-popover-toggle.directive';\n\nexport const EUI_ECL_POPOVER = [\n EclPopoverComponent,\n EclPopoverContentDirective,\n EclPopoverToggleDirective,\n] as const;\n"],"mappings":";;;;;;;;;;;AAkBA,IAAa,4BAAb,MAAa,kCAAkC,iBAAgB;CAV/D,cAAA;;EAWI,KAAA,iBAAiB,OAAO,UAAU;EAMzB,KAAA,aAAa,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAM1B,KAAA,QAAQ,OAAM;EAKJ,KAAA,aAAa,eAC5B,MA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AA;EAAA,CAAA;CAAA;CAA1B;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA0B,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,YAAA,EAAA,SAAA,eAAA,EAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAA1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EANtC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM,EACF,WAAW,eACd;EACJ,CAAA;;;ACLD,MAAa,kBAAkB;CAC3B;CACA;CACA;AACM"}
@@ -40,7 +40,7 @@ i0.ɵɵngDeclareClassMetadata({
40
40
  type: Directive,
41
41
  args: [{
42
42
  selector: "ol[eclQuizList]",
43
- host: { "class": "ecl-quiz__list" }
43
+ host: { class: "ecl-quiz__list" }
44
44
  }]
45
45
  }]
46
46
  });
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-quiz.mjs","names":[],"sources":["../../components/ecl-quiz/ecl-quiz-card.component.ts","../../components/ecl-quiz/ecl-quiz-card.component.html","../../components/ecl-quiz/ecl-quiz.component.ts","../../components/ecl-quiz/ecl-quiz.component.html","../../components/ecl-quiz/index.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n ElementRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { TranslatePipe } from '@ngx-translate/core';\n\nexport interface EclQuizCardFlipEvent {\n flipped: boolean;\n selectedOptionIndex?: number;\n isCorrect?: boolean;\n}\n\n/**\n * Structural directive that marks an `<ol>` element as the ECL quiz option list.\n * Applies the `ecl-quiz__list` class to the host and is consumed by `EclQuizComponent`\n * to query its child `EclQuizCardComponent` items.\n * Applied via `ol[eclQuizList]`.\n */\n@Directive({\n selector: 'ol[eclQuizList]',\n host: {\n 'class': 'ecl-quiz__list',\n },\n})\nexport class EclQuizListDirective {}\n\n/**\n * ECL Quiz Card component – represents a single card in the quiz.\n *\n * For the 'reveal' variant, the entire card is clickable to flip.\n * For the 'poll' variant, individual options trigger the flip.\n */\n@Component({\n selector: 'li[eclQuizCard]',\n host: {\n '[attr.id]': 'id()',\n '[attr.aria-labelledby]': 'questionId()',\n '[class]': 'cssClasses()',\n '[attr.tabindex]': 'tabIndex()',\n '[style.transform]': 'styleTransform',\n '(click)': 'onClick()',\n '(keydown)': 'onKeydown($event)',\n },\n templateUrl: './ecl-quiz-card.component.html',\n imports: [EclIconComponent, TranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EclQuizCardComponent extends ECLBaseDirective {\n\n /**\n * Unique identifier for the card, used for accessibility attributes.\n * If not provided, a unique ID is generated automatically.\n */\n readonly id = input<string>(`ecl-quiz-card-${crypto.randomUUID()}`);\n\n /**\n * The question text displayed on the front of the card.\n */\n readonly question = input<string>('');\n\n /**\n * The answer text displayed on the back of the card.\n * Used in 'reveal' variant or as explanation in 'poll' variant.\n */\n readonly answer = input<string>('');\n\n /**\n * The answer title (e.g. \"The correct answer is A.\") for poll variant.\n */\n readonly answerTitle = input<string>('');\n\n /**\n * Image source for the card. When set together with a supported\n * {@link imageDisplay} mode, a picture is rendered on the card.\n */\n readonly imageSrc = input<string>('');\n\n /**\n * Alternative text for the card image.\n */\n readonly imageAlt = input<string>('');\n\n /**\n * Controls where the image/illustration is displayed:\n * - 'none': no image (default)\n * - 'back': image only on the back; for poll variant an animated\n * question-mark illustration is shown on the front\n * - 'always': image on both front and back\n */\n readonly imageDisplay = input<'none' | 'back' | 'always'>('none');\n\n /**\n * Icon name for the card header.\n * Defaults to 'sparkle' for reveal, 'question-mark' for poll.\n */\n readonly icon = input<string>('');\n\n /**\n * Icon size for the card header. When empty, a variant-based default is\n * used ('xl' for poll, 'l' for reveal).\n */\n readonly iconSize = input<'' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl'>('');\n\n /**\n * The variant of the quiz, set by the parent EclQuizComponent.\n */\n readonly variant = signal<'poll' | 'reveal'>('reveal');\n\n /**\n * Options for the poll variant. Each option has text and a match flag.\n */\n readonly options = input<{ text: string; match: boolean }[]>([]);\n\n /**\n * Whether this is the first card in the quiz.\n * Set by the parent EclQuizComponent to render skip-instructions only once.\n */\n readonly isFirstCard = signal(false);\n\n /** Whether the card is currently flipped (showing back). */\n readonly isFlipped = signal(false);\n\n /**\n * Emitted when the card is flipped.\n */\n readonly cardFlip = output<EclQuizCardFlipEvent>();\n\n protected readonly questionId = computed(() => `${this.id()}-question`);\n protected readonly answerId = computed(() => `${this.id()}-answer`);\n\n /** Whether a picture is available to render. */\n protected readonly hasPicture = computed(() => !!this.imageSrc());\n\n /** Whether the picture should be rendered on the front face. */\n protected showFrontPicture = computed(() => this.hasPicture() && this.imageDisplay() === 'always');\n\n /** Whether the picture should be rendered on the back face. */\n protected showBackPicture = computed(\n () => this.hasPicture() && (this.imageDisplay() === 'always' || this.imageDisplay() === 'back'),\n );\n\n /**\n * Whether the animated question-mark illustration should be shown on the\n * front of a poll card (poll variant with 'back' image display).\n */\n protected showIllustration = computed(() => this.variant() === 'poll' && this.imageDisplay() === 'back');\n\n /** Indices used to render the illustration's repeated question-mark shapes. */\n protected readonly illustrationMarks = Array.from({ length: 18 }, (_unused, i) => i + 1);\n\n /** Index of the selected option (poll variant). */\n protected readonly selectedOptionIndex = signal<number | null>(null);\n\n /** Whether the selected option is correct (poll variant). */\n protected readonly isCorrect = signal<boolean | null>(null);\n protected readonly styleTransform = 'translate3d(0px, 0px, 0px)';\n\n private readonly frontElementRef = viewChild<ElementRef>('frontElement');\n private readonly backElementRef = viewChild<ElementRef>('backElement');\n private readonly questionElementRef = viewChild<ElementRef>('questionElement');\n private readonly answerElementRef = viewChild<ElementRef>('answerElement');\n private readonly contentElementRef = viewChild<ElementRef>('contentElement');\n private readonly answerTitleRef = viewChild<ElementRef>('answerTitleEl');\n\n /** Get the native front element for height calculations. */\n getFrontElement(): HTMLElement | null {\n return this.frontElementRef()?.nativeElement ?? null;\n }\n\n /** Get the native back element for height calculations. */\n getBackElement(): HTMLElement | null {\n return this.backElementRef()?.nativeElement ?? null;\n }\n\n /** Get the native question element for height calculations. */\n getQuestionElement(): HTMLElement | null {\n return this.questionElementRef()?.nativeElement ?? null;\n }\n\n /** Get the native answer element for height calculations. */\n getAnswerElement(): HTMLElement | null {\n return this.answerElementRef()?.nativeElement ?? null;\n }\n\n /** Get the native content element for height calculations. */\n getContentElement(): HTMLElement | null {\n return this.contentElementRef()?.nativeElement ?? null;\n }\n\n /** Get all radio inputs in this card. */\n getRadioInputs(): HTMLInputElement[] {\n const el = this.frontElementRef()?.nativeElement;\n if (!el) {\n return [];\n }\n return Array.from(el.querySelectorAll('input[type=\"radio\"]'));\n }\n\n /** Get the first radio input in this card. */\n getFirstRadioInput(): HTMLInputElement | null {\n return this.getRadioInputs()[0] ?? null;\n }\n\n /** Get the last radio input in this card. */\n getLastRadioInput(): HTMLInputElement | null {\n const inputs = this.getRadioInputs();\n return inputs[inputs.length - 1] ?? null;\n }\n\n protected readonly cssClasses = computed<string>(() =>\n [\n super.getCssClasses('ecl-quiz-card'),\n this.isFlipped() ? 'ecl-quiz-card__flipped' : '',\n ]\n .join(' ')\n .trim());\n\n protected readonly tabIndex = computed<number | null>(() => (this.variant() === 'reveal' ? 0 : null));\n\n /** Get the resolved icon name based on variant. */\n protected getIconName(): string {\n if (this.icon()) {\n return this.icon();\n }\n return this.variant() === 'poll' ? 'question-mark' : 'sparkle';\n }\n\n /** Get the resolved icon size. */\n protected getIconSize(): string {\n return this.iconSize() || (this.variant() === 'poll' ? 'xl' : 'l');\n }\n\n /**\n * Handle click on the card itself (reveal variant).\n */\n protected onClick(): void {\n if (this.variant() === 'reveal') {\n this.flipCard();\n }\n }\n\n /**\n * Handle keyboard events (Enter/Space to flip for reveal variant).\n */\n protected onKeydown(event: KeyboardEvent): void {\n if (this.variant() === 'reveal' && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n this.flipCard();\n }\n }\n\n /**\n * Handle option click (poll variant).\n */\n protected onOptionClick(optionIndex: number): void {\n if (this.isFlipped()) {\n return;\n }\n const optionsList = this.options();\n this.selectedOptionIndex.set(optionIndex);\n this.isCorrect.set(optionsList[optionIndex]?.match ?? false);\n this.flipCard();\n this.focusAnswerTitleAfterFlip();\n }\n\n /**\n * Handle keyboard on option (poll variant).\n */\n protected onOptionKeydown(event: KeyboardEvent, optionIndex: number): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.onOptionClick(optionIndex);\n }\n }\n\n /**\n * Flip the card between front and back.\n */\n private flipCard(): void {\n this.isFlipped.update(v => !v);\n const event: EclQuizCardFlipEvent = { flipped: this.isFlipped() };\n if (this.variant() === 'poll') {\n event.selectedOptionIndex = this.selectedOptionIndex() ?? undefined;\n event.isCorrect = this.isCorrect() ?? undefined;\n }\n this.cardFlip.emit(event);\n }\n\n /**\n * Focus the answer title after the card flips in poll variant.\n * Uses requestAnimationFrame to ensure the DOM has updated (inert removed from back face).\n */\n private focusAnswerTitleAfterFlip(): void {\n requestAnimationFrame(() => {\n const ref = this.answerTitleRef();\n if (ref?.nativeElement) {\n ref.nativeElement.focus();\n }\n });\n }\n}\n","<article class=\"ecl-quiz-card__content\" #contentElement>\n <!-- Front face -->\n <div class=\"ecl-quiz-card__front\" #frontElement [hidden]=\"isFlipped()\" [inert]=\"isFlipped()\">\n @if (showFrontPicture()) {\n <picture class=\"ecl-picture ecl-quiz-card__picture\">\n <img class=\"ecl-quiz-card__image\" [src]=\"imageSrc()\" [alt]=\"imageAlt()\">\n </picture>\n } @else if (showIllustration()) {\n <div class=\"ecl-quiz-card__illustration-container\">\n <svg viewBox=\"0 0 500 140\" preserveAspectRatio=\"none\" aria-hidden=\"true\"\n class=\"ecl-quiz-card__illustration\">\n <defs>\n <g id=\"question-mark\">\n <path\n d=\"M0 0c0 4.343-3.728 7.939-8.531 8.464V9.75a1.22 1.22 0 0 1-2.438 0V7.313a1.22 1.22 0 0 1 1.219-1.22c4.033 0 7.312-2.732 7.312-6.093s-3.279-6.094-7.312-6.094-7.312 2.733-7.312 6.094a1.22 1.22 0 0 1-2.438 0c0-4.704 4.374-8.531 9.75-8.531S0-4.704 0 0Zm-9.75 14.625a2.438 2.438 0 1 0 0 4.875 2.438 2.438 0 0 0 0-4.875Z\" />\n </g>\n </defs>\n @for (mark of illustrationMarks; track mark) {\n <use href=\"#question-mark\" [attr.class]=\"'qm qm-' + mark\" />\n }\n </svg>\n </div>\n }\n <div class=\"ecl-quiz-card__padded\">\n <div class=\"ecl-quiz-card__header\">\n @if (!showIllustration()) {\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon [icon]=\"getIconName()\" [size]=\"getIconSize()\" iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n }\n </div>\n\n @if (variant() === 'reveal') {\n <div class=\"ecl-quiz-card__question\" [id]=\"questionId()\" #questionElement>{{ question() }}</div>\n <!-- Reveal variant: flip label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.REVEAL-ANSWER' | translate }}\n <ecl-icon iconSet=\"phosphor\" icon=\"arrow-clockwise\" size=\"m\"></ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: options -->\n <fieldset [attr.aria-describedby]=\"isFirstCard() ? id() + '-skip-instructions' : null\">\n <legend class=\"ecl-quiz-card__question\" [id]=\"questionId()\" #questionElement>{{ question() }}</legend>\n <ol class=\"ecl-quiz-card__options\" type=\"A\">\n @for (option of options(); let i = $index; track i) {\n <li class=\"ecl-quiz-card__option\" [attr.data-match]=\"option.match\" (mouseup)=\"onOptionClick(i)\">\n <label class=\"ecl-quiz-card__label\">\n <input type=\"radio\" [name]=\"id() + '-options'\" [attr.data-match]=\"option.match\"\n [attr.tabindex]=\"isFlipped() ? -1 : null\" (keydown)=\"onOptionKeydown($event, i)\">\n {{ option.text }}</label>\n @if (i === 0 && isFirstCard()) {\n <span class=\"ecl-quiz__skip\" [id]=\"id() + '-skip-instructions'\">{{ 'ecl.quiz.SKIP-INSTRUCTIONS' |\n translate }}</span>\n }\n </li>\n }\n </ol>\n </fieldset>\n }\n </div>\n </div>\n\n <!-- Back face -->\n <div class=\"ecl-quiz-card__back\" #backElement [hidden]=\"!isFlipped()\" [inert]=\"!isFlipped()\" style\n [class.ecl-quiz-card--correct]=\"variant() === 'poll' && isCorrect() === true\">\n @if (showBackPicture()) {\n <picture class=\"ecl-picture ecl-quiz-card__picture\">\n <img class=\"ecl-quiz-card__image\" [src]=\"imageSrc()\" [alt]=\"imageAlt()\">\n </picture>\n }\n <div class=\"ecl-quiz-card__padded\">\n <div class=\"ecl-quiz-card__header\">\n @if (variant() === 'reveal') {\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon [icon]=\"getIconName()\" [size]=\"getIconSize()\" iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: success/error icons -->\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon icon=\"check-circle\" iconSet=\"phosphor\" size=\"xl\" class=\"ecl-quiz-card__icon--success\">\n </ecl-icon>\n <ecl-icon icon=\"x-circle\" size=\"xl\" iconSet=\"phosphor\" class=\"ecl-quiz-card__icon--error\">\n </ecl-icon>\n </div>\n }\n </div>\n\n <div class=\"ecl-quiz-card__answer\" [id]=\"answerId()\" #answerElement>\n <div class=\"ecl-quiz-card__answer-content\">\n @if (answerTitle()) {\n <div class=\"ecl-quiz-card__answer-title\" tabindex=\"0\" #answerTitleEl>{{ answerTitle() }}</div>\n }\n {{ answer() }}\n </div>\n </div>\n\n @if (variant() === 'reveal') {\n <!-- Reveal variant: go back label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.FLIP-BACK' | translate }}\n <ecl-icon icon=\"arrow-clockwise\" size=\"m\" iconSet=\"phosphor\"></ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: options list on back (showing selected state) -->\n <ol class=\"ecl-quiz-card__options\" type=\"A\">\n @for (option of options(); let i = $index; track i) {\n <li class=\"ecl-quiz-card__option\" [class.ecl-quiz-card__option--selected]=\"selectedOptionIndex() === i\"\n [attr.data-match]=\"option.match\">\n @if (selectedOptionIndex() === i) {\n @if (!option.match) {\n <span class=\"ecl-quiz-card__option-assistive-label\">{{ 'ecl.quiz.YOUR-INCORRECT-ANSWER' | translate }}</span>\n }\n @if (option.match) {\n <span class=\"ecl-quiz-card__option-assistive-label\">{{ 'ecl.quiz.YOUR-CORRECT-ANSWER' | translate }}</span>\n }\n } @else if (option.match) {\n <span class=\"ecl-quiz-card__option-assistive-label\">{{ 'ecl.quiz.CORRECT-ANSWER' | translate }}</span>\n }\n {{ option.text }}\n @if (selectedOptionIndex() === i && !option.match) {\n <span class=\"ecl-quiz-card__option-icon\">\n <ecl-icon icon=\"x-circle\" size=\"s\" iconSet=\"phosphor\"\n class=\"ecl-quiz-card__option-icon--error\"></ecl-icon>\n </span>\n }\n @if (option.match) {\n <span class=\"ecl-quiz-card__option-icon\">\n <ecl-icon icon=\"check-circle\" size=\"s\" iconSet=\"phosphor\"\n class=\"ecl-quiz-card__option-icon--success\"></ecl-icon>\n </span>\n }\n </li>\n }\n </ol>\n }\n </div>\n </div>\n</article>\n","import {\n AfterContentInit,\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n ContentChildren,\n ElementRef,\n forwardRef,\n inject,\n input,\n OnDestroy,\n QueryList,\n signal,\n viewChild,\n} from '@angular/core';\nimport { EUI_ECL_SLIDER } from '@eui/ecl/components/ecl-slider';\nimport { ECLBaseDirective, EclRtlService } from '@eui/ecl/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { EmblaCarouselDirective } from 'embla-carousel-angular';\nimport { EmblaCarouselType, EmblaEventType } from 'embla-carousel';\nimport { Subject, takeUntil } from 'rxjs';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { EclQuizCardComponent } from './ecl-quiz-card.component';\n\n/**\n * An ECL quiz carousel component that renders a sequence of `li[eclQuizCard]` cards with navigation dots and previous/next buttons.\n * Uses Embla Carousel for slide animation, matching the ECL vanilla implementation.\n * Applied via `section[eclQuiz]`.\n *\n * - `variant` input: `'reveal'` (default, flip cards) | `'poll'` (multiple-choice); propagated to all child cards.\n * - `eclTitle` and `eclDescription`: heading and description text rendered above the carousel.\n * - `isFullWidth` (default `false`): expands the component to full container width.\n * - `hasBackground` (default `false`): adds a background fill behind the quiz.\n * - Cards are projected as `li[eclQuizCard]` children; wrap them in `ol[eclQuizList]` for semantic list structure.\n */\n@Component({\n selector: 'section[eclQuiz]',\n templateUrl: './ecl-quiz.component.html',\n host: {\n '[class]': 'cssClasses()',\n '(keydown)': 'onKeydown($event)',\n },\n imports: [\n ...EUI_ECL_SLIDER,\n EmblaCarouselDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EclQuizComponent extends ECLBaseDirective implements AfterContentInit, AfterViewInit, OnDestroy {\n\n /** Quiz variant: 'reveal' for flip cards, 'poll' for multiple choice. */\n readonly variant = input<'poll' | 'reveal'>('reveal');\n\n /** Title displayed in the quiz header. */\n readonly eclTitle = input<string>('');\n\n /** Description displayed below the title. */\n readonly eclDescription = input<string>('');\n\n readonly isFullWidth = input(false, { transform: booleanAttribute });\n\n readonly hasBackground = input(false, { transform: booleanAttribute });\n\n /** Embla carousel options matching ECL's configuration. */\n protected emblaOptions: { loop: boolean; align: 'start'; direction: 'ltr' | 'rtl' } = { loop: false, align: 'start', direction: 'ltr' };\n\n /** Subscribed Embla events. */\n protected subscribeToEvents: EmblaEventType[] = ['select', 'init', 'reInit'];\n\n /** Current snap index. */\n protected readonly activeIndex = signal(0);\n\n /** Total number of snap points. */\n protected readonly totalSnaps = signal(0);\n\n /** Counter text for mobile display. */\n protected readonly counterText = signal('');\n\n /** Whether the previous button is disabled. */\n protected readonly prevDisabled = signal(true);\n\n /** Whether the next button is disabled. */\n protected readonly nextDisabled = signal(true);\n\n /** Whether navigation controls should be shown. */\n protected readonly showControls = signal(false);\n\n @ContentChildren(forwardRef(() => EclQuizCardComponent), { descendants: true })\n private cards!: QueryList<EclQuizCardComponent>;\n\n private readonly emblaRef = viewChild(EmblaCarouselDirective);\n\n private readonly cd = inject(ChangeDetectorRef);\n private readonly eclRtlService = inject(EclRtlService);\n private readonly hostRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly translate = inject(TranslateService);\n private readonly destroy$ = new Subject<void>();\n private emblaApi: EmblaCarouselType | undefined;\n\n protected readonly cssClasses = computed<string>(() =>\n [\n super.getCssClasses('ecl-quiz'),\n `ecl-quiz--${this.variant()}`,\n this.hasBackground() ? 'ecl-quiz--background' : '',\n this.isFullWidth() ? 'ecl-quiz--full-width' : '',\n ]\n .join(' ')\n .trim());\n\n /** Whether any snap point groups multiple slides. */\n protected readonly hasGroupedSlides = signal(false);\n\n /** Total number of individual slides (cards). */\n protected readonly totalSlides = signal(0);\n\n /** Number of visible slides per snap. */\n protected readonly slidesPerSnap = signal(1);\n\n /** Returns the aria-label for a dot button at the given snap index. */\n protected getDotAriaLabel(dotIndex: number): { key: string; params: Record<string, number> } {\n const totalSlidesCount = this.totalSlides();\n const totalSnapsCount = this.totalSnaps();\n\n if (this.hasGroupedSlides()) {\n const visibleSlides = totalSlidesCount - (totalSnapsCount - 1);\n const start = dotIndex + 1;\n const end = Math.min(dotIndex + visibleSlides, totalSlidesCount);\n return {\n key: 'ecl.quiz.GO-TO-SLIDES',\n params: { start, end, total: totalSlidesCount },\n };\n }\n return {\n key: 'ecl.quiz.GO-TO-SLIDE',\n params: { current: dotIndex + 1, total: totalSlidesCount },\n };\n }\n\n /** Returns an array of indices for dot rendering. */\n protected getDotIndices(): number[] {\n return Array.from({ length: this.totalSnaps() }, (_, i) => i);\n }\n\n /**\n * Pre-translated accessible label for each dot, passed to the shared slider pager.\n * Depends on the current slide grouping, so it is computed here (where that\n * information lives) and translated imperatively.\n */\n protected readonly dotAriaLabels = computed<string[]>(() => {\n // Read totalSnaps so the computed re-evaluates when the dot count changes.\n const total = this.totalSnaps();\n return Array.from({ length: total }, (_unused, dotIndex) => {\n const { key, params } = this.getDotAriaLabel(dotIndex);\n return this.translate.instant(key, params);\n });\n });\n\n /** Called by the emblaChange event from the directive. */\n protected onEmblaChange(eventName: string): void {\n if (!this.emblaApi) {\n this.emblaApi = this.emblaRef()?.emblaApi ?? undefined;\n }\n if (!this.emblaApi) {\n return;\n }\n\n if (eventName === 'select' || eventName === 'init' || eventName === 'reInit') {\n this.syncState();\n }\n\n if (eventName === 'reInit') {\n this.checkHeight();\n }\n }\n\n /** Handle keyboard events. */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.escapeSlider();\n return;\n }\n\n if (this.variant() === 'poll' && event.key === 'Tab') {\n this.handlePollTabNavigation(event);\n }\n }\n\n /** Navigate to the previous snap. */\n protected onPrevClick(): void {\n const embla = this.emblaRef();\n if (embla) {\n embla.scrollPrev();\n }\n }\n\n /** Navigate to the next snap. */\n protected onNextClick(): void {\n const embla = this.emblaRef();\n if (embla) {\n embla.scrollNext();\n }\n }\n\n /** Navigate to a specific snap index. */\n protected goTo(index: number): void {\n const embla = this.emblaRef();\n if (embla) {\n embla.scrollTo(index);\n }\n }\n\n ngAfterContentInit(): void {\n if (this.cards && this.cards.length > 1) {\n this.showControls.set(true);\n }\n this.propagateVariant();\n this.subscribeToCardFlips();\n this.cards.changes.subscribe(() => {\n this.propagateVariant();\n this.subscribeToCardFlips();\n });\n\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((isRtl) => {\n const direction = isRtl ? 'rtl' : 'ltr';\n if (this.emblaOptions.direction !== direction) {\n this.emblaOptions = { ...this.emblaOptions, direction };\n this.cd.detectChanges();\n }\n });\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n this.initEmbla();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** Initialize Embla and wire up state syncing. */\n private initEmbla(): void {\n const embla = this.emblaRef();\n if (!embla) {\n return;\n }\n\n this.emblaApi = embla.emblaApi ?? undefined;\n\n if (!this.emblaApi) {\n return;\n }\n\n this.syncState();\n this.checkHeight();\n this.cd.detectChanges();\n }\n\n /** Sync component state from Embla API. */\n private syncState(): void {\n if (!this.emblaApi) {\n return;\n }\n\n // Array of scroll-progress values (0 to 1), one per snap point.\n // Its length equals the number of positions the carousel can settle on (i.e. total dots).\n const snapList = this.emblaApi.scrollSnapList();\n const selectedSnap = this.emblaApi.selectedScrollSnap();\n const canScrollPrev = this.emblaApi.canScrollPrev();\n const canScrollNext = this.emblaApi.canScrollNext();\n // Number of individual slide elements in the carousel\n const slideCount = this.emblaApi.slideNodes().length;\n\n this.totalSnaps.set(snapList.length);\n this.activeIndex.set(selectedSnap);\n this.prevDisabled.set(!canScrollPrev);\n this.nextDisabled.set(!canScrollNext);\n this.showControls.set(canScrollPrev || canScrollNext);\n this.totalSlides.set(slideCount);\n this.hasGroupedSlides.set(slideCount > snapList.length);\n this.slidesPerSnap.set(snapList.length > 0 ? slideCount - (snapList.length - 1) : 1);\n\n this.updateCounter();\n }\n\n /** Update the counter text (mobile). */\n private updateCounter(): void {\n const total = this.totalSnaps();\n const current = this.activeIndex() + 1;\n this.counterText.set(`${current} / ${total}`);\n }\n\n /** Move focus to the last dot button when Escape is pressed. */\n private escapeSlider(): void {\n const dots = this.hostRef.nativeElement.querySelectorAll<HTMLElement>(\n '.ecl-slider-pager__dot',\n );\n if (dots.length > 0) {\n const lastDot = dots[dots.length - 1];\n lastDot.focus();\n }\n }\n\n /** Subscribe to cardFlip events on all cards to detect when all are flipped. */\n private subscribeToCardFlips(): void {\n if (this.variant() !== 'poll') {\n return;\n }\n this.cards?.forEach(card => {\n outputToObservable(card.cardFlip).pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.checkAllCardsFlipped();\n });\n });\n }\n\n /**\n * Hook invoked when a poll card flips. The category/sr-status tabindex\n * management was removed in line with upstream ECL (PR #4681), so there is\n * no longer per-card state to propagate here. Retained as an extension\n * point for future \"all cards flipped\" behaviour.\n */\n private checkAllCardsFlipped(): void {\n // Intentionally left blank.\n }\n\n /**\n * Equalizes the height of all cards based on the tallest content.\n * Mirrors the ECL vanilla `checkHeight()` logic.\n */\n private checkHeight(): void {\n if (!this.cards || this.cards.length === 0) {\n return;\n }\n\n let maxTextHeight = 0;\n let maxHeight = 0;\n\n const cardsArray = this.cards.toArray();\n\n // First pass: find the tallest question/answer text\n cardsArray.forEach((card) => {\n const frontEl = card.getFrontElement();\n const backEl = card.getBackElement();\n const questionEl = card.getQuestionElement();\n const answerEl = card.getAnswerElement();\n\n if (!frontEl || !backEl || !questionEl || !answerEl) {\n return;\n }\n\n frontEl.style.position = 'static';\n backEl.style.position = 'static';\n\n questionEl.style.minHeight = '';\n answerEl.style.minHeight = '';\n\n const heightQuestion = questionEl.scrollHeight;\n const heightAnswer = answerEl.scrollHeight;\n const heightText = Math.max(heightQuestion, heightAnswer);\n\n if (heightText > maxTextHeight) {\n maxTextHeight = heightText;\n }\n\n frontEl.style.position = '';\n backEl.style.position = '';\n });\n\n // Second pass: apply min-height and find tallest card\n cardsArray.forEach((card) => {\n const frontEl = card.getFrontElement();\n const backEl = card.getBackElement();\n const questionEl = card.getQuestionElement();\n const answerEl = card.getAnswerElement();\n const contentEl = card.getContentElement();\n\n if (!frontEl || !backEl || !questionEl || !answerEl || !contentEl) {\n return;\n }\n\n frontEl.style.position = 'static';\n backEl.style.position = 'static';\n contentEl.style.height = '';\n\n questionEl.style.minHeight = maxTextHeight + 'px';\n answerEl.style.minHeight = maxTextHeight + 'px';\n\n const heightFront = frontEl.scrollHeight;\n const heightBack = backEl.scrollHeight;\n const height = Math.max(heightFront, heightBack);\n\n const minHeight = parseFloat(getComputedStyle(frontEl).getPropertyValue('min-height')) || 345;\n\n if (height > minHeight && height > maxHeight) {\n maxHeight = height;\n }\n\n frontEl.style.position = '';\n backEl.style.position = '';\n });\n\n // Third pass: apply uniform height\n if (maxHeight > 0) {\n cardsArray.forEach((card) => {\n const contentEl = card.getContentElement();\n if (contentEl) {\n contentEl.style.height = maxHeight + 'px';\n }\n });\n }\n }\n\n /**\n * Handle Tab/Shift+Tab navigation between unflipped poll cards.\n * Tab from a radio input jumps to the first radio of the next unflipped card.\n * Shift+Tab from a radio input jumps to the last radio of the previous unflipped card.\n * If no unflipped card is found in that direction, native Tab takes over.\n */\n private handlePollTabNavigation(event: KeyboardEvent): void {\n const target = event.target as HTMLElement;\n\n if (!(target instanceof HTMLInputElement) || target.type !== 'radio') {\n return;\n }\n\n const cardsArray = this.cards.toArray();\n\n const currentCardIndex = cardsArray.findIndex(card => {\n const radios = card.getRadioInputs();\n return radios.includes(target);\n });\n\n if (currentCardIndex === -1) {\n return;\n }\n\n if (event.shiftKey) {\n for (let i = currentCardIndex - 1; i >= 0; i--) {\n if (!cardsArray[i].isFlipped()) {\n event.preventDefault();\n this.goTo(i);\n const lastInput = cardsArray[i].getLastRadioInput();\n if (lastInput) {\n lastInput.focus();\n }\n return;\n }\n }\n } else {\n for (let i = currentCardIndex + 1; i < cardsArray.length; i++) {\n if (!cardsArray[i].isFlipped()) {\n event.preventDefault();\n this.goTo(i);\n const firstInput = cardsArray[i].getFirstRadioInput();\n if (firstInput) {\n firstInput.focus();\n }\n return;\n }\n }\n }\n }\n\n /** Propagate the variant to all child cards. */\n private propagateVariant(): void {\n const v = this.variant();\n this.cards?.forEach((card, index) => {\n card.variant.set(v);\n card.isFirstCard.set(index === 0);\n });\n }\n}\n","@if (eclTitle() || eclDescription()) {\n<div class=\"ecl-quiz__header\">\n @if (eclTitle()) {\n <div class=\"ecl-quiz__title\">{{ eclTitle() }}</div>\n }\n @if (eclDescription()) {\n <div class=\"ecl-quiz__description\">{{ eclDescription() }}</div>\n }\n</div>\n}\n\n<div class=\"ecl-quiz__viewport\" data-ecl-quiz-slider\n role=\"region\"\n aria-label=\"Quiz slider\"\n aria-roledescription=\"carousel\"\n emblaCarousel\n [options]=\"emblaOptions\"\n [subscribeToEvents]=\"subscribeToEvents\"\n (emblaChange)=\"onEmblaChange($event)\">\n \n <ng-content></ng-content>\n</div>\n\n@if (showControls()) {\n<ecl-slider-pager\n class=\"ecl-quiz__pager\"\n variant=\"dots\"\n prevExtraClasses=\"ecl-quiz__prev\"\n nextExtraClasses=\"ecl-quiz__next\"\n dotsExtraClasses=\"ecl-quiz__dots\"\n dotExtraClasses=\"ecl-quiz__dot\"\n [activeIndex]=\"activeIndex()\"\n [isPrevDisabled]=\"prevDisabled()\"\n [isNextDisabled]=\"nextDisabled()\"\n [dotIndices]=\"getDotIndices()\"\n [dotAriaLabels]=\"dotAriaLabels()\"\n (prev)=\"onPrevClick()\"\n (next)=\"onNextClick()\"\n (goTo)=\"goTo($event)\">\n</ecl-slider-pager>\n\n<div class=\"ecl-quiz__counter\">{{ counterText() }}</div>\n}\n\n","import { EclQuizComponent } from './ecl-quiz.component';\nimport { EclQuizCardComponent, EclQuizListDirective } from './ecl-quiz-card.component';\n\nexport * from './ecl-quiz.component';\nexport * from './ecl-quiz-card.component';\n\nexport const EUI_ECL_QUIZ = [\n EclQuizComponent,\n EclQuizCardComponent,\n EclQuizListDirective,\n] as const;\n"],"mappings":";;;;;;;;;;AAiCA,IAAa,uBAAb,MAAa,qBAAoB;CAApB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAApB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAoB,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,gBAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAApB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA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,wBAAA;EAAA,CAAA;CAAA;;AAIjB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EAb5B,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAAkB,MAEtB;IACF,WAAW;IACX,aAAa;GAChB;GAAA,SACQ,CACL,GAAG,gBACH,sBACH;GAAA,iBACgB,wBAAwB;GAAM,UAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyC9C,MAAA;GAAgB,MAAA,CAAA,iBAAiB,oBAAoB,GAAG,EAAE,aAAa,KAAI,CAAE;EAGxC,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,sBAAsB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AEvFhE,MAAa,eAAe;CAC1B;CACA;CACA;AACQ"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-quiz.mjs","names":[],"sources":["../../components/ecl-quiz/ecl-quiz-card.component.ts","../../components/ecl-quiz/ecl-quiz-card.component.html","../../components/ecl-quiz/ecl-quiz.component.ts","../../components/ecl-quiz/ecl-quiz.component.html","../../components/ecl-quiz/index.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n ElementRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { TranslatePipe } from '@ngx-translate/core';\n\nexport interface EclQuizCardFlipEvent {\n flipped: boolean;\n selectedOptionIndex?: number;\n isCorrect?: boolean;\n}\n\n/**\n * Structural directive that marks an `<ol>` element as the ECL quiz option list.\n * Applies the `ecl-quiz__list` class to the host and is consumed by `EclQuizComponent`\n * to query its child `EclQuizCardComponent` items.\n * Applied via `ol[eclQuizList]`.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ol[eclQuizList]',\n host: {\n class: 'ecl-quiz__list',\n },\n})\nexport class EclQuizListDirective {}\n\n/**\n * ECL Quiz Card component – represents a single card in the quiz.\n *\n * For the 'reveal' variant, the entire card is clickable to flip.\n * For the 'poll' variant, individual options trigger the flip.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'li[eclQuizCard]',\n host: {\n '[attr.id]': 'id()',\n '[attr.aria-labelledby]': 'questionId()',\n '[class]': 'cssClasses()',\n '[attr.tabindex]': 'tabIndex()',\n '[style.transform]': 'styleTransform',\n '(click)': 'onClick()',\n '(keydown)': 'onKeydown($event)',\n },\n templateUrl: './ecl-quiz-card.component.html',\n imports: [EclIconComponent, TranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EclQuizCardComponent extends ECLBaseDirective {\n\n /**\n * Unique identifier for the card, used for accessibility attributes.\n * If not provided, a unique ID is generated automatically.\n */\n readonly id = input<string>(`ecl-quiz-card-${crypto.randomUUID()}`);\n\n /**\n * The question text displayed on the front of the card.\n */\n readonly question = input<string>('');\n\n /**\n * The answer text displayed on the back of the card.\n * Used in 'reveal' variant or as explanation in 'poll' variant.\n */\n readonly answer = input<string>('');\n\n /**\n * The answer title (e.g. \"The correct answer is A.\") for poll variant.\n */\n readonly answerTitle = input<string>('');\n\n /**\n * Image source for the card. When set together with a supported\n * {@link imageDisplay} mode, a picture is rendered on the card.\n */\n readonly imageSrc = input<string>('');\n\n /**\n * Alternative text for the card image.\n */\n readonly imageAlt = input<string>('');\n\n /**\n * Controls where the image/illustration is displayed:\n * - 'none': no image (default)\n * - 'back': image only on the back; for poll variant an animated\n * question-mark illustration is shown on the front\n * - 'always': image on both front and back\n */\n readonly imageDisplay = input<'none' | 'back' | 'always'>('none');\n\n /**\n * Icon name for the card header.\n * Defaults to 'sparkle' for reveal, 'question-mark' for poll.\n */\n readonly icon = input<string>('');\n\n /**\n * Icon size for the card header. When empty, a variant-based default is\n * used ('xl' for poll, 'l' for reveal).\n */\n readonly iconSize = input<'' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl'>('');\n\n /**\n * The variant of the quiz, set by the parent EclQuizComponent.\n */\n readonly variant = signal<'poll' | 'reveal'>('reveal');\n\n /**\n * Options for the poll variant. Each option has text and a match flag.\n */\n readonly options = input<{ text: string; match: boolean }[]>([]);\n\n /**\n * Whether this is the first card in the quiz.\n * Set by the parent EclQuizComponent to render skip-instructions only once.\n */\n readonly isFirstCard = signal(false);\n\n /** Whether the card is currently flipped (showing back). */\n readonly isFlipped = signal(false);\n\n /**\n * Emitted when the card is flipped.\n */\n readonly cardFlip = output<EclQuizCardFlipEvent>();\n\n protected readonly questionId = computed(() => `${this.id()}-question`);\n protected readonly answerId = computed(() => `${this.id()}-answer`);\n\n /** Whether a picture is available to render. */\n protected readonly hasPicture = computed(() => !!this.imageSrc());\n\n /** Whether the picture should be rendered on the front face. */\n protected showFrontPicture = computed(() => this.hasPicture() && this.imageDisplay() === 'always');\n\n /** Whether the picture should be rendered on the back face. */\n protected showBackPicture = computed(\n () => this.hasPicture() && (this.imageDisplay() === 'always' || this.imageDisplay() === 'back'),\n );\n\n /**\n * Whether the animated question-mark illustration should be shown on the\n * front of a poll card (poll variant with 'back' image display).\n */\n protected showIllustration = computed(() => this.variant() === 'poll' && this.imageDisplay() === 'back');\n\n /** Indices used to render the illustration's repeated question-mark shapes. */\n protected readonly illustrationMarks = Array.from({ length: 18 }, (_unused, i) => i + 1);\n\n /** Index of the selected option (poll variant). */\n protected readonly selectedOptionIndex = signal<number | null>(null);\n\n /** Whether the selected option is correct (poll variant). */\n protected readonly isCorrect = signal<boolean | null>(null);\n protected readonly styleTransform = 'translate3d(0px, 0px, 0px)';\n\n private readonly frontElementRef = viewChild<ElementRef>('frontElement');\n private readonly backElementRef = viewChild<ElementRef>('backElement');\n private readonly questionElementRef = viewChild<ElementRef>('questionElement');\n private readonly answerElementRef = viewChild<ElementRef>('answerElement');\n private readonly contentElementRef = viewChild<ElementRef>('contentElement');\n private readonly answerTitleRef = viewChild<ElementRef>('answerTitleEl');\n\n /** Get the native front element for height calculations. */\n getFrontElement(): HTMLElement | null {\n return this.frontElementRef()?.nativeElement ?? null;\n }\n\n /** Get the native back element for height calculations. */\n getBackElement(): HTMLElement | null {\n return this.backElementRef()?.nativeElement ?? null;\n }\n\n /** Get the native question element for height calculations. */\n getQuestionElement(): HTMLElement | null {\n return this.questionElementRef()?.nativeElement ?? null;\n }\n\n /** Get the native answer element for height calculations. */\n getAnswerElement(): HTMLElement | null {\n return this.answerElementRef()?.nativeElement ?? null;\n }\n\n /** Get the native content element for height calculations. */\n getContentElement(): HTMLElement | null {\n return this.contentElementRef()?.nativeElement ?? null;\n }\n\n /** Get all radio inputs in this card. */\n getRadioInputs(): HTMLInputElement[] {\n const el = this.frontElementRef()?.nativeElement;\n if (!el) {\n return [];\n }\n return Array.from(el.querySelectorAll('input[type=\"radio\"]'));\n }\n\n /** Get the first radio input in this card. */\n getFirstRadioInput(): HTMLInputElement | null {\n return this.getRadioInputs()[0] ?? null;\n }\n\n /** Get the last radio input in this card. */\n getLastRadioInput(): HTMLInputElement | null {\n const inputs = this.getRadioInputs();\n return inputs[inputs.length - 1] ?? null;\n }\n\n protected readonly cssClasses = computed<string>(() =>\n [\n super.getCssClasses('ecl-quiz-card'),\n this.isFlipped() ? 'ecl-quiz-card__flipped' : '',\n ]\n .join(' ')\n .trim());\n\n protected readonly tabIndex = computed<number | null>(() => (this.variant() === 'reveal' ? 0 : null));\n\n /** Get the resolved icon name based on variant. */\n protected getIconName(): string {\n if (this.icon()) {\n return this.icon();\n }\n return this.variant() === 'poll' ? 'question-mark' : 'sparkle';\n }\n\n /** Get the resolved icon size. */\n protected getIconSize(): string {\n return this.iconSize() || (this.variant() === 'poll' ? 'xl' : 'l');\n }\n\n /**\n * Handle click on the card itself (reveal variant).\n */\n protected onClick(): void {\n if (this.variant() === 'reveal') {\n this.flipCard();\n }\n }\n\n /**\n * Handle keyboard events (Enter/Space to flip for reveal variant).\n */\n protected onKeydown(event: KeyboardEvent): void {\n if (this.variant() === 'reveal' && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n this.flipCard();\n }\n }\n\n /**\n * Handle option click (poll variant).\n */\n protected onOptionClick(optionIndex: number): void {\n if (this.isFlipped()) {\n return;\n }\n const optionsList = this.options();\n this.selectedOptionIndex.set(optionIndex);\n this.isCorrect.set(optionsList[optionIndex]?.match ?? false);\n this.flipCard();\n this.focusAnswerTitleAfterFlip();\n }\n\n /**\n * Handle keyboard on option (poll variant).\n */\n protected onOptionKeydown(event: KeyboardEvent, optionIndex: number): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.onOptionClick(optionIndex);\n }\n }\n\n /**\n * Flip the card between front and back.\n */\n private flipCard(): void {\n this.isFlipped.update(v => !v);\n const event: EclQuizCardFlipEvent = { flipped: this.isFlipped() };\n if (this.variant() === 'poll') {\n event.selectedOptionIndex = this.selectedOptionIndex() ?? undefined;\n event.isCorrect = this.isCorrect() ?? undefined;\n }\n this.cardFlip.emit(event);\n }\n\n /**\n * Focus the answer title after the card flips in poll variant.\n * Uses requestAnimationFrame to ensure the DOM has updated (inert removed from back face).\n */\n private focusAnswerTitleAfterFlip(): void {\n requestAnimationFrame(() => {\n const ref = this.answerTitleRef();\n if (ref?.nativeElement) {\n ref.nativeElement.focus();\n }\n });\n }\n}\n","<article class=\"ecl-quiz-card__content\" #contentElement>\n <!-- Front face -->\n <div class=\"ecl-quiz-card__front\" #frontElement [hidden]=\"isFlipped()\" [inert]=\"isFlipped()\">\n @if (showFrontPicture()) {\n <picture class=\"ecl-picture ecl-quiz-card__picture\">\n <img class=\"ecl-quiz-card__image\" [src]=\"imageSrc()\" [alt]=\"imageAlt()\">\n </picture>\n } @else if (showIllustration()) {\n <div class=\"ecl-quiz-card__illustration-container\">\n <svg viewBox=\"0 0 500 140\" preserveAspectRatio=\"none\" aria-hidden=\"true\"\n class=\"ecl-quiz-card__illustration\">\n <defs>\n <g id=\"question-mark\">\n <path\n d=\"M0 0c0 4.343-3.728 7.939-8.531 8.464V9.75a1.22 1.22 0 0 1-2.438 0V7.313a1.22 1.22 0 0 1 1.219-1.22c4.033 0 7.312-2.732 7.312-6.093s-3.279-6.094-7.312-6.094-7.312 2.733-7.312 6.094a1.22 1.22 0 0 1-2.438 0c0-4.704 4.374-8.531 9.75-8.531S0-4.704 0 0Zm-9.75 14.625a2.438 2.438 0 1 0 0 4.875 2.438 2.438 0 0 0 0-4.875Z\" />\n </g>\n </defs>\n @for (mark of illustrationMarks; track mark) {\n <use href=\"#question-mark\" [attr.class]=\"'qm qm-' + mark\" />\n }\n </svg>\n </div>\n }\n <div class=\"ecl-quiz-card__padded\">\n <div class=\"ecl-quiz-card__header\">\n @if (!showIllustration()) {\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon [icon]=\"getIconName()\" [size]=\"getIconSize()\" iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n }\n </div>\n\n @if (variant() === 'reveal') {\n <div class=\"ecl-quiz-card__question\" [id]=\"questionId()\" #questionElement>{{ question() }}</div>\n <!-- Reveal variant: flip label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.REVEAL-ANSWER' | translate }}\n <ecl-icon iconSet=\"phosphor\" icon=\"arrow-clockwise\" size=\"m\"></ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: options -->\n <fieldset [attr.aria-describedby]=\"isFirstCard() ? id() + '-skip-instructions' : null\">\n <legend class=\"ecl-quiz-card__question\" [id]=\"questionId()\" #questionElement>{{ question() }}</legend>\n <ol class=\"ecl-quiz-card__options\" type=\"A\">\n @for (option of options(); let i = $index; track i) {\n <li class=\"ecl-quiz-card__option\" [attr.data-match]=\"option.match\" (mouseup)=\"onOptionClick(i)\">\n <label class=\"ecl-quiz-card__label\">\n <input type=\"radio\" [name]=\"id() + '-options'\" [attr.data-match]=\"option.match\"\n [attr.tabindex]=\"isFlipped() ? -1 : null\" (keydown)=\"onOptionKeydown($event, i)\">\n {{ option.text }}</label>\n @if (i === 0 && isFirstCard()) {\n <span class=\"ecl-quiz__skip\" [id]=\"id() + '-skip-instructions'\">{{ 'ecl.quiz.SKIP-INSTRUCTIONS' |\n translate }}</span>\n }\n </li>\n }\n </ol>\n </fieldset>\n }\n </div>\n </div>\n\n <!-- Back face -->\n <div class=\"ecl-quiz-card__back\" #backElement [hidden]=\"!isFlipped()\" [inert]=\"!isFlipped()\" style\n [class.ecl-quiz-card--correct]=\"variant() === 'poll' && isCorrect() === true\">\n @if (showBackPicture()) {\n <picture class=\"ecl-picture ecl-quiz-card__picture\">\n <img class=\"ecl-quiz-card__image\" [src]=\"imageSrc()\" [alt]=\"imageAlt()\">\n </picture>\n }\n <div class=\"ecl-quiz-card__padded\">\n <div class=\"ecl-quiz-card__header\">\n @if (variant() === 'reveal') {\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon [icon]=\"getIconName()\" [size]=\"getIconSize()\" iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: success/error icons -->\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon icon=\"check-circle\" iconSet=\"phosphor\" size=\"xl\" class=\"ecl-quiz-card__icon--success\">\n </ecl-icon>\n <ecl-icon icon=\"x-circle\" size=\"xl\" iconSet=\"phosphor\" class=\"ecl-quiz-card__icon--error\">\n </ecl-icon>\n </div>\n }\n </div>\n\n <div class=\"ecl-quiz-card__answer\" [id]=\"answerId()\" #answerElement>\n <div class=\"ecl-quiz-card__answer-content\">\n @if (answerTitle()) {\n <div class=\"ecl-quiz-card__answer-title\" tabindex=\"0\" #answerTitleEl>{{ answerTitle() }}</div>\n }\n {{ answer() }}\n </div>\n </div>\n\n @if (variant() === 'reveal') {\n <!-- Reveal variant: go back label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.FLIP-BACK' | translate }}\n <ecl-icon icon=\"arrow-clockwise\" size=\"m\" iconSet=\"phosphor\"></ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: options list on back (showing selected state) -->\n <ol class=\"ecl-quiz-card__options\" type=\"A\">\n @for (option of options(); let i = $index; track i) {\n <li class=\"ecl-quiz-card__option\" [class.ecl-quiz-card__option--selected]=\"selectedOptionIndex() === i\"\n [attr.data-match]=\"option.match\">\n @if (selectedOptionIndex() === i) {\n @if (!option.match) {\n <span class=\"ecl-quiz-card__option-assistive-label\">{{ 'ecl.quiz.YOUR-INCORRECT-ANSWER' | translate }}</span>\n }\n @if (option.match) {\n <span class=\"ecl-quiz-card__option-assistive-label\">{{ 'ecl.quiz.YOUR-CORRECT-ANSWER' | translate }}</span>\n }\n } @else if (option.match) {\n <span class=\"ecl-quiz-card__option-assistive-label\">{{ 'ecl.quiz.CORRECT-ANSWER' | translate }}</span>\n }\n {{ option.text }}\n @if (selectedOptionIndex() === i && !option.match) {\n <span class=\"ecl-quiz-card__option-icon\">\n <ecl-icon icon=\"x-circle\" size=\"s\" iconSet=\"phosphor\"\n class=\"ecl-quiz-card__option-icon--error\"></ecl-icon>\n </span>\n }\n @if (option.match) {\n <span class=\"ecl-quiz-card__option-icon\">\n <ecl-icon icon=\"check-circle\" size=\"s\" iconSet=\"phosphor\"\n class=\"ecl-quiz-card__option-icon--success\"></ecl-icon>\n </span>\n }\n </li>\n }\n </ol>\n }\n </div>\n </div>\n</article>\n","import {\n AfterContentInit,\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n ContentChildren,\n ElementRef,\n forwardRef,\n inject,\n input,\n OnDestroy,\n QueryList,\n signal,\n viewChild,\n} from '@angular/core';\nimport { EUI_ECL_SLIDER } from '@eui/ecl/components/ecl-slider';\nimport { ECLBaseDirective, EclRtlService } from '@eui/ecl/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { EmblaCarouselDirective } from 'embla-carousel-angular';\nimport { EmblaCarouselType, EmblaEventType } from 'embla-carousel';\nimport { Subject, takeUntil } from 'rxjs';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { EclQuizCardComponent } from './ecl-quiz-card.component';\n\n/**\n * An ECL quiz carousel component that renders a sequence of `li[eclQuizCard]` cards with navigation dots and previous/next buttons.\n * Uses Embla Carousel for slide animation, matching the ECL vanilla implementation.\n * Applied via `section[eclQuiz]`.\n *\n * - `variant` input: `'reveal'` (default, flip cards) | `'poll'` (multiple-choice); propagated to all child cards.\n * - `eclTitle` and `eclDescription`: heading and description text rendered above the carousel.\n * - `isFullWidth` (default `false`): expands the component to full container width.\n * - `hasBackground` (default `false`): adds a background fill behind the quiz.\n * - Cards are projected as `li[eclQuizCard]` children; wrap them in `ol[eclQuizList]` for semantic list structure.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'section[eclQuiz]',\n templateUrl: './ecl-quiz.component.html',\n host: {\n '[class]': 'cssClasses()',\n '(keydown)': 'onKeydown($event)',\n },\n imports: [\n ...EUI_ECL_SLIDER,\n EmblaCarouselDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EclQuizComponent extends ECLBaseDirective implements AfterContentInit, AfterViewInit, OnDestroy {\n\n /** Quiz variant: 'reveal' for flip cards, 'poll' for multiple choice. */\n readonly variant = input<'poll' | 'reveal'>('reveal');\n\n /** Title displayed in the quiz header. */\n readonly eclTitle = input<string>('');\n\n /** Description displayed below the title. */\n readonly eclDescription = input<string>('');\n\n readonly isFullWidth = input(false, { transform: booleanAttribute });\n\n readonly hasBackground = input(false, { transform: booleanAttribute });\n\n /** Embla carousel options matching ECL's configuration. */\n protected emblaOptions: { loop: boolean; align: 'start'; direction: 'ltr' | 'rtl' } = { loop: false, align: 'start', direction: 'ltr' };\n\n /** Subscribed Embla events. */\n protected subscribeToEvents: EmblaEventType[] = ['select', 'init', 'reInit'];\n\n /** Current snap index. */\n protected readonly activeIndex = signal(0);\n\n /** Total number of snap points. */\n protected readonly totalSnaps = signal(0);\n\n /** Counter text for mobile display. */\n protected readonly counterText = signal('');\n\n /** Whether the previous button is disabled. */\n protected readonly prevDisabled = signal(true);\n\n /** Whether the next button is disabled. */\n protected readonly nextDisabled = signal(true);\n\n /** Whether navigation controls should be shown. */\n protected readonly showControls = signal(false);\n\n @ContentChildren(forwardRef(() => EclQuizCardComponent), { descendants: true })\n private cards!: QueryList<EclQuizCardComponent>;\n\n private readonly emblaRef = viewChild(EmblaCarouselDirective);\n\n private readonly cd = inject(ChangeDetectorRef);\n private readonly eclRtlService = inject(EclRtlService);\n private readonly hostRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly translate = inject(TranslateService);\n private readonly destroy$ = new Subject<void>();\n private emblaApi: EmblaCarouselType | undefined;\n\n protected readonly cssClasses = computed<string>(() =>\n [\n super.getCssClasses('ecl-quiz'),\n `ecl-quiz--${this.variant()}`,\n this.hasBackground() ? 'ecl-quiz--background' : '',\n this.isFullWidth() ? 'ecl-quiz--full-width' : '',\n ]\n .join(' ')\n .trim());\n\n /** Whether any snap point groups multiple slides. */\n protected readonly hasGroupedSlides = signal(false);\n\n /** Total number of individual slides (cards). */\n protected readonly totalSlides = signal(0);\n\n /** Number of visible slides per snap. */\n protected readonly slidesPerSnap = signal(1);\n\n /** Returns the aria-label for a dot button at the given snap index. */\n protected getDotAriaLabel(dotIndex: number): { key: string; params: Record<string, number> } {\n const totalSlidesCount = this.totalSlides();\n const totalSnapsCount = this.totalSnaps();\n\n if (this.hasGroupedSlides()) {\n const visibleSlides = totalSlidesCount - (totalSnapsCount - 1);\n const start = dotIndex + 1;\n const end = Math.min(dotIndex + visibleSlides, totalSlidesCount);\n return {\n key: 'ecl.quiz.GO-TO-SLIDES',\n params: { start, end, total: totalSlidesCount },\n };\n }\n return {\n key: 'ecl.quiz.GO-TO-SLIDE',\n params: { current: dotIndex + 1, total: totalSlidesCount },\n };\n }\n\n /** Returns an array of indices for dot rendering. */\n protected getDotIndices(): number[] {\n return Array.from({ length: this.totalSnaps() }, (_, i) => i);\n }\n\n /**\n * Pre-translated accessible label for each dot, passed to the shared slider pager.\n * Depends on the current slide grouping, so it is computed here (where that\n * information lives) and translated imperatively.\n */\n protected readonly dotAriaLabels = computed<string[]>(() => {\n // Read totalSnaps so the computed re-evaluates when the dot count changes.\n const total = this.totalSnaps();\n return Array.from({ length: total }, (_unused, dotIndex) => {\n const { key, params } = this.getDotAriaLabel(dotIndex);\n return this.translate.instant(key, params);\n });\n });\n\n /** Called by the emblaChange event from the directive. */\n protected onEmblaChange(eventName: string): void {\n if (!this.emblaApi) {\n this.emblaApi = this.emblaRef()?.emblaApi ?? undefined;\n }\n if (!this.emblaApi) {\n return;\n }\n\n if (eventName === 'select' || eventName === 'init' || eventName === 'reInit') {\n this.syncState();\n }\n\n if (eventName === 'reInit') {\n this.checkHeight();\n }\n }\n\n /** Handle keyboard events. */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.escapeSlider();\n return;\n }\n\n if (this.variant() === 'poll' && event.key === 'Tab') {\n this.handlePollTabNavigation(event);\n }\n }\n\n /** Navigate to the previous snap. */\n protected onPrevClick(): void {\n const embla = this.emblaRef();\n if (embla) {\n embla.scrollPrev();\n }\n }\n\n /** Navigate to the next snap. */\n protected onNextClick(): void {\n const embla = this.emblaRef();\n if (embla) {\n embla.scrollNext();\n }\n }\n\n /** Navigate to a specific snap index. */\n protected goTo(index: number): void {\n const embla = this.emblaRef();\n if (embla) {\n embla.scrollTo(index);\n }\n }\n\n ngAfterContentInit(): void {\n if (this.cards && this.cards.length > 1) {\n this.showControls.set(true);\n }\n this.propagateVariant();\n this.subscribeToCardFlips();\n this.cards.changes.subscribe(() => {\n this.propagateVariant();\n this.subscribeToCardFlips();\n });\n\n this.eclRtlService.currentRtlState$.pipe(takeUntil(this.destroy$)).subscribe((isRtl) => {\n const direction = isRtl ? 'rtl' : 'ltr';\n if (this.emblaOptions.direction !== direction) {\n this.emblaOptions = { ...this.emblaOptions, direction };\n this.cd.detectChanges();\n }\n });\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n this.initEmbla();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** Initialize Embla and wire up state syncing. */\n private initEmbla(): void {\n const embla = this.emblaRef();\n if (!embla) {\n return;\n }\n\n this.emblaApi = embla.emblaApi ?? undefined;\n\n if (!this.emblaApi) {\n return;\n }\n\n this.syncState();\n this.checkHeight();\n this.cd.detectChanges();\n }\n\n /** Sync component state from Embla API. */\n private syncState(): void {\n if (!this.emblaApi) {\n return;\n }\n\n // Array of scroll-progress values (0 to 1), one per snap point.\n // Its length equals the number of positions the carousel can settle on (i.e. total dots).\n const snapList = this.emblaApi.scrollSnapList();\n const selectedSnap = this.emblaApi.selectedScrollSnap();\n const canScrollPrev = this.emblaApi.canScrollPrev();\n const canScrollNext = this.emblaApi.canScrollNext();\n // Number of individual slide elements in the carousel\n const slideCount = this.emblaApi.slideNodes().length;\n\n this.totalSnaps.set(snapList.length);\n this.activeIndex.set(selectedSnap);\n this.prevDisabled.set(!canScrollPrev);\n this.nextDisabled.set(!canScrollNext);\n this.showControls.set(canScrollPrev || canScrollNext);\n this.totalSlides.set(slideCount);\n this.hasGroupedSlides.set(slideCount > snapList.length);\n this.slidesPerSnap.set(snapList.length > 0 ? slideCount - (snapList.length - 1) : 1);\n\n this.updateCounter();\n }\n\n /** Update the counter text (mobile). */\n private updateCounter(): void {\n const total = this.totalSnaps();\n const current = this.activeIndex() + 1;\n this.counterText.set(`${current} / ${total}`);\n }\n\n /** Move focus to the last dot button when Escape is pressed. */\n private escapeSlider(): void {\n const dots = this.hostRef.nativeElement.querySelectorAll<HTMLElement>(\n '.ecl-slider-pager__dot',\n );\n if (dots.length > 0) {\n const lastDot = dots[dots.length - 1];\n lastDot.focus();\n }\n }\n\n /** Subscribe to cardFlip events on all cards to detect when all are flipped. */\n private subscribeToCardFlips(): void {\n if (this.variant() !== 'poll') {\n return;\n }\n this.cards?.forEach(card => {\n outputToObservable(card.cardFlip).pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.checkAllCardsFlipped();\n });\n });\n }\n\n /**\n * Hook invoked when a poll card flips. The category/sr-status tabindex\n * management was removed in line with upstream ECL (PR #4681), so there is\n * no longer per-card state to propagate here. Retained as an extension\n * point for future \"all cards flipped\" behaviour.\n */\n private checkAllCardsFlipped(): void {\n // Intentionally left blank.\n }\n\n /**\n * Equalizes the height of all cards based on the tallest content.\n * Mirrors the ECL vanilla `checkHeight()` logic.\n */\n private checkHeight(): void {\n if (!this.cards || this.cards.length === 0) {\n return;\n }\n\n let maxTextHeight = 0;\n let maxHeight = 0;\n\n const cardsArray = this.cards.toArray();\n\n // First pass: find the tallest question/answer text\n cardsArray.forEach((card) => {\n const frontEl = card.getFrontElement();\n const backEl = card.getBackElement();\n const questionEl = card.getQuestionElement();\n const answerEl = card.getAnswerElement();\n\n if (!frontEl || !backEl || !questionEl || !answerEl) {\n return;\n }\n\n frontEl.style.position = 'static';\n backEl.style.position = 'static';\n\n questionEl.style.minHeight = '';\n answerEl.style.minHeight = '';\n\n const heightQuestion = questionEl.scrollHeight;\n const heightAnswer = answerEl.scrollHeight;\n const heightText = Math.max(heightQuestion, heightAnswer);\n\n if (heightText > maxTextHeight) {\n maxTextHeight = heightText;\n }\n\n frontEl.style.position = '';\n backEl.style.position = '';\n });\n\n // Second pass: apply min-height and find tallest card\n cardsArray.forEach((card) => {\n const frontEl = card.getFrontElement();\n const backEl = card.getBackElement();\n const questionEl = card.getQuestionElement();\n const answerEl = card.getAnswerElement();\n const contentEl = card.getContentElement();\n\n if (!frontEl || !backEl || !questionEl || !answerEl || !contentEl) {\n return;\n }\n\n frontEl.style.position = 'static';\n backEl.style.position = 'static';\n contentEl.style.height = '';\n\n questionEl.style.minHeight = maxTextHeight + 'px';\n answerEl.style.minHeight = maxTextHeight + 'px';\n\n const heightFront = frontEl.scrollHeight;\n const heightBack = backEl.scrollHeight;\n const height = Math.max(heightFront, heightBack);\n\n const minHeight = parseFloat(getComputedStyle(frontEl).getPropertyValue('min-height')) || 345;\n\n if (height > minHeight && height > maxHeight) {\n maxHeight = height;\n }\n\n frontEl.style.position = '';\n backEl.style.position = '';\n });\n\n // Third pass: apply uniform height\n if (maxHeight > 0) {\n cardsArray.forEach((card) => {\n const contentEl = card.getContentElement();\n if (contentEl) {\n contentEl.style.height = maxHeight + 'px';\n }\n });\n }\n }\n\n /**\n * Handle Tab/Shift+Tab navigation between unflipped poll cards.\n * Tab from a radio input jumps to the first radio of the next unflipped card.\n * Shift+Tab from a radio input jumps to the last radio of the previous unflipped card.\n * If no unflipped card is found in that direction, native Tab takes over.\n */\n private handlePollTabNavigation(event: KeyboardEvent): void {\n const target = event.target as HTMLElement;\n\n if (!(target instanceof HTMLInputElement) || target.type !== 'radio') {\n return;\n }\n\n const cardsArray = this.cards.toArray();\n\n const currentCardIndex = cardsArray.findIndex(card => {\n const radios = card.getRadioInputs();\n return radios.includes(target);\n });\n\n if (currentCardIndex === -1) {\n return;\n }\n\n if (event.shiftKey) {\n for (let i = currentCardIndex - 1; i >= 0; i--) {\n if (!cardsArray[i].isFlipped()) {\n event.preventDefault();\n this.goTo(i);\n const lastInput = cardsArray[i].getLastRadioInput();\n if (lastInput) {\n lastInput.focus();\n }\n return;\n }\n }\n } else {\n for (let i = currentCardIndex + 1; i < cardsArray.length; i++) {\n if (!cardsArray[i].isFlipped()) {\n event.preventDefault();\n this.goTo(i);\n const firstInput = cardsArray[i].getFirstRadioInput();\n if (firstInput) {\n firstInput.focus();\n }\n return;\n }\n }\n }\n }\n\n /** Propagate the variant to all child cards. */\n private propagateVariant(): void {\n const v = this.variant();\n this.cards?.forEach((card, index) => {\n card.variant.set(v);\n card.isFirstCard.set(index === 0);\n });\n }\n}\n","@if (eclTitle() || eclDescription()) {\n<div class=\"ecl-quiz__header\">\n @if (eclTitle()) {\n <div class=\"ecl-quiz__title\">{{ eclTitle() }}</div>\n }\n @if (eclDescription()) {\n <div class=\"ecl-quiz__description\">{{ eclDescription() }}</div>\n }\n</div>\n}\n\n<div class=\"ecl-quiz__viewport\" data-ecl-quiz-slider\n role=\"region\"\n aria-label=\"Quiz slider\"\n aria-roledescription=\"carousel\"\n emblaCarousel\n [options]=\"emblaOptions\"\n [subscribeToEvents]=\"subscribeToEvents\"\n (emblaChange)=\"onEmblaChange($event)\">\n \n <ng-content></ng-content>\n</div>\n\n@if (showControls()) {\n<ecl-slider-pager\n class=\"ecl-quiz__pager\"\n variant=\"dots\"\n prevExtraClasses=\"ecl-quiz__prev\"\n nextExtraClasses=\"ecl-quiz__next\"\n dotsExtraClasses=\"ecl-quiz__dots\"\n dotExtraClasses=\"ecl-quiz__dot\"\n [activeIndex]=\"activeIndex()\"\n [isPrevDisabled]=\"prevDisabled()\"\n [isNextDisabled]=\"nextDisabled()\"\n [dotIndices]=\"getDotIndices()\"\n [dotAriaLabels]=\"dotAriaLabels()\"\n (prev)=\"onPrevClick()\"\n (next)=\"onNextClick()\"\n (goTo)=\"goTo($event)\">\n</ecl-slider-pager>\n\n<div class=\"ecl-quiz__counter\">{{ counterText() }}</div>\n}\n\n","import { EclQuizComponent } from './ecl-quiz.component';\nimport { EclQuizCardComponent, EclQuizListDirective } from './ecl-quiz-card.component';\n\nexport * from './ecl-quiz.component';\nexport * from './ecl-quiz-card.component';\n\nexport const EUI_ECL_QUIZ = [\n EclQuizComponent,\n EclQuizCardComponent,\n EclQuizListDirective,\n] as const;\n"],"mappings":";;;;;;;;;;AAkCA,IAAa,uBAAb,MAAa,qBAAoB;CAApB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAApB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAoB,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,gBAAA,iBA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