@eui/ecl 16.2.2 → 16.2.3-snapshot-1694704869693

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/docs/components/EclButtonComponent.html +69 -0
  2. package/docs/components/EclDateBlockComponent.html +47 -1
  3. package/docs/components/EclMenuComponent.html +417 -87
  4. package/docs/components/EclMenuItemComponent.html +254 -2
  5. package/docs/components/EclMenuMegaComponent.html +157 -1
  6. package/docs/dependencies.html +2 -2
  7. package/docs/interfaces/EclMenuItem.html +45 -0
  8. package/docs/js/menu-wc.js +3 -3
  9. package/docs/js/search/search_index.js +2 -2
  10. package/esm2022/lib/components/ecl-button/ecl-button.component.mjs +8 -7
  11. package/esm2022/lib/components/ecl-date-block/ecl-date-block.component.mjs +5 -3
  12. package/esm2022/lib/components/ecl-date-block/ecl-date-block.module.mjs +26 -2
  13. package/esm2022/lib/components/ecl-menu/ecl-menu/ecl-menu-item.component.mjs +78 -23
  14. package/esm2022/lib/components/ecl-menu/ecl-menu/ecl-menu.component.mjs +225 -17
  15. package/esm2022/lib/components/ecl-menu/ecl-menu-mega/ecl-menu-mega-item.component.mjs +1 -1
  16. package/esm2022/lib/components/ecl-menu/ecl-menu-mega/ecl-menu-mega.component.mjs +12 -5
  17. package/esm2022/lib/model/ecl-menu-item.model.mjs +1 -1
  18. package/fesm2022/eui-ecl.mjs +339 -44
  19. package/fesm2022/eui-ecl.mjs.map +1 -1
  20. package/lib/components/ecl-button/ecl-button.component.d.ts +3 -1
  21. package/lib/components/ecl-button/ecl-button.component.d.ts.map +1 -1
  22. package/lib/components/ecl-date-block/ecl-date-block.component.d.ts +1 -0
  23. package/lib/components/ecl-date-block/ecl-date-block.component.d.ts.map +1 -1
  24. package/lib/components/ecl-date-block/ecl-date-block.module.d.ts +24 -0
  25. package/lib/components/ecl-date-block/ecl-date-block.module.d.ts.map +1 -1
  26. package/lib/components/ecl-menu/ecl-menu/ecl-menu-item.component.d.ts +11 -1
  27. package/lib/components/ecl-menu/ecl-menu/ecl-menu-item.component.d.ts.map +1 -1
  28. package/lib/components/ecl-menu/ecl-menu/ecl-menu.component.d.ts +44 -9
  29. package/lib/components/ecl-menu/ecl-menu/ecl-menu.component.d.ts.map +1 -1
  30. package/lib/components/ecl-menu/ecl-menu-mega/ecl-menu-mega-item.component.d.ts.map +1 -1
  31. package/lib/components/ecl-menu/ecl-menu-mega/ecl-menu-mega.component.d.ts +5 -2
  32. package/lib/components/ecl-menu/ecl-menu-mega/ecl-menu-mega.component.d.ts.map +1 -1
  33. package/lib/model/ecl-menu-item.model.d.ts +1 -0
  34. package/lib/model/ecl-menu-item.model.d.ts.map +1 -1
  35. package/package.json +2 -2
@@ -17,6 +17,30 @@ import * as i2$2 from '@angular/router';
17
17
  import { RouterModule } from '@angular/router';
18
18
  import * as i1$2 from '@angular/cdk/layout';
19
19
  import { LayoutModule, Breakpoints } from '@angular/cdk/layout';
20
+ import '@angular/common/locales/global/bg';
21
+ import '@angular/common/locales/global/da';
22
+ import '@angular/common/locales/global/en';
23
+ import '@angular/common/locales/global/et';
24
+ import '@angular/common/locales/global/fr';
25
+ import '@angular/common/locales/global/hr';
26
+ import '@angular/common/locales/global/lv';
27
+ import '@angular/common/locales/global/hu';
28
+ import '@angular/common/locales/global/nl';
29
+ import '@angular/common/locales/global/pt';
30
+ import '@angular/common/locales/global/sk';
31
+ import '@angular/common/locales/global/fi';
32
+ import '@angular/common/locales/global/cs';
33
+ import '@angular/common/locales/global/de';
34
+ import '@angular/common/locales/global/el';
35
+ import '@angular/common/locales/global/es';
36
+ import '@angular/common/locales/global/ga';
37
+ import '@angular/common/locales/global/it';
38
+ import '@angular/common/locales/global/lt';
39
+ import '@angular/common/locales/global/mt';
40
+ import '@angular/common/locales/global/pl';
41
+ import '@angular/common/locales/global/ro';
42
+ import '@angular/common/locales/global/sl';
43
+ import '@angular/common/locales/global/sv';
20
44
  import * as Pikaday from 'pikaday';
21
45
  import * as i1$3 from '@angular/platform-browser';
22
46
  import * as Hammer from 'hammerjs';
@@ -764,10 +788,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImpor
764
788
  }] } });
765
789
 
