@eui/ecl 22.0.0-alpha.20 → 22.0.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/changelog.html +24 -0
- package/docs/components/EclAccordionSummaryComponent.html +1 -1
- package/docs/components/EclAddToCalendarComponent.html +1 -1
- package/docs/components/EclAnimatedNumbersComponent.html +1 -1
- package/docs/components/EclAnimatedNumbersItemComponent.html +1 -1
- package/docs/components/EclAppComponent.html +1 -1
- package/docs/components/EclBannerComponent.html +1 -1
- package/docs/components/EclBlockquoteComponent.html +1 -1
- package/docs/components/EclBreadcrumbComponent.html +1 -1
- package/docs/components/EclBreadcrumbSegmentComponent.html +1 -1
- package/docs/components/EclButtonComponent.html +1 -1
- package/docs/components/EclCardBodyComponent.html +1 -1
- package/docs/components/EclCardComponent.html +1 -1
- package/docs/components/EclCarouselComponent.html +1 -1
- package/docs/components/EclCarouselItemComponent.html +1 -1
- package/docs/components/EclCategoryFilterComponent.html +1 -1
- package/docs/components/EclCategoryFilterItemComponent.html +1 -1
- package/docs/components/EclCategoryFilterListComponent.html +1 -1
- package/docs/components/EclCheckboxHelpComponent.html +1 -1
- package/docs/components/EclCheckboxLabelComponent.html +1 -1
- package/docs/components/EclContentBlockComponent.html +1 -1
- package/docs/components/EclContentItemComponent.html +1 -1
- package/docs/components/EclDateBlockComponent.html +1 -1
- package/docs/components/EclDescriptionListDefinitionComponent.html +1 -1
- package/docs/components/EclExpandableComponent.html +1 -1
- package/docs/components/EclFactFiguresComponent.html +1 -1
- package/docs/components/EclFactFiguresItemComponent.html +1 -1
- package/docs/components/EclFactFiguresViewAllComponent.html +1 -1
- package/docs/components/EclFeaturedComponent.html +1 -1
- package/docs/components/EclFeaturedItemComponent.html +1 -1
- package/docs/components/EclFeaturedItemDescriptionComponent.html +1 -1
- package/docs/components/EclFileComponent.html +1 -1
- package/docs/components/EclFileItemComponent.html +1 -1
- package/docs/components/EclFileItemsComponent.html +1 -1
- package/docs/components/EclFileListsComponent.html +1 -1
- package/docs/components/EclFormGroupComponent.html +1 -1
- package/docs/components/EclFormLabelComponent.html +1 -1
- package/docs/components/EclGalleryComponent.html +1 -1
- package/docs/components/EclGalleryFooterComponent.html +1 -1
- package/docs/components/EclGalleryItemComponent.html +1 -1
- package/docs/components/EclHighlightBoxComponent.html +1 -1
- package/docs/components/EclHighlightedSearchComponent.html +1 -1
- package/docs/components/EclIconComponent.html +1 -1
- package/docs/components/EclIndicatorComponent-1.html +1 -1
- package/docs/components/EclIndicatorComponent.html +1 -1
- package/docs/components/EclInpageNavigationComponent.html +1 -1
- package/docs/components/EclInpageNavigationItemComponent.html +1 -1
- package/docs/components/EclLayoutWrapperComponent.html +1 -1
- package/docs/components/EclListIllustrationComponent.html +1 -1
- package/docs/components/EclListIllustrationItemComponent.html +1 -1
- package/docs/components/EclLoadingIndicatorComponent.html +1 -1
- package/docs/components/EclMediaContainerComponent.html +1 -1
- package/docs/components/EclMegaMenuComponent.html +1 -1
- package/docs/components/EclMegaMenuFeaturedComponent.html +1 -1
- package/docs/components/EclMegaMenuInfoComponent.html +1 -1
- package/docs/components/EclMegaMenuItemComponent.html +1 -1
- package/docs/components/EclMegaMenuSubitemComponent.html +1 -1
- package/docs/components/EclMenuComponent.html +1 -1
- package/docs/components/EclMenuItemComponent.html +1 -1
- package/docs/components/EclMenuMegaComponent.html +1 -1
- package/docs/components/EclMenuMegaItemComponent.html +1 -1
- package/docs/components/EclModalBodyComponent.html +1 -1
- package/docs/components/EclModalComponent.html +1 -1
- package/docs/components/EclModalFooterComponent.html +1 -1
- package/docs/components/EclModalHeaderComponent.html +1 -1
- package/docs/components/EclMultiselectComponent.html +1 -1
- package/docs/components/EclMultiselectDropdownComponent.html +4 -4
- package/docs/components/EclMultiselectInputComponent.html +1 -1
- package/docs/components/EclMultiselectOptgroupComponent.html +1 -1
- package/docs/components/EclMultiselectOptionComponent.html +1 -1
- package/docs/components/EclNavigationListComponent.html +5 -106
- package/docs/components/EclNavigationListItemComponent.html +15 -87
- package/docs/components/EclNewsTickerComponent.html +5 -40
- package/docs/components/EclNewsTickerItemComponent.html +6 -153
- package/docs/components/EclNotificationComponent.html +5 -122
- package/docs/components/EclPageHeaderComponent.html +5 -48
- package/docs/components/EclPageHeaderDescriptionContainerComponent.html +1 -1
- package/docs/components/EclPageHeaderExpandableComponent.html +5 -46
- package/docs/components/EclPageHeaderNextComponent.html +5 -48
- package/docs/components/EclPageHeaderSectionComponent.html +5 -117
- package/docs/components/EclPageHeaderSectionInfoComponent.html +5 -117
- package/docs/components/EclPageSummaryComponent.html +2 -15
- package/docs/components/EclPaginationComponent.html +5 -180
- package/docs/components/EclPaginationItemComponent.html +67 -184
- package/docs/components/EclPopoverComponent.html +1 -1
- package/docs/components/EclQuizCardComponent.html +1 -1
- package/docs/components/EclQuizComponent.html +1 -1
- package/docs/components/EclRadioHelpComponent.html +1 -1
- package/docs/components/EclRadioLabelComponent.html +1 -1
- package/docs/components/EclRangeBubbleComponent.html +1 -1
- package/docs/components/EclRangeValueComponent.html +1 -1
- package/docs/components/EclRatingFieldComponent.html +1 -1
- package/docs/components/EclSearchFormComponent.html +1 -1
- package/docs/components/EclSelectContainerComponent.html +1 -1
- package/docs/components/EclSiteFooterComponent.html +1 -1
- package/docs/components/EclSiteFooterCoownerComponent.html +1 -1
- package/docs/components/EclSiteFooterCoreComponent.html +1 -1
- package/docs/components/EclSiteFooterFeedbackComponent.html +1 -1
- package/docs/components/EclSiteFooterFixedContentEUComponent.html +1 -1
- package/docs/components/EclSiteFooterRowCommonComponent.html +1 -1
- package/docs/components/EclSiteHeaderActionComponent.html +1 -1
- package/docs/components/EclSiteHeaderBannerTopComponent.html +1 -1
- package/docs/components/EclSiteHeaderComponent.html +1 -1
- package/docs/components/EclSiteHeaderCustomActionComponent.html +1 -1
- package/docs/components/EclSiteHeaderEnvironmentComponent.html +1 -1
- package/docs/components/EclSiteHeaderLanguageComponent.html +1 -1
- package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +1 -1
- package/docs/components/EclSiteHeaderLoginComponent.html +1 -1
- package/docs/components/EclSiteHeaderNotificationComponent.html +1 -1
- package/docs/components/EclSiteHeaderSearchComponent.html +1 -1
- package/docs/components/EclSloganTickerComponent.html +1 -1
- package/docs/components/EclSocialMediaFollowComponent.html +1 -1
- package/docs/components/EclSocialMediaFollowItemComponent.html +1 -1
- package/docs/components/EclSplashPageComponent.html +1 -1
- package/docs/components/EclSplashPageLanguageCategoryComponent.html +1 -1
- package/docs/components/EclSplashPageLanguageContainerComponent.html +1 -1
- package/docs/components/EclSplashPageLanguageLinkComponent.html +1 -1
- package/docs/components/EclSpotlightComponent.html +1 -1
- package/docs/components/EclSpotlightLinkComponent.html +1 -1
- package/docs/components/EclStickyContainerComponent.html +1 -1
- package/docs/components/EclStoryCardComponent.html +1 -1
- package/docs/components/EclStoryCardGridDetailsComponent.html +1 -1
- package/docs/components/EclStoryCardItemComponent.html +1 -1
- package/docs/components/EclTabComponent.html +1 -1
- package/docs/components/EclTabLabelComponent.html +1 -1
- package/docs/components/EclTableSortButtonComponent.html +1 -1
- package/docs/components/EclTabsComponent.html +1 -1
- package/docs/components/EclTagComponent.html +1 -1
- package/docs/components/EclTextMediaComponent.html +1 -1
- package/docs/components/EclTimelineComponent.html +1 -1
- package/docs/components/EclTimelineItemComponent.html +1 -1
- package/docs/components/EclTimelineItemTogglerComponent.html +1 -1
- package/docs/directives/EclContainerDirective.html +0 -118
- package/docs/directives/EclNavigationListImageDirective.html +0 -39
- package/docs/directives/EclNavigationListPictureDirective.html +0 -39
- package/docs/directives/EclNewsTickerIconDirective.html +0 -116
- package/docs/directives/EclNotificationIconDirective.html +0 -61
- package/docs/directives/EclNotificationLinkDirective.html +0 -61
- package/docs/directives/EclNotificationTitleDirective.html +0 -45
- package/docs/directives/EclPageHeaderBackgroundImageDirective.html +0 -118
- package/docs/directives/EclPageHeaderBackgroundPictureDirective.html +0 -118
- package/docs/directives/EclPageHeaderContainerDirective.html +0 -118
- package/docs/directives/EclPageHeaderDescriptionDirective.html +0 -118
- package/docs/directives/EclPageHeaderDescriptionPictureDirective.html +0 -118
- package/docs/directives/EclPageHeaderDescriptionThumbnailDirective.html +0 -118
- package/docs/directives/EclPageHeaderExpandableHeaderDirective.html +0 -45
- package/docs/directives/EclPageHeaderInfoDirective.html +0 -118
- package/docs/directives/EclPageHeaderMetaDirective.html +0 -118
- package/docs/directives/EclPageHeaderMetaItemDirective.html +0 -99
- package/docs/directives/EclPageHeaderTitleDirective.html +0 -47
- package/docs/directives/EclPaginationListDirective.html +0 -116
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/EclPageSummaryComponent.md +1 -1
- package/docs/json/EclPaginationItemComponent.md +3 -3
- package/docs/json/documentation.json +631 -2084
- package/docs/llms.txt +7 -53
- package/docs/properties.html +1 -1
- package/fesm2022/eui-ecl-components-ecl-multiselect.mjs +27 -17
- package/fesm2022/eui-ecl-components-ecl-multiselect.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-navigation-list.mjs +54 -65
- package/fesm2022/eui-ecl-components-ecl-navigation-list.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs +19 -34
- package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-notification.mjs +23 -28
- package/fesm2022/eui-ecl-components-ecl-notification.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-page-header.mjs +90 -200
- package/fesm2022/eui-ecl-components-ecl-page-header.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-page-summary.mjs +3 -8
- package/fesm2022/eui-ecl-components-ecl-page-summary.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-pagination.mjs +28 -56
- package/fesm2022/eui-ecl-components-ecl-pagination.mjs.map +1 -1
- package/package.json +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-navigation-list.d.ts +10 -10
- package/types/eui-ecl-components-ecl-navigation-list.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-news-ticker.d.ts +4 -8
- package/types/eui-ecl-components-ecl-news-ticker.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-notification.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-page-header.d.ts +0 -68
- package/types/eui-ecl-components-ecl-page-header.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-page-summary.d.ts +1 -2
- package/types/eui-ecl-components-ecl-page-summary.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-pagination.d.ts +4 -21
- package/types/eui-ecl-components-ecl-pagination.d.ts.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Directive, contentChildren, forwardRef, inject, input, model, booleanAttribute, output, contentChild, computed, Component } from '@angular/core';
|
|
3
3
|
import { EclBaseEvent, ECLBaseDirective, EclThemeService } from '@eui/ecl/core';
|
|
4
4
|
import { AsyncPipe, TitleCasePipe } from '@angular/common';
|
|
5
5
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
@@ -29,17 +29,17 @@ class EclNotificationTitleDirective extends ECLBaseDirective {
|
|
|
29
29
|
return [super.getCssClasses('ecl-notification__title')].join(' ').trim();
|
|
30
30
|
}
|
|
31
31
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclNotificationTitleDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
32
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: EclNotificationTitleDirective, isStandalone: true, selector: "[eclNotificationTitle]", host: { properties: { "class": "
|
|
32
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: EclNotificationTitleDirective, isStandalone: true, selector: "[eclNotificationTitle]", host: { properties: { "class": "cssClasses" } }, usesInheritance: true, ngImport: i0 }); }
|
|
33
33
|
}
|
|
34
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclNotificationTitleDirective, decorators: [{
|
|
35
35
|
type: Directive,
|
|
36
36
|
args: [{
|
|
37
37
|
selector: '[eclNotificationTitle]',
|
|
38
|
+
host: {
|
|
39
|
+
'[class]': 'cssClasses',
|
|
40
|
+
},
|
|
38
41
|
}]
|
|
39
|
-
}]
|
|
40
|
-
type: HostBinding,
|
|
41
|
-
args: ['class']
|
|
42
|
-
}] } });
|
|
42
|
+
}] });
|
|
43
43
|
/**
|
|
44
44
|
* Directive that adds specific class for the notification icon. By default there are icons for all notification variants.
|
|
45
45
|
* This directive can be used, if user wants to use another icon.
|
|
@@ -52,17 +52,17 @@ class EclNotificationIconDirective {
|
|
|
52
52
|
this.hasClass = true;
|
|
53
53
|
}
|
|
54
54
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclNotificationIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
55
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: EclNotificationIconDirective, isStandalone: true, selector: "[eclNotificationIcon]", host: { properties: { "class.ecl-notification__icon": "
|
|
55
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: EclNotificationIconDirective, isStandalone: true, selector: "[eclNotificationIcon]", host: { properties: { "class.ecl-notification__icon": "hasClass" } }, ngImport: i0 }); }
|
|
56
56
|
}
|
|
57
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclNotificationIconDirective, decorators: [{
|
|
58
58
|
type: Directive,
|
|
59
59
|
args: [{
|
|
60
60
|
selector: '[eclNotificationIcon]',
|
|
61
|
+
host: {
|
|
62
|
+
'[class.ecl-notification__icon]': 'hasClass',
|
|
63
|
+
},
|
|
61
64
|
}]
|
|
62
|
-
}]
|
|
63
|
-
type: HostBinding,
|
|
64
|
-
args: ['class.ecl-notification__icon']
|
|
65
|
-
}] } });
|
|
65
|
+
}] });
|
|
66
66
|
/**
|
|
67
67
|
* Directive that adds specific class for the div around the notification link and the link itself.
|
|
68
68
|
*/
|
|
@@ -80,17 +80,17 @@ class EclNotificationLinkDirective {
|
|
|
80
80
|
this.eclLinkItems().forEach(item => item.class = 'ecl-notification__link-item');
|
|
81
81
|
}
|
|
82
82
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclNotificationLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
83
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.2", type: EclNotificationLinkDirective, isStandalone: true, selector: "[eclNotificationLink]", host: { properties: { "class.ecl-notification__link": "
|
|
83
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.2", type: EclNotificationLinkDirective, isStandalone: true, selector: "[eclNotificationLink]", host: { properties: { "class.ecl-notification__link": "hasClass" } }, queries: [{ propertyName: "eclLinkItems", predicate: i0.forwardRef(() => EclLinkDirective), isSignal: true }], ngImport: i0 }); }
|
|
84
84
|
}
|
|
85
85
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclNotificationLinkDirective, decorators: [{
|
|
86
86
|
type: Directive,
|
|
87
87
|
args: [{
|
|
88
88
|
selector: '[eclNotificationLink]',
|
|
89
|
+
host: {
|
|
90
|
+
'[class.ecl-notification__link]': 'hasClass',
|
|
91
|
+
},
|
|
89
92
|
}]
|
|
90
|
-
}], propDecorators: {
|
|
91
|
-
type: HostBinding,
|
|
92
|
-
args: ['class.ecl-notification__link']
|
|
93
|
-
}], eclLinkItems: [{ type: i0.ContentChildren, args: [forwardRef(() => EclLinkDirective), { isSignal: true }] }] } });
|
|
93
|
+
}], propDecorators: { eclLinkItems: [{ type: i0.ContentChildren, args: [forwardRef(() => EclLinkDirective), { isSignal: true }] }] } });
|
|
94
94
|
|
|
95
95
|
class EclNotificationComponent extends ECLBaseDirective {
|
|
96
96
|
constructor() {
|
|
@@ -183,7 +183,7 @@ class EclNotificationComponent extends ECLBaseDirective {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclNotificationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
186
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EclNotificationComponent, isStandalone: true, selector: "ecl-notification", inputs: { notificationTitle: { classPropertyName: "notificationTitle", publicName: "notificationTitle", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null }, isCloseable: { classPropertyName: "isCloseable", publicName: "isCloseable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isVisible: "isVisibleChange", close: "close" }, host: { properties: { "attr.role": "
|
|
186
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EclNotificationComponent, isStandalone: true, selector: "ecl-notification", inputs: { notificationTitle: { classPropertyName: "notificationTitle", publicName: "notificationTitle", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null }, isCloseable: { classPropertyName: "isCloseable", publicName: "isCloseable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isVisible: "isVisibleChange", close: "close" }, host: { properties: { "attr.role": "role", "class.ecl-u-d-none": "isHidden", "class": "cssClasses" } }, queries: [{ propertyName: "notificationCustomIcon", first: true, predicate: EclNotificationIconDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (!hasCustomIcon()) {\n@if( eclThemeService.isEC$ | async ){\n<ecl-icon size=\"l\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n} @else {\n<ecl-icon size=\"m\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n}\n} @else {\n<ng-content select=\"[eclNotificationIcon]\"></ng-content>\n}\n\n<div class=\"ecl-notification__content\">\n @if(isCloseable()){\n <button eclButton variant=\"tertiary\" class=\"ecl-notification__close ecl-button--neutral\" isIconOnly\n (click)=\"onCloseClick($event)\">\n <span eclButtonLabel>\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n }\n\n <ng-content select=\"[eclNotificationTitle]\"></ng-content>\n <div class=\"ecl-notification__description\"><ng-content></ng-content></div>\n</div>", dependencies: [{ kind: "component", type: i1.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { 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: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
187
187
|
}
|
|
188
188
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclNotificationComponent, decorators: [{
|
|
189
189
|
type: Component,
|
|
@@ -193,17 +193,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
193
193
|
...EUI_ECL_ICON,
|
|
194
194
|
...EUI_ECL_BUTTON,
|
|
195
195
|
TranslatePipe,
|
|
196
|
-
],
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
args: ['class.ecl-u-d-none']
|
|
203
|
-
}], cssClasses: [{
|
|
204
|
-
type: HostBinding,
|
|
205
|
-
args: ['class']
|
|
206
|
-
}] } });
|
|
196
|
+
], host: {
|
|
197
|
+
'[attr.role]': 'role',
|
|
198
|
+
'[class.ecl-u-d-none]': 'isHidden',
|
|
199
|
+
'[class]': 'cssClasses',
|
|
200
|
+
}, template: "@if (!hasCustomIcon()) {\n@if( eclThemeService.isEC$ | async ){\n<ecl-icon size=\"l\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n} @else {\n<ecl-icon size=\"m\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n}\n} @else {\n<ng-content select=\"[eclNotificationIcon]\"></ng-content>\n}\n\n<div class=\"ecl-notification__content\">\n @if(isCloseable()){\n <button eclButton variant=\"tertiary\" class=\"ecl-notification__close ecl-button--neutral\" isIconOnly\n (click)=\"onCloseClick($event)\">\n <span eclButtonLabel>\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n }\n\n <ng-content select=\"[eclNotificationTitle]\"></ng-content>\n <div class=\"ecl-notification__description\"><ng-content></ng-content></div>\n</div>" }]
|
|
201
|
+
}], propDecorators: { notificationTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "notificationTitle", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], isVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isVisible", required: false }] }, { type: i0.Output, args: ["isVisibleChange"] }], isCloseable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCloseable", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], notificationCustomIcon: [{ type: i0.ContentChild, args: [i0.forwardRef(() => EclNotificationIconDirective), { isSignal: true }] }] } });
|
|
207
202
|
|
|
208
203
|
const EUI_ECL_NOTIFICATION = [
|
|
209
204
|
EclNotificationComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-ecl-components-ecl-notification.mjs","sources":["../../components/ecl-notification/events/ecl-notification-close.event.ts","../../components/ecl-notification/ecl-notification-title.directive.ts","../../components/ecl-notification/ecl-notification.component.ts","../../components/ecl-notification/ecl-notification.component.html","../../components/ecl-notification/index.ts","../../components/ecl-notification/eui-ecl-components-ecl-notification.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\n\n/**\n * Event emitted when the notification is closed.\n *\n * Can be used to prevent default close behavior by calling `event.preventDefault()`.\n */\nexport class EclNotificationCloseEvent extends EclBaseEvent {\n}\n","import { AfterContentInit, contentChildren, Directive, forwardRef, HostBinding } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclLinkDirective } from '@eui/ecl/components/ecl-link';\n\n/**\n * Directive applied to a notification title element.\n * Adds the appropriate ECL class for styling the notification title.\n */\n@Directive({\n selector: '[eclNotificationTitle]',\n})\nexport class EclNotificationTitleDirective extends ECLBaseDirective {\n /**\n * Host binding for applying the ECL notification title CSS class.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-notification__title')].join(' ').trim();\n }\n}\n\n/**\n * Directive that adds specific class for the notification icon. By default there are icons for all notification variants.\n * This directive can be used, if user wants to use another icon.\n */\n@Directive({\n selector: '[eclNotificationIcon]',\n})\nexport class EclNotificationIconDirective {\n /**\n * Host binding for applying the ECL notification icon CSS class.\n */\n @HostBinding('class.ecl-notification__icon') hasClass = true;\n}\n\n/**\n * Directive that adds specific class for the div around the notification link and the link itself.\n */\n@Directive({\n selector: '[eclNotificationLink]',\n})\nexport class EclNotificationLinkDirective implements AfterContentInit {\n /**\n * Host binding for applying the ECL notification link CSS class.\n */\n @HostBinding('class.ecl-notification__link') hasClass = true;\n\n eclLinkItems = contentChildren(forwardRef(() => EclLinkDirective));\n \n ngAfterContentInit(): void {\n // Add required class for all the child eclLinks.\n this.eclLinkItems().forEach(item => item.class = 'ecl-notification__link-item');\n }\n}\n","import { Component, HostBinding, booleanAttribute, inject, contentChild, computed, output, input, model } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclThemeService } from '@eui/ecl/core';\nimport { EclNotificationCloseEvent } from './events/ecl-notification-close.event';\nimport { AsyncPipe, TitleCasePipe } from '@angular/common';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclNotificationIconDirective } from './ecl-notification-title.directive';\n\n@Component({\n selector: 'ecl-notification',\n templateUrl: './ecl-notification.component.html',\n imports: [\n AsyncPipe,\n TitleCasePipe,\n ...EUI_ECL_ICON,\n ...EUI_ECL_BUTTON,\n TranslatePipe,\n ],\n})\nexport class EclNotificationComponent extends ECLBaseDirective {\n eclThemeService = inject(EclThemeService);\n\n /**\n * The title of the notification. This is displayed inside the component.\n */\n readonly notificationTitle = input<string>(undefined);\n\n /**\n * Defines the visual style of the notification.\n * Can be one of: 'info' | 'success' | 'warning' | 'error'.\n * Default is 'info'.\n */\n readonly variant = input<'info' | 'success' | 'warning' | 'error'>('info');\n\n /**\n * Controls the visibility of the notification.\n * When false, the component is hidden using CSS utility class.\n */\n readonly isVisible = model(true);\n\n /**\n * Indicates whether the close button is displayed.\n */\n readonly isCloseable = input(true, { transform: booleanAttribute });\n\n /**\n * Emits an event when the close button is clicked.\n * Consumers can call `preventDefault()` on the emitted event to prevent the notification from closing.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly close = output<EclNotificationCloseEvent>();\n\n /**\n * The ARIA role for the component. Set to \"alert\" by default.\n */\n @HostBinding('attr.role') role = 'alert';\n\n notificationCustomIcon = contentChild(EclNotificationIconDirective);\n readonly hasCustomIcon = computed(() => this.notificationCustomIcon() !== undefined);\n\n private variantTitleIconMapping = new Map<string, { title: string, icon: string }>([\n ['info', { title: 'information', icon: 'information-outline' }],\n ['success', { title: 'success', icon: 'success-outline' }],\n ['warning', { title: 'warning', icon: 'warning-outline' }],\n ['error', { title: 'error', icon: 'error-outline' }],\n ]);\n\n /**\n * Applies the `ecl-u-d-none` utility class when the notification is not visible.\n */\n @HostBinding('class.ecl-u-d-none')\n get isHidden(): boolean {\n return !this.isVisible();\n }\n\n /**\n * Computes the CSS classes applied to the host element, including the modifier for the current variant.\n */\n @HostBinding('class')\n get cssClasses(): string {\n const variant = this.variant();\n return [super.getCssClasses('ecl-notification'), variant ? `ecl-notification--${variant}` : ''].join(' ').trim();\n }\n\n /**\n * Returns the default title text based on the current variant.\n */\n get title(): string {\n return this.titleAndIconBaseOnVariant.title;\n }\n\n /**\n * Returns the icon name based on the current variant.\n */\n get icon(): string {\n return this.titleAndIconBaseOnVariant.icon;\n }\n\n /**\n * Returns a mapping of title and icon based on the current variant.\n */\n get titleAndIconBaseOnVariant(): { title: string, icon: string } {\n return this.variantTitleIconMapping.get(this.variant()) || { title: 'information', icon: 'information' };\n }\n\n /**\n * Handles the click event on the close button.\n * Emits a `close` event with an instance of `EclNotificationCloseEvent`.\n * If the event is not prevented, the notification is hidden.\n */\n onCloseClick(evt: Event): void {\n const event = new EclNotificationCloseEvent();\n this.close.emit(event);\n if (!event.defaultPrevented) {\n this.isVisible.set(false);\n }\n }\n}\n","@if (!hasCustomIcon()) {\n@if( eclThemeService.isEC$ | async ){\n<ecl-icon size=\"l\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n} @else {\n<ecl-icon size=\"m\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n}\n} @else {\n<ng-content select=\"[eclNotificationIcon]\"></ng-content>\n}\n\n<div class=\"ecl-notification__content\">\n @if(isCloseable()){\n <button eclButton variant=\"tertiary\" class=\"ecl-notification__close ecl-button--neutral\" isIconOnly\n (click)=\"onCloseClick($event)\">\n <span eclButtonLabel>\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n }\n\n <ng-content select=\"[eclNotificationTitle]\"></ng-content>\n <div class=\"ecl-notification__description\"><ng-content></ng-content></div>\n</div>","import { EclNotificationComponent } from './ecl-notification.component';\nimport { EclNotificationIconDirective, EclNotificationLinkDirective, EclNotificationTitleDirective } from './ecl-notification-title.directive';\n\nexport * from './ecl-notification.component';\nexport * from './ecl-notification-title.directive';\nexport * from './events/ecl-notification-close.event';\n\nexport const EUI_ECL_NOTIFICATION = [\n EclNotificationComponent,\n EclNotificationTitleDirective,\n EclNotificationIconDirective,\n EclNotificationLinkDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEA;;;;AAIG;AACG,MAAO,yBAA0B,SAAQ,YAAY,CAAA;AAC1D;;ACJD;;;AAGG;AAIG,MAAO,6BAA8B,SAAQ,gBAAgB,CAAA;AAC/D;;AAEG;AACH,IAAA,IACI,UAAU,GAAA;AACV,QAAA,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IAC5E;8GAPS,6BAA6B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,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AEG;;;;"}
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-notification.mjs","sources":["../../components/ecl-notification/events/ecl-notification-close.event.ts","../../components/ecl-notification/ecl-notification-title.directive.ts","../../components/ecl-notification/ecl-notification.component.ts","../../components/ecl-notification/ecl-notification.component.html","../../components/ecl-notification/index.ts","../../components/ecl-notification/eui-ecl-components-ecl-notification.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\n\n/**\n * Event emitted when the notification is closed.\n *\n * Can be used to prevent default close behavior by calling `event.preventDefault()`.\n */\nexport class EclNotificationCloseEvent extends EclBaseEvent {\n}\n","import { AfterContentInit, contentChildren, Directive, forwardRef } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclLinkDirective } from '@eui/ecl/components/ecl-link';\n\n/**\n * Directive applied to a notification title element.\n * Adds the appropriate ECL class for styling the notification title.\n */\n@Directive({\n selector: '[eclNotificationTitle]',\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclNotificationTitleDirective extends ECLBaseDirective {\n /**\n * Host binding for applying the ECL notification title CSS class.\n */\n get cssClasses(): string {\n return [super.getCssClasses('ecl-notification__title')].join(' ').trim();\n }\n}\n\n/**\n * Directive that adds specific class for the notification icon. By default there are icons for all notification variants.\n * This directive can be used, if user wants to use another icon.\n */\n@Directive({\n selector: '[eclNotificationIcon]',\n host: {\n '[class.ecl-notification__icon]': 'hasClass',\n },\n})\nexport class EclNotificationIconDirective {\n /**\n * Host binding for applying the ECL notification icon CSS class.\n */\n hasClass = true;\n}\n\n/**\n * Directive that adds specific class for the div around the notification link and the link itself.\n */\n@Directive({\n selector: '[eclNotificationLink]',\n host: {\n '[class.ecl-notification__link]': 'hasClass',\n },\n})\nexport class EclNotificationLinkDirective implements AfterContentInit {\n /**\n * Host binding for applying the ECL notification link CSS class.\n */\n hasClass = true;\n\n eclLinkItems = contentChildren(forwardRef(() => EclLinkDirective));\n \n ngAfterContentInit(): void {\n // Add required class for all the child eclLinks.\n this.eclLinkItems().forEach(item => item.class = 'ecl-notification__link-item');\n }\n}\n","import { Component, booleanAttribute, inject, contentChild, computed, output, input, model } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclThemeService } from '@eui/ecl/core';\nimport { EclNotificationCloseEvent } from './events/ecl-notification-close.event';\nimport { AsyncPipe, TitleCasePipe } from '@angular/common';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclNotificationIconDirective } from './ecl-notification-title.directive';\n\n@Component({\n selector: 'ecl-notification',\n templateUrl: './ecl-notification.component.html',\n imports: [\n AsyncPipe,\n TitleCasePipe,\n ...EUI_ECL_ICON,\n ...EUI_ECL_BUTTON,\n TranslatePipe,\n ],\n host: {\n '[attr.role]': 'role',\n '[class.ecl-u-d-none]': 'isHidden',\n '[class]': 'cssClasses',\n },\n})\nexport class EclNotificationComponent extends ECLBaseDirective {\n eclThemeService = inject(EclThemeService);\n\n /**\n * The title of the notification. This is displayed inside the component.\n */\n readonly notificationTitle = input<string>(undefined);\n\n /**\n * Defines the visual style of the notification.\n * Can be one of: 'info' | 'success' | 'warning' | 'error'.\n * Default is 'info'.\n */\n readonly variant = input<'info' | 'success' | 'warning' | 'error'>('info');\n\n /**\n * Controls the visibility of the notification.\n * When false, the component is hidden using CSS utility class.\n */\n readonly isVisible = model(true);\n\n /**\n * Indicates whether the close button is displayed.\n */\n readonly isCloseable = input(true, { transform: booleanAttribute });\n\n /**\n * Emits an event when the close button is clicked.\n * Consumers can call `preventDefault()` on the emitted event to prevent the notification from closing.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly close = output<EclNotificationCloseEvent>();\n\n /**\n * The ARIA role for the component. Set to \"alert\" by default.\n */\n role = 'alert';\n\n notificationCustomIcon = contentChild(EclNotificationIconDirective);\n readonly hasCustomIcon = computed(() => this.notificationCustomIcon() !== undefined);\n\n private variantTitleIconMapping = new Map<string, { title: string, icon: string }>([\n ['info', { title: 'information', icon: 'information-outline' }],\n ['success', { title: 'success', icon: 'success-outline' }],\n ['warning', { title: 'warning', icon: 'warning-outline' }],\n ['error', { title: 'error', icon: 'error-outline' }],\n ]);\n\n /**\n * Applies the `ecl-u-d-none` utility class when the notification is not visible.\n */\n get isHidden(): boolean {\n return !this.isVisible();\n }\n\n /**\n * Computes the CSS classes applied to the host element, including the modifier for the current variant.\n */\n get cssClasses(): string {\n const variant = this.variant();\n return [super.getCssClasses('ecl-notification'), variant ? `ecl-notification--${variant}` : ''].join(' ').trim();\n }\n\n /**\n * Returns the default title text based on the current variant.\n */\n get title(): string {\n return this.titleAndIconBaseOnVariant.title;\n }\n\n /**\n * Returns the icon name based on the current variant.\n */\n get icon(): string {\n return this.titleAndIconBaseOnVariant.icon;\n }\n\n /**\n * Returns a mapping of title and icon based on the current variant.\n */\n get titleAndIconBaseOnVariant(): { title: string, icon: string } {\n return this.variantTitleIconMapping.get(this.variant()) || { title: 'information', icon: 'information' };\n }\n\n /**\n * Handles the click event on the close button.\n * Emits a `close` event with an instance of `EclNotificationCloseEvent`.\n * If the event is not prevented, the notification is hidden.\n */\n onCloseClick(evt: Event): void {\n const event = new EclNotificationCloseEvent();\n this.close.emit(event);\n if (!event.defaultPrevented) {\n this.isVisible.set(false);\n }\n }\n}\n","@if (!hasCustomIcon()) {\n@if( eclThemeService.isEC$ | async ){\n<ecl-icon size=\"l\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n} @else {\n<ecl-icon size=\"m\" class=\"ecl-notification__icon\" [icon]=\"icon\" [title]=\"title | titlecase \"></ecl-icon>\n}\n} @else {\n<ng-content select=\"[eclNotificationIcon]\"></ng-content>\n}\n\n<div class=\"ecl-notification__content\">\n @if(isCloseable()){\n <button eclButton variant=\"tertiary\" class=\"ecl-notification__close ecl-button--neutral\" isIconOnly\n (click)=\"onCloseClick($event)\">\n <span eclButtonLabel>\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n </button>\n }\n\n <ng-content select=\"[eclNotificationTitle]\"></ng-content>\n <div class=\"ecl-notification__description\"><ng-content></ng-content></div>\n</div>","import { EclNotificationComponent } from './ecl-notification.component';\nimport { EclNotificationIconDirective, EclNotificationLinkDirective, EclNotificationTitleDirective } from './ecl-notification-title.directive';\n\nexport * from './ecl-notification.component';\nexport * from './ecl-notification-title.directive';\nexport * from './events/ecl-notification-close.event';\n\nexport const EUI_ECL_NOTIFICATION = [\n EclNotificationComponent,\n EclNotificationTitleDirective,\n EclNotificationIconDirective,\n EclNotificationLinkDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEA;;;;AAIG;AACG,MAAO,yBAA0B,SAAQ,YAAY,CAAA;AAC1D;;ACJD;;;AAGG;AAOG,MAAO,6BAA8B,SAAQ,gBAAgB,CAAA;AAC/D;;AAEG;AACH,IAAA,IAAI,UAAU,GAAA;AACV,QAAA,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IAC5E;8GANS,6BAA6B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,YAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,E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