@eui/ecl 22.0.0-alpha.62 → 22.0.0-alpha.64

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.
@@ -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,gBAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAApB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EANhC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM,EACF,SAAS,iBACZ;EACJ,CAAA;;;AAwBD,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CAf1D,cAAA;;EAqBa,KAAA,KAAK,MAAc,iBAAiB,OAAO,WAAU,KAAK,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;EAK1D,KAAA,WAAW,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAM5B,KAAA,SAAS,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAK1B,KAAA,cAAc,MAAc,IAA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AAA,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();\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,gBAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAApB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EANhC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM,EACF,SAAS,iBACZ;EACJ,CAAA;;;AAwBD,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CAf1D,cAAA;;EAqBa,KAAA,KAAK,MAAc,iBAAiB,OAAO,WAAU,KAAK,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;EAK1D,KAAA,WAAW,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAM5B,KAAA,SAAS,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAK1B,KAAA,cAAc,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA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"}
@@ -1,12 +1,12 @@
1
1
  import * as i0 from "@angular/core";
2
- import { ChangeDetectorRef, Component, Directive, ViewEncapsulation, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, model, signal } from "@angular/core";
2
+ import { ChangeDetectorRef, Component, Directive, ViewEncapsulation, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, signal } from "@angular/core";
3
3
  import { NgControl } from "@angular/forms";
4
4
  import { ECLBaseDirective } from "@eui/ecl/core";
5
5
  var EclRadioLabelComponent = class EclRadioLabelComponent extends ECLBaseDirective {
6
6
  constructor() {
7
7
  super(...arguments);
8
- this.isInvalid = model(false, ...ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []);
9
- this.isDisabled = model(false, ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
8
+ this.isInvalid = signal(false, ...ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []);
9
+ this.isDisabled = signal(false, ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
10
10
  this.cssClasses = computed(() => super.getCssClasses("ecl-radio__label"), ...ngDevMode ? [{ debugName: "cssClasses" }] : /* istanbul ignore next */ []);
11
11
  }
12
12
  static {
@@ -21,31 +21,11 @@ var EclRadioLabelComponent = class EclRadioLabelComponent extends ECLBaseDirecti
21
21
  }
22
22
  static {
23
23
  this.ɵcmp = i0.ɵɵngDeclareComponent({
24
- minVersion: "17.1.0",
24
+ minVersion: "14.0.0",
25
25
  version: "22.2.4",
26
26
  type: EclRadioLabelComponent,
27
27
  isStandalone: true,
28
28
  selector: "[eclRadioLabel]",
29
- inputs: {
30
- isInvalid: {
31
- classPropertyName: "isInvalid",
32
- publicName: "isInvalid",
33
- isSignal: true,
34
- isRequired: false,
35
- transformFunction: null
36
- },
37
- isDisabled: {
38
- classPropertyName: "isDisabled",
39
- publicName: "isDisabled",
40
- isSignal: true,
41
- isRequired: false,
42
- transformFunction: null
43
- }
44
- },
45
- outputs: {
46
- isInvalid: "isInvalidChange",
47
- isDisabled: "isDisabledChange"
48
- },
49
29
  host: { properties: { "class": "cssClasses()" } },
50
30
  usesInheritance: true,
51
31
  ngImport: i0,
@@ -67,31 +47,7 @@ i0.ɵɵngDeclareClassMetadata({
67
47
  host: { "[class]": "cssClasses()" },
68
48
  template: "<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"
69
49
  }]
70
- }],
71
- propDecorators: {
72
- isInvalid: [{
73
- type: i0.Input,
74
- args: [{
75
- isSignal: true,
76
- alias: "isInvalid",
77
- required: false
78
- }]
79
- }, {
80
- type: i0.Output,
81
- args: ["isInvalidChange"]
82
- }],
83
- isDisabled: [{
84
- type: i0.Input,
85
- args: [{
86
- isSignal: true,
87
- alias: "isDisabled",
88
- required: false
89
- }]
90
- }, {
91
- type: i0.Output,
92
- args: ["isDisabledChange"]
93
- }]
94
- }
50
+ }]
95
51
  });
96
52
  var EclRadioDirective = class EclRadioDirective extends ECLBaseDirective {
97
53
  constructor() {
@@ -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, model } 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 * Exposed as a model so the parent `eclRadio` directive can synchronize\n * the invalid state onto the label.\n */\n readonly isInvalid = model(false);\n\n /**\n * Adds styling for a disabled state.\n *\n * Exposed as a model so the parent `eclRadio` directive can synchronize\n * the disabled state onto the label.\n */\n readonly isDisabled = model(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;;EAgBa,KAAA,YAAY,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAQxB,KAAA,aAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAMf,KAAA,aAAa,eAC5B,MAAM,cAAc,kBAAkB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAC/C;CAvBY;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,QAAA;IAAA,WAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,YAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA;IAAA,WAAA;IAAA,YAAA;GAAA;GAAA,MAAA,EAAA,YAAA,EAAA,SAAA,eAAA,EAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,UClBnC;GAKA,eAAA,GAAA,kBAAA;EAAA,CAAA;CAAA;;ADaa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EATlC,MAAA;EAEa,MAAA,CAAA;GA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AA;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_ECL_RADIO = [\n EclRadioDirective, EclRadioInputDirective, EclRadioLabelComponent,\n] as const;\n"],"mappings":";;;;AAkBA,IAAa,yBAAb,MAAa,+BAA+B,iBAAgB;CAT5D,cAAA;;EAiBa,KAAA,YAAY,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