@eui/ecl 16.0.0-next.13 → 16.0.0-next.14
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/components/EclAppComponent.html +33 -0
- package/docs/components/EclIconComponent.html +2 -13
- package/docs/components/EclSiteHeaderComponent.html +24 -29
- package/docs/dependencies.html +2 -2
- package/docs/js/search/search_index.js +2 -2
- package/docs/miscellaneous/variables.html +9 -9
- package/esm2022/lib/components/ecl-app/ecl-app.component.mjs +11 -5
- package/esm2022/lib/components/ecl-breadcrumb/ecl-breadcrumb.component.mjs +5 -3
- package/esm2022/lib/components/ecl-icon/ecl-icon.component.mjs +27 -20
- package/esm2022/lib/components/ecl-site-header/ecl-site-header.component.mjs +15 -13
- package/fesm2022/eui-ecl.mjs +639 -622
- package/fesm2022/eui-ecl.mjs.map +1 -1
- package/lib/components/ecl-app/ecl-app.component.d.ts +3 -2
- package/lib/components/ecl-app/ecl-app.component.d.ts.map +1 -1
- package/lib/components/ecl-breadcrumb/ecl-breadcrumb.component.d.ts.map +1 -1
- package/lib/components/ecl-icon/ecl-icon.component.d.ts +5 -4
- package/lib/components/ecl-icon/ecl-icon.component.d.ts.map +1 -1
- package/lib/components/ecl-site-header/ecl-site-header.component.d.ts +5 -6
- package/lib/components/ecl-site-header/ecl-site-header.component.d.ts.map +1 -1
- package/package.json +1 -1
package/fesm2022/eui-ecl.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, HostBinding, Injectable, Optional, Inject, Component, ViewChild, EventEmitter, ChangeDetectionStrategy, Output, NgModule, ContentChildren, forwardRef,
|
|
2
|
+
import { Directive, Input, HostBinding, Injectable, Optional, Inject, Component, ViewChild, EventEmitter, ChangeDetectionStrategy, Output, NgModule, HostListener, ContentChildren, forwardRef, ElementRef, Self, ContentChild, ViewEncapsulation } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, formatDate } from '@angular/common';
|
|
5
5
|
import * as i2$1 from '@ngx-translate/core';
|
|
@@ -376,10 +376,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImpor
|
|
|
376
376
|
}] }]; } });
|
|
377
377
|
|
|
378
378
|
class EclIconComponent extends ECLBaseDirective {
|
|
379
|
-
constructor(el,
|
|
379
|
+
constructor(el, eclThemeService) {
|
|
380
380
|
super();
|
|
381
381
|
this.el = el;
|
|
382
|
-
this.cd = cd;
|
|
383
382
|
this.eclThemeService = eclThemeService;
|
|
384
383
|
this.iconSet = 'default';
|
|
385
384
|
this.size = 'xs';
|
|
@@ -387,21 +386,13 @@ class EclIconComponent extends ECLBaseDirective {
|
|
|
387
386
|
this.ariaHidden = true;
|
|
388
387
|
this.focusable = false;
|
|
389
388
|
}
|
|
389
|
+
ngOnChanges(changes) {
|
|
390
|
+
if (changes['icon']) {
|
|
391
|
+
this.initiateIconUrl();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
390
394
|
ngOnInit() {
|
|
391
|
-
this.
|
|
392
|
-
switch (this.iconSet) {
|
|
393
|
-
case 'default':
|
|
394
|
-
return of(`assets/images/ecl/${theme}/icons/sprites/icons.svg#${this.icon}`);
|
|
395
|
-
case 'social':
|
|
396
|
-
return of(`assets/images/ecl/${theme}/social-icons/sprites/icons-social.svg#${this.icon}`);
|
|
397
|
-
case 'social-media':
|
|
398
|
-
return of(`assets/images/ecl/${theme}/icons-social-media/sprites/icons-social-media.svg#${this.icon}`);
|
|
399
|
-
case 'flag':
|
|
400
|
-
return of(`assets/images/ecl/${theme}/icons-flag/sprites/icons-flag.svg#${this.icon}`);
|
|
401
|
-
default:
|
|
402
|
-
return of(`${this.iconSet}#${this.icon}`);
|
|
403
|
-
}
|
|
404
|
-
}));
|
|
395
|
+
this.initiateIconUrl();
|
|
405
396
|
}
|
|
406
397
|
ngAfterViewInit() {
|
|
407
398
|
const hostEl = this.getHostElement();
|
|
@@ -439,8 +430,24 @@ class EclIconComponent extends ECLBaseDirective {
|
|
|
439
430
|
getHostParentElement(hostEl) {
|
|
440
431
|
return hostEl.parentElement;
|
|
441
432
|
}
|
|
442
|
-
|
|
443
|
-
|
|
433
|
+
initiateIconUrl() {
|
|
434
|
+
this.iconUrl$ = this.eclThemeService.theme$.pipe(switchMap(theme => {
|
|
435
|
+
switch (this.iconSet) {
|
|
436
|
+
case 'default':
|
|
437
|
+
return of(`assets/images/ecl/${theme}/icons/sprites/icons.svg#${this.icon}`);
|
|
438
|
+
case 'social':
|
|
439
|
+
return of(`assets/images/ecl/${theme}/social-icons/sprites/icons-social.svg#${this.icon}`);
|
|
440
|
+
case 'social-media':
|
|
441
|
+
return of(`assets/images/ecl/${theme}/icons-social-media/sprites/icons-social-media.svg#${this.icon}`);
|
|
442
|
+
case 'flag':
|
|
443
|
+
return of(`assets/images/ecl/${theme}/icons-flag/sprites/icons-flag.svg#${this.icon}`);
|
|
444
|
+
default:
|
|
445
|
+
return of(`${this.iconSet}#${this.icon}`);
|
|
446
|
+
}
|
|
447
|
+
}));
|
|
448
|
+
}
|
|
449
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclIconComponent, deps: [{ token: i0.ElementRef }, { token: EclThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
450
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclIconComponent, selector: "ecl-icon", inputs: { iconSet: "iconSet", icon: "icon", size: "size", color: "color", transform: "transform", ariaLabelledby: "ariaLabelledby", role: "role", isInverted: "isInverted", ariaHidden: "ariaHidden", focusable: "focusable" }, viewQueries: [{ propertyName: "svgEl", first: true, predicate: ["svg"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg #svg\n [ngClass]=\"getClasses()\"\n [attr.aria-hidden]=\"ariaHidden\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n [attr.role]=\"role || null\"\n [attr.focusable]=\"focusable\">\n <use [attr.xlink:href]=\"iconUrl$ | async\"></use>\n <ng-content></ng-content>\n</svg>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
444
451
|
}
|
|
445
452
|
__decorate([
|
|
446
453
|
coerceBoolean
|
|
@@ -457,7 +464,7 @@ __decorate([
|
|
|
457
464
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclIconComponent, decorators: [{
|
|
458
465
|
type: Component,
|
|
459
466
|
args: [{ selector: 'ecl-icon', template: "<svg #svg\n [ngClass]=\"getClasses()\"\n [attr.aria-hidden]=\"ariaHidden\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n [attr.role]=\"role || null\"\n [attr.focusable]=\"focusable\">\n <use [attr.xlink:href]=\"iconUrl$ | async\"></use>\n <ng-content></ng-content>\n</svg>\n" }]
|
|
460
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type:
|
|
467
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: EclThemeService }]; }, propDecorators: { iconSet: [{
|
|
461
468
|
type: Input
|
|
462
469
|
}], icon: [{
|
|
463
470
|
type: Input
|
|
@@ -600,64 +607,32 @@ class EclDomEvent extends EclBaseEvent {
|
|
|
600
607
|
}
|
|
601
608
|
}
|
|
602
609
|
|
|
603
|
-
class
|
|
604
|
-
|
|
605
|
-
class EclSiteHeaderLoginBoxToggleEvent extends EclBaseEvent {
|
|
606
|
-
constructor(isOpen) {
|
|
610
|
+
class ECLClickOutsideDirective extends ECLBaseDirective {
|
|
611
|
+
constructor(elementRef) {
|
|
607
612
|
super();
|
|
608
|
-
this.
|
|
609
|
-
|
|
610
|
-
}
|
|
611
|
-
class EclSiteHeaderLoginComponent extends ECLBaseDirective {
|
|
612
|
-
constructor() {
|
|
613
|
-
super(...arguments);
|
|
614
|
-
this.isLoggedIn = false;
|
|
615
|
-
this.class = 'ecl-site-header__login-container';
|
|
616
|
-
this.login = new EventEmitter();
|
|
617
|
-
this.loginBoxToggle = new EventEmitter();
|
|
618
|
-
this.isLoginBoxActive = false;
|
|
613
|
+
this.elementRef = elementRef;
|
|
614
|
+
this.eclClickOutside = new EventEmitter();
|
|
619
615
|
}
|
|
620
|
-
|
|
621
|
-
const
|
|
622
|
-
if (
|
|
623
|
-
this.
|
|
616
|
+
onClick(target) {
|
|
617
|
+
const clickedInside = this.elementRef.nativeElement.contains(target);
|
|
618
|
+
if (!clickedInside) {
|
|
619
|
+
this.eclClickOutside.emit();
|
|
624
620
|
}
|
|
625
621
|
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
'ecl-site-header__login-box',
|
|
629
|
-
this.isLoginBoxActive ? 'ecl-site-header__login-box--active' : ''
|
|
630
|
-
].join(' ');
|
|
631
|
-
}
|
|
632
|
-
onLoginClick(evt) {
|
|
633
|
-
const event = new EclSiteHeaderLoginEvent();
|
|
634
|
-
this.login.next(event);
|
|
635
|
-
evt.preventDefault();
|
|
636
|
-
}
|
|
637
|
-
onLoginBoxToggle(evt) {
|
|
638
|
-
this.isLoginBoxActive = !this.isLoginBoxActive;
|
|
639
|
-
const event = new EclSiteHeaderLoginBoxToggleEvent(this.isLoginBoxActive);
|
|
640
|
-
this.loginBoxToggle.next(event);
|
|
641
|
-
evt.preventDefault();
|
|
642
|
-
}
|
|
643
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderLoginComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
644
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclSiteHeaderLoginComponent, selector: "ecl-site-header-login", inputs: { isLoggedIn: "isLoggedIn" }, outputs: { login: "login", loginBoxToggle: "loginBoxToggle" }, host: { properties: { "class": "this.class" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoggedIn\">\n <a href=\"#\"\n class=\"ecl-button ecl-button--ghost ecl-site-header__login-toggle\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginClick($event)\">\n <ecl-icon icon=\"log-in\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGIN' | translate }}\n </a>\n</ng-container>\n<ng-container *ngIf=\"isLoggedIn\">\n <a href=\"#\"\n class=\"ecl-button ecl-button--ghost ecl-site-header__login-toggle\"\n aria-controls=\"login-box-id\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginBoxToggle($event)\">\n <ecl-icon icon=\"logged-in\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGGED-IN' | translate }}\n <ecl-icon icon=\"corner-arrow\"\n size=\"xs\"\n class=\"ecl-site-header__login-arrow\"></ecl-icon>\n </a>\n <div class=\"{{ getLoginBoxCssClasses() }}\">\n <ng-content></ng-content>\n </div>\n</ng-container>", styles: [".ecl-site-header__login-toggle .ecl-site-header__login-arrow{display:inline-flex}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "isInverted", "ariaHidden", "focusable"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
622
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ECLClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
623
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: ECLClickOutsideDirective, isStandalone: true, selector: "[eclClickOutside]", outputs: { eclClickOutside: "eclClickOutside" }, host: { listeners: { "document:click": "onClick($event.target)" } }, usesInheritance: true, ngImport: i0 }); }
|
|
645
624
|
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}], propDecorators: {
|
|
653
|
-
type: Input
|
|
654
|
-
}], class: [{
|
|
655
|
-
type: HostBinding,
|
|
656
|
-
args: ['class']
|
|
657
|
-
}], login: [{
|
|
658
|
-
type: Output
|
|
659
|
-
}], loginBoxToggle: [{
|
|
625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ECLClickOutsideDirective, decorators: [{
|
|
626
|
+
type: Directive,
|
|
627
|
+
args: [{
|
|
628
|
+
selector: '[eclClickOutside]',
|
|
629
|
+
standalone: true
|
|
630
|
+
}]
|
|
631
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { eclClickOutside: [{
|
|
660
632
|
type: Output
|
|
633
|
+
}], onClick: [{
|
|
634
|
+
type: HostListener,
|
|
635
|
+
args: ['document:click', ['$event.target']]
|
|
661
636
|
}] } });
|
|
662
637
|
|
|
663
638
|
const hasNextSiblingWithAttribute = (element, attribute) => {
|
|
@@ -689,6 +664,104 @@ const hasPreviousSiblingWithAttribute = (element, attribute) => {
|
|
|
689
664
|
}
|
|
690
665
|
};
|
|
691
666
|
|
|
667
|
+
class EclLinkDirective extends ECLBaseDirective {
|
|
668
|
+
get cssClasses() {
|
|
669
|
+
return [
|
|
670
|
+
super.getCssClasses('ecl-link'),
|
|
671
|
+
this.variant ? `ecl-link--${this.variant}` : '',
|
|
672
|
+
].join(' ').trim();
|
|
673
|
+
}
|
|
674
|
+
get hasRightIcon() {
|
|
675
|
+
return this.isIconOnRightSide(this.eclIconComponents.toArray());
|
|
676
|
+
}
|
|
677
|
+
get hasLeftIcon() {
|
|
678
|
+
return this.isIconOnLeftSide(this.eclIconComponents.toArray());
|
|
679
|
+
}
|
|
680
|
+
get hasIcon() {
|
|
681
|
+
return this.eclIconComponents && this.eclIconComponents.length > 0;
|
|
682
|
+
}
|
|
683
|
+
constructor(el) {
|
|
684
|
+
super();
|
|
685
|
+
this.el = el;
|
|
686
|
+
}
|
|
687
|
+
ngAfterContentInit() {
|
|
688
|
+
if (this.eclIconComponents) {
|
|
689
|
+
setTimeout(() => {
|
|
690
|
+
this.eclIconComponents.forEach(icn => {
|
|
691
|
+
if (this.isIconOnLeftSide(this.eclIconComponents.toArray())) {
|
|
692
|
+
icn.class = 'ecl-link__icon ecl-link__icon--before';
|
|
693
|
+
}
|
|
694
|
+
else if (this.isIconOnRightSide(this.eclIconComponents.toArray())) {
|
|
695
|
+
icn.class = 'ecl-link__icon ecl-link__icon--after';
|
|
696
|
+
}
|
|
697
|
+
else {
|
|
698
|
+
icn.class = 'ecl-link__icon ecl-link__icon--before';
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
isIconOnRightSide(icons) {
|
|
705
|
+
return !!icons.find(icn => {
|
|
706
|
+
const iconEl = icn.el.nativeElement;
|
|
707
|
+
if (hasPreviousSiblingWithAttribute(iconEl, 'eclLinkLabel')) {
|
|
708
|
+
return true;
|
|
709
|
+
}
|
|
710
|
+
return false;
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
isIconOnLeftSide(icons) {
|
|
714
|
+
return !!icons.find(icn => {
|
|
715
|
+
const iconEl = icn.el.nativeElement;
|
|
716
|
+
if (hasNextSiblingWithAttribute(iconEl, 'eclLinkLabel')) {
|
|
717
|
+
return true;
|
|
718
|
+
}
|
|
719
|
+
return false;
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclLinkDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
723
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: EclLinkDirective, selector: "[eclLink]", inputs: { variant: "variant", isNegative: "isNegative", isNoVisited: "isNoVisited" }, host: { properties: { "class.ecl-link--negative": "this.isNegative", "class.ecl-link--no-visited": "this.isNoVisited", "class": "this.cssClasses", "class.ecl-link--icon-after": "this.hasRightIcon", "class.ecl-link--icon-before": "this.hasLeftIcon", "class.ecl-link--icon": "this.hasIcon" } }, queries: [{ propertyName: "eclIconComponents", predicate: i0.forwardRef(function () { return EclIconComponent; }) }], usesInheritance: true, ngImport: i0 }); }
|
|
724
|
+
}
|
|
725
|
+
__decorate([
|
|
726
|
+
coerceBoolean
|
|
727
|
+
], EclLinkDirective.prototype, "isNegative", void 0);
|
|
728
|
+
__decorate([
|
|
729
|
+
coerceBoolean
|
|
730
|
+
], EclLinkDirective.prototype, "isNoVisited", void 0);
|
|
731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclLinkDirective, decorators: [{
|
|
732
|
+
type: Directive,
|
|
733
|
+
args: [{
|
|
734
|
+
selector: '[eclLink]'
|
|
735
|
+
}]
|
|
736
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { variant: [{
|
|
737
|
+
type: Input
|
|
738
|
+
}], isNegative: [{
|
|
739
|
+
type: Input
|
|
740
|
+
}, {
|
|
741
|
+
type: HostBinding,
|
|
742
|
+
args: ['class.ecl-link--negative']
|
|
743
|
+
}], isNoVisited: [{
|
|
744
|
+
type: Input
|
|
745
|
+
}, {
|
|
746
|
+
type: HostBinding,
|
|
747
|
+
args: ['class.ecl-link--no-visited']
|
|
748
|
+
}], eclIconComponents: [{
|
|
749
|
+
type: ContentChildren,
|
|
750
|
+
args: [forwardRef(() => EclIconComponent)]
|
|
751
|
+
}], cssClasses: [{
|
|
752
|
+
type: HostBinding,
|
|
753
|
+
args: ['class']
|
|
754
|
+
}], hasRightIcon: [{
|
|
755
|
+
type: HostBinding,
|
|
756
|
+
args: ['class.ecl-link--icon-after']
|
|
757
|
+
}], hasLeftIcon: [{
|
|
758
|
+
type: HostBinding,
|
|
759
|
+
args: ['class.ecl-link--icon-before']
|
|
760
|
+
}], hasIcon: [{
|
|
761
|
+
type: HostBinding,
|
|
762
|
+
args: ['class.ecl-link--icon']
|
|
763
|
+
}] } });
|
|
764
|
+
|
|
692
765
|
class EclButtonComponent extends ECLBaseDirective {
|
|
693
766
|
constructor() {
|
|
694
767
|
super(...arguments);
|
|
@@ -736,680 +809,614 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImpor
|
|
|
736
809
|
args: ['class']
|
|
737
810
|
}] } });
|
|
738
811
|
|
|
739
|
-
class
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
].join(' ').trim();
|
|
812
|
+
class EclSiteHeaderLanguageSelectedEvent extends EclBaseEvent {
|
|
813
|
+
constructor(language) {
|
|
814
|
+
super();
|
|
815
|
+
this.language = language;
|
|
744
816
|
}
|
|
745
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclButtonLabelDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
746
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: EclButtonLabelDirective, selector: "[eclButtonLabel]", host: { properties: { "class": "this.cssClasses" } }, usesInheritance: true, ngImport: i0 }); }
|
|
747
817
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
818
|
+
class EclSiteHeaderLanguageCloseEvent extends EclBaseEvent {
|
|
819
|
+
}
|
|
820
|
+
class EclSiteHeaderLanguagePopoverComponent extends ECLBaseDirective {
|
|
821
|
+
constructor(popoverElementRef) {
|
|
822
|
+
super();
|
|
823
|
+
this.popoverElementRef = popoverElementRef;
|
|
824
|
+
this.euLanguages = [];
|
|
825
|
+
this.nonEuLanguages = [];
|
|
826
|
+
this.isHidden = false;
|
|
827
|
+
this.isPushRight = false;
|
|
828
|
+
this.isStack = false;
|
|
829
|
+
this.isFull = false;
|
|
830
|
+
this.languageClosed = new EventEmitter();
|
|
831
|
+
this.languageSelected = new EventEmitter();
|
|
832
|
+
this.role = 'dialog';
|
|
833
|
+
this.labelledBy = 'ecl-site-header__language-title';
|
|
834
|
+
}
|
|
759
835
|
get cssClasses() {
|
|
760
836
|
return [
|
|
761
|
-
super.getCssClasses('ecl-
|
|
837
|
+
super.getCssClasses('ecl-site-header__language-container'),
|
|
838
|
+
this.isPushRight ? 'ecl-site-header__language-container--push-right' : '',
|
|
839
|
+
this.isFull ? 'ecl-site-header__language-container--full' : '',
|
|
762
840
|
].join(' ').trim();
|
|
763
841
|
}
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}
|
|
767
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclFormGroupComponent, decorators: [{
|
|
768
|
-
type: Component,
|
|
769
|
-
args: [{ selector: '[eclFormGroup], ecl-form-group', template: "<ng-content></ng-content>" }]
|
|
770
|
-
}], propDecorators: { cssClasses: [{
|
|
771
|
-
type: HostBinding,
|
|
772
|
-
args: ['class']
|
|
773
|
-
}] } });
|
|
774
|
-
|
|
775
|
-
class EclFormLabelComponent extends ECLBaseDirective {
|
|
776
|
-
constructor() {
|
|
777
|
-
super(...arguments);
|
|
778
|
-
this.isOptional = false;
|
|
779
|
-
this.isInvalid = false;
|
|
780
|
-
this.isDisabled = false;
|
|
781
|
-
this.isRequired = false;
|
|
842
|
+
get isModal() {
|
|
843
|
+
return !this.isHidden || undefined;
|
|
782
844
|
}
|
|
783
|
-
get
|
|
784
|
-
return
|
|
785
|
-
super.getCssClasses('ecl-form-label'),
|
|
786
|
-
this.isInvalid ? 'ecl-form-label--invalid' : '',
|
|
787
|
-
this.isDisabled ? 'ecl-form-label--disabled' : '',
|
|
788
|
-
].join(' ').trim();
|
|
845
|
+
get isDropdownHidden() {
|
|
846
|
+
return this.isHidden || undefined;
|
|
789
847
|
}
|
|
790
|
-
|
|
791
|
-
|
|
848
|
+
onCloseClick() {
|
|
849
|
+
this.languageClosed.next(new EclSiteHeaderLanguageCloseEvent());
|
|
850
|
+
}
|
|
851
|
+
onLanguageClick(language, evt) {
|
|
852
|
+
this.languageCode = language.code;
|
|
853
|
+
this.languageSelected.next(new EclSiteHeaderLanguageSelectedEvent(language));
|
|
854
|
+
evt.preventDefault();
|
|
855
|
+
}
|
|
856
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderLanguagePopoverComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
857
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclSiteHeaderLanguagePopoverComponent, selector: "ecl-site-header-language-popover", inputs: { languageCode: "languageCode", euLanguages: "euLanguages", nonEuLanguages: "nonEuLanguages", euColumnsCount: "euColumnsCount", nonEuColumnsCount: "nonEuColumnsCount", isHidden: "isHidden", isPushRight: "isPushRight", isStack: "isStack", isFull: "isFull", rightPosition: "rightPosition", languageArrowPosition: "languageArrowPosition" }, outputs: { languageClosed: "languageClosed", languageSelected: "languageSelected" }, host: { properties: { "style.right": "this.rightPosition", "style.--ecl-language-arrow-position": "this.languageArrowPosition", "attr.role": "this.role", "attr.aria-labelledby": "this.labelledBy", "class": "this.cssClasses", "attr.aria-modal": "this.isModal", "attr.hidden": "this.isDropdownHidden" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-site-header__language-header\">\n <div class=\"ecl-site-header__language-title\">\n {{ 'ecl.language-list.SELECT-LANGUAGE' | translate }}\n </div>\n <button eclButton\n variant=\"ghost\"\n class=\"ecl-site-header__language-close\"\n (click)=\"onCloseClick()\">\n <span class=\"ecl-u-sr-only\">\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close-filled\"\n size=\"s\">\n </ecl-icon>\n </button>\n</div>\n\n<div class=\"ecl-site-header__language-content\" \n [class.ecl-site-header__language-content--stack]=\"isStack\">\n <div *ngIf=\"euLanguages.length\" \n class=\"ecl-site-header__language-category ecl-site-header__language-category--{{ euColumnsCount }}-col\">\n <div class=\"ecl-site-header__language-category-title\">\n {{ 'ecl.language-list.EU-LANGUAGES' | translate }}\n </div>\n <ul class=\"ecl-site-header__language-list\">\n <li *ngFor=\"let item of euLanguages\"\n class=\"ecl-site-header__language-item\">\n <a eclLink\n href=\"#\"\n variant=\"standalone\"\n class=\"ecl-site-header__language-link\"\n [class.ecl-site-header__language-link--active]=\"item.code === languageCode\"\n (click)=\"onLanguageClick(item, $event)\">\n <span class=\"ecl-site-header__language-link-code\">{{ item.code }}</span>\n <span class=\"ecl-site-header__language-link-label\">{{ item.label }}</span>\n </a>\n </li>\n </ul>\n </div>\n <div *ngIf=\"nonEuLanguages.length\" \n class=\"ecl-site-header__language-category ecl-site-header__language-category--{{ nonEuColumnsCount }}-col\">\n <div class=\"ecl-site-header__language-category-title\">\n {{ 'ecl.language-list.NON-EU-LANGUAGES' | translate }}\n </div>\n <ul class=\"ecl-site-header__language-list\">\n <li *ngFor=\"let item of nonEuLanguages\"\n class=\"ecl-site-header__language-item\">\n <a eclLink\n href=\"#\"\n variant=\"standalone\"\n class=\"ecl-site-header__language-link\"\n [class.ecl-site-header__language-link--active]=\"item.code === languageCode\"\n (click)=\"onLanguageClick(item, $event)\">\n <span class=\"ecl-site-header__language-link-code\">{{ item.code }}</span>\n <span class=\"ecl-site-header__language-link-label\">{{ item.label }}</span>\n </a>\n </li>\n </ul>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: EclLinkDirective, selector: "[eclLink]", inputs: ["variant", "isNegative", "isNoVisited"] }, { 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: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
792
858
|
}
|
|
793
|
-
|
|
794
|
-
coerceBoolean
|
|
795
|
-
], EclFormLabelComponent.prototype, "isOptional", void 0);
|
|
796
|
-
__decorate([
|
|
797
|
-
coerceBoolean
|
|
798
|
-
], EclFormLabelComponent.prototype, "isInvalid", void 0);
|
|
799
|
-
__decorate([
|
|
800
|
-
coerceBoolean
|
|
801
|
-
], EclFormLabelComponent.prototype, "isDisabled", void 0);
|
|
802
|
-
__decorate([
|
|
803
|
-
coerceBoolean
|
|
804
|
-
], EclFormLabelComponent.prototype, "isRequired", void 0);
|
|
805
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclFormLabelComponent, decorators: [{
|
|
859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderLanguagePopoverComponent, decorators: [{
|
|
806
860
|
type: Component,
|
|
807
|
-
args: [{ selector: '
|
|
808
|
-
}], propDecorators: {
|
|
861
|
+
args: [{ selector: 'ecl-site-header-language-popover', template: "<div class=\"ecl-site-header__language-header\">\n <div class=\"ecl-site-header__language-title\">\n {{ 'ecl.language-list.SELECT-LANGUAGE' | translate }}\n </div>\n <button eclButton\n variant=\"ghost\"\n class=\"ecl-site-header__language-close\"\n (click)=\"onCloseClick()\">\n <span class=\"ecl-u-sr-only\">\n {{ 'ecl.common.CLOSE' | translate }}\n </span>\n <ecl-icon icon=\"close-filled\"\n size=\"s\">\n </ecl-icon>\n </button>\n</div>\n\n<div class=\"ecl-site-header__language-content\" \n [class.ecl-site-header__language-content--stack]=\"isStack\">\n <div *ngIf=\"euLanguages.length\" \n class=\"ecl-site-header__language-category ecl-site-header__language-category--{{ euColumnsCount }}-col\">\n <div class=\"ecl-site-header__language-category-title\">\n {{ 'ecl.language-list.EU-LANGUAGES' | translate }}\n </div>\n <ul class=\"ecl-site-header__language-list\">\n <li *ngFor=\"let item of euLanguages\"\n class=\"ecl-site-header__language-item\">\n <a eclLink\n href=\"#\"\n variant=\"standalone\"\n class=\"ecl-site-header__language-link\"\n [class.ecl-site-header__language-link--active]=\"item.code === languageCode\"\n (click)=\"onLanguageClick(item, $event)\">\n <span class=\"ecl-site-header__language-link-code\">{{ item.code }}</span>\n <span class=\"ecl-site-header__language-link-label\">{{ item.label }}</span>\n </a>\n </li>\n </ul>\n </div>\n <div *ngIf=\"nonEuLanguages.length\" \n class=\"ecl-site-header__language-category ecl-site-header__language-category--{{ nonEuColumnsCount }}-col\">\n <div class=\"ecl-site-header__language-category-title\">\n {{ 'ecl.language-list.NON-EU-LANGUAGES' | translate }}\n </div>\n <ul class=\"ecl-site-header__language-list\">\n <li *ngFor=\"let item of nonEuLanguages\"\n class=\"ecl-site-header__language-item\">\n <a eclLink\n href=\"#\"\n variant=\"standalone\"\n class=\"ecl-site-header__language-link\"\n [class.ecl-site-header__language-link--active]=\"item.code === languageCode\"\n (click)=\"onLanguageClick(item, $event)\">\n <span class=\"ecl-site-header__language-link-code\">{{ item.code }}</span>\n <span class=\"ecl-site-header__language-link-label\">{{ item.label }}</span>\n </a>\n </li>\n </ul>\n </div>\n</div>" }]
|
|
862
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { languageCode: [{
|
|
809
863
|
type: Input
|
|
810
|
-
}],
|
|
864
|
+
}], euLanguages: [{
|
|
811
865
|
type: Input
|
|
812
|
-
}],
|
|
866
|
+
}], nonEuLanguages: [{
|
|
813
867
|
type: Input
|
|
814
|
-
}],
|
|
868
|
+
}], euColumnsCount: [{
|
|
869
|
+
type: Input
|
|
870
|
+
}], nonEuColumnsCount: [{
|
|
871
|
+
type: Input
|
|
872
|
+
}], isHidden: [{
|
|
815
873
|
type: Input
|
|
874
|
+
}], isPushRight: [{
|
|
875
|
+
type: Input
|
|
876
|
+
}], isStack: [{
|
|
877
|
+
type: Input
|
|
878
|
+
}], isFull: [{
|
|
879
|
+
type: Input
|
|
880
|
+
}], rightPosition: [{
|
|
881
|
+
type: Input
|
|
882
|
+
}, {
|
|
883
|
+
type: HostBinding,
|
|
884
|
+
args: ['style.right']
|
|
885
|
+
}], languageArrowPosition: [{
|
|
886
|
+
type: Input
|
|
887
|
+
}, {
|
|
888
|
+
type: HostBinding,
|
|
889
|
+
args: ['style.--ecl-language-arrow-position']
|
|
890
|
+
}], languageClosed: [{
|
|
891
|
+
type: Output
|
|
892
|
+
}], languageSelected: [{
|
|
893
|
+
type: Output
|
|
894
|
+
}], role: [{
|
|
895
|
+
type: HostBinding,
|
|
896
|
+
args: ['attr.role']
|
|
897
|
+
}], labelledBy: [{
|
|
898
|
+
type: HostBinding,
|
|
899
|
+
args: ['attr.aria-labelledby']
|
|
816
900
|
}], cssClasses: [{
|
|
817
901
|
type: HostBinding,
|
|
818
902
|
args: ['class']
|
|
903
|
+
}], isModal: [{
|
|
904
|
+
type: HostBinding,
|
|
905
|
+
args: ['attr.aria-modal']
|
|
906
|
+
}], isDropdownHidden: [{
|
|
907
|
+
type: HostBinding,
|
|
908
|
+
args: ['attr.hidden']
|
|
819
909
|
}] } });
|
|
820
910
|
|
|
821
|
-
class
|
|
911
|
+
class EclSiteHeaderLanguageClickEvent extends EclBaseEvent {
|
|
912
|
+
}
|
|
913
|
+
class EclSiteHeaderLanguageComponent extends ECLBaseDirective {
|
|
914
|
+
get languageCodes() {
|
|
915
|
+
return this._languageCodes;
|
|
916
|
+
}
|
|
917
|
+
set languageCodes(value) {
|
|
918
|
+
this._languageCodes = value;
|
|
919
|
+
this.updateLanguages();
|
|
920
|
+
}
|
|
822
921
|
get cssClasses() {
|
|
823
922
|
return [
|
|
824
|
-
super.getCssClasses('ecl-
|
|
825
|
-
this.eclSize ? `ecl-text-input--${this.eclSize}` : '',
|
|
923
|
+
super.getCssClasses('ecl-site-header__language'),
|
|
826
924
|
].join(' ').trim();
|
|
827
925
|
}
|
|
828
|
-
constructor(
|
|
926
|
+
constructor(eclLanguageService, eclSiteHeader) {
|
|
829
927
|
super();
|
|
830
|
-
this.
|
|
831
|
-
this.
|
|
832
|
-
this.
|
|
833
|
-
this.
|
|
928
|
+
this.eclLanguageService = eclLanguageService;
|
|
929
|
+
this.eclSiteHeader = eclSiteHeader;
|
|
930
|
+
this.languageCode = 'en';
|
|
931
|
+
this._languageCodes = [];
|
|
932
|
+
this.languageClick = new EventEmitter();
|
|
933
|
+
this.languageSelected = new EventEmitter();
|
|
934
|
+
this.MOBILE_BREAKPOINT = 768;
|
|
935
|
+
this.LANGUAGE_MAX_COLUMNS = 8;
|
|
936
|
+
this.isLanguagesDropdownVisible = false;
|
|
937
|
+
this.euLanguages = [];
|
|
938
|
+
this.nonEuLanguages = [];
|
|
939
|
+
this.euColumnsCount = 1;
|
|
940
|
+
this.nonEuColumnsCount = 1;
|
|
834
941
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
942
|
+
ngOnInit() {
|
|
943
|
+
this.updateLanguages();
|
|
944
|
+
}
|
|
945
|
+
ngOnChanges(changes) {
|
|
946
|
+
if (changes['languageCodes']) {
|
|
947
|
+
this.updateLanguages();
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
getLanguageLabel() {
|
|
951
|
+
return this.eclLanguageService.getLanguageByCode(this.languageCode)?.label;
|
|
952
|
+
}
|
|
953
|
+
onLanguageClick(evt) {
|
|
954
|
+
this.isLanguagesDropdownVisible = !this.isLanguagesDropdownVisible;
|
|
955
|
+
if (this.isLanguagesDropdownVisible) {
|
|
956
|
+
this.calculatePopoverPosition();
|
|
838
957
|
}
|
|
839
958
|
else {
|
|
840
|
-
|
|
959
|
+
setTimeout(() => {
|
|
960
|
+
this.isFull = false;
|
|
961
|
+
this.isStack = false;
|
|
962
|
+
this.isPushRight = false;
|
|
963
|
+
this.rightPosition = undefined;
|
|
964
|
+
this.languageArrowPosition = undefined;
|
|
965
|
+
});
|
|
841
966
|
}
|
|
967
|
+
this.languageClick.next(new EclSiteHeaderLanguageClickEvent());
|
|
968
|
+
evt.preventDefault();
|
|
842
969
|
}
|
|
843
|
-
|
|
844
|
-
|
|
970
|
+
onLanguageClosed(evt) {
|
|
971
|
+
this.isLanguagesDropdownVisible = false;
|
|
972
|
+
}
|
|
973
|
+
onLanguageSelected(evt) {
|
|
974
|
+
this.languageCode = evt.language.code;
|
|
975
|
+
this.isLanguagesDropdownVisible = false;
|
|
976
|
+
this.languageSelected.next(new EclSiteHeaderLanguageSelectedEvent(evt.language));
|
|
977
|
+
}
|
|
978
|
+
onClickOutside() {
|
|
979
|
+
this.isLanguagesDropdownVisible = false;
|
|
980
|
+
}
|
|
981
|
+
onEscapeKeydownHandler() {
|
|
982
|
+
this.isLanguagesDropdownVisible = false;
|
|
983
|
+
}
|
|
984
|
+
hasLanguageCodes() {
|
|
985
|
+
return this.languageCodes && this.languageCodes.length > 0;
|
|
986
|
+
}
|
|
987
|
+
updateLanguages() {
|
|
988
|
+
const languages = this.eclLanguageService.getLanguagesByCodes(this.languageCodes);
|
|
989
|
+
this.euLanguages = languages.filter(item => {
|
|
990
|
+
return this.eclLanguageService.isEuLanguage(item.code);
|
|
991
|
+
});
|
|
992
|
+
this.nonEuLanguages = languages.filter(item => {
|
|
993
|
+
return !this.eclLanguageService.isEuLanguage(item.code);
|
|
994
|
+
});
|
|
995
|
+
this.euColumnsCount = Math.ceil(this.euLanguages.length / this.LANGUAGE_MAX_COLUMNS);
|
|
996
|
+
this.nonEuColumnsCount = Math.ceil(this.nonEuLanguages.length / this.LANGUAGE_MAX_COLUMNS);
|
|
997
|
+
}
|
|
998
|
+
calculatePopoverPosition() {
|
|
999
|
+
setTimeout(() => {
|
|
1000
|
+
if (this.hasLanguageCodes()) {
|
|
1001
|
+
const arrowSize = '0.5rem';
|
|
1002
|
+
const containerElement = this.eclSiteHeader.topContainerElement;
|
|
1003
|
+
const containerRect = containerElement.getBoundingClientRect();
|
|
1004
|
+
const linkRect = this.languageLinkElement.getBoundingClientRect();
|
|
1005
|
+
const popoverRect = this.languagePopoverElement.getBoundingClientRect();
|
|
1006
|
+
const screenWidth = window.innerWidth;
|
|
1007
|
+
const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
|
|
1008
|
+
this.isFull = false;
|
|
1009
|
+
this.isStack = false;
|
|
1010
|
+
this.isPushRight = false;
|
|
1011
|
+
this.rightPosition = undefined;
|
|
1012
|
+
this.languageArrowPosition = undefined;
|
|
1013
|
+
if (popoverRect.width > containerRect.width) {
|
|
1014
|
+
this.isStack = true;
|
|
1015
|
+
if (this.nonEuLanguages.length) {
|
|
1016
|
+
this.nonEuColumnsCount = Math.max(this.euColumnsCount, this.nonEuColumnsCount);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
if (popoverRect.right > screenWidth) {
|
|
1020
|
+
const arrowPosition = containerRect.right - linkRect.right + linkRect.width / 2;
|
|
1021
|
+
this.isPushRight = true;
|
|
1022
|
+
this.rightPosition = `-${containerRect.right - linkRect.right}px`;
|
|
1023
|
+
this.languageArrowPosition = `calc(${arrowPosition}px - ${arrowSize})`;
|
|
1024
|
+
}
|
|
1025
|
+
if (vw < this.MOBILE_BREAKPOINT) {
|
|
1026
|
+
const arrowPosition = popoverRect.right - linkRect.right + linkRect.width / 2;
|
|
1027
|
+
this.isFull = true;
|
|
1028
|
+
this.languageArrowPosition = `calc(${arrowPosition}px - ${arrowSize})`;
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderLanguageComponent, deps: [{ token: EclLanguageService }, { token: EclSiteHeaderComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1034
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclSiteHeaderLanguageComponent, selector: "ecl-site-header-language", inputs: { languageCode: "languageCode", languageCodes: "languageCodes", languageLabel: "languageLabel" }, outputs: { languageClick: "languageClick", languageSelected: "languageSelected" }, host: { listeners: { "eclClickOutside": "onClickOutside()", "document:keydown.escape": "onEscapeKeydownHandler()" }, properties: { "class": "this.cssClasses" } }, viewQueries: [{ propertyName: "languagePopoverElement", first: true, predicate: ["languagePopover"], descendants: true, read: ElementRef }, { propertyName: "languageLinkElement", first: true, predicate: ["languageLink"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: ECLClickOutsideDirective, outputs: ["eclClickOutside", "eclClickOutside"] }], ngImport: i0, template: "<a href=\"#\"\n #languageLink\n class=\"ecl-button ecl-button--ghost ecl-site-header__language-selector ecl-u-d-block\"\n aria-controls=\"language-list-overlay\"\n [attr.aria-label]=\"'ecl.language-list.SELECT-LANGUAGE' | translate\"\n [attr.aria-expanded]=\"isLanguagesDropdownVisible\"\n (click)=\"onLanguageClick($event)\">\n <span class=\"ecl-site-header__language-icon\">\n <ecl-icon icon=\"language\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n <span class=\"ecl-site-header__language-code\">{{ languageCode }}</span>\n </span>\n {{ getLanguageLabel() }}\n</a>\n\n<ecl-site-header-language-popover \n #languagePopover\n *ngIf=\"hasLanguageCodes()\"\n [languageCode]=\"languageCode\"\n [euLanguages]=\"euLanguages\"\n [nonEuLanguages]=\"nonEuLanguages\"\n [euColumnsCount]=\"euColumnsCount\"\n [nonEuColumnsCount]=\"nonEuColumnsCount\"\n [isHidden]=\"!isLanguagesDropdownVisible\" \n [isStack]=\"isStack\"\n [isPushRight]=\"isPushRight\"\n [isFull]=\"isFull\"\n [rightPosition]=\"rightPosition\"\n [languageArrowPosition]=\"languageArrowPosition\"\n (languageSelected)=\"onLanguageSelected($event)\"\n (languageClosed)=\"onLanguageClosed($event)\">\n</ecl-site-header-language-popover>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "isInverted", "ariaHidden", "focusable"] }, { kind: "component", type: EclSiteHeaderLanguagePopoverComponent, selector: "ecl-site-header-language-popover", inputs: ["languageCode", "euLanguages", "nonEuLanguages", "euColumnsCount", "nonEuColumnsCount", "isHidden", "isPushRight", "isStack", "isFull", "rightPosition", "languageArrowPosition"], outputs: ["languageClosed", "languageSelected"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
845
1035
|
}
|
|
846
1036
|
__decorate([
|
|
847
|
-
|
|
848
|
-
],
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
type: HostBinding,
|
|
860
|
-
args: ['attr.type']
|
|
861
|
-
}], eclSize: [{
|
|
1037
|
+
coerceElement
|
|
1038
|
+
], EclSiteHeaderLanguageComponent.prototype, "languagePopoverElement", void 0);
|
|
1039
|
+
__decorate([
|
|
1040
|
+
coerceElement
|
|
1041
|
+
], EclSiteHeaderLanguageComponent.prototype, "languageLinkElement", void 0);
|
|
1042
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderLanguageComponent, decorators: [{
|
|
1043
|
+
type: Component,
|
|
1044
|
+
args: [{ selector: 'ecl-site-header-language', hostDirectives: [{
|
|
1045
|
+
directive: ECLClickOutsideDirective,
|
|
1046
|
+
outputs: ['eclClickOutside'],
|
|
1047
|
+
}], template: "<a href=\"#\"\n #languageLink\n class=\"ecl-button ecl-button--ghost ecl-site-header__language-selector ecl-u-d-block\"\n aria-controls=\"language-list-overlay\"\n [attr.aria-label]=\"'ecl.language-list.SELECT-LANGUAGE' | translate\"\n [attr.aria-expanded]=\"isLanguagesDropdownVisible\"\n (click)=\"onLanguageClick($event)\">\n <span class=\"ecl-site-header__language-icon\">\n <ecl-icon icon=\"language\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n <span class=\"ecl-site-header__language-code\">{{ languageCode }}</span>\n </span>\n {{ getLanguageLabel() }}\n</a>\n\n<ecl-site-header-language-popover \n #languagePopover\n *ngIf=\"hasLanguageCodes()\"\n [languageCode]=\"languageCode\"\n [euLanguages]=\"euLanguages\"\n [nonEuLanguages]=\"nonEuLanguages\"\n [euColumnsCount]=\"euColumnsCount\"\n [nonEuColumnsCount]=\"nonEuColumnsCount\"\n [isHidden]=\"!isLanguagesDropdownVisible\" \n [isStack]=\"isStack\"\n [isPushRight]=\"isPushRight\"\n [isFull]=\"isFull\"\n [rightPosition]=\"rightPosition\"\n [languageArrowPosition]=\"languageArrowPosition\"\n (languageSelected)=\"onLanguageSelected($event)\"\n (languageClosed)=\"onLanguageClosed($event)\">\n</ecl-site-header-language-popover>\n" }]
|
|
1048
|
+
}], ctorParameters: function () { return [{ type: EclLanguageService }, { type: EclSiteHeaderComponent }]; }, propDecorators: { languageCode: [{
|
|
862
1049
|
type: Input
|
|
863
|
-
}],
|
|
1050
|
+
}], languageCodes: [{
|
|
864
1051
|
type: Input
|
|
1052
|
+
}], languageLabel: [{
|
|
1053
|
+
type: Input
|
|
1054
|
+
}], languagePopoverElement: [{
|
|
1055
|
+
type: ViewChild,
|
|
1056
|
+
args: ['languagePopover', { read: ElementRef }]
|
|
1057
|
+
}], languageLinkElement: [{
|
|
1058
|
+
type: ViewChild,
|
|
1059
|
+
args: ['languageLink', { read: ElementRef }]
|
|
1060
|
+
}], languageClick: [{
|
|
1061
|
+
type: Output
|
|
1062
|
+
}], languageSelected: [{
|
|
1063
|
+
type: Output
|
|
865
1064
|
}], cssClasses: [{
|
|
866
1065
|
type: HostBinding,
|
|
867
1066
|
args: ['class']
|
|
868
|
-
}],
|
|
869
|
-
type:
|
|
870
|
-
args: ['
|
|
1067
|
+
}], onClickOutside: [{
|
|
1068
|
+
type: HostListener,
|
|
1069
|
+
args: ['eclClickOutside']
|
|
1070
|
+
}], onEscapeKeydownHandler: [{
|
|
1071
|
+
type: HostListener,
|
|
1072
|
+
args: ['document:keydown.escape']
|
|
871
1073
|
}] } });
|
|
872
1074
|
|
|
873
|
-
class
|
|
874
|
-
|
|
1075
|
+
class EclSiteHeaderLoginEvent extends EclBaseEvent {
|
|
1076
|
+
}
|
|
1077
|
+
class EclSiteHeaderLoginBoxToggleEvent extends EclBaseEvent {
|
|
1078
|
+
constructor(isOpen) {
|
|
875
1079
|
super();
|
|
876
|
-
this.
|
|
1080
|
+
this.isOpen = isOpen;
|
|
877
1081
|
}
|
|
878
1082
|
}
|
|
879
|
-
|
|
880
|
-
provide: NG_VALUE_ACCESSOR,
|
|
881
|
-
useExisting: forwardRef(() => EclSearchFormComponent),
|
|
882
|
-
multi: true,
|
|
883
|
-
};
|
|
884
|
-
const noop$3 = () => { };
|
|
885
|
-
class EclSearchFormComponent extends ECLBaseDirective {
|
|
1083
|
+
class EclSiteHeaderLoginComponent extends ECLBaseDirective {
|
|
886
1084
|
constructor() {
|
|
887
1085
|
super(...arguments);
|
|
888
|
-
this.
|
|
889
|
-
this.
|
|
890
|
-
this.
|
|
891
|
-
this.
|
|
892
|
-
this.
|
|
1086
|
+
this.isLoggedIn = false;
|
|
1087
|
+
this.class = 'ecl-site-header__login-container';
|
|
1088
|
+
this.login = new EventEmitter();
|
|
1089
|
+
this.loginBoxToggle = new EventEmitter();
|
|
1090
|
+
this.isLoginBoxActive = false;
|
|
893
1091
|
}
|
|
894
|
-
|
|
1092
|
+
ngOnChanges(changes) {
|
|
1093
|
+
const isLoggedInChange = changes.isLoggedIn;
|
|
1094
|
+
if (isLoggedInChange && isLoggedInChange.previousValue == true) {
|
|
1095
|
+
this.isLoginBoxActive = false;
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
getLoginBoxCssClasses() {
|
|
895
1099
|
return [
|
|
896
|
-
|
|
897
|
-
|
|
1100
|
+
'ecl-site-header__login-box',
|
|
1101
|
+
this.isLoginBoxActive ? 'ecl-site-header__login-box--active' : ''
|
|
1102
|
+
].join(' ');
|
|
898
1103
|
}
|
|
899
|
-
|
|
900
|
-
|
|
1104
|
+
onLoginClick(evt) {
|
|
1105
|
+
const event = new EclSiteHeaderLoginEvent();
|
|
1106
|
+
this.login.next(event);
|
|
901
1107
|
evt.preventDefault();
|
|
902
1108
|
}
|
|
903
|
-
|
|
904
|
-
this.
|
|
1109
|
+
onLoginBoxToggle(evt) {
|
|
1110
|
+
this.isLoginBoxActive = !this.isLoginBoxActive;
|
|
1111
|
+
const event = new EclSiteHeaderLoginBoxToggleEvent(this.isLoginBoxActive);
|
|
1112
|
+
this.loginBoxToggle.next(event);
|
|
905
1113
|
evt.preventDefault();
|
|
906
1114
|
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
this.onChange(newValue);
|
|
910
|
-
}
|
|
911
|
-
writeValue(value) {
|
|
912
|
-
this.searchInputText = value;
|
|
913
|
-
}
|
|
914
|
-
registerOnChange(fn) {
|
|
915
|
-
this.onChange = fn;
|
|
916
|
-
}
|
|
917
|
-
registerOnTouched(fn) {
|
|
918
|
-
this.onTouched = fn;
|
|
919
|
-
}
|
|
920
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSearchFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
921
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclSearchFormComponent, selector: "ecl-search-form", inputs: { searchInputText: "searchInputText", placeholder: "placeholder", searchButtonLabel: "searchButtonLabel", searchButtonIcon: "searchButtonIcon" }, outputs: { search: "search" }, host: { listeners: { "keydown.enter": "onEnterKeyDown($event)" }, properties: { "class": "this.cssClasses", "attr.role": "this.role" } }, providers: [ECL_SEARCH_FORM_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0, template: "<ecl-form-group>\n <label \n eclFormLabel \n for=\"search-input\"\n class=\"ecl-search-form__label\">\n {{ 'ecl.common.SEARCH' | translate }}\n </label>\n <input eclTextInput\n [(ngModel)]=\"searchInputText\"\n (ngModelChange)=\"onModelChange($event)\"\n type=\"search\"\n name=\"search-input\"\n placeholder=\"{{ placeholder || 'ecl.common.SEARCH' | translate }}\"\n class=\"ecl-search-form__text-input\"/>\n</ecl-form-group>\n<button eclButton\n aria-label=\"Search\"\n variant=\"search\"\n (click)=\"onSearchClick($event)\"\n class=\"ecl-search-form__button\">\n <span eclButtonLabel>\n {{ searchButtonLabel || 'ecl.common.SEARCH' | translate }}\n </span>\n <ecl-icon [icon]=\"searchButtonIcon\" size=\"xs\"></ecl-icon>\n</button>\n", dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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: "component", type: EclFormGroupComponent, selector: "[eclFormGroup], ecl-form-group" }, { kind: "component", type: EclFormLabelComponent, selector: "[eclFormLabel]", inputs: ["isOptional", "isInvalid", "isDisabled", "isRequired"] }, { kind: "directive", type: EclTextInputDirective, selector: "input[eclTextInput]", inputs: ["eclSize", "isInvalid"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
1115
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderLoginComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1116
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclSiteHeaderLoginComponent, selector: "ecl-site-header-login", inputs: { isLoggedIn: "isLoggedIn" }, outputs: { login: "login", loginBoxToggle: "loginBoxToggle" }, host: { properties: { "class": "this.class" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoggedIn\">\n <a href=\"#\"\n class=\"ecl-button ecl-button--ghost ecl-site-header__login-toggle\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginClick($event)\">\n <ecl-icon icon=\"log-in\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGIN' | translate }}\n </a>\n</ng-container>\n<ng-container *ngIf=\"isLoggedIn\">\n <a href=\"#\"\n class=\"ecl-button ecl-button--ghost ecl-site-header__login-toggle\"\n aria-controls=\"login-box-id\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginBoxToggle($event)\">\n <ecl-icon icon=\"logged-in\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGGED-IN' | translate }}\n <ecl-icon icon=\"corner-arrow\"\n size=\"xs\"\n class=\"ecl-site-header__login-arrow\"></ecl-icon>\n </a>\n <div class=\"{{ getLoginBoxCssClasses() }}\">\n <ng-content></ng-content>\n </div>\n</ng-container>", styles: [".ecl-site-header__login-toggle .ecl-site-header__login-arrow{display:inline-flex}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "isInverted", "ariaHidden", "focusable"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
922
1117
|
}
|
|
923
|
-
|
|
1118
|
+
__decorate([
|
|
1119
|
+
coerceBoolean
|
|
1120
|
+
], EclSiteHeaderLoginComponent.prototype, "isLoggedIn", void 0);
|
|
1121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderLoginComponent, decorators: [{
|
|
924
1122
|
type: Component,
|
|
925
|
-
args: [{ selector: 'ecl-
|
|
926
|
-
}], propDecorators: {
|
|
927
|
-
type: Input
|
|
928
|
-
}], placeholder: [{
|
|
929
|
-
type: Input
|
|
930
|
-
}], searchButtonLabel: [{
|
|
931
|
-
type: Input
|
|
932
|
-
}], searchButtonIcon: [{
|
|
1123
|
+
args: [{ selector: 'ecl-site-header-login', template: "<ng-container *ngIf=\"!isLoggedIn\">\n <a href=\"#\"\n class=\"ecl-button ecl-button--ghost ecl-site-header__login-toggle\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginClick($event)\">\n <ecl-icon icon=\"log-in\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGIN' | translate }}\n </a>\n</ng-container>\n<ng-container *ngIf=\"isLoggedIn\">\n <a href=\"#\"\n class=\"ecl-button ecl-button--ghost ecl-site-header__login-toggle\"\n aria-controls=\"login-box-id\"\n [attr.aria-expanded]=\"isLoginBoxActive\"\n (click)=\"onLoginBoxToggle($event)\">\n <ecl-icon icon=\"logged-in\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.site-header.LOGGED-IN' | translate }}\n <ecl-icon icon=\"corner-arrow\"\n size=\"xs\"\n class=\"ecl-site-header__login-arrow\"></ecl-icon>\n </a>\n <div class=\"{{ getLoginBoxCssClasses() }}\">\n <ng-content></ng-content>\n </div>\n</ng-container>", styles: [".ecl-site-header__login-toggle .ecl-site-header__login-arrow{display:inline-flex}\n"] }]
|
|
1124
|
+
}], propDecorators: { isLoggedIn: [{
|
|
933
1125
|
type: Input
|
|
934
|
-
}],
|
|
1126
|
+
}], class: [{
|
|
935
1127
|
type: HostBinding,
|
|
936
1128
|
args: ['class']
|
|
937
|
-
}],
|
|
938
|
-
type:
|
|
939
|
-
|
|
940
|
-
}], search: [{
|
|
1129
|
+
}], login: [{
|
|
1130
|
+
type: Output
|
|
1131
|
+
}], loginBoxToggle: [{
|
|
941
1132
|
type: Output
|
|
942
|
-
}], onEnterKeyDown: [{
|
|
943
|
-
type: HostListener,
|
|
944
|
-
args: ['keydown.enter', ['$event']]
|
|
945
1133
|
}] } });
|
|
946
1134
|
|
|
947
|
-
class
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
1135
|
+
class EclButtonLabelDirective extends ECLBaseDirective {
|
|
1136
|
+
get cssClasses() {
|
|
1137
|
+
return [
|
|
1138
|
+
super.getCssClasses('ecl-button__label'),
|
|
1139
|
+
].join(' ').trim();
|
|
951
1140
|
}
|
|
1141
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclButtonLabelDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1142
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: EclButtonLabelDirective, selector: "[eclButtonLabel]", host: { properties: { "class": "this.cssClasses" } }, usesInheritance: true, ngImport: i0 }); }
|
|
952
1143
|
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclButtonLabelDirective, decorators: [{
|
|
1145
|
+
type: Directive,
|
|
1146
|
+
args: [{
|
|
1147
|
+
selector: '[eclButtonLabel]'
|
|
1148
|
+
}]
|
|
1149
|
+
}], propDecorators: { cssClasses: [{
|
|
1150
|
+
type: HostBinding,
|
|
1151
|
+
args: ['class']
|
|
1152
|
+
}] } });
|
|
1153
|
+
|
|
1154
|
+
class EclFormGroupComponent extends ECLBaseDirective {
|
|
1155
|
+
get cssClasses() {
|
|
1156
|
+
return [
|
|
1157
|
+
super.getCssClasses('ecl-form-group'),
|
|
1158
|
+
].join(' ').trim();
|
|
957
1159
|
}
|
|
1160
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclFormGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1161
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclFormGroupComponent, selector: "[eclFormGroup], ecl-form-group", host: { properties: { "class": "this.cssClasses" } }, usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>" }); }
|
|
958
1162
|
}
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
1163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclFormGroupComponent, decorators: [{
|
|
1164
|
+
type: Component,
|
|
1165
|
+
args: [{ selector: '[eclFormGroup], ecl-form-group', template: "<ng-content></ng-content>" }]
|
|
1166
|
+
}], propDecorators: { cssClasses: [{
|
|
1167
|
+
type: HostBinding,
|
|
1168
|
+
args: ['class']
|
|
1169
|
+
}] } });
|
|
1170
|
+
|
|
1171
|
+
class EclFormLabelComponent extends ECLBaseDirective {
|
|
966
1172
|
constructor() {
|
|
967
1173
|
super(...arguments);
|
|
968
|
-
this.
|
|
969
|
-
this.
|
|
970
|
-
this.
|
|
971
|
-
this.
|
|
972
|
-
this.onChange = noop$2;
|
|
973
|
-
this.onTouched = noop$2;
|
|
974
|
-
}
|
|
975
|
-
onSearch(evt) {
|
|
976
|
-
this.search.next(new EclSiteHeaderSearchEvent(evt.keyword));
|
|
977
|
-
this.onChange(evt.keyword);
|
|
978
|
-
return false;
|
|
979
|
-
}
|
|
980
|
-
onSearchBoxToggle(evt) {
|
|
981
|
-
this.isSearchBoxActive = !this.isSearchBoxActive;
|
|
982
|
-
const event = new EclSiteHeaderSearchToggleEvent(this.isSearchBoxActive);
|
|
983
|
-
this.searchToggle.next(event);
|
|
984
|
-
evt.preventDefault();
|
|
1174
|
+
this.isOptional = false;
|
|
1175
|
+
this.isInvalid = false;
|
|
1176
|
+
this.isDisabled = false;
|
|
1177
|
+
this.isRequired = false;
|
|
985
1178
|
}
|
|
986
|
-
|
|
1179
|
+
get cssClasses() {
|
|
987
1180
|
return [
|
|
988
|
-
'ecl-
|
|
989
|
-
this.
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
onModelChange(newValue) {
|
|
993
|
-
this.searchInputText = newValue;
|
|
994
|
-
this.onChange(newValue);
|
|
995
|
-
}
|
|
996
|
-
writeValue(value) {
|
|
997
|
-
this.searchInputText = value;
|
|
998
|
-
}
|
|
999
|
-
registerOnChange(fn) {
|
|
1000
|
-
this.onChange = fn;
|
|
1001
|
-
}
|
|
1002
|
-
registerOnTouched(fn) {
|
|
1003
|
-
this.onTouched = fn;
|
|
1181
|
+
super.getCssClasses('ecl-form-label'),
|
|
1182
|
+
this.isInvalid ? 'ecl-form-label--invalid' : '',
|
|
1183
|
+
this.isDisabled ? 'ecl-form-label--disabled' : '',
|
|
1184
|
+
].join(' ').trim();
|
|
1004
1185
|
}
|
|
1005
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type:
|
|
1006
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type:
|
|
1186
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclFormLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1187
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclFormLabelComponent, selector: "[eclFormLabel]", inputs: { isOptional: "isOptional", isInvalid: "isInvalid", isDisabled: "isDisabled", isRequired: "isRequired" }, host: { properties: { "class": "this.cssClasses" } }, usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n<span *ngIf=\"isOptional\" class=\"ecl-form-label__optional\"> ({{ 'ecl.form-label.OPTIONAL' | translate }})</span>\n<span *ngIf=\"isRequired\" class=\"ecl-form-label__required\">*</span>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1007
1188
|
}
|
|
1008
|
-
|
|
1189
|
+
__decorate([
|
|
1190
|
+
coerceBoolean
|
|
1191
|
+
], EclFormLabelComponent.prototype, "isOptional", void 0);
|
|
1192
|
+
__decorate([
|
|
1193
|
+
coerceBoolean
|
|
1194
|
+
], EclFormLabelComponent.prototype, "isInvalid", void 0);
|
|
1195
|
+
__decorate([
|
|
1196
|
+
coerceBoolean
|
|
1197
|
+
], EclFormLabelComponent.prototype, "isDisabled", void 0);
|
|
1198
|
+
__decorate([
|
|
1199
|
+
coerceBoolean
|
|
1200
|
+
], EclFormLabelComponent.prototype, "isRequired", void 0);
|
|
1201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclFormLabelComponent, decorators: [{
|
|
1009
1202
|
type: Component,
|
|
1010
|
-
args: [{ selector: '
|
|
1011
|
-
}], propDecorators: {
|
|
1012
|
-
type: HostBinding,
|
|
1013
|
-
args: ['class']
|
|
1014
|
-
}], searchInputText: [{
|
|
1203
|
+
args: [{ selector: '[eclFormLabel]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n<span *ngIf=\"isOptional\" class=\"ecl-form-label__optional\"> ({{ 'ecl.form-label.OPTIONAL' | translate }})</span>\n<span *ngIf=\"isRequired\" class=\"ecl-form-label__required\">*</span>\n" }]
|
|
1204
|
+
}], propDecorators: { isOptional: [{
|
|
1015
1205
|
type: Input
|
|
1016
|
-
}],
|
|
1206
|
+
}], isInvalid: [{
|
|
1017
1207
|
type: Input
|
|
1018
|
-
}],
|
|
1208
|
+
}], isDisabled: [{
|
|
1019
1209
|
type: Input
|
|
1020
|
-
}],
|
|
1021
|
-
type:
|
|
1022
|
-
}],
|
|
1023
|
-
type:
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
class ECLClickOutsideDirective extends ECLBaseDirective {
|
|
1027
|
-
constructor(elementRef) {
|
|
1028
|
-
super();
|
|
1029
|
-
this.elementRef = elementRef;
|
|
1030
|
-
this.eclClickOutside = new EventEmitter();
|
|
1031
|
-
}
|
|
1032
|
-
onClick(target) {
|
|
1033
|
-
const clickedInside = this.elementRef.nativeElement.contains(target);
|
|
1034
|
-
if (!clickedInside) {
|
|
1035
|
-
this.eclClickOutside.emit();
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ECLClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1039
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: ECLClickOutsideDirective, isStandalone: true, selector: "[eclClickOutside]", outputs: { eclClickOutside: "eclClickOutside" }, host: { listeners: { "document:click": "onClick($event.target)" } }, usesInheritance: true, ngImport: i0 }); }
|
|
1040
|
-
}
|
|
1041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ECLClickOutsideDirective, decorators: [{
|
|
1042
|
-
type: Directive,
|
|
1043
|
-
args: [{
|
|
1044
|
-
selector: '[eclClickOutside]',
|
|
1045
|
-
standalone: true
|
|
1046
|
-
}]
|
|
1047
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { eclClickOutside: [{
|
|
1048
|
-
type: Output
|
|
1049
|
-
}], onClick: [{
|
|
1050
|
-
type: HostListener,
|
|
1051
|
-
args: ['document:click', ['$event.target']]
|
|
1210
|
+
}], isRequired: [{
|
|
1211
|
+
type: Input
|
|
1212
|
+
}], cssClasses: [{
|
|
1213
|
+
type: HostBinding,
|
|
1214
|
+
args: ['class']
|
|
1052
1215
|
}] } });
|
|
1053
1216
|
|
|
1054
|
-
class
|
|
1217
|
+
class EclTextInputDirective extends ECLBaseDirective {
|
|
1055
1218
|
get cssClasses() {
|
|
1056
1219
|
return [
|
|
1057
|
-
super.getCssClasses('ecl-
|
|
1058
|
-
this.
|
|
1220
|
+
super.getCssClasses('ecl-text-input'),
|
|
1221
|
+
this.eclSize ? `ecl-text-input--${this.eclSize}` : '',
|
|
1059
1222
|
].join(' ').trim();
|
|
1060
1223
|
}
|
|
1061
|
-
|
|
1062
|
-
return this.isIconOnRightSide(this.eclIconComponents.toArray());
|
|
1063
|
-
}
|
|
1064
|
-
get hasLeftIcon() {
|
|
1065
|
-
return this.isIconOnLeftSide(this.eclIconComponents.toArray());
|
|
1066
|
-
}
|
|
1067
|
-
get hasIcon() {
|
|
1068
|
-
return this.eclIconComponents && this.eclIconComponents.length > 0;
|
|
1069
|
-
}
|
|
1070
|
-
constructor(el) {
|
|
1224
|
+
constructor(ngControl) {
|
|
1071
1225
|
super();
|
|
1072
|
-
this.
|
|
1226
|
+
this.ngControl = ngControl;
|
|
1227
|
+
this.type = 'text';
|
|
1228
|
+
this.eclSize = 'm';
|
|
1229
|
+
this.isInvalid = false;
|
|
1073
1230
|
}
|
|
1074
|
-
|
|
1075
|
-
if (this.
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
}
|
|
1081
|
-
else if (this.isIconOnRightSide(this.eclIconComponents.toArray())) {
|
|
1082
|
-
icn.class = 'ecl-link__icon ecl-link__icon--after';
|
|
1083
|
-
}
|
|
1084
|
-
else {
|
|
1085
|
-
icn.class = 'ecl-link__icon ecl-link__icon--before';
|
|
1086
|
-
}
|
|
1087
|
-
});
|
|
1088
|
-
});
|
|
1231
|
+
get invalidState() {
|
|
1232
|
+
if (this.ngControl) {
|
|
1233
|
+
return this.ngControl.status === 'INVALID' && this.ngControl.touched;
|
|
1234
|
+
}
|
|
1235
|
+
else {
|
|
1236
|
+
return this.isInvalid;
|
|
1089
1237
|
}
|
|
1090
1238
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
const iconEl = icn.el.nativeElement;
|
|
1094
|
-
if (hasPreviousSiblingWithAttribute(iconEl, 'eclLinkLabel')) {
|
|
1095
|
-
return true;
|
|
1096
|
-
}
|
|
1097
|
-
return false;
|
|
1098
|
-
});
|
|
1099
|
-
}
|
|
1100
|
-
isIconOnLeftSide(icons) {
|
|
1101
|
-
return !!icons.find(icn => {
|
|
1102
|
-
const iconEl = icn.el.nativeElement;
|
|
1103
|
-
if (hasNextSiblingWithAttribute(iconEl, 'eclLinkLabel')) {
|
|
1104
|
-
return true;
|
|
1105
|
-
}
|
|
1106
|
-
return false;
|
|
1107
|
-
});
|
|
1108
|
-
}
|
|
1109
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclLinkDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1110
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: EclLinkDirective, selector: "[eclLink]", inputs: { variant: "variant", isNegative: "isNegative", isNoVisited: "isNoVisited" }, host: { properties: { "class.ecl-link--negative": "this.isNegative", "class.ecl-link--no-visited": "this.isNoVisited", "class": "this.cssClasses", "class.ecl-link--icon-after": "this.hasRightIcon", "class.ecl-link--icon-before": "this.hasLeftIcon", "class.ecl-link--icon": "this.hasIcon" } }, queries: [{ propertyName: "eclIconComponents", predicate: i0.forwardRef(function () { return EclIconComponent; }) }], usesInheritance: true, ngImport: i0 }); }
|
|
1239
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclTextInputDirective, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1240
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: EclTextInputDirective, selector: "input[eclTextInput]", inputs: { eclSize: "eclSize", isInvalid: "isInvalid" }, host: { properties: { "attr.type": "this.type", "class": "this.cssClasses", "class.ecl-text-input--invalid": "this.invalidState" } }, usesInheritance: true, ngImport: i0 }); }
|
|
1111
1241
|
}
|
|
1112
1242
|
__decorate([
|
|
1113
1243
|
coerceBoolean
|
|
1114
|
-
],
|
|
1115
|
-
|
|
1116
|
-
coerceBoolean
|
|
1117
|
-
], EclLinkDirective.prototype, "isNoVisited", void 0);
|
|
1118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclLinkDirective, decorators: [{
|
|
1244
|
+
], EclTextInputDirective.prototype, "isInvalid", void 0);
|
|
1245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclTextInputDirective, decorators: [{
|
|
1119
1246
|
type: Directive,
|
|
1120
1247
|
args: [{
|
|
1121
|
-
selector: '[
|
|
1248
|
+
selector: 'input[eclTextInput]',
|
|
1122
1249
|
}]
|
|
1123
|
-
}], ctorParameters: function () { return [{ type:
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1250
|
+
}], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
|
|
1251
|
+
type: Optional
|
|
1252
|
+
}, {
|
|
1253
|
+
type: Self
|
|
1254
|
+
}] }]; }, propDecorators: { type: [{
|
|
1128
1255
|
type: HostBinding,
|
|
1129
|
-
args: ['
|
|
1130
|
-
}],
|
|
1256
|
+
args: ['attr.type']
|
|
1257
|
+
}], eclSize: [{
|
|
1258
|
+
type: Input
|
|
1259
|
+
}], isInvalid: [{
|
|
1131
1260
|
type: Input
|
|
1132
|
-
}, {
|
|
1133
|
-
type: HostBinding,
|
|
1134
|
-
args: ['class.ecl-link--no-visited']
|
|
1135
|
-
}], eclIconComponents: [{
|
|
1136
|
-
type: ContentChildren,
|
|
1137
|
-
args: [forwardRef(() => EclIconComponent)]
|
|
1138
1261
|
}], cssClasses: [{
|
|
1139
1262
|
type: HostBinding,
|
|
1140
1263
|
args: ['class']
|
|
1141
|
-
}],
|
|
1142
|
-
type: HostBinding,
|
|
1143
|
-
args: ['class.ecl-link--icon-after']
|
|
1144
|
-
}], hasLeftIcon: [{
|
|
1145
|
-
type: HostBinding,
|
|
1146
|
-
args: ['class.ecl-link--icon-before']
|
|
1147
|
-
}], hasIcon: [{
|
|
1264
|
+
}], invalidState: [{
|
|
1148
1265
|
type: HostBinding,
|
|
1149
|
-
args: ['class.ecl-
|
|
1266
|
+
args: ['class.ecl-text-input--invalid']
|
|
1150
1267
|
}] } });
|
|
1151
1268
|
|
|
1152
|
-
class
|
|
1153
|
-
constructor(
|
|
1269
|
+
class EclSearchFormEvent extends EclBaseEvent {
|
|
1270
|
+
constructor(keyword) {
|
|
1154
1271
|
super();
|
|
1155
|
-
this.
|
|
1272
|
+
this.keyword = keyword;
|
|
1156
1273
|
}
|
|
1157
1274
|
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
this.
|
|
1168
|
-
this.
|
|
1169
|
-
this.
|
|
1170
|
-
this.
|
|
1171
|
-
this.
|
|
1172
|
-
this.role = 'dialog';
|
|
1173
|
-
this.labelledBy = 'ecl-site-header__language-title';
|
|
1275
|
+
const ECL_SEARCH_FORM_VALUE_ACCESSOR = {
|
|
1276
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1277
|
+
useExisting: forwardRef(() => EclSearchFormComponent),
|
|
1278
|
+
multi: true,
|
|
1279
|
+
};
|
|
1280
|
+
const noop$3 = () => { };
|
|
1281
|
+
class EclSearchFormComponent extends ECLBaseDirective {
|
|
1282
|
+
constructor() {
|
|
1283
|
+
super(...arguments);
|
|
1284
|
+
this.searchButtonIcon = 'search';
|
|
1285
|
+
this.role = 'search';
|
|
1286
|
+
this.search = new EventEmitter();
|
|
1287
|
+
this.onChange = noop$3;
|
|
1288
|
+
this.onTouched = noop$3;
|
|
1174
1289
|
}
|
|
1175
1290
|
get cssClasses() {
|
|
1176
1291
|
return [
|
|
1177
|
-
super.getCssClasses('ecl-
|
|
1178
|
-
this.isPushRight ? 'ecl-site-header__language-container--push-right' : '',
|
|
1179
|
-
this.isFull ? 'ecl-site-header__language-container--full' : '',
|
|
1292
|
+
super.getCssClasses('ecl-search-form'),
|
|
1180
1293
|
].join(' ').trim();
|
|
1181
1294
|
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1295
|
+
onSearchClick(evt) {
|
|
1296
|
+
this.search.next(new EclSearchFormEvent(this.searchInputText));
|
|
1297
|
+
evt.preventDefault();
|
|
1184
1298
|
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1299
|
+
onEnterKeyDown(evt) {
|
|
1300
|
+
this.search.next(new EclSearchFormEvent(this.searchInputText));
|
|
1301
|
+
evt.preventDefault();
|
|
1187
1302
|
}
|
|
1188
|
-
|
|
1189
|
-
this.
|
|
1303
|
+
onModelChange(newValue) {
|
|
1304
|
+
this.searchInputText = newValue;
|
|
1305
|
+
this.onChange(newValue);
|
|
1190
1306
|
}
|
|
1191
|
-
|
|
1192
|
-
this.
|
|
1193
|
-
this.languageSelected.next(new EclSiteHeaderLanguageSelectedEvent(language));
|
|
1194
|
-
evt.preventDefault();
|
|
1307
|
+
writeValue(value) {
|
|
1308
|
+
this.searchInputText = value;
|
|
1195
1309
|
}
|
|
1196
|
-
|
|
1197
|
-
|
|
1310
|
+
registerOnChange(fn) {
|
|
1311
|
+
this.onChange = fn;
|
|
1312
|
+
}
|
|
1313
|
+
registerOnTouched(fn) {
|
|
1314
|
+
this.onTouched = fn;
|
|
1315
|
+
}
|
|
1316
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSearchFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1317
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclSearchFormComponent, selector: "ecl-search-form", inputs: { searchInputText: "searchInputText", placeholder: "placeholder", searchButtonLabel: "searchButtonLabel", searchButtonIcon: "searchButtonIcon" }, outputs: { search: "search" }, host: { listeners: { "keydown.enter": "onEnterKeyDown($event)" }, properties: { "class": "this.cssClasses", "attr.role": "this.role" } }, providers: [ECL_SEARCH_FORM_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0, template: "<ecl-form-group>\n <label \n eclFormLabel \n for=\"search-input\"\n class=\"ecl-search-form__label\">\n {{ 'ecl.common.SEARCH' | translate }}\n </label>\n <input eclTextInput\n [(ngModel)]=\"searchInputText\"\n (ngModelChange)=\"onModelChange($event)\"\n type=\"search\"\n name=\"search-input\"\n placeholder=\"{{ placeholder || 'ecl.common.SEARCH' | translate }}\"\n class=\"ecl-search-form__text-input\"/>\n</ecl-form-group>\n<button eclButton\n aria-label=\"Search\"\n variant=\"search\"\n (click)=\"onSearchClick($event)\"\n class=\"ecl-search-form__button\">\n <span eclButtonLabel>\n {{ searchButtonLabel || 'ecl.common.SEARCH' | translate }}\n </span>\n <ecl-icon [icon]=\"searchButtonIcon\" size=\"xs\"></ecl-icon>\n</button>\n", dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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: "component", type: EclFormGroupComponent, selector: "[eclFormGroup], ecl-form-group" }, { kind: "component", type: EclFormLabelComponent, selector: "[eclFormLabel]", inputs: ["isOptional", "isInvalid", "isDisabled", "isRequired"] }, { kind: "directive", type: EclTextInputDirective, selector: "input[eclTextInput]", inputs: ["eclSize", "isInvalid"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
1198
1318
|
}
|
|
1199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type:
|
|
1319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSearchFormComponent, decorators: [{
|
|
1200
1320
|
type: Component,
|
|
1201
|
-
args: [{ selector: 'ecl-
|
|
1202
|
-
}],
|
|
1203
|
-
type: Input
|
|
1204
|
-
}], euLanguages: [{
|
|
1205
|
-
type: Input
|
|
1206
|
-
}], nonEuLanguages: [{
|
|
1207
|
-
type: Input
|
|
1208
|
-
}], euColumnsCount: [{
|
|
1209
|
-
type: Input
|
|
1210
|
-
}], nonEuColumnsCount: [{
|
|
1211
|
-
type: Input
|
|
1212
|
-
}], isHidden: [{
|
|
1213
|
-
type: Input
|
|
1214
|
-
}], isPushRight: [{
|
|
1215
|
-
type: Input
|
|
1216
|
-
}], isStack: [{
|
|
1321
|
+
args: [{ selector: 'ecl-search-form', providers: [ECL_SEARCH_FORM_VALUE_ACCESSOR], template: "<ecl-form-group>\n <label \n eclFormLabel \n for=\"search-input\"\n class=\"ecl-search-form__label\">\n {{ 'ecl.common.SEARCH' | translate }}\n </label>\n <input eclTextInput\n [(ngModel)]=\"searchInputText\"\n (ngModelChange)=\"onModelChange($event)\"\n type=\"search\"\n name=\"search-input\"\n placeholder=\"{{ placeholder || 'ecl.common.SEARCH' | translate }}\"\n class=\"ecl-search-form__text-input\"/>\n</ecl-form-group>\n<button eclButton\n aria-label=\"Search\"\n variant=\"search\"\n (click)=\"onSearchClick($event)\"\n class=\"ecl-search-form__button\">\n <span eclButtonLabel>\n {{ searchButtonLabel || 'ecl.common.SEARCH' | translate }}\n </span>\n <ecl-icon [icon]=\"searchButtonIcon\" size=\"xs\"></ecl-icon>\n</button>\n" }]
|
|
1322
|
+
}], propDecorators: { searchInputText: [{
|
|
1217
1323
|
type: Input
|
|
1218
|
-
}],
|
|
1324
|
+
}], placeholder: [{
|
|
1219
1325
|
type: Input
|
|
1220
|
-
}],
|
|
1326
|
+
}], searchButtonLabel: [{
|
|
1221
1327
|
type: Input
|
|
1222
|
-
}, {
|
|
1223
|
-
type: HostBinding,
|
|
1224
|
-
args: ['style.right']
|
|
1225
|
-
}], languageArrowPosition: [{
|
|
1328
|
+
}], searchButtonIcon: [{
|
|
1226
1329
|
type: Input
|
|
1227
|
-
}, {
|
|
1228
|
-
type: HostBinding,
|
|
1229
|
-
args: ['style.--ecl-language-arrow-position']
|
|
1230
|
-
}], languageClosed: [{
|
|
1231
|
-
type: Output
|
|
1232
|
-
}], languageSelected: [{
|
|
1233
|
-
type: Output
|
|
1234
|
-
}], role: [{
|
|
1235
|
-
type: HostBinding,
|
|
1236
|
-
args: ['attr.role']
|
|
1237
|
-
}], labelledBy: [{
|
|
1238
|
-
type: HostBinding,
|
|
1239
|
-
args: ['attr.aria-labelledby']
|
|
1240
1330
|
}], cssClasses: [{
|
|
1241
1331
|
type: HostBinding,
|
|
1242
1332
|
args: ['class']
|
|
1243
|
-
}],
|
|
1244
|
-
type: HostBinding,
|
|
1245
|
-
args: ['attr.aria-modal']
|
|
1246
|
-
}], isDropdownHidden: [{
|
|
1333
|
+
}], role: [{
|
|
1247
1334
|
type: HostBinding,
|
|
1248
|
-
args: ['attr.
|
|
1335
|
+
args: ['attr.role']
|
|
1336
|
+
}], search: [{
|
|
1337
|
+
type: Output
|
|
1338
|
+
}], onEnterKeyDown: [{
|
|
1339
|
+
type: HostListener,
|
|
1340
|
+
args: ['keydown.enter', ['$event']]
|
|
1249
1341
|
}] } });
|
|
1250
1342
|
|
|
1251
|
-
class
|
|
1252
|
-
|
|
1253
|
-
class EclSiteHeaderLanguageComponent extends ECLBaseDirective {
|
|
1254
|
-
get languageCodes() {
|
|
1255
|
-
return this._languageCodes;
|
|
1256
|
-
}
|
|
1257
|
-
set languageCodes(value) {
|
|
1258
|
-
this._languageCodes = value;
|
|
1259
|
-
this.updateLanguages();
|
|
1260
|
-
}
|
|
1261
|
-
get cssClasses() {
|
|
1262
|
-
return [
|
|
1263
|
-
super.getCssClasses('ecl-site-header__language'),
|
|
1264
|
-
].join(' ').trim();
|
|
1265
|
-
}
|
|
1266
|
-
constructor(eclLanguageService, eclSiteHeader) {
|
|
1343
|
+
class EclSiteHeaderSearchEvent extends EclBaseEvent {
|
|
1344
|
+
constructor(keyword) {
|
|
1267
1345
|
super();
|
|
1268
|
-
this.
|
|
1269
|
-
this.eclSiteHeader = eclSiteHeader;
|
|
1270
|
-
this.languageCode = 'en';
|
|
1271
|
-
this._languageCodes = [];
|
|
1272
|
-
this.languageClick = new EventEmitter();
|
|
1273
|
-
this.languageSelected = new EventEmitter();
|
|
1274
|
-
this.MOBILE_BREAKPOINT = 768;
|
|
1275
|
-
this.LANGUAGE_MAX_COLUMNS = 8;
|
|
1276
|
-
this.isLanguagesDropdownVisible = false;
|
|
1277
|
-
this.euLanguages = [];
|
|
1278
|
-
this.nonEuLanguages = [];
|
|
1279
|
-
this.euColumnsCount = 1;
|
|
1280
|
-
this.nonEuColumnsCount = 1;
|
|
1346
|
+
this.keyword = keyword;
|
|
1281
1347
|
}
|
|
1282
|
-
|
|
1283
|
-
|
|
1348
|
+
}
|
|
1349
|
+
class EclSiteHeaderSearchToggleEvent extends EclBaseEvent {
|
|
1350
|
+
constructor(isOpen) {
|
|
1351
|
+
super();
|
|
1352
|
+
this.isOpen = isOpen;
|
|
1284
1353
|
}
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1354
|
+
}
|
|
1355
|
+
const ECL_SITE_HEADER_SEARCH_VALUE_ACCESSOR = {
|
|
1356
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1357
|
+
useExisting: forwardRef(() => EclSiteHeaderSearchComponent),
|
|
1358
|
+
multi: true,
|
|
1359
|
+
};
|
|
1360
|
+
const noop$2 = () => { };
|
|
1361
|
+
class EclSiteHeaderSearchComponent extends ECLBaseDirective {
|
|
1362
|
+
constructor() {
|
|
1363
|
+
super(...arguments);
|
|
1364
|
+
this.class = 'ecl-site-header__search-container';
|
|
1365
|
+
this.search = new EventEmitter();
|
|
1366
|
+
this.searchToggle = new EventEmitter();
|
|
1367
|
+
this.isSearchBoxActive = false;
|
|
1368
|
+
this.onChange = noop$2;
|
|
1369
|
+
this.onTouched = noop$2;
|
|
1289
1370
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1371
|
+
onSearch(evt) {
|
|
1372
|
+
this.search.next(new EclSiteHeaderSearchEvent(evt.keyword));
|
|
1373
|
+
this.onChange(evt.keyword);
|
|
1374
|
+
return false;
|
|
1292
1375
|
}
|
|
1293
|
-
|
|
1294
|
-
this.
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
}
|
|
1298
|
-
else {
|
|
1299
|
-
setTimeout(() => {
|
|
1300
|
-
this.isFull = false;
|
|
1301
|
-
this.isStack = false;
|
|
1302
|
-
this.isPushRight = false;
|
|
1303
|
-
this.rightPosition = undefined;
|
|
1304
|
-
this.languageArrowPosition = undefined;
|
|
1305
|
-
});
|
|
1306
|
-
}
|
|
1307
|
-
this.languageClick.next(new EclSiteHeaderLanguageClickEvent());
|
|
1376
|
+
onSearchBoxToggle(evt) {
|
|
1377
|
+
this.isSearchBoxActive = !this.isSearchBoxActive;
|
|
1378
|
+
const event = new EclSiteHeaderSearchToggleEvent(this.isSearchBoxActive);
|
|
1379
|
+
this.searchToggle.next(event);
|
|
1308
1380
|
evt.preventDefault();
|
|
1309
1381
|
}
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
this.isLanguagesDropdownVisible = false;
|
|
1316
|
-
this.languageSelected.next(new EclSiteHeaderLanguageSelectedEvent(evt.language));
|
|
1317
|
-
}
|
|
1318
|
-
onClickOutside() {
|
|
1319
|
-
this.isLanguagesDropdownVisible = false;
|
|
1382
|
+
getSearchBoxCssClasses() {
|
|
1383
|
+
return [
|
|
1384
|
+
'ecl-site-header__search',
|
|
1385
|
+
this.isSearchBoxActive ? 'ecl-site-header__search--active' : ''
|
|
1386
|
+
].join(' ');
|
|
1320
1387
|
}
|
|
1321
|
-
|
|
1322
|
-
this.
|
|
1388
|
+
onModelChange(newValue) {
|
|
1389
|
+
this.searchInputText = newValue;
|
|
1390
|
+
this.onChange(newValue);
|
|
1323
1391
|
}
|
|
1324
|
-
|
|
1325
|
-
|
|
1392
|
+
writeValue(value) {
|
|
1393
|
+
this.searchInputText = value;
|
|
1326
1394
|
}
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
this.euLanguages = languages.filter(item => {
|
|
1330
|
-
return this.eclLanguageService.isEuLanguage(item.code);
|
|
1331
|
-
});
|
|
1332
|
-
this.nonEuLanguages = languages.filter(item => {
|
|
1333
|
-
return !this.eclLanguageService.isEuLanguage(item.code);
|
|
1334
|
-
});
|
|
1335
|
-
this.euColumnsCount = Math.ceil(this.euLanguages.length / this.LANGUAGE_MAX_COLUMNS);
|
|
1336
|
-
this.nonEuColumnsCount = Math.ceil(this.nonEuLanguages.length / this.LANGUAGE_MAX_COLUMNS);
|
|
1395
|
+
registerOnChange(fn) {
|
|
1396
|
+
this.onChange = fn;
|
|
1337
1397
|
}
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
if (this.hasLanguageCodes()) {
|
|
1341
|
-
const arrowSize = '0.5rem';
|
|
1342
|
-
const containerElement = this.eclSiteHeader.topContainerElement;
|
|
1343
|
-
const containerRect = containerElement.getBoundingClientRect();
|
|
1344
|
-
const linkRect = this.languageLinkElement.getBoundingClientRect();
|
|
1345
|
-
const popoverRect = this.languagePopoverElement.getBoundingClientRect();
|
|
1346
|
-
const screenWidth = window.innerWidth;
|
|
1347
|
-
const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
|
|
1348
|
-
this.isFull = false;
|
|
1349
|
-
this.isStack = false;
|
|
1350
|
-
this.isPushRight = false;
|
|
1351
|
-
this.rightPosition = undefined;
|
|
1352
|
-
this.languageArrowPosition = undefined;
|
|
1353
|
-
if (popoverRect.width > containerRect.width) {
|
|
1354
|
-
this.isStack = true;
|
|
1355
|
-
if (this.nonEuLanguages.length) {
|
|
1356
|
-
this.nonEuColumnsCount = Math.max(this.euColumnsCount, this.nonEuColumnsCount);
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
if (popoverRect.right > screenWidth) {
|
|
1360
|
-
const arrowPosition = containerRect.right - linkRect.right + linkRect.width / 2;
|
|
1361
|
-
this.isPushRight = true;
|
|
1362
|
-
this.rightPosition = `-${containerRect.right - linkRect.right}px`;
|
|
1363
|
-
this.languageArrowPosition = `calc(${arrowPosition}px - ${arrowSize})`;
|
|
1364
|
-
}
|
|
1365
|
-
if (vw < this.MOBILE_BREAKPOINT) {
|
|
1366
|
-
const arrowPosition = popoverRect.right - linkRect.right + linkRect.width / 2;
|
|
1367
|
-
this.isFull = true;
|
|
1368
|
-
this.languageArrowPosition = `calc(${arrowPosition}px - ${arrowSize})`;
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
});
|
|
1398
|
+
registerOnTouched(fn) {
|
|
1399
|
+
this.onTouched = fn;
|
|
1372
1400
|
}
|
|
1373
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type:
|
|
1374
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type:
|
|
1401
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderSearchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1402
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclSiteHeaderSearchComponent, selector: "ecl-site-header-search", inputs: { searchInputText: "searchInputText", searchInputPlaceholder: "searchInputPlaceholder", searchButtonLabel: "searchButtonLabel" }, outputs: { search: "search", searchToggle: "searchToggle" }, host: { properties: { "class": "this.class" } }, providers: [ECL_SITE_HEADER_SEARCH_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0, template: "<a href=\"#\"\n class=\"ecl-button ecl-button--ghost ecl-site-header__search-toggle\"\n data-ecl-search-toggle=\"true\"\n aria-controls=\"search-form-id\"\n [attr.aria-expanded]=\"isSearchBoxActive\"\n (click)=\"onSearchBoxToggle($event)\">\n <ecl-icon icon=\"search\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.common.SEARCH' | translate }}\n</a>\n\n<ecl-search-form (search)=\"onSearch($event)\"\n [placeholder]=\"searchInputPlaceholder\"\n (ngModelChange)=\"onModelChange($event)\"\n [(ngModel)]=\"searchInputText\"\n [searchButtonLabel]=\"searchButtonLabel\"\n [class]=\"getSearchBoxCssClasses()\">\n</ecl-search-form>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "isInverted", "ariaHidden", "focusable"] }, { kind: "component", type: EclSearchFormComponent, selector: "ecl-search-form", inputs: ["searchInputText", "placeholder", "searchButtonLabel", "searchButtonIcon"], outputs: ["search"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
1375
1403
|
}
|
|
1376
|
-
|
|
1377
|
-
coerceElement
|
|
1378
|
-
], EclSiteHeaderLanguageComponent.prototype, "languagePopoverElement", void 0);
|
|
1379
|
-
__decorate([
|
|
1380
|
-
coerceElement
|
|
1381
|
-
], EclSiteHeaderLanguageComponent.prototype, "languageLinkElement", void 0);
|
|
1382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderLanguageComponent, decorators: [{
|
|
1404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderSearchComponent, decorators: [{
|
|
1383
1405
|
type: Component,
|
|
1384
|
-
args: [{ selector: 'ecl-site-header-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1406
|
+
args: [{ selector: 'ecl-site-header-search', providers: [ECL_SITE_HEADER_SEARCH_VALUE_ACCESSOR], template: "<a href=\"#\"\n class=\"ecl-button ecl-button--ghost ecl-site-header__search-toggle\"\n data-ecl-search-toggle=\"true\"\n aria-controls=\"search-form-id\"\n [attr.aria-expanded]=\"isSearchBoxActive\"\n (click)=\"onSearchBoxToggle($event)\">\n <ecl-icon icon=\"search\"\n size=\"s\"\n class=\"ecl-site-header__icon\"></ecl-icon>\n {{ 'ecl.common.SEARCH' | translate }}\n</a>\n\n<ecl-search-form (search)=\"onSearch($event)\"\n [placeholder]=\"searchInputPlaceholder\"\n (ngModelChange)=\"onModelChange($event)\"\n [(ngModel)]=\"searchInputText\"\n [searchButtonLabel]=\"searchButtonLabel\"\n [class]=\"getSearchBoxCssClasses()\">\n</ecl-search-form>", styles: [":host{display:block}\n"] }]
|
|
1407
|
+
}], propDecorators: { class: [{
|
|
1408
|
+
type: HostBinding,
|
|
1409
|
+
args: ['class']
|
|
1410
|
+
}], searchInputText: [{
|
|
1389
1411
|
type: Input
|
|
1390
|
-
}],
|
|
1412
|
+
}], searchInputPlaceholder: [{
|
|
1391
1413
|
type: Input
|
|
1392
|
-
}],
|
|
1414
|
+
}], searchButtonLabel: [{
|
|
1393
1415
|
type: Input
|
|
1394
|
-
}],
|
|
1395
|
-
type: ViewChild,
|
|
1396
|
-
args: ['languagePopover', { read: ElementRef }]
|
|
1397
|
-
}], languageLinkElement: [{
|
|
1398
|
-
type: ViewChild,
|
|
1399
|
-
args: ['languageLink', { read: ElementRef }]
|
|
1400
|
-
}], languageClick: [{
|
|
1416
|
+
}], search: [{
|
|
1401
1417
|
type: Output
|
|
1402
|
-
}],
|
|
1418
|
+
}], searchToggle: [{
|
|
1403
1419
|
type: Output
|
|
1404
|
-
}], cssClasses: [{
|
|
1405
|
-
type: HostBinding,
|
|
1406
|
-
args: ['class']
|
|
1407
|
-
}], onClickOutside: [{
|
|
1408
|
-
type: HostListener,
|
|
1409
|
-
args: ['eclClickOutside']
|
|
1410
|
-
}], onEscapeKeydownHandler: [{
|
|
1411
|
-
type: HostListener,
|
|
1412
|
-
args: ['document:keydown.escape']
|
|
1413
1420
|
}] } });
|
|
1414
1421
|
|
|
1415
1422
|
class EclSiteHeaderLogoClickEvent extends EclBaseEvent {
|
|
@@ -1430,7 +1437,6 @@ class EclSiteHeaderComponent extends ECLBaseDirective {
|
|
|
1430
1437
|
this.languageClick = new EventEmitter();
|
|
1431
1438
|
this.languageCode = 'en';
|
|
1432
1439
|
this.destroy$ = new Subject();
|
|
1433
|
-
this.handlei18nEvents();
|
|
1434
1440
|
}
|
|
1435
1441
|
ngAfterContentInit() {
|
|
1436
1442
|
if (this.eclLoginComponent && this.eclSearchComponent) {
|
|
@@ -1454,6 +1460,15 @@ class EclSiteHeaderComponent extends ECLBaseDirective {
|
|
|
1454
1460
|
.subscribe(evt => {
|
|
1455
1461
|
this.languageClick.next(new EclSiteHeaderLanguageClickEvent());
|
|
1456
1462
|
});
|
|
1463
|
+
this.eclLanguageComponent
|
|
1464
|
+
.languageSelected
|
|
1465
|
+
.pipe(takeUntil(this.destroy$))
|
|
1466
|
+
.subscribe(evt => {
|
|
1467
|
+
this.languageCode = this.getEULanguageCode(evt.language?.code);
|
|
1468
|
+
});
|
|
1469
|
+
}
|
|
1470
|
+
if (this.eclLanguageComponent) {
|
|
1471
|
+
this.languageCode = this.getEULanguageCode(this.eclLanguageComponent?.languageCode);
|
|
1457
1472
|
}
|
|
1458
1473
|
}
|
|
1459
1474
|
ngOnDestroy() {
|
|
@@ -1467,14 +1482,6 @@ class EclSiteHeaderComponent extends ECLBaseDirective {
|
|
|
1467
1482
|
evt.preventDefault();
|
|
1468
1483
|
}
|
|
1469
1484
|
}
|
|
1470
|
-
handlei18nEvents() {
|
|
1471
|
-
this.languageCode = this.getEULanguageCode(this.translateService.currentLang);
|
|
1472
|
-
this.translateService.onLangChange
|
|
1473
|
-
.pipe(takeUntil(this.destroy$))
|
|
1474
|
-
.subscribe((langChangeEvent) => {
|
|
1475
|
-
this.languageCode = this.getEULanguageCode(langChangeEvent.lang);
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
1485
|
getEULanguageCode(languageCode) {
|
|
1479
1486
|
if (!this.eclLanguageService.isEuLanguage(languageCode)) {
|
|
1480
1487
|
return 'en';
|
|
@@ -1482,7 +1489,7 @@ class EclSiteHeaderComponent extends ECLBaseDirective {
|
|
|
1482
1489
|
return languageCode;
|
|
1483
1490
|
}
|
|
1484
1491
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclSiteHeaderComponent, deps: [{ token: EclLanguageService }, { token: i2$1.TranslateService }, { token: EclThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1485
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclSiteHeaderComponent, selector: "ecl-site-header", inputs: { logoUrl: "logoUrl", siteName: "siteName" }, outputs: { logoClick: "logoClick", languageClick: "languageClick" }, host: { properties: { "class": "this.cssClasses", "attr.role": "this.role" } }, queries: [{ propertyName: "eclLoginComponent", first: true, predicate: EclSiteHeaderLoginComponent, descendants: true }, { propertyName: "eclSearchComponent", first: true, predicate: EclSiteHeaderSearchComponent, descendants: true }, { propertyName: "eclLanguageComponent", first: true, predicate: EclSiteHeaderLanguageComponent, descendants: true }], viewQueries: [{ propertyName: "topContainerElement", first: true, predicate: ["topContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-site-header__header\">\n <div class=\"ecl-site-header__container ecl-container\">\n <div #topContainer class=\"ecl-site-header__top\">\n <a eclLink \n variant=\"standalone\" \n class=\"ecl-site-header__logo-link\"\n href=\"https://ec.europa.eu/info/index_{{ languageCode }}\"\n (click)=\"onECLogoClick($event)\" \n [attr.aria-label]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\">\n\n <ng-content select=\"[eclSiteHeaderEnvironment]\"></ng-content>\n\n <ng-container *ngIf=\"eclThemeService.isEC$ | async\">\n <img alt=\"European Commission logo\" \n [attr.title]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\" \n class=\"ecl-site-header__logo-image ecl-site-header__logo-image-desktop\" \n src=\"./assets/images/ecl/ec/logo/logo-ec--{{ languageCode }}.svg\"/>\n </ng-container>\n\n <ng-container *ngIf=\"eclThemeService.isEU$ | async\">\n <img alt=\"European Union flag\" \n [attr.title]=\"'ecl.footer.EUROPEAN-UNION' | translate\" \n class=\"ecl-site-header__logo-image ecl-site-header__logo-image-mobile\" \n src=\"./assets/images/ecl/eu/logo/condensed-version/positive/logo-eu--{{ languageCode}}.svg\"/>\n <img alt=\"European Union flag\" \n [attr.title]=\"'ecl.footer.EUROPEAN-UNION' | translate\" \n class=\"ecl-site-header__logo-image ecl-site-header__logo-image-desktop\" \n src=\"./assets/images/ecl/eu/logo/standard-version/positive/logo-eu--{{ languageCode}}.svg\"/>\n </ng-container>\n </a>\n <ng-content select=\"ecl-site-header-action\"></ng-content>\n </div>\n </div>\n</div>\n\n<ng-content select=\"ecl-site-header-message\"></ng-content>\n<ng-content select=\"ecl-site-header-banner-top\"></ng-content>\n\n<div *ngIf=\"siteName\" class=\"ecl-site-header__banner\">\n <div class=\"ecl-container\">\n <div class=\"ecl-site-header__site-name\">{{ siteName }}</div>\n <ng-content select=\"[eclSiteHeaderCta]\"></ng-content>\n </div>\n</div>\n\n<ng-content select=\"ecl-menu\"></ng-content>\n\n<!-- @deprecated language list is replaced with site header language -->\n<ng-content select=\"ecl-language-list\"></ng-content>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: EclLinkDirective, selector: "[eclLink]", inputs: ["variant", "isNegative", "isNoVisited"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
1492
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclSiteHeaderComponent, selector: "ecl-site-header", inputs: { logoUrl: "logoUrl", siteName: "siteName", languageCode: "languageCode" }, outputs: { logoClick: "logoClick", languageClick: "languageClick" }, host: { properties: { "class": "this.cssClasses", "attr.role": "this.role" } }, queries: [{ propertyName: "eclLoginComponent", first: true, predicate: EclSiteHeaderLoginComponent, descendants: true }, { propertyName: "eclSearchComponent", first: true, predicate: EclSiteHeaderSearchComponent, descendants: true }, { propertyName: "eclLanguageComponent", first: true, predicate: EclSiteHeaderLanguageComponent, descendants: true }], viewQueries: [{ propertyName: "topContainerElement", first: true, predicate: ["topContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-site-header__header\">\n <div class=\"ecl-site-header__container ecl-container\">\n <div #topContainer class=\"ecl-site-header__top\">\n <a eclLink \n variant=\"standalone\" \n class=\"ecl-site-header__logo-link\"\n href=\"https://ec.europa.eu/info/index_{{ languageCode }}\"\n (click)=\"onECLogoClick($event)\" \n [attr.aria-label]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\">\n\n <ng-content select=\"[eclSiteHeaderEnvironment]\"></ng-content>\n\n <ng-container *ngIf=\"eclThemeService.isEC$ | async\">\n <img alt=\"European Commission logo\" \n [attr.title]=\"'ecl.footer.EUROPEAN-COMMISSION' | translate\" \n class=\"ecl-site-header__logo-image ecl-site-header__logo-image-desktop\" \n src=\"./assets/images/ecl/ec/logo/logo-ec--{{ languageCode }}.svg\"/>\n </ng-container>\n\n <ng-container *ngIf=\"eclThemeService.isEU$ | async\">\n <img alt=\"European Union flag\" \n [attr.title]=\"'ecl.footer.EUROPEAN-UNION' | translate\" \n class=\"ecl-site-header__logo-image ecl-site-header__logo-image-mobile\" \n src=\"./assets/images/ecl/eu/logo/condensed-version/positive/logo-eu--{{ languageCode}}.svg\"/>\n <img alt=\"European Union flag\" \n [attr.title]=\"'ecl.footer.EUROPEAN-UNION' | translate\" \n class=\"ecl-site-header__logo-image ecl-site-header__logo-image-desktop\" \n src=\"./assets/images/ecl/eu/logo/standard-version/positive/logo-eu--{{ languageCode}}.svg\"/>\n </ng-container>\n </a>\n <ng-content select=\"ecl-site-header-action\"></ng-content>\n </div>\n </div>\n</div>\n\n<ng-content select=\"ecl-site-header-message\"></ng-content>\n<ng-content select=\"ecl-site-header-banner-top\"></ng-content>\n\n<div *ngIf=\"siteName\" class=\"ecl-site-header__banner\">\n <div class=\"ecl-container\">\n <div class=\"ecl-site-header__site-name\">{{ siteName }}</div>\n <ng-content select=\"[eclSiteHeaderCta]\"></ng-content>\n </div>\n</div>\n\n<ng-content select=\"ecl-menu\"></ng-content>\n\n<!-- @deprecated language list is replaced with site header language -->\n<ng-content select=\"ecl-language-list\"></ng-content>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: EclLinkDirective, selector: "[eclLink]", inputs: ["variant", "isNegative", "isNoVisited"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
1486
1493
|
}
|
|
1487
1494
|
__decorate([
|
|
1488
1495
|
coerceElement
|
|
@@ -1516,6 +1523,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImpor
|
|
|
1516
1523
|
}], eclLanguageComponent: [{
|
|
1517
1524
|
type: ContentChild,
|
|
1518
1525
|
args: [EclSiteHeaderLanguageComponent]
|
|
1526
|
+
}], languageCode: [{
|
|
1527
|
+
type: Input
|
|
1519
1528
|
}] } });
|
|
1520
1529
|
|
|
1521
1530
|
/**
|
|
@@ -2842,8 +2851,11 @@ class EclAppComponent extends ECLBaseDirective {
|
|
|
2842
2851
|
}
|
|
2843
2852
|
handleLanguageChangeState() {
|
|
2844
2853
|
this.eclLanguageService.currentLanguage$.pipe(takeUntil$1(this.destroy$)).subscribe(lang => {
|
|
2845
|
-
|
|
2846
|
-
|
|
2854
|
+
setTimeout(() => {
|
|
2855
|
+
this.textDirection = lang.isRtl ? 'rtl' : 'ltr';
|
|
2856
|
+
this.eclSiteHeaderLanguage.languageCode = lang.code;
|
|
2857
|
+
this.eclSiteHeader.languageCode = lang.code;
|
|
2858
|
+
});
|
|
2847
2859
|
});
|
|
2848
2860
|
}
|
|
2849
2861
|
handleUIEvents() {
|
|
@@ -2853,7 +2865,7 @@ class EclAppComponent extends ECLBaseDirective {
|
|
|
2853
2865
|
});
|
|
2854
2866
|
}
|
|
2855
2867
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclAppComponent, deps: [{ token: EclLanguageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2856
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclAppComponent, selector: "ecl-app", outputs: { languageDismiss: "languageDismiss" }, host: { properties: { "attr.dir": "this.textDirection" } }, queries: [{ propertyName: "eclSiteHeaderLanguage", first: true, predicate: EclSiteHeaderLanguageComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>" }); }
|
|
2868
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: EclAppComponent, selector: "ecl-app", outputs: { languageDismiss: "languageDismiss" }, host: { properties: { "attr.dir": "this.textDirection" } }, queries: [{ propertyName: "eclSiteHeaderLanguage", first: true, predicate: EclSiteHeaderLanguageComponent, descendants: true }, { propertyName: "eclSiteHeader", first: true, predicate: EclSiteHeaderComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>" }); }
|
|
2857
2869
|
}
|
|
2858
2870
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: EclAppComponent, decorators: [{
|
|
2859
2871
|
type: Component,
|
|
@@ -2864,6 +2876,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImpor
|
|
|
2864
2876
|
}], eclSiteHeaderLanguage: [{
|
|
2865
2877
|
type: ContentChild,
|
|
2866
2878
|
args: [EclSiteHeaderLanguageComponent]
|
|
2879
|
+
}], eclSiteHeader: [{
|
|
2880
|
+
type: ContentChild,
|
|
2881
|
+
args: [EclSiteHeaderComponent]
|
|
2867
2882
|
}], languageDismiss: [{
|
|
2868
2883
|
type: Output
|
|
2869
2884
|
}] } });
|
|
@@ -4603,8 +4618,10 @@ class EclBreadcrumbComponent extends ECLBaseDirective {
|
|
|
4603
4618
|
this.eclEllipsisSegment.isHidden = true;
|
|
4604
4619
|
}
|
|
4605
4620
|
truncateBreadcrumb() {
|
|
4606
|
-
|
|
4607
|
-
|
|
4621
|
+
setTimeout(() => {
|
|
4622
|
+
this.insertEllipsisSegmentIntoPosition();
|
|
4623
|
+
this.handleOverflownSegments();
|
|
4624
|
+
});
|
|
4608
4625
|
}
|
|
4609
4626
|
insertEllipsisSegmentIntoPosition() {
|
|
4610
4627
|
if (this.hasEnoughSegments()) {
|