@eui/ecl 21.2.6 → 21.2.7-snapshot-1780663563127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/assets/i18n-ecl/bg.json +218 -211
  2. package/assets/i18n-ecl/cs.json +217 -210
  3. package/assets/i18n-ecl/da.json +218 -211
  4. package/assets/i18n-ecl/de.json +218 -211
  5. package/assets/i18n-ecl/el.json +218 -211
  6. package/assets/i18n-ecl/en.json +219 -212
  7. package/assets/i18n-ecl/es.json +218 -211
  8. package/assets/i18n-ecl/et.json +219 -212
  9. package/assets/i18n-ecl/fi.json +219 -212
  10. package/assets/i18n-ecl/fr.json +219 -212
  11. package/assets/i18n-ecl/ga.json +219 -212
  12. package/assets/i18n-ecl/hr.json +219 -212
  13. package/assets/i18n-ecl/hu.json +219 -212
  14. package/assets/i18n-ecl/it.json +219 -212
  15. package/assets/i18n-ecl/lt.json +219 -212
  16. package/assets/i18n-ecl/lv.json +219 -212
  17. package/assets/i18n-ecl/mt.json +219 -212
  18. package/assets/i18n-ecl/nl.json +219 -212
  19. package/assets/i18n-ecl/pl.json +219 -212
  20. package/assets/i18n-ecl/pt.json +219 -212
  21. package/assets/i18n-ecl/ro.json +219 -212
  22. package/assets/i18n-ecl/sk.json +219 -212
  23. package/assets/i18n-ecl/sl.json +219 -212
  24. package/assets/i18n-ecl/sv.json +219 -212
  25. package/components/ecl-add-to-calendar/package.json +4 -0
  26. package/components/ecl-quiz/package.json +4 -0
  27. package/docs/changelog.html +47 -0
  28. package/docs/components/EclAccordionComponent.html +2 -2
  29. package/docs/components/EclAccordionItemComponent.html +2 -2
  30. package/docs/components/EclAccordionSummaryComponent.html +2 -2
  31. package/docs/components/EclAddToCalendarComponent.html +711 -0
  32. package/docs/components/EclAppComponent.html +2 -2
  33. package/docs/components/EclBannerComponent.html +26 -2
  34. package/docs/components/EclBlockquoteComponent.html +2 -2
  35. package/docs/components/EclBreadcrumbComponent.html +2 -2
  36. package/docs/components/EclBreadcrumbSegmentComponent.html +2 -2
  37. package/docs/components/EclButtonComponent.html +2 -2
  38. package/docs/components/EclCardBodyComponent.html +2 -2
  39. package/docs/components/EclCardComponent.html +2 -2
  40. package/docs/components/EclCarouselComponent.html +2 -2
  41. package/docs/components/EclCarouselItemComponent.html +2 -2
  42. package/docs/components/EclCategoryFilterComponent.html +2 -2
  43. package/docs/components/EclCategoryFilterItemComponent.html +2 -2
  44. package/docs/components/EclCategoryFilterListComponent.html +2 -2
  45. package/docs/components/EclCheckboxHelpComponent.html +2 -2
  46. package/docs/components/EclCheckboxLabelComponent.html +2 -2
  47. package/docs/components/EclContentBlockComponent.html +2 -2
  48. package/docs/components/EclContentItemComponent.html +2 -2
  49. package/docs/components/EclDateBlockComponent.html +2 -2
  50. package/docs/components/EclDescriptionListDefinitionComponent.html +2 -2
  51. package/docs/components/EclExpandableComponent.html +2 -2
  52. package/docs/components/EclFactFiguresComponent.html +2 -2
  53. package/docs/components/EclFactFiguresItemComponent.html +2 -2
  54. package/docs/components/EclFactFiguresViewAllComponent.html +2 -2
  55. package/docs/components/EclFeaturedComponent.html +2 -2
  56. package/docs/components/EclFeaturedItemComponent.html +19 -43
  57. package/docs/components/EclFeaturedItemDescriptionComponent.html +2 -2
  58. package/docs/components/EclFileComponent.html +42 -17
  59. package/docs/components/EclFileItemComponent.html +29 -10
  60. package/docs/components/EclFileItemsComponent.html +2 -2
  61. package/docs/components/EclFileTaxonomyComponent.html +2 -2
  62. package/docs/components/EclFormGroupComponent.html +2 -2
  63. package/docs/components/EclFormLabelComponent.html +2 -2
  64. package/docs/components/EclGalleryComponent.html +2 -2
  65. package/docs/components/EclGalleryFooterComponent.html +2 -2
  66. package/docs/components/EclGalleryItemComponent.html +2 -2
  67. package/docs/components/EclIconComponent.html +3 -3
  68. package/docs/components/EclIndicatorComponent-1.html +2 -2
  69. package/docs/components/EclIndicatorComponent.html +2 -2
  70. package/docs/components/EclInpageNavigationComponent.html +2 -2
  71. package/docs/components/EclInpageNavigationItemComponent.html +2 -2
  72. package/docs/components/EclListIllustrationComponent.html +2 -2
  73. package/docs/components/EclListIllustrationItemComponent.html +2 -2
  74. package/docs/components/EclLoadingIndicatorComponent.html +2 -2
  75. package/docs/components/EclMediaContainerComponent.html +2 -2
  76. package/docs/components/EclMegaMenuComponent.html +2 -2
  77. package/docs/components/EclMegaMenuFeaturedComponent.html +2 -2
  78. package/docs/components/EclMegaMenuInfoComponent.html +2 -2
  79. package/docs/components/EclMegaMenuItemComponent.html +2 -2
  80. package/docs/components/EclMegaMenuSubitemComponent.html +2 -2
  81. package/docs/components/EclMenuComponent.html +2 -2
  82. package/docs/components/EclMenuItemComponent.html +15 -15
  83. package/docs/components/EclMenuMegaComponent.html +2 -2
  84. package/docs/components/EclMenuMegaItemComponent.html +2 -2
  85. package/docs/components/EclModalBodyComponent.html +2 -2
  86. package/docs/components/EclModalComponent.html +2 -2
  87. package/docs/components/EclModalFooterComponent.html +2 -2
  88. package/docs/components/EclModalHeaderComponent.html +2 -2
  89. package/docs/components/EclMultiselectComponent.html +148 -12
  90. package/docs/components/EclMultiselectDropdownComponent.html +172 -124
  91. package/docs/components/EclMultiselectInputComponent.html +215 -144
  92. package/docs/components/EclMultiselectOptgroupComponent.html +2 -2
  93. package/docs/components/EclMultiselectOptionComponent.html +2 -2
  94. package/docs/components/EclNavigationListComponent.html +2 -2
  95. package/docs/components/EclNavigationListItemComponent.html +2 -2
  96. package/docs/components/EclNewsTickerComponent.html +2 -2
  97. package/docs/components/EclNewsTickerItemComponent.html +2 -2
  98. package/docs/components/EclNotificationComponent.html +2 -2
  99. package/docs/components/EclPageHeaderComponent.html +2 -2
  100. package/docs/components/EclPageHeaderDescriptionContainerComponent.html +2 -2
  101. package/docs/components/EclPageHeaderExpandableComponent.html +2 -2
  102. package/docs/components/EclPageHeaderNextComponent.html +2 -2
  103. package/docs/components/EclPageHeaderSectionComponent.html +2 -2
  104. package/docs/components/EclPageHeaderSectionInfoComponent.html +2 -2
  105. package/docs/components/EclPaginationComponent.html +2 -2
  106. package/docs/components/EclPaginationItemComponent.html +2 -2
  107. package/docs/components/EclPopoverComponent.html +2 -2
  108. package/docs/components/EclQuizCardComponent.html +2119 -0
  109. package/docs/components/EclQuizComponent.html +1527 -0
  110. package/docs/components/EclRadioHelpComponent.html +2 -2
  111. package/docs/components/EclRadioLabelComponent.html +2 -2
  112. package/docs/components/EclRangeBubbleComponent.html +2 -2
  113. package/docs/components/EclRangeValueComponent.html +2 -2
  114. package/docs/components/EclRatingFieldComponent.html +2 -2
  115. package/docs/components/EclSearchFormComponent.html +2 -2
  116. package/docs/components/EclSelectContainerComponent.html +2 -2
  117. package/docs/components/EclSiteFooterComponent.html +2 -2
  118. package/docs/components/EclSiteFooterCoownerComponent.html +2 -2
  119. package/docs/components/EclSiteFooterCoreComponent.html +2 -2
  120. package/docs/components/EclSiteFooterFixedContentEUComponent.html +2 -2
  121. package/docs/components/EclSiteFooterRowCommonComponent.html +2 -2
  122. package/docs/components/EclSiteHeaderActionComponent.html +2 -2
  123. package/docs/components/EclSiteHeaderBannerTopComponent.html +2 -2
  124. package/docs/components/EclSiteHeaderComponent.html +2 -2
  125. package/docs/components/EclSiteHeaderCustomActionComponent.html +2 -2
  126. package/docs/components/EclSiteHeaderEnvironmentComponent.html +2 -2
  127. package/docs/components/EclSiteHeaderLanguageComponent.html +2 -2
  128. package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +2 -2
  129. package/docs/components/EclSiteHeaderLoginComponent.html +2 -2
  130. package/docs/components/EclSiteHeaderNotificationComponent.html +2 -2
  131. package/docs/components/EclSiteHeaderSearchComponent.html +2 -2
  132. package/docs/components/EclSocialMediaFollowComponent.html +2 -2
  133. package/docs/components/EclSocialMediaFollowItemComponent.html +2 -2
  134. package/docs/components/EclSplashPageComponent.html +2 -2
  135. package/docs/components/EclSplashPageLanguageCategoryComponent.html +2 -2
  136. package/docs/components/EclSplashPageLanguageContainerComponent.html +2 -2
  137. package/docs/components/EclSplashPageLanguageLinkComponent.html +2 -2
  138. package/docs/components/EclSpotlightComponent.html +2 -2
  139. package/docs/components/EclSpotlightLinkComponent.html +2 -2
  140. package/docs/components/EclStickyContainerComponent.html +2 -2
  141. package/docs/components/EclTabComponent.html +2 -2
  142. package/docs/components/EclTabLabelComponent.html +2 -2
  143. package/docs/components/EclTableSortButtonComponent.html +2 -2
  144. package/docs/components/EclTabsComponent.html +111 -131
  145. package/docs/components/EclTagComponent.html +2 -2
  146. package/docs/components/EclTimelineComponent.html +2 -2
  147. package/docs/components/EclTimelineItemComponent.html +2 -2
  148. package/docs/components/EclTimelineItemTogglerComponent.html +2 -2
  149. package/docs/directives/EclAddToCalendarActionDirective.html +253 -0
  150. package/docs/interfaces/EclQuizCardFlipEvent.html +379 -0
  151. package/docs/js/menu-wc.js +15 -0
  152. package/docs/js/menu-wc_es5.js +1 -1
  153. package/docs/js/search/search_index.js +2 -2
  154. package/docs/json/EclAddToCalendarActionDirective.md +8 -0
  155. package/docs/json/EclAddToCalendarComponent.md +21 -0
  156. package/docs/json/EclBannerComponent.md +1 -0
  157. package/docs/json/EclFeaturedItemComponent.md +2 -1
  158. package/docs/json/EclFileComponent.md +2 -1
  159. package/docs/json/EclFileItemComponent.md +2 -1
  160. package/docs/json/EclIconComponent.md +1 -1
  161. package/docs/json/EclMultiselectComponent.md +2 -1
  162. package/docs/json/EclMultiselectInputComponent.md +7 -7
  163. package/docs/json/EclQuizCardComponent.md +30 -0
  164. package/docs/json/EclQuizComponent.md +22 -0
  165. package/docs/json/documentation.json +2658 -714
  166. package/docs/miscellaneous/variables.html +70 -0
  167. package/docs/overview.html +3 -3
  168. package/docs/properties.html +1 -1
  169. package/fesm2022/eui-ecl-components-ecl-add-to-calendar.mjs +73 -0
  170. package/fesm2022/eui-ecl-components-ecl-add-to-calendar.mjs.map +1 -0
  171. package/fesm2022/eui-ecl-components-ecl-app.mjs +5 -3
  172. package/fesm2022/eui-ecl-components-ecl-app.mjs.map +1 -1
  173. package/fesm2022/eui-ecl-components-ecl-banner.mjs +4 -2
  174. package/fesm2022/eui-ecl-components-ecl-banner.mjs.map +1 -1
  175. package/fesm2022/eui-ecl-components-ecl-featured.mjs +9 -13
  176. package/fesm2022/eui-ecl-components-ecl-featured.mjs.map +1 -1
  177. package/fesm2022/eui-ecl-components-ecl-file.mjs +63 -36
  178. package/fesm2022/eui-ecl-components-ecl-file.mjs.map +1 -1
  179. package/fesm2022/eui-ecl-components-ecl-icon.mjs +4 -1
  180. package/fesm2022/eui-ecl-components-ecl-icon.mjs.map +1 -1
  181. package/fesm2022/eui-ecl-components-ecl-menu.mjs +5 -5
  182. package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
  183. package/fesm2022/eui-ecl-components-ecl-multiselect.mjs +146 -133
  184. package/fesm2022/eui-ecl-components-ecl-multiselect.mjs.map +1 -1
  185. package/fesm2022/eui-ecl-components-ecl-quiz.mjs +496 -0
  186. package/fesm2022/eui-ecl-components-ecl-quiz.mjs.map +1 -0
  187. package/fesm2022/eui-ecl-components-ecl-range.mjs +1 -0
  188. package/fesm2022/eui-ecl-components-ecl-range.mjs.map +1 -1
  189. package/fesm2022/eui-ecl-components-ecl-tabs.mjs +72 -51
  190. package/fesm2022/eui-ecl-components-ecl-tabs.mjs.map +1 -1
  191. package/package.json +10 -2
  192. package/types/eui-ecl-components-ecl-add-to-calendar.d.ts +42 -0
  193. package/types/eui-ecl-components-ecl-add-to-calendar.d.ts.map +1 -0
  194. package/types/eui-ecl-components-ecl-app.d.ts.map +1 -1
  195. package/types/eui-ecl-components-ecl-banner.d.ts +2 -1
  196. package/types/eui-ecl-components-ecl-banner.d.ts.map +1 -1
  197. package/types/eui-ecl-components-ecl-featured.d.ts +23 -21
  198. package/types/eui-ecl-components-ecl-featured.d.ts.map +1 -1
  199. package/types/eui-ecl-components-ecl-file.d.ts +22 -15
  200. package/types/eui-ecl-components-ecl-file.d.ts.map +1 -1
  201. package/types/eui-ecl-components-ecl-icon.d.ts.map +1 -1
  202. package/types/eui-ecl-components-ecl-menu.d.ts +1 -1
  203. package/types/eui-ecl-components-ecl-multiselect.d.ts +65 -48
  204. package/types/eui-ecl-components-ecl-multiselect.d.ts.map +1 -1
  205. package/types/eui-ecl-components-ecl-quiz.d.ts +203 -0
  206. package/types/eui-ecl-components-ecl-quiz.d.ts.map +1 -0
  207. package/types/eui-ecl-components-ecl-range.d.ts.map +1 -1
  208. package/types/eui-ecl-components-ecl-tabs.d.ts +6 -17
  209. package/types/eui-ecl-components-ecl-tabs.d.ts.map +1 -1
