@eui/ecl 22.0.0-alpha.69 → 22.0.0-alpha.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/docs/changelog.html +10 -0
  2. package/docs/classes/EclDomEvent.html +2 -0
  3. package/docs/classes/EclGalleryMediaSource.html +2 -2
  4. package/docs/classes/EclGalleryMediaTrack.html +4 -4
  5. package/docs/classes/EclGalleryPictureImage.html +3 -3
  6. package/docs/classes/EclGalleryPictureSource.html +2 -2
  7. package/docs/classes/EclLanguageService.html +1 -1
  8. package/docs/classes/EclMenuItemCaretEvent.html +16 -12
  9. package/docs/classes/EclMenuItemFocusEvent.html +16 -12
  10. package/docs/classes/EclMenuItemHoverEvent.html +16 -12
  11. package/docs/classes/EclMenuItemHoverOutEvent.html +16 -12
  12. package/docs/classes/EclMenuItemKeydownEvent.html +16 -12
  13. package/docs/classes/EclMenuItemSelectEvent.html +16 -12
  14. package/docs/classes/EclSortTableEvent.html +3 -3
  15. package/docs/components/EclBlockquoteComponent.html +0 -5
  16. package/docs/components/EclBreadcrumbComponent.html +1 -6
  17. package/docs/components/EclBreadcrumbSegmentComponent.html +1 -1
  18. package/docs/components/EclCategoryFilterComponent.html +0 -5
  19. package/docs/components/EclCategoryFilterItemComponent.html +1 -6
  20. package/docs/components/EclDateBlockComponent.html +2 -27
  21. package/docs/components/EclExpandableComponent.html +0 -10
  22. package/docs/components/EclFeaturedComponent.html +0 -5
  23. package/docs/components/EclGalleryFooterComponent.html +1 -6
  24. package/docs/components/EclGalleryItemComponent.html +2 -37
  25. package/docs/components/EclIconComponent.html +0 -15
  26. package/docs/components/EclInpageNavigationComponent.html +5 -15
  27. package/docs/components/EclInpageNavigationItemComponent.html +2 -12
  28. package/docs/components/EclMegaMenuComponent.html +2 -2
  29. package/docs/components/EclMegaMenuFeaturedComponent.html +0 -10
  30. package/docs/components/EclMegaMenuInfoComponent.html +0 -10
  31. package/docs/components/EclMegaMenuItemComponent.html +2 -12
  32. package/docs/components/EclMegaMenuSubitemComponent.html +2 -17
  33. package/docs/components/EclMenuItemComponent.html +4 -24
  34. package/docs/components/EclMenuMegaItemComponent.html +2 -17
  35. package/docs/components/EclModalHeaderComponent.html +1 -1
  36. package/docs/components/EclMultiselectComponent.html +3 -18
  37. package/docs/components/EclMultiselectDropdownComponent.html +1 -1
  38. package/docs/components/EclMultiselectInputComponent.html +3 -18
  39. package/docs/components/EclMultiselectOptgroupComponent.html +0 -5
  40. package/docs/components/EclNewsTickerComponent.html +1 -1
  41. package/docs/components/EclNewsTickerItemComponent.html +1 -1
  42. package/docs/components/EclNotificationComponent.html +0 -5
  43. package/docs/components/EclPaginationComponent.html +4 -4
  44. package/docs/components/EclPaginationItemComponent.html +3 -13
  45. package/docs/components/EclRatingFieldComponent.html +1 -1
  46. package/docs/components/EclSearchFormComponent.html +3 -13
  47. package/docs/components/EclSelectContainerComponent.html +4 -4
  48. package/docs/components/EclSiteFooterCoownerComponent.html +1 -1
  49. package/docs/components/EclSiteFooterCoreComponent.html +0 -5
  50. package/docs/components/EclSiteFooterFeedbackComponent.html +1 -1
  51. package/docs/components/EclSiteFooterFixedContentEUComponent.html +0 -10
  52. package/docs/components/EclSiteFooterRowCommonComponent.html +0 -5
  53. package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +0 -30
  54. package/docs/components/EclSiteHeaderSearchComponent.html +0 -10
  55. package/docs/components/EclSocialMediaFollowComponent.html +0 -5
  56. package/docs/components/EclSocialMediaFollowItemComponent.html +1 -6
  57. package/docs/components/EclSplashPageLanguageLinkComponent.html +1 -1
  58. package/docs/components/EclStickyContainerComponent.html +2 -2
  59. package/docs/components/EclTagComponent.html +0 -5
  60. package/docs/components/EclTimelineItemComponent.html +0 -5
  61. package/docs/directives/ECLClickOutsideDirective.html +2 -2
  62. package/docs/directives/EclFileUploadDirective.html +0 -5
  63. package/docs/directives/EclGalleryMediaDirective.html +0 -5
  64. package/docs/directives/EclMediaContainerItemDirective.html +0 -5
  65. package/docs/directives/EclModalCloseDirective.html +6 -0
  66. package/docs/directives/EclMultiselectOptionDirective.html +0 -10
  67. package/docs/directives/EclSelectDirective.html +0 -5
  68. package/docs/directives/EclSiteHeaderCustomActionLinkDirective.html +1 -1
  69. package/docs/directives/EclTableHeaderDirective.html +1 -6
  70. package/docs/interfaces/EclGalleryItem.html +6 -6
  71. package/docs/interfaces/EclMenuItem.html +4 -4
  72. package/docs/js/search/search_index.js +2 -2
  73. package/docs/json/EclBreadcrumbComponent.md +1 -1
  74. package/docs/json/EclBreadcrumbSegmentComponent.md +1 -1
  75. package/docs/json/EclCategoryFilterItemComponent.md +1 -1
  76. package/docs/json/EclDateBlockComponent.md +2 -2
  77. package/docs/json/EclInpageNavigationItemComponent.md +2 -2
  78. package/docs/json/EclMegaMenuItemComponent.md +2 -2
  79. package/docs/json/EclMegaMenuSubitemComponent.md +2 -2
  80. package/docs/json/EclMenuItemComponent.md +2 -2
  81. package/docs/json/EclMenuMegaItemComponent.md +2 -2
  82. package/docs/json/EclModalCloseDirective.md +1 -1
  83. package/docs/json/EclMultiselectComponent.md +3 -3
  84. package/docs/json/EclMultiselectInputComponent.md +3 -3
  85. package/docs/json/EclPaginationItemComponent.md +2 -2
  86. package/docs/json/EclSearchFormComponent.md +2 -2
  87. package/docs/json/EclSelectContainerComponent.md +4 -4
  88. package/docs/json/EclSiteFooterCoownerComponent.md +1 -1
  89. package/docs/json/EclSiteFooterFeedbackComponent.md +1 -1
  90. package/docs/json/EclSocialMediaFollowItemComponent.md +1 -1
  91. package/docs/json/EclStickyContainerComponent.md +2 -2
  92. package/docs/json/EclTableHeaderDirective.md +1 -1
  93. package/docs/json/documentation.json +752 -813
  94. package/docs/llms.txt +150 -150
  95. package/docs/miscellaneous/functions.html +1 -5
  96. package/docs/properties.html +1 -1
  97. package/fesm2022/eui-ecl-components-ecl-banner.mjs +6 -5
  98. package/fesm2022/eui-ecl-components-ecl-banner.mjs.map +1 -1
  99. package/fesm2022/eui-ecl-components-ecl-blockquote.mjs +1 -1
  100. package/fesm2022/eui-ecl-components-ecl-blockquote.mjs.map +1 -1
  101. package/fesm2022/eui-ecl-components-ecl-breadcrumb.mjs +11 -6
  102. package/fesm2022/eui-ecl-components-ecl-breadcrumb.mjs.map +1 -1
  103. package/fesm2022/eui-ecl-components-ecl-category-filter.mjs +4 -3
  104. package/fesm2022/eui-ecl-components-ecl-category-filter.mjs.map +1 -1
  105. package/fesm2022/eui-ecl-components-ecl-date-block.mjs +7 -7
  106. package/fesm2022/eui-ecl-components-ecl-date-block.mjs.map +1 -1
  107. package/fesm2022/eui-ecl-components-ecl-expandable.mjs +2 -2
  108. package/fesm2022/eui-ecl-components-ecl-expandable.mjs.map +1 -1
  109. package/fesm2022/eui-ecl-components-ecl-featured.mjs +3 -2
  110. package/fesm2022/eui-ecl-components-ecl-featured.mjs.map +1 -1
  111. package/fesm2022/eui-ecl-components-ecl-file-upload.mjs +5 -5
  112. package/fesm2022/eui-ecl-components-ecl-file-upload.mjs.map +1 -1
  113. package/fesm2022/eui-ecl-components-ecl-gallery.mjs +23 -15
  114. package/fesm2022/eui-ecl-components-ecl-gallery.mjs.map +1 -1
  115. package/fesm2022/eui-ecl-components-ecl-icon.mjs +3 -3
  116. package/fesm2022/eui-ecl-components-ecl-icon.mjs.map +1 -1
  117. package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs +13 -12
  118. package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs.map +1 -1
  119. package/fesm2022/eui-ecl-components-ecl-media-container.mjs +7 -6
  120. package/fesm2022/eui-ecl-components-ecl-media-container.mjs.map +1 -1
  121. package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs +26 -26
  122. package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs.map +1 -1
  123. package/fesm2022/eui-ecl-components-ecl-menu.mjs +20 -23
  124. package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
  125. package/fesm2022/eui-ecl-components-ecl-modal.mjs +12 -8
  126. package/fesm2022/eui-ecl-components-ecl-modal.mjs.map +1 -1
  127. package/fesm2022/eui-ecl-components-ecl-multiselect.mjs +12 -12
  128. package/fesm2022/eui-ecl-components-ecl-multiselect.mjs.map +1 -1
  129. package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs +13 -8
  130. package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs.map +1 -1
  131. package/fesm2022/eui-ecl-components-ecl-notification.mjs +1 -1
  132. package/fesm2022/eui-ecl-components-ecl-notification.mjs.map +1 -1
  133. package/fesm2022/eui-ecl-components-ecl-pagination.mjs +13 -9
  134. package/fesm2022/eui-ecl-components-ecl-pagination.mjs.map +1 -1
  135. package/fesm2022/eui-ecl-components-ecl-popover.mjs +0 -1
  136. package/fesm2022/eui-ecl-components-ecl-popover.mjs.map +1 -1
  137. package/fesm2022/eui-ecl-components-ecl-quiz.mjs +4 -4
  138. package/fesm2022/eui-ecl-components-ecl-quiz.mjs.map +1 -1
  139. package/fesm2022/eui-ecl-components-ecl-radio.mjs +1 -1
  140. package/fesm2022/eui-ecl-components-ecl-radio.mjs.map +1 -1
  141. package/fesm2022/eui-ecl-components-ecl-range.mjs +2 -2
  142. package/fesm2022/eui-ecl-components-ecl-range.mjs.map +1 -1
  143. package/fesm2022/eui-ecl-components-ecl-rating-field.mjs.map +1 -1
  144. package/fesm2022/eui-ecl-components-ecl-search-form.mjs +4 -4
  145. package/fesm2022/eui-ecl-components-ecl-search-form.mjs.map +1 -1
  146. package/fesm2022/eui-ecl-components-ecl-select.mjs +2 -2
  147. package/fesm2022/eui-ecl-components-ecl-select.mjs.map +1 -1
  148. package/fesm2022/eui-ecl-components-ecl-site-footer.mjs +5 -5
  149. package/fesm2022/eui-ecl-components-ecl-site-footer.mjs.map +1 -1
  150. package/fesm2022/eui-ecl-components-ecl-site-header.mjs +40 -27
  151. package/fesm2022/eui-ecl-components-ecl-site-header.mjs.map +1 -1
  152. package/fesm2022/eui-ecl-components-ecl-slogan-ticker.mjs +2 -2
  153. package/fesm2022/eui-ecl-components-ecl-slogan-ticker.mjs.map +1 -1
  154. package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs +2 -2
  155. package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs.map +1 -1
  156. package/fesm2022/eui-ecl-components-ecl-splash-page.mjs.map +1 -1
  157. package/fesm2022/eui-ecl-components-ecl-spotlight.mjs +5 -3
  158. package/fesm2022/eui-ecl-components-ecl-spotlight.mjs.map +1 -1
  159. package/fesm2022/eui-ecl-components-ecl-sticky-container.mjs.map +1 -1
  160. package/fesm2022/eui-ecl-components-ecl-story-card.mjs +1 -1
  161. package/fesm2022/eui-ecl-components-ecl-story-card.mjs.map +1 -1
  162. package/fesm2022/eui-ecl-components-ecl-table.mjs +2 -2
  163. package/fesm2022/eui-ecl-components-ecl-table.mjs.map +1 -1
  164. package/fesm2022/eui-ecl-components-ecl-tabs.mjs +6 -4
  165. package/fesm2022/eui-ecl-components-ecl-tabs.mjs.map +1 -1
  166. package/fesm2022/eui-ecl-components-ecl-tag.mjs +2 -2
  167. package/fesm2022/eui-ecl-components-ecl-tag.mjs.map +1 -1
  168. package/fesm2022/eui-ecl-components-ecl-text-area.mjs +1 -1
  169. package/fesm2022/eui-ecl-components-ecl-text-area.mjs.map +1 -1
  170. package/fesm2022/eui-ecl-components-ecl-timeline.mjs +1 -1
  171. package/fesm2022/eui-ecl-components-ecl-timeline.mjs.map +1 -1
  172. package/fesm2022/eui-ecl-components-ecl-tooltip.mjs +1 -1
  173. package/fesm2022/eui-ecl-components-ecl-tooltip.mjs.map +1 -1
  174. package/fesm2022/eui-ecl-core.mjs +7 -3
  175. package/fesm2022/eui-ecl-core.mjs.map +1 -1
  176. package/package.json +1 -1
  177. package/types/eui-ecl-components-ecl-add-to-calendar.d.ts +4 -4
  178. package/types/eui-ecl-components-ecl-animated-numbers.d.ts +7 -7
  179. package/types/eui-ecl-components-ecl-app.d.ts +3 -3
  180. package/types/eui-ecl-components-ecl-banner.d.ts +9 -9
  181. package/types/eui-ecl-components-ecl-banner.d.ts.map +1 -1
  182. package/types/eui-ecl-components-ecl-blockquote.d.ts +2 -2
  183. package/types/eui-ecl-components-ecl-breadcrumb.d.ts +7 -7
  184. package/types/eui-ecl-components-ecl-breadcrumb.d.ts.map +1 -1
  185. package/types/eui-ecl-components-ecl-button.d.ts +1 -1
  186. package/types/eui-ecl-components-ecl-carousel.d.ts +5 -5
  187. package/types/eui-ecl-components-ecl-category-filter.d.ts +6 -6
  188. package/types/eui-ecl-components-ecl-checkbox.d.ts +1 -1
  189. package/types/eui-ecl-components-ecl-content-block.d.ts +1 -1
  190. package/types/eui-ecl-components-ecl-date-block.d.ts +8 -8
  191. package/types/eui-ecl-components-ecl-date-picker.d.ts +1 -1
  192. package/types/eui-ecl-components-ecl-expandable.d.ts +3 -3
  193. package/types/eui-ecl-components-ecl-fact-figures.d.ts +3 -3
  194. package/types/eui-ecl-components-ecl-featured.d.ts +7 -7
  195. package/types/eui-ecl-components-ecl-file-upload.d.ts +4 -4
  196. package/types/eui-ecl-components-ecl-file.d.ts +15 -15
  197. package/types/eui-ecl-components-ecl-gallery.d.ts +36 -36
  198. package/types/eui-ecl-components-ecl-gallery.d.ts.map +1 -1
  199. package/types/eui-ecl-components-ecl-icon.d.ts +9 -9
  200. package/types/eui-ecl-components-ecl-inpage-navigation.d.ts +15 -15
  201. package/types/eui-ecl-components-ecl-layout-wrapper.d.ts +1 -1
  202. package/types/eui-ecl-components-ecl-link.d.ts +2 -2
  203. package/types/eui-ecl-components-ecl-list-illustration.d.ts +3 -3
  204. package/types/eui-ecl-components-ecl-list.d.ts +2 -2
  205. package/types/eui-ecl-components-ecl-media-container.d.ts +10 -10
  206. package/types/eui-ecl-components-ecl-media-container.d.ts.map +1 -1
  207. package/types/eui-ecl-components-ecl-mega-menu.d.ts +36 -36
  208. package/types/eui-ecl-components-ecl-mega-menu.d.ts.map +1 -1
  209. package/types/eui-ecl-components-ecl-menu.d.ts +36 -42
  210. package/types/eui-ecl-components-ecl-menu.d.ts.map +1 -1
  211. package/types/eui-ecl-components-ecl-modal.d.ts +9 -8
  212. package/types/eui-ecl-components-ecl-modal.d.ts.map +1 -1
  213. package/types/eui-ecl-components-ecl-multiselect.d.ts +21 -21
  214. package/types/eui-ecl-components-ecl-news-ticker.d.ts +10 -10
  215. package/types/eui-ecl-components-ecl-news-ticker.d.ts.map +1 -1
  216. package/types/eui-ecl-components-ecl-notification.d.ts +2 -2
  217. package/types/eui-ecl-components-ecl-page-header.d.ts +2 -2
  218. package/types/eui-ecl-components-ecl-page-summary.d.ts +2 -2
  219. package/types/eui-ecl-components-ecl-pagination.d.ts +12 -11
  220. package/types/eui-ecl-components-ecl-pagination.d.ts.map +1 -1
  221. package/types/eui-ecl-components-ecl-popover.d.ts +3 -3
  222. package/types/eui-ecl-components-ecl-quiz.d.ts +3 -3
  223. package/types/eui-ecl-components-ecl-radio.d.ts +2 -2
  224. package/types/eui-ecl-components-ecl-range.d.ts +3 -3
  225. package/types/eui-ecl-components-ecl-rating-field.d.ts +2 -2
  226. package/types/eui-ecl-components-ecl-search-form.d.ts +4 -4
  227. package/types/eui-ecl-components-ecl-select.d.ts +5 -5
  228. package/types/eui-ecl-components-ecl-site-footer.d.ts +7 -7
  229. package/types/eui-ecl-components-ecl-site-header.d.ts +32 -32
  230. package/types/eui-ecl-components-ecl-site-header.d.ts.map +1 -1
  231. package/types/eui-ecl-components-ecl-slogan-ticker.d.ts +4 -4
  232. package/types/eui-ecl-components-ecl-social-media-follow.d.ts +5 -5
  233. package/types/eui-ecl-components-ecl-splash-page.d.ts +4 -4
  234. package/types/eui-ecl-components-ecl-spotlight.d.ts +2 -2
  235. package/types/eui-ecl-components-ecl-sticky-container.d.ts +2 -2
  236. package/types/eui-ecl-components-ecl-story-card.d.ts +2 -2
  237. package/types/eui-ecl-components-ecl-table.d.ts +13 -13
  238. package/types/eui-ecl-components-ecl-tabs.d.ts +4 -4
  239. package/types/eui-ecl-components-ecl-tabs.d.ts.map +1 -1
  240. package/types/eui-ecl-components-ecl-tag.d.ts +1 -1
  241. package/types/eui-ecl-components-ecl-text-input.d.ts +1 -1
  242. package/types/eui-ecl-components-ecl-timeline.d.ts +1 -1
  243. package/types/eui-ecl-core.d.ts +7 -7
  244. package/types/eui-ecl-core.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-category-filter.mjs","names":[],"sources":["../../components/ecl-category-filter/events/ecl-category-filter-item-select.event.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-item.component.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-item.component.html","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-list.component.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-list.component.html","../../components/ecl-category-filter/ecl-category-filter/ecl-category-filter.component.ts","../../components/ecl-category-filter/ecl-category-filter/ecl-category-filter.component.html","../../components/ecl-category-filter/index.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\n\n/**\n * Event emitted by `EclCategoryFilterItemComponent` when the user clicks an item.\n * Carries the `EclCategoryFilterItem` that was selected.\n */\nexport class EclCategoryFilterItemSelectEvent extends EclBaseEvent {\n /**\n * @param item The category filter item that was selected.\n */\n constructor(public item: EclCategoryFilterItem) {\n super();\n }\n}\n","import { Component, computed, forwardRef, input, output, contentChild, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\nimport { EclCategoryFilterItemSelectEvent } from '../events/ecl-category-filter-item-select.event';\nimport { EclCategoryFilterListComponent } from './ecl-category-filter-list.component';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * Individual category filter item for use inside an `EclCategoryFilterListComponent`.\n * Supports both leaf navigation items (with `href`) and branch items with expandable child lists.\n * State is managed by the parent `EclCategoryFilterComponent` via writable signals.\n *\n * - Selector: `ecl-category-filter-item`.\n * - `href` — navigation URL; when absent, click only toggles the expanded state.\n * - `id` / `idInput` — unique identifier; generated by the parent when not supplied.\n * - `isExpanded` — writable signal controlling whether the child list is visible.\n * - `isCurrent` — writable signal marking this item as the currently selected one.\n * - `itemSelect` — emits `EclCategoryFilterItemSelectEvent` when the user clicks the item.\n * - `hasChildren` / `children` / `level` / `levelClass` — tree structure helpers.\n * - `isRootItem` — `true` when `level === 1`.\n */\n@Component({\n selector: 'ecl-category-filter-item',\n templateUrl: './ecl-category-filter-item.component.html',\n imports: [\n NgTemplateOutlet,\n ...EUI_ECL_ICON,\n ],\n host: {\n 'class': 'ecl-category-filter__list-item',\n 'role': 'listitem',\n '[class.ecl-category-filter__list-item--open]': 'hasChildren ? isExpanded() : null',\n },\n})\nexport class EclCategoryFilterItemComponent extends ECLBaseDirective implements EclCategoryFilterItem {\n /**\n * Link URL associated with this category filter item.\n * If not provided, the item acts as a toggle only.\n */\n readonly href = input<string>(undefined);\n\n /**\n * Input for the unique identifier of the item.\n * When omitted, the parent assigns a generated fallback id.\n */\n readonly idInput = input<string>(undefined, { alias: 'id' });\n\n /**\n * Unique identifier for the item. Used to manage selection state.\n * Resolves to the `id` input when provided, otherwise the parent-assigned fallback.\n */\n readonly id = computed(() => this.idInput() ?? this.fallbackId());\n\n /**\n * Emits when the item is selected by the user (clicked).\n */\n readonly itemSelect = output<EclCategoryFilterItemSelectEvent>();\n\n /**\n * Whether the item is currently expanded (open).\n * Writable so that the parent can toggle it as the tree state changes.\n */\n readonly isExpanded = signal(false);\n\n /**\n * Whether the item is currently selected.\n * Writable so that the parent can update selection as the user navigates.\n */\n readonly isCurrent = signal(false);\n\n /**\n * Child list component if the item has nested children.\n */\n readonly eclCategoryList = contentChild(forwardRef(() => EclCategoryFilterListComponent));\n\n /**\n * Returns the hierarchical level of the item within the tree.\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Sets the level and updates the level of the child list accordingly.\n */\n set level(value: number) {\n this._level = ++value;\n this.updateChildListLevel(this._level);\n }\n private _level: number;\n\n /**\n * Returns the CSS class for the current level of the item.\n */\n get levelClass(): string {\n return `ecl-category-filter__item--level-${this._level}`;\n }\n\n /**\n * Indicates whether the item has child elements.\n */\n get hasChildren(): boolean {\n return this.eclCategoryList() !== undefined;\n }\n\n /**\n * Returns the child components of this item, if any.\n */\n get children(): readonly EclCategoryFilterItemComponent[] {\n return this.eclCategoryList().children;\n }\n\n /**\n * Returns true if this is a root-level item and has children.\n */\n get isRootItemWithChildren(): boolean {\n return this.hasChildren && this.isRootItem;\n }\n\n /**\n * Returns true if this is a child item and has its own children.\n */\n get isChildItemWithChildren(): boolean {\n return this.hasChildren && !this.isRootItem;\n }\n\n /**\n * Returns true if this is a root-level item (level === 1).\n */\n get isRootItem(): boolean {\n return this.level === 1;\n }\n\n /**\n * Handles user click interaction, updates state and emits selection event.\n * Prevents navigation if no `href` is defined.\n */\n onItemClick(evt: MouseEvent): void {\n this.isExpanded.set(!this.isExpanded());\n this.isCurrent.set(true);\n this.itemSelect.emit(new EclCategoryFilterItemSelectEvent(this));\n if (!this.href()) {\n evt.preventDefault();\n }\n evt.stopPropagation();\n }\n\n /**\n * Assigns a fallback id. Used by the parent category filter when no `id` input was provided.\n */\n setFallbackId(id: string): void {\n this.fallbackId.set(id);\n }\n\n /**\n * Fallback id assigned by the parent when no `id` input was provided.\n */\n private readonly fallbackId = signal<string | undefined>(undefined);\n\n private updateChildListLevel(value: number): void {\n const eclCategoryList = this.eclCategoryList();\n if (eclCategoryList) {\n eclCategoryList.level = value;\n }\n }\n}\n","@if (hasChildren) {\n <button\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent()\"\n [attr.aria-current]=\"isCurrent() ? true : null\"\n [attr.aria-expanded]=\"isExpanded()\"\n [attr.aria-controls]=\"eclCategoryList()?.id()\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n @if(isRootItemWithChildren) {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </button>\n} @else {\n <a\n [href]=\"href()\"\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent()\"\n [attr.aria-current]=\"isCurrent() ? true : null\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n @if(isRootItemWithChildren) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </a>\n}\n<ng-content select=\"ecl-category-filter-list\"></ng-content>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n","import { Component, forwardRef, contentChildren, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItemComponent } from './ecl-category-filter-item.component';\n\n/**\n * List sub-component for `EclCategoryFilterComponent`.\n * Wraps `EclCategoryFilterItemComponent` children as a `role=\"list\"` container.\n * The `id` signal is written by the parent category-filter to construct `aria-controls` references.\n * `level` propagates nesting depth down to all child items via `updateChildrenItemsLevel()`.\n *\n * - Selector: `ecl-category-filter-list`.\n * - `id` — writable signal; set by the parent category filter with a generated value.\n * - `level` — getter/setter tracking nesting depth; automatically propagated to children.\n * - `hasChildren` — `true` when at least one `EclCategoryFilterItemComponent` is projected.\n * - `children` — readonly array of projected `EclCategoryFilterItemComponent` instances.\n */\n@Component({\n selector: 'ecl-category-filter-list',\n templateUrl: './ecl-category-filter-list.component.html',\n host: {\n 'class': 'ecl-category-filter__list',\n 'role': 'list',\n '[attr.id]': 'id()',\n },\n})\nexport class EclCategoryFilterListComponent extends ECLBaseDirective {\n /**\n * ID of this list element, referenced by the parent item's aria-controls.\n */\n readonly id = signal<string | undefined>(undefined);\n\n /**\n * List of all category filter items projected inside this list.\n */\n readonly eclCategoryFilterItems = contentChildren<EclCategoryFilterItemComponent>(forwardRef(() => EclCategoryFilterItemComponent));\n\n /**\n * Gets the nesting level of this list in the category tree.\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Sets the level of the list and applies it to all its children.\n */\n set level(value: number) {\n this._level = value;\n this.updateChildrenItemsLevel(value);\n }\n private _level: number;\n\n /**\n * Returns true if the list contains one or more category filter items.\n */\n get hasChildren(): boolean {\n const eclCategoryFilterItems = this.eclCategoryFilterItems();\n return eclCategoryFilterItems !== undefined && eclCategoryFilterItems.length > 0;\n }\n\n /**\n * Returns the list of child components.\n */\n get children(): readonly EclCategoryFilterItemComponent[] {\n return this.eclCategoryFilterItems();\n }\n\n /**\n * Propagates the current level to all direct children items.\n * @param value Level value to set on each child.\n */\n updateChildrenItemsLevel(value: number): void {\n const eclCategoryFilterItems = this.eclCategoryFilterItems();\n if (eclCategoryFilterItems) {\n eclCategoryFilterItems.forEach((item) =>\n (item.level = value));\n }\n }\n}\n","<ng-content></ng-content>\n","import {\n Component,\n forwardRef,\n OnDestroy,\n input,\n contentChild,\n contentChildren,\n effect,\n untracked,\n} from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\nimport { EclCategoryFilterItemSelectEvent } from '../events/ecl-category-filter-item-select.event';\nimport { EclCategoryFilterItemComponent } from '../ecl-category-filter-list';\nimport { EclCategoryFilterListComponent } from '../ecl-category-filter-list';\n\n/**\n * Navigation component for hierarchical category filtering following the ECL design system.\n * Manages a tree of `EclCategoryFilterItemComponent` items — handling selection state,\n * expansion/collapse of branches, level assignment, and preselection via `currentItemId`.\n *\n * - Selector: `ecl-category-filter`.\n * - Project one `EclCategoryFilterListComponent` (`ecl-category-filter-list`) as the root list.\n * - `currentItemId` — ID of the item to preselect and expand on initialisation.\n * - `ariaLabel` (alias `aria-label`) — ARIA label for the `role=\"navigation\"` host; default `'Category filter'`.\n * - Selection events bubble up from `EclCategoryFilterItemComponent.itemSelect`; root-item clicks\n * collapse all other expanded roots, while child-item clicks only deselect other children.\n */\n@Component({\n selector: 'ecl-category-filter',\n templateUrl: './ecl-category-filter.component.html',\n host: {\n 'class': 'ecl-category-filter',\n 'role': 'navigation',\n '[attr.aria-label]': 'ariaLabel()',\n },\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclCategoryFilterComponent extends ECLBaseDirective implements OnDestroy {\n /**\n * ID of the currently selected item. When provided, the item with the matching ID\n * will be marked as current and automatically expanded on initialization.\n */\n readonly currentItemId = input<string>(undefined);\n\n /**\n * Aria-label for the navigation role. Defaults to \"Category filter\".\n */\n readonly ariaLabel = input<string | null>('Category filter', { alias: 'aria-label' });\n\n readonly eclCategoryList = contentChild(forwardRef(() => EclCategoryFilterListComponent));\n\n /**\n * Signal-based query for all descendant category filter items.\n */\n readonly eclCategoryFilterItemsAll = contentChildren<EclCategoryFilterItemComponent>(\n forwardRef(() => EclCategoryFilterItemComponent), { descendants: true }\n );\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly initializedItems = new WeakSet<EclCategoryFilterItemComponent>();\n\n constructor() {\n super();\n\n // Reacts to item changes and performs all setup:\n // - subscribes to itemSelect events (guarded by WeakSet)\n // - assigns IDs where missing\n // - propagates levels through the tree\n // - handles preselection of currentItemId\n effect(() => {\n const items = this.eclCategoryFilterItemsAll();\n untracked(() => {\n for (const item of items) {\n this.connectCategoryfilterItemEventsOnce(item);\n }\n this.setIds(items);\n this.eclCategoryList().updateChildrenItemsLevel(0);\n\n if (this.currentItemId() !== undefined) {\n this.setPreselectedCurrentItem();\n }\n });\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private connectCategoryfilterItemEventsOnce(item: EclCategoryFilterItemComponent): void {\n if (this.initializedItems.has(item)) return;\n\n this.initializedItems.add(item);\n this.connectCategoryfilterItemEvents(item);\n }\n\n private setIds(items: readonly EclCategoryFilterItemComponent[]): void {\n for (const item of items) {\n if (!item.id()) {\n item.setFallbackId(crypto.randomUUID());\n }\n const eclCategoryList = item.eclCategoryList();\n if (eclCategoryList && !eclCategoryList.id()) {\n eclCategoryList.id.set(`${item.id()}-list`);\n }\n }\n }\n\n private connectCategoryfilterItemEvents(item: EclCategoryFilterItemComponent): void {\n outputToObservable(item.itemSelect).pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemSelected(evt);\n });\n }\n\n private onItemSelected(evt: EclCategoryFilterItemSelectEvent): void {\n if (evt.item.isRootItem) {\n this.closeAllItemsButOne(evt.item);\n } else {\n this.deselectAllItemsButOne(evt.item);\n }\n }\n\n private setPreselectedCurrentItem(): void {\n const items = this.eclCategoryFilterItemsAll();\n const currItem = items.find((item) => item.id() === this.currentItemId());\n if (currItem) {\n currItem.isCurrent.set(true);\n if (currItem.hasChildren) {\n currItem.isExpanded.set(true);\n }\n this.expandParents(currItem);\n }\n }\n\n private expandParents(currItem: EclCategoryFilterItem): void {\n if (currItem.isRootItem) {\n return;\n }\n const items = this.eclCategoryFilterItemsAll();\n const parent = items.find(\n (item) => item.hasChildren && item.children.find((child) => child.id() === currItem.id()) !== undefined,\n );\n if (parent) {\n parent.isExpanded.set(true);\n this.expandParents(parent);\n }\n }\n\n private closeAllItemsButOne(item: EclCategoryFilterItem): void {\n const items = this.eclCategoryFilterItemsAll();\n for (const it of items) {\n if (it !== item) {\n it.isExpanded.set(false);\n it.isCurrent.set(false);\n }\n }\n }\n\n private deselectAllItemsButOne(item: EclCategoryFilterItem): void {\n const items = this.eclCategoryFilterItemsAll();\n for (const it of items) {\n if (it !== item) {\n it.isCurrent.set(false);\n }\n }\n }\n}\n","<ng-content></ng-content>\n","import { EclCategoryFilterComponent } from './ecl-category-filter/ecl-category-filter.component';\nimport { EclCategoryFilterListComponent } from './ecl-category-filter-list/ecl-category-filter-list.component';\nimport { EclCategoryFilterItemComponent } from './ecl-category-filter-list/ecl-category-filter-item.component';\n\nexport * from './ecl-category-filter/index';\nexport * from './ecl-category-filter-list/index';\nexport * from './models/ecl-category-filter-item.model';\nexport * from './events/ecl-category-filter-item-select.event';\n\nexport const EUI_ECL_CATEGORY_FILTER = [\n EclCategoryFilterComponent,\n EclCategoryFilterListComponent,\n EclCategoryFilterItemComponent,\n] as const;"],"mappings":";;;;;;;;AAOA,IAAa,mCAAb,cAAsD,aAAY;CAI9D,YAAmB,MAA2B;EAC1C,MAAK;EADU,KAAA,OAAA;CAEnB;AACH;ACqBD,IAAa,iCAAb,MAAa,uCAAuC,iBAAgB;CAbpE,cAAA;;EAkBa,KAAA,OAAO,MAAc,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAM/B,KAAA,UAAU,MAAc,QAAS;GAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;GAAI,OAAO;EAAI,CAAA;EAMhD,KAAA,KAAK,eAAe,KAAK,QAAO,KAAM,KAAK,WAAU,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;EAKxD,KAAA,aAAa,OAAM;EAMnB,KAAA,aAAa,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAM1B,KAAA,YAAY,OAA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AAA;IAAA,UAAA;GAAA,CAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,UChEvD;GACA,QAAA,CAAA,wBAAA;EAAA,CAAA;CAAA;;AD6Ca,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EAhBtC,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAAqB,MAEzB;IACF,SAAS;IACT,QAAQ;IACR,qBAAqB;GACxB;GAAA,UAAA;GAAA,QAAA,CAAA,wBAAA;EAAA,CAAA;CAqBuC,CAAA;CAAA,sBAAA,CAAA;CAAA,gBAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,iBAAiB,8BAA8B,GAAC,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,2BAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAMpF,iBAAiB,8BAA8B,GAAC;IAAI,aAAa;IAAM,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AEvD/E,MAAa,0BAA0B;CACrC;CACA;CACA;AACQ"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-category-filter.mjs","names":[],"sources":["../../components/ecl-category-filter/events/ecl-category-filter-item-select.event.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-item.component.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-item.component.html","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-list.component.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-list.component.html","../../components/ecl-category-filter/ecl-category-filter/ecl-category-filter.component.ts","../../components/ecl-category-filter/ecl-category-filter/ecl-category-filter.component.html","../../components/ecl-category-filter/index.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\n\n/**\n * Event emitted by `EclCategoryFilterItemComponent` when the user clicks an item.\n * Carries the `EclCategoryFilterItem` that was selected.\n */\nexport class EclCategoryFilterItemSelectEvent extends EclBaseEvent {\n /**\n * @param item The category filter item that was selected.\n */\n constructor(public item: EclCategoryFilterItem) {\n super();\n }\n}\n","import { Component, computed, forwardRef, input, output, contentChild, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\nimport { EclCategoryFilterItemSelectEvent } from '../events/ecl-category-filter-item-select.event';\nimport { EclCategoryFilterListComponent } from './ecl-category-filter-list.component';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * Individual category filter item for use inside an `EclCategoryFilterListComponent`.\n * Supports both leaf navigation items (with `href`) and branch items with expandable child lists.\n * State is managed by the parent `EclCategoryFilterComponent` via writable signals.\n *\n * - Selector: `ecl-category-filter-item`.\n * - `href` — navigation URL; when absent, click only toggles the expanded state.\n * - `id` / `idInput` — unique identifier; generated by the parent when not supplied.\n * - `isExpanded` — writable signal controlling whether the child list is visible.\n * - `isCurrent` — writable signal marking this item as the currently selected one.\n * - `itemSelect` — emits `EclCategoryFilterItemSelectEvent` when the user clicks the item.\n * - `hasChildren` / `children` / `level` / `levelClass` — tree structure helpers.\n * - `isRootItem` — `true` when `level === 1`.\n */\n@Component({\n selector: 'ecl-category-filter-item',\n templateUrl: './ecl-category-filter-item.component.html',\n imports: [\n NgTemplateOutlet,\n ...EUI_ECL_ICON,\n ],\n host: {\n 'class': 'ecl-category-filter__list-item',\n 'role': 'listitem',\n '[class.ecl-category-filter__list-item--open]': 'hasChildren ? isExpanded() : null',\n },\n})\nexport class EclCategoryFilterItemComponent extends ECLBaseDirective implements EclCategoryFilterItem {\n /**\n * Link URL associated with this category filter item.\n * If not provided, the item acts as a toggle only.\n */\n readonly href = input<string>();\n\n /**\n * Input for the unique identifier of the item.\n * When omitted, the parent assigns a generated fallback id.\n */\n readonly idInput = input<string | undefined>(undefined, { alias: 'id' });\n\n /**\n * Unique identifier for the item. Used to manage selection state.\n * Resolves to the `id` input when provided, otherwise the parent-assigned fallback.\n */\n readonly id = computed(() => this.idInput() ?? this.fallbackId());\n\n /**\n * Emits when the item is selected by the user (clicked).\n */\n readonly itemSelect = output<EclCategoryFilterItemSelectEvent>();\n\n /**\n * Whether the item is currently expanded (open).\n * Writable so that the parent can toggle it as the tree state changes.\n */\n readonly isExpanded = signal(false);\n\n /**\n * Whether the item is currently selected.\n * Writable so that the parent can update selection as the user navigates.\n */\n readonly isCurrent = signal(false);\n\n /**\n * Child list component if the item has nested children.\n */\n readonly eclCategoryList = contentChild(forwardRef(() => EclCategoryFilterListComponent));\n\n /**\n * Returns the hierarchical level of the item within the tree.\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Sets the level and updates the level of the child list accordingly.\n */\n set level(value: number) {\n this._level = ++value;\n this.updateChildListLevel(this._level);\n }\n private _level!: number;\n\n /**\n * Returns the CSS class for the current level of the item.\n */\n get levelClass(): string {\n return `ecl-category-filter__item--level-${this._level}`;\n }\n\n /**\n * Indicates whether the item has child elements.\n */\n get hasChildren(): boolean {\n return this.eclCategoryList() !== undefined;\n }\n\n /**\n * Returns the child components of this item, if any.\n */\n get children(): readonly EclCategoryFilterItemComponent[] {\n return this.eclCategoryList().children;\n }\n\n /**\n * Returns true if this is a root-level item and has children.\n */\n get isRootItemWithChildren(): boolean {\n return this.hasChildren && this.isRootItem;\n }\n\n /**\n * Returns true if this is a child item and has its own children.\n */\n get isChildItemWithChildren(): boolean {\n return this.hasChildren && !this.isRootItem;\n }\n\n /**\n * Returns true if this is a root-level item (level === 1).\n */\n get isRootItem(): boolean {\n return this.level === 1;\n }\n\n /**\n * Handles user click interaction, updates state and emits selection event.\n * Prevents navigation if no `href` is defined.\n */\n onItemClick(evt: MouseEvent): void {\n this.isExpanded.set(!this.isExpanded());\n this.isCurrent.set(true);\n this.itemSelect.emit(new EclCategoryFilterItemSelectEvent(this));\n if (!this.href()) {\n evt.preventDefault();\n }\n evt.stopPropagation();\n }\n\n /**\n * Assigns a fallback id. Used by the parent category filter when no `id` input was provided.\n */\n setFallbackId(id: string): void {\n this.fallbackId.set(id);\n }\n\n /**\n * Fallback id assigned by the parent when no `id` input was provided.\n */\n private readonly fallbackId = signal<string | undefined>(undefined);\n\n private updateChildListLevel(value: number): void {\n const eclCategoryList = this.eclCategoryList();\n if (eclCategoryList) {\n eclCategoryList.level = value;\n }\n }\n}\n","@if (hasChildren) {\n <button\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent()\"\n [attr.aria-current]=\"isCurrent() ? true : null\"\n [attr.aria-expanded]=\"isExpanded()\"\n [attr.aria-controls]=\"eclCategoryList()?.id()\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n @if(isRootItemWithChildren) {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </button>\n} @else {\n <a\n [href]=\"href()\"\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent()\"\n [attr.aria-current]=\"isCurrent() ? true : null\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n @if(isRootItemWithChildren) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </a>\n}\n<ng-content select=\"ecl-category-filter-list\"></ng-content>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n","import { Component, forwardRef, contentChildren, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItemComponent } from './ecl-category-filter-item.component';\n\n/**\n * List sub-component for `EclCategoryFilterComponent`.\n * Wraps `EclCategoryFilterItemComponent` children as a `role=\"list\"` container.\n * The `id` signal is written by the parent category-filter to construct `aria-controls` references.\n * `level` propagates nesting depth down to all child items via `updateChildrenItemsLevel()`.\n *\n * - Selector: `ecl-category-filter-list`.\n * - `id` — writable signal; set by the parent category filter with a generated value.\n * - `level` — getter/setter tracking nesting depth; automatically propagated to children.\n * - `hasChildren` — `true` when at least one `EclCategoryFilterItemComponent` is projected.\n * - `children` — readonly array of projected `EclCategoryFilterItemComponent` instances.\n */\n@Component({\n selector: 'ecl-category-filter-list',\n templateUrl: './ecl-category-filter-list.component.html',\n host: {\n 'class': 'ecl-category-filter__list',\n 'role': 'list',\n '[attr.id]': 'id()',\n },\n})\nexport class EclCategoryFilterListComponent extends ECLBaseDirective {\n /**\n * ID of this list element, referenced by the parent item's aria-controls.\n */\n readonly id = signal<string | undefined>(undefined);\n\n /**\n * List of all category filter items projected inside this list.\n */\n readonly eclCategoryFilterItems = contentChildren<EclCategoryFilterItemComponent>(forwardRef(() => EclCategoryFilterItemComponent));\n\n /**\n * Gets the nesting level of this list in the category tree.\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Sets the level of the list and applies it to all its children.\n */\n set level(value: number) {\n this._level = value;\n this.updateChildrenItemsLevel(value);\n }\n private _level = 0;\n\n /**\n * Returns true if the list contains one or more category filter items.\n */\n get hasChildren(): boolean {\n const eclCategoryFilterItems = this.eclCategoryFilterItems();\n return eclCategoryFilterItems !== undefined && eclCategoryFilterItems.length > 0;\n }\n\n /**\n * Returns the list of child components.\n */\n get children(): readonly EclCategoryFilterItemComponent[] {\n return this.eclCategoryFilterItems();\n }\n\n /**\n * Propagates the current level to all direct children items.\n * @param value Level value to set on each child.\n */\n updateChildrenItemsLevel(value: number): void {\n const eclCategoryFilterItems = this.eclCategoryFilterItems();\n if (eclCategoryFilterItems) {\n eclCategoryFilterItems.forEach((item) =>\n (item.level = value));\n }\n }\n}\n","<ng-content></ng-content>\n","import {\n Component,\n forwardRef,\n OnDestroy,\n input,\n contentChild,\n contentChildren,\n effect,\n untracked,\n} from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\nimport { EclCategoryFilterItemSelectEvent } from '../events/ecl-category-filter-item-select.event';\nimport { EclCategoryFilterItemComponent } from '../ecl-category-filter-list';\nimport { EclCategoryFilterListComponent } from '../ecl-category-filter-list';\n\n/**\n * Navigation component for hierarchical category filtering following the ECL design system.\n * Manages a tree of `EclCategoryFilterItemComponent` items — handling selection state,\n * expansion/collapse of branches, level assignment, and preselection via `currentItemId`.\n *\n * - Selector: `ecl-category-filter`.\n * - Project one `EclCategoryFilterListComponent` (`ecl-category-filter-list`) as the root list.\n * - `currentItemId` — ID of the item to preselect and expand on initialisation.\n * - `ariaLabel` (alias `aria-label`) — ARIA label for the `role=\"navigation\"` host; default `'Category filter'`.\n * - Selection events bubble up from `EclCategoryFilterItemComponent.itemSelect`; root-item clicks\n * collapse all other expanded roots, while child-item clicks only deselect other children.\n */\n@Component({\n selector: 'ecl-category-filter',\n templateUrl: './ecl-category-filter.component.html',\n host: {\n 'class': 'ecl-category-filter',\n 'role': 'navigation',\n '[attr.aria-label]': 'ariaLabel()',\n },\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclCategoryFilterComponent extends ECLBaseDirective implements OnDestroy {\n /**\n * ID of the currently selected item. When provided, the item with the matching ID\n * will be marked as current and automatically expanded on initialization.\n */\n readonly currentItemId = input<string>();\n\n /**\n * Aria-label for the navigation role. Defaults to \"Category filter\".\n */\n readonly ariaLabel = input<string | null>('Category filter', { alias: 'aria-label' });\n\n readonly eclCategoryList = contentChild(forwardRef(() => EclCategoryFilterListComponent));\n\n /**\n * Signal-based query for all descendant category filter items.\n */\n readonly eclCategoryFilterItemsAll = contentChildren<EclCategoryFilterItemComponent>(\n forwardRef(() => EclCategoryFilterItemComponent), { descendants: true }\n );\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly initializedItems = new WeakSet<EclCategoryFilterItemComponent>();\n\n constructor() {\n super();\n\n // Reacts to item changes and performs all setup:\n // - subscribes to itemSelect events (guarded by WeakSet)\n // - assigns IDs where missing\n // - propagates levels through the tree\n // - handles preselection of currentItemId\n effect(() => {\n const items = this.eclCategoryFilterItemsAll();\n untracked(() => {\n for (const item of items) {\n this.connectCategoryfilterItemEventsOnce(item);\n }\n this.setIds(items);\n this.eclCategoryList().updateChildrenItemsLevel(0);\n\n if (this.currentItemId() !== undefined) {\n this.setPreselectedCurrentItem();\n }\n });\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private connectCategoryfilterItemEventsOnce(item: EclCategoryFilterItemComponent): void {\n if (this.initializedItems.has(item)) return;\n\n this.initializedItems.add(item);\n this.connectCategoryfilterItemEvents(item);\n }\n\n private setIds(items: readonly EclCategoryFilterItemComponent[]): void {\n for (const item of items) {\n if (!item.id()) {\n item.setFallbackId(crypto.randomUUID());\n }\n const eclCategoryList = item.eclCategoryList();\n if (eclCategoryList && !eclCategoryList.id()) {\n eclCategoryList.id.set(`${item.id()}-list`);\n }\n }\n }\n\n private connectCategoryfilterItemEvents(item: EclCategoryFilterItemComponent): void {\n outputToObservable(item.itemSelect).pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemSelected(evt);\n });\n }\n\n private onItemSelected(evt: EclCategoryFilterItemSelectEvent): void {\n if (evt.item.isRootItem) {\n this.closeAllItemsButOne(evt.item);\n } else {\n this.deselectAllItemsButOne(evt.item);\n }\n }\n\n private setPreselectedCurrentItem(): void {\n const items = this.eclCategoryFilterItemsAll();\n const currItem = items.find((item) => item.id() === this.currentItemId());\n if (currItem) {\n currItem.isCurrent.set(true);\n if (currItem.hasChildren) {\n currItem.isExpanded.set(true);\n }\n this.expandParents(currItem);\n }\n }\n\n private expandParents(currItem: EclCategoryFilterItem): void {\n if (currItem.isRootItem) {\n return;\n }\n const items = this.eclCategoryFilterItemsAll();\n const parent = items.find(\n (item) => item.hasChildren && item.children.find((child) => child.id() === currItem.id?.()) !== undefined,\n );\n if (parent) {\n parent.isExpanded.set(true);\n this.expandParents(parent);\n }\n }\n\n private closeAllItemsButOne(item: EclCategoryFilterItem): void {\n const items = this.eclCategoryFilterItemsAll();\n for (const it of items) {\n if (it !== item) {\n it.isExpanded.set(false);\n it.isCurrent.set(false);\n }\n }\n }\n\n private deselectAllItemsButOne(item: EclCategoryFilterItem): void {\n const items = this.eclCategoryFilterItemsAll();\n for (const it of items) {\n if (it !== item) {\n it.isCurrent.set(false);\n }\n }\n }\n}\n","<ng-content></ng-content>\n","import { EclCategoryFilterComponent } from './ecl-category-filter/ecl-category-filter.component';\nimport { EclCategoryFilterListComponent } from './ecl-category-filter-list/ecl-category-filter-list.component';\nimport { EclCategoryFilterItemComponent } from './ecl-category-filter-list/ecl-category-filter-item.component';\n\nexport * from './ecl-category-filter/index';\nexport * from './ecl-category-filter-list/index';\nexport * from './models/ecl-category-filter-item.model';\nexport * from './events/ecl-category-filter-item-select.event';\n\nexport const EUI_ECL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A;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,iBAAiB,8BAA8B,GAAC,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,2BAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAMpF,iBAAiB,8BAA8B,GAAC;IAAI,aAAa;IAAM,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AEvD/E,MAAa,0BAA0B;CACrC;CACA;CACA;AACQ"}
@@ -30,13 +30,13 @@ import { ECLBaseDirective } from "@eui/ecl/core";
30
30
  var EclDateBlockComponent = class EclDateBlockComponent extends ECLBaseDirective {
31
31
  constructor() {
32
32
  super();
33
- this.date = input(void 0, ...ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []);
33
+ this.date = input(...ngDevMode ? [void 0, { debugName: "date" }] : /* istanbul ignore next */ []);
34
34
  this.dateFormat = input("dd/M/yyyy", ...ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []);
35
35
  this.variant = input(null, ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
36
- this.day = input(void 0, ...ngDevMode ? [{ debugName: "day" }] : /* istanbul ignore next */ []);
37
- this.month = input(void 0, ...ngDevMode ? [{ debugName: "month" }] : /* istanbul ignore next */ []);
38
- this.monthTitle = input(void 0, ...ngDevMode ? [{ debugName: "monthTitle" }] : /* istanbul ignore next */ []);
39
- this.year = input(void 0, ...ngDevMode ? [{ debugName: "year" }] : /* istanbul ignore next */ []);
36
+ this.day = input(...ngDevMode ? [void 0, { debugName: "day" }] : /* istanbul ignore next */ []);
37
+ this.month = input(...ngDevMode ? [void 0, { debugName: "month" }] : /* istanbul ignore next */ []);
38
+ this.monthTitle = input(...ngDevMode ? [void 0, { debugName: "monthTitle" }] : /* istanbul ignore next */ []);
39
+ this.year = input(...ngDevMode ? [void 0, { debugName: "year" }] : /* istanbul ignore next */ []);
40
40
  this.datetimeInput = input(void 0, {
41
41
  ...ngDevMode ? { debugName: "datetimeInput" } : /* istanbul ignore next */ {},
42
42
  alias: "datetime"
@@ -49,10 +49,10 @@ var EclDateBlockComponent = class EclDateBlockComponent extends ECLBaseDirective
49
49
  this.datetime = computed(() => this.datetimeInput() || this.getFormattedDate(this.date(), this.dateFormat()), ...ngDevMode ? [{ debugName: "datetime" }] : /* istanbul ignore next */ []);
50
50
  this.translateService = inject(TranslateService);
51
51
  const translateService = this.translateService;
52
- this.locale = translateService.currentLang();
52
+ this.locale = translateService.currentLang() ?? "en";
53
53
  }
54
54
  getFormattedDate(date, dateFormat) {
55
- if (date) return formatDate(date, dateFormat, this.translateService.currentLang());
55
+ if (date) return formatDate(date, dateFormat, this.translateService.currentLang() ?? this.locale);
56
56
  else return null;
57
57
  }
58
58
  static {
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-date-block.mjs","names":[],"sources":["../../components/ecl-date-block/ecl-date-block.component.ts","../../components/ecl-date-block/ecl-date-block.component.html","../../components/ecl-date-block/index.ts"],"sourcesContent":["import { formatDate, DatePipe } from '@angular/common';\nimport { Component, computed, inject, input } from '@angular/core';\nimport '@angular/common/locales/global/bg';\nimport '@angular/common/locales/global/da';\nimport '@angular/common/locales/global/en';\nimport '@angular/common/locales/global/et';\nimport '@angular/common/locales/global/fr';\nimport '@angular/common/locales/global/hr';\nimport '@angular/common/locales/global/lv';\nimport '@angular/common/locales/global/hu';\nimport '@angular/common/locales/global/nl';\nimport '@angular/common/locales/global/pt';\nimport '@angular/common/locales/global/sk';\nimport '@angular/common/locales/global/fi';\nimport '@angular/common/locales/global/cs';\nimport '@angular/common/locales/global/de';\nimport '@angular/common/locales/global/el';\nimport '@angular/common/locales/global/es';\nimport '@angular/common/locales/global/ga';\nimport '@angular/common/locales/global/it';\nimport '@angular/common/locales/global/lt';\nimport '@angular/common/locales/global/mt';\nimport '@angular/common/locales/global/pl';\nimport '@angular/common/locales/global/ro';\nimport '@angular/common/locales/global/sl';\nimport '@angular/common/locales/global/sv';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Date block component following the ECL design system.\n * Displays a formatted date inside a `<time>` element, suitable for use within content\n * blocks, content items, and event listings. Derives the `datetime` attribute either from\n * the explicit `datetime` input or from the `date` + `dateFormat` inputs.\n *\n * - Selector: `time[eclDateBlock]`.\n * - `date` — `Date` object to format and display.\n * - `dateFormat` — Angular `DatePipe` format string; default `'dd/M/yyyy'`.\n * - `variant` — optional visual state: `'ongoing'` | `'past'`.\n * - `day` / `month` / `monthTitle` / `year` — manual overrides for individual date parts.\n * - `datetime` (input alias `datetime`) — explicit value for the `<time datetime>` attribute;\n * overrides the computed value from `date` + `dateFormat`.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'time[eclDateBlock]',\n templateUrl: './ecl-date-block.component.html',\n imports: [DatePipe],\n host: {\n '[class]': 'cssClasses()',\n '[attr.datetime]': 'datetime()',\n },\n})\nexport class EclDateBlockComponent extends ECLBaseDirective {\n /**\n * The date to be displayed. If not null, it's used to generate the `datetime` attribute and visual output.\n */\n readonly date = input<Date>(undefined);\n\n /**\n * The format to be used when rendering the date string (Angular DatePipe format).\n * Default is `'dd/M/yyyy'`.\n */\n readonly dateFormat = input('dd/M/yyyy');\n\n /**\n * Optional visual variant of the date block. Can be:\n * - `'ongoing'`: for ongoing events\n * - `'past'`: for past events\n * This changes styling only.\n */\n readonly variant = input<'ongoing' | 'past'>(null);\n\n /**\n * Explicit string for day part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly day = input<string>(undefined);\n\n /**\n * Explicit string for month part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly month = input<string>(undefined);\n\n /**\n * Explicit string used as an accessible or verbose label for the month (optional).\n */\n readonly monthTitle = input<string>(undefined);\n\n /**\n * Explicit string for year part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly year = input<string>(undefined);\n\n /**\n * Explicit value for the `datetime` attribute of the `<time>` element (optional).\n * If not provided, it is derived from `date` and `dateFormat`.\n */\n readonly datetimeInput = input<string>(undefined, { alias: 'datetime' });\n\n locale = 'en';\n\n protected readonly cssClasses = computed<string>(() => {\n const variant = this.variant();\n return [super.getCssClasses('ecl-date-block'), variant ? `ecl-date-block--${variant}` : ''].join(' ').trim();\n });\n\n /**\n * The resolved `datetime` attribute value. Uses the explicit `datetime` input\n * when provided, otherwise derives it from `date` and `dateFormat`.\n */\n readonly datetime = computed(() => this.datetimeInput() || this.getFormattedDate(this.date(), this.dateFormat()));\n\n private translateService = inject(TranslateService);\n\n constructor() {\n super();\n const translateService = this.translateService;\n\n this.locale = translateService.currentLang();\n }\n\n private getFormattedDate(date: Date, dateFormat: string): string {\n if (date) {\n return formatDate(date, dateFormat, this.translateService.currentLang());\n } else {\n return null;\n }\n }\n}\n","<span class=\"ecl-date-block__daytime\">{{ datetime() || (date() | date: dateFormat()) }}</span>\n<span class=\"ecl-date-block__day\" aria-hidden=\"true\">{{ day() || (date() | date: 'd') }}</span>\n<abbr [title]=\"monthTitle() || month() || (date() | date: 'MMMM' : '' : locale)\" class=\"ecl-date-block__month\" aria-hidden=\"true\">\n {{ month() || (date() | date: 'MMM' : '' : locale) }}\n</abbr>\n<span class=\"ecl-date-block__year\" aria-hidden=\"true\">{{ year() || (date() | date: 'yyyy') }}</span>\n","import { EclDateBlockComponent } from './ecl-date-block.component';\n\nexport * from './ecl-date-block.component';\n\nexport const EUI_ECL_DATE_BLOCK = [\n EclDateBlockComponent,\n] as const;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,IAAa,wBAAb,MAAa,8BAA8B,iBAAgB;CAgEvD,cAAA;EACI,MAAK;EA7DA,KAAA,OAAO,MAAY,QAAU,GAAA,YAAA,C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GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAVjC,MAAA;EAEa,MAAA,CAAA;GAAA,UAAA;GAAoB,SAErB,CAAC,QAAQ;GAAC,MACb;IACF,WAAW;IACX,mBAAmB;GACtB;GAAA,UAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AE/CL,MAAa,qBAAqB,CAC9B,qBACM"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-date-block.mjs","names":[],"sources":["../../components/ecl-date-block/ecl-date-block.component.ts","../../components/ecl-date-block/ecl-date-block.component.html","../../components/ecl-date-block/index.ts"],"sourcesContent":["import { formatDate, DatePipe } from '@angular/common';\nimport { Component, computed, inject, input } from '@angular/core';\nimport '@angular/common/locales/global/bg';\nimport '@angular/common/locales/global/da';\nimport '@angular/common/locales/global/en';\nimport '@angular/common/locales/global/et';\nimport '@angular/common/locales/global/fr';\nimport '@angular/common/locales/global/hr';\nimport '@angular/common/locales/global/lv';\nimport '@angular/common/locales/global/hu';\nimport '@angular/common/locales/global/nl';\nimport '@angular/common/locales/global/pt';\nimport '@angular/common/locales/global/sk';\nimport '@angular/common/locales/global/fi';\nimport '@angular/common/locales/global/cs';\nimport '@angular/common/locales/global/de';\nimport '@angular/common/locales/global/el';\nimport '@angular/common/locales/global/es';\nimport '@angular/common/locales/global/ga';\nimport '@angular/common/locales/global/it';\nimport '@angular/common/locales/global/lt';\nimport '@angular/common/locales/global/mt';\nimport '@angular/common/locales/global/pl';\nimport '@angular/common/locales/global/ro';\nimport '@angular/common/locales/global/sl';\nimport '@angular/common/locales/global/sv';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Date block component following the ECL design system.\n * Displays a formatted date inside a `<time>` element, suitable for use within content\n * blocks, content items, and event listings. Derives the `datetime` attribute either from\n * the explicit `datetime` input or from the `date` + `dateFormat` inputs.\n *\n * - Selector: `time[eclDateBlock]`.\n * - `date` — `Date` object to format and display.\n * - `dateFormat` — Angular `DatePipe` format string; default `'dd/M/yyyy'`.\n * - `variant` — optional visual state: `'ongoing'` | `'past'`.\n * - `day` / `month` / `monthTitle` / `year` — manual overrides for individual date parts.\n * - `datetime` (input alias `datetime`) — explicit value for the `<time datetime>` attribute;\n * overrides the computed value from `date` + `dateFormat`.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'time[eclDateBlock]',\n templateUrl: './ecl-date-block.component.html',\n imports: [DatePipe],\n host: {\n '[class]': 'cssClasses()',\n '[attr.datetime]': 'datetime()',\n },\n})\nexport class EclDateBlockComponent extends ECLBaseDirective {\n /**\n * The date to be displayed. If not null, it's used to generate the `datetime` attribute and visual output.\n */\n readonly date = input<Date>();\n\n /**\n * The format to be used when rendering the date string (Angular DatePipe format).\n * Default is `'dd/M/yyyy'`.\n */\n readonly dateFormat = input('dd/M/yyyy');\n\n /**\n * Optional visual variant of the date block. Can be:\n * - `'ongoing'`: for ongoing events\n * - `'past'`: for past events\n * This changes styling only.\n */\n readonly variant = input<'ongoing' | 'past' | null>(null);\n\n /**\n * Explicit string for day part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly day = input<string>();\n\n /**\n * Explicit string for month part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly month = input<string>();\n\n /**\n * Explicit string used as an accessible or verbose label for the month (optional).\n */\n readonly monthTitle = input<string>();\n\n /**\n * Explicit string for year part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly year = input<string>();\n\n /**\n * Explicit value for the `datetime` attribute of the `<time>` element (optional).\n * If not provided, it is derived from `date` and `dateFormat`.\n */\n readonly datetimeInput = input<string | undefined>(undefined, { alias: 'datetime' });\n\n locale = 'en';\n\n protected readonly cssClasses = computed<string>(() => {\n const variant = this.variant();\n return [super.getCssClasses('ecl-date-block'), variant ? `ecl-date-block--${variant}` : ''].join(' ').trim();\n });\n\n /**\n * The resolved `datetime` attribute value. Uses the explicit `datetime` input\n * when provided, otherwise derives it from `date` and `dateFormat`.\n */\n readonly datetime = computed(() => this.datetimeInput() || this.getFormattedDate(this.date(), this.dateFormat()));\n\n private translateService = inject(TranslateService);\n\n constructor() {\n super();\n const translateService = this.translateService;\n\n this.locale = translateService.currentLang() ?? 'en';\n }\n\n private getFormattedDate(date: Date | undefined, dateFormat: string): string | null {\n if (date) {\n return formatDate(date, dateFormat, this.translateService.currentLang() ?? this.locale);\n } else {\n return null;\n }\n }\n}\n","<span class=\"ecl-date-block__daytime\">{{ datetime() || (date() | date: dateFormat()) }}</span>\n<span class=\"ecl-date-block__day\" aria-hidden=\"true\">{{ day() || (date() | date: 'd') }}</span>\n<abbr [title]=\"monthTitle() || month() || (date() | date: 'MMMM' : '' : locale)\" class=\"ecl-date-block__month\" aria-hidden=\"true\">\n {{ month() || (date() | date: 'MMM' : '' : locale) }}\n</abbr>\n<span class=\"ecl-date-block__year\" aria-hidden=\"true\">{{ year() || (date() | date: 'yyyy') }}</span>\n","import { EclDateBlockComponent } from './ecl-date-block.component';\n\nexport * from './ecl-date-block.component';\n\nexport const EUI_ECL_DATE_BLOCK = [\n EclDateBlockComponent,\n] as const;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,IAAa,wBAAb,MAAa,8BAA8B,iBAAgB;CAgEvD,cAAA;EACI,MAAK;EA7DA,KAAA,OAAO,MAAa,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAMpB,KAAA,aAAa,MAAM,aAAY,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAQ/B,KAAA,UAAU,MAAiC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAMhD,KAAA,MAAM,MAAe,GAAA,YAAA,CAAA,QAAA,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;AE/CL,MAAa,qBAAqB,CAC9B,qBACM"}
@@ -20,8 +20,8 @@ var EclExpandableComponent = class EclExpandableComponent extends ECLBaseDirecti
20
20
  ...ngDevMode ? { debugName: "isExpanded" } : /* istanbul ignore next */ {},
21
21
  transform: booleanAttribute
22
22
  });
