@eui/ecl 23.0.0-alpha.10 → 23.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/i18n-ecl/bg.json +13 -2
- package/assets/i18n-ecl/cs.json +13 -2
- package/assets/i18n-ecl/da.json +13 -2
- package/assets/i18n-ecl/de.json +13 -2
- package/assets/i18n-ecl/el.json +13 -2
- package/assets/i18n-ecl/en.json +13 -2
- package/assets/i18n-ecl/es.json +13 -2
- package/assets/i18n-ecl/et.json +13 -2
- package/assets/i18n-ecl/fi.json +13 -2
- package/assets/i18n-ecl/fr.json +13 -2
- package/assets/i18n-ecl/ga.json +13 -2
- package/assets/i18n-ecl/hr.json +13 -2
- package/assets/i18n-ecl/hu.json +13 -2
- package/assets/i18n-ecl/it.json +13 -2
- package/assets/i18n-ecl/lt.json +13 -2
- package/assets/i18n-ecl/lv.json +13 -2
- package/assets/i18n-ecl/mt.json +13 -2
- package/assets/i18n-ecl/nl.json +13 -2
- package/assets/i18n-ecl/pl.json +13 -2
- package/assets/i18n-ecl/pt.json +13 -2
- package/assets/i18n-ecl/ro.json +13 -2
- package/assets/i18n-ecl/sk.json +13 -2
- package/assets/i18n-ecl/sl.json +13 -2
- package/assets/i18n-ecl/sv.json +13 -2
- package/components/ecl-highlighted-search/package.json +4 -0
- package/components/ecl-story-card/package.json +4 -0
- package/docs/changelog.html +10 -0
- package/docs/classes/EclBaseEvent.html +3 -0
- package/docs/classes/EclHighlightedSearchEvent.html +443 -0
- package/docs/components/EclAccordionSummaryComponent.html +2 -79
- package/docs/components/EclAddToCalendarComponent.html +2 -2
- package/docs/components/EclAnimatedNumbersComponent.html +2 -2
- package/docs/components/EclAnimatedNumbersItemComponent.html +2 -2
- package/docs/components/EclAppComponent.html +2 -2
- package/docs/components/EclBannerComponent.html +2 -2
- package/docs/components/EclBlockquoteComponent.html +2 -2
- package/docs/components/EclBreadcrumbComponent.html +2 -2
- package/docs/components/EclBreadcrumbSegmentComponent.html +2 -2
- package/docs/components/EclButtonComponent.html +2 -2
- package/docs/components/EclCardBodyComponent.html +2 -2
- package/docs/components/EclCardComponent.html +2 -2
- package/docs/components/EclCarouselComponent.html +2 -2
- package/docs/components/EclCarouselItemComponent.html +2 -2
- package/docs/components/EclCategoryFilterComponent.html +2 -2
- package/docs/components/EclCategoryFilterItemComponent.html +2 -2
- package/docs/components/EclCategoryFilterListComponent.html +2 -2
- package/docs/components/EclCheckboxHelpComponent.html +2 -2
- package/docs/components/EclCheckboxLabelComponent.html +2 -2
- package/docs/components/EclContentBlockComponent.html +2 -2
- package/docs/components/EclContentItemComponent.html +2 -2
- package/docs/components/EclDateBlockComponent.html +2 -2
- package/docs/components/EclDescriptionListDefinitionComponent.html +2 -2
- package/docs/components/EclExpandableComponent.html +2 -2
- package/docs/components/EclFactFiguresComponent.html +2 -2
- package/docs/components/EclFactFiguresItemComponent.html +2 -2
- package/docs/components/EclFactFiguresViewAllComponent.html +2 -2
- package/docs/components/EclFeaturedComponent.html +2 -2
- package/docs/components/EclFeaturedItemComponent.html +2 -2
- package/docs/components/EclFeaturedItemDescriptionComponent.html +2 -2
- package/docs/components/EclFileComponent.html +234 -110
- package/docs/components/EclFileItemComponent.html +13 -250
- package/docs/components/EclFileItemsComponent.html +34 -313
- package/docs/components/{EclFileTaxonomyComponent.html → EclFileListsComponent.html} +16 -107
- package/docs/components/EclFormGroupComponent.html +2 -2
- package/docs/components/EclFormLabelComponent.html +2 -2
- package/docs/components/EclGalleryComponent.html +2 -2
- package/docs/components/EclGalleryFooterComponent.html +2 -2
- package/docs/components/EclGalleryItemComponent.html +3 -3
- package/docs/components/EclHighlightBoxComponent.html +2 -2
- package/docs/components/EclHighlightedSearchComponent.html +1042 -0
- package/docs/components/EclIconComponent.html +5 -2
- package/docs/components/EclIndicatorComponent-1.html +2 -2
- package/docs/components/EclIndicatorComponent.html +2 -2
- package/docs/components/EclInpageNavigationComponent.html +2 -2
- package/docs/components/EclInpageNavigationItemComponent.html +2 -2
- package/docs/components/EclLayoutWrapperComponent.html +6 -109
- package/docs/components/EclListIllustrationComponent.html +2 -2
- package/docs/components/EclListIllustrationItemComponent.html +2 -2
- package/docs/components/EclLoadingIndicatorComponent.html +2 -2
- package/docs/components/EclMediaContainerComponent.html +2 -2
- package/docs/components/EclMegaMenuComponent.html +2 -2
- package/docs/components/EclMegaMenuFeaturedComponent.html +2 -2
- package/docs/components/EclMegaMenuInfoComponent.html +2 -2
- package/docs/components/EclMegaMenuItemComponent.html +2 -2
- package/docs/components/EclMegaMenuSubitemComponent.html +2 -2
- package/docs/components/EclMenuComponent.html +2 -2
- package/docs/components/EclMenuItemComponent.html +2 -2
- package/docs/components/EclMenuMegaComponent.html +2 -2
- package/docs/components/EclMenuMegaItemComponent.html +2 -2
- package/docs/components/EclModalBodyComponent.html +2 -2
- package/docs/components/EclModalComponent.html +2 -2
- package/docs/components/EclModalFooterComponent.html +2 -2
- package/docs/components/EclModalHeaderComponent.html +2 -2
- package/docs/components/EclMultiselectComponent.html +2 -2
- package/docs/components/EclMultiselectDropdownComponent.html +13 -98
- package/docs/components/EclMultiselectInputComponent.html +2 -2
- package/docs/components/EclMultiselectOptgroupComponent.html +2 -2
- package/docs/components/EclMultiselectOptionComponent.html +2 -2
- package/docs/components/EclNavigationListComponent.html +2 -2
- package/docs/components/EclNavigationListItemComponent.html +2 -2
- package/docs/components/EclNewsTickerComponent.html +2 -2
- package/docs/components/EclNewsTickerItemComponent.html +2 -2
- package/docs/components/EclNotificationComponent.html +2 -2
- package/docs/components/EclPageHeaderComponent.html +2 -2
- package/docs/components/EclPageHeaderDescriptionContainerComponent.html +2 -2
- package/docs/components/EclPageHeaderExpandableComponent.html +2 -2
- package/docs/components/EclPageHeaderNextComponent.html +2 -2
- package/docs/components/EclPageHeaderSectionComponent.html +2 -2
- package/docs/components/EclPageHeaderSectionInfoComponent.html +2 -2
- package/docs/components/EclPageSummaryComponent.html +2 -2
- package/docs/components/EclPaginationComponent.html +2 -2
- package/docs/components/EclPaginationItemComponent.html +2 -2
- package/docs/components/EclPopoverComponent.html +2 -2
- package/docs/components/EclQuizCardComponent.html +2 -2
- package/docs/components/EclQuizComponent.html +3 -3
- package/docs/components/EclRadioHelpComponent.html +2 -2
- package/docs/components/EclRadioLabelComponent.html +2 -2
- package/docs/components/EclRangeBubbleComponent.html +2 -2
- package/docs/components/EclRangeValueComponent.html +2 -2
- package/docs/components/EclRatingFieldComponent.html +2 -2
- package/docs/components/EclSearchFormComponent.html +2 -2
- package/docs/components/EclSelectContainerComponent.html +2 -2
- package/docs/components/EclSiteFooterComponent.html +2 -2
- package/docs/components/EclSiteFooterCoownerComponent.html +2 -2
- package/docs/components/EclSiteFooterCoreComponent.html +2 -2
- package/docs/components/EclSiteFooterFeedbackComponent.html +2 -2
- package/docs/components/EclSiteFooterFixedContentEUComponent.html +2 -2
- package/docs/components/EclSiteFooterRowCommonComponent.html +2 -2
- package/docs/components/EclSiteHeaderActionComponent.html +2 -2
- package/docs/components/EclSiteHeaderBannerTopComponent.html +2 -2
- package/docs/components/EclSiteHeaderComponent.html +2 -2
- package/docs/components/EclSiteHeaderCustomActionComponent.html +2 -2
- package/docs/components/EclSiteHeaderEnvironmentComponent.html +2 -2
- package/docs/components/EclSiteHeaderLanguageComponent.html +2 -2
- package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +2 -2
- package/docs/components/EclSiteHeaderLoginComponent.html +2 -2
- package/docs/components/EclSiteHeaderNotificationComponent.html +2 -2
- package/docs/components/EclSiteHeaderSearchComponent.html +2 -2
- package/docs/components/EclSloganTickerComponent.html +2 -2
- package/docs/components/EclSocialMediaFollowComponent.html +2 -2
- package/docs/components/EclSocialMediaFollowItemComponent.html +2 -2
- package/docs/components/EclSplashPageComponent.html +2 -2
- package/docs/components/EclSplashPageLanguageCategoryComponent.html +2 -2
- package/docs/components/EclSplashPageLanguageContainerComponent.html +2 -2
- package/docs/components/EclSplashPageLanguageLinkComponent.html +2 -2
- package/docs/components/EclSpotlightComponent.html +2 -2
- package/docs/components/EclSpotlightLinkComponent.html +2 -2
- package/docs/components/EclStickyContainerComponent.html +2 -2
- package/docs/components/EclStoryCardComponent.html +908 -0
- package/docs/components/EclStoryCardGridDetailsComponent.html +946 -0
- package/docs/components/EclStoryCardItemComponent.html +916 -0
- package/docs/components/EclTabComponent.html +2 -2
- package/docs/components/EclTabLabelComponent.html +2 -2
- package/docs/components/EclTableSortButtonComponent.html +2 -2
- package/docs/components/EclTabsComponent.html +2 -2
- package/docs/components/EclTagComponent.html +2 -2
- package/docs/components/EclTextMediaComponent.html +2 -2
- package/docs/components/EclTimelineComponent.html +2 -2
- package/docs/components/EclTimelineItemComponent.html +2 -2
- package/docs/components/EclTimelineItemTogglerComponent.html +2 -2
- package/docs/directives/ECLBaseDirective.html +4 -4
- package/docs/directives/EclAccordionDirective.html +33 -36
- package/docs/directives/EclFileDownloadDirective.html +0 -116
- package/docs/directives/EclFileImageDirective.html +0 -116
- package/docs/directives/EclFileMetaDirective.html +488 -0
- package/docs/directives/EclFilePictureDirective.html +0 -95
- package/docs/directives/EclFilePreviewDirective.html +1 -199
- package/docs/directives/EclFileTitleDirective.html +0 -146
- package/docs/directives/EclFileTranslationDownloadDirective.html +0 -116
- package/docs/directives/EclHighlightedSearchSuggestionsDirective.html +394 -0
- package/docs/directives/EclLayoutItemDirective.html +0 -32
- package/docs/directives/EclStoryCardLinkDirective.html +491 -0
- package/docs/directives/EclStoryCardListDirective.html +491 -0
- package/docs/directives/EclStoryCardPictureDirective.html +497 -0
- package/docs/interfaces/EclStoryCardSelectionEvent.html +317 -0
- package/docs/js/menu-wc.js +34 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/EclAccordionDirective.md +1 -0
- package/docs/json/EclFileComponent.md +43 -7
- package/docs/json/EclFileItemComponent.md +6 -6
- package/docs/json/EclFileItemsComponent.md +6 -6
- package/docs/json/EclFileListsComponent.md +15 -0
- package/docs/json/EclFileMetaDirective.md +16 -0
- package/docs/json/EclFilePreviewDirective.md +1 -1
- package/docs/json/EclFileTitleDirective.md +0 -1
- package/docs/json/EclHighlightedSearchComponent.md +46 -0
- package/docs/json/EclHighlightedSearchSuggestionsDirective.md +13 -0
- package/docs/json/EclLayoutWrapperComponent.md +2 -2
- package/docs/json/EclStoryCardComponent.md +43 -0
- package/docs/json/EclStoryCardGridDetailsComponent.md +39 -0
- package/docs/json/EclStoryCardItemComponent.md +35 -0
- package/docs/json/EclStoryCardLinkDirective.md +19 -0
- package/docs/json/EclStoryCardListDirective.md +19 -0
- package/docs/json/EclStoryCardPictureDirective.md +22 -0
- package/docs/json/documentation.json +5287 -2643
- package/docs/llms.txt +242 -60
- package/docs/miscellaneous/variables.html +112 -1
- package/docs/overview.html +4 -4
- package/docs/properties.html +1 -1
- package/fesm2022/eui-ecl-components-ecl-accordion.mjs +46 -15
- package/fesm2022/eui-ecl-components-ecl-accordion.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-file.mjs +284 -275
- package/fesm2022/eui-ecl-components-ecl-file.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-gallery.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-gallery.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-highlighted-search.mjs +193 -0
- package/fesm2022/eui-ecl-components-ecl-highlighted-search.mjs.map +1 -0
- package/fesm2022/eui-ecl-components-ecl-layout-wrapper.mjs +10 -11
- package/fesm2022/eui-ecl-components-ecl-layout-wrapper.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-multiselect.mjs +26 -36
- package/fesm2022/eui-ecl-components-ecl-multiselect.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-quiz.mjs +36 -2
- package/fesm2022/eui-ecl-components-ecl-quiz.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-story-card.mjs +505 -0
- package/fesm2022/eui-ecl-components-ecl-story-card.mjs.map +1 -0
- package/package.json +9 -1
- package/types/eui-ecl-components-ecl-accordion.d.ts +23 -5
- package/types/eui-ecl-components-ecl-accordion.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-file.d.ts +131 -116
- package/types/eui-ecl-components-ecl-file.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-highlighted-search.d.ts +104 -0
- package/types/eui-ecl-components-ecl-highlighted-search.d.ts.map +1 -0
- package/types/eui-ecl-components-ecl-layout-wrapper.d.ts +6 -8
- package/types/eui-ecl-components-ecl-layout-wrapper.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-multiselect.d.ts +2 -1
- package/types/eui-ecl-components-ecl-multiselect.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-quiz.d.ts +11 -0
- package/types/eui-ecl-components-ecl-quiz.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-story-card.d.ts +256 -0
- package/types/eui-ecl-components-ecl-story-card.d.ts.map +1 -0
- package/docs/json/EclFileTaxonomyComponent.md +0 -15
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Directive, forwardRef, input, output, computed, signal, contentChild, afterNextRender, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
5
|
+
import { EclBaseEvent, ECLBaseDirective } from '@eui/ecl/core';
|
|
6
|
+
import * as i2 from '@eui/ecl/components/ecl-button';
|
|
7
|
+
import { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';
|
|
8
|
+
import * as i3 from '@eui/ecl/components/ecl-form-group';
|
|
9
|
+
import { EUI_ECL_FORM_GROUP } from '@eui/ecl/components/ecl-form-group';
|
|
10
|
+
import * as i4 from '@eui/ecl/components/ecl-text-input';
|
|
11
|
+
import { EUI_ECL_TEXT_INPUT } from '@eui/ecl/components/ecl-text-input';
|
|
12
|
+
import * as i5 from '@eui/ecl/components/ecl-icon';
|
|
13
|
+
import { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Marker directive for the suggestions content projection slot.
|
|
17
|
+
* Applies the `ecl-highlighted-search__suggestion-list` class to the host element.
|
|
18
|
+
* The parent `ecl-highlighted-search` component uses this to locate
|
|
19
|
+
* the projected element and set `aria-labelledby`.
|
|
20
|
+
*/
|
|
21
|
+
class EclHighlightedSearchSuggestionsDirective {
|
|
22
|
+
constructor() {
|
|
23
|
+
this.el = inject(ElementRef);
|
|
24
|
+
}
|
|
25
|
+
/** Sets the aria-labelledby attribute on the host element. */
|
|
26
|
+
setAriaLabelledBy(id) {
|
|
27
|
+
this.el.nativeElement.setAttribute('aria-labelledby', id);
|
|
28
|
+
}
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclHighlightedSearchSuggestionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
30
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: EclHighlightedSearchSuggestionsDirective, isStandalone: true, selector: "[eclHighlightedSearchSuggestions]", host: { classAttribute: "ecl-highlighted-search__suggestion-list" }, ngImport: i0 }); }
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclHighlightedSearchSuggestionsDirective, decorators: [{
|
|
33
|
+
type: Directive,
|
|
34
|
+
args: [{
|
|
35
|
+
selector: '[eclHighlightedSearchSuggestions]',
|
|
36
|
+
host: {
|
|
37
|
+
'class': 'ecl-highlighted-search__suggestion-list',
|
|
38
|
+
},
|
|
39
|
+
}]
|
|
40
|
+
}] });
|
|
41
|
+
|
|
42
|
+
class EclHighlightedSearchEvent extends EclBaseEvent {
|
|
43
|
+
constructor(keyword) {
|
|
44
|
+
super();
|
|
45
|
+
this.keyword = keyword;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const ECL_HIGHLIGHTED_SEARCH_VALUE_ACCESSOR = {
|
|
50
|
+
provide: NG_VALUE_ACCESSOR,
|
|
51
|
+
useExisting: forwardRef(() => EclHighlightedSearchComponent),
|
|
52
|
+
multi: true,
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Highlighted search component based on ECL design system.
|
|
56
|
+
* Renders a prominent search banner with title, description, search form,
|
|
57
|
+
* and an optional suggestion area via content projection.
|
|
58
|
+
*
|
|
59
|
+
* Implements ControlValueAccessor for use with ngModel and reactive forms.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```html
|
|
63
|
+
* <ecl-highlighted-search
|
|
64
|
+
* eclTitle="Find your next role"
|
|
65
|
+
* description="Discover job opportunities in the EU institutions"
|
|
66
|
+
* helperText="Enter the job you're looking for"
|
|
67
|
+
* placeholder="Enter a search keyword"
|
|
68
|
+
* suggestionLabel="Or explore:"
|
|
69
|
+
* searchButtonLabel="Search"
|
|
70
|
+
* (searchEvent)="onSearch($event)">
|
|
71
|
+
*
|
|
72
|
+
* <ul eclTagSet eclHighlightedSearchSuggestions>
|
|
73
|
+
* <li eclTagSetItem><a href="/traineeships" eclTag>Traineeships</a></li>
|
|
74
|
+
* <li eclTagSetItem><a href="/it" eclTag>IT & Digital</a></li>
|
|
75
|
+
* <li eclTagSetItem><a href="/policy" eclTag>Policy & Law</a></li>
|
|
76
|
+
* </ul>
|
|
77
|
+
*
|
|
78
|
+
* </ecl-highlighted-search>
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
class EclHighlightedSearchComponent extends ECLBaseDirective {
|
|
82
|
+
constructor() {
|
|
83
|
+
super();
|
|
84
|
+
/** Subtitle text displayed below the title. */
|
|
85
|
+
this.description = input('', /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
87
|
+
/** The heading text displayed above the search form. */
|
|
88
|
+
this.eclTitle = input('', /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "eclTitle" }] : /* istanbul ignore next */ []));
|
|
90
|
+
/** Helper text displayed below the search input. */
|
|
91
|
+
this.helperText = input('', /* @ts-ignore */
|
|
92
|
+
...(ngDevMode ? [{ debugName: "helperText" }] : /* istanbul ignore next */ []));
|
|
93
|
+
/** Placeholder text for the search input field. */
|
|
94
|
+
this.placeholder = input('', /* @ts-ignore */
|
|
95
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
96
|
+
/** Label text for the search button. Defaults to "Search". */
|
|
97
|
+
this.searchButtonLabel = input('Search', /* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [{ debugName: "searchButtonLabel" }] : /* istanbul ignore next */ []));
|
|
99
|
+
/** Emitted when the user submits the search form. */
|
|
100
|
+
this.searchEvent = output();
|
|
101
|
+
/** Label for the suggestion section (e.g. "Or explore:"). */
|
|
102
|
+
this.suggestionLabel = input('', /* @ts-ignore */
|
|
103
|
+
...(ngDevMode ? [{ debugName: "suggestionLabel" }] : /* istanbul ignore next */ []));
|
|
104
|
+
/** ID for the helper text element. */
|
|
105
|
+
this.helperId = computed(() => `ehs-${this.instanceId()}-helper`, /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "helperId" }] : /* istanbul ignore next */ []));
|
|
107
|
+
/** ID for the search input element. */
|
|
108
|
+
this.inputId = computed(() => `ehs-${this.instanceId()}-input`, /* @ts-ignore */
|
|
109
|
+
...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
110
|
+
/** Internal search text model. */
|
|
111
|
+
this.searchText = signal('', /* @ts-ignore */
|
|
112
|
+
...(ngDevMode ? [{ debugName: "searchText" }] : /* istanbul ignore next */ []));
|
|
113
|
+
/** ID for the suggestion label element. */
|
|
114
|
+
this.suggestionLabelId = computed(() => `ehs-${this.instanceId()}-suggestion-label`, /* @ts-ignore */
|
|
115
|
+
...(ngDevMode ? [{ debugName: "suggestionLabelId" }] : /* istanbul ignore next */ []));
|
|
116
|
+
/** ID for the title element, used for aria-describedby on the form. */
|
|
117
|
+
this.titleId = computed(() => `ehs-${this.instanceId()}-title`, /* @ts-ignore */
|
|
118
|
+
...(ngDevMode ? [{ debugName: "titleId" }] : /* istanbul ignore next */ []));
|
|
119
|
+
/** Unique instance ID for generating element IDs. */
|
|
120
|
+
this.instanceId = signal(crypto.randomUUID(), /* @ts-ignore */
|
|
121
|
+
...(ngDevMode ? [{ debugName: "instanceId" }] : /* istanbul ignore next */ []));
|
|
122
|
+
this.onChange = () => { };
|
|
123
|
+
this.onTouched = () => { };
|
|
124
|
+
/** Reference to the projected suggestions content for aria wiring. */
|
|
125
|
+
this.suggestionsContent = contentChild(EclHighlightedSearchSuggestionsDirective, /* @ts-ignore */
|
|
126
|
+
...(ngDevMode ? [{ debugName: "suggestionsContent" }] : /* istanbul ignore next */ []));
|
|
127
|
+
afterNextRender(() => {
|
|
128
|
+
this.wireAriaOnSuggestions();
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
writeValue(value) {
|
|
132
|
+
this.searchText.set(value ?? '');
|
|
133
|
+
}
|
|
134
|
+
registerOnChange(fn) {
|
|
135
|
+
this.onChange = fn;
|
|
136
|
+
}
|
|
137
|
+
registerOnTouched(fn) {
|
|
138
|
+
this.onTouched = fn;
|
|
139
|
+
}
|
|
140
|
+
/** Handle Enter key on input for search submission. */
|
|
141
|
+
onEnterKeyDown(event) {
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
this.searchEvent.emit(new EclHighlightedSearchEvent(this.searchText()));
|
|
144
|
+
}
|
|
145
|
+
/** Called when the input model changes. Propagates to CVA. */
|
|
146
|
+
onModelChange(value) {
|
|
147
|
+
this.searchText.set(value);
|
|
148
|
+
this.onChange(value);
|
|
149
|
+
}
|
|
150
|
+
/** Handle form submission. */
|
|
151
|
+
onSubmit(event) {
|
|
152
|
+
event.preventDefault();
|
|
153
|
+
this.onTouched();
|
|
154
|
+
this.searchEvent.emit(new EclHighlightedSearchEvent(this.searchText()));
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Programmatically sets aria-labelledby on the projected suggestions element
|
|
158
|
+
* so the consumer doesn't need to wire IDs manually.
|
|
159
|
+
*/
|
|
160
|
+
wireAriaOnSuggestions() {
|
|
161
|
+
const directive = this.suggestionsContent();
|
|
162
|
+
if (directive) {
|
|
163
|
+
directive.setAriaLabelledBy(this.suggestionLabelId());
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclHighlightedSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
167
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclHighlightedSearchComponent, isStandalone: true, selector: "ecl-highlighted-search", inputs: { description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, eclTitle: { classPropertyName: "eclTitle", publicName: "eclTitle", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, searchButtonLabel: { classPropertyName: "searchButtonLabel", publicName: "searchButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, suggestionLabel: { classPropertyName: "suggestionLabel", publicName: "suggestionLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchEvent: "searchEvent" }, host: { styleAttribute: "display: block", classAttribute: "ecl-highlighted-search" }, providers: [ECL_HIGHLIGHTED_SEARCH_VALUE_ACCESSOR], queries: [{ propertyName: "suggestionsContent", first: true, predicate: EclHighlightedSearchSuggestionsDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-highlighted-search__content\">\n <div class=\"ecl-highlighted-search__title\" [id]=\"titleId()\">{{ eclTitle() }}</div>\n\n @if (description()) {\n <div class=\"ecl-highlighted-search__description ecl-content-color\">{{ description() }}</div>\n }\n\n <form class=\"ecl-highlighted-search__form\" role=\"search\" [attr.aria-describedby]=\"titleId()\" (submit)=\"onSubmit($event)\">\n <div class=\"ecl-highlighted-search__form-content\">\n <ecl-icon iconSet=\"phosphor\" icon=\"magnifying-glass\" size=\"m\"\n class=\"ecl-highlighted-search__form-icon\"></ecl-icon>\n\n <div eclFormGroup class=\"ecl-highlighted-search__form-group\">\n <label [for]=\"inputId()\" [id]=\"inputId() + '-label'\"\n class=\"ecl-form-label ecl-form-label--hidden\">{{ placeholder() }}</label>\n <input [id]=\"inputId()\"\n eclTextInput\n type=\"search\"\n eclSize=\"l\"\n [placeholder]=\"placeholder()\"\n [attr.aria-describedby]=\"helperId()\"\n class=\"ecl-highlighted-search__form-input\"\n [ngModel]=\"searchText()\"\n (ngModelChange)=\"onModelChange($event)\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n name=\"highlighted-search-input\" />\n </div>\n\n <button eclButton\n variant=\"primary\"\n size=\"m\"\n eclStyle=\"highlight\"\n type=\"submit\"\n class=\"ecl-highlighted-search__form-button\">\n <span eclButtonLabel>{{ searchButtonLabel() }}</span>\n </button>\n </div>\n\n @if (helperText()) {\n <div class=\"ecl-highlighted-search__form-helper\" [id]=\"helperId()\">{{ helperText() }}</div>\n }\n </form>\n\n @if (suggestionLabel()) {\n <div class=\"ecl-highlighted-search__suggestion\">\n <span class=\"ecl-highlighted-search__suggestion-label\" [id]=\"suggestionLabelId()\">{{ suggestionLabel() }}</span>\n <ng-content select=\"[eclHighlightedSearchSuggestions]\"></ng-content>\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "eclStyle", "size", "containerStyleClass"] }, { kind: "directive", type: i2.EclButtonLabelDirective, selector: "[eclButtonLabel]" }, { kind: "component", type: i3.EclFormGroupComponent, selector: "[eclFormGroup], ecl-form-group" }, { kind: "directive", type: i4.EclTextInputDirective, selector: "input[eclTextInput]", inputs: ["type", "eclSize", "isInvalid"] }, { kind: "component", type: i5.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }] }); }
|
|
168
|
+
}
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclHighlightedSearchComponent, decorators: [{
|
|
170
|
+
type: Component,
|
|
171
|
+
args: [{ selector: 'ecl-highlighted-search', imports: [
|
|
172
|
+
FormsModule,
|
|
173
|
+
...EUI_ECL_BUTTON,
|
|
174
|
+
...EUI_ECL_FORM_GROUP,
|
|
175
|
+
...EUI_ECL_TEXT_INPUT,
|
|
176
|
+
...EUI_ECL_ICON,
|
|
177
|
+
], providers: [ECL_HIGHLIGHTED_SEARCH_VALUE_ACCESSOR], host: {
|
|
178
|
+
'class': 'ecl-highlighted-search',
|
|
179
|
+
'style': 'display: block',
|
|
180
|
+
}, template: "<div class=\"ecl-highlighted-search__content\">\n <div class=\"ecl-highlighted-search__title\" [id]=\"titleId()\">{{ eclTitle() }}</div>\n\n @if (description()) {\n <div class=\"ecl-highlighted-search__description ecl-content-color\">{{ description() }}</div>\n }\n\n <form class=\"ecl-highlighted-search__form\" role=\"search\" [attr.aria-describedby]=\"titleId()\" (submit)=\"onSubmit($event)\">\n <div class=\"ecl-highlighted-search__form-content\">\n <ecl-icon iconSet=\"phosphor\" icon=\"magnifying-glass\" size=\"m\"\n class=\"ecl-highlighted-search__form-icon\"></ecl-icon>\n\n <div eclFormGroup class=\"ecl-highlighted-search__form-group\">\n <label [for]=\"inputId()\" [id]=\"inputId() + '-label'\"\n class=\"ecl-form-label ecl-form-label--hidden\">{{ placeholder() }}</label>\n <input [id]=\"inputId()\"\n eclTextInput\n type=\"search\"\n eclSize=\"l\"\n [placeholder]=\"placeholder()\"\n [attr.aria-describedby]=\"helperId()\"\n class=\"ecl-highlighted-search__form-input\"\n [ngModel]=\"searchText()\"\n (ngModelChange)=\"onModelChange($event)\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n name=\"highlighted-search-input\" />\n </div>\n\n <button eclButton\n variant=\"primary\"\n size=\"m\"\n eclStyle=\"highlight\"\n type=\"submit\"\n class=\"ecl-highlighted-search__form-button\">\n <span eclButtonLabel>{{ searchButtonLabel() }}</span>\n </button>\n </div>\n\n @if (helperText()) {\n <div class=\"ecl-highlighted-search__form-helper\" [id]=\"helperId()\">{{ helperText() }}</div>\n }\n </form>\n\n @if (suggestionLabel()) {\n <div class=\"ecl-highlighted-search__suggestion\">\n <span class=\"ecl-highlighted-search__suggestion-label\" [id]=\"suggestionLabelId()\">{{ suggestionLabel() }}</span>\n <ng-content select=\"[eclHighlightedSearchSuggestions]\"></ng-content>\n </div>\n }\n</div>\n" }]
|
|
181
|
+
}], ctorParameters: () => [], propDecorators: { description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], eclTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "eclTitle", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], searchButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchButtonLabel", required: false }] }], searchEvent: [{ type: i0.Output, args: ["searchEvent"] }], suggestionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestionLabel", required: false }] }], suggestionsContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => EclHighlightedSearchSuggestionsDirective), { isSignal: true }] }] } });
|
|
182
|
+
|
|
183
|
+
const EUI_ECL_HIGHLIGHTED_SEARCH = [
|
|
184
|
+
EclHighlightedSearchComponent,
|
|
185
|
+
EclHighlightedSearchSuggestionsDirective,
|
|
186
|
+
];
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Generated bundle index. Do not edit.
|
|
190
|
+
*/
|
|
191
|
+
|
|
192
|
+
export { EUI_ECL_HIGHLIGHTED_SEARCH, EclHighlightedSearchComponent, EclHighlightedSearchEvent, EclHighlightedSearchSuggestionsDirective };
|
|
193
|
+
//# sourceMappingURL=eui-ecl-components-ecl-highlighted-search.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-highlighted-search.mjs","sources":["../../components/ecl-highlighted-search/ecl-highlighted-search-suggestions.directive.ts","../../components/ecl-highlighted-search/events/ecl-highlighted-search.event.ts","../../components/ecl-highlighted-search/ecl-highlighted-search.component.ts","../../components/ecl-highlighted-search/ecl-highlighted-search.component.html","../../components/ecl-highlighted-search/index.ts","../../components/ecl-highlighted-search/eui-ecl-components-ecl-highlighted-search.ts"],"sourcesContent":["import { Directive, ElementRef, inject } from '@angular/core';\n\n/**\n * Marker directive for the suggestions content projection slot.\n * Applies the `ecl-highlighted-search__suggestion-list` class to the host element.\n * The parent `ecl-highlighted-search` component uses this to locate\n * the projected element and set `aria-labelledby`.\n */\n@Directive({\n selector: '[eclHighlightedSearchSuggestions]',\n host: {\n 'class': 'ecl-highlighted-search__suggestion-list',\n },\n})\nexport class EclHighlightedSearchSuggestionsDirective {\n private readonly el = inject(ElementRef);\n\n /** Sets the aria-labelledby attribute on the host element. */\n setAriaLabelledBy(id: string): void {\n this.el.nativeElement.setAttribute('aria-labelledby', id);\n }\n}\n","import { EclBaseEvent } from '@eui/ecl/core';\n\nexport class EclHighlightedSearchEvent extends EclBaseEvent {\n constructor(public keyword: string) {\n super();\n }\n}\n","import {\n afterNextRender,\n Component,\n computed,\n contentChild,\n forwardRef,\n input,\n output,\n Provider,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_FORM_GROUP } from '@eui/ecl/components/ecl-form-group';\nimport { EUI_ECL_TEXT_INPUT } from '@eui/ecl/components/ecl-text-input';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclHighlightedSearchSuggestionsDirective } from './ecl-highlighted-search-suggestions.directive';\nimport { EclHighlightedSearchEvent } from './events/ecl-highlighted-search.event';\n\nconst ECL_HIGHLIGHTED_SEARCH_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EclHighlightedSearchComponent),\n multi: true,\n};\n\n/**\n * Highlighted search component based on ECL design system.\n * Renders a prominent search banner with title, description, search form,\n * and an optional suggestion area via content projection.\n *\n * Implements ControlValueAccessor for use with ngModel and reactive forms.\n *\n * @example\n * ```html\n * <ecl-highlighted-search\n * eclTitle=\"Find your next role\"\n * description=\"Discover job opportunities in the EU institutions\"\n * helperText=\"Enter the job you're looking for\"\n * placeholder=\"Enter a search keyword\"\n * suggestionLabel=\"Or explore:\"\n * searchButtonLabel=\"Search\"\n * (searchEvent)=\"onSearch($event)\">\n *\n * <ul eclTagSet eclHighlightedSearchSuggestions>\n * <li eclTagSetItem><a href=\"/traineeships\" eclTag>Traineeships</a></li>\n * <li eclTagSetItem><a href=\"/it\" eclTag>IT & Digital</a></li>\n * <li eclTagSetItem><a href=\"/policy\" eclTag>Policy & Law</a></li>\n * </ul>\n *\n * </ecl-highlighted-search>\n * ```\n */\n@Component({\n selector: 'ecl-highlighted-search',\n templateUrl: './ecl-highlighted-search.component.html',\n imports: [\n FormsModule,\n ...EUI_ECL_BUTTON,\n ...EUI_ECL_FORM_GROUP,\n ...EUI_ECL_TEXT_INPUT,\n ...EUI_ECL_ICON,\n ],\n providers: [ECL_HIGHLIGHTED_SEARCH_VALUE_ACCESSOR],\n host: {\n 'class': 'ecl-highlighted-search',\n 'style': 'display: block',\n },\n})\nexport class EclHighlightedSearchComponent extends ECLBaseDirective implements ControlValueAccessor {\n\n /** Subtitle text displayed below the title. */\n description = input<string>('');\n\n /** The heading text displayed above the search form. */\n eclTitle = input<string>('');\n\n /** Helper text displayed below the search input. */\n helperText = input<string>('');\n\n /** Placeholder text for the search input field. */\n placeholder = input<string>('');\n\n /** Label text for the search button. Defaults to \"Search\". */\n searchButtonLabel = input<string>('Search');\n\n /** Emitted when the user submits the search form. */\n searchEvent = output<EclHighlightedSearchEvent>();\n\n /** Label for the suggestion section (e.g. \"Or explore:\"). */\n suggestionLabel = input<string>('');\n\n /** ID for the helper text element. */\n protected helperId = computed(() => `ehs-${this.instanceId()}-helper`);\n\n /** ID for the search input element. */\n protected inputId = computed(() => `ehs-${this.instanceId()}-input`);\n\n /** Internal search text model. */\n protected searchText = signal('');\n\n /** ID for the suggestion label element. */\n protected suggestionLabelId = computed(() => `ehs-${this.instanceId()}-suggestion-label`);\n\n /** ID for the title element, used for aria-describedby on the form. */\n protected titleId = computed(() => `ehs-${this.instanceId()}-title`);\n\n /** Unique instance ID for generating element IDs. */\n private readonly instanceId = signal(crypto.randomUUID());\n\n private onChange: (value: string) => void = () => {};\n\n private onTouched: () => void = () => {};\n\n /** Reference to the projected suggestions content for aria wiring. */\n private suggestionsContent = contentChild(EclHighlightedSearchSuggestionsDirective);\n\n constructor() {\n super();\n afterNextRender(() => {\n this.wireAriaOnSuggestions();\n });\n }\n\n writeValue(value: string): void {\n this.searchText.set(value ?? '');\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** Handle Enter key on input for search submission. */\n protected onEnterKeyDown(event: Event): void {\n event.preventDefault();\n this.searchEvent.emit(new EclHighlightedSearchEvent(this.searchText()));\n }\n\n /** Called when the input model changes. Propagates to CVA. */\n protected onModelChange(value: string): void {\n this.searchText.set(value);\n this.onChange(value);\n }\n\n /** Handle form submission. */\n protected onSubmit(event: Event): void {\n event.preventDefault();\n this.onTouched();\n this.searchEvent.emit(new EclHighlightedSearchEvent(this.searchText()));\n }\n\n /**\n * Programmatically sets aria-labelledby on the projected suggestions element\n * so the consumer doesn't need to wire IDs manually.\n */\n private wireAriaOnSuggestions(): void {\n const directive = this.suggestionsContent();\n if (directive) {\n directive.setAriaLabelledBy(this.suggestionLabelId());\n }\n }\n}\n","<div class=\"ecl-highlighted-search__content\">\n <div class=\"ecl-highlighted-search__title\" [id]=\"titleId()\">{{ eclTitle() }}</div>\n\n @if (description()) {\n <div class=\"ecl-highlighted-search__description ecl-content-color\">{{ description() }}</div>\n }\n\n <form class=\"ecl-highlighted-search__form\" role=\"search\" [attr.aria-describedby]=\"titleId()\" (submit)=\"onSubmit($event)\">\n <div class=\"ecl-highlighted-search__form-content\">\n <ecl-icon iconSet=\"phosphor\" icon=\"magnifying-glass\" size=\"m\"\n class=\"ecl-highlighted-search__form-icon\"></ecl-icon>\n\n <div eclFormGroup class=\"ecl-highlighted-search__form-group\">\n <label [for]=\"inputId()\" [id]=\"inputId() + '-label'\"\n class=\"ecl-form-label ecl-form-label--hidden\">{{ placeholder() }}</label>\n <input [id]=\"inputId()\"\n eclTextInput\n type=\"search\"\n eclSize=\"l\"\n [placeholder]=\"placeholder()\"\n [attr.aria-describedby]=\"helperId()\"\n class=\"ecl-highlighted-search__form-input\"\n [ngModel]=\"searchText()\"\n (ngModelChange)=\"onModelChange($event)\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n name=\"highlighted-search-input\" />\n </div>\n\n <button eclButton\n variant=\"primary\"\n size=\"m\"\n eclStyle=\"highlight\"\n type=\"submit\"\n class=\"ecl-highlighted-search__form-button\">\n <span eclButtonLabel>{{ searchButtonLabel() }}</span>\n </button>\n </div>\n\n @if (helperText()) {\n <div class=\"ecl-highlighted-search__form-helper\" [id]=\"helperId()\">{{ helperText() }}</div>\n }\n </form>\n\n @if (suggestionLabel()) {\n <div class=\"ecl-highlighted-search__suggestion\">\n <span class=\"ecl-highlighted-search__suggestion-label\" [id]=\"suggestionLabelId()\">{{ suggestionLabel() }}</span>\n <ng-content select=\"[eclHighlightedSearchSuggestions]\"></ng-content>\n </div>\n }\n</div>\n","import { EclHighlightedSearchComponent } from './ecl-highlighted-search.component';\nimport { EclHighlightedSearchSuggestionsDirective } from './ecl-highlighted-search-suggestions.directive';\n\nexport * from './ecl-highlighted-search.component';\nexport * from './ecl-highlighted-search-suggestions.directive';\nexport * from './events/ecl-highlighted-search.event';\n\nexport const EUI_ECL_HIGHLIGHTED_SEARCH = [\n EclHighlightedSearchComponent,\n EclHighlightedSearchSuggestionsDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA;;;;;AAKG;MAOU,wCAAwC,CAAA;AANrD,IAAA,WAA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AA,IAAA,EAAA,EAAA,CAAA,qBAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EAAA,YAAA,EAAA,WAAA,EAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAYN,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAhBzC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EAAA,OAAA,EAEzB;wBACL,WAAW;AACX,wBAAA,GAAG,cAAc;AACjB,wBAAA,GAAG,kBAAkB;AACrB,wBAAA,GAAG,kBAAkB;AACrB,wBAAA,GAAG,YAAY;qBAClB,EAAA,SAAA,EACU,CAAC,qCAAqC,CAAC,EAAA,IAAA,EAC5C;AACF,wBAAA,OAAO,EAAE,wBAAwB;AACjC,wBAAA,OAAO,EAAE,gBAAgB;AAC5B,qBAAA,EAAA,QAAA,EAAA,s0EAAA,EAAA;4yBAgDyC,wCAAwC,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5G/E,MAAM,0BAA0B,GAAG;IACtC,6BAA6B;IAC7B,wCAAwC;;;ACT5C;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive,
|
|
2
|
+
import { Directive, signal, computed, input, numberAttribute, booleanAttribute, contentChild, contentChildren, effect, Component } from '@angular/core';
|
|
3
3
|
import { ECLBaseDirective } from '@eui/ecl/core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -81,7 +81,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
81
81
|
*/
|
|
82
82
|
class EclLayoutItemDirective {
|
|
83
83
|
constructor() {
|
|
84
|
-
this.el = inject(ElementRef);
|
|
85
84
|
/** Positional index (1-based), assigned by the parent layout wrapper. */
|
|
86
85
|
this.index = signal(0, /* @ts-ignore */
|
|
87
86
|
...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
@@ -112,7 +111,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
112
111
|
*
|
|
113
112
|
* @example
|
|
114
113
|
* ```html
|
|
115
|
-
* <
|
|
114
|
+
* <div eclLayoutWrapper [columns]="3" direction="horizontal">
|
|
116
115
|
* <h2 eclLayoutWrapperTitle>Heading</h2>
|
|
117
116
|
* <div eclLayoutWrapperDescription>Description text</div>
|
|
118
117
|
*
|
|
@@ -121,7 +120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
121
120
|
* <div eclLayoutItem><article eclCard>...</article></div>
|
|
122
121
|
*
|
|
123
122
|
* <a eclLayoutWrapperViewAll eclLink [standalone]="true" icon="arrow-left">View all</a>
|
|
124
|
-
* </
|
|
123
|
+
* </div>
|
|
125
124
|
* ```
|
|
126
125
|
*/
|
|
127
126
|
class EclLayoutWrapperComponent extends ECLBaseDirective {
|
|
@@ -130,7 +129,7 @@ class EclLayoutWrapperComponent extends ECLBaseDirective {
|
|
|
130
129
|
get cssClasses() {
|
|
131
130
|
return [
|
|
132
131
|
super.getCssClasses('ecl-layout-wrapper'),
|
|
133
|
-
`col-${this.columns()}`,
|
|
132
|
+
`ecl-layout-wrapper--col-${this.columns()}`,
|
|
134
133
|
this.infoPosition() === 'side' ? 'ecl-layout-wrapper--info-side' : '',
|
|
135
134
|
this.direction() === 'vertical' ? 'ecl-layout-wrapper--vertical' : '',
|
|
136
135
|
this.fullHeight() ? '' : 'ecl-layout-wrapper--height-auto',
|
|
@@ -151,26 +150,26 @@ class EclLayoutWrapperComponent extends ECLBaseDirective {
|
|
|
151
150
|
...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
|
|
152
151
|
/** Display all the elements at full height. */
|
|
153
152
|
this.fullHeight = input(true, { ...(ngDevMode ? { debugName: "fullHeight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
154
|
-
/** Projected layout items that will be auto-indexed. */
|
|
155
|
-
this.items = contentChildren(EclLayoutItemDirective, /* @ts-ignore */
|
|
156
|
-
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
157
153
|
/** Whether a view-all link is projected. */
|
|
158
154
|
this.hasViewAll = contentChild(EclLayoutWrapperViewAllDirective, /* @ts-ignore */
|
|
159
155
|
...(ngDevMode ? [{ debugName: "hasViewAll" }] : /* istanbul ignore next */ []));
|
|
156
|
+
/** Projected layout items that will be auto-indexed. */
|
|
157
|
+
this.items = contentChildren(EclLayoutItemDirective, /* @ts-ignore */
|
|
158
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
160
159
|
effect(() => {
|
|
161
160
|
const items = this.items();
|
|
162
161
|
items.forEach((item, i) => item.index.set(i + 1));
|
|
163
162
|
});
|
|
164
163
|
}
|
|
165
164
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclLayoutWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
166
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclLayoutWrapperComponent, isStandalone: true, selector: "div[eclLayoutWrapper]", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, infoPosition: { classPropertyName: "infoPosition", publicName: "infoPosition", isSignal: true, isRequired: false, transformFunction: null }, forcedColumn: { classPropertyName: "forcedColumn", publicName: "forcedColumn", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, fullHeight: { classPropertyName: "fullHeight", publicName: "fullHeight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClasses" } }, queries: [{ propertyName: "
|
|
165
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EclLayoutWrapperComponent, isStandalone: true, selector: "div[eclLayoutWrapper]", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, infoPosition: { classPropertyName: "infoPosition", publicName: "infoPosition", isSignal: true, isRequired: false, transformFunction: null }, forcedColumn: { classPropertyName: "forcedColumn", publicName: "forcedColumn", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, fullHeight: { classPropertyName: "fullHeight", publicName: "fullHeight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClasses" } }, queries: [{ propertyName: "hasViewAll", first: true, predicate: EclLayoutWrapperViewAllDirective, descendants: true, isSignal: true }, { propertyName: "items", predicate: EclLayoutItemDirective, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-layout-wrapper__grid\">\n <div class=\"ecl-layout-wrapper__info\">\n <ng-content select=\"[eclLayoutWrapperTitle]\" />\n <ng-content select=\"[eclLayoutWrapperDescription]\" />\n </div>\n <div class=\"ecl-layout-wrapper__container\">\n <div class=\"ecl-layout-wrapper__content\">\n <ng-content select=\"[eclLayoutItem]\" />\n </div>\n @if (hasViewAll()) {\n <div class=\"ecl-layout-wrapper__view-all\">\n <ng-content select=\"[eclLayoutWrapperViewAll]\" />\n </div>\n }\n </div>\n</div>\n" }); }
|
|
167
166
|
}
|
|
168
167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EclLayoutWrapperComponent, decorators: [{
|
|
169
168
|
type: Component,
|
|
170
169
|
args: [{ selector: 'div[eclLayoutWrapper]', host: {
|
|
171
170
|
'[class]': 'cssClasses',
|
|
172
|
-
}, template: "<div class=\"ecl-layout-wrapper__grid\">\n <div class=\"ecl-layout-wrapper__info\">\n <ng-content select=\"[eclLayoutWrapperTitle]\" />\n <ng-content select=\"[eclLayoutWrapperDescription]\" />\n </div>\n <div class=\"ecl-layout-wrapper__container\">\n <div class=\"ecl-layout-wrapper__content\">\n <ng-content select=\"[eclLayoutItem]\" />\n </div>\n @if (hasViewAll()) {\n <div class=\"ecl-layout-wrapper__view-all\">\n <ng-content select=\"[eclLayoutWrapperViewAll]\" />\n </div>\n }\n </div>\n</div>\n"
|
|
173
|
-
}], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], infoPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoPosition", required: false }] }], forcedColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "forcedColumn", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], fullHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullHeight", required: false }] }],
|
|
171
|
+
}, template: "<div class=\"ecl-layout-wrapper__grid\">\n <div class=\"ecl-layout-wrapper__info\">\n <ng-content select=\"[eclLayoutWrapperTitle]\" />\n <ng-content select=\"[eclLayoutWrapperDescription]\" />\n </div>\n <div class=\"ecl-layout-wrapper__container\">\n <div class=\"ecl-layout-wrapper__content\">\n <ng-content select=\"[eclLayoutItem]\" />\n </div>\n @if (hasViewAll()) {\n <div class=\"ecl-layout-wrapper__view-all\">\n <ng-content select=\"[eclLayoutWrapperViewAll]\" />\n </div>\n }\n </div>\n</div>\n" }]
|
|
172
|
+
}], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], infoPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoPosition", required: false }] }], forcedColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "forcedColumn", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], fullHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullHeight", required: false }] }], hasViewAll: [{ type: i0.ContentChild, args: [i0.forwardRef(() => EclLayoutWrapperViewAllDirective), { isSignal: true }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => EclLayoutItemDirective), { isSignal: true }] }] } });
|
|
174
173
|
|
|
175
174
|
const EUI_ECL_LAYOUT_WRAPPER = [
|
|
176
175
|
EclLayoutWrapperComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-ecl-components-ecl-layout-wrapper.mjs","sources":["../../components/ecl-layout-wrapper/ecl-layout-wrapper.directives.ts","../../components/ecl-layout-wrapper/ecl-layout-wrapper.component.ts","../../components/ecl-layout-wrapper/ecl-layout-wrapper.component.html","../../components/ecl-layout-wrapper/index.ts","../../components/ecl-layout-wrapper/eui-ecl-components-ecl-layout-wrapper.ts"],"sourcesContent":["import { computed, Directive, ElementRef, inject, signal } from '@angular/core';\n\n/**\n * Directive for the layout wrapper title.\n * Applies the `ecl-layout-wrapper__title` class to the host element.\n *\n * @example\n * ```html\n * <h2 eclLayoutWrapperTitle>Heading</h2>\n * ```\n */\n@Directive({\n selector: '[eclLayoutWrapperTitle]',\n host: {\n class: 'ecl-layout-wrapper__title',\n },\n})\nexport class EclLayoutWrapperTitleDirective {}\n\n/**\n * Directive for the layout wrapper description.\n * Applies the `ecl-layout-wrapper__description` class to the host element.\n *\n * @example\n * ```html\n * <div eclLayoutWrapperDescription>Lorem ipsum...</div>\n * ```\n */\n@Directive({\n selector: '[eclLayoutWrapperDescription]',\n host: {\n class: 'ecl-layout-wrapper__description',\n },\n})\nexport class EclLayoutWrapperDescriptionDirective {}\n\n/**\n * Directive for the layout wrapper \"view all\" link.\n * Applies the `ecl-layout-wrapper__view-all-link` class to the link element.\n *\n * @example\n * ```html\n * <a eclLayoutWrapperViewAll eclLink [standalone]=\"true\" icon=\"arrow-left\">View all</a>\n * ```\n */\n@Directive({\n selector: '[eclLayoutWrapperViewAll]',\n host: {\n class: 'ecl-layout-wrapper__view-all-link',\n },\n})\nexport class EclLayoutWrapperViewAllDirective {}\n\n/**\n * Directive for individual items inside the layout wrapper grid.\n * Wraps each content element (e.g., card) and applies positional CSS classes.\n *\n * The index is automatically assigned by the parent `EclLayoutWrapperComponent`.\n *\n * @example\n * ```html\n * <div eclLayoutItem><article eclCard>...</article></div>\n * ```\n */\n@Directive({\n selector: '[eclLayoutItem]',\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclLayoutItemDirective {\n readonly el = inject(ElementRef);\n\n /** Positional index (1-based), assigned by the parent layout wrapper. */\n readonly index = signal(0);\n\n /** Computed CSS classes based on the assigned index. */\n readonly cssClasses = computed(() => {\n const idx = this.index();\n return idx > 0 ? `ecl-layout-item ecl-layout-item--${idx}` : 'ecl-layout-item';\n });\n}\n","import { Component, contentChild, contentChildren, effect, input, numberAttribute, booleanAttribute } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclLayoutItemDirective, EclLayoutWrapperViewAllDirective } from './ecl-layout-wrapper.directives';\n\n/**\n * ECL Layout Wrapper component.\n * Arranges projected content into a responsive grid layout with configurable columns.\n * Includes optional title, description, and \"view all\" link areas.\n *\n * @example\n * ```html\n * <section eclLayoutWrapper [columns]=\"3\" direction=\"horizontal\">\n * <h2 eclLayoutWrapperTitle>Heading</h2>\n * <div eclLayoutWrapperDescription>Description text</div>\n *\n * <div eclLayoutItem><article eclCard>...</article></div>\n * <div eclLayoutItem><article eclCard>...</article></div>\n * <div eclLayoutItem><article eclCard>...</article></div>\n *\n * <a eclLayoutWrapperViewAll eclLink [standalone]=\"true\" icon=\"arrow-left\">View all</a>\n * </section>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'div[eclLayoutWrapper]',\n templateUrl: './ecl-layout-wrapper.component.html',\n host: {\n '[class]': 'cssClasses',\n },\n // TODO: remove after ECL fix the usage of bootstrap classes (col-2, col-3, etc.)\n styles: [`\n :host(.col-2), :host(.col-3), :host(.col-4) {\n flex: unset;\n width: unset;\n max-width: unset;\n padding-right: unset;\n padding-left: unset;\n }\n `],\n})\nexport class EclLayoutWrapperComponent extends ECLBaseDirective {\n /** Number of columns for the grid layout. Accepts 2, 3, or 4. Defaults to 3. */\n columns = input(3, { transform: numberAttribute });\n\n /** Position of the info block (title + description). */\n infoPosition = input<'top' | 'side'>('top');\n\n /** Force column number instead of dynamic management. Use with caution. */\n forcedColumn = input(false, { transform: booleanAttribute });\n\n /** Flow of items. */\n direction = input<'horizontal' | 'vertical'>('horizontal');\n\n /** Display all the elements at full height. */\n fullHeight = input(true, { transform: booleanAttribute });\n\n /** Projected layout items that will be auto-indexed. */\n items = contentChildren(EclLayoutItemDirective);\n\n /** Whether a view-all link is projected. */\n hasViewAll = contentChild(EclLayoutWrapperViewAllDirective);\n\n /** Host CSS classes based on inputs. */\n // TODO: change this to computed, when the BaseDirective is migrated to signals.\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-layout-wrapper'),\n `col-${this.columns()}`,\n this.infoPosition() === 'side' ? 'ecl-layout-wrapper--info-side' : '',\n this.direction() === 'vertical' ? 'ecl-layout-wrapper--vertical' : '',\n this.fullHeight() ? '' : 'ecl-layout-wrapper--height-auto',\n this.forcedColumn() ? 'ecl-layout-wrapper--forced' : '',\n ].filter(Boolean).join(' ');\n }\n\n constructor() {\n super();\n effect(() => {\n const items = this.items();\n items.forEach((item, i) => item.index.set(i + 1));\n });\n }\n}\n","<div class=\"ecl-layout-wrapper__grid\">\n <div class=\"ecl-layout-wrapper__info\">\n <ng-content select=\"[eclLayoutWrapperTitle]\" />\n <ng-content select=\"[eclLayoutWrapperDescription]\" />\n </div>\n <div class=\"ecl-layout-wrapper__container\">\n <div class=\"ecl-layout-wrapper__content\">\n <ng-content select=\"[eclLayoutItem]\" />\n </div>\n @if (hasViewAll()) {\n <div class=\"ecl-layout-wrapper__view-all\">\n <ng-content select=\"[eclLayoutWrapperViewAll]\" />\n </div>\n }\n </div>\n</div>\n","import { EclLayoutWrapperComponent } from './ecl-layout-wrapper.component';\nimport {\n EclLayoutItemDirective,\n EclLayoutWrapperDescriptionDirective,\n EclLayoutWrapperTitleDirective,\n EclLayoutWrapperViewAllDirective,\n} from './ecl-layout-wrapper.directives';\n\nexport * from './ecl-layout-wrapper.component';\nexport * from './ecl-layout-wrapper.directives';\n\nexport const EUI_ECL_LAYOUT_WRAPPER = [\n EclLayoutWrapperComponent,\n EclLayoutItemDirective,\n EclLayoutWrapperTitleDirective,\n EclLayoutWrapperDescriptionDirective,\n EclLayoutWrapperViewAllDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;AAQG;MAOU,8BAA8B,CAAA;8GAA9B,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA9B,8BAA8B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,2BAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA9B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAN1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,2BAA2B;AACrC,qBAAA;AACJ,iBAAA;;AAGD;;;;;;;;AAQG;MAOU,oCAAoC,CAAA;8GAApC,oCAAoC,EAAA,IAAA,EAAA,EAAA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AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-layout-wrapper.mjs","sources":["../../components/ecl-layout-wrapper/ecl-layout-wrapper.directives.ts","../../components/ecl-layout-wrapper/ecl-layout-wrapper.component.ts","../../components/ecl-layout-wrapper/ecl-layout-wrapper.component.html","../../components/ecl-layout-wrapper/index.ts","../../components/ecl-layout-wrapper/eui-ecl-components-ecl-layout-wrapper.ts"],"sourcesContent":["import { computed, Directive, ElementRef, inject, signal } from '@angular/core';\n\n/**\n * Directive for the layout wrapper title.\n * Applies the `ecl-layout-wrapper__title` class to the host element.\n *\n * @example\n * ```html\n * <h2 eclLayoutWrapperTitle>Heading</h2>\n * ```\n */\n@Directive({\n selector: '[eclLayoutWrapperTitle]',\n host: {\n class: 'ecl-layout-wrapper__title',\n },\n})\nexport class EclLayoutWrapperTitleDirective {}\n\n/**\n * Directive for the layout wrapper description.\n * Applies the `ecl-layout-wrapper__description` class to the host element.\n *\n * @example\n * ```html\n * <div eclLayoutWrapperDescription>Lorem ipsum...</div>\n * ```\n */\n@Directive({\n selector: '[eclLayoutWrapperDescription]',\n host: {\n class: 'ecl-layout-wrapper__description',\n },\n})\nexport class EclLayoutWrapperDescriptionDirective {}\n\n/**\n * Directive for the layout wrapper \"view all\" link.\n * Applies the `ecl-layout-wrapper__view-all-link` class to the link element.\n *\n * @example\n * ```html\n * <a eclLayoutWrapperViewAll eclLink [standalone]=\"true\" icon=\"arrow-left\">View all</a>\n * ```\n */\n@Directive({\n selector: '[eclLayoutWrapperViewAll]',\n host: {\n class: 'ecl-layout-wrapper__view-all-link',\n },\n})\nexport class EclLayoutWrapperViewAllDirective {}\n\n/**\n * Directive for individual items inside the layout wrapper grid.\n * Wraps each content element (e.g., card) and applies positional CSS classes.\n *\n * The index is automatically assigned by the parent `EclLayoutWrapperComponent`.\n *\n * @example\n * ```html\n * <div eclLayoutItem><article eclCard>...</article></div>\n * ```\n */\n@Directive({\n selector: '[eclLayoutItem]',\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclLayoutItemDirective {\n\n /** Positional index (1-based), assigned by the parent layout wrapper. */\n readonly index = signal(0);\n\n /** Computed CSS classes based on the assigned index. */\n readonly cssClasses = computed(() => {\n const idx = this.index();\n return idx > 0 ? `ecl-layout-item ecl-layout-item--${idx}` : 'ecl-layout-item';\n });\n}\n","import { booleanAttribute, Component, contentChild, contentChildren, effect, input, numberAttribute } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclLayoutItemDirective, EclLayoutWrapperViewAllDirective } from './ecl-layout-wrapper.directives';\n\n/**\n * ECL Layout Wrapper component.\n * Arranges projected content into a responsive grid layout with configurable columns.\n * Includes optional title, description, and \"view all\" link areas.\n *\n * @example\n * ```html\n * <div eclLayoutWrapper [columns]=\"3\" direction=\"horizontal\">\n * <h2 eclLayoutWrapperTitle>Heading</h2>\n * <div eclLayoutWrapperDescription>Description text</div>\n *\n * <div eclLayoutItem><article eclCard>...</article></div>\n * <div eclLayoutItem><article eclCard>...</article></div>\n * <div eclLayoutItem><article eclCard>...</article></div>\n *\n * <a eclLayoutWrapperViewAll eclLink [standalone]=\"true\" icon=\"arrow-left\">View all</a>\n * </div>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'div[eclLayoutWrapper]',\n templateUrl: './ecl-layout-wrapper.component.html',\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclLayoutWrapperComponent extends ECLBaseDirective {\n /** Number of columns for the grid layout. Accepts 2, 3, or 4. Defaults to 3. */\n columns = input(3, { transform: numberAttribute });\n\n /** Position of the info block (title + description). */\n infoPosition = input<'top' | 'side'>('top');\n\n /** Force column number instead of dynamic management. Use with caution. */\n forcedColumn = input(false, { transform: booleanAttribute });\n\n /** Flow of items. */\n direction = input<'horizontal' | 'vertical'>('horizontal');\n\n /** Display all the elements at full height. */\n fullHeight = input(true, { transform: booleanAttribute });\n\n /** Whether a view-all link is projected. */\n protected hasViewAll = contentChild(EclLayoutWrapperViewAllDirective);\n\n /** Projected layout items that will be auto-indexed. */\n private items = contentChildren(EclLayoutItemDirective);\n\n /** Host CSS classes based on inputs. */\n // TODO: change this to computed, when the BaseDirective is migrated to signals.\n get cssClasses(): string {\n return [\n super.getCssClasses('ecl-layout-wrapper'),\n `ecl-layout-wrapper--col-${this.columns()}`,\n this.infoPosition() === 'side' ? 'ecl-layout-wrapper--info-side' : '',\n this.direction() === 'vertical' ? 'ecl-layout-wrapper--vertical' : '',\n this.fullHeight() ? '' : 'ecl-layout-wrapper--height-auto',\n this.forcedColumn() ? 'ecl-layout-wrapper--forced' : '',\n ].filter(Boolean).join(' ');\n }\n\n constructor() {\n super();\n effect(() => {\n const items = this.items();\n items.forEach((item, i) => item.index.set(i + 1));\n });\n }\n}\n","<div class=\"ecl-layout-wrapper__grid\">\n <div class=\"ecl-layout-wrapper__info\">\n <ng-content select=\"[eclLayoutWrapperTitle]\" />\n <ng-content select=\"[eclLayoutWrapperDescription]\" />\n </div>\n <div class=\"ecl-layout-wrapper__container\">\n <div class=\"ecl-layout-wrapper__content\">\n <ng-content select=\"[eclLayoutItem]\" />\n </div>\n @if (hasViewAll()) {\n <div class=\"ecl-layout-wrapper__view-all\">\n <ng-content select=\"[eclLayoutWrapperViewAll]\" />\n </div>\n }\n </div>\n</div>\n","import { EclLayoutWrapperComponent } from './ecl-layout-wrapper.component';\nimport {\n EclLayoutItemDirective,\n EclLayoutWrapperDescriptionDirective,\n EclLayoutWrapperTitleDirective,\n EclLayoutWrapperViewAllDirective,\n} from './ecl-layout-wrapper.directives';\n\nexport * from './ecl-layout-wrapper.component';\nexport * from './ecl-layout-wrapper.directives';\n\nexport const EUI_ECL_LAYOUT_WRAPPER = [\n EclLayoutWrapperComponent,\n EclLayoutItemDirective,\n EclLayoutWrapperTitleDirective,\n EclLayoutWrapperDescriptionDirective,\n EclLayoutWrapperViewAllDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"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