@eui/ecl 22.0.0-alpha.1 → 22.0.0-alpha.10
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 +527 -0
- package/docs/components/EclCategoryFilterComponent.html +23 -187
- package/docs/components/EclCategoryFilterItemComponent.html +111 -274
- package/docs/components/EclCategoryFilterListComponent.html +9 -225
- package/docs/components/EclDateBlockComponent.html +0 -9
- package/docs/components/EclDescriptionListDefinitionComponent.html +6 -44
- package/docs/components/EclIconComponent.html +1 -1
- package/docs/components/EclListIllustrationComponent.html +0 -171
- package/docs/components/EclListIllustrationItemComponent.html +77 -83
- package/docs/components/EclLoadingIndicatorComponent.html +4 -91
- package/docs/components/EclMegaMenuComponent.html +5 -203
- package/docs/components/EclMegaMenuFeaturedComponent.html +10 -126
- package/docs/components/EclMegaMenuInfoComponent.html +0 -91
- package/docs/components/EclMegaMenuItemComponent.html +38 -115
- package/docs/components/EclMegaMenuSubitemComponent.html +4 -68
- package/docs/components/EclMenuItemComponent.html +46 -0
- package/docs/components/EclSiteFooterRowCommonComponent.html +1 -1
- package/docs/components/EclSiteHeaderLanguageComponent.html +5 -627
- package/docs/components/EclSiteHeaderLanguagePopoverComponent.html +99 -440
- package/docs/components/EclSiteHeaderLoginComponent.html +9 -453
- package/docs/components/EclSiteHeaderSearchComponent.html +18 -470
- package/docs/components/EclSocialMediaFollowComponent.html +28 -39
- package/docs/components/EclSocialMediaFollowItemComponent.html +26 -129
- package/docs/components/EclStoryCardComponent.html +1 -1
- package/docs/directives/ECLClickOutsideDirective.html +3 -0
- package/docs/directives/EclDescriptionListDefinitionItemDirective.html +6 -47
- package/docs/directives/EclDescriptionListDefinitionListDirective.html +0 -116
- package/docs/directives/EclDividerDirective.html +0 -116
- package/docs/directives/EclFileUploadDirective.html +2 -390
- package/docs/directives/EclLabelDirective.html +0 -46
- package/docs/directives/EclLinkDirective.html +0 -39
- package/docs/directives/EclLoadingIndicatorLabelDirective.html +0 -61
- package/docs/directives/EclLoadingIndicatorOverlayDirective.html +0 -45
- package/docs/directives/EclMediaContainerCaptionDirective.html +0 -39
- package/docs/directives/EclMediaContainerCreditDirective.html +0 -39
- package/docs/directives/EclMediaContainerIframeDirective.html +13 -19
- package/docs/directives/EclMediaContainerItemAudioDescriptionDirective.html +0 -39
- package/docs/directives/EclMediaContainerItemDirective.html +0 -39
- package/docs/directives/EclMediaContainerPictureDirective.html +0 -39
- package/docs/directives/EclMegaMenuContainerDirective.html +0 -104
- package/docs/directives/EclMegaMenuFeaturedImageDirective.html +0 -104
- package/docs/directives/EclMegaMenuFeaturedListDirective.html +0 -104
- package/docs/directives/EclMegaMenuFeaturedListItemDescriptionDirective.html +0 -104
- package/docs/directives/EclMegaMenuFeaturedListItemDirective.html +0 -104
- package/docs/directives/EclMegaMenuFeaturedPictureDirective.html +0 -39
- package/docs/directives/EclMegaMenuListDirective.html +0 -104
- package/docs/directives/EclMegaMenuSpacerDirective.html +0 -104
- package/docs/directives/EclMegaMenuSublistDirective.html +0 -165
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/EclIconComponent.md +1 -1
- package/docs/json/EclMediaContainerIframeDirective.md +0 -1
- package/docs/json/EclSiteHeaderLanguagePopoverComponent.md +6 -6
- package/docs/json/EclSiteHeaderSearchComponent.md +1 -0
- package/docs/json/EclSocialMediaFollowComponent.md +1 -0
- package/docs/json/documentation.json +1317 -2896
- package/docs/llms.txt +30 -90
- package/docs/miscellaneous/variables.html +222 -41
- package/docs/properties.html +1 -1
- package/fesm2022/eui-ecl-components-ecl-category-filter.mjs +94 -129
- package/fesm2022/eui-ecl-components-ecl-category-filter.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-date-block.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-date-block.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-divider.mjs +6 -13
- package/fesm2022/eui-ecl-components-ecl-divider.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-file-upload.mjs +13 -27
- package/fesm2022/eui-ecl-components-ecl-file-upload.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-icon.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs +55 -9
- package/fesm2022/eui-ecl-components-ecl-inpage-navigation.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-label.mjs +6 -6
- package/fesm2022/eui-ecl-components-ecl-label.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-link.mjs +10 -13
- package/fesm2022/eui-ecl-components-ecl-link.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-list-illustration.mjs +19 -30
- package/fesm2022/eui-ecl-components-ecl-list-illustration.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-list.mjs +44 -41
- package/fesm2022/eui-ecl-components-ecl-list.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-loading-indicator.mjs +17 -20
- package/fesm2022/eui-ecl-components-ecl-loading-indicator.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-media-container.mjs +36 -33
- package/fesm2022/eui-ecl-components-ecl-media-container.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs +100 -159
- package/fesm2022/eui-ecl-components-ecl-mega-menu.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-menu.mjs +16 -3
- package/fesm2022/eui-ecl-components-ecl-menu.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-site-footer.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs +326 -261
- package/fesm2022/eui-ecl-components-ecl-site-header.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs +17 -17
- package/fesm2022/eui-ecl-components-ecl-social-media-follow.mjs.map +1 -1
- package/fesm2022/eui-ecl-components-ecl-story-card.mjs +2 -2
- package/fesm2022/eui-ecl-components-ecl-story-card.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eui-ecl-components-ecl-category-filter.d.ts +32 -56
- package/types/eui-ecl-components-ecl-category-filter.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-date-block.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-divider.d.ts +0 -4
- package/types/eui-ecl-components-ecl-divider.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-file-upload.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-inpage-navigation.d.ts +25 -0
- package/types/eui-ecl-components-ecl-inpage-navigation.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-label.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-link.d.ts +2 -4
- package/types/eui-ecl-components-ecl-link.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-list-illustration.d.ts +3 -3
- package/types/eui-ecl-components-ecl-list-illustration.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-list.d.ts +9 -12
- package/types/eui-ecl-components-ecl-list.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-loading-indicator.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-media-container.d.ts +7 -2
- package/types/eui-ecl-components-ecl-media-container.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-mega-menu.d.ts +12 -22
- package/types/eui-ecl-components-ecl-mega-menu.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-menu.d.ts +12 -1
- package/types/eui-ecl-components-ecl-menu.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-site-header.d.ts +240 -216
- package/types/eui-ecl-components-ecl-site-header.d.ts.map +1 -1
- package/types/eui-ecl-components-ecl-social-media-follow.d.ts +5 -3
- package/types/eui-ecl-components-ecl-social-media-follow.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, EventEmitter, contentChild, forwardRef,
|
|
3
|
-
import { Subject,
|
|
2
|
+
import { input, EventEmitter, signal, contentChild, forwardRef, Output, Input, Component, contentChildren, effect, untracked } from '@angular/core';
|
|
3
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
4
4
|
import { EclBaseEvent, ECLBaseDirective } from '@eui/ecl/core';
|
|
5
5
|
import * as i1 from '@eui/ecl/components/ecl-icon';
|
|
6
6
|
import { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';
|
|
@@ -33,22 +33,10 @@ class EclCategoryFilterItemComponent extends ECLBaseDirective {
|
|
|
33
33
|
* Emits when the item is selected by the user (clicked).
|
|
34
34
|
*/
|
|
35
35
|
this.itemSelect = new EventEmitter();
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Defines the ARIA role for the list item. Always set to "listitem".
|
|
42
|
-
*/
|
|
43
|
-
this.role = 'listitem';
|
|
44
|
-
/**
|
|
45
|
-
* Indicates whether the item is currently expanded (open).
|
|
46
|
-
*/
|
|
47
|
-
this.isExpanded = false;
|
|
48
|
-
/**
|
|
49
|
-
* Indicates whether the item is currently selected.
|
|
50
|
-
*/
|
|
51
|
-
this.isCurrent = false;
|
|
36
|
+
this._isExpanded = signal(false, /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "_isExpanded" }] : /* istanbul ignore next */ []));
|
|
38
|
+
this._isCurrent = signal(false, /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "_isCurrent" }] : /* istanbul ignore next */ []));
|
|
52
40
|
/**
|
|
53
41
|
* Child list component if the item has nested children.
|
|
54
42
|
*/
|
|
@@ -56,10 +44,24 @@ class EclCategoryFilterItemComponent extends ECLBaseDirective {
|
|
|
56
44
|
...(ngDevMode ? [{ debugName: "eclCategoryList" }] : /* istanbul ignore next */ []));
|
|
57
45
|
}
|
|
58
46
|
/**
|
|
59
|
-
*
|
|
47
|
+
* Whether the item is currently expanded (open).
|
|
48
|
+
* Backed by a signal so that parent mutations trigger template updates.
|
|
49
|
+
*/
|
|
50
|
+
get isExpanded() {
|
|
51
|
+
return this._isExpanded();
|
|
52
|
+
}
|
|
53
|
+
set isExpanded(value) {
|
|
54
|
+
this._isExpanded.set(value);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Whether the item is currently selected.
|
|
58
|
+
* Backed by a signal so that parent mutations trigger template updates.
|
|
60
59
|
*/
|
|
61
|
-
get
|
|
62
|
-
return this.
|
|
60
|
+
get isCurrent() {
|
|
61
|
+
return this._isCurrent();
|
|
62
|
+
}
|
|
63
|
+
set isCurrent(value) {
|
|
64
|
+
this._isCurrent.set(value);
|
|
63
65
|
}
|
|
64
66
|
/**
|
|
65
67
|
* Returns the hierarchical level of the item within the tree.
|
|
@@ -115,7 +117,7 @@ class EclCategoryFilterItemComponent extends ECLBaseDirective {
|
|
|
115
117
|
* Prevents navigation if no `href` is defined.
|
|
116
118
|
*/
|
|
117
119
|
onItemClick(evt) {
|
|
118
|
-
this.
|
|
120
|
+
this.isExpanded = !this.isExpanded;
|
|
119
121
|
this.isCurrent = true;
|
|
120
122
|
this.itemSelect.next(new EclCategoryFilterItemSelectEvent(this));
|
|
121
123
|
if (!this.href()) {
|
|
@@ -123,9 +125,6 @@ class EclCategoryFilterItemComponent extends ECLBaseDirective {
|
|
|
123
125
|
}
|
|
124
126
|
evt.stopPropagation();
|
|
125
127
|
}
|
|
126
|
-
toggleExpanded() {
|
|
127
|
-
this.isExpanded = !this.isExpanded;
|
|
128
|
-
}
|
|
129
128
|
updateChildListLevel(value) {
|
|
130
129
|
const eclCategoryList = this.eclCategoryList();
|
|
131
130
|
if (eclCategoryList) {
|
|
@@ -133,40 +132,27 @@ class EclCategoryFilterItemComponent extends ECLBaseDirective {
|
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
134
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclCategoryFilterItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
136
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EclCategoryFilterItemComponent, isStandalone: true, selector: "ecl-category-filter-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect" }, host: { properties: { "class.ecl-category-filter__list-item": "
|
|
135
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EclCategoryFilterItemComponent, isStandalone: true, selector: "ecl-category-filter-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect" }, host: { attributes: { "role": "listitem" }, properties: { "class.ecl-category-filter__list-item--open": "hasChildren ? isExpanded : null" }, classAttribute: "ecl-category-filter__list-item" }, queries: [{ propertyName: "eclCategoryList", first: true, predicate: i0.forwardRef(() => EclCategoryFilterListComponent), descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (hasChildren) {\n <button\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent\"\n [attr.aria-current]=\"isCurrent ? true : null\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"eclCategoryList()?.id\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n @if(isRootItemWithChildren) {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </button>\n} @else {\n <a\n [href]=\"href()\"\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent\"\n [attr.aria-current]=\"isCurrent ? true : null\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n @if(isRootItemWithChildren) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </a>\n}\n<ng-content select=\"ecl-category-filter-list\"></ng-content>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }] }); }
|
|
137
136
|
}
|
|
138
137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclCategoryFilterItemComponent, decorators: [{
|
|
139
138
|
type: Component,
|
|
140
139
|
args: [{ selector: 'ecl-category-filter-item', imports: [
|
|
141
140
|
NgTemplateOutlet,
|
|
142
141
|
...EUI_ECL_ICON,
|
|
143
|
-
],
|
|
142
|
+
], host: {
|
|
143
|
+
'class': 'ecl-category-filter__list-item',
|
|
144
|
+
'role': 'listitem',
|
|
145
|
+
'[class.ecl-category-filter__list-item--open]': 'hasChildren ? isExpanded : null',
|
|
146
|
+
}, template: "@if (hasChildren) {\n <button\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent\"\n [attr.aria-current]=\"isCurrent ? true : null\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"eclCategoryList()?.id\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n @if(isRootItemWithChildren) {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </button>\n} @else {\n <a\n [href]=\"href()\"\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent\"\n [attr.aria-current]=\"isCurrent ? true : null\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n @if(isRootItemWithChildren) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </a>\n}\n<ng-content select=\"ecl-category-filter-list\"></ng-content>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n" }]
|
|
144
147
|
}], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], id: [{
|
|
145
148
|
type: Input
|
|
146
149
|
}], itemSelect: [{
|
|
147
150
|
type: Output
|
|
148
|
-
}], className: [{
|
|
149
|
-
type: HostBinding,
|
|
150
|
-
args: ['class.ecl-category-filter__list-item']
|
|
151
|
-
}], role: [{
|
|
152
|
-
type: HostBinding,
|
|
153
|
-
args: ['attr.role']
|
|
154
|
-
}], isAriaExpanded: [{
|
|
155
|
-
type: HostBinding,
|
|
156
|
-
args: ['class.ecl-category-filter__list-item--open']
|
|
157
151
|
}], eclCategoryList: [{ type: i0.ContentChild, args: [forwardRef(() => EclCategoryFilterListComponent), { isSignal: true }] }] } });
|
|
158
152
|
|
|
159
153
|
class EclCategoryFilterListComponent extends ECLBaseDirective {
|
|
160
154
|
constructor() {
|
|
161
155
|
super(...arguments);
|
|
162
|
-
/**
|
|
163
|
-
* Adds the base class for the category filter list component.
|
|
164
|
-
*/
|
|
165
|
-
this.className = true;
|
|
166
|
-
/**
|
|
167
|
-
* Sets ARIA role to "list" for accessibility purposes.
|
|
168
|
-
*/
|
|
169
|
-
this.role = 'list';
|
|
170
156
|
/**
|
|
171
157
|
* List of all category filter items projected inside this list.
|
|
172
158
|
*/
|
|
@@ -210,61 +196,56 @@ class EclCategoryFilterListComponent extends ECLBaseDirective {
|
|
|
210
196
|
}
|
|
211
197
|
}
|
|
212
198
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclCategoryFilterListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
213
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EclCategoryFilterListComponent, isStandalone: true, selector: "ecl-category-filter-list", host: {
|
|
199
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EclCategoryFilterListComponent, isStandalone: true, selector: "ecl-category-filter-list", host: { attributes: { "role": "list" }, properties: { "attr.id": "id" }, classAttribute: "ecl-category-filter__list" }, queries: [{ propertyName: "eclCategoryFilterItems", predicate: i0.forwardRef(() => EclCategoryFilterItemComponent), isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n" }); }
|
|
214
200
|
}
|
|
215
201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclCategoryFilterListComponent, decorators: [{
|
|
216
202
|
type: Component,
|
|
217
|
-
args: [{ selector: 'ecl-category-filter-list',
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
args: ['attr.role']
|
|
224
|
-
}], controls: [{
|
|
225
|
-
type: HostBinding,
|
|
226
|
-
args: ['attr.aria-controls']
|
|
227
|
-
}], eclCategoryFilterItems: [{ type: i0.ContentChildren, args: [forwardRef(() => EclCategoryFilterItemComponent), { isSignal: true }] }] } });
|
|
203
|
+
args: [{ selector: 'ecl-category-filter-list', host: {
|
|
204
|
+
'class': 'ecl-category-filter__list',
|
|
205
|
+
'role': 'list',
|
|
206
|
+
'[attr.id]': 'id',
|
|
207
|
+
}, template: "<ng-content></ng-content>\n" }]
|
|
208
|
+
}], propDecorators: { eclCategoryFilterItems: [{ type: i0.ContentChildren, args: [forwardRef(() => EclCategoryFilterItemComponent), { isSignal: true }] }] } });
|
|
228
209
|
|
|
229
210
|
class EclCategoryFilterComponent extends ECLBaseDirective {
|
|
230
211
|
constructor() {
|
|
231
|
-
super(
|
|
212
|
+
super();
|
|
232
213
|
/**
|
|
233
214
|
* ID of the currently selected item. When provided, the item with the matching ID
|
|
234
215
|
* will be marked as current and automatically expanded on initialization.
|
|
235
216
|
*/
|
|
236
217
|
this.currentItemId = input(undefined, /* @ts-ignore */
|
|
237
218
|
...(ngDevMode ? [{ debugName: "currentItemId" }] : /* istanbul ignore next */ []));
|
|
238
|
-
/**
|
|
239
|
-
* Static class applied to the host element for styling.
|
|
240
|
-
* Always returns true to include the `ecl-category-filter` class.
|
|
241
|
-
*/
|
|
242
|
-
this.className = true;
|
|
243
|
-
/**
|
|
244
|
-
* Defines the ARIA role for the host element. Always set to "navigation".
|
|
245
|
-
*/
|
|
246
|
-
this.role = 'navigation';
|
|
247
219
|
/**
|
|
248
220
|
* Aria-label for the navigation role. Defaults to "Category filter".
|
|
249
221
|
*/
|
|
250
222
|
this.ariaLabel = 'Category filter';
|
|
251
223
|
this.eclCategoryList = contentChild(forwardRef(() => EclCategoryFilterListComponent), /* @ts-ignore */
|
|
252
224
|
...(ngDevMode ? [{ debugName: "eclCategoryList" }] : /* istanbul ignore next */ []));
|
|
225
|
+
/**
|
|
226
|
+
* Signal-based query for all descendant category filter items.
|
|
227
|
+
*/
|
|
228
|
+
this.eclCategoryFilterItemsAll = contentChildren(forwardRef(() => EclCategoryFilterItemComponent), { ...(ngDevMode ? { debugName: "eclCategoryFilterItemsAll" } : /* istanbul ignore next */ {}), descendants: true });
|
|
253
229
|
this.destroy$ = new Subject();
|
|
254
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
255
|
-
this.injector = inject(Injector);
|
|
256
230
|
this.initializedItems = new WeakSet();
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
231
|
+
// Reacts to item changes and performs all setup:
|
|
232
|
+
// - subscribes to itemSelect events (guarded by WeakSet)
|
|
233
|
+
// - assigns IDs where missing
|
|
234
|
+
// - propagates levels through the tree
|
|
235
|
+
// - handles preselection of currentItemId
|
|
236
|
+
effect(() => {
|
|
237
|
+
const items = this.eclCategoryFilterItemsAll();
|
|
238
|
+
untracked(() => {
|
|
239
|
+
for (const item of items) {
|
|
240
|
+
this.connectCategoryfilterItemEventsOnce(item);
|
|
241
|
+
}
|
|
242
|
+
this.setIds(items);
|
|
243
|
+
this.eclCategoryList().updateChildrenItemsLevel(0);
|
|
244
|
+
if (this.currentItemId() !== undefined) {
|
|
245
|
+
this.setPreselectedCurrentItem();
|
|
246
|
+
}
|
|
247
|
+
});
|
|
266
248
|
});
|
|
267
|
-
this.setId(this.eclCategoryList().eclCategoryFilterItems());
|
|
268
249
|
}
|
|
269
250
|
ngOnDestroy() {
|
|
270
251
|
this.destroy$.next(true);
|
|
@@ -276,27 +257,15 @@ class EclCategoryFilterComponent extends ECLBaseDirective {
|
|
|
276
257
|
this.initializedItems.add(item);
|
|
277
258
|
this.connectCategoryfilterItemEvents(item);
|
|
278
259
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
260
|
+
setIds(items) {
|
|
261
|
+
for (const item of items) {
|
|
262
|
+
if (!item.id) {
|
|
263
|
+
item.id = crypto.randomUUID();
|
|
264
|
+
}
|
|
265
|
+
const eclCategoryList = item.eclCategoryList();
|
|
266
|
+
if (eclCategoryList && !eclCategoryList.id) {
|
|
267
|
+
eclCategoryList.id = `${item.id}-list`;
|
|
284
268
|
}
|
|
285
|
-
this.cdr.markForCheck();
|
|
286
|
-
}, { injector: this.injector });
|
|
287
|
-
}
|
|
288
|
-
setId(subList) {
|
|
289
|
-
if (subList) {
|
|
290
|
-
subList.forEach((item) => {
|
|
291
|
-
if (!item.id) {
|
|
292
|
-
item.id = crypto.randomUUID();
|
|
293
|
-
}
|
|
294
|
-
const eclCategoryList = item.eclCategoryList();
|
|
295
|
-
if (eclCategoryList) {
|
|
296
|
-
eclCategoryList.controls = item.id;
|
|
297
|
-
this.setId(eclCategoryList.eclCategoryFilterItems());
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
269
|
}
|
|
301
270
|
}
|
|
302
271
|
connectCategoryfilterItemEvents(item) {
|
|
@@ -313,7 +282,8 @@ class EclCategoryFilterComponent extends ECLBaseDirective {
|
|
|
313
282
|
}
|
|
314
283
|
}
|
|
315
284
|
setPreselectedCurrentItem() {
|
|
316
|
-
const
|
|
285
|
+
const items = this.eclCategoryFilterItemsAll();
|
|
286
|
+
const currItem = items.find((item) => item.id === this.currentItemId());
|
|
317
287
|
if (currItem) {
|
|
318
288
|
currItem.isCurrent = true;
|
|
319
289
|
if (currItem.hasChildren) {
|
|
@@ -326,49 +296,44 @@ class EclCategoryFilterComponent extends ECLBaseDirective {
|
|
|
326
296
|
if (currItem.isRootItem) {
|
|
327
297
|
return;
|
|
328
298
|
}
|
|
329
|
-
|
|
330
|
-
|
|
299
|
+
const items = this.eclCategoryFilterItemsAll();
|
|
300
|
+
const parent = items.find((item) => item.hasChildren && item.children.find((child) => child.id === currItem.id) !== undefined);
|
|
301
|
+
if (parent) {
|
|
331
302
|
parent.isExpanded = true;
|
|
332
303
|
this.expandParents(parent);
|
|
333
304
|
}
|
|
334
305
|
}
|
|
335
306
|
closeAllItemsButOne(item) {
|
|
336
|
-
this.eclCategoryFilterItemsAll
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
307
|
+
const items = this.eclCategoryFilterItemsAll();
|
|
308
|
+
for (const it of items) {
|
|
309
|
+
if (it !== item) {
|
|
310
|
+
it.isExpanded = false;
|
|
311
|
+
it.isCurrent = false;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
342
314
|
}
|
|
343
315
|
deselectAllItemsButOne(item) {
|
|
344
|
-
this.eclCategoryFilterItemsAll
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
316
|
+
const items = this.eclCategoryFilterItemsAll();
|
|
317
|
+
for (const it of items) {
|
|
318
|
+
if (it !== item) {
|
|
319
|
+
it.isCurrent = false;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
349
322
|
}
|
|
350
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclCategoryFilterComponent, deps:
|
|
351
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EclCategoryFilterComponent, isStandalone: true, selector: "ecl-category-filter", inputs: { currentItemId: { classPropertyName: "currentItemId", publicName: "currentItemId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: false, isRequired: false, transformFunction: null } }, host: {
|
|
323
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclCategoryFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
324
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EclCategoryFilterComponent, isStandalone: true, selector: "ecl-category-filter", inputs: { currentItemId: { classPropertyName: "currentItemId", publicName: "currentItemId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "ariaLabel" }, classAttribute: "ecl-category-filter" }, queries: [{ propertyName: "eclCategoryList", first: true, predicate: i0.forwardRef(() => EclCategoryFilterListComponent), descendants: true, isSignal: true }, { propertyName: "eclCategoryFilterItemsAll", predicate: i0.forwardRef(() => EclCategoryFilterItemComponent), descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"] }); }
|
|
352
325
|
}
|
|
353
326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclCategoryFilterComponent, decorators: [{
|
|
354
327
|
type: Component,
|
|
355
|
-
args: [{ selector: 'ecl-category-filter',
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
args: ['attr.role']
|
|
362
|
-
}], ariaLabel: [{
|
|
363
|
-
type: HostBinding,
|
|
364
|
-
args: ['attr.aria-label']
|
|
365
|
-
}, {
|
|
328
|
+
args: [{ selector: 'ecl-category-filter', host: {
|
|
329
|
+
'class': 'ecl-category-filter',
|
|
330
|
+
'role': 'navigation',
|
|
331
|
+
'[attr.aria-label]': 'ariaLabel',
|
|
332
|
+
}, template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"] }]
|
|
333
|
+
}], ctorParameters: () => [], propDecorators: { currentItemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentItemId", required: false }] }], ariaLabel: [{
|
|
366
334
|
type: Input,
|
|
367
335
|
args: ['aria-label']
|
|
368
|
-
}], eclCategoryList: [{ type: i0.ContentChild, args: [forwardRef(() => EclCategoryFilterListComponent), { isSignal: true }] }], eclCategoryFilterItemsAll: [{
|
|
369
|
-
type: ContentChildren,
|
|
370
|
-
args: [forwardRef(() => EclCategoryFilterItemComponent), { descendants: true }]
|
|
371
|
-
}] } });
|
|
336
|
+
}], eclCategoryList: [{ type: i0.ContentChild, args: [forwardRef(() => EclCategoryFilterListComponent), { isSignal: true }] }], eclCategoryFilterItemsAll: [{ type: i0.ContentChildren, args: [forwardRef(() => EclCategoryFilterItemComponent), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
372
337
|
|
|
373
338
|
const EUI_ECL_CATEGORY_FILTER = [
|
|
374
339
|
EclCategoryFilterComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-ecl-components-ecl-category-filter.mjs","sources":["../../components/ecl-category-filter/events/ecl-category-filter-item-select.event.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-item.component.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-item.component.html","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-list.component.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-list.component.html","../../components/ecl-category-filter/ecl-category-filter/ecl-category-filter.component.ts","../../components/ecl-category-filter/ecl-category-filter/ecl-category-filter.component.html","../../components/ecl-category-filter/index.ts","../../components/ecl-category-filter/eui-ecl-components-ecl-category-filter.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\n\n/**\n * Event emitted when a category filter item is selected.\n */\nexport class EclCategoryFilterItemSelectEvent extends EclBaseEvent {\n /**\n * Creates an instance of EclCategoryFilterItemSelectEvent.\n * @param item The category filter item that triggered the event.\n */\n constructor(public item: EclCategoryFilterItem) {\n super();\n }\n}\n","import { Component, EventEmitter, forwardRef, HostBinding, Input, Output, input, contentChild } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\nimport { EclCategoryFilterItemSelectEvent } from '../events/ecl-category-filter-item-select.event';\nimport { EclCategoryFilterListComponent } from './ecl-category-filter-list.component';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { NgTemplateOutlet } from '@angular/common';\n\n@Component({\n selector: 'ecl-category-filter-item',\n templateUrl: './ecl-category-filter-item.component.html',\n imports: [\n NgTemplateOutlet,\n ...EUI_ECL_ICON,\n ],\n})\nexport class EclCategoryFilterItemComponent extends ECLBaseDirective implements EclCategoryFilterItem {\n /**\n * Link URL associated with this category filter item.\n * If not provided, the item acts as a toggle only.\n */\n readonly href = input<string>(undefined);\n\n /**\n * Unique identifier for the item. Used to manage selection state.\n */\n @Input() id: string;\n\n /**\n * Emits when the item is selected by the user (clicked).\n */\n @Output() itemSelect = new EventEmitter<EclCategoryFilterItemSelectEvent>();\n\n /**\n * Static class binding for base list item styling.\n */\n @HostBinding('class.ecl-category-filter__list-item') className = true;\n\n /**\n * Defines the ARIA role for the list item. Always set to \"listitem\".\n */\n @HostBinding('attr.role') role = 'listitem';\n\n /**\n * Indicates whether the item is expanded. Applied only if the item has children.\n */\n @HostBinding('class.ecl-category-filter__list-item--open')\n get isAriaExpanded(): boolean {\n return this.hasChildren ? this.isExpanded : null;\n }\n\n /**\n * Indicates whether the item is currently expanded (open).\n */\n isExpanded = false;\n\n /**\n * Indicates whether the item is currently selected.\n */\n isCurrent = false;\n\n /**\n * Child list component if the item has nested children.\n */\n readonly eclCategoryList = contentChild(forwardRef(() => EclCategoryFilterListComponent));\n\n /**\n * Returns the hierarchical level of the item within the tree.\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Sets the level and updates the level of the child list accordingly.\n */\n set level(value: number) {\n this._level = ++value;\n this.updateChildListLevel(this._level);\n }\n private _level: number;\n\n /**\n * Returns the CSS class for the current level of the item.\n */\n get levelClass(): string {\n return `ecl-category-filter__item--level-${this._level}`;\n }\n\n /**\n * Indicates whether the item has child elements.\n */\n get hasChildren(): boolean {\n return this.eclCategoryList() !== undefined;\n }\n\n /**\n * Returns the child components of this item, if any.\n */\n get children(): readonly EclCategoryFilterItemComponent[] {\n return this.eclCategoryList().children;\n }\n\n /**\n * Returns true if this is a root-level item and has children.\n */\n get isRootItemWithChildren(): boolean {\n return this.hasChildren && this.isRootItem;\n }\n\n /**\n * Returns true if this is a child item and has its own children.\n */\n get isChildItemWithChildren(): boolean {\n return this.hasChildren && !this.isRootItem;\n }\n\n /**\n * Returns true if this is a root-level item (level === 1).\n */\n get isRootItem(): boolean {\n return this.level === 1;\n }\n\n /**\n * Handles user click interaction, updates state and emits selection event.\n * Prevents navigation if no `href` is defined.\n */\n onItemClick(evt: MouseEvent): void {\n this.toggleExpanded();\n this.isCurrent = true;\n this.itemSelect.next(new EclCategoryFilterItemSelectEvent(this));\n if (!this.href()) {\n evt.preventDefault();\n }\n evt.stopPropagation();\n }\n\n private toggleExpanded(): void {\n this.isExpanded = !this.isExpanded;\n }\n\n private updateChildListLevel(value: number): void {\n const eclCategoryList = this.eclCategoryList();\n if (eclCategoryList) {\n eclCategoryList.level = value;\n }\n }\n}\n","@if (hasChildren) {\n <button\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent\"\n [attr.aria-current]=\"isCurrent ? true : null\"\n [attr.aria-expanded] = \"isExpanded\"\n [attr.aria-controls]=\"id\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n @if(isRootItemWithChildren) {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </button>\n} @else {\n <a\n [href]=\"href()\"\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [attr.aria-current]=\"isCurrent ? true : null\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n @if(isRootItemWithChildren) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </a>\n}\n<ng-content select=\"ecl-category-filter-list\"></ng-content>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n","import { Component, forwardRef, HostBinding, contentChildren } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItemComponent } from './ecl-category-filter-item.component';\n\n@Component({\n selector: 'ecl-category-filter-list',\n templateUrl: './ecl-category-filter-list.component.html',\n})\nexport class EclCategoryFilterListComponent extends ECLBaseDirective {\n /**\n * Adds the base class for the category filter list component.\n */\n @HostBinding('class.ecl-category-filter__list') className = true;\n\n /**\n * Sets ARIA role to \"list\" for accessibility purposes.\n */\n @HostBinding('attr.role') role = 'list';\n\n /**\n * ARIA attribute that points to the element controlled by this list (if applicable).\n */\n @HostBinding('attr.aria-controls') controls: string;\n\n /**\n * List of all category filter items projected inside this list.\n */\n readonly eclCategoryFilterItems = contentChildren<EclCategoryFilterItemComponent>(forwardRef(() => EclCategoryFilterItemComponent));\n\n /**\n * Gets the nesting level of this list in the category tree.\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Sets the level of the list and applies it to all its children.\n */\n set level(value: number) {\n this._level = value;\n this.updateChildrenItemsLevel(value);\n }\n private _level: number;\n\n /**\n * Returns true if the list contains one or more category filter items.\n */\n get hasChildren(): boolean {\n const eclCategoryFilterItems = this.eclCategoryFilterItems();\n return eclCategoryFilterItems !== undefined && eclCategoryFilterItems.length > 0;\n }\n\n /**\n * Returns the list of child components.\n */\n get children(): readonly EclCategoryFilterItemComponent[] {\n return this.eclCategoryFilterItems();\n }\n\n /**\n * Propagates the current level to all direct children items.\n * @param value Level value to set on each child.\n */\n updateChildrenItemsLevel(value: number): void {\n const eclCategoryFilterItems = this.eclCategoryFilterItems();\n if (eclCategoryFilterItems) {\n eclCategoryFilterItems.forEach((item) =>\n (item.level = value));\n }\n }\n}\n","<ng-content></ng-content>\n","import {\n Component,\n ContentChildren,\n forwardRef,\n HostBinding,\n IterableDiffer,\n IterableDiffers,\n QueryList,\n Input,\n DoCheck,\n AfterContentInit,\n inject,\n Injector,\n ChangeDetectorRef,\n afterNextRender,\n OnDestroy,\n input,\n contentChild,\n} from '@angular/core';\nimport { startWith, Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\nimport { EclCategoryFilterItemSelectEvent } from '../events/ecl-category-filter-item-select.event';\nimport { EclCategoryFilterItemComponent } from '../ecl-category-filter-list';\nimport { EclCategoryFilterListComponent } from '../ecl-category-filter-list';\n\n@Component({\n selector: 'ecl-category-filter',\n templateUrl: './ecl-category-filter.component.html',\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclCategoryFilterComponent extends ECLBaseDirective implements AfterContentInit, OnDestroy {\n /**\n * ID of the currently selected item. When provided, the item with the matching ID\n * will be marked as current and automatically expanded on initialization.\n */\n readonly currentItemId = input<string>(undefined);\n\n /**\n * Static class applied to the host element for styling.\n * Always returns true to include the `ecl-category-filter` class.\n */\n @HostBinding('class.ecl-category-filter') className = true;\n\n /**\n * Defines the ARIA role for the host element. Always set to \"navigation\".\n */\n @HostBinding('attr.role') role = 'navigation';\n\n /**\n * Aria-label for the navigation role. Defaults to \"Category filter\".\n */\n @HostBinding('attr.aria-label') @Input('aria-label') ariaLabel: string | null = 'Category filter';\n\n readonly eclCategoryList = contentChild(forwardRef(() => EclCategoryFilterListComponent));\n @ContentChildren(forwardRef(() => EclCategoryFilterItemComponent), { descendants: true })\n eclCategoryFilterItemsAll: QueryList<EclCategoryFilterItemComponent>;\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly injector = inject(Injector);\n private readonly initializedItems = new WeakSet<EclCategoryFilterItemComponent>();\n\n ngAfterContentInit(): void {\n this.eclCategoryFilterItemsAll.changes\n .pipe(\n startWith(this.eclCategoryFilterItemsAll),\n takeUntil(this.destroy$)\n )\n .subscribe((items: QueryList<EclCategoryFilterItemComponent>) => {\n for (const item of items.toArray()) {\n this.connectCategoryfilterItemEventsOnce(item);\n }\n\n this.scheduleLevelUpdate();\n });\n this.setId(this.eclCategoryList().eclCategoryFilterItems());\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private connectCategoryfilterItemEventsOnce(item: EclCategoryFilterItemComponent): void {\n if (this.initializedItems.has(item)) return;\n\n this.initializedItems.add(item);\n this.connectCategoryfilterItemEvents(item);\n }\n\n private scheduleLevelUpdate(): void {\n\n afterNextRender(() => {\n\n this.eclCategoryList().updateChildrenItemsLevel(0);\n\n if (this.currentItemId() !== undefined) {\n this.setPreselectedCurrentItem();\n }\n\n this.cdr.markForCheck();\n }, { injector: this.injector });\n }\n\n private setId(subList: QueryList<EclCategoryFilterItemComponent>): void {\n if (subList) {\n subList.forEach((item) => {\n if (!item.id) {\n item.id = crypto.randomUUID();\n }\n const eclCategoryList = item.eclCategoryList();\n if (eclCategoryList) {\n eclCategoryList.controls = item.id;\n this.setId(eclCategoryList.eclCategoryFilterItems());\n }\n });\n }\n }\n\n private connectCategoryfilterItemEvents(item: EclCategoryFilterItemComponent): void {\n item.itemSelect.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemSelected(evt);\n });\n }\n\n private onItemSelected(evt: EclCategoryFilterItemSelectEvent): void {\n if (evt.item.isRootItem) {\n this.closeAllItemsButOne(evt.item);\n } else {\n this.deselectAllItemsButOne(evt.item);\n }\n }\n\n private setPreselectedCurrentItem(): void {\n const currItem = this.eclCategoryFilterItemsAll.toArray().find((item) => item.id === this.currentItemId());\n if (currItem) {\n currItem.isCurrent = true;\n if (currItem.hasChildren) {\n currItem.isExpanded = true;\n }\n this.expandParents(currItem);\n }\n }\n\n private expandParents(currItem: EclCategoryFilterItem): void {\n if (currItem.isRootItem) {\n return;\n } else {\n const parent = this.eclCategoryFilterItemsAll.find(\n (item) => item.hasChildren && item.children.find((child) => child.id === currItem.id) !== undefined,\n );\n parent.isExpanded = true;\n this.expandParents(parent);\n }\n }\n\n private closeAllItemsButOne(item: EclCategoryFilterItem): void {\n this.eclCategoryFilterItemsAll\n .filter((it) => it !== item)\n .forEach((it) => {\n it.isExpanded = false;\n it.isCurrent = false;\n });\n }\n\n private deselectAllItemsButOne(item: EclCategoryFilterItem): void {\n this.eclCategoryFilterItemsAll\n .filter((it) => it !== item)\n .forEach((it) => {\n it.isCurrent = false;\n });\n }\n}\n","<ng-content></ng-content>\n","import { EclCategoryFilterComponent } from './ecl-category-filter/ecl-category-filter.component';\nimport { EclCategoryFilterListComponent } from './ecl-category-filter-list/ecl-category-filter-list.component';\nimport { EclCategoryFilterItemComponent } from './ecl-category-filter-list/ecl-category-filter-item.component';\n\nexport * from './ecl-category-filter/index';\nexport * from './ecl-category-filter-list/index';\nexport * from './models/ecl-category-filter-item.model';\nexport * from './events/ecl-category-filter-item-select.event';\n\nexport const EUI_ECL_CATEGORY_FILTER = [\n EclCategoryFilterComponent,\n EclCategoryFilterListComponent,\n EclCategoryFilterItemCom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AAA,EAAA,2BAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,WAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,EAAA,CAAA,UAAA,CAAA,MAuBsB,8BAA8B,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,2BAAA,EAAA,SAAA,EAAA,EAAA,CAAA,UAAA,CAAA,MACrD,8BAA8B,wEC7DpE,6BACA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,CAAA,CAAA;;2FDoCa,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAXtC,SAAS;+BACI,qBAAqB,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;sBAqB9B,WAAW;uBAAC,2BAA2B;;sBAKvC,WAAW;uBAAC,WAAW;;sBAKvB,WAAW;uBAAC,iBAAiB;;sBAAG,KAAK;uBAAC,YAAY;AAEX,aAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,UAAU,CAAC,MAAM,8BAA8B,CAAC,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,yBAAA,EAAA,CAAA;sBACvF,eAAe;uBAAC,UAAU,CAAC,MAAM,8BAA8B,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;;AEpDrF,MAAM,uBAAuB,GAAG;IACrC,0BAA0B;IAC1B,8BAA8B;IAC9B,8BAA8B;;;ACZhC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-category-filter.mjs","sources":["../../components/ecl-category-filter/events/ecl-category-filter-item-select.event.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-item.component.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-item.component.html","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-list.component.ts","../../components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-list.component.html","../../components/ecl-category-filter/ecl-category-filter/ecl-category-filter.component.ts","../../components/ecl-category-filter/ecl-category-filter/ecl-category-filter.component.html","../../components/ecl-category-filter/index.ts","../../components/ecl-category-filter/eui-ecl-components-ecl-category-filter.ts"],"sourcesContent":["import { EclBaseEvent } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\n\n/**\n * Event emitted when a category filter item is selected.\n */\nexport class EclCategoryFilterItemSelectEvent extends EclBaseEvent {\n /**\n * Creates an instance of EclCategoryFilterItemSelectEvent.\n * @param item The category filter item that triggered the event.\n */\n constructor(public item: EclCategoryFilterItem) {\n super();\n }\n}\n","import { Component, EventEmitter, forwardRef, Input, Output, input, contentChild, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\nimport { EclCategoryFilterItemSelectEvent } from '../events/ecl-category-filter-item-select.event';\nimport { EclCategoryFilterListComponent } from './ecl-category-filter-list.component';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { NgTemplateOutlet } from '@angular/common';\n\n@Component({\n selector: 'ecl-category-filter-item',\n templateUrl: './ecl-category-filter-item.component.html',\n imports: [\n NgTemplateOutlet,\n ...EUI_ECL_ICON,\n ],\n host: {\n 'class': 'ecl-category-filter__list-item',\n 'role': 'listitem',\n '[class.ecl-category-filter__list-item--open]': 'hasChildren ? isExpanded : null',\n },\n})\nexport class EclCategoryFilterItemComponent extends ECLBaseDirective implements EclCategoryFilterItem {\n /**\n * Link URL associated with this category filter item.\n * If not provided, the item acts as a toggle only.\n */\n readonly href = input<string>(undefined);\n\n /**\n * Unique identifier for the item. Used to manage selection state.\n */\n @Input() id: string;\n\n /**\n * Emits when the item is selected by the user (clicked).\n */\n @Output() itemSelect = new EventEmitter<EclCategoryFilterItemSelectEvent>();\n\n /**\n * Whether the item is currently expanded (open).\n * Backed by a signal so that parent mutations trigger template updates.\n */\n get isExpanded(): boolean {\n return this._isExpanded();\n }\n set isExpanded(value: boolean) {\n this._isExpanded.set(value);\n }\n private readonly _isExpanded = signal(false);\n\n /**\n * Whether the item is currently selected.\n * Backed by a signal so that parent mutations trigger template updates.\n */\n get isCurrent(): boolean {\n return this._isCurrent();\n }\n set isCurrent(value: boolean) {\n this._isCurrent.set(value);\n }\n private readonly _isCurrent = signal(false);\n\n /**\n * Child list component if the item has nested children.\n */\n readonly eclCategoryList = contentChild(forwardRef(() => EclCategoryFilterListComponent));\n\n /**\n * Returns the hierarchical level of the item within the tree.\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Sets the level and updates the level of the child list accordingly.\n */\n set level(value: number) {\n this._level = ++value;\n this.updateChildListLevel(this._level);\n }\n private _level: number;\n\n /**\n * Returns the CSS class for the current level of the item.\n */\n get levelClass(): string {\n return `ecl-category-filter__item--level-${this._level}`;\n }\n\n /**\n * Indicates whether the item has child elements.\n */\n get hasChildren(): boolean {\n return this.eclCategoryList() !== undefined;\n }\n\n /**\n * Returns the child components of this item, if any.\n */\n get children(): readonly EclCategoryFilterItemComponent[] {\n return this.eclCategoryList().children;\n }\n\n /**\n * Returns true if this is a root-level item and has children.\n */\n get isRootItemWithChildren(): boolean {\n return this.hasChildren && this.isRootItem;\n }\n\n /**\n * Returns true if this is a child item and has its own children.\n */\n get isChildItemWithChildren(): boolean {\n return this.hasChildren && !this.isRootItem;\n }\n\n /**\n * Returns true if this is a root-level item (level === 1).\n */\n get isRootItem(): boolean {\n return this.level === 1;\n }\n\n /**\n * Handles user click interaction, updates state and emits selection event.\n * Prevents navigation if no `href` is defined.\n */\n onItemClick(evt: MouseEvent): void {\n this.isExpanded = !this.isExpanded;\n this.isCurrent = true;\n this.itemSelect.next(new EclCategoryFilterItemSelectEvent(this));\n if (!this.href()) {\n evt.preventDefault();\n }\n evt.stopPropagation();\n }\n\n private updateChildListLevel(value: number): void {\n const eclCategoryList = this.eclCategoryList();\n if (eclCategoryList) {\n eclCategoryList.level = value;\n }\n }\n}\n","@if (hasChildren) {\n <button\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent\"\n [attr.aria-current]=\"isCurrent ? true : null\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"eclCategoryList()?.id\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n @if(isRootItemWithChildren) {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </button>\n} @else {\n <a\n [href]=\"href()\"\n class=\"ecl-category-filter__item {{ levelClass }}\"\n [class.ecl-category-filter__item--has-children]=\"hasChildren\"\n [class.ecl-category-filter__item--current]=\"isCurrent\"\n [attr.aria-current]=\"isCurrent ? true : null\"\n (click)=\"onItemClick($event)\">\n @if(isChildItemWithChildren) {\n <ecl-icon icon=\"solid-arrow\" size=\"xs\" transform=\"rotate-90\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n @if(isRootItemWithChildren) {\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-category-filter__item-icon\"> </ecl-icon>\n }\n </a>\n}\n<ng-content select=\"ecl-category-filter-list\"></ng-content>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n","import { Component, forwardRef, contentChildren } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItemComponent } from './ecl-category-filter-item.component';\n\n@Component({\n selector: 'ecl-category-filter-list',\n templateUrl: './ecl-category-filter-list.component.html',\n host: {\n 'class': 'ecl-category-filter__list',\n 'role': 'list',\n '[attr.id]': 'id',\n },\n})\nexport class EclCategoryFilterListComponent extends ECLBaseDirective {\n /**\n * ID of this list element, referenced by the parent item's aria-controls.\n */\n id: string;\n\n /**\n * List of all category filter items projected inside this list.\n */\n readonly eclCategoryFilterItems = contentChildren<EclCategoryFilterItemComponent>(forwardRef(() => EclCategoryFilterItemComponent));\n\n /**\n * Gets the nesting level of this list in the category tree.\n */\n get level(): number {\n return this._level;\n }\n\n /**\n * Sets the level of the list and applies it to all its children.\n */\n set level(value: number) {\n this._level = value;\n this.updateChildrenItemsLevel(value);\n }\n private _level: number;\n\n /**\n * Returns true if the list contains one or more category filter items.\n */\n get hasChildren(): boolean {\n const eclCategoryFilterItems = this.eclCategoryFilterItems();\n return eclCategoryFilterItems !== undefined && eclCategoryFilterItems.length > 0;\n }\n\n /**\n * Returns the list of child components.\n */\n get children(): readonly EclCategoryFilterItemComponent[] {\n return this.eclCategoryFilterItems();\n }\n\n /**\n * Propagates the current level to all direct children items.\n * @param value Level value to set on each child.\n */\n updateChildrenItemsLevel(value: number): void {\n const eclCategoryFilterItems = this.eclCategoryFilterItems();\n if (eclCategoryFilterItems) {\n eclCategoryFilterItems.forEach((item) =>\n (item.level = value));\n }\n }\n}\n","<ng-content></ng-content>\n","import {\n Component,\n forwardRef,\n Input,\n OnDestroy,\n input,\n contentChild,\n contentChildren,\n effect,\n untracked,\n} from '@angular/core';\nimport { Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclCategoryFilterItem } from '../models/ecl-category-filter-item.model';\nimport { EclCategoryFilterItemSelectEvent } from '../events/ecl-category-filter-item-select.event';\nimport { EclCategoryFilterItemComponent } from '../ecl-category-filter-list';\nimport { EclCategoryFilterListComponent } from '../ecl-category-filter-list';\n\n@Component({\n selector: 'ecl-category-filter',\n templateUrl: './ecl-category-filter.component.html',\n host: {\n 'class': 'ecl-category-filter',\n 'role': 'navigation',\n '[attr.aria-label]': 'ariaLabel',\n },\n styles: [\n `\n :host {\n display: block;\n }\n `,\n ],\n})\nexport class EclCategoryFilterComponent extends ECLBaseDirective implements OnDestroy {\n /**\n * ID of the currently selected item. When provided, the item with the matching ID\n * will be marked as current and automatically expanded on initialization.\n */\n readonly currentItemId = input<string>(undefined);\n\n /**\n * Aria-label for the navigation role. Defaults to \"Category filter\".\n */\n @Input('aria-label') ariaLabel: string | null = 'Category filter';\n\n readonly eclCategoryList = contentChild(forwardRef(() => EclCategoryFilterListComponent));\n\n /**\n * Signal-based query for all descendant category filter items.\n */\n readonly eclCategoryFilterItemsAll = contentChildren<EclCategoryFilterItemComponent>(\n forwardRef(() => EclCategoryFilterItemComponent), { descendants: true }\n );\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private readonly initializedItems = new WeakSet<EclCategoryFilterItemComponent>();\n\n constructor() {\n super();\n\n // Reacts to item changes and performs all setup:\n // - subscribes to itemSelect events (guarded by WeakSet)\n // - assigns IDs where missing\n // - propagates levels through the tree\n // - handles preselection of currentItemId\n effect(() => {\n const items = this.eclCategoryFilterItemsAll();\n untracked(() => {\n for (const item of items) {\n this.connectCategoryfilterItemEventsOnce(item);\n }\n this.setIds(items);\n this.eclCategoryList().updateChildrenItemsLevel(0);\n\n if (this.currentItemId() !== undefined) {\n this.setPreselectedCurrentItem();\n }\n });\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private connectCategoryfilterItemEventsOnce(item: EclCategoryFilterItemComponent): void {\n if (this.initializedItems.has(item)) return;\n\n this.initializedItems.add(item);\n this.connectCategoryfilterItemEvents(item);\n }\n\n private setIds(items: readonly EclCategoryFilterItemComponent[]): void {\n for (const item of items) {\n if (!item.id) {\n item.id = crypto.randomUUID();\n }\n const eclCategoryList = item.eclCategoryList();\n if (eclCategoryList && !eclCategoryList.id) {\n eclCategoryList.id = `${item.id}-list`;\n }\n }\n }\n\n private connectCategoryfilterItemEvents(item: EclCategoryFilterItemComponent): void {\n item.itemSelect.pipe(takeUntil(this.destroy$)).subscribe((evt) => {\n this.onItemSelected(evt);\n });\n }\n\n private onItemSelected(evt: EclCategoryFilterItemSelectEvent): void {\n if (evt.item.isRootItem) {\n this.closeAllItemsButOne(evt.item);\n } else {\n this.deselectAllItemsButOne(evt.item);\n }\n }\n\n private setPreselectedCurrentItem(): void {\n const items = this.eclCategoryFilterItemsAll();\n const currItem = items.find((item) => item.id === this.currentItemId());\n if (currItem) {\n currItem.isCurrent = true;\n if (currItem.hasChildren) {\n currItem.isExpanded = true;\n }\n this.expandParents(currItem);\n }\n }\n\n private expandParents(currItem: EclCategoryFilterItem): void {\n if (currItem.isRootItem) {\n return;\n }\n const items = this.eclCategoryFilterItemsAll();\n const parent = items.find(\n (item) => item.hasChildren && item.children.find((child) => child.id === currItem.id) !== undefined,\n );\n if (parent) {\n parent.isExpanded = true;\n this.expandParents(parent);\n }\n }\n\n private closeAllItemsButOne(item: EclCategoryFilterItem): void {\n const items = this.eclCategoryFilterItemsAll();\n for (const it of items) {\n if (it !== item) {\n it.isExpanded = false;\n it.isCurrent = false;\n }\n }\n }\n\n private deselectAllItemsButOne(item: EclCategoryFilterItem): void {\n const items = this.eclCategoryFilterItemsAll();\n for (const it of items) {\n if (it !== item) {\n it.isCurrent = false;\n }\n }\n }\n}\n","<ng-content></ng-content>\n","import { EclCategoryFilterComponent } from './ecl-category-filter/ecl-category-filter.component';\nimport { EclCategoryFilterListComponent } from './ecl-category-filter-list/ecl-category-filter-list.component';\nimport { EclCategoryFilterItemComponent } from './ecl-category-filter-list/ecl-category-filter-item.component';\n\nexport * from './ecl-category-filter/index';\nexport * from './ecl-category-filter-list/index';\nexport * from './models/ecl-category-filter-item.model';\nexport * from './events/ecl-category-filter-item-select.event';\n\nexport const EUI_ECL_CATEGORY_FILTER = [\n EclCategoryFilterComponent,\n EclCategoryFilterListComponent,\n EclCategoryFilterItemComponent,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGA;;AAEG;AACG,MAAO,gCAAiC,SAAQ,YAAY,CAAA;AAC9D;;;AAGG;AACH,IAAA,WAAA,CAAmB,IAA2B,EAAA;AAC1C,QAAA,KAAK,EAAE;QADQ,IAAA,CAAA,IAAI,GAAJ,IAAI;IAEvB;AACH;;ACOK,MAAO,8BAA+B,SAAQ,gBAAgB,CAAA;AAbpE,IAAA,WAAA,GAAA;;AAcI;;;AAGG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,SAAS;iFAAC;AAOxC;;AAEG;AACO,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAoC;QAY1D,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK;wFAAC;QAY3B,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,KAAK;uFAAC;AAE3C;;AAEG;QACM,IAAA,CAAA,eAAe,GAAG,YAAY,CAAC,UAAU,CAAC,MAAM,8BAA8B,CAAC;4FAAC;AAgF5F,IAAA;AA3GG;;;AAGG;AACH,IAAA,IAAI,UAAU,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE;IAC7B;IACA,IAAI,UAAU,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC;IAC/B;AAGA;;;AAGG;AACH,IAAA,IAAI,SAAS,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,UAAU,EAAE;IAC5B;IACA,IAAI,SAAS,CAAC,KAAc,EAAA;AACxB,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC;IAC9B;AAQA;;AAEG;AACH,IAAA,IAAI,KAAK,G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@@ -109,11 +109,11 @@ class EclDateBlockComponent extends ECLBaseDirective {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclDateBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
112
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EclDateBlockComponent, isStandalone: true, selector: "time[eclDateBlock]", inputs: { date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, day: { classPropertyName: "day", publicName: "day", isSignal: true, isRequired: false, transformFunction: null }, month: { classPropertyName: "month", publicName: "month", isSignal: true, isRequired: false, transformFunction: null }, monthTitle: { classPropertyName: "monthTitle", publicName: "monthTitle", isSignal: true, isRequired: false, transformFunction: null }, year: { classPropertyName: "year", publicName: "year", isSignal: true, isRequired: false, transformFunction: null }, datetime: { classPropertyName: "datetime", publicName: "datetime", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.cssClasses", "attr.datetime": "this.datetime" } },
|
|
112
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EclDateBlockComponent, isStandalone: true, selector: "time[eclDateBlock]", inputs: { date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, day: { classPropertyName: "day", publicName: "day", isSignal: true, isRequired: false, transformFunction: null }, month: { classPropertyName: "month", publicName: "month", isSignal: true, isRequired: false, transformFunction: null }, monthTitle: { classPropertyName: "monthTitle", publicName: "monthTitle", isSignal: true, isRequired: false, transformFunction: null }, year: { classPropertyName: "year", publicName: "year", isSignal: true, isRequired: false, transformFunction: null }, datetime: { classPropertyName: "datetime", publicName: "datetime", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.cssClasses", "attr.datetime": "this.datetime" } }, usesInheritance: true, ngImport: i0, template: "<span class=\"ecl-date-block__daytime\">{{ datetime || (date() | date: dateFormat()) }}</span>\n<span class=\"ecl-date-block__day\" aria-hidden=\"true\">{{ day() || (date() | date: 'd') }}</span>\n<abbr [title]=\"monthTitle() || month() || (date() | date: 'MMMM' : '' : locale)\" class=\"ecl-date-block__month\" aria-hidden=\"true\">\n {{ month() || (date() | date: 'MMM' : '' : locale) }}\n</abbr>\n<span class=\"ecl-date-block__year\" aria-hidden=\"true\">{{ year() || (date() | date: 'yyyy') }}</span>\n", dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }] }); }
|
|
113
113
|
}
|
|
114
114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclDateBlockComponent, decorators: [{
|
|
115
115
|
type: Component,
|
|
116
|
-
args: [{ selector: 'time[eclDateBlock]', imports: [DatePipe],
|
|
116
|
+
args: [{ selector: 'time[eclDateBlock]', imports: [DatePipe], template: "<span class=\"ecl-date-block__daytime\">{{ datetime || (date() | date: dateFormat()) }}</span>\n<span class=\"ecl-date-block__day\" aria-hidden=\"true\">{{ day() || (date() | date: 'd') }}</span>\n<abbr [title]=\"monthTitle() || month() || (date() | date: 'MMMM' : '' : locale)\" class=\"ecl-date-block__month\" aria-hidden=\"true\">\n {{ month() || (date() | date: 'MMM' : '' : locale) }}\n</abbr>\n<span class=\"ecl-date-block__year\" aria-hidden=\"true\">{{ year() || (date() | date: 'yyyy') }}</span>\n" }]
|
|
117
117
|
}], ctorParameters: () => [], propDecorators: { date: [{ type: i0.Input, args: [{ isSignal: true, alias: "date", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], day: [{ type: i0.Input, args: [{ isSignal: true, alias: "day", required: false }] }], month: [{ type: i0.Input, args: [{ isSignal: true, alias: "month", required: false }] }], monthTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthTitle", required: false }] }], year: [{ type: i0.Input, args: [{ isSignal: true, alias: "year", required: false }] }], cssClasses: [{
|
|
118
118
|
type: HostBinding,
|
|
119
119
|
args: ['class']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-ecl-components-ecl-date-block.mjs","sources":["../../components/ecl-date-block/ecl-date-block.component.ts","../../components/ecl-date-block/ecl-date-block.component.html","../../components/ecl-date-block/index.ts","../../components/ecl-date-block/eui-ecl-components-ecl-date-block.ts"],"sourcesContent":["import { formatDate, DatePipe } from '@angular/common';\nimport { Component, Input, HostBinding, inject, input } from '@angular/core';\nimport '@angular/common/locales/global/bg';\nimport '@angular/common/locales/global/da';\nimport '@angular/common/locales/global/en';\nimport '@angular/common/locales/global/et';\nimport '@angular/common/locales/global/fr';\nimport '@angular/common/locales/global/hr';\nimport '@angular/common/locales/global/lv';\nimport '@angular/common/locales/global/hu';\nimport '@angular/common/locales/global/nl';\nimport '@angular/common/locales/global/pt';\nimport '@angular/common/locales/global/sk';\nimport '@angular/common/locales/global/fi';\nimport '@angular/common/locales/global/cs';\nimport '@angular/common/locales/global/de';\nimport '@angular/common/locales/global/el';\nimport '@angular/common/locales/global/es';\nimport '@angular/common/locales/global/ga';\nimport '@angular/common/locales/global/it';\nimport '@angular/common/locales/global/lt';\nimport '@angular/common/locales/global/mt';\nimport '@angular/common/locales/global/pl';\nimport '@angular/common/locales/global/ro';\nimport '@angular/common/locales/global/sl';\nimport '@angular/common/locales/global/sv';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component used to display a formatted date in a styled time element.\n * Designed for use within content components such as content blocks or items.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'time[eclDateBlock]',\n templateUrl: './ecl-date-block.component.html',\n imports: [DatePipe],\n
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-date-block.mjs","sources":["../../components/ecl-date-block/ecl-date-block.component.ts","../../components/ecl-date-block/ecl-date-block.component.html","../../components/ecl-date-block/index.ts","../../components/ecl-date-block/eui-ecl-components-ecl-date-block.ts"],"sourcesContent":["import { formatDate, DatePipe } from '@angular/common';\nimport { Component, Input, HostBinding, inject, input } from '@angular/core';\nimport '@angular/common/locales/global/bg';\nimport '@angular/common/locales/global/da';\nimport '@angular/common/locales/global/en';\nimport '@angular/common/locales/global/et';\nimport '@angular/common/locales/global/fr';\nimport '@angular/common/locales/global/hr';\nimport '@angular/common/locales/global/lv';\nimport '@angular/common/locales/global/hu';\nimport '@angular/common/locales/global/nl';\nimport '@angular/common/locales/global/pt';\nimport '@angular/common/locales/global/sk';\nimport '@angular/common/locales/global/fi';\nimport '@angular/common/locales/global/cs';\nimport '@angular/common/locales/global/de';\nimport '@angular/common/locales/global/el';\nimport '@angular/common/locales/global/es';\nimport '@angular/common/locales/global/ga';\nimport '@angular/common/locales/global/it';\nimport '@angular/common/locales/global/lt';\nimport '@angular/common/locales/global/mt';\nimport '@angular/common/locales/global/pl';\nimport '@angular/common/locales/global/ro';\nimport '@angular/common/locales/global/sl';\nimport '@angular/common/locales/global/sv';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component used to display a formatted date in a styled time element.\n * Designed for use within content components such as content blocks or items.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'time[eclDateBlock]',\n templateUrl: './ecl-date-block.component.html',\n imports: [DatePipe],\n})\nexport class EclDateBlockComponent extends ECLBaseDirective {\n /**\n * The date to be displayed. If not null, it's used to generate the `datetime` attribute and visual output.\n */\n readonly date = input<Date>(undefined);\n\n /**\n * The format to be used when rendering the date string (Angular DatePipe format).\n * Default is `'dd/M/yyyy'`.\n */\n readonly dateFormat = input('dd/M/yyyy');\n\n /**\n * Optional visual variant of the date block. Can be:\n * - `'ongoing'`: for ongoing events\n * - `'past'`: for past events\n * This changes styling only.\n */\n readonly variant = input<'ongoing' | 'past'>(null);\n\n /**\n * Explicit string for day part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly day = input<string>(undefined);\n\n /**\n * Explicit string for month part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly month = input<string>(undefined);\n\n /**\n * Explicit string used as an accessible or verbose label for the month (optional).\n */\n readonly monthTitle = input<string>(undefined);\n\n /**\n * Explicit string for year part of the date (optional).\n * Used when date is not set or overridden manually.\n */\n readonly year = input<string>(undefined);\n\n locale = 'en';\n @HostBinding('class')\n get cssClasses(): string {\n const variant = this.variant();\n return [super.getCssClasses('ecl-date-block'), variant ? `ecl-date-block--${variant}` : ''].join(' ').trim();\n }\n\n /**\n * Sets the `datetime` attribute of the `<time>` element.\n * If not provided, it is derived from `date` and `dateFormat`.\n */\n @Input()\n @HostBinding('attr.datetime')\n get datetime(): string {\n return this.getDatetime();\n }\n set datetime(value) {\n this._datetime = value;\n }\n private _datetime: string = null;\n private translateService = inject(TranslateService);\n\n constructor() {\n super();\n const translateService = this.translateService;\n\n this.locale = translateService.currentLang();\n }\n\n private getDatetime(): string {\n return this._datetime || this.getFormattedDate(this.date(), this.dateFormat());\n }\n\n private getFormattedDate(date: Date, dateFormat: string): string {\n if (date) {\n return formatDate(date, dateFormat, this.translateService.currentLang());\n } else {\n return null;\n }\n }\n}\n","<span class=\"ecl-date-block__daytime\">{{ datetime || (date() | date: dateFormat()) }}</span>\n<span class=\"ecl-date-block__day\" aria-hidden=\"true\">{{ day() || (date() | date: 'd') }}</span>\n<abbr [title]=\"monthTitle() || month() || (date() | date: 'MMMM' : '' : locale)\" class=\"ecl-date-block__month\" aria-hidden=\"true\">\n {{ month() || (date() | date: 'MMM' : '' : locale) }}\n</abbr>\n<span class=\"ecl-date-block__year\" aria-hidden=\"true\">{{ year() || (date() | date: 'yyyy') }}</span>\n","import { EclDateBlockComponent } from './ecl-date-block.component';\n\nexport * from './ecl-date-block.component';\n\nexport const EUI_ECL_DATE_BLOCK = [\n EclDateBlockComponent,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;;;AAGG;AAOG,MAAO,qBAAsB,SAAQ,gBAAgB,CAAA;AA4CvD,IAAA,IACI,UAAU,GAAA;AACV,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,QAAA,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,CAAA,gBAAA,EAAmB,OAAO,CAAA,CAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IAChH;AAEA;;;AAGG;AACH,IAAA,IAEI,QAAQ,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE;IAC7B;IACA,IAAI,QAAQ,CAAC,KAAK,EAAA;AACd,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;IAC1B;AAIA,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;AAjEX;;AAEG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAO,SAAS;iFAAC;AAEtC;;;AAGG;QACM,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,WAAW;uFAAC;AAExC;;;;;AAKG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAqB,IAAI;oFAAC;AAElD;;;AAGG;QACM,IAAA,CAAA,GAAG,GAAG,KAAK,CAAS,SAAS;gFAAC;AAEvC;;;AAGG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,SAAS;kFAAC;A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