@eui/ecl 22.0.0-alpha.69 → 22.0.0-alpha.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/changelog.html +10 -0
- package/docs/classes/EclDomEvent.html +2 -0
- package/docs/classes/EclGalleryMediaSource.html +2 -2
- package/docs/classes/EclGalleryMediaTrack.html +4 -4
- package/docs/classes/EclGalleryPictureImage.html +3 -3
- package/docs/classes/EclGalleryPictureSource.html +2 -2
- package/docs/classes/EclLanguageService.html +1 -1
- package/docs/classes/EclMenuItemCaretEvent.html +16 -12
- package/docs/classes/EclMenuItemFocusEvent.html +16 -12
- package/docs/classes/EclMenuItemHoverEvent.html +16 -12
- package/docs/classes/EclMenuItemHoverOutEvent.html +16 -12
- package/docs/classes/EclMenuItemKeydownEvent.html +16 -12
- package/docs/classes/EclMenuItemSelectEvent.html +16 -12
- package/docs/classes/EclSortTableEvent.html +3 -3
- package/docs/components/EclBlockquoteComponent.html +0 -5
- package/docs/components/EclBreadcrumbComponent.html +1 -6
- package/docs/components/EclBreadcrumbSegmentComponent.html +1 -1
- package/docs/components/EclCategoryFilterComponent.html +0 -5
- package/docs/components/EclCategoryFilterItemComponent.html +1 -6
- package/docs/components/EclDateBlockComponent.html +2 -27
- package/docs/components/EclExpandableComponent.html +0 -10
- package/docs/components/EclFeaturedComponent.html +0 -5
- package/docs/components/EclGalleryFooterComponent.html +1 -6
- package/docs/components/EclGalleryItemComponent.html +2 -37
- package/docs/components/EclIconComponent.html +0 -15
- package/docs/components/EclInpageNavigationComponent.html +5 -15
- package/docs/components/EclInpageNavigationItemComponent.html +2 -12
- package/docs/components/EclMegaMenuComponent.html +2 -2
- package/docs/components/EclMegaMenuFeaturedComponent.html +0 -10
- package/docs/components/EclMegaMenuInfoComponent.html +0 -10
- package/docs/components/EclMegaMenuItemComponent.html +2 -12
- package/docs/components/EclMegaMenuSubitemComponent.html +2 -17
- package/docs/components/EclMenuItemComponent.html +4 -24
- package/docs/components/EclMenuMegaItemComponent.html +2 -17
- package/docs/components/EclModalHeaderComponent.html +1 -1
- package/docs/components/EclMultiselectComponent.html +3 -18
- package/docs/components/EclMultiselectDropdownComponent.html +1 -1
- package/docs/components/EclMultiselectInputComponent.html +3 -18
- package/docs/components/EclMultiselectOptgroupComponent.html +0 -5
- package/docs/components/EclNewsTickerComponent.html +1 -1
- package/docs/components/EclNewsTickerItemComponent.html +1 -1
- package/docs/components/EclNotificationComponent.html +0 -5
- package/docs/components/EclPaginationComponent.html +4 -4
- package/docs/components/EclPaginationItemComponent.html +3 -13
- package/docs/components/EclRatingFieldComponent.html +1 -1
- package/docs/components/EclSearchFormComponent.html +3 -13
- package/docs/components/EclSelectContainerComponent.html +4 -4
- package/docs/components/EclSiteFooterCoownerComponent.html +1 -1
- package/docs/components/EclSiteFooterCoreComponent.html +0 -5
- package/docs/components/EclSiteFooterFeedbackComponent.html +1 -1
- package/docs/components/EclSiteFooterFixedContentEUComponent.html +0 -10
- package/docs/components/EclSiteFooterRowCommonComponent.html +0 -5
- package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +0 -30
- package/docs/components/EclSiteHeaderSearchComponent.html +0 -10
- package/docs/components/EclSocialMediaFollowComponent.html +0 -5
- package/docs/components/EclSocialMediaFollowItemComponent.html +1 -6
- package/docs/components/EclSplashPageLanguageLinkComponent.html +1 -1
- package/docs/components/EclStickyContainerComponent.html +2 -2
- package/docs/components/EclTagComponent.html +0 -5
- package/docs/components/EclTimelineItemComponent.html +0 -5
- package/docs/directives/ECLClickOutsideDirective.html +2 -2
- package/docs/directives/EclFileUploadDirective.html +0 -5
- package/docs/directives/EclGalleryMediaDirective.html +0 -5
- package/docs/directives/EclMediaContainerItemDirective.html +0 -5
- package/docs/directives/EclModalCloseDirective.html +6 -0
- package/docs/directives/EclMultiselectOptionDirective.html +0 -10
- package/docs/directives/EclSelectDirective.html +0 -5
- package/docs/directives/EclSiteHeaderCustomActionLinkDirective.html +1 -1
- package/docs/directives/EclTableHeaderDirective.html +1 -6
- package/docs/interfaces/EclGalleryItem.html +6 -6
- package/docs/interfaces/EclMenuItem.html +4 -4
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/EclBreadcrumbComponent.md +1 -1
- package/docs/json/EclBreadcrumbSegmentComponent.md +1 -1
- package/docs/json/EclCategoryFilterItemComponent.md +1 -1
- package/docs/json/EclDateBlockComponent.md +2 -2
- package/docs/json/EclInpageNavigationItemComponent.md +2 -2
- package/docs/json/EclMegaMenuItemComponent.md +2 -2
- package/docs/json/EclMegaMenuSubitemComponent.md +2 -2
- package/docs/json/EclMenuItemComponent.md +2 -2
- package/docs/json/EclMenuMegaItemComponent.md +2 -2
- package/docs/json/EclModalCloseDirective.md +1 -1
- package/docs/json/EclMultiselectComponent.md +3 -3
- package/docs/json/EclMultiselectInputComponent.md +3 -3
- package/docs/json/EclPaginationItemComponent.md +2 -2
- package/docs/json/EclSearchFormComponent.md +2 -2
- package/docs/json/EclSelectContainerComponent.md +4 -4
- package/docs/json/EclSiteFooterCoownerComponent.md +1 -1
- package/docs/json/EclSiteFooterFeedbackComponent.md +1 -1
- package/docs/json/EclSocialMediaFollowItemComponent.md +1 -1
- package/docs/json/EclStickyContainerComponent.md +2 -2
- package/docs/json/EclTableHeaderDirective.md +1 -1
- package/docs/json/documentation.json +752 -813
- package/docs/llms.txt +150 -150
- package/docs/miscellaneous/functions.html +1 -5
- package/docs/properties.html +1 -1
- package/fesm2022/eui-ecl-components-ecl-banner.mjs +6 -5
- package/fesm2022/eui-ecl-components-ecl-banner.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-blockquote.mjs +1 -1
- package/fesm2022/eui-ecl-components-ecl-blockquote.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-breadcrumb.mjs +11 -6
- package/fesm2022/eui-ecl-components-ecl-breadcrumb.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-category-filter.mjs +4 -3
- package/fesm2022/eui-ecl-components-ecl-category-filter.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-date-block.mjs +7 -7
- package/fesm2022/eui-ecl-components-ecl-date-block.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-expandable.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-expandable.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-featured.mjs +3 -2
- package/fesm2022/eui-ecl-components-ecl-featured.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-file-upload.mjs +5 -5
- package/fesm2022/eui-ecl-components-ecl-file-upload.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-gallery.mjs +23 -15
- package/fesm2022/eui-ecl-components-ecl-gallery.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-icon.mjs +3 -3
- package/fesm2022/eui-ecl-components-ecl-icon.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs +13 -12
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-media-container.mjs +7 -6
- package/fesm2022/eui-ecl-components-ecl-media-container.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs +26 -26
- package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-menu.mjs +20 -23
- package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-modal.mjs +12 -8
- package/fesm2022/eui-ecl-components-ecl-modal.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-multiselect.mjs +12 -12
- package/fesm2022/eui-ecl-components-ecl-multiselect.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs +13 -8
- package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-notification.mjs +1 -1
- package/fesm2022/eui-ecl-components-ecl-notification.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-pagination.mjs +13 -9
- package/fesm2022/eui-ecl-components-ecl-pagination.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-popover.mjs +0 -1
- package/fesm2022/eui-ecl-components-ecl-popover.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-quiz.mjs +4 -4
- package/fesm2022/eui-ecl-components-ecl-quiz.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-radio.mjs +1 -1
- package/fesm2022/eui-ecl-components-ecl-radio.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-range.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-range.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-rating-field.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-search-form.mjs +4 -4
- package/fesm2022/eui-ecl-components-ecl-search-form.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-select.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-select.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs +5 -5
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs +40 -27
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-slogan-ticker.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-slogan-ticker.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-splash-page.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-spotlight.mjs +5 -3
- package/fesm2022/eui-ecl-components-ecl-spotlight.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-sticky-container.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-story-card.mjs +1 -1
- package/fesm2022/eui-ecl-components-ecl-story-card.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-table.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-table.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-tabs.mjs +6 -4
- package/fesm2022/eui-ecl-components-ecl-tabs.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-tag.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-tag.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-text-area.mjs +1 -1
- package/fesm2022/eui-ecl-components-ecl-text-area.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-timeline.mjs +1 -1
- package/fesm2022/eui-ecl-components-ecl-timeline.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-tooltip.mjs +1 -1
- package/fesm2022/eui-ecl-components-ecl-tooltip.mjs.map +1 -1
- package/fesm2022/eui-ecl-core.mjs +7 -3
- package/fesm2022/eui-ecl-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eui-ecl-components-ecl-add-to-calendar.d.ts +4 -4
- package/types/eui-ecl-components-ecl-animated-numbers.d.ts +7 -7
- package/types/eui-ecl-components-ecl-app.d.ts +3 -3
- package/types/eui-ecl-components-ecl-banner.d.ts +9 -9
- package/types/eui-ecl-components-ecl-banner.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-blockquote.d.ts +2 -2
- package/types/eui-ecl-components-ecl-breadcrumb.d.ts +7 -7
- package/types/eui-ecl-components-ecl-breadcrumb.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-button.d.ts +1 -1
- package/types/eui-ecl-components-ecl-carousel.d.ts +5 -5
- package/types/eui-ecl-components-ecl-category-filter.d.ts +6 -6
- package/types/eui-ecl-components-ecl-checkbox.d.ts +1 -1
- package/types/eui-ecl-components-ecl-content-block.d.ts +1 -1
- package/types/eui-ecl-components-ecl-date-block.d.ts +8 -8
- package/types/eui-ecl-components-ecl-date-picker.d.ts +1 -1
- package/types/eui-ecl-components-ecl-expandable.d.ts +3 -3
- package/types/eui-ecl-components-ecl-fact-figures.d.ts +3 -3
- package/types/eui-ecl-components-ecl-featured.d.ts +7 -7
- package/types/eui-ecl-components-ecl-file-upload.d.ts +4 -4
- package/types/eui-ecl-components-ecl-file.d.ts +15 -15
- package/types/eui-ecl-components-ecl-gallery.d.ts +36 -36
- package/types/eui-ecl-components-ecl-gallery.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-icon.d.ts +9 -9
- package/types/eui-ecl-components-ecl-inpage-navigation.d.ts +15 -15
- package/types/eui-ecl-components-ecl-layout-wrapper.d.ts +1 -1
- package/types/eui-ecl-components-ecl-link.d.ts +2 -2
- package/types/eui-ecl-components-ecl-list-illustration.d.ts +3 -3
- package/types/eui-ecl-components-ecl-list.d.ts +2 -2
- package/types/eui-ecl-components-ecl-media-container.d.ts +10 -10
- package/types/eui-ecl-components-ecl-media-container.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-mega-menu.d.ts +36 -36
- package/types/eui-ecl-components-ecl-mega-menu.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-menu.d.ts +36 -42
- package/types/eui-ecl-components-ecl-menu.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-modal.d.ts +9 -8
- package/types/eui-ecl-components-ecl-modal.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-multiselect.d.ts +21 -21
- package/types/eui-ecl-components-ecl-news-ticker.d.ts +10 -10
- package/types/eui-ecl-components-ecl-news-ticker.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-notification.d.ts +2 -2
- package/types/eui-ecl-components-ecl-page-header.d.ts +2 -2
- package/types/eui-ecl-components-ecl-page-summary.d.ts +2 -2
- package/types/eui-ecl-components-ecl-pagination.d.ts +12 -11
- package/types/eui-ecl-components-ecl-pagination.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-popover.d.ts +3 -3
- package/types/eui-ecl-components-ecl-quiz.d.ts +3 -3
- package/types/eui-ecl-components-ecl-radio.d.ts +2 -2
- package/types/eui-ecl-components-ecl-range.d.ts +3 -3
- package/types/eui-ecl-components-ecl-rating-field.d.ts +2 -2
- package/types/eui-ecl-components-ecl-search-form.d.ts +4 -4
- package/types/eui-ecl-components-ecl-select.d.ts +5 -5
- package/types/eui-ecl-components-ecl-site-footer.d.ts +7 -7
- package/types/eui-ecl-components-ecl-site-header.d.ts +32 -32
- package/types/eui-ecl-components-ecl-site-header.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-slogan-ticker.d.ts +4 -4
- package/types/eui-ecl-components-ecl-social-media-follow.d.ts +5 -5
- package/types/eui-ecl-components-ecl-splash-page.d.ts +4 -4
- package/types/eui-ecl-components-ecl-spotlight.d.ts +2 -2
- package/types/eui-ecl-components-ecl-sticky-container.d.ts +2 -2
- package/types/eui-ecl-components-ecl-story-card.d.ts +2 -2
- package/types/eui-ecl-components-ecl-table.d.ts +13 -13
- package/types/eui-ecl-components-ecl-tabs.d.ts +4 -4
- package/types/eui-ecl-components-ecl-tabs.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-tag.d.ts +1 -1
- package/types/eui-ecl-components-ecl-text-input.d.ts +1 -1
- package/types/eui-ecl-components-ecl-timeline.d.ts +1 -1
- package/types/eui-ecl-core.d.ts +7 -7
- package/types/eui-ecl-core.d.ts.map +1 -1
|
@@ -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 = null;\n private scrollableParent = 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; // Window | null\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, scrollableParent = 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,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CA6BlD;CAvBG,QAAQ,KAAe;EAGnB,IAAI,IAAI,WAAW,GACf,KAAK,MAAM,KAAI;CAEvB;CAKA,mBAAmB,KAAU;EACzB,IAAI,eAAc;EAClB,KAAK,MAAM,KAAI;CACnB;CAMO,iBAAc;EACjB,OAAO,KAAK,eAAe;CAC/B;CA/CS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAyB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAzB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAyB,cAAA;GAAA,UAAA;GAAA,SAAA,EAAA,OAAA,QAAA;GAAA,MAAA;IAAA,WAAA;KAAA,WAAA;KAAA,iBAAA;KAAA,iBAAA;IAAA;IAAA,YAAA;KAAA,sBAAA;KAAA,SAAA;IAAA;GAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAzB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAyB,YAAA,CAAA;EAVrC,MAAA;EAAU,MAAA,CAAA;GACP,UA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AA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,YAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AExCtE,IAAa,6BAAb,MAAa,mCAAmC,iBAAgB;CANhE,cAAA;;EAUuB,KAAA,aAAa,eAC5B,MAAM,cAAc,sBAAsB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CACnD;CANY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,MAAA;GAAA,QAAA,GAAA,gBAAA;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"}
|
|
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,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CA6BlD;CAvBG,QAAQ,KAAe;EAGnB,IAAI,IAAI,WAAW,GACf,KAAK,MAAM,KAAI;CAEvB;CAKA,mBAAmB,KAAU;EACzB,IAAI,eAAc;EAClB,KAAK,MAAM,KAAI;CACnB;CAMO,iBAAc;EACjB,OAAO,KAAK,eAAe;CAC/B;CA/CS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAyB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAzB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAyB,cAAA;GAAA,UAAA;GAAA,SAAA,EAAA,OAAA,QAAA;GAAA,MAAA;IAAA,WAAA;KAAA,WAAA;KAAA,iBAAA;KAAA,iBAAA;IAAA;IAAA,YAAA;KAAA,sBAAA;KAAA,SAAA;IAAA;GAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAzB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAA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,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,YAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AExCtE,IAAa,6BAAb,MAAa,mCAAmC,iBAAgB;CANhE,cAAA;;EAUuB,KAAA,aAAa,eAC5B,MAAM,cAAc,sBAAsB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CACnD;CANY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,MAAA;GAAA,QAAA,GAAA,gBAAA;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"}
|
|
@@ -141,8 +141,8 @@ var EclQuizCardComponent = class EclQuizCardComponent extends ECLBaseDirective {
|
|
|
141
141
|
this.isFlipped.update((v) => !v);
|
|
142
142
|
const event = { flipped: this.isFlipped() };
|
|
143
143
|
if (this.variant() === "poll") {
|
|
144
|
-
event.selectedOptionIndex = this.selectedOptionIndex();
|
|
145
|
-
event.isCorrect = this.isCorrect();
|
|
144
|
+
event.selectedOptionIndex = this.selectedOptionIndex() ?? void 0;
|
|
145
|
+
event.isCorrect = this.isCorrect() ?? void 0;
|
|
146
146
|
}
|
|
147
147
|
this.cardFlip.emit(event);
|
|
148
148
|
}
|
|
@@ -541,7 +541,7 @@ var EclQuizComponent = class EclQuizComponent extends ECLBaseDirective {
|
|
|
541
541
|
return Array.from({ length: this.totalSnaps() }, (_, i) => i);
|
|
542
542
|
}
|
|
543
543
|
onEmblaChange(eventName) {
|
|
544
|
-
if (!this.emblaApi) this.emblaApi = this.emblaRef()?.emblaApi;
|
|
544
|
+
if (!this.emblaApi) this.emblaApi = this.emblaRef()?.emblaApi ?? void 0;
|
|
545
545
|
if (!this.emblaApi) return;
|
|
546
546
|
if (eventName === "select" || eventName === "init" || eventName === "reInit") this.syncState();
|
|
547
547
|
if (eventName === "reInit") this.checkHeight();
|
|
@@ -596,7 +596,7 @@ var EclQuizComponent = class EclQuizComponent extends ECLBaseDirective {
|
|
|
596
596
|
initEmbla() {
|
|
597
597
|
const embla = this.emblaRef();
|
|
598
598
|
if (!embla) return;
|
|
599
|
-
this.emblaApi = embla.emblaApi;
|
|
599
|
+
this.emblaApi = embla.emblaApi ?? void 0;
|
|
600
600
|
if (!this.emblaApi) return;
|
|
601
601
|
this.syncState();
|
|
602
602
|
this.checkHeight();
|
|
@@ -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();\n event.isCorrect = this.isCorrect();\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;\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;\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,gB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AAA;IAAA,UAAA,CAAA,eAAA;GAAA,CAAA;GAAA,iBAAA,GAAA,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 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,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;IAAA,UAAA,CAAA,eAAA;GAAA,CAAA;GAAA,iBAAA,GAAA,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"}
|
|
@@ -207,7 +207,7 @@ var EclRadioInputDirective = class EclRadioInputDirective extends ECLBaseDirecti
|
|
|
207
207
|
}
|
|
208
208
|
ngDoCheck() {
|
|
209
209
|
if (this.ngControl) {
|
|
210
|
-
if (this.eclRadio) this.eclRadio.setControlState(this.ngControl.invalid && this.ngControl.touched, this.ngControl.disabled);
|
|
210
|
+
if (this.eclRadio) this.eclRadio.setControlState(!!(this.ngControl.invalid && this.ngControl.touched), !!this.ngControl.disabled);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-ecl-components-ecl-radio.mjs","names":[],"sources":["../../components/ecl-radio/ecl-radio-label.component.ts","../../components/ecl-radio/ecl-radio-label.component.html","../../components/ecl-radio/ecl-radio.directive.ts","../../components/ecl-radio/ecl-radio-input.directive.ts","../../components/ecl-radio/index.ts"],"sourcesContent":["import { Component, computed, ViewEncapsulation, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component representing a label for an ECL radio button.\n *\n * Used inside an element with the [eclRadio] directive to provide\n * a styled label that can reflect the radio's state.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclRadioLabel]',\n templateUrl: './ecl-radio-label.component.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclRadioLabelComponent extends ECLBaseDirective {\n /**\n * Adds styling for an invalid state.\n *\n * Internal writable state propagated from the parent `eclRadio` directive,\n * which owns the invalid state and pushes it onto the label. Not intended to\n * be bound directly on the label; set the state on the parent `eclRadio`.\n */\n readonly isInvalid = signal(false);\n\n /**\n * Adds styling for a disabled state.\n *\n * Internal writable state propagated from the parent `eclRadio` directive,\n * which owns the disabled state and pushes it onto the label. Not intended to\n * be bound directly on the label; set the state on the parent `eclRadio`.\n */\n readonly isDisabled = signal(false);\n\n /**\n * Returns the CSS classes applied to the host element.\n * Includes the base `ecl-radio__label` class.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-radio__label'));\n}\n","<span class=\"ecl-radio__box\" [class.ecl-radio__box--disabled]=\"isDisabled()\" [class.ecl-radio__box--invalid]=\"isInvalid()\">\n <span class=\"ecl-radio__box-inner\"></span>\n</span>\n\n<ng-content></ng-content>\n","import { booleanAttribute, computed, Directive, effect, forwardRef, input, signal, contentChild } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclRadioLabelComponent } from './ecl-radio-label.component';\n\n/**\n * Applies ECL radio button styling and state management to a container element.\n * Applied via `[eclRadio]`; coordinates disabled/invalid state between the child\n * `input[eclRadioInput]` form control and the `[eclRadioLabel]` label.\n *\n * - `isBinary` (boolean): adds the `ecl-radio--binary` modifier for a two-option variant.\n * - `isDisabled` (alias `isDisabled`): consumer-provided disabled flag; overridden by the form control state when present.\n * - `isInvalid` (alias `isInvalid`): consumer-provided invalid flag; overridden by the form control validation state.\n * - Content children: `input[eclRadioInput]` and `[eclRadioLabel]` are synchronised automatically.\n * - `setControlState(isInvalid, isDisabled)`: called by the child `eclRadioInput` to propagate form-control state.\n */\n@Directive({\n selector: '[eclRadio]',\n host: {\n '[class]': 'cssClasses()',\n '[class.ecl-radio--disabled]': 'isDisabled()',\n '[class.ecl-radio--invalid]': 'isInvalid()',\n },\n})\nexport class EclRadioDirective extends ECLBaseDirective {\n /**\n * Adds the `ecl-radio--binary` class when true.\n */\n readonly isBinary = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Consumer-provided disabled state, bound as an attribute on the host element.\n */\n readonly disabledInput = input<boolean, unknown>(false, { transform: booleanAttribute, alias: 'isDisabled' });\n\n /**\n * Consumer-provided invalid state, bound as an attribute on the host element.\n */\n readonly invalidInput = input<boolean, unknown>(false, { transform: booleanAttribute, alias: 'isInvalid' });\n\n /**\n * Disabled state derived from the child `eclRadioInput` form control, if any.\n * Overrides the consumer-provided value when the control drives the state.\n */\n private readonly controlDisabled = signal<boolean | undefined>(undefined);\n\n /**\n * Invalid state derived from the child `eclRadioInput` form control, if any.\n * Overrides the consumer-provided value when the control drives the state.\n */\n private readonly controlInvalid = signal<boolean | undefined>(undefined);\n\n /**\n * Effective disabled state, preferring the form-control-driven value when present.\n * Adds the `ecl-radio--disabled` class to the host element when true.\n *\n * Precedence: when a child `eclRadioInput` is bound to a form control it calls\n * `setControlState`, making `controlDisabled` a concrete boolean that takes over.\n * While `controlDisabled` is `undefined` (no form control in play), the `??`\n * falls back to the consumer-provided `disabledInput` attribute value.\n */\n readonly isDisabled = computed(() => this.controlDisabled() ?? this.disabledInput());\n\n /**\n * Effective invalid state, preferring the form-control-driven value when present.\n * Adds the `ecl-radio--invalid` class to the host element when true.\n *\n * Precedence: when a child `eclRadioInput` is bound to a form control it calls\n * `setControlState`, making `controlInvalid` a concrete boolean that takes over.\n * While `controlInvalid` is `undefined` (no form control in play), the `??`\n * falls back to the consumer-provided `invalidInput` attribute value.\n */\n readonly isInvalid = computed(() => this.controlInvalid() ?? this.invalidInput());\n\n /**\n * Reference to the projected EclRadioLabelComponent, if present.\n * Used to synchronize disabled and invalid states with the label.\n */\n readonly eclRadioLabelComponent = contentChild(forwardRef(() => EclRadioLabelComponent));\n\n constructor() {\n super();\n this.synchronizeChildElements();\n }\n\n /**\n * Returns the CSS classes to apply on the host element.\n * Includes the base `ecl-radio` class and the binary modifier if applicable.\n */\n protected readonly cssClasses = computed<string>(() =>\n [super.getCssClasses('ecl-radio'), this.isBinary() ? 'ecl-radio--binary' : ''].join(' ').trim());\n\n /**\n * Called by the child `eclRadioInput` directive to propagate the disabled and\n * invalid states derived from the associated form control.\n */\n setControlState(isInvalid: boolean, isDisabled: boolean): void {\n this.controlInvalid.set(isInvalid);\n this.controlDisabled.set(isDisabled);\n }\n\n /**\n * Keeps the projected label and help components in sync with the\n * directive's disabled and invalid states whenever they change.\n */\n private synchronizeChildElements(): void {\n effect(() => {\n const isDisabled = this.isDisabled();\n const isInvalid = this.isInvalid();\n\n const eclRadioLabelComponent = this.eclRadioLabelComponent();\n if (eclRadioLabelComponent) {\n eclRadioLabelComponent.isInvalid.set(isInvalid);\n eclRadioLabelComponent.isDisabled.set(isDisabled);\n }\n });\n }\n}\n","import { computed, Directive, ChangeDetectorRef, DoCheck, inject } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { EclRadioDirective } from './ecl-radio.directive';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive that decorates native <input> elements to be styled as ECL radio inputs.\n *\n * Applies the proper ECL CSS classes and integrates with Angular forms\n * to reflect validation states (invalid, disabled) in the parent ECL radio directive.\n * Should be used together with the eclRadio directive.\n */\n@Directive({\n selector: 'input[eclRadioInput]',\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclRadioInputDirective extends ECLBaseDirective implements DoCheck {\n eclRadio = inject(EclRadioDirective);\n protected ngControl = inject(NgControl, { optional: true, self: true });\n protected cd = inject(ChangeDetectorRef);\n\n /**\n * Returns the CSS classes applied to the host input element.\n * Includes the base ecl-radio__input class.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-radio__input'));\n\n ngDoCheck(): void {\n if (this.ngControl) {\n if (this.eclRadio) {\n this.eclRadio.setControlState(\n this.ngControl.invalid && this.ngControl.touched,\n this.ngControl.disabled,\n );\n }\n }\n }\n}\n","import { EclRadioInputDirective } from './ecl-radio-input.directive';\nimport { EclRadioLabelComponent } from './ecl-radio-label.component';\nimport { EclRadioDirective } from './ecl-radio.directive';\n\nexport * from './ecl-radio-input.directive';\nexport * from './ecl-radio.directive';\nexport * from './ecl-radio-label.component';\n\nexport const EUI_ECL_RADIO = [\n EclRadioDirective, EclRadioInputDirective, EclRadioLabelComponent,\n] as const;\n"],"mappings":";;;;AAkBA,IAAa,yBAAb,MAAa,+BAA+B,iBAAgB;CAT5D,cAAA;;EAiBa,KAAA,YAAY,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EASzB,KAAA,aAAa,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAMhB,KAAA,aAAa,eAC5B,MAAM,cAAc,kBAAkB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAC/C;CAzBY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAtB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAsB,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,YAAA,EAAA,SAAA,eAAA,EAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,UClB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CArBS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAtB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAsB,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,YAAA,EAAA,SAAA,eAAA,EAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EANlC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM,EACF,WAAW,eACd;EACJ,CAAA;;;ACTD,MAAa,gBAAgB;CACzB;CAAmB;CAAwB;AACrC"}
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-radio.mjs","names":[],"sources":["../../components/ecl-radio/ecl-radio-label.component.ts","../../components/ecl-radio/ecl-radio-label.component.html","../../components/ecl-radio/ecl-radio.directive.ts","../../components/ecl-radio/ecl-radio-input.directive.ts","../../components/ecl-radio/index.ts"],"sourcesContent":["import { Component, computed, ViewEncapsulation, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component representing a label for an ECL radio button.\n *\n * Used inside an element with the [eclRadio] directive to provide\n * a styled label that can reflect the radio's state.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclRadioLabel]',\n templateUrl: './ecl-radio-label.component.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclRadioLabelComponent extends ECLBaseDirective {\n /**\n * Adds styling for an invalid state.\n *\n * Internal writable state propagated from the parent `eclRadio` directive,\n * which owns the invalid state and pushes it onto the label. Not intended to\n * be bound directly on the label; set the state on the parent `eclRadio`.\n */\n readonly isInvalid = signal(false);\n\n /**\n * Adds styling for a disabled state.\n *\n * Internal writable state propagated from the parent `eclRadio` directive,\n * which owns the disabled state and pushes it onto the label. Not intended to\n * be bound directly on the label; set the state on the parent `eclRadio`.\n */\n readonly isDisabled = signal(false);\n\n /**\n * Returns the CSS classes applied to the host element.\n * Includes the base `ecl-radio__label` class.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-radio__label'));\n}\n","<span class=\"ecl-radio__box\" [class.ecl-radio__box--disabled]=\"isDisabled()\" [class.ecl-radio__box--invalid]=\"isInvalid()\">\n <span class=\"ecl-radio__box-inner\"></span>\n</span>\n\n<ng-content></ng-content>\n","import { booleanAttribute, computed, Directive, effect, forwardRef, input, signal, contentChild } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclRadioLabelComponent } from './ecl-radio-label.component';\n\n/**\n * Applies ECL radio button styling and state management to a container element.\n * Applied via `[eclRadio]`; coordinates disabled/invalid state between the child\n * `input[eclRadioInput]` form control and the `[eclRadioLabel]` label.\n *\n * - `isBinary` (boolean): adds the `ecl-radio--binary` modifier for a two-option variant.\n * - `isDisabled` (alias `isDisabled`): consumer-provided disabled flag; overridden by the form control state when present.\n * - `isInvalid` (alias `isInvalid`): consumer-provided invalid flag; overridden by the form control validation state.\n * - Content children: `input[eclRadioInput]` and `[eclRadioLabel]` are synchronised automatically.\n * - `setControlState(isInvalid, isDisabled)`: called by the child `eclRadioInput` to propagate form-control state.\n */\n@Directive({\n selector: '[eclRadio]',\n host: {\n '[class]': 'cssClasses()',\n '[class.ecl-radio--disabled]': 'isDisabled()',\n '[class.ecl-radio--invalid]': 'isInvalid()',\n },\n})\nexport class EclRadioDirective extends ECLBaseDirective {\n /**\n * Adds the `ecl-radio--binary` class when true.\n */\n readonly isBinary = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Consumer-provided disabled state, bound as an attribute on the host element.\n */\n readonly disabledInput = input<boolean, unknown>(false, { transform: booleanAttribute, alias: 'isDisabled' });\n\n /**\n * Consumer-provided invalid state, bound as an attribute on the host element.\n */\n readonly invalidInput = input<boolean, unknown>(false, { transform: booleanAttribute, alias: 'isInvalid' });\n\n /**\n * Disabled state derived from the child `eclRadioInput` form control, if any.\n * Overrides the consumer-provided value when the control drives the state.\n */\n private readonly controlDisabled = signal<boolean | undefined>(undefined);\n\n /**\n * Invalid state derived from the child `eclRadioInput` form control, if any.\n * Overrides the consumer-provided value when the control drives the state.\n */\n private readonly controlInvalid = signal<boolean | undefined>(undefined);\n\n /**\n * Effective disabled state, preferring the form-control-driven value when present.\n * Adds the `ecl-radio--disabled` class to the host element when true.\n *\n * Precedence: when a child `eclRadioInput` is bound to a form control it calls\n * `setControlState`, making `controlDisabled` a concrete boolean that takes over.\n * While `controlDisabled` is `undefined` (no form control in play), the `??`\n * falls back to the consumer-provided `disabledInput` attribute value.\n */\n readonly isDisabled = computed(() => this.controlDisabled() ?? this.disabledInput());\n\n /**\n * Effective invalid state, preferring the form-control-driven value when present.\n * Adds the `ecl-radio--invalid` class to the host element when true.\n *\n * Precedence: when a child `eclRadioInput` is bound to a form control it calls\n * `setControlState`, making `controlInvalid` a concrete boolean that takes over.\n * While `controlInvalid` is `undefined` (no form control in play), the `??`\n * falls back to the consumer-provided `invalidInput` attribute value.\n */\n readonly isInvalid = computed(() => this.controlInvalid() ?? this.invalidInput());\n\n /**\n * Reference to the projected EclRadioLabelComponent, if present.\n * Used to synchronize disabled and invalid states with the label.\n */\n readonly eclRadioLabelComponent = contentChild(forwardRef(() => EclRadioLabelComponent));\n\n constructor() {\n super();\n this.synchronizeChildElements();\n }\n\n /**\n * Returns the CSS classes to apply on the host element.\n * Includes the base `ecl-radio` class and the binary modifier if applicable.\n */\n protected readonly cssClasses = computed<string>(() =>\n [super.getCssClasses('ecl-radio'), this.isBinary() ? 'ecl-radio--binary' : ''].join(' ').trim());\n\n /**\n * Called by the child `eclRadioInput` directive to propagate the disabled and\n * invalid states derived from the associated form control.\n */\n setControlState(isInvalid: boolean, isDisabled: boolean): void {\n this.controlInvalid.set(isInvalid);\n this.controlDisabled.set(isDisabled);\n }\n\n /**\n * Keeps the projected label and help components in sync with the\n * directive's disabled and invalid states whenever they change.\n */\n private synchronizeChildElements(): void {\n effect(() => {\n const isDisabled = this.isDisabled();\n const isInvalid = this.isInvalid();\n\n const eclRadioLabelComponent = this.eclRadioLabelComponent();\n if (eclRadioLabelComponent) {\n eclRadioLabelComponent.isInvalid.set(isInvalid);\n eclRadioLabelComponent.isDisabled.set(isDisabled);\n }\n });\n }\n}\n","import { computed, Directive, ChangeDetectorRef, DoCheck, inject } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { EclRadioDirective } from './ecl-radio.directive';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive that decorates native <input> elements to be styled as ECL radio inputs.\n *\n * Applies the proper ECL CSS classes and integrates with Angular forms\n * to reflect validation states (invalid, disabled) in the parent ECL radio directive.\n * Should be used together with the eclRadio directive.\n */\n@Directive({\n selector: 'input[eclRadioInput]',\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclRadioInputDirective extends ECLBaseDirective implements DoCheck {\n eclRadio = inject(EclRadioDirective);\n protected ngControl = inject(NgControl, { optional: true, self: true });\n protected cd = inject(ChangeDetectorRef);\n\n /**\n * Returns the CSS classes applied to the host input element.\n * Includes the base ecl-radio__input class.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-radio__input'));\n\n ngDoCheck(): void {\n if (this.ngControl) {\n if (this.eclRadio) {\n this.eclRadio.setControlState(\n !!(this.ngControl.invalid && this.ngControl.touched),\n !!this.ngControl.disabled,\n );\n }\n }\n }\n}\n","import { EclRadioInputDirective } from './ecl-radio-input.directive';\nimport { EclRadioLabelComponent } from './ecl-radio-label.component';\nimport { EclRadioDirective } from './ecl-radio.directive';\n\nexport * from './ecl-radio-input.directive';\nexport * from './ecl-radio.directive';\nexport * from './ecl-radio-label.component';\n\nexport const EUI_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AA,CAAA;GACP,UAAU;GACV,MAAM,EACF,WAAW,eACd;EACJ,CAAA;;;ACTD,MAAa,gBAAgB;CACzB;CAAmB;CAAwB;AACrC"}
|
|
@@ -154,7 +154,7 @@ var EclRangeDirective = class EclRangeDirective extends ECLBaseDirective {
|
|
|
154
154
|
this.cssClasses = computed(() => [super.getCssClasses("ecl-range"), this.eclSize() ? `ecl-range--${this.eclSize()}` : ""].join(" ").trim(), ...ngDevMode ? [{ debugName: "cssClasses" }] : /* istanbul ignore next */ []);
|
|
155
155
|
}
|
|
156
156
|
get invalidState() {
|
|
157
|
-
if (this.ngControl) return this.ngControl.status === "INVALID" && this.ngControl.touched;
|
|
157
|
+
if (this.ngControl) return this.ngControl.status === "INVALID" && !!this.ngControl.touched;
|
|
158
158
|
else return this.isInvalid();
|
|
159
159
|
}
|
|
160
160
|
onInput(evt) {
|
|
@@ -215,7 +215,7 @@ var EclRangeDirective = class EclRangeDirective extends ECLBaseDirective {
|
|
|
215
215
|
this.updateRangeValue(initialValue);
|
|
216
216
|
}
|
|
217
217
|
observeReactiveFormValueChanges() {
|
|
218
|
-
this.ngControl?.valueChanges
|
|
218
|
+
this.ngControl?.valueChanges?.pipe(distinctUntilChanged(), takeUntil(this.destroy$)).subscribe((value) => {
|
|
219
219
|
this.updateRangeValue(value);
|
|
220
220
|
});
|
|
221
221
|
}
|