@@ -0,0 +1,496 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, EventEmitter, booleanAttribute, HostListener, HostBinding, Input, ViewChild, Output, ChangeDetectionStrategy, Component, signal, inject, ChangeDetectorRef, ViewChildren, forwardRef, ContentChildren } from '@angular/core';
3
+ import { EclIconComponent } from '@eui/ecl/components/ecl-icon';
4
+ import { ECLBaseDirective } from '@eui/ecl/core';
5
+ import * as i1 from '@ngx-translate/core';
6
+ import { TranslateModule, TranslateService } from '@ngx-translate/core';
7
+ import { EmblaCarouselDirective } from 'embla-carousel-angular';
8
+
9
+ /**
10
+ * ECL Quiz Card component – represents a single card in the quiz.
11
+ *
12
+ * For the 'reveal' variant, the entire card is clickable to flip.
13
+ * For the 'poll' variant, individual options trigger the flip.
14
+ */
15
+ class EclQuizCardComponent extends ECLBaseDirective {
16
+ constructor() {
17
+ super(...arguments);
18
+ /**
19
+ * The question text displayed on the front of the card.
20
+ */
21
+ this.question = input('', ...(ngDevMode ? [{ debugName: "question" }] : /* istanbul ignore next */ []));
22
+ /**
23
+ * The answer text displayed on the back of the card.
24
+ * Used in 'reveal' variant or as explanation in 'poll' variant.
25
+ */
26
+ this.answer = input('', ...(ngDevMode ? [{ debugName: "answer" }] : /* istanbul ignore next */ []));
27
+ /**
28
+ * The answer title (e.g. "The correct answer is A.") for poll variant.
29
+ */
30
+ this.answerTitle = input('', ...(ngDevMode ? [{ debugName: "answerTitle" }] : /* istanbul ignore next */ []));
31
+ /**
32
+ * Category label displayed in the card header (poll variant).
33
+ */
34
+ this.category = input('', ...(ngDevMode ? [{ debugName: "category" }] : /* istanbul ignore next */ []));
35
+ /**
36
+ * Icon name for the card header.
37
+ * Defaults to 'sparkle' for reveal, 'question' for poll.
38
+ */
39
+ this.icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
40
+ /**
41
+ * Icon size for the card header.
42
+ */
43
+ this.iconSize = input('xl', ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
44
+ /**
45
+ * The variant of the quiz, set by the parent EclQuizComponent.
46
+ */
47
+ this.variant = 'reveal';
48
+ /**
49
+ * Options for the poll variant. Each option has text and a match flag.
50
+ */
51
+ this.options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
52
+ /**
53
+ * Whether this card is currently active/visible in the slider.
54
+ */
55
+ this.isActive = false;
56
+ /**
57
+ * Emitted when the card is flipped.
58
+ */
59
+ this.cardFlip = new EventEmitter();
60
+ /** Whether the card is currently flipped (showing back). */
61
+ this.isFlipped = false;
62
+ /** Index of the selected option (poll variant). */
63
+ this.selectedOptionIndex = null;
64
+ /** Whether the selected option is correct (poll variant). */
65
+ this.isCorrect = null;
66
+ this.role = 'group';
67
+ this.ariaRoleDescription = null;
68
+ this.ariaHidden = null;
69
+ this.styleTransform = 'translate3d(0px, 0px, 0px)';
70
+ }
71
+ get cssClasses() {
72
+ return [
73
+ super.getCssClasses('ecl-quiz-card'),
74
+ this.isFlipped ? 'ecl-quiz-card__flipped' : '',
75
+ ]
76
+ .join(' ')
77
+ .trim();
78
+ }
79
+ get tabIndex() {
80
+ return this.variant === 'reveal' ? 0 : null;
81
+ }
82
+ get ariaPressed() {
83
+ return this.variant === 'reveal' ? String(this.isFlipped) : null;
84
+ }
85
+ /**
86
+ * Handle click on the card itself (reveal variant).
87
+ */
88
+ onClick() {
89
+ if (this.variant === 'reveal') {
90
+ this.flipCard();
91
+ }
92
+ }
93
+ /**
94
+ * Handle keyboard events (Enter/Space to flip for reveal variant).
95
+ */
96
+ onKeydown(event) {
97
+ if (this.variant === 'reveal' && (event.key === 'Enter' || event.key === ' ')) {
98
+ event.preventDefault();
99
+ this.flipCard();
100
+ }
101
+ }
102
+ /**
103
+ * Handle option click (poll variant).
104
+ */
105
+ onOptionClick(optionIndex) {
106
+ if (this.isFlipped) {
107
+ return;
108
+ }
109
+ const optionsList = this.options();
110
+ this.selectedOptionIndex = optionIndex;
111
+ this.isCorrect = optionsList[optionIndex]?.match ?? false;
112
+ this.flipCard();
113
+ }
114
+ /**
115
+ * Handle keyboard on option (poll variant).
116
+ */
117
+ onOptionKeydown(event, optionIndex) {
118
+ if (event.key === 'Enter' || event.key === ' ') {
119
+ event.preventDefault();
120
+ this.onOptionClick(optionIndex);
121
+ }
122
+ }
123
+ /**
124
+ * Flip the card between front and back.
125
+ */
126
+ flipCard() {
127
+ this.isFlipped = !this.isFlipped;
128
+ const event = { flipped: this.isFlipped };
129
+ if (this.variant === 'poll') {
130
+ event.selectedOptionIndex = this.selectedOptionIndex;
131
+ event.isCorrect = this.isCorrect;
132
+ }
133
+ this.cardFlip.emit(event);
134
+ }
135
+ /** Get the native front element for height calculations. */
136
+ getFrontElement() {
137
+ return this.frontElementRef?.nativeElement ?? null;
138
+ }
139
+ /** Get the native back element for height calculations. */
140
+ getBackElement() {
141
+ return this.backElementRef?.nativeElement ?? null;
142
+ }
143
+ /** Get the native question element for height calculations. */
144
+ getQuestionElement() {
145
+ return this.questionElementRef?.nativeElement ?? null;
146
+ }
147
+ /** Get the native answer element for height calculations. */
148
+ getAnswerElement() {
149
+ return this.answerElementRef?.nativeElement ?? null;
150
+ }
151
+ /** Get the native content element for height calculations. */
152
+ getContentElement() {
153
+ return this.contentElementRef?.nativeElement ?? null;
154
+ }
155
+ /** Get the resolved icon name based on variant. */
156
+ getIconName() {
157
+ if (this.icon()) {
158
+ return this.icon();
159
+ }
160
+ return this.variant === 'poll' ? 'question' : 'sparkle';
161
+ }
162
+ /** Get the resolved icon size. */
163
+ getIconSize() {
164
+ return this.iconSize() || (this.variant === 'poll' ? '2xl' : 'xl');
165
+ }
166
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: EclQuizCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
167
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: EclQuizCardComponent, isStandalone: true, selector: "div[eclQuizCard]", inputs: { question: { classPropertyName: "question", publicName: "question", isSignal: true, isRequired: false, transformFunction: null }, answer: { classPropertyName: "answer", publicName: "answer", isSignal: true, isRequired: false, transformFunction: null }, answerTitle: { classPropertyName: "answerTitle", publicName: "answerTitle", isSignal: true, isRequired: false, transformFunction: null }, category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, ariaHidden: { classPropertyName: "ariaHidden", publicName: "ariaHidden", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { cardFlip: "cardFlip" }, host: { listeners: { "click": "onClick()", "keydown": "onKeydown($event)" }, properties: { "class": "this.cssClasses", "attr.role": "this.role", "attr.aria-roledescription": "this.ariaRoleDescription", "attr.aria-hidden": "this.ariaHidden", "attr.tabindex": "this.tabIndex", "attr.aria-pressed": "this.ariaPressed", "style.tranform": "this.styleTransform" } }, viewQueries: [{ propertyName: "frontElementRef", first: true, predicate: ["frontElement"], descendants: true }, { propertyName: "backElementRef", first: true, predicate: ["backElement"], descendants: true }, { propertyName: "questionElementRef", first: true, predicate: ["questionElement"], descendants: true }, { propertyName: "answerElementRef", first: true, predicate: ["answerElement"], descendants: true }, { propertyName: "contentElementRef", first: true, predicate: ["contentElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-quiz-card__content\" #contentElement>\n <!-- Front face -->\n <div class=\"ecl-quiz-card__front\" #frontElement [hidden]=\"isFlipped\">\n <div class=\"ecl-quiz-card__header\">\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon\n [icon]=\"getIconName()\"\n [size]=\"getIconSize()\"\n iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n @if (category()) {\n <span class=\"ecl-quiz-card__category\">{{ category() }}</span>\n }\n </div>\n\n <div class=\"ecl-quiz-card__question\" #questionElement>{{ question() }}</div>\n\n @if (variant === 'reveal') {\n <!-- Reveal variant: flip label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.CLICK-TO-REVEAL' | translate }}\n <ecl-icon iconSet=\"phosphor\" icon=\"arrow-clockwise\" size=\"m\"></ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: options -->\n <div class=\"ecl-quiz-card__options\">\n @for (option of options(); let i = $index; track i) {\n <div\n class=\"ecl-quiz-card__option\"\n role=\"button\"\n [attr.tabindex]=\"0\"\n [attr.aria-pressed]=\"selectedOptionIndex === i ? 'true' : 'false'\"\n [attr.data-match]=\"option.match\"\n (click)=\"onOptionClick(i)\"\n (keydown)=\"onOptionKeydown($event, i)\">\n {{ option.text }}\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Back face -->\n <div\n class=\"ecl-quiz-card__back\"\n #backElement\n [hidden]=\"!isFlipped\"\n [class.ecl-quiz-card--correct]=\"variant === 'poll' && isCorrect === true\">\n <div class=\"ecl-quiz-card__header\">\n @if (variant === 'reveal') {\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon\n [icon]=\"getIconName()\"\n [size]=\"getIconSize()\"\n iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: success/error icons and category labels -->\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon\n icon=\"check-circle\"\n iconSet=\"phosphor\"\n size=\"2xl\"\n class=\"ecl-quiz-card__icon--success\">\n </ecl-icon>\n <ecl-icon\n icon=\"x-circle\"\n size=\"2xl\"\n iconSet=\"phosphor\"\n class=\"ecl-quiz-card__icon--error\">\n </ecl-icon>\n </div>\n <span class=\"ecl-quiz-card__category ecl-quiz-card__category--success\">Correct</span>\n <span class=\"ecl-quiz-card__category ecl-quiz-card__category--error\">Incorrect</span>\n }\n </div>\n\n <div class=\"ecl-quiz-card__answer\" #answerElement>\n @if (answerTitle()) {\n <div class=\"ecl-quiz-card__answer-title\">{{ answerTitle() }}</div>\n }\n {{ answer() }}\n </div>\n\n @if (variant === 'reveal') {\n <!-- Reveal variant: go back label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.GO-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 <div class=\"ecl-quiz-card__options\" role=\"list\">\n @for (option of options(); let i = $index; track i) {\n <div\n class=\"ecl-quiz-card__option\"\n role=\"listitem\"\n [class.ecl-quiz-card__option--selected]=\"selectedOptionIndex === i\"\n [attr.data-match]=\"option.match\">\n {{ option.text }}\n </div>\n }\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
168
+ }
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: EclQuizCardComponent, decorators: [{
170
+ type: Component,
171
+ args: [{ selector: 'div[eclQuizCard]', imports: [EclIconComponent, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ecl-quiz-card__content\" #contentElement>\n <!-- Front face -->\n <div class=\"ecl-quiz-card__front\" #frontElement [hidden]=\"isFlipped\">\n <div class=\"ecl-quiz-card__header\">\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon\n [icon]=\"getIconName()\"\n [size]=\"getIconSize()\"\n iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n @if (category()) {\n <span class=\"ecl-quiz-card__category\">{{ category() }}</span>\n }\n </div>\n\n <div class=\"ecl-quiz-card__question\" #questionElement>{{ question() }}</div>\n\n @if (variant === 'reveal') {\n <!-- Reveal variant: flip label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.CLICK-TO-REVEAL' | translate }}\n <ecl-icon iconSet=\"phosphor\" icon=\"arrow-clockwise\" size=\"m\"></ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: options -->\n <div class=\"ecl-quiz-card__options\">\n @for (option of options(); let i = $index; track i) {\n <div\n class=\"ecl-quiz-card__option\"\n role=\"button\"\n [attr.tabindex]=\"0\"\n [attr.aria-pressed]=\"selectedOptionIndex === i ? 'true' : 'false'\"\n [attr.data-match]=\"option.match\"\n (click)=\"onOptionClick(i)\"\n (keydown)=\"onOptionKeydown($event, i)\">\n {{ option.text }}\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Back face -->\n <div\n class=\"ecl-quiz-card__back\"\n #backElement\n [hidden]=\"!isFlipped\"\n [class.ecl-quiz-card--correct]=\"variant === 'poll' && isCorrect === true\">\n <div class=\"ecl-quiz-card__header\">\n @if (variant === 'reveal') {\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon\n [icon]=\"getIconName()\"\n [size]=\"getIconSize()\"\n iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: success/error icons and category labels -->\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon\n icon=\"check-circle\"\n iconSet=\"phosphor\"\n size=\"2xl\"\n class=\"ecl-quiz-card__icon--success\">\n </ecl-icon>\n <ecl-icon\n icon=\"x-circle\"\n size=\"2xl\"\n iconSet=\"phosphor\"\n class=\"ecl-quiz-card__icon--error\">\n </ecl-icon>\n </div>\n <span class=\"ecl-quiz-card__category ecl-quiz-card__category--success\">Correct</span>\n <span class=\"ecl-quiz-card__category ecl-quiz-card__category--error\">Incorrect</span>\n }\n </div>\n\n <div class=\"ecl-quiz-card__answer\" #answerElement>\n @if (answerTitle()) {\n <div class=\"ecl-quiz-card__answer-title\">{{ answerTitle() }}</div>\n }\n {{ answer() }}\n </div>\n\n @if (variant === 'reveal') {\n <!-- Reveal variant: go back label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.GO-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 <div class=\"ecl-quiz-card__options\" role=\"list\">\n @for (option of options(); let i = $index; track i) {\n <div\n class=\"ecl-quiz-card__option\"\n role=\"listitem\"\n [class.ecl-quiz-card__option--selected]=\"selectedOptionIndex === i\"\n [attr.data-match]=\"option.match\">\n {{ option.text }}\n </div>\n }\n </div>\n }\n </div>\n</div>\n" }]
172
+ }], propDecorators: { question: [{ type: i0.Input, args: [{ isSignal: true, alias: "question", required: false }] }], answer: [{ type: i0.Input, args: [{ isSignal: true, alias: "answer", required: false }] }], answerTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "answerTitle", required: false }] }], category: [{ type: i0.Input, args: [{ isSignal: true, alias: "category", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], isActive: [{
173
+ type: Input,
174
+ args: [{ transform: booleanAttribute }]
175
+ }], cardFlip: [{
176
+ type: Output
177
+ }], frontElementRef: [{
178
+ type: ViewChild,
179
+ args: ['frontElement']
180
+ }], backElementRef: [{
181
+ type: ViewChild,
182
+ args: ['backElement']
183
+ }], questionElementRef: [{
184
+ type: ViewChild,
185
+ args: ['questionElement']
186
+ }], answerElementRef: [{
187
+ type: ViewChild,
188
+ args: ['answerElement']
189
+ }], contentElementRef: [{
190
+ type: ViewChild,
191
+ args: ['contentElement']
192
+ }], cssClasses: [{
193
+ type: HostBinding,
194
+ args: ['class']
195
+ }], role: [{
196
+ type: HostBinding,
197
+ args: ['attr.role']
198
+ }], ariaRoleDescription: [{
199
+ type: HostBinding,
200
+ args: ['attr.aria-roledescription']
201
+ }], ariaHidden: [{
202
+ type: HostBinding,
203
+ args: ['attr.aria-hidden']
204
+ }, {
205
+ type: Input
206
+ }], tabIndex: [{
207
+ type: HostBinding,
208
+ args: ['attr.tabindex']
209
+ }], ariaPressed: [{
210
+ type: HostBinding,
211
+ args: ['attr.aria-pressed']
212
+ }], styleTransform: [{
213
+ type: HostBinding,
214
+ args: ['style.tranform']
215
+ }], onClick: [{
216
+ type: HostListener,
217
+ args: ['click']
218
+ }], onKeydown: [{
219
+ type: HostListener,
220
+ args: ['keydown', ['$event']]
221
+ }] } });
222
+
223
+ /**
224
+ * ECL Quiz component – renders a carousel of quiz cards with navigation.
225
+ * Supports two variants: 'reveal' (flip cards) and 'poll' (multiple choice).
226
+ *
227
+ * Uses Embla Carousel (via embla-carousel-angular) to match the ECL vanilla
228
+ * implementation which also uses Embla internally.
229
+ */
230
+ class EclQuizComponent extends ECLBaseDirective {
231
+ constructor() {
232
+ super(...arguments);
233
+ /** Quiz variant: 'reveal' for flip cards, 'poll' for multiple choice. */
234
+ this.variant = input('reveal', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
235
+ /** Title displayed in the quiz header. */
236
+ this.eclTitle = input('', ...(ngDevMode ? [{ debugName: "eclTitle" }] : /* istanbul ignore next */ []));
237
+ /** Description displayed below the title. */
238
+ this.eclDescription = input('', ...(ngDevMode ? [{ debugName: "eclDescription" }] : /* istanbul ignore next */ []));
239
+ /** Embla carousel options matching ECL's configuration. */
240
+ this.emblaOptions = { loop: false, align: 'start' };
241
+ /** Current snap index. */
242
+ this.activeIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
243
+ /** Total number of snap points. */
244
+ this.totalSnaps = signal(0, ...(ngDevMode ? [{ debugName: "totalSnaps" }] : /* istanbul ignore next */ []));
245
+ /** Live region text for screen readers. */
246
+ this.liveRegionText = signal('', ...(ngDevMode ? [{ debugName: "liveRegionText" }] : /* istanbul ignore next */ []));
247
+ /** Counter text for mobile display. */
248
+ this.counterText = signal('', ...(ngDevMode ? [{ debugName: "counterText" }] : /* istanbul ignore next */ []));
249
+ /** Whether the previous button is disabled. */
250
+ this.prevDisabled = signal(true, ...(ngDevMode ? [{ debugName: "prevDisabled" }] : /* istanbul ignore next */ []));
251
+ /** Whether the next button is disabled. */
252
+ this.nextDisabled = signal(true, ...(ngDevMode ? [{ debugName: "nextDisabled" }] : /* istanbul ignore next */ []));
253
+ /** Whether navigation controls should be shown. */
254
+ this.showControls = signal(false, ...(ngDevMode ? [{ debugName: "showControls" }] : /* istanbul ignore next */ []));
255
+ this.cd = inject(ChangeDetectorRef);
256
+ this.translateService = inject(TranslateService);
257
+ /** Subscribed Embla events. */
258
+ this.subscribeToEvents = ['select', 'init', 'reInit'];
259
+ }
260
+ get cssClasses() {
261
+ return [
262
+ super.getCssClasses('ecl-quiz'),
263
+ `ecl-quiz--${this.variant()}`,
264
+ ]
265
+ .join(' ')
266
+ .trim();
267
+ }
268
+ // @HostBinding('attr.data-ecl-auto-init')
269
+ // get autoInit(): string {
270
+ // return 'Quiz';
271
+ // }
272
+ ngAfterContentInit() {
273
+ if (this.cards && this.cards.length > 1) {
274
+ this.showControls.set(true);
275
+ }
276
+ this.propagateVariant();
277
+ this.cards.changes.subscribe(() => this.propagateVariant());
278
+ }
279
+ ngAfterViewInit() {
280
+ // Give Embla time to initialize
281
+ setTimeout(() => {
282
+ this.initEmbla();
283
+ });
284
+ }
285
+ /** Handle keyboard events. */
286
+ onKeydown(event) {
287
+ if (event.key === 'Escape') {
288
+ this.escapeSlider();
289
+ }
290
+ }
291
+ /** Navigate to the previous snap. */
292
+ onPrevClick() {
293
+ if (this.emblaRef) {
294
+ this.emblaRef.scrollPrev();
295
+ }
296
+ }
297
+ /** Navigate to the next snap. */
298
+ onNextClick() {
299
+ if (this.emblaRef) {
300
+ this.emblaRef.scrollNext();
301
+ }
302
+ }
303
+ /** Navigate to a specific snap index. */
304
+ goTo(index) {
305
+ if (this.emblaRef) {
306
+ this.emblaRef.scrollTo(index);
307
+ }
308
+ }
309
+ /** Returns the total number of cards. */
310
+ getCardsCount() {
311
+ return this.cards?.length ?? 0;
312
+ }
313
+ /** Returns an array of indices for dot rendering. */
314
+ getDotIndices() {
315
+ return Array.from({ length: this.totalSnaps() }, (_, i) => i);
316
+ }
317
+ /** Called by the emblaChange event from the directive. */
318
+ onEmblaChange(eventName) {
319
+ if (!this.emblaApi) {
320
+ this.emblaApi = this.emblaRef?.emblaApi;
321
+ }
322
+ if (!this.emblaApi) {
323
+ return;
324
+ }
325
+ if (eventName === 'select' || eventName === 'init' || eventName === 'reInit') {
326
+ this.syncState();
327
+ }
328
+ if (eventName === 'reInit') {
329
+ this.checkHeight();
330
+ }
331
+ }
332
+ /**
333
+ * Equalizes the height of all cards based on the tallest content.
334
+ * Mirrors the ECL vanilla `checkHeight()` logic.
335
+ */
336
+ checkHeight() {
337
+ if (!this.cards || this.cards.length === 0) {
338
+ return;
339
+ }
340
+ let maxTextHeight = 0;
341
+ let maxHeight = 0;
342
+ const cardsArray = this.cards.toArray();
343
+ // First pass: find the tallest question/answer text
344
+ cardsArray.forEach((card) => {
345
+ const frontEl = card.getFrontElement();
346
+ const backEl = card.getBackElement();
347
+ const questionEl = card.getQuestionElement();
348
+ const answerEl = card.getAnswerElement();
349
+ if (!frontEl || !backEl || !questionEl || !answerEl) {
350
+ return;
351
+ }
352
+ frontEl.style.position = 'static';
353
+ backEl.style.position = 'static';
354
+ questionEl.style.minHeight = '';
355
+ answerEl.style.minHeight = '';
356
+ const heightQuestion = questionEl.scrollHeight;
357
+ const heightAnswer = answerEl.scrollHeight;
358
+ const heightText = Math.max(heightQuestion, heightAnswer);
359
+ if (heightText > maxTextHeight) {
360
+ maxTextHeight = heightText;
361
+ }
362
+ frontEl.style.position = '';
363
+ backEl.style.position = '';
364
+ });
365
+ // Second pass: apply min-height and find tallest card
366
+ cardsArray.forEach((card) => {
367
+ const frontEl = card.getFrontElement();
368
+ const backEl = card.getBackElement();
369
+ const questionEl = card.getQuestionElement();
370
+ const answerEl = card.getAnswerElement();
371
+ const contentEl = card.getContentElement();
372
+ if (!frontEl || !backEl || !questionEl || !answerEl || !contentEl) {
373
+ return;
374
+ }
375
+ frontEl.style.position = 'static';
376
+ backEl.style.position = 'static';
377
+ contentEl.style.height = '';
378
+ questionEl.style.minHeight = maxTextHeight + 'px';
379
+ answerEl.style.minHeight = maxTextHeight + 'px';
380
+ const heightFront = frontEl.scrollHeight;
381
+ const heightBack = backEl.scrollHeight;
382
+ const height = Math.max(heightFront, heightBack);
383
+ const minHeight = parseFloat(getComputedStyle(frontEl).getPropertyValue('min-height')) || 345;
384
+ if (height > minHeight && height > maxHeight) {
385
+ maxHeight = height;
386
+ }
387
+ frontEl.style.position = '';
388
+ backEl.style.position = '';
389
+ });
390
+ // Third pass: apply uniform height
391
+ if (maxHeight > 0) {
392
+ cardsArray.forEach((card) => {
393
+ const contentEl = card.getContentElement();
394
+ if (contentEl) {
395
+ contentEl.style.height = maxHeight + 'px';
396
+ }
397
+ });
398
+ }
399
+ }
400
+ /** Initialize Embla and wire up state syncing. */
401
+ initEmbla() {
402
+ if (!this.emblaRef) {
403
+ return;
404
+ }
405
+ this.emblaApi = this.emblaRef.emblaApi;
406
+ if (!this.emblaApi) {
407
+ return;
408
+ }
409
+ this.syncState();
410
+ this.checkHeight();
411
+ this.cd.detectChanges();
412
+ }
413
+ /** Sync component state from Embla API. */
414
+ syncState() {
415
+ if (!this.emblaApi) {
416
+ return;
417
+ }
418
+ const snapList = this.emblaApi.scrollSnapList();
419
+ const selectedSnap = this.emblaApi.selectedScrollSnap();
420
+ const canScrollPrev = this.emblaApi.canScrollPrev();
421
+ const canScrollNext = this.emblaApi.canScrollNext();
422
+ this.totalSnaps.set(snapList.length);
423
+ this.activeIndex.set(selectedSnap);
424
+ this.prevDisabled.set(!canScrollPrev);
425
+ this.nextDisabled.set(!canScrollNext);
426
+ this.showControls.set(canScrollPrev || canScrollNext);
427
+ this.updateCounter();
428
+ this.updateLiveRegion();
429
+ }
430
+ /** Update the counter text (mobile). */
431
+ updateCounter() {
432
+ const total = this.totalSnaps();
433
+ const current = this.activeIndex() + 1;
434
+ this.counterText.set(`${current} / ${total}`);
435
+ }
436
+ /** Update the live region for screen readers. */
437
+ updateLiveRegion() {
438
+ const totalCards = this.getCardsCount();
439
+ const totalGroups = this.totalSnaps();
440
+ const currentGroup = this.activeIndex() + 1;
441
+ this.liveRegionText.set(this.translateService.instant('ecl.quiz.SHOWING-SLIDE', { current: currentGroup, totalSlides: totalCards, totalGroups }));
442
+ }
443
+ /** Move focus to the last dot button when Escape is pressed. */
444
+ escapeSlider() {
445
+ if (this.dotButtons && this.dotButtons.length > 0) {
446
+ const lastDot = this.dotButtons.last;
447
+ lastDot.nativeElement.focus();
448
+ }
449
+ }
450
+ /** Propagate the variant and aria-roledescription to all child cards. */
451
+ propagateVariant() {
452
+ const v = this.variant();
453
+ const isCarousel = this.cards.length > 1;
454
+ this.cards?.forEach(card => {
455
+ card.variant = v;
456
+ card.ariaRoleDescription = isCarousel ? 'slide' : null;
457
+ });
458
+ }
459
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: EclQuizComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
460
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: EclQuizComponent, isStandalone: true, selector: "div[eclQuiz]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, eclTitle: { classPropertyName: "eclTitle", publicName: "eclTitle", isSignal: true, isRequired: false, transformFunction: null }, eclDescription: { classPropertyName: "eclDescription", publicName: "eclDescription", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class": "this.cssClasses" } }, queries: [{ propertyName: "cards", predicate: i0.forwardRef(() => EclQuizCardComponent) }], viewQueries: [{ propertyName: "emblaRef", first: true, predicate: EmblaCarouselDirective, descendants: true }, { propertyName: "dotButtons", predicate: ["dotButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@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 <div class=\"ecl-quiz__list\">\n <ng-content></ng-content>\n </div>\n</div>\n\n@if (showControls()) {\n<div class=\"ecl-quiz__pager\">\n <button\n class=\"ecl-quiz__prev\"\n [disabled]=\"prevDisabled()\"\n (click)=\"onPrevClick()\">\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-270\"></ecl-icon>\n <span class=\"ecl-quiz__prev-label\">\n {{ 'ecl.quiz.PREVIOUS' | translate }}\n </span>\n </button>\n\n <div class=\"ecl-quiz__dots\">\n @for (dotIndex of getDotIndices(); track dotIndex) {\n <button\n #dotButton\n class=\"ecl-quiz__dot\"\n [class.ecl-quiz__dot--active]=\"dotIndex === activeIndex()\"\n [class.is-prev]=\"dotIndex === activeIndex() - 1\"\n [attr.aria-label]=\"'ecl.quiz.GO-TO-SLIDE' | translate: { current: dotIndex + 1, total: totalSnaps() }\"\n (click)=\"goTo(dotIndex)\">\n </button>\n }\n </div>\n\n <button\n class=\"ecl-quiz__next\"\n [disabled]=\"nextDisabled()\"\n (click)=\"onNextClick()\">\n <span class=\"ecl-quiz__next-label\">\n {{ 'ecl.quiz.NEXT' | translate }}\n </span>\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-90\"></ecl-icon>\n </button>\n</div>\n\n<div class=\"ecl-quiz__counter\">{{ counterText() }}</div>\n}\n\n<div class=\"ecl-quiz__live-region\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveRegionText() }}</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { kind: "directive", type: EmblaCarouselDirective, selector: "[emblaCarousel]", inputs: ["options", "plugins", "subscribeToEvents", "eventsThrottleTime"], outputs: ["emblaChange"], exportAs: ["emblaCarousel"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
461
+ }
462
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: EclQuizComponent, decorators: [{
463
+ type: Component,
464
+ args: [{ selector: 'div[eclQuiz]', imports: [
465
+ TranslateModule,
466
+ EclIconComponent,
467
+ EmblaCarouselDirective,
468
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@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 <div class=\"ecl-quiz__list\">\n <ng-content></ng-content>\n </div>\n</div>\n\n@if (showControls()) {\n<div class=\"ecl-quiz__pager\">\n <button\n class=\"ecl-quiz__prev\"\n [disabled]=\"prevDisabled()\"\n (click)=\"onPrevClick()\">\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-270\"></ecl-icon>\n <span class=\"ecl-quiz__prev-label\">\n {{ 'ecl.quiz.PREVIOUS' | translate }}\n </span>\n </button>\n\n <div class=\"ecl-quiz__dots\">\n @for (dotIndex of getDotIndices(); track dotIndex) {\n <button\n #dotButton\n class=\"ecl-quiz__dot\"\n [class.ecl-quiz__dot--active]=\"dotIndex === activeIndex()\"\n [class.is-prev]=\"dotIndex === activeIndex() - 1\"\n [attr.aria-label]=\"'ecl.quiz.GO-TO-SLIDE' | translate: { current: dotIndex + 1, total: totalSnaps() }\"\n (click)=\"goTo(dotIndex)\">\n </button>\n }\n </div>\n\n <button\n class=\"ecl-quiz__next\"\n [disabled]=\"nextDisabled()\"\n (click)=\"onNextClick()\">\n <span class=\"ecl-quiz__next-label\">\n {{ 'ecl.quiz.NEXT' | translate }}\n </span>\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-90\"></ecl-icon>\n </button>\n</div>\n\n<div class=\"ecl-quiz__counter\">{{ counterText() }}</div>\n}\n\n<div class=\"ecl-quiz__live-region\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveRegionText() }}</div>\n" }]
469
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], eclTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "eclTitle", required: false }] }], eclDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "eclDescription", required: false }] }], cards: [{
470
+ type: ContentChildren,
471
+ args: [forwardRef(() => EclQuizCardComponent)]
472
+ }], emblaRef: [{
473
+ type: ViewChild,
474
+ args: [EmblaCarouselDirective]
475
+ }], dotButtons: [{
476
+ type: ViewChildren,
477
+ args: ['dotButton']
478
+ }], cssClasses: [{
479
+ type: HostBinding,
480
+ args: ['class']
481
+ }], onKeydown: [{
482
+ type: HostListener,
483
+ args: ['keydown', ['$event']]
484
+ }] } });
485
+
486
+ const EUI_ECL_QUIZ = [
487
+ EclQuizComponent,
488
+ EclQuizCardComponent,
489
+ ];
490
+
491
+ /**
492
+ * Generated bundle index. Do not edit.
493
+ */
494
+
495
+ export { EUI_ECL_QUIZ, EclQuizCardComponent, EclQuizComponent };
496
+ //# sourceMappingURL=eui-ecl-components-ecl-quiz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eui-ecl-components-ecl-quiz.mjs","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","../../components/ecl-quiz/eui-ecl-components-ecl-quiz.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n Output,\n ViewChild,\n booleanAttribute,\n input,\n} from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { TranslateModule } from '@ngx-translate/core';\n\nexport interface EclQuizCardFlipEvent {\n flipped: boolean;\n selectedOptionIndex?: number;\n isCorrect?: boolean;\n}\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: 'div[eclQuizCard]',\n templateUrl: './ecl-quiz-card.component.html',\n imports: [EclIconComponent, TranslateModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EclQuizCardComponent extends ECLBaseDirective {\n\n /**\n * The question text displayed on the front of the card.\n */\n 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 answer = input<string>('');\n\n /**\n * The answer title (e.g. \"The correct answer is A.\") for poll variant.\n */\n answerTitle = input<string>('');\n\n /**\n * Category label displayed in the card header (poll variant).\n */\n category = input<string>('');\n\n /**\n * Icon name for the card header.\n * Defaults to 'sparkle' for reveal, 'question' for poll.\n */\n icon = input<string>('');\n\n /**\n * Icon size for the card header.\n */\n iconSize = input<'xs' | 's' | 'm' | 'l' | 'xl' | '2xl'>('xl');\n\n /**\n * The variant of the quiz, set by the parent EclQuizComponent.\n */\n variant: 'poll' | 'reveal' = 'reveal';\n\n /**\n * Options for the poll variant. Each option has text and a match flag.\n */\n options = input<Array<{ text: string; match: boolean }>>([]);\n\n /**\n * Whether this card is currently active/visible in the slider.\n */\n @Input({ transform: booleanAttribute }) isActive = false;\n\n /**\n * Emitted when the card is flipped.\n */\n @Output() cardFlip = new EventEmitter<EclQuizCardFlipEvent>();\n\n @ViewChild('frontElement') frontElementRef: ElementRef;\n @ViewChild('backElement') backElementRef: ElementRef;\n @ViewChild('questionElement') questionElementRef: ElementRef;\n @ViewChild('answerElement') answerElementRef: ElementRef;\n @ViewChild('contentElement') contentElementRef: ElementRef;\n\n /** Whether the card is currently flipped (showing back). */\n isFlipped = false;\n\n /** Index of the selected option (poll variant). */\n selectedOptionIndex: number | null = null;\n\n /** Whether the selected option is correct (poll variant). */\n isCorrect: boolean | null = null;\n\n @HostBinding('class')\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-quiz-card'),\n this.isFlipped ? 'ecl-quiz-card__flipped' : '',\n ]\n .join(' ')\n .trim();\n }\n\n @HostBinding('attr.role')\n role = 'group';\n\n @HostBinding('attr.aria-roledescription')\n ariaRoleDescription: string | null = null;\n\n @HostBinding('attr.aria-hidden')\n @Input() ariaHidden: string | null = null;\n\n @HostBinding('attr.tabindex')\n get tabIndex(): number | null {\n return this.variant === 'reveal' ? 0 : null;\n }\n\n @HostBinding('attr.aria-pressed')\n get ariaPressed(): string | null {\n return this.variant === 'reveal' ? String(this.isFlipped) : null;\n }\n\n @HostBinding('style.tranform')\n styleTransform = 'translate3d(0px, 0px, 0px)';\n\n /**\n * Handle click on the card itself (reveal variant).\n */\n @HostListener('click')\n 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 @HostListener('keydown', ['$event'])\n 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 onOptionClick(optionIndex: number): void {\n if (this.isFlipped) {\n return;\n }\n const optionsList = this.options();\n this.selectedOptionIndex = optionIndex;\n this.isCorrect = optionsList[optionIndex]?.match ?? false;\n this.flipCard();\n }\n\n /**\n * Handle keyboard on option (poll variant).\n */\n 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 flipCard(): void {\n this.isFlipped = !this.isFlipped;\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 /** 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 the resolved icon name based on variant. */\n getIconName(): string {\n if (this.icon()) {\n return this.icon();\n }\n return this.variant === 'poll' ? 'question' : 'sparkle';\n }\n\n /** Get the resolved icon size. */\n getIconSize(): string {\n return this.iconSize() || (this.variant === 'poll' ? '2xl' : 'xl');\n }\n}\n","<div class=\"ecl-quiz-card__content\" #contentElement>\n <!-- Front face -->\n <div class=\"ecl-quiz-card__front\" #frontElement [hidden]=\"isFlipped\">\n <div class=\"ecl-quiz-card__header\">\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon\n [icon]=\"getIconName()\"\n [size]=\"getIconSize()\"\n iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n @if (category()) {\n <span class=\"ecl-quiz-card__category\">{{ category() }}</span>\n }\n </div>\n\n <div class=\"ecl-quiz-card__question\" #questionElement>{{ question() }}</div>\n\n @if (variant === 'reveal') {\n <!-- Reveal variant: flip label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.CLICK-TO-REVEAL' | translate }}\n <ecl-icon iconSet=\"phosphor\" icon=\"arrow-clockwise\" size=\"m\"></ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: options -->\n <div class=\"ecl-quiz-card__options\">\n @for (option of options(); let i = $index; track i) {\n <div\n class=\"ecl-quiz-card__option\"\n role=\"button\"\n [attr.tabindex]=\"0\"\n [attr.aria-pressed]=\"selectedOptionIndex === i ? 'true' : 'false'\"\n [attr.data-match]=\"option.match\"\n (click)=\"onOptionClick(i)\"\n (keydown)=\"onOptionKeydown($event, i)\">\n {{ option.text }}\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Back face -->\n <div\n class=\"ecl-quiz-card__back\"\n #backElement\n [hidden]=\"!isFlipped\"\n [class.ecl-quiz-card--correct]=\"variant === 'poll' && isCorrect === true\">\n <div class=\"ecl-quiz-card__header\">\n @if (variant === 'reveal') {\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon\n [icon]=\"getIconName()\"\n [size]=\"getIconSize()\"\n iconSet=\"phosphor\">\n </ecl-icon>\n </div>\n } @else {\n <!-- Poll variant: success/error icons and category labels -->\n <div class=\"ecl-quiz-card__icon\">\n <ecl-icon\n icon=\"check-circle\"\n iconSet=\"phosphor\"\n size=\"2xl\"\n class=\"ecl-quiz-card__icon--success\">\n </ecl-icon>\n <ecl-icon\n icon=\"x-circle\"\n size=\"2xl\"\n iconSet=\"phosphor\"\n class=\"ecl-quiz-card__icon--error\">\n </ecl-icon>\n </div>\n <span class=\"ecl-quiz-card__category ecl-quiz-card__category--success\">Correct</span>\n <span class=\"ecl-quiz-card__category ecl-quiz-card__category--error\">Incorrect</span>\n }\n </div>\n\n <div class=\"ecl-quiz-card__answer\" #answerElement>\n @if (answerTitle()) {\n <div class=\"ecl-quiz-card__answer-title\">{{ answerTitle() }}</div>\n }\n {{ answer() }}\n </div>\n\n @if (variant === 'reveal') {\n <!-- Reveal variant: go back label -->\n <div class=\"ecl-quiz-card__flip\">\n {{ 'ecl.quiz.GO-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 <div class=\"ecl-quiz-card__options\" role=\"list\">\n @for (option of options(); let i = $index; track i) {\n <div\n class=\"ecl-quiz-card__option\"\n role=\"listitem\"\n [class.ecl-quiz-card__option--selected]=\"selectedOptionIndex === i\"\n [attr.data-match]=\"option.match\">\n {{ option.text }}\n </div>\n }\n </div>\n }\n </div>\n</div>\n","import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n inject,\n input,\n QueryList,\n signal,\n ViewChild,\n ViewChildren\n} from '@angular/core';\nimport { EclIconComponent } from '@eui/ecl/components/ecl-icon';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { EmblaCarouselDirective, EmblaCarouselType, EmblaEventType } from 'embla-carousel-angular';\nimport { EclQuizCardComponent } from './ecl-quiz-card.component';\n\n/**\n * ECL Quiz component – renders a carousel of quiz cards with navigation.\n * Supports two variants: 'reveal' (flip cards) and 'poll' (multiple choice).\n *\n * Uses Embla Carousel (via embla-carousel-angular) to match the ECL vanilla\n * implementation which also uses Embla internally.\n */\n@Component({\n selector: 'div[eclQuiz]',\n templateUrl: './ecl-quiz.component.html',\n imports: [\n TranslateModule,\n EclIconComponent,\n EmblaCarouselDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EclQuizComponent extends ECLBaseDirective implements AfterContentInit, AfterViewInit {\n\n /** Quiz variant: 'reveal' for flip cards, 'poll' for multiple choice. */\n variant = input<'poll' | 'reveal'>('reveal');\n\n /** Title displayed in the quiz header. */\n eclTitle = input<string>('');\n\n /** Description displayed below the title. */\n eclDescription = input<string>('');\n\n /** Embla carousel options matching ECL's configuration. */\n emblaOptions = { loop: false, align: 'start' as const };\n\n @ContentChildren(forwardRef(() => EclQuizCardComponent))\n cards: QueryList<EclQuizCardComponent>;\n\n @ViewChild(EmblaCarouselDirective) emblaRef: EmblaCarouselDirective;\n @ViewChildren('dotButton') dotButtons: QueryList<ElementRef>;\n\n /** Current snap index. */\n activeIndex = signal(0);\n\n /** Total number of snap points. */\n totalSnaps = signal(0);\n\n /** Live region text for screen readers. */\n liveRegionText = signal('');\n\n /** Counter text for mobile display. */\n counterText = signal('');\n\n /** Whether the previous button is disabled. */\n prevDisabled = signal(true);\n\n /** Whether the next button is disabled. */\n nextDisabled = signal(true);\n\n /** Whether navigation controls should be shown. */\n showControls = signal(false);\n\n private cd = inject(ChangeDetectorRef);\n private translateService = inject(TranslateService);\n private emblaApi: EmblaCarouselType | undefined;\n\n @HostBinding('class')\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-quiz'),\n `ecl-quiz--${this.variant()}`,\n ]\n .join(' ')\n .trim();\n }\n\n // @HostBinding('attr.data-ecl-auto-init')\n // get autoInit(): string {\n // return 'Quiz';\n // }\n\n ngAfterContentInit(): void {\n if (this.cards && this.cards.length > 1) {\n this.showControls.set(true);\n }\n this.propagateVariant();\n this.cards.changes.subscribe(() => this.propagateVariant());\n }\n\n ngAfterViewInit(): void {\n // Give Embla time to initialize\n setTimeout(() => {\n this.initEmbla();\n });\n }\n\n /** Handle keyboard events. */\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.escapeSlider();\n }\n }\n\n /** Navigate to the previous snap. */\n onPrevClick(): void {\n if (this.emblaRef) {\n this.emblaRef.scrollPrev();\n }\n }\n\n /** Navigate to the next snap. */\n onNextClick(): void {\n if (this.emblaRef) {\n this.emblaRef.scrollNext();\n }\n }\n\n /** Navigate to a specific snap index. */\n goTo(index: number): void {\n if (this.emblaRef) {\n this.emblaRef.scrollTo(index);\n }\n }\n\n /** Returns the total number of cards. */\n getCardsCount(): number {\n return this.cards?.length ?? 0;\n }\n\n /** Returns an array of indices for dot rendering. */\n getDotIndices(): number[] {\n return Array.from({ length: this.totalSnaps() }, (_, i) => i);\n }\n\n /** Called by the emblaChange event from the directive. */\n 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 /** Subscribed Embla events. */\n subscribeToEvents: EmblaEventType[] = ['select', 'init', 'reInit'];\n\n /**\n * Equalizes the height of all cards based on the tallest content.\n * Mirrors the ECL vanilla `checkHeight()` logic.\n */\n 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 /** Initialize Embla and wire up state syncing. */\n private initEmbla(): void {\n if (!this.emblaRef) {\n return;\n }\n\n this.emblaApi = this.emblaRef.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 const snapList = this.emblaApi.scrollSnapList();\n const selectedSnap = this.emblaApi.selectedScrollSnap();\n const canScrollPrev = this.emblaApi.canScrollPrev();\n const canScrollNext = this.emblaApi.canScrollNext();\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\n this.updateCounter();\n this.updateLiveRegion();\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 /** Update the live region for screen readers. */\n private updateLiveRegion(): void {\n const totalCards = this.getCardsCount();\n const totalGroups = this.totalSnaps();\n const currentGroup = this.activeIndex() + 1;\n this.liveRegionText.set(\n this.translateService.instant('ecl.quiz.SHOWING-SLIDE', { current: currentGroup, totalSlides: totalCards, totalGroups })\n );\n }\n\n /** Move focus to the last dot button when Escape is pressed. */\n private escapeSlider(): void {\n if (this.dotButtons && this.dotButtons.length > 0) {\n const lastDot = this.dotButtons.last;\n lastDot.nativeElement.focus();\n }\n }\n\n /** Propagate the variant and aria-roledescription to all child cards. */\n private propagateVariant(): void {\n const v = this.variant();\n const isCarousel = this.cards.length > 1;\n this.cards?.forEach(card => {\n card.variant = v;\n card.ariaRoleDescription = isCarousel ? 'slide' : null;\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 <div class=\"ecl-quiz__list\">\n <ng-content></ng-content>\n </div>\n</div>\n\n@if (showControls()) {\n<div class=\"ecl-quiz__pager\">\n <button\n class=\"ecl-quiz__prev\"\n [disabled]=\"prevDisabled()\"\n (click)=\"onPrevClick()\">\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-270\"></ecl-icon>\n <span class=\"ecl-quiz__prev-label\">\n {{ 'ecl.quiz.PREVIOUS' | translate }}\n </span>\n </button>\n\n <div class=\"ecl-quiz__dots\">\n @for (dotIndex of getDotIndices(); track dotIndex) {\n <button\n #dotButton\n class=\"ecl-quiz__dot\"\n [class.ecl-quiz__dot--active]=\"dotIndex === activeIndex()\"\n [class.is-prev]=\"dotIndex === activeIndex() - 1\"\n [attr.aria-label]=\"'ecl.quiz.GO-TO-SLIDE' | translate: { current: dotIndex + 1, total: totalSnaps() }\"\n (click)=\"goTo(dotIndex)\">\n </button>\n }\n </div>\n\n <button\n class=\"ecl-quiz__next\"\n [disabled]=\"nextDisabled()\"\n (click)=\"onNextClick()\">\n <span class=\"ecl-quiz__next-label\">\n {{ 'ecl.quiz.NEXT' | translate }}\n </span>\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-90\"></ecl-icon>\n </button>\n</div>\n\n<div class=\"ecl-quiz__counter\">{{ counterText() }}</div>\n}\n\n<div class=\"ecl-quiz__live-region\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveRegionText() }}</div>\n","import { EclQuizComponent } from './ecl-quiz.component';\nimport { EclQuizCardComponent } 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] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAuBA;;;;;AAKG;AAOG,MAAO,oBAAqB,SAAQ,gBAAgB,CAAA;AAN1D,IAAA,WAAA,GAAA;;AAQI;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,+EAAC;AAE5B;;;AAGG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,EAAE,6EAAC;AAE1B;;AAEG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,kFAAC;AAE/B;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,+EAAC;AAE5B;;;AAGG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;AAExB;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwC,IAAI,+EAAC;AAE7D;;AAEG;QACH,IAAA,CAAA,OAAO,GAAsB,QAAQ;AAErC;;AAEG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAA0C,EAAE,8EAAC;AAE5D;;AAEG;QACqC,IAAA,CAAA,QAAQ,GAAG,KAAK;AAExD;;AAEG;AACO,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAAwB;;QAS7D,IAAA,CAAA,SAAS,GAAG,KAAK;;QAGjB,IAAA,CAAA,mBAAmB,GAAkB,IAAI;;QAGzC,IAAA,CAAA,SAAS,GAAmB,IAAI;QAahC,IAAA,CAAA,IAAI,GAAG,OAAO;QAGd,IAAA,CAAA,mBAAmB,GAAkB,IAAI;QAGhC,IAAA,CAAA,UAAU,GAAkB,IAAI;QAazC,IAAA,CAA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,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAIjB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAV5B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,OAAA,EAEf;wBACL,eAAe;wBACf,gBAAgB;wBAChB,sBAAsB;qBACzB,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+jEAAA,EAAA;;sBAgB9C,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,CAAC,MAAM,oBAAoB,CAAC;;sBAGtD,SAAS;uBAAC,sBAAsB;;sBAChC,YAAY;uBAAC,WAAW;;sBA2BxB,WAAW;uBAAC,OAAO;;sBA+BnB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;;AE/GhC,MAAM,YAAY,GAAG;IAC1B,gBAAgB;IAChB,oBAAoB;;;ACRtB;;AAEG;;;;"}
@@ -193,6 +193,7 @@ class EclRangeDirective extends ECLBaseDirective {
193
193
  return;
194
194
  this.container = this.renderer.createElement('div');
195
195
  this.renderer.addClass(this.container, 'ecl-range-container');
196
+ this.renderer.addClass(this.container, `ecl-range-container--${this.eclSize()}`);
196
197
  // Insert wrapper before input
197
198
  this.renderer.insertBefore(parent, this.container, input);
198
199
  // Move input inside wrapper