766
790
  class EclButtonComponent extends ECLBaseDirective {
767
- constructor() {
768
- super(...arguments);
769
- this.variant = 'primary';
770
- }
771
791
  get cssClasses() {
772
792
  return [
773
793
  super.getCssClasses('ecl-button'),
@@ -777,6 +797,11 @@ class EclButtonComponent extends ECLBaseDirective {
777
797
  get hasIcon() {
778
798
  return this.iconComponents;
779
799
  }
800
+ constructor(el) {
801
+ super();
802
+ this.el = el;
803
+ this.variant = 'primary';
804
+ }
780
805
  ngAfterViewInit() {
781
806
  if (this.iconComponents) {
782
807
  setTimeout(() => {
@@ -792,13 +817,13 @@ class EclButtonComponent extends ECLBaseDirective {
792
817
  });
793
818
  }
794
819
  }
795
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
820
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
796
821
  /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.4", type: EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: { variant: "variant", containerStyleClass: "containerStyleClass" }, host: { properties: { "class": "this.cssClasses" } }, queries: [{ propertyName: "iconComponents", predicate: i0.forwardRef(function () { return EclIconComponent; }) }], usesInheritance: true, ngImport: i0, template: "<span *ngIf=\"hasIcon\" class=\"ecl-button__container {{ containerStyleClass }}\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</span>\n<ng-container *ngIf=\"!hasIcon\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</ng-container>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
797
822
  }
798
823
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclButtonComponent, decorators: [{
799
824
  type: Component,
800
825
  args: [{ selector: 'button[eclButton], button[ecl-button], a[eclButton]', template: "<span *ngIf=\"hasIcon\" class=\"ecl-button__container {{ containerStyleClass }}\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</span>\n<ng-container *ngIf=\"!hasIcon\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</ng-container>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>" }]
801
- }], propDecorators: { variant: [{
826
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { variant: [{
802
827
  type: Input
803
828
  }], containerStyleClass: [{
804
829
  type: Input
@@ -6653,7 +6678,9 @@ class EclDateBlockComponent extends ECLBaseDirective {
6653
6678
  this.translateService = translateService;
6654
6679
  this.dateFormat = 'dd/M/yyyy';
6655
6680
  this.variant = null;
6681
+ this.locale = 'en';
6656
6682
  this._datetime = null;
6683
+ this.locale = translateService.currentLang;
6657
6684
  }
6658
6685
  getDatetime() {
6659
6686
  return this._datetime || this.getFormattedDate(this.date, this.dateFormat);
@@ -6667,11 +6694,11 @@ class EclDateBlockComponent extends ECLBaseDirective {
6667
6694
  }
6668
6695
  }
6669
6696
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclDateBlockComponent, deps: [{ token: i2$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
6670
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.4", type: EclDateBlockComponent, selector: "time[eclDateBlock]", inputs: { date: "date", dateFormat: "dateFormat", variant: "variant", day: "day", month: "month", monthTitle: "monthTitle", year: "year", datetime: "datetime" }, 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\">{{ day || (date | date:'d') }}</span>\n<abbr [title]=\"monthTitle || month || (date | date:'MMMM')\" class=\"ecl-date-block__month\">\n {{ month || (date | date:'MMM') }}\n</abbr>\n<span class=\"ecl-date-block__year\">{{ year || (date | date:'yyyy') }}</span>", dependencies: [{ kind: "pipe", type: i1.DatePipe, name: "date" }] }); }
6697
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.4", type: EclDateBlockComponent, selector: "time[eclDateBlock]", inputs: { date: "date", dateFormat: "dateFormat", variant: "variant", day: "day", month: "month", monthTitle: "monthTitle", year: "year", datetime: "datetime" }, 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\">{{ day || (date | date:'d') }}</span>\n<abbr [title]=\"monthTitle || month || (date | date:'MMMM':'':locale)\" class=\"ecl-date-block__month\">\n {{ month || (date | date:'MMM':'':locale) }}\n</abbr>\n<span class=\"ecl-date-block__year\">{{ year || (date | date:'yyyy') }}</span>", dependencies: [{ kind: "pipe", type: i1.DatePipe, name: "date" }] }); }
6671
6698
  }
6672
6699
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclDateBlockComponent, decorators: [{
6673
6700
  type: Component,
6674
- args: [{ selector: 'time[eclDateBlock]', template: "<span class=\"ecl-date-block__daytime\">{{ datetime || (date | date:dateFormat) }}</span>\n<span class=\"ecl-date-block__day\">{{ day || (date | date:'d') }}</span>\n<abbr [title]=\"monthTitle || month || (date | date:'MMMM')\" class=\"ecl-date-block__month\">\n {{ month || (date | date:'MMM') }}\n</abbr>\n<span class=\"ecl-date-block__year\">{{ year || (date | date:'yyyy') }}</span>" }]
6701
+ args: [{ selector: 'time[eclDateBlock]', template: "<span class=\"ecl-date-block__daytime\">{{ datetime || (date | date:dateFormat) }}</span>\n<span class=\"ecl-date-block__day\">{{ day || (date | date:'d') }}</span>\n<abbr [title]=\"monthTitle || month || (date | date:'MMMM':'':locale)\" class=\"ecl-date-block__month\">\n {{ month || (date | date:'MMM':'':locale) }}\n</abbr>\n<span class=\"ecl-date-block__year\">{{ year || (date | date:'yyyy') }}</span>" }]
6675
6702
  }], ctorParameters: function () { return [{ type: i2$1.TranslateService }]; }, propDecorators: { date: [{
6676
6703
  type: Input
6677
6704
  }], dateFormat: [{
@@ -9231,9 +9258,10 @@ class EclMenuMegaComponent extends ECLBaseDirective {
9231
9258
  super.getCssClasses('ecl-menu__mega'),
9232
9259
  ].join(' ');
9233
9260
  }
9234
- constructor(differs) {
9261
+ constructor(differs, el) {
9235
9262
  super();
9236
9263
  this.differs = differs;
9264
+ this.el = el;
9237
9265
  this.isRtl = false;
9238
9266
  this.menuItemSelect = new EventEmitter();
9239
9267
  this.destroy$ = new Subject();
@@ -9286,8 +9314,8 @@ class EclMenuMegaComponent extends ECLBaseDirective {
9286
9314
  sendMenuItemSelectEvent(evt) {
9287
9315
  this.menuItemSelect.next(new EclMenuItemSelectEvent(evt.menuItem, evt.domEvent));
9288
9316
  }
9289
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclMenuMegaComponent, deps: [{ token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component }); }
9290
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.4", type: EclMenuMegaComponent, selector: "ecl-menu-mega", inputs: { isRtl: "isRtl" }, outputs: { menuItemSelect: "menuItemSelect" }, host: { properties: { "class.ecl-menu__mega--rtl": "this.isRtl", "class": "this.cssClasses" } }, queries: [{ propertyName: "eclMenuMegaItems", predicate: EclMenuMegaItemComponent }], usesInheritance: true, ngImport: i0, template: "<ul class=\"ecl-menu__sublist\">\n <ng-content></ng-content>\n</ul>\n" }); }
9317
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclMenuMegaComponent, deps: [{ token: i0.IterableDiffers }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
9318
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.4", type: EclMenuMegaComponent, selector: "ecl-menu-mega", inputs: { isRtl: "isRtl" }, outputs: { menuItemSelect: "menuItemSelect" }, host: { properties: { "class.ecl-menu__mega--rtl": "this.isRtl", "style.left.px": "this.offsetLeft", "style.right.px": "this.offsetRight", "class": "this.cssClasses" } }, queries: [{ propertyName: "eclMenuMegaItems", predicate: EclMenuMegaItemComponent }], usesInheritance: true, ngImport: i0, template: "<ul class=\"ecl-menu__sublist\">\n <ng-content></ng-content>\n</ul>\n" }); }
9291
9319
  }
9292
9320
  __decorate([
9293
9321
  coerceBoolean
@@ -9295,7 +9323,7 @@ __decorate([
9295
9323
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclMenuMegaComponent, decorators: [{
9296
9324
  type: Component,
9297
9325
  args: [{ selector: 'ecl-menu-mega', template: "<ul class=\"ecl-menu__sublist\">\n <ng-content></ng-content>\n</ul>\n" }]
9298
- }], ctorParameters: function () { return [{ type: i0.IterableDiffers }]; }, propDecorators: { isRtl: [{
9326
+ }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.ElementRef }]; }, propDecorators: { isRtl: [{
9299
9327
  type: Input
9300
9328
  }, {
9301
9329
  type: HostBinding,
@@ -9305,29 +9333,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImpor
9305
9333
  args: [EclMenuMegaItemComponent]
9306
9334
  }], menuItemSelect: [{
9307
9335
  type: Output
9336
+ }], offsetLeft: [{
9337
+ type: HostBinding,
9338
+ args: ['style.left.px']
9339
+ }], offsetRight: [{
9340
+ type: HostBinding,
9341
+ args: ['style.right.px']
9308
9342
  }], cssClasses: [{
9309
9343
  type: HostBinding,
9310
9344
  args: ['class']
9311
9345
  }] } });
9312
9346
 
9313
9347
  class EclMenuItemComponent extends ECLBaseDirective {
9314
- constructor() {
9315
- super(...arguments);
9316
- this.routerLink = null;
9317
- this.queryParams = null;
9318
- this.queryParamsHandling = null;
9319
- this.href = '';
9320
- this.target = '';
9321
- this.isCurrent = false;
9322
- this.isHovered = false;
9323
- this.menuItemSelect = new EventEmitter();
9324
- this.menuItemCaret = new EventEmitter();
9325
- this.menuItemHover = new EventEmitter();
9326
- this.menuItemHoverOut = new EventEmitter();
9327
- this.menuMegaItemSelect = new EventEmitter();
9328
- this.menuItemFocus = new EventEmitter();
9329
- this.destroy$ = new Subject();
9330
- }
9331
9348
  get cssClasses() {
9332
9349
  return [
9333
9350
  super.getCssClasses('ecl-menu__item'),
@@ -9348,6 +9365,28 @@ class EclMenuItemComponent extends ECLBaseDirective {
9348
9365
  get children() {
9349
9366
  return this.hasChildren ? this.submenu.eclMenuMegaItems.toArray() : [];
9350
9367
  }
9368
+ constructor(el, renderer, arf) {
9369
+ super();
9370
+ this.el = el;
9371
+ this.renderer = renderer;
9372
+ this.arf = arf;
9373
+ this.routerLink = null;
9374
+ this.queryParams = null;
9375
+ this.queryParamsHandling = null;
9376
+ this.href = '';
9377
+ this.target = '';
9378
+ this.isCurrent = false;
9379
+ this.isHovered = false;
9380
+ this.isVisible = true;
9381
+ this.isFull = false;
9382
+ this.menuItemSelect = new EventEmitter();
9383
+ this.menuItemCaret = new EventEmitter();
9384
+ this.menuItemHover = new EventEmitter();
9385
+ this.menuItemHoverOut = new EventEmitter();
9386
+ this.menuMegaItemSelect = new EventEmitter();
9387
+ this.menuItemFocus = new EventEmitter();
9388
+ this.destroy$ = new Subject();
9389
+ }
9351
9390
  onItemFocus(evt) {
9352
9391
  this.menuItemFocus.next(new EclMenuItemFocusEvent(this, evt));
9353
9392
  }
@@ -9382,6 +9421,52 @@ class EclMenuItemComponent extends ECLBaseDirective {
9382
9421
  this.destroy$.next(true);
9383
9422
  this.destroy$.unsubscribe();
9384
9423
  }
9424
+ checkMenuItem(maxLines, isMobileBreakpoint) {
9425
+ if (maxLines < 1)
9426
+ return;
9427
+ const currentItem = this.el.nativeElement;
9428
+ const currentLink = this.menuLink.nativeElement;
9429
+ if (isMobileBreakpoint) {
9430
+ currentLink.style.width = '100%';
9431
+ return;
9432
+ }
9433
+ this.renderer.setStyle(currentItem, 'alignItems', 'flex-start');
9434
+ const linkStyle = window.getComputedStyle(currentLink);
9435
+ const maxHeight = this.getMenuItemLinkMaxHeight(linkStyle, maxLines);
9436
+ if (currentLink.offsetHeight > maxHeight) {
9437
+ this.changeMenuItemLinkWidth(currentLink, maxLines, linkStyle);
9438
+ }
9439
+ this.renderer.removeStyle(currentItem, 'alignItems');
9440
+ }
9441
+ getMenuItemLinkMaxHeight(linkStyle, maxLines) {
9442
+ return parseInt(linkStyle.lineHeight, 10) * maxLines +
9443
+ parseInt(linkStyle.paddingTop, 10) +
9444
+ parseInt(linkStyle.paddingBottom, 10);
9445
+ }
9446
+ changeMenuItemLinkWidth(currentLink, maxLines, linkStyle) {
9447
+ this.renderer.setStyle(currentLink, 'white-space', 'nowrap');
9448
+ const linkWidth = currentLink.offsetWidth;
9449
+ if (maxLines === 1) {
9450
+ currentLink.style.width = `${linkWidth + parseInt(linkStyle.paddingLeft, 10) +
9451
+ parseInt(linkStyle.paddingRight, 10)}px`;
9452
+ this.renderer.removeStyle(currentLink, 'white-space');
9453
+ return;
9454
+ }
9455
+ const textSize = currentLink.text.length;
9456
+ const letterWidth = Math.ceil(linkWidth / textSize);
9457
+ const wordsArray = currentLink.text.trim().split(' ');
9458
+ const goalWidth = Math.ceil(linkWidth / maxLines);
9459
+ const firstWord = wordsArray[0];
9460
+ let cnt = 1;
9461
+ let wordWidth = Math.ceil((firstWord.length + 1) * letterWidth);
9462
+ while (wordWidth < goalWidth) {
9463
+ wordWidth += Math.ceil((wordsArray[cnt].length + 1) * letterWidth);
9464
+ cnt++;
9465
+ }
9466
+ currentLink.style.width = `${wordWidth + parseInt(linkStyle.paddingLeft, 10) +
9467
+ parseInt(linkStyle.paddingRight, 10)}px`;
9468
+ this.renderer.removeStyle(currentLink, 'white-space');
9469
+ }
9385
9470
  getClassDependingChildrenCnt() {
9386
9471
  if (this.hasChildren) {
9387
9472
  if (this.submenu.eclMenuMegaItems.length < 5 /* ColTrigger.COL1_TRIGGER */) {
@@ -9394,6 +9479,7 @@ class EclMenuItemComponent extends ECLBaseDirective {
9394
9479
  return 'ecl-menu__item--col3';
9395
9480
  }
9396
9481
  else {
9482
+ this.isFull = true;
9397
9483
  return 'ecl-menu__item--full';
9398
9484
  }
9399
9485
  }
@@ -9402,13 +9488,13 @@ class EclMenuItemComponent extends ECLBaseDirective {
9402
9488
  hasSubmenuAnySelections() {
9403
9489
  return this.submenu && !!this.submenu.eclMenuMegaItems.find(it => it.isCurrent);
9404
9490
  }
9405
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclMenuItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
9406
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.4", type: EclMenuItemComponent, selector: "ecl-menu-item", inputs: { id: "id", label: "label", routerLink: "routerLink", queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", href: "href", target: "target", isCurrent: "isCurrent" }, outputs: { menuItemSelect: "menuItemSelect", menuItemCaret: "menuItemCaret", menuItemHover: "menuItemHover", menuItemHoverOut: "menuItemHoverOut", menuMegaItemSelect: "menuMegaItemSelect", menuItemFocus: "menuItemFocus" }, host: { listeners: { "mouseenter": "onItemMouseEnter($event)", "mouseleave": "onItemMouseLeave($event)" }, properties: { "class": "this.cssClasses", "class.ecl-menu__item--has-children": "this.hasEclChildrenDataAttribute", "attr.aria-haspopup": "this.hasEclChildrenDataAttribute", "attr.aria-expanded": "this.isAriaExpanded" } }, queries: [{ propertyName: "submenu", first: true, predicate: i0.forwardRef(function () { return EclMenuMegaComponent; }), descendants: true }], usesInheritance: true, ngImport: i0, template: "<a *ngIf=\"href\" \n [href]=\"href\"\n [target]=\"target\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n (click)=\"onItemClick($event)\"\n (focus)=\"onItemFocus($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n<a *ngIf=\"!href\"\n [routerLink]=\"routerLink\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n (click)=\"onItemClick($event)\"\n (focus)=\"onItemFocus($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n<button eclButton \n *ngIf=\"hasChildren\"\n variant=\"primary\" \n class=\"ecl-menu__button-caret\" \n type=\"button\" \n aria-label=\"Access item's children\"\n (click)=\"onItemCaretClick($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n</button>\n<ng-content select=\"ecl-menu-mega\"></ng-content>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>", dependencies: [{ kind: "component", type: EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["variant", "containerStyleClass"] }, { kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "isInverted", "ariaHidden", "focusable"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
9491
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclMenuItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Component }); }
9492
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.4", type: EclMenuItemComponent, selector: "ecl-menu-item", inputs: { id: "id", label: "label", routerLink: "routerLink", queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", href: "href", target: "target", isCurrent: "isCurrent" }, outputs: { menuItemSelect: "menuItemSelect", menuItemCaret: "menuItemCaret", menuItemHover: "menuItemHover", menuItemHoverOut: "menuItemHoverOut", menuMegaItemSelect: "menuMegaItemSelect", menuItemFocus: "menuItemFocus" }, host: { listeners: { "mouseenter": "onItemMouseEnter($event)", "mouseleave": "onItemMouseLeave($event)" }, properties: { "class": "this.cssClasses", "class.ecl-menu__item--has-children": "this.hasEclChildrenDataAttribute", "attr.aria-haspopup": "this.hasEclChildrenDataAttribute", "attr.aria-expanded": "this.isAriaExpanded" } }, queries: [{ propertyName: "submenu", first: true, predicate: i0.forwardRef(function () { return EclMenuMegaComponent; }), descendants: true }], viewQueries: [{ propertyName: "menuLink", first: true, predicate: ["menuLink"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<a #menuLink *ngIf=\"href\" \n [href]=\"href\"\n [target]=\"target\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n (click)=\"onItemClick($event)\"\n (focus)=\"onItemFocus($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n<a #menuLink *ngIf=\"!href\"\n [routerLink]=\"routerLink\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n (click)=\"onItemClick($event)\"\n (focus)=\"onItemFocus($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n<button eclButton \n *ngIf=\"hasChildren\"\n variant=\"primary\" \n class=\"ecl-menu__button-caret\" \n type=\"button\" \n aria-label=\"Access item's children\"\n (click)=\"onItemCaretClick($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n</button>\n<ng-content select=\"ecl-menu-mega\"></ng-content>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>", dependencies: [{ kind: "component", type: EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["variant", "containerStyleClass"] }, { kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "isInverted", "ariaHidden", "focusable"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
9407
9493
  }
9408
9494
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclMenuItemComponent, decorators: [{
9409
9495
  type: Component,
9410
- args: [{ selector: 'ecl-menu-item', encapsulation: ViewEncapsulation.None, template: "<a *ngIf=\"href\" \n [href]=\"href\"\n [target]=\"target\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n (click)=\"onItemClick($event)\"\n (focus)=\"onItemFocus($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n<a *ngIf=\"!href\"\n [routerLink]=\"routerLink\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n (click)=\"onItemClick($event)\"\n (focus)=\"onItemFocus($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n<button eclButton \n *ngIf=\"hasChildren\"\n variant=\"primary\" \n class=\"ecl-menu__button-caret\" \n type=\"button\" \n aria-label=\"Access item's children\"\n (click)=\"onItemCaretClick($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n</button>\n<ng-content select=\"ecl-menu-mega\"></ng-content>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>" }]
9411
- }], propDecorators: { id: [{
9496
+ args: [{ selector: 'ecl-menu-item', encapsulation: ViewEncapsulation.None, template: "<a #menuLink *ngIf=\"href\" \n [href]=\"href\"\n [target]=\"target\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n (click)=\"onItemClick($event)\"\n (focus)=\"onItemFocus($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n<a #menuLink *ngIf=\"!href\"\n [routerLink]=\"routerLink\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n class=\"ecl-menu__link\"\n [class.ecl-menu__link--current]=\"isCurrent\"\n (click)=\"onItemClick($event)\"\n (focus)=\"onItemFocus($event)\">\n {{ label }}\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n<button eclButton \n *ngIf=\"hasChildren\"\n variant=\"primary\" \n class=\"ecl-menu__button-caret\" \n type=\"button\" \n aria-label=\"Access item's children\"\n (click)=\"onItemCaretClick($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"xs\" transform=\"rotate-180\" class=\"ecl-button__icon\"></ecl-icon>\n</button>\n<ng-content select=\"ecl-menu-mega\"></ng-content>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>" }]
9497
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ApplicationRef }]; }, propDecorators: { id: [{
9412
9498
  type: Input
9413
9499
  }], label: [{
9414
9500
  type: Input
@@ -9430,6 +9516,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImpor
9430
9516
  }], submenu: [{
9431
9517
  type: ContentChild,
9432
9518
  args: [forwardRef(() => EclMenuMegaComponent)]
9519
+ }], menuLink: [{
9520
+ type: ViewChild,
9521
+ args: ['menuLink']
9433
9522
  }], menuItemSelect: [{
9434
9523
  type: Output
9435
9524
  }], menuItemCaret: [{
@@ -9467,17 +9556,28 @@ class EclMenuComponent extends ECLBaseDirective {
9467
9556
  `ecl-menu--group${this.group}`,
9468
9557
  ].join(' ');
9469
9558
  }
9470
- constructor(differs, cdkBreakpointObserver) {
9559
+ constructor(el, differs, cdkBreakpointObserver, renderer) {
9471
9560
  super();
9561
+ this.el = el;
9472
9562
  this.differs = differs;
9473
9563
  this.cdkBreakpointObserver = cdkBreakpointObserver;
9564
+ this.renderer = renderer;
9474
9565
  this.group = '1';
9566
+ this.maxLines = 0;
9475
9567
  this.menuItemSelect = new EventEmitter();
9476
9568
  this.isHamburgerMenuOpened = false;
9477
9569
  this.isMobileBreakpoint = false;
9478
9570
  this.isMenuHidden = false;
9571
+ this.hasOverflow = false;
9572
+ this.isShowPrevBtn = false;
9573
+ this.isShowNextBtn = false;
9574
+ this.isCurrentItemVisible = false;
9479
9575
  this.destroy$ = new Subject();
9576
+ this.totalItemsWidth = 0;
9577
+ this.offsetLeft = 0;
9578
+ this.direction = 'ltr';
9480
9579
  this.hammertime = new Hammer.default(document, { inputClass: Hammer.TouchInput });
9580
+ this.TIMEOUT_INTERVAL = 150;
9481
9581
  this.differ = this.differs.find([]).create();
9482
9582
  }
9483
9583
  keyEvent(event) {
@@ -9487,6 +9587,16 @@ class EclMenuComponent extends ECLBaseDirective {
9487
9587
  this.closeHamburgerMenu();
9488
9588
  }
9489
9589
  }
9590
+ onResize() {
9591
+ clearTimeout(this.resizeTimer);
9592
+ this.resizeTimer = setTimeout(() => {
9593
+ this.renderer.removeClass(this.el.nativeElement, 'ecl-menu--transition');
9594
+ this.totalItemsWidth = 0;
9595
+ this.checkMenuItems();
9596
+ this.checkMenuOverflow();
9597
+ this.renderer.addClass(this.el.nativeElement, 'ecl-menu--transition');
9598
+ }, this.TIMEOUT_INTERVAL);
9599
+ }
9490
9600
  ngOnInit() {
9491
9601
  this.observeBreakpointChanges();
9492
9602
  this.observeSwipeGestures();
@@ -9494,17 +9604,24 @@ class EclMenuComponent extends ECLBaseDirective {
9494
9604
  ngAfterContentInit() {
9495
9605
  this.observeRootMenuItemsChanges();
9496
9606
  }
9497
- onSwipeLeft(evt) {
9607
+ ngAfterViewInit() {
9608
+ clearTimeout(this.resizeTimer);
9609
+ this.resizeTimer = setTimeout(() => {
9610
+ this.checkMenuItems();
9611
+ this.checkMenuOverflow();
9612
+ }, this.TIMEOUT_INTERVAL);
9613
+ }
9614
+ onSwipeLeft() {
9498
9615
  if (this.isMobileBreakpoint) {
9499
9616
  this.openHamburgerMenu();
9500
9617
  }
9501
9618
  }
9502
- onSwipeRight(evt) {
9619
+ onSwipeRight() {
9503
9620
  if (this.isMobileBreakpoint) {
9504
9621
  this.closeHamburgerMenu();
9505
9622
  }
9506
9623
  }
9507
- onOverlayClick(evt) {
9624
+ onOverlayClick() {
9508
9625
  this.closeHamburgerMenu();
9509
9626
  }
9510
9627
  onMenuOpenClick(evt) {
@@ -9526,6 +9643,132 @@ class EclMenuComponent extends ECLBaseDirective {
9526
9643
  this.hammertime.off('swipeleft');
9527
9644
  this.hammertime.off('swiperight');
9528
9645
  }
9646
+ onPrevBtnClick() {
9647
+ this.offsetLeft = 0;
9648
+ if (this.direction === 'rtl') {
9649
+ this.itemsList.nativeElement.style.right = '0';
9650
+ this.itemsList.nativeElement.style.left = 'auto';
9651
+ }
9652
+ else {
9653
+ this.itemsList.nativeElement.style.left = '0';
9654
+ this.itemsList.nativeElement.style.right = 'auto';
9655
+ }
9656
+ this.isShowPrevBtn = false;
9657
+ this.isShowNextBtn = true;
9658
+ this.refreshDisplay();
9659
+ }
9660
+ onNextBtnClick() {
9661
+ this.isShowPrevBtn = true;
9662
+ this.isShowNextBtn = false;
9663
+ if (this.direction === 'rtl') {
9664
+ this.showNextSlideRtl();
9665
+ }
9666
+ else {
9667
+ this.showNextSlideLtr();
9668
+ }
9669
+ this.refreshDisplay();
9670
+ }
9671
+ showNextSlideLtr() {
9672
+ const btnOffsetWidth = this.btnNext.el.nativeElement.offsetWidth;
9673
+ this.offsetLeft =
9674
+ this.lastVisibleItem.el.nativeElement.getBoundingClientRect().left -
9675
+ this.itemsList.nativeElement.getBoundingClientRect().left -
9676
+ btnOffsetWidth;
9677
+ this.itemsList.nativeElement.style.left = `-${this.offsetLeft}px`;
9678
+ this.itemsList.nativeElement.style.right = 'auto';
9679
+ }
9680
+ showNextSlideRtl() {
9681
+ const btnOffsetWidth = this.btnNext.el.nativeElement.offsetWidth;
9682
+ this.offsetLeft =
9683
+ this.itemsList.nativeElement.getBoundingClientRect().right -
9684
+ this.lastVisibleItem.el.nativeElement.getBoundingClientRect().right -
9685
+ btnOffsetWidth;
9686
+ this.itemsList.nativeElement.style.right = `-${this.offsetLeft}px`;
9687
+ this.itemsList.nativeElement.style.left = 'auto';
9688
+ }
9689
+ refreshDisplay() {
9690
+ this.eclRootMenuItems.forEach(item => {
9691
+ item.checkMenuItem(this.maxLines, this.isMobileBreakpoint);
9692
+ item.isVisible = !item.isVisible;
9693
+ });
9694
+ }
9695
+ checkMenuOverflow() {
9696
+ this.hasOverflow = this.totalItemsWidth > this.innerSection.nativeElement.offsetWidth;
9697
+ if (!this.hasOverflow || this.isMobileBreakpoint) {
9698
+ this.resetOverflowValues();
9699
+ return;
9700
+ }
9701
+ this.checkCurrentItem();
9702
+ this.resetVisibilityIndicator();
9703
+ if (this.offsetLeft === 0) {
9704
+ this.manageOverflowEnd();
9705
+ }
9706
+ else {
9707
+ this.manageOverflowBeginning();
9708
+ }
9709
+ }
9710
+ manageOverflowBeginning() {
9711
+ if (this.direction === 'rtl') {
9712
+ this.eclRootMenuItems.filter(item => item.el.nativeElement.getBoundingClientRect().right <=
9713
+ this.innerSection.nativeElement.getBoundingClientRect().right).forEach(el => el.isVisible = true);
9714
+ }
9715
+ else {
9716
+ this.eclRootMenuItems.filter(item => item.el.nativeElement.getBoundingClientRect().left >=
9717
+ this.innerSection.nativeElement.getBoundingClientRect().left).forEach(el => el.isVisible = true);
9718
+ }
9719
+ }
9720
+ manageOverflowEnd() {
9721
+ this.isShowNextBtn = true;
9722
+ if (this.direction === 'rtl') {
9723
+ for (const item of this.eclRootMenuItems) {
9724
+ if (item.el.nativeElement.getBoundingClientRect().left <
9725
+ this.itemsList.nativeElement.getBoundingClientRect().left) {
9726
+ this.lastVisibleItem = item;
9727
+ break;
9728
+ }
9729
+ item.isVisible = true;
9730
+ }
9731
+ }
9732
+ else {
9733
+ for (const item of this.eclRootMenuItems) {
9734
+ if (item.el.nativeElement.getBoundingClientRect().right >
9735
+ this.itemsList.nativeElement.getBoundingClientRect().right) {
9736
+ this.lastVisibleItem = item;
9737
+ break;
9738
+ }
9739
+ item.isVisible = true;
9740
+ }
9741
+ }
9742
+ }
9743
+ resetVisibilityIndicator() {
9744
+ this.eclRootMenuItems.forEach(item => item.isVisible = false);
9745
+ }
9746
+ resetOverflowValues() {
9747
+ this.isShowPrevBtn = false;
9748
+ this.isShowNextBtn = false;
9749
+ this.hasOverflow = false;
9750
+ this.itemsList.nativeElement.style.left = '0';
9751
+ this.offsetLeft = 0;
9752
+ this.totalItemsWidth = 0;
9753
+ this.lastVisibleItem = null;
9754
+ }
9755
+ checkCurrentItem() {
9756
+ this.currentItem = this.eclRootMenuItems.find(item => item.isCurrent);
9757
+ if (this.currentItem) {
9758
+ if (this.currentItem.isVisible) {
9759
+ this.isCurrentItemVisible = true;
9760
+ }
9761
+ else {
9762
+ this.isCurrentItemVisible = false;
9763
+ }
9764
+ }
9765
+ }
9766
+ checkMenuItems() {
9767
+ this.eclRootMenuItems.forEach(item => {
9768
+ item.checkMenuItem(this.maxLines, this.isMobileBreakpoint);
9769
+ this.totalItemsWidth += item.el.nativeElement.offsetWidth;
9770
+ });
9771
+ }
9529
9772
  get isMenuExpandedInMobile() {
9530
9773
  return this.isMobileBreakpoint && this.isAnyRootMenuItemExpanded();
9531
9774
  }
@@ -9588,9 +9831,40 @@ class EclMenuComponent extends ECLBaseDirective {
9588
9831
  }
9589
9832
  onRootMenuItemHovered(evt) {
9590
9833
  const requestedRootMenuItem = evt.menuItem;
9591
- requestedRootMenuItem.isHovered = true;
9592
- this.closeRootMenuButOneItem(requestedRootMenuItem);
9593
- this.showMenu();
9834
+ if (requestedRootMenuItem.isVisible) {
9835
+ if (!this.isMobileBreakpoint) {
9836
+ this.checkMegaMenu(requestedRootMenuItem);
9837
+ }
9838
+ requestedRootMenuItem.isHovered = true;
9839
+ this.closeRootMenuButOneItem(requestedRootMenuItem);
9840
+ this.showMenu();
9841
+ }
9842
+ }
9843
+ checkMegaMenu(menuItem) {
9844
+ if (menuItem.isFull) {
9845
+ if (menuItem.submenu.isRtl) {
9846
+ menuItem.submenu.offsetRight = this.offsetLeft;
9847
+ }
9848
+ else {
9849
+ menuItem.submenu.offsetLeft = this.offsetLeft;
9850
+ }
9851
+ return;
9852
+ }
9853
+ this.checkEnoughSpaceForMegaMenu(menuItem);
9854
+ }
9855
+ checkEnoughSpaceForMegaMenu(menuItem) {
9856
+ const megaBounding = menuItem.submenu.el.nativeElement.getBoundingClientRect();
9857
+ const containerBounding = this.innerSection.nativeElement.getBoundingClientRect();
9858
+ const menuItemBounding = menuItem.el.nativeElement.getBoundingClientRect();
9859
+ const megaWidth = megaBounding.width;
9860
+ const containerWidth = containerBounding.width;
9861
+ const menuItemPosition = menuItemBounding.left - containerBounding.left;
9862
+ if (menuItemPosition + megaWidth > containerWidth) {
9863
+ menuItem.submenu.isRtl = true;
9864
+ }
9865
+ else {
9866
+ menuItem.submenu.isRtl = false;
9867
+ }
9594
9868
  }
9595
9869
  onRootMenuItemHoveredOut(evt) {
9596
9870
  if (!this.isMobileBreakpoint) {
@@ -9628,6 +9902,7 @@ class EclMenuComponent extends ECLBaseDirective {
9628
9902
  }
9629
9903
  selectMenuItem(item) {
9630
9904
  item.isCurrent = true;
9905
+ this.currentItem = item;
9631
9906
  }
9632
9907
  hideMenu() {
9633
9908
  this.isMenuHidden = true;
@@ -9684,17 +9959,34 @@ class EclMenuComponent extends ECLBaseDirective {
9684
9959
  this.isMobileBreakpoint = result.matches;
9685
9960
  });
9686
9961
  }
9687
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclMenuComponent, deps: [{ token: i0.IterableDiffers }, { token: i1$2.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
9688
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.4", type: EclMenuComponent, selector: "ecl-menu", inputs: { group: "group" }, outputs: { menuItemSelect: "menuItemSelect" }, host: { listeners: { "keydown": "keyEvent($event)" }, properties: { "class": "this.cssClasses", "attr.aria-expanded": "this.isHamburgerMenuOpened", "class.ecl-menu--forced-mobile": "this.isMobileBreakpoint", "class.ecl-menu--forced-close": "this.isMenuHidden" } }, queries: [{ propertyName: "eclRootMenuItems", predicate: EclMenuItemComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-menu__overlay\" (click)=\"onOverlayClick($event)\"></div>\n<div class=\"ecl-container ecl-menu__container\">\n <a eclLink\n href=\"#\"\n variant=\"standalone\"\n class=\"ecl-menu__open\"\n (click)=\"onMenuOpenClick($event)\">\n <ecl-icon icon=\"hamburger\" size=\"s\"></ecl-icon> {{ 'ecl.menu.MENU' | translate }}\n </a>\n\n <section class=\"ecl-menu__inner\" [class.ecl-menu__inner--expanded]=\"isMenuExpandedInMobile\">\n <header class=\"ecl-menu__inner-header\">\n <button\n eclButton\n variant=\"text\"\n class=\"ecl-menu__close\"\n containerStyleClass=\"ecl-menu__close-container\"\n (click)=\"onMenuCloseClick($event)\">\n <ecl-icon icon=\"close-filled\" size=\"s\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n </button>\n\n <div class=\"ecl-menu__title\">{{ 'ecl.menu.MENU' | translate }}</div>\n\n <button eclButton\n variant=\"text\"\n class=\"ecl-menu__back\"\n (click)=\"onMenuBackClick($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.BACK' | translate }}</span>\n </button>\n </header>\n\n <ul class=\"ecl-menu__list\">\n <ng-content></ng-content>\n </ul>\n </section>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["variant", "containerStyleClass"] }, { kind: "directive", type: EclButtonLabelDirective, selector: "[eclButtonLabel]" }, { kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "isInverted", "ariaHidden", "focusable"] }, { kind: "directive", type: EclLinkDirective, selector: "[eclLink]", inputs: ["variant", "isNegative", "isNoVisited"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
9962
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.IterableDiffers }, { token: i1$2.BreakpointObserver }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
9963
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.4", type: EclMenuComponent, selector: "ecl-menu", inputs: { group: "group", maxLines: "maxLines" }, outputs: { menuItemSelect: "menuItemSelect" }, host: { listeners: { "keydown": "keyEvent($event)", "window:resize": "onResize()" }, properties: { "class": "this.cssClasses", "attr.aria-expanded": "this.isHamburgerMenuOpened", "class.ecl-menu--forced-mobile": "this.isMobileBreakpoint", "class.ecl-menu--forced-close": "this.isMenuHidden" } }, queries: [{ propertyName: "eclRootMenuItems", predicate: EclMenuItemComponent }], viewQueries: [{ propertyName: "innerSection", first: true, predicate: ["innerSection"], descendants: true }, { propertyName: "itemsList", first: true, predicate: ["itemsList"], descendants: true }, { propertyName: "btnPrevious", first: true, predicate: ["btnPrevious"], descendants: true }, { propertyName: "btnNext", first: true, predicate: ["btnNext"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-menu__overlay\"\n (click)=\"onOverlayClick()\"></div>\n<div class=\"ecl-container ecl-menu__container\">\n <a eclLink\n href=\"#\"\n variant=\"standalone\"\n class=\"ecl-menu__open\"\n (click)=\"onMenuOpenClick($event)\">\n <ecl-icon icon=\"hamburger\"\n size=\"s\"></ecl-icon> {{ 'ecl.menu.MENU' | translate }}\n </a>\n\n <section class=\"ecl-menu__inner\" #innerSection\n [class.ecl-menu__inner--expanded]=\"isMenuExpandedInMobile\"\n [class.ecl-menu__inner--has-overflow]=\"hasOverflow\">\n <header class=\"ecl-menu__inner-header\">\n <button eclButton\n variant=\"text\"\n class=\"ecl-menu__close\"\n containerStyleClass=\"ecl-menu__close-container\"\n (click)=\"onMenuCloseClick($event)\">\n <ecl-icon icon=\"close-filled\"\n size=\"s\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n </button>\n\n <div class=\"ecl-menu__title\">{{ 'ecl.menu.MENU' | translate }}</div>\n\n <button eclButton\n variant=\"text\"\n class=\"ecl-menu__back\"\n (click)=\"onMenuBackClick($event)\">\n <ecl-icon icon=\"corner-arrow\"\n size=\"s\"\n transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.BACK' | translate }}</span>\n </button>\n </header>\n <button eclButton #btnPrevious\n variant=\"ghost\"\n class=\"ecl-menu__item ecl-menu__items-previous\"\n [class.ecl-menu__item--current]=\"isCurrentItemVisible\"\n [style.display]=\"isShowPrevBtn ? 'block' : 'none'\"\n (click)=\"onPrevBtnClick()\">\n <ecl-icon icon=\"corner-arrow\"\n size=\"s\"\n transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel class=\"ecl-u-sr-only\">{{ 'ecl.common.PREVIOUS' | translate }}</span>\n </button>\n <button eclButton #btnNext\n variant=\"ghost\"\n class=\"ecl-menu__item ecl-menu__items-next\"\n [class.ecl-menu__item--current]=\"!isCurrentItemVisible\"\n [style.display]=\"isShowNextBtn ? 'block' : 'none'\"\n (click)=\"onNextBtnClick()\">\n <ecl-icon icon=\"corner-arrow\"\n size=\"s\"\n transform=\"rotate-90\"></ecl-icon>\n <span eclButtonLabel class=\"ecl-u-sr-only\">{{ 'ecl.common.NEXT' | translate }}</span>\n </button>\n <ul class=\"ecl-menu__list\" #itemsList>\n <ng-content></ng-content>\n </ul>\n </section>\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["variant", "containerStyleClass"] }, { kind: "directive", type: EclButtonLabelDirective, selector: "[eclButtonLabel]" }, { kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "isInverted", "ariaHidden", "focusable"] }, { kind: "directive", type: EclLinkDirective, selector: "[eclLink]", inputs: ["variant", "isNegative", "isNoVisited"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
9689
9964
  }
9965
+ __decorate([
9966
+ coerceNumber
9967
+ ], EclMenuComponent.prototype, "maxLines", void 0);
9690
9968
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: EclMenuComponent, decorators: [{
9691
9969
  type: Component,
9692
- args: [{ selector: 'ecl-menu', template: "<div class=\"ecl-menu__overlay\" (click)=\"onOverlayClick($event)\"></div>\n<div class=\"ecl-container ecl-menu__container\">\n <a eclLink\n href=\"#\"\n variant=\"standalone\"\n class=\"ecl-menu__open\"\n (click)=\"onMenuOpenClick($event)\">\n <ecl-icon icon=\"hamburger\" size=\"s\"></ecl-icon> {{ 'ecl.menu.MENU' | translate }}\n </a>\n\n <section class=\"ecl-menu__inner\" [class.ecl-menu__inner--expanded]=\"isMenuExpandedInMobile\">\n <header class=\"ecl-menu__inner-header\">\n <button\n eclButton\n variant=\"text\"\n class=\"ecl-menu__close\"\n containerStyleClass=\"ecl-menu__close-container\"\n (click)=\"onMenuCloseClick($event)\">\n <ecl-icon icon=\"close-filled\" size=\"s\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n </button>\n\n <div class=\"ecl-menu__title\">{{ 'ecl.menu.MENU' | translate }}</div>\n\n <button eclButton\n variant=\"text\"\n class=\"ecl-menu__back\"\n (click)=\"onMenuBackClick($event)\">\n <ecl-icon icon=\"corner-arrow\" size=\"s\" transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.BACK' | translate }}</span>\n </button>\n </header>\n\n <ul class=\"ecl-menu__list\">\n <ng-content></ng-content>\n </ul>\n </section>\n</div>\n", styles: [":host{display:block}\n"] }]
9693
- }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i1$2.BreakpointObserver }]; }, propDecorators: { group: [{
9970
+ args: [{ selector: 'ecl-menu', template: "<div class=\"ecl-menu__overlay\"\n (click)=\"onOverlayClick()\"></div>\n<div class=\"ecl-container ecl-menu__container\">\n <a eclLink\n href=\"#\"\n variant=\"standalone\"\n class=\"ecl-menu__open\"\n (click)=\"onMenuOpenClick($event)\">\n <ecl-icon icon=\"hamburger\"\n size=\"s\"></ecl-icon> {{ 'ecl.menu.MENU' | translate }}\n </a>\n\n <section class=\"ecl-menu__inner\" #innerSection\n [class.ecl-menu__inner--expanded]=\"isMenuExpandedInMobile\"\n [class.ecl-menu__inner--has-overflow]=\"hasOverflow\">\n <header class=\"ecl-menu__inner-header\">\n <button eclButton\n variant=\"text\"\n class=\"ecl-menu__close\"\n containerStyleClass=\"ecl-menu__close-container\"\n (click)=\"onMenuCloseClick($event)\">\n <ecl-icon icon=\"close-filled\"\n size=\"s\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n </button>\n\n <div class=\"ecl-menu__title\">{{ 'ecl.menu.MENU' | translate }}</div>\n\n <button eclButton\n variant=\"text\"\n class=\"ecl-menu__back\"\n (click)=\"onMenuBackClick($event)\">\n <ecl-icon icon=\"corner-arrow\"\n size=\"s\"\n transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel>{{ 'ecl.common.BACK' | translate }}</span>\n </button>\n </header>\n <button eclButton #btnPrevious\n variant=\"ghost\"\n class=\"ecl-menu__item ecl-menu__items-previous\"\n [class.ecl-menu__item--current]=\"isCurrentItemVisible\"\n [style.display]=\"isShowPrevBtn ? 'block' : 'none'\"\n (click)=\"onPrevBtnClick()\">\n <ecl-icon icon=\"corner-arrow\"\n size=\"s\"\n transform=\"rotate-270\"></ecl-icon>\n <span eclButtonLabel class=\"ecl-u-sr-only\">{{ 'ecl.common.PREVIOUS' | translate }}</span>\n </button>\n <button eclButton #btnNext\n variant=\"ghost\"\n class=\"ecl-menu__item ecl-menu__items-next\"\n [class.ecl-menu__item--current]=\"!isCurrentItemVisible\"\n [style.display]=\"isShowNextBtn ? 'block' : 'none'\"\n (click)=\"onNextBtnClick()\">\n <ecl-icon icon=\"corner-arrow\"\n size=\"s\"\n transform=\"rotate-90\"></ecl-icon>\n <span eclButtonLabel class=\"ecl-u-sr-only\">{{ 'ecl.common.NEXT' | translate }}</span>\n </button>\n <ul class=\"ecl-menu__list\" #itemsList>\n <ng-content></ng-content>\n </ul>\n </section>\n</div>", styles: [":host{display:block}\n"] }]
9971
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.IterableDiffers }, { type: i1$2.BreakpointObserver }, { type: i0.Renderer2 }]; }, propDecorators: { group: [{
9972
+ type: Input
9973
+ }], maxLines: [{
9694
9974
  type: Input
9695
9975
  }], eclRootMenuItems: [{
9696
9976
  type: ContentChildren,
9697
9977
  args: [EclMenuItemComponent]
9978
+ }], innerSection: [{
9979
+ type: ViewChild,
9980
+ args: ['innerSection']
9981
+ }], itemsList: [{
9982
+ type: ViewChild,
9983
+ args: ['itemsList']
9984
+ }], btnPrevious: [{
9985
+ type: ViewChild,
9986
+ args: ['btnPrevious']
9987
+ }], btnNext: [{
9988
+ type: ViewChild,
9989
+ args: ['btnNext']
9698
9990
  }], menuItemSelect: [{
9699
9991
  type: Output
9700
9992
  }], cssClasses: [{
@@ -9712,6 +10004,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImpor
9712
10004
  }], keyEvent: [{
9713
10005
  type: HostListener,
9714
10006
  args: ['keydown', ['$event']]
10007
+ }], onResize: [{
10008
+ type: HostListener,
10009
+ args: ['window:resize']
9715
10010
  }] } });
9716
10011
 
9717
10012
  const COMPONENTS$d = [