23
- this.collapsedLabel = input(void 0, ...ngDevMode ? [{ debugName: "collapsedLabel" }] : /* istanbul ignore next */ []);
24
- this.expandedLabel = input(void 0, ...ngDevMode ? [{ debugName: "expandedLabel" }] : /* istanbul ignore next */ []);
23
+ this.collapsedLabel = input(...ngDevMode ? [void 0, { debugName: "collapsedLabel" }] : /* istanbul ignore next */ []);
24
+ this.expandedLabel = input(...ngDevMode ? [void 0, { debugName: "expandedLabel" }] : /* istanbul ignore next */ []);
25
25
  this.toggle = output();
26
26
  this.isExpandedState = linkedSignal(() => this.isExpanded(), ...ngDevMode ? [{ debugName: "isExpandedState" }] : /* istanbul ignore next */ []);
27
27
  this.resolvedExpandedLabel = computed(() => this.expandedLabel() || this.collapsedLabel(), ...ngDevMode ? [{ debugName: "resolvedExpandedLabel" }] : /* istanbul ignore next */ []);
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-expandable.mjs","names":[],"sources":["../../components/ecl-expandable/ecl-expandable.component.ts","../../components/ecl-expandable/ecl-expandable.component.html","../../components/ecl-expandable/index.ts"],"sourcesContent":["import { Component, booleanAttribute, computed, linkedSignal, output, input } from '@angular/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclBaseEvent } from '@eui/ecl/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { TranslatePipe } from '@ngx-translate/core';\n\n/**\n * Event emitted when the expandable is toggled.\n * Contains the next expanded state.\n */\nexport class EclExpandableToggleEvent extends EclBaseEvent {\n constructor(public isExpanded: boolean) {\n super();\n }\n}\n\n/**\n * Expandable component following the ECL design system.\n * Renders a toggle button that shows or hides projected content below it.\n * Supports configurable collapsed/expanded labels, emits a cancellable toggle event,\n * and maintains live expanded state via `linkedSignal`.\n *\n * - Selector: `ecl-expandable`.\n * - `isExpanded` — initial expanded state; default `false`.\n * - `collapsedLabel` — button label when content is hidden.\n * - `expandedLabel` — button label when content is visible; falls back to `collapsedLabel` when not set.\n * - `toggle` — emits `EclExpandableToggleEvent` with the next `isExpanded` boolean;\n * call `event.preventDefault()` to suppress the internal state change.\n * - Project the expandable content directly inside the component.\n */\n@Component({\n selector: 'ecl-expandable',\n templateUrl: './ecl-expandable.component.html',\n imports: [...EUI_ECL_BUTTON, ...EUI_ECL_ICON, TranslatePipe],\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclExpandableComponent extends ECLBaseDirective {\n /**\n * Applies the expandable base CSS class to the host element.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-expandable'));\n\n /**\n * Whether the expandable content should start expanded.\n * One-way input; the live expanded state is tracked internally and toggled by the user.\n * Default is `false`.\n */\n readonly isExpanded = input(false, { transform: booleanAttribute });\n\n /**\n * The label to display when the content is collapsed.\n */\n readonly collapsedLabel = input<string>(undefined);\n\n /**\n * The label to display when the content is expanded.\n * If not set, `collapsedLabel` is used as fallback.\n */\n readonly expandedLabel = input<string>(undefined);\n\n /**\n * Event emitted when the expandable is toggled.\n * Consumers can prevent default behavior by calling `event.preventDefault()`.\n */\n // eslint-disable-next-line\n readonly toggle = output<EclExpandableToggleEvent>();\n\n /**\n * Live expanded state. Seeded from the `isExpanded` input and updated when the user\n * toggles the control, so consumer-provided changes re-sync while internal toggles persist.\n */\n protected readonly isExpandedState = linkedSignal(() => this.isExpanded());\n\n /**\n * Effective label shown when expanded, falling back to `collapsedLabel` when not provided.\n */\n protected readonly resolvedExpandedLabel = computed(() => this.expandedLabel() || this.collapsedLabel());\n\n /**\n * Handles click on the toggle button.\n * Emits a toggle event and updates the expanded state unless prevented.\n */\n onButtonClick(): void {\n const nextExpandedState = !this.isExpandedState();\n const event = new EclExpandableToggleEvent(nextExpandedState);\n\n this.toggle.emit(event);\n\n if (!event.defaultPrevented) {\n this.isExpandedState.set(nextExpandedState);\n }\n }\n}\n","<button\n eclButton\n variant=\"tertiary\"\n type=\"button\"\n class=\"ecl-expandable__toggle\"\n [attr.aria-expanded]=\"isExpandedState()\"\n (click)=\"onButtonClick()\">\n <span eclButtonLabel>\n @if (isExpandedState()) {\n {{ resolvedExpandedLabel() || 'ecl.common.COLLAPSE' | translate }}\n } @else {\n {{ collapsedLabel() || 'ecl.common.EXPAND' | translate }}\n }\n </span>\n <ecl-icon icon=\"corner-arrow\" size=\"fluid\" transform=\"rotate-180\"></ecl-icon>\n</button>\n<div class=\"ecl-expandable__content\" [hidden]=\"!isExpandedState()\">\n <ng-content></ng-content>\n</div>\n","import { EclExpandableComponent } from './ecl-expandable.component';\n\nexport * from './ecl-expandable.component';\n\nexport const EUI_ECL_EXPANDABLE = [\n EclExpandableComponent,\n] as const;"],"mappings":";;;;;;;;AAWA,IAAa,2BAAb,cAA8C,aAAY;CACxD,YAAmB,YAAmB;EACpC,MAAK;EADY,KAAA,aAAA;CAEnB;AACD;AA+BD,IAAa,yBAAb,MAAa,+BAA+B,iBAAgB;CAf5D,cAAA;;EAmBqB,KAAA,aAAa,eAC9B,MAAM,cAAc,gBAAgB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAO/B,KAAA,aAAa,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,aAAA,+BAAA,CAAA;GAAI,WAAW;EAAgB,CAAA;EAKvD,KAAA,iBAAiB,MAAc,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;EAMzC,KAAA,gBAAgB,MAAc,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,gBAAA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;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MDegD;KAAa,MAAA;IAAA;GAAA;EAAA,CAAA;CAAA;;AAYhD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EAflC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,SAEjB;IAAC,GAAG;IAAgB,GAAG;IAAc;GAAa;GAAC,MAQtD,EACJ,WAAW,eACZ;GAAA,UAAA;GAAA,QAAA,CAAA,wBAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AExCH,MAAa,qBAAqB,CAC9B,sBACM"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-expandable.mjs","names":[],"sources":["../../components/ecl-expandable/ecl-expandable.component.ts","../../components/ecl-expandable/ecl-expandable.component.html","../../components/ecl-expandable/index.ts"],"sourcesContent":["import { Component, booleanAttribute, computed, linkedSignal, output, input } from '@angular/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclBaseEvent } from '@eui/ecl/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { TranslatePipe } from '@ngx-translate/core';\n\n/**\n * Event emitted when the expandable is toggled.\n * Contains the next expanded state.\n */\nexport class EclExpandableToggleEvent extends EclBaseEvent {\n constructor(public isExpanded: boolean) {\n super();\n }\n}\n\n/**\n * Expandable component following the ECL design system.\n * Renders a toggle button that shows or hides projected content below it.\n * Supports configurable collapsed/expanded labels, emits a cancellable toggle event,\n * and maintains live expanded state via `linkedSignal`.\n *\n * - Selector: `ecl-expandable`.\n * - `isExpanded` — initial expanded state; default `false`.\n * - `collapsedLabel` — button label when content is hidden.\n * - `expandedLabel` — button label when content is visible; falls back to `collapsedLabel` when not set.\n * - `toggle` — emits `EclExpandableToggleEvent` with the next `isExpanded` boolean;\n * call `event.preventDefault()` to suppress the internal state change.\n * - Project the expandable content directly inside the component.\n */\n@Component({\n selector: 'ecl-expandable',\n templateUrl: './ecl-expandable.component.html',\n imports: [...EUI_ECL_BUTTON, ...EUI_ECL_ICON, TranslatePipe],\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclExpandableComponent extends ECLBaseDirective {\n /**\n * Applies the expandable base CSS class to the host element.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-expandable'));\n\n /**\n * Whether the expandable content should start expanded.\n * One-way input; the live expanded state is tracked internally and toggled by the user.\n * Default is `false`.\n */\n readonly isExpanded = input(false, { transform: booleanAttribute });\n\n /**\n * The label to display when the content is collapsed.\n */\n readonly collapsedLabel = input<string>();\n\n /**\n * The label to display when the content is expanded.\n * If not set, `collapsedLabel` is used as fallback.\n */\n readonly expandedLabel = input<string>();\n\n /**\n * Event emitted when the expandable is toggled.\n * Consumers can prevent default behavior by calling `event.preventDefault()`.\n */\n // eslint-disable-next-line\n readonly toggle = output<EclExpandableToggleEvent>();\n\n /**\n * Live expanded state. Seeded from the `isExpanded` input and updated when the user\n * toggles the control, so consumer-provided changes re-sync while internal toggles persist.\n */\n protected readonly isExpandedState = linkedSignal(() => this.isExpanded());\n\n /**\n * Effective label shown when expanded, falling back to `collapsedLabel` when not provided.\n */\n protected readonly resolvedExpandedLabel = computed(() => this.expandedLabel() || this.collapsedLabel());\n\n /**\n * Handles click on the toggle button.\n * Emits a toggle event and updates the expanded state unless prevented.\n */\n onButtonClick(): void {\n const nextExpandedState = !this.isExpandedState();\n const event = new EclExpandableToggleEvent(nextExpandedState);\n\n this.toggle.emit(event);\n\n if (!event.defaultPrevented) {\n this.isExpandedState.set(nextExpandedState);\n }\n }\n}\n","<button\n eclButton\n variant=\"tertiary\"\n type=\"button\"\n class=\"ecl-expandable__toggle\"\n [attr.aria-expanded]=\"isExpandedState()\"\n (click)=\"onButtonClick()\">\n <span eclButtonLabel>\n @if (isExpandedState()) {\n {{ resolvedExpandedLabel() || 'ecl.common.COLLAPSE' | translate }}\n } @else {\n {{ collapsedLabel() || 'ecl.common.EXPAND' | translate }}\n }\n </span>\n <ecl-icon icon=\"corner-arrow\" size=\"fluid\" transform=\"rotate-180\"></ecl-icon>\n</button>\n<div class=\"ecl-expandable__content\" [hidden]=\"!isExpandedState()\">\n <ng-content></ng-content>\n</div>\n","import { EclExpandableComponent } from './ecl-expandable.component';\n\nexport * from './ecl-expandable.component';\n\nexport const EUI_ECL_EXPANDABLE = [\n EclExpandableComponent,\n] as const;"],"mappings":";;;;;;;;AAWA,IAAa,2BAAb,cAA8C,aAAY;CACxD,YAAmB,YAAmB;EACpC,MAAK;EADY,KAAA,aAAA;CAEnB;AACD;AA+BD,IAAa,yBAAb,MAAa,+BAA+B,iBAAgB;CAf5D,cAAA;;EAmBqB,KAAA,aAAa,eAC9B,MAAM,cAAc,gBAAgB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAO/B,KAAA,aAAa,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,aAAA,+BAAA,CAAA;GAAI,WAAW;EAAgB,CAAA;EAKvD,KAAA,iBAAiB,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;EAMhC,KAAA,gBAAgB,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;EAO/B,KAAA,SAAS,OAAM;EAML,KAAA,kBAAkB,mBAAmB,KAAK,WAAU,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,k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AAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MDegD;KAAa,MAAA;IAAA;GAAA;EAAA,CAAA;CAAA;;AAYhD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EAflC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,SAEjB;IAAC,GAAG;IAAgB,GAAG;IAAc;GAAa;GAAC,MAQtD,EACJ,WAAW,eACZ;GAAA,UAAA;GAAA,QAAA,CAAA,wBAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AExCH,MAAa,qBAAqB,CAC9B,sBACM"}
@@ -8,7 +8,7 @@ var EclFeaturedComponent = class EclFeaturedComponent extends ECLBaseDirective {
8
8
  constructor() {
9
9
  super(...arguments);
10
10
  this.position = input("left", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
11
- this.variant = input(void 0, ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
11
+ this.variant = input(...ngDevMode ? [void 0, { debugName: "variant" }] : /* istanbul ignore next */ []);
12
12
  this.isDynamicImage = input(false, {
13
13
  ...ngDevMode ? { debugName: "isDynamicImage" } : /* istanbul ignore next */ {},
14
14
  transform: booleanAttribute
@@ -298,7 +298,8 @@ var EclFeaturedItemComponent = class EclFeaturedItemComponent extends ECLBaseDir
298
298
  this.hasMicroTitle = computed(() => this.eclMicroTitle() !== "", ...ngDevMode ? [{ debugName: "hasMicroTitle" }] : /* istanbul ignore next */ []);
299
299
  }
300
300
  ngAfterContentInit() {
301
- if (this.mediaContainer()) this.mediaContainer().class.set("ecl-featured-item__media_container");
301
+ const mediaContainer = this.mediaContainer();
302
+ if (mediaContainer) mediaContainer.class.set("ecl-featured-item__media_container");
302
303
  const describedBy = this.hasTitle() ? `${this.id()}-title` : null;
303
304
  const links = this.links();
304
305
  if (describedBy && links) links.forEach((link) => {
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-featured.mjs","names":[],"sources":["../../components/ecl-featured/ecl-featured.component.ts","../../components/ecl-featured/ecl-featured.component.html","../../components/ecl-featured/ecl-featured-item-link.directive.ts","../../components/ecl-featured/ecl-featured-item.component.ts","../../components/ecl-featured/ecl-featured-item.component.html","../../components/ecl-featured/ecl-featured-item-description.component.ts","../../components/ecl-featured/ecl-featured-item-description.component.html","../../components/ecl-featured/index.ts"],"sourcesContent":["import { booleanAttribute, Component, computed, input } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Promotional feature block that pairs a media area with text content following ECL design standards.\n * Renders as an `article` with configurable image position, highlight variant, and alignment options.\n * Compose using `ecl-featured-item` for text content and `ecl-media-container` for the media slot.\n *\n * - Variant axis: `variant` — `'highlight'` applies a more prominent visual treatment.\n * - Image position: `position` — `'left'` (default) or `'right'`.\n * - Alignment: `horizontalAlign` (`'center'`) and `verticalAlign` (`'center'`, `'top'`).\n * - `isDynamicImage` enables dynamic-image CSS mode; `isLinkHighlighted` activates link-highlighted styling.\n */\n@Component({\n selector: 'ecl-featured, article[eclFeatured]',\n templateUrl: './ecl-featured.component.html',\n host: {\n 'role': 'article',\n '[class]': 'cssClasses()',\n '[class.ecl-featured-item--link-highlighted]': 'isLinkHighlighted()',\n },\n})\nexport class EclFeaturedComponent extends ECLBaseDirective {\n /**\n * Position of the media relative to the text content.\n * - `'left'` (default) — media appears on the left.\n * - `'right'` — media appears on the right.\n */\n readonly position = input<'left' | 'right'>('left');\n /**\n * Visual variant. Use `'highlight'` for a more prominent appearance.\n */\n readonly variant = input<'highlight'>(undefined);\n\n /** Whether the featured item uses a dynamically-sized image (`ecl-featured-item--dynamic`). */\n isDynamicImage = input(false, { transform: booleanAttribute });\n\n /** Horizontal alignment of the media and text block. Use `'center'` to centre both axes. */\n horizontalAlign = input<'left' | 'center' | undefined>();\n\n /** Vertical alignment of the media and text block. `'top'` or `'center'`. */\n verticalAlign = input<'top' | 'center' | undefined>();\n\n /** Applies `ecl-featured-item--link-highlighted` when `true`, giving the link a distinct display in highlight mode. */\n readonly isLinkHighlighted = input(false, { transform: booleanAttribute });\n\n /**\n * Adds specific classes to the component.\n */\n readonly cssClasses = computed(() => {\n const variant = this.variant();\n return [\n super.getCssClasses('ecl-featured-item'),\n variant ? `ecl-featured-item--${variant}`: '',\n this.horizontalAlign() === 'center' ? 'ecl-featured-item--hcenter' : '',\n this.verticalAlign() === 'center' ? 'ecl-featured-item--vcenter' : '',\n this.isDynamicImage() ? 'ecl-featured-item--dynamic' : '',\n ].join(' ').trim();\n });\n}\n","<div class=\"ecl-featured-item__container\" [class.ecl-featured-item__container--right]=\"position() === 'right'\">\n <ng-content></ng-content>\n</div>","import { Directive, computed, input, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Marks an anchor element as the primary navigable link inside an `ecl-featured-item`.\n * Applies the `ecl-featured-item__link` CSS class and manages the `aria-describedby` attribute,\n * which is set programmatically by the parent `EclFeaturedItemComponent` to reference the item's title.\n */\n@Directive({\n selector: '[eclFeaturedItemLink]',\n host: {\n 'class': 'ecl-featured-item__link',\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n },\n})\nexport class EclFeaturedItemLinkDirective extends ECLBaseDirective {\n /**\n * The `aria-describedby` value pointing to the parent featured item's title element.\n * Set imperatively by `EclFeaturedItemComponent` after content initialisation.\n */\n readonly ariaDescribedBy = signal<string | null>(null);\n}\n\n/**\n * Sets a CSS custom property (`--ecl-image-anchor`) on the host to control the anchor\n * point for the featured item's media image. Apply to the media wrapper element inside\n * an `ecl-featured-item`.\n *\n * - `eclFeaturedMediaAnchor` — `'left'`, `'right'`, `'20%'`, or `'center'` (center produces no CSS variable).\n */\n@Directive({\n selector: '[eclFeaturedMediaAnchor]',\n host: {\n '[style.--ecl-image-anchor]': 'cssAnchor()',\n },\n})\nexport class EclFeaturedMediaAnchorDirective extends ECLBaseDirective {\n eclFeaturedMediaAnchor = input<'left' | 'right' | '20%' | 'center' | undefined>();\n\n readonly cssAnchor = computed(() => {\n const value = this.eclFeaturedMediaAnchor();\n\n if (!value || value === 'center') {\n return null;\n }\n\n return value;\n });\n}\n","import { AfterContentInit, Component, contentChild, computed, input, contentChildren } from '@angular/core';\nimport { EclMediaContainerComponent } from '@eui/ecl/components/ecl-media-container';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { uniqueId } from '@eui/core';\nimport { EclFeaturedItemLinkDirective } from './ecl-featured-item-link.directive';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * Text-content slot for an `ecl-featured` block — holds the title, micro-title, description, and links.\n * Project an `ecl-media-container` as a child to supply media alongside the text.\n * Automatically wires `aria-describedby` on projected `[eclFeaturedItemLink]` elements to the title element.\n *\n * - `eclTitle` and `eclMicroTitle` supply the primary and secondary headings.\n * - `id` defaults to a generated unique ID used as the describedby reference target.\n */\n@Component({\n selector: 'ecl-featured-item, div[eclFeaturedItem]',\n imports: [NgTemplateOutlet],\n templateUrl: './ecl-featured-item.component.html',\n host: {\n 'class': 'ecl-featured-item__item',\n },\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclFeaturedItemComponent extends ECLBaseDirective implements AfterContentInit {\n /** Primary heading text of the featured item. */\n eclTitle = input('');\n /** Secondary micro-heading displayed above the main title. */\n eclMicroTitle = input('');\n /** Unique element ID used to generate `aria-describedby` references on child links. Auto-generated if not provided. */\n id = input<string>(`ecl-featured-item-${uniqueId()}`);\n mediaContainer = contentChild(EclMediaContainerComponent);\n readonly links = contentChildren(EclFeaturedItemLinkDirective, { descendants: true });\n\n protected readonly hasMedia = computed(() => {\n return !!this.mediaContainer() \n });\n protected readonly hasTitle = computed(() => this.eclTitle() !== '');\n protected readonly hasMicroTitle = computed(() => this.eclMicroTitle() !== '');\n\n ngAfterContentInit(): void {\n if (this.mediaContainer()) {\n this.mediaContainer().class.set('ecl-featured-item__media_container');\n }\n\n const describedBy = this.hasTitle() ? `${this.id()}-title` : null;\n const links = this.links();\n if (describedBy && links) {\n links.forEach(link => {\n link.ariaDescribedBy.set(describedBy);\n });\n }\n }\n}\n","@if (!hasMedia()) {\n<div class=\"ecl-featured-item__content\">\n <div class=\"ecl-featured-item__info\">\n @if(hasMicroTitle()) {\n <div class=\"ecl-featured-item__micro-title\">{{ eclMicroTitle() }}</div>\n }\n @if(hasTitle()) {\n <div class=\"ecl-featured-item__title\" [attr.id]=\"id() + '-title'\">\n {{ eclTitle() }}\n </div>\n }\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n <ng-content select=\"[eclLink]\"></ng-content>\n</div>\n} @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n}\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>","import { Component } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Styles the description slot inside an `ecl-featured-item` block.\n * Apply to a child element of `ecl-featured-item` to receive the `ecl-featured-item__description` CSS class.\n */\n@Component({\n selector: 'ecl-featured-item-description',\n templateUrl: './ecl-featured-item-description.component.html',\n host: {\n 'class': 'ecl-featured-item__description',\n },\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclFeaturedItemDescriptionComponent extends ECLBaseDirective {}\n","<ng-content></ng-content>\n","import { EclFeaturedComponent } from './ecl-featured.component';\nimport { EclFeaturedItemComponent } from './ecl-featured-item.component';\nimport { EclFeaturedItemDescriptionComponent } from './ecl-featured-item-description.component';\nimport { EclFeaturedItemLinkDirective, EclFeaturedMediaAnchorDirective } from './ecl-featured-item-link.directive';\n\nexport * from './ecl-featured.component';\nexport * from './ecl-featured-item.component';\nexport * from './ecl-featured-item-description.component';\nexport * from './ecl-featured-item-link.directive';\n\nexport const EUI_ECL_FEATURED = [\n EclFeaturedComponent,\n EclFeaturedItemComponent,\n EclFeaturedItemLinkDirective,\n EclFe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;GAA+B,MAEnC,EACF,SAAS,iCACZ;GAAA,UAAA;GAAA,QAAA,CAAA,wBAAA;EAAA,CAAA;;;AEFL,MAAa,mBAAmB;CAC5B;CACA;CACA;CACA;CACA;AACM"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-featured.mjs","names":[],"sources":["../../components/ecl-featured/ecl-featured.component.ts","../../components/ecl-featured/ecl-featured.component.html","../../components/ecl-featured/ecl-featured-item-link.directive.ts","../../components/ecl-featured/ecl-featured-item.component.ts","../../components/ecl-featured/ecl-featured-item.component.html","../../components/ecl-featured/ecl-featured-item-description.component.ts","../../components/ecl-featured/ecl-featured-item-description.component.html","../../components/ecl-featured/index.ts"],"sourcesContent":["import { booleanAttribute, Component, computed, input } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Promotional feature block that pairs a media area with text content following ECL design standards.\n * Renders as an `article` with configurable image position, highlight variant, and alignment options.\n * Compose using `ecl-featured-item` for text content and `ecl-media-container` for the media slot.\n *\n * - Variant axis: `variant` — `'highlight'` applies a more prominent visual treatment.\n * - Image position: `position` — `'left'` (default) or `'right'`.\n * - Alignment: `horizontalAlign` (`'center'`) and `verticalAlign` (`'center'`, `'top'`).\n * - `isDynamicImage` enables dynamic-image CSS mode; `isLinkHighlighted` activates link-highlighted styling.\n */\n@Component({\n selector: 'ecl-featured, article[eclFeatured]',\n templateUrl: './ecl-featured.component.html',\n host: {\n 'role': 'article',\n '[class]': 'cssClasses()',\n '[class.ecl-featured-item--link-highlighted]': 'isLinkHighlighted()',\n },\n})\nexport class EclFeaturedComponent extends ECLBaseDirective {\n /**\n * Position of the media relative to the text content.\n * - `'left'` (default) — media appears on the left.\n * - `'right'` — media appears on the right.\n */\n readonly position = input<'left' | 'right'>('left');\n /**\n * Visual variant. Use `'highlight'` for a more prominent appearance.\n */\n readonly variant = input<'highlight'>();\n\n /** Whether the featured item uses a dynamically-sized image (`ecl-featured-item--dynamic`). */\n isDynamicImage = input(false, { transform: booleanAttribute });\n\n /** Horizontal alignment of the media and text block. Use `'center'` to centre both axes. */\n horizontalAlign = input<'left' | 'center' | undefined>();\n\n /** Vertical alignment of the media and text block. `'top'` or `'center'`. */\n verticalAlign = input<'top' | 'center' | undefined>();\n\n /** Applies `ecl-featured-item--link-highlighted` when `true`, giving the link a distinct display in highlight mode. */\n readonly isLinkHighlighted = input(false, { transform: booleanAttribute });\n\n /**\n * Adds specific classes to the component.\n */\n readonly cssClasses = computed(() => {\n const variant = this.variant();\n return [\n super.getCssClasses('ecl-featured-item'),\n variant ? `ecl-featured-item--${variant}`: '',\n this.horizontalAlign() === 'center' ? 'ecl-featured-item--hcenter' : '',\n this.verticalAlign() === 'center' ? 'ecl-featured-item--vcenter' : '',\n this.isDynamicImage() ? 'ecl-featured-item--dynamic' : '',\n ].join(' ').trim();\n });\n}\n","<div class=\"ecl-featured-item__container\" [class.ecl-featured-item__container--right]=\"position() === 'right'\">\n <ng-content></ng-content>\n</div>","import { Directive, computed, input, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Marks an anchor element as the primary navigable link inside an `ecl-featured-item`.\n * Applies the `ecl-featured-item__link` CSS class and manages the `aria-describedby` attribute,\n * which is set programmatically by the parent `EclFeaturedItemComponent` to reference the item's title.\n */\n@Directive({\n selector: '[eclFeaturedItemLink]',\n host: {\n 'class': 'ecl-featured-item__link',\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n },\n})\nexport class EclFeaturedItemLinkDirective extends ECLBaseDirective {\n /**\n * The `aria-describedby` value pointing to the parent featured item's title element.\n * Set imperatively by `EclFeaturedItemComponent` after content initialisation.\n */\n readonly ariaDescribedBy = signal<string | null>(null);\n}\n\n/**\n * Sets a CSS custom property (`--ecl-image-anchor`) on the host to control the anchor\n * point for the featured item's media image. Apply to the media wrapper element inside\n * an `ecl-featured-item`.\n *\n * - `eclFeaturedMediaAnchor` — `'left'`, `'right'`, `'20%'`, or `'center'` (center produces no CSS variable).\n */\n@Directive({\n selector: '[eclFeaturedMediaAnchor]',\n host: {\n '[style.--ecl-image-anchor]': 'cssAnchor()',\n },\n})\nexport class EclFeaturedMediaAnchorDirective extends ECLBaseDirective {\n eclFeaturedMediaAnchor = input<'left' | 'right' | '20%' | 'center' | undefined>();\n\n readonly cssAnchor = computed(() => {\n const value = this.eclFeaturedMediaAnchor();\n\n if (!value || value === 'center') {\n return null;\n }\n\n return value;\n });\n}\n","import { AfterContentInit, Component, contentChild, computed, input, contentChildren } from '@angular/core';\nimport { EclMediaContainerComponent } from '@eui/ecl/components/ecl-media-container';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { uniqueId } from '@eui/core';\nimport { EclFeaturedItemLinkDirective } from './ecl-featured-item-link.directive';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * Text-content slot for an `ecl-featured` block — holds the title, micro-title, description, and links.\n * Project an `ecl-media-container` as a child to supply media alongside the text.\n * Automatically wires `aria-describedby` on projected `[eclFeaturedItemLink]` elements to the title element.\n *\n * - `eclTitle` and `eclMicroTitle` supply the primary and secondary headings.\n * - `id` defaults to a generated unique ID used as the describedby reference target.\n */\n@Component({\n selector: 'ecl-featured-item, div[eclFeaturedItem]',\n imports: [NgTemplateOutlet],\n templateUrl: './ecl-featured-item.component.html',\n host: {\n 'class': 'ecl-featured-item__item',\n },\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclFeaturedItemComponent extends ECLBaseDirective implements AfterContentInit {\n /** Primary heading text of the featured item. */\n eclTitle = input('');\n /** Secondary micro-heading displayed above the main title. */\n eclMicroTitle = input('');\n /** Unique element ID used to generate `aria-describedby` references on child links. Auto-generated if not provided. */\n id = input<string>(`ecl-featured-item-${uniqueId()}`);\n mediaContainer = contentChild(EclMediaContainerComponent);\n readonly links = contentChildren(EclFeaturedItemLinkDirective, { descendants: true });\n\n protected readonly hasMedia = computed(() => {\n return !!this.mediaContainer()\n });\n protected readonly hasTitle = computed(() => this.eclTitle() !== '');\n protected readonly hasMicroTitle = computed(() => this.eclMicroTitle() !== '');\n\n ngAfterContentInit(): void {\n const mediaContainer = this.mediaContainer();\n if (mediaContainer) {\n mediaContainer.class.set('ecl-featured-item__media_container');\n }\n\n const describedBy = this.hasTitle() ? `${this.id()}-title` : null;\n const links = this.links();\n if (describedBy && links) {\n links.forEach(link => {\n link.ariaDescribedBy.set(describedBy);\n });\n }\n }\n}\n","@if (!hasMedia()) {\n<div class=\"ecl-featured-item__content\">\n <div class=\"ecl-featured-item__info\">\n @if(hasMicroTitle()) {\n <div class=\"ecl-featured-item__micro-title\">{{ eclMicroTitle() }}</div>\n }\n @if(hasTitle()) {\n <div class=\"ecl-featured-item__title\" [attr.id]=\"id() + '-title'\">\n {{ eclTitle() }}\n </div>\n }\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n <ng-content select=\"[eclLink]\"></ng-content>\n</div>\n} @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n}\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>","import { Component } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Styles the description slot inside an `ecl-featured-item` block.\n * Apply to a child element of `ecl-featured-item` to receive the `ecl-featured-item__description` CSS class.\n */\n@Component({\n selector: 'ecl-featured-item-description',\n templateUrl: './ecl-featured-item-description.component.html',\n host: {\n 'class': 'ecl-featured-item__description',\n },\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclFeaturedItemDescriptionComponent extends ECLBaseDirective {}\n","<ng-content></ng-content>\n","import { EclFeaturedComponent } from './ecl-featured.component';\nimport { EclFeaturedItemComponent } from './ecl-featured-item.component';\nimport { EclFeaturedItemDescriptionComponent } from './ecl-featured-item-description.component';\nimport { EclFeaturedItemLinkDirective, EclFeaturedMediaAnchorDirective } from './ecl-featured-item-link.directive';\n\nexport * from './ecl-featured.component';\nexport * from './ecl-featured-item.component';\nexport * from './ecl-featured-item-description.component';\nexport * from './ecl-featured-item-link.directive';\n\nexport const EUI_ECL_FEATURED = [\n EclFeaturedComponent,\n EclFeaturedItemComponent,\n EclFeaturedItemLinkDirective,\n EclFeaturedItemDescriptionComponent,\n EclFeaturedMediaAnchorDirective,\n] as const;"],"mappings":";;;;;;AAsBA,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CAT1D,cAAA;;EAea,KAAA,WAAW,MAAwB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAI1C,KAAA,UAAU,MAAoB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAGvC,KAAA,iBAAiB,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,iBAAA,+BAAA,CAAA;GAAI,WAAW;EAAgB,CAAA;EAG3D,KAAA,kBAAkB,MAAsC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;EAGxD,KAAA,gBAAgB,MAAqC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;EAG5C,KAAA,oBAAoB,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,oBAAA,+BAAA,CAAA;GAAI,WAAW;EAAgB,CAAA;EAK9D,KAAA,aAAa,eAAc;GAChC,MAAM,UAAU,KAAK,QAAO;GAC5B,OAAO;IACH,MAAM,cAAc,mBAAmB;IACvC,UAAU,sBAAsB,YAAW;IAC3C,KAAK,gBAAe,MAAO,WAAW,+BAA+B;IACrE,KAAK,cAAa,MAAO,WAAW,+BAA+B;IACnE,KAAK,eAAc,IAAK,+BAA+B;GAC1D,CAAA,CAAC,KAAK,GAAG,CAAC,CAAC,KAAI;EACpB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CACL;CArCY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA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,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmC,YAAA,CAAA;EAd/C,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAA+B,MAEnC,EACF,SAAS,iCACZ;GAAA,UAAA;GAAA,QAAA,CAAA,wBAAA;EAAA,CAAA;;;AEFL,MAAa,mBAAmB;CAC5B;CACA;CACA;CACA;CACA;AACM"}
@@ -24,7 +24,7 @@ var EclFileUploadDirective = class EclFileUploadDirective extends ECLBaseDirecti
24
24
  ...ngDevMode ? { debugName: "isInvalid" } : /* istanbul ignore next */ {},
25
25
  transform: booleanAttribute
26
26
  });
27
- this.id = input(void 0, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
27
+ this.id = input(...ngDevMode ? [void 0, { debugName: "id" }] : /* istanbul ignore next */ []);
28
28
  this.disabled = input(void 0, {
29
29
  ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
30
30
  transform: booleanAttribute
@@ -49,7 +49,7 @@ var EclFileUploadDirective = class EclFileUploadDirective extends ECLBaseDirecti
49
49
  this.cssClasses = computed(() => super.getCssClasses("ecl-file-upload"), ...ngDevMode ? [{ debugName: "cssClasses" }] : /* istanbul ignore next */ []);
50
50
  }
51
51
  get invalidState() {
52
- if (this.ngControl) return this.ngControl.status === "INVALID" && this.ngControl.touched;
52
+ if (this.ngControl) return this.ngControl.status === "INVALID" && !!this.ngControl.touched;
53
53
  else return this.isInvalid();
54
54
  }
55
55
  ngOnInit() {
@@ -71,7 +71,7 @@ var EclFileUploadDirective = class EclFileUploadDirective extends ECLBaseDirecti
71
71
  }
72
72
  onFilesSelected(evt) {
73
73
  const fileList = evt.target.files;
74
- this.files = this.getFileModels(fileList);
74
+ this.files = fileList ? this.getFileModels(fileList) : [];
75
75
  const fileEvent = new EclFileUploadFileSelectedEvent(this.files);
76
76
  this.filesSelected.emit(fileEvent);
77
77
  if (!fileEvent.defaultPrevented) {
@@ -116,7 +116,7 @@ var EclFileUploadDirective = class EclFileUploadDirective extends ECLBaseDirecti
116
116
  this.buttonEl = this.renderer.createElement("span");
117
117
  this.addClasses(this.buttonEl, this.SPAN_BUTTON_CONVERSION_CLASSES);
118
118
  this.labelEl = this.renderer.createElement("label");
119
- this.renderer.setAttribute(this.labelEl, "for", this.id());
119
+ this.renderer.setAttribute(this.labelEl, "for", this.id() ?? "");
120
120
  this.renderer.addClass(this.labelEl, "ecl-file-upload__button-container");
121
121
  this.renderer.appendChild(this.labelEl, this.buttonEl);
122
122
  return this.labelEl;
@@ -153,7 +153,7 @@ var EclFileUploadDirective = class EclFileUploadDirective extends ECLBaseDirecti
153
153
  }));
154
154
  }
155
155
  getFilenameExtension(filename) {
156
- return filename.split(".").pop();
156
+ return filename.split(".").pop() ?? "";
157
157
  }
158
158
  formatBytes(bytes, decimals = 2) {
159
159
  if (bytes === 0) return "0 Bytes";
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-file-upload.mjs","names":[],"sources":["../../components/ecl-file-upload/events/ecl-file-upload-file-selected.event.ts","../../components/ecl-file-upload/ecl-file-upload.directive.ts","../../components/ecl-file-upload/index.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\nimport { EclFileUpload } from '../models/ecl-file-upload.model';\n\n/**\n * Custom event emitted by the ECL file upload directive\n * when one or more files are selected.\n */\nexport class EclFileUploadFileSelectedEvent extends EclBaseEvent {\n /**\n * List of selected files.\n * Each file includes its name, extension, and formatted size.\n */\n constructor(public files: Array<EclFileUpload>) {\n super();\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Directive,\n DoCheck,\n ElementRef,\n computed,\n inject,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n booleanAttribute,\n output,\n input,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclFileUpload } from './models/ecl-file-upload.model';\nimport { EclFileUploadFileSelectedEvent } from './events/ecl-file-upload-file-selected.event';\n\n/**\n * Enhances a native `input[type=file]` element with ECL-compliant styling and behaviour.\n * Renders a styled upload button label and a live-announced file list adjacent to the input,\n * supports single and multiple file selection, and propagates validation state from Angular forms.\n *\n * - `multiple` enables multi-file selection; button label adapts accordingly via i18n keys.\n * - `disabled` prevents the file dialog from opening and disables the internal button.\n * - `isInvalid` marks the component invalid when not using Angular form validation.\n * - `filesSelected` emits `EclFileUploadFileSelectedEvent`; call `preventDefault()` to suppress the DOM file-list update.\n * - `variant` — currently unused; defaults to `'default'`.\n */\n@Directive({\n selector: '[eclFileUpload]',\n host: {\n '[attr.type]': 'type',\n '[attr.id]': 'id()',\n '[attr.disabled]': 'disabled() ? \"\" : null',\n '[attr.multiple]': 'multiple() ? \"\" : null',\n '[class]': 'cssClasses()',\n '[class.ecl-file-upload--invalid]': 'invalidState',\n '(click)': 'onClick($event)',\n '(change)': 'onFilesSelected($event)',\n },\n})\nexport class EclFileUploadDirective extends ECLBaseDirective implements OnInit, OnDestroy, DoCheck {\n protected ngControl = inject(NgControl, { optional: true, self: true });\n\n /**\n * Variant of the component's appearance. Currently unused. Default: `'default'`.\n */\n readonly variant = input('default');\n\n /**\n * Marks the component as invalid (if not using Angular form validation).\n */\n readonly isInvalid = input(false, { transform: booleanAttribute });\n\n /**\n * ID attribute applied to the native file input.\n */\n readonly id = input<string>(undefined);\n\n /**\n * Whether the component is disabled.\n */\n readonly disabled = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Allows selecting multiple files.\n */\n readonly multiple = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Event emitted when files are selected.\n */\n readonly filesSelected = output<EclFileUploadFileSelectedEvent>();\n\n /**\n * Host binding to define input type as 'file'.\n */\n type = 'file';\n\n private fileListEl: HTMLElement;\n\n private files: EclFileUpload[] = [];\n private buttonEl: HTMLElement;\n private labelEl: HTMLElement;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly SPAN_BUTTON_CONVERSION_CLASSES = ['ecl-button', 'ecl-button--primary', 'ecl-file-upload__button'];\n private el = inject(ElementRef);\n private translate = inject(TranslateService);\n private renderer = inject(Renderer2);\n private platformId = inject(PLATFORM_ID);\n\n /**\n * Applies the base `ecl-file-upload` class to the host element.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-file-upload'));\n\n /**\n * Whether the component should appear invalid.\n * Prioritises Angular form control status (`INVALID` + touched) over this input.\n */\n get invalidState(): boolean {\n if (this.ngControl) {\n return this.ngControl.status === 'INVALID' && this.ngControl.touched;\n } else {\n return this.isInvalid();\n }\n }\n\n /**\n * Initializes component structure and translation subscription (browser-only).\n */\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n this.createDOMStructure();\n this.handleTranslations();\n }\n }\n\n /**\n * Clean up resources and RxJS subscriptions.\n */\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Checks component state during change detection to toggle the disabled state of internal elements.\n */\n ngDoCheck(): void {\n if (this.disabled()) {\n this.renderer.setAttribute(this.buttonEl, 'disabled', 'true');\n } else {\n this.renderer.removeAttribute(this.buttonEl, 'disabled');\n }\n }\n\n /**\n * Prevents file dialog from opening when component is disabled.\n * @param evt Click event on the input element.\n */\n onClick(evt: Event): void {\n if (this.disabled()) {\n evt.preventDefault();\n }\n }\n\n /**\n * Handles file selection and emits a structured file selection event.\n * @param evt Change event from input.\n */\n onFilesSelected(evt: Event): void {\n const inputElement: HTMLInputElement = evt.target as HTMLInputElement;\n const fileList: FileList = inputElement.files;\n this.files = this.getFileModels(fileList);\n\n const fileEvent = new EclFileUploadFileSelectedEvent(this.files);\n this.filesSelected.emit(fileEvent);\n\n if (!fileEvent.defaultPrevented) {\n this.handleTranslations();\n this.updateListItemsDOM(this.files);\n }\n }\n\n private handleTranslations(): void {\n const uploadButtonLabelKey = this.geti18nUploadButtonLabelKey();\n\n this.translate\n .stream(uploadButtonLabelKey)\n .pipe(takeUntil(this.destroy$))\n .subscribe((translation: string) => {\n if (this.buttonEl) {\n this.renderer.setProperty(this.buttonEl, 'textContent', translation);\n }\n });\n }\n\n private geti18nUploadButtonLabelKey(): string {\n let key = '';\n\n if (this.files && this.files.length !== 0) {\n if (this.multiple()) {\n key = 'ecl.file-upload.REPLACE-FILES';\n } else {\n key = 'ecl.file-upload.REPLACE-FILE';\n }\n } else {\n if (this.multiple()) {\n key = 'ecl.file-upload.CHOOSE-FILES';\n } else {\n key = 'ecl.file-upload.CHOOSE-FILE';\n }\n }\n\n return key;\n }\n\n private updateListItemsDOM(files: EclFileUpload[]): void {\n this.renderer.setProperty(this.fileListEl, 'textContent', '');\n files.forEach((file) => {\n const item = this.createFileListItemDOMElement(file);\n this.renderer.appendChild(this.fileListEl, item);\n });\n }\n\n private createDOMStructure(): void {\n const labelEl = this.createLabelDOMElement();\n const hostEl = this.getHostDOMElement();\n const fileListEl = this.createFileListDOMElement();\n\n hostEl.insertAdjacentElement('afterend', fileListEl);\n hostEl.insertAdjacentElement('afterend', labelEl);\n\n this.fileListEl = fileListEl;\n }\n\n private getHostDOMElement(): HTMLInputElement {\n return this.el.nativeElement;\n }\n\n private createLabelDOMElement(): HTMLElement {\n this.buttonEl = this.renderer.createElement('span');\n this.addClasses(this.buttonEl, this.SPAN_BUTTON_CONVERSION_CLASSES);\n\n this.labelEl = this.renderer.createElement('label');\n this.renderer.setAttribute(this.labelEl, 'for', this.id());\n this.renderer.addClass(this.labelEl, 'ecl-file-upload__button-container');\n\n this.renderer.appendChild(this.labelEl, this.buttonEl);\n\n return this.labelEl;\n }\n\n private addClasses(element: HTMLElement, classes: string[] ): void {\n classes.forEach(className=> this.renderer.addClass(element, className) )\n }\n\n private createFileListDOMElement(): HTMLElement {\n const element = this.renderer.createElement('ul');\n this.renderer.addClass(element,'ecl-file-upload__list');\n this.renderer.setAttribute(element,'aria-live','polite');\n\n return element;\n }\n\n private createFileListItemDOMElement(fileUpload: EclFileUpload): HTMLElement {\n const liElement = this.renderer.createElement('li');\n this.renderer.addClass(liElement,'ecl-file-upload__item');\n\n const fileNameElement = this.renderer.createElement('span');\n const fileName = this.renderer.createText(fileUpload.name);\n this.renderer.appendChild(fileNameElement, fileName);\n\n this.renderer.addClass( fileNameElement,'ecl-file-upload__item-name' );\n\n const fileMetaElement = this.renderer.createElement('span');\n\n const fileMetaElementText = this.renderer.createText(`(${fileUpload.size} - ${fileUpload.extension})`);\n this.renderer.appendChild(fileMetaElement, fileMetaElementText);\n this.renderer.addClass(fileMetaElement, 'ecl-file-upload__item-meta');\n\n this.renderer.appendChild(liElement, fileNameElement);\n this.renderer.appendChild(liElement, fileMetaElement);\n\n return liElement;\n }\n\n private getFileModels(fileList: FileList): EclFileUpload[] {\n return Array.from(fileList).map((f) => ({\n name: f.name,\n extension: this.getFilenameExtension(f.name),\n size: this.formatBytes(f.size),\n }));\n }\n\n private getFilenameExtension(filename: string): string {\n return filename.split('.').pop();\n }\n\n private formatBytes(bytes, decimals = 2): string {\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['Bytes', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;\n }\n}\n","import { EclFileUploadDirective } from './ecl-file-upload.directive';\n\nexport * from './ecl-file-upload.directive';\nexport * from './models/ecl-file-upload.model';\nexport * from './events/ecl-file-upload-file-selected.event';\n\nexport const EUI_ECL_FILE_UPLOAD = [\n EclFileUploadDirective,\n] as const;"],"mappings":";;;;;;;;AAOA,IAAa,iCAAb,cAAoD,aAAY;CAK5D,YAAmB,OAA2B;EAC1C,MAAK;EADU,KAAA,QAAA;CAEnB;AACH;ACgCD,IAAa,yBAAb,MAAa,+BAA+B,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AA;IAAA,UAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,UAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA,EAAA,eAAA,gBAAA;GAAA,MAAA;IAAA,WAAA;KAAA,SAAA;KAAA,UAAA;IAAA;IAAA,YAAA;KAAA,aAAA;KAAA,WAAA;KAAA,iBAAA;KAAA,iBAAA;KAAA,SAAA;KAAA,kCAAA;IAAA;GAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EAblC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM;IACF,eAAe;IACf,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,WAAW;IACX,oCAAoC;IACpC,WAAW;IACX,YAAY;GACf;EACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxCD,MAAa,sBAAsB,CAC/B,sBACM"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-file-upload.mjs","names":[],"sources":["../../components/ecl-file-upload/events/ecl-file-upload-file-selected.event.ts","../../components/ecl-file-upload/ecl-file-upload.directive.ts","../../components/ecl-file-upload/index.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\nimport { EclFileUpload } from '../models/ecl-file-upload.model';\n\n/**\n * Custom event emitted by the ECL file upload directive\n * when one or more files are selected.\n */\nexport class EclFileUploadFileSelectedEvent extends EclBaseEvent {\n /**\n * List of selected files.\n * Each file includes its name, extension, and formatted size.\n */\n constructor(public files: Array<EclFileUpload>) {\n super();\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Directive,\n DoCheck,\n ElementRef,\n computed,\n inject,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n booleanAttribute,\n output,\n input,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclFileUpload } from './models/ecl-file-upload.model';\nimport { EclFileUploadFileSelectedEvent } from './events/ecl-file-upload-file-selected.event';\n\n/**\n * Enhances a native `input[type=file]` element with ECL-compliant styling and behaviour.\n * Renders a styled upload button label and a live-announced file list adjacent to the input,\n * supports single and multiple file selection, and propagates validation state from Angular forms.\n *\n * - `multiple` enables multi-file selection; button label adapts accordingly via i18n keys.\n * - `disabled` prevents the file dialog from opening and disables the internal button.\n * - `isInvalid` marks the component invalid when not using Angular form validation.\n * - `filesSelected` emits `EclFileUploadFileSelectedEvent`; call `preventDefault()` to suppress the DOM file-list update.\n * - `variant` — currently unused; defaults to `'default'`.\n */\n@Directive({\n selector: '[eclFileUpload]',\n host: {\n '[attr.type]': 'type',\n '[attr.id]': 'id()',\n '[attr.disabled]': 'disabled() ? \"\" : null',\n '[attr.multiple]': 'multiple() ? \"\" : null',\n '[class]': 'cssClasses()',\n '[class.ecl-file-upload--invalid]': 'invalidState',\n '(click)': 'onClick($event)',\n '(change)': 'onFilesSelected($event)',\n },\n})\nexport class EclFileUploadDirective extends ECLBaseDirective implements OnInit, OnDestroy, DoCheck {\n protected ngControl = inject(NgControl, { optional: true, self: true });\n\n /**\n * Variant of the component's appearance. Currently unused. Default: `'default'`.\n */\n readonly variant = input('default');\n\n /**\n * Marks the component as invalid (if not using Angular form validation).\n */\n readonly isInvalid = input(false, { transform: booleanAttribute });\n\n /**\n * ID attribute applied to the native file input.\n */\n readonly id = input<string>();\n\n /**\n * Whether the component is disabled.\n */\n readonly disabled = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Allows selecting multiple files.\n */\n readonly multiple = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Event emitted when files are selected.\n */\n readonly filesSelected = output<EclFileUploadFileSelectedEvent>();\n\n /**\n * Host binding to define input type as 'file'.\n */\n type = 'file';\n\n private fileListEl!: HTMLElement;\n\n private files: EclFileUpload[] = [];\n private buttonEl!: HTMLElement;\n private labelEl!: HTMLElement;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly SPAN_BUTTON_CONVERSION_CLASSES = ['ecl-button', 'ecl-button--primary', 'ecl-file-upload__button'];\n private el = inject(ElementRef);\n private translate = inject(TranslateService);\n private renderer = inject(Renderer2);\n private platformId = inject(PLATFORM_ID);\n\n /**\n * Applies the base `ecl-file-upload` class to the host element.\n */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-file-upload'));\n\n /**\n * Whether the component should appear invalid.\n * Prioritises Angular form control status (`INVALID` + touched) over this input.\n */\n get invalidState(): boolean {\n if (this.ngControl) {\n return this.ngControl.status === 'INVALID' && !!this.ngControl.touched;\n } else {\n return this.isInvalid();\n }\n }\n\n /**\n * Initializes component structure and translation subscription (browser-only).\n */\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n this.createDOMStructure();\n this.handleTranslations();\n }\n }\n\n /**\n * Clean up resources and RxJS subscriptions.\n */\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n * Checks component state during change detection to toggle the disabled state of internal elements.\n */\n ngDoCheck(): void {\n if (this.disabled()) {\n this.renderer.setAttribute(this.buttonEl, 'disabled', 'true');\n } else {\n this.renderer.removeAttribute(this.buttonEl, 'disabled');\n }\n }\n\n /**\n * Prevents file dialog from opening when component is disabled.\n * @param evt Click event on the input element.\n */\n onClick(evt: Event): void {\n if (this.disabled()) {\n evt.preventDefault();\n }\n }\n\n /**\n * Handles file selection and emits a structured file selection event.\n * @param evt Change event from input.\n */\n onFilesSelected(evt: Event): void {\n const inputElement: HTMLInputElement = evt.target as HTMLInputElement;\n const fileList: FileList | null = inputElement.files;\n this.files = fileList ? this.getFileModels(fileList) : [];\n\n const fileEvent = new EclFileUploadFileSelectedEvent(this.files);\n this.filesSelected.emit(fileEvent);\n\n if (!fileEvent.defaultPrevented) {\n this.handleTranslations();\n this.updateListItemsDOM(this.files);\n }\n }\n\n private handleTranslations(): void {\n const uploadButtonLabelKey = this.geti18nUploadButtonLabelKey();\n\n this.translate\n .stream(uploadButtonLabelKey)\n .pipe(takeUntil(this.destroy$))\n .subscribe((translation: string) => {\n if (this.buttonEl) {\n this.renderer.setProperty(this.buttonEl, 'textContent', translation);\n }\n });\n }\n\n private geti18nUploadButtonLabelKey(): string {\n let key = '';\n\n if (this.files && this.files.length !== 0) {\n if (this.multiple()) {\n key = 'ecl.file-upload.REPLACE-FILES';\n } else {\n key = 'ecl.file-upload.REPLACE-FILE';\n }\n } else {\n if (this.multiple()) {\n key = 'ecl.file-upload.CHOOSE-FILES';\n } else {\n key = 'ecl.file-upload.CHOOSE-FILE';\n }\n }\n\n return key;\n }\n\n private updateListItemsDOM(files: EclFileUpload[]): void {\n this.renderer.setProperty(this.fileListEl, 'textContent', '');\n files.forEach((file) => {\n const item = this.createFileListItemDOMElement(file);\n this.renderer.appendChild(this.fileListEl, item);\n });\n }\n\n private createDOMStructure(): void {\n const labelEl = this.createLabelDOMElement();\n const hostEl = this.getHostDOMElement();\n const fileListEl = this.createFileListDOMElement();\n\n hostEl.insertAdjacentElement('afterend', fileListEl);\n hostEl.insertAdjacentElement('afterend', labelEl);\n\n this.fileListEl = fileListEl;\n }\n\n private getHostDOMElement(): HTMLInputElement {\n return this.el.nativeElement;\n }\n\n private createLabelDOMElement(): HTMLElement {\n this.buttonEl = this.renderer.createElement('span');\n this.addClasses(this.buttonEl, this.SPAN_BUTTON_CONVERSION_CLASSES);\n\n this.labelEl = this.renderer.createElement('label');\n this.renderer.setAttribute(this.labelEl, 'for', this.id() ?? '');\n this.renderer.addClass(this.labelEl, 'ecl-file-upload__button-container');\n\n this.renderer.appendChild(this.labelEl, this.buttonEl);\n\n return this.labelEl;\n }\n\n private addClasses(element: HTMLElement, classes: string[] ): void {\n classes.forEach(className=> this.renderer.addClass(element, className) )\n }\n\n private createFileListDOMElement(): HTMLElement {\n const element = this.renderer.createElement('ul');\n this.renderer.addClass(element,'ecl-file-upload__list');\n this.renderer.setAttribute(element,'aria-live','polite');\n\n return element;\n }\n\n private createFileListItemDOMElement(fileUpload: EclFileUpload): HTMLElement {\n const liElement = this.renderer.createElement('li');\n this.renderer.addClass(liElement,'ecl-file-upload__item');\n\n const fileNameElement = this.renderer.createElement('span');\n const fileName = this.renderer.createText(fileUpload.name);\n this.renderer.appendChild(fileNameElement, fileName);\n\n this.renderer.addClass( fileNameElement,'ecl-file-upload__item-name' );\n\n const fileMetaElement = this.renderer.createElement('span');\n\n const fileMetaElementText = this.renderer.createText(`(${fileUpload.size} - ${fileUpload.extension})`);\n this.renderer.appendChild(fileMetaElement, fileMetaElementText);\n this.renderer.addClass(fileMetaElement, 'ecl-file-upload__item-meta');\n\n this.renderer.appendChild(liElement, fileNameElement);\n this.renderer.appendChild(liElement, fileMetaElement);\n\n return liElement;\n }\n\n private getFileModels(fileList: FileList): EclFileUpload[] {\n return Array.from(fileList).map((f) => ({\n name: f.name,\n extension: this.getFilenameExtension(f.name),\n size: this.formatBytes(f.size),\n }));\n }\n\n private getFilenameExtension(filename: string): string {\n return filename.split('.').pop() ?? '';\n }\n\n private formatBytes(bytes: number, decimals = 2): string {\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['Bytes', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;\n }\n}\n","import { EclFileUploadDirective } from './ecl-file-upload.directive';\n\nexport * from './ecl-file-upload.directive';\nexport * from './models/ecl-file-upload.model';\nexport * from './events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