@eui/components 21.0.0-alpha.18 → 21.0.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/changelog.html +60 -0
- package/docs/components/EuiAppComponent.html +7 -3
- package/docs/components/EuiAppHeaderComponent.html +1 -1
- package/docs/components/EuiAppToolbarComponent.html +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/miscellaneous/variables.html +48 -506
- package/docs/properties.html +1 -1
- package/fesm2022/eui-components-layout.mjs +2358 -15
- package/fesm2022/eui-components-layout.mjs.map +1 -1
- package/fesm2022/eui-components.mjs +1 -146
- package/fesm2022/eui-components.mjs.map +1 -1
- package/index.d.ts +1 -69
- package/index.d.ts.map +1 -1
- package/layout/index.d.ts +743 -9
- package/layout/index.d.ts.map +1 -1
- package/package.json +28 -56
- package/fesm2022/eui-components-layout-eui-app.mjs +0 -841
- package/fesm2022/eui-components-layout-eui-app.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-footer.mjs +0 -37
- package/fesm2022/eui-components-layout-eui-footer.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-header.mjs +0 -420
- package/fesm2022/eui-components-layout-eui-header.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-notifications-v2.mjs +0 -264
- package/fesm2022/eui-components-layout-eui-notifications-v2.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-notifications.mjs +0 -277
- package/fesm2022/eui-components-layout-eui-notifications.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-sidebar-toggle.mjs +0 -57
- package/fesm2022/eui-components-layout-eui-sidebar-toggle.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-toolbar.mjs +0 -621
- package/fesm2022/eui-components-layout-eui-toolbar.mjs.map +0 -1
- package/layout/eui-app/index.d.ts +0 -259
- package/layout/eui-app/index.d.ts.map +0 -1
- package/layout/eui-app/package.json +0 -3
- package/layout/eui-footer/index.d.ts +0 -14
- package/layout/eui-footer/index.d.ts.map +0 -1
- package/layout/eui-footer/package.json +0 -3
- package/layout/eui-header/index.d.ts +0 -136
- package/layout/eui-header/index.d.ts.map +0 -1
- package/layout/eui-header/package.json +0 -3
- package/layout/eui-notifications/index.d.ts +0 -99
- package/layout/eui-notifications/index.d.ts.map +0 -1
- package/layout/eui-notifications/package.json +0 -3
- package/layout/eui-notifications-v2/index.d.ts +0 -88
- package/layout/eui-notifications-v2/index.d.ts.map +0 -1
- package/layout/eui-notifications-v2/package.json +0 -3
- package/layout/eui-sidebar-toggle/index.d.ts +0 -17
- package/layout/eui-sidebar-toggle/index.d.ts.map +0 -1
- package/layout/eui-sidebar-toggle/package.json +0 -3
- package/layout/eui-toolbar/index.d.ts +0 -193
- package/layout/eui-toolbar/index.d.ts.map +0 -1
- package/layout/eui-toolbar/package.json +0 -3
@@ -1,841 +0,0 @@
|
|
1
|
-
import * as i0 from '@angular/core';
|
2
|
-
import { inject, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component, NgZone, PLATFORM_ID, Input, EventEmitter, booleanAttribute, HostListener, forwardRef, ContentChildren, Output, ViewChild, ElementRef, ChangeDetectorRef, ContentChild, Directive } from '@angular/core';
|
3
|
-
import { EuiAppShellService, CssUtils, consumeEvent, EuiGrowlService } from '@eui/core';
|
4
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
5
|
-
import { ViewportRuler, ScrollDispatcher } from '@angular/cdk/scrolling';
|
6
|
-
import { Subject, Subscription, takeUntil as takeUntil$1, startWith, fromEvent } from 'rxjs';
|
7
|
-
import { filter, takeUntil, debounceTime } from 'rxjs/operators';
|
8
|
-
import { DOCUMENT, AsyncPipe, isPlatformBrowser } from '@angular/common';
|
9
|
-
import * as i1 from '@eui/components/layout/eui-sidebar-toggle';
|
10
|
-
import { EUI_SIDEBAR_TOGGLE } from '@eui/components/layout/eui-sidebar-toggle';
|
11
|
-
import * as i1$1 from '@eui/components/eui-user-profile';
|
12
|
-
import { EuiUserProfileMenuComponent, EUI_USER_PROFILE } from '@eui/components/eui-user-profile';
|
13
|
-
import * as i2 from '@eui/components/eui-button';
|
14
|
-
import { EUI_BUTTON } from '@eui/components/eui-button';
|
15
|
-
import * as i3 from '@eui/components/eui-icon';
|
16
|
-
import { EUI_ICON } from '@eui/components/eui-icon';
|
17
|
-
import * as i1$2 from '@eui/components/eui-menu';
|
18
|
-
import { EUI_MENU } from '@eui/components/eui-menu';
|
19
|
-
import * as i2$1 from '@eui/components/eui-language-selector';
|
20
|
-
import { EUI_LANGUAGE_SELECTOR } from '@eui/components/eui-language-selector';
|
21
|
-
import * as i1$3 from '@eui/components/shared';
|
22
|
-
import { BaseStatesDirective } from '@eui/components/shared';
|
23
|
-
import { ContentObserver } from '@angular/cdk/observers';
|
24
|
-
import * as i2$2 from '@eui/components/eui-icon-button';
|
25
|
-
import { EUI_ICON_BUTTON } from '@eui/components/eui-icon-button';
|
26
|
-
import * as i7 from '@eui/components/eui-dimmer';
|
27
|
-
import { EUI_DIMMER } from '@eui/components/eui-dimmer';
|
28
|
-
import { RouterOutlet } from '@angular/router';
|
29
|
-
import * as i6 from '@eui/components/eui-growl';
|
30
|
-
import { EUI_GROWL } from '@eui/components/eui-growl';
|
31
|
-
import * as i8 from '@eui/components/eui-block-document';
|
32
|
-
import { EUI_BLOCK_DOCUMENT } from '@eui/components/eui-block-document';
|
33
|
-
import * as i5 from '@eui/components/layout/eui-toolbar';
|
34
|
-
import { EUI_TOOLBAR } from '@eui/components/layout/eui-toolbar';
|
35
|
-
|
36
|
-
class EuiAppBreadcrumbComponent {
|
37
|
-
constructor() {
|
38
|
-
this.role = 'nav';
|
39
|
-
this.asService = inject(EuiAppShellService);
|
40
|
-
}
|
41
|
-
get cssClasses() {
|
42
|
-
return this.getCssClasses();
|
43
|
-
}
|
44
|
-
ngOnInit() {
|
45
|
-
this.asService.activateBreadcrumb();
|
46
|
-
}
|
47
|
-
getCssClasses() {
|
48
|
-
return ['eui-app-breadcrumb'].join(' ');
|
49
|
-
}
|
50
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
51
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.3", type: EuiAppBreadcrumbComponent, isStandalone: true, selector: "eui-app-breadcrumb", host: { properties: { "class": "this.cssClasses", "attr.role": "this.role" } }, ngImport: i0, template: '<ng-content/>', isInline: true, styles: [".eui-app-breadcrumb{align-items:center;display:flex;flex-direction:row;height:var(--eui-app-breadcrumb-height);top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height));position:relative;margin:var(--eui-s-m) 0 var(--eui-s-xs) 0;width:100%}@media screen and (max-width: 767px){.eui-app-breadcrumb{visibility:hidden}}\n"], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
52
|
-
}
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppBreadcrumbComponent, decorators: [{
|
54
|
-
type: Component,
|
55
|
-
args: [{ selector: 'eui-app-breadcrumb', template: '<ng-content/>', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, styles: [".eui-app-breadcrumb{align-items:center;display:flex;flex-direction:row;height:var(--eui-app-breadcrumb-height);top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height));position:relative;margin:var(--eui-s-m) 0 var(--eui-s-xs) 0;width:100%}@media screen and (max-width: 767px){.eui-app-breadcrumb{visibility:hidden}}\n"] }]
|
56
|
-
}], propDecorators: { cssClasses: [{
|
57
|
-
type: HostBinding,
|
58
|
-
args: ['class']
|
59
|
-
}], role: [{
|
60
|
-
type: HostBinding,
|
61
|
-
args: ['attr.role']
|
62
|
-
}] } });
|
63
|
-
|
64
|
-
const EUI_APP_BREADCRUMB = [
|
65
|
-
EuiAppBreadcrumbComponent,
|
66
|
-
];
|
67
|
-
|
68
|
-
class EuiAppFooterComponent {
|
69
|
-
constructor() {
|
70
|
-
this.class = 'eui-app-footer';
|
71
|
-
this.role = 'contentinfo';
|
72
|
-
}
|
73
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
74
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.3", type: EuiAppFooterComponent, isStandalone: true, selector: "eui-app-footer", host: { properties: { "class": "this.class", "attr.role": "this.role" } }, ngImport: i0, template: '<ng-content/>', isInline: true, styles: [".eui-app-footer{border-top:1px solid var(--eui-c-divider-light);margin-top:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
75
|
-
}
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppFooterComponent, decorators: [{
|
77
|
-
type: Component,
|
78
|
-
args: [{ selector: 'eui-app-footer', template: '<ng-content/>', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, styles: [".eui-app-footer{border-top:1px solid var(--eui-c-divider-light);margin-top:auto}\n"] }]
|
79
|
-
}], propDecorators: { class: [{
|
80
|
-
type: HostBinding
|
81
|
-
}], role: [{
|
82
|
-
type: HostBinding,
|
83
|
-
args: ['attr.role']
|
84
|
-
}] } });
|
85
|
-
|
86
|
-
const EUI_APP_FOOTER = [
|
87
|
-
EuiAppFooterComponent,
|
88
|
-
];
|
89
|
-
|
90
|
-
class EuiAppHeaderComponent {
|
91
|
-
constructor() {
|
92
|
-
this.asService = inject(EuiAppShellService);
|
93
|
-
this.role = 'banner';
|
94
|
-
this._isShrinkHeaderActive = false;
|
95
|
-
this.isHeaderShrinked = false;
|
96
|
-
this.destroy$ = new Subject();
|
97
|
-
this.zone = inject(NgZone);
|
98
|
-
this.viewportRuler = inject(ViewportRuler);
|
99
|
-
this.scrollDispatcher = inject(ScrollDispatcher);
|
100
|
-
this.document = inject(DOCUMENT);
|
101
|
-
this.platformId = inject(PLATFORM_ID);
|
102
|
-
}
|
103
|
-
get cssClasses() {
|
104
|
-
return this.getCssClasses();
|
105
|
-
}
|
106
|
-
get isShrinkHeaderActive() {
|
107
|
-
return this._isShrinkHeaderActive;
|
108
|
-
}
|
109
|
-
set isShrinkHeaderActive(value) {
|
110
|
-
this._isShrinkHeaderActive = coerceBooleanProperty(value);
|
111
|
-
}
|
112
|
-
ngOnInit() {
|
113
|
-
this.asService.activateHeader();
|
114
|
-
// Scrolled is running outside angular zone (for performance reasons - less change detections).
|
115
|
-
// Read more: https://material.angular.io/cdk/scrolling/api#ScrollDispatcher
|
116
|
-
// scrolled uses DEFAULT_SCROLL_TIME which is 20ms
|
117
|
-
this.scrollDispatcher
|
118
|
-
.scrolled()
|
119
|
-
.pipe(filter(() => this.isShrinkHeaderActive), takeUntil(this.destroy$))
|
120
|
-
.subscribe(() => {
|
121
|
-
// read the top scroll position of the viewport
|
122
|
-
const topScrollPos = this.viewportRuler.getViewportScrollPosition().top;
|
123
|
-
CssUtils.setHeaderShrinkCssVar(topScrollPos > 0, this.document, this.platformId);
|
124
|
-
// change the shrinkHeader value only if it's different from the current one
|
125
|
-
if (topScrollPos > 0 !== this.isHeaderShrinked) {
|
126
|
-
// we need to run this inside angular zone to trigger change detection in CSS
|
127
|
-
this.zone.run(() => (this.isHeaderShrinked = topScrollPos > 0));
|
128
|
-
}
|
129
|
-
});
|
130
|
-
}
|
131
|
-
ngOnDestroy() {
|
132
|
-
this.destroy$.next(true);
|
133
|
-
this.destroy$.unsubscribe();
|
134
|
-
// cleanup
|
135
|
-
this.asService.setState({
|
136
|
-
...this.asService.state,
|
137
|
-
hasHeader: false,
|
138
|
-
});
|
139
|
-
this.document.documentElement.style.removeProperty('--eui-app-header-height');
|
140
|
-
}
|
141
|
-
getCssClasses() {
|
142
|
-
return ['eui-app-header', this.isHeaderShrinked ? 'eui-app-header--shrinked' : ''].join(' ');
|
143
|
-
}
|
144
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
145
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0-next.3", type: EuiAppHeaderComponent, isStandalone: true, selector: "eui-app-header", inputs: { isShrinkHeaderActive: "isShrinkHeaderActive" }, host: { properties: { "class": "this.cssClasses", "attr.role": "this.role" } }, ngImport: i0, template: "@if ((asService.state$ | async).hasSidebar && (asService.state$ | async).hasHeader && !(asService.state$ | async).hasToolbar) {\n <eui-sidebar-toggle class=\"eui-app-header__sidebar-toggle\"/>\n}\n<ng-content select=\"eui-header\"/>\n", styles: [".eui-app-header{align-items:center;display:flex;flex-direction:row;height:var(--eui-app-header-height);position:fixed;right:0;top:var(--eui-app-top-message-height);width:100%;z-index:var(--eui-zi-header);transition:visibility .1s ease}.eui-app-header--shrinked{visibility:hidden}.eui-app-header__sidebar-toggle{padding-left:var(--eui-s-xs);padding-top:var(--eui-s-m)}@media screen and (max-width: 767px){.eui-app-header{visibility:hidden}}\n"], dependencies: [{ kind: "component", type: i1.EuiSidebarToggleComponent, selector: "eui-sidebar-toggle", inputs: ["e2eAttr", "iconSvgFillColor"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
146
|
-
}
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppHeaderComponent, decorators: [{
|
148
|
-
type: Component,
|
149
|
-
args: [{ selector: 'eui-app-header', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, imports: [
|
150
|
-
AsyncPipe,
|
151
|
-
...EUI_SIDEBAR_TOGGLE,
|
152
|
-
], template: "@if ((asService.state$ | async).hasSidebar && (asService.state$ | async).hasHeader && !(asService.state$ | async).hasToolbar) {\n <eui-sidebar-toggle class=\"eui-app-header__sidebar-toggle\"/>\n}\n<ng-content select=\"eui-header\"/>\n", styles: [".eui-app-header{align-items:center;display:flex;flex-direction:row;height:var(--eui-app-header-height);position:fixed;right:0;top:var(--eui-app-top-message-height);width:100%;z-index:var(--eui-zi-header);transition:visibility .1s ease}.eui-app-header--shrinked{visibility:hidden}.eui-app-header__sidebar-toggle{padding-left:var(--eui-s-xs);padding-top:var(--eui-s-m)}@media screen and (max-width: 767px){.eui-app-header{visibility:hidden}}\n"] }]
|
153
|
-
}], propDecorators: { cssClasses: [{
|
154
|
-
type: HostBinding,
|
155
|
-
args: ['class']
|
156
|
-
}], role: [{
|
157
|
-
type: HostBinding,
|
158
|
-
args: ['attr.role']
|
159
|
-
}], isShrinkHeaderActive: [{
|
160
|
-
type: Input
|
161
|
-
}] } });
|
162
|
-
|
163
|
-
const EUI_APP_HEADER = [
|
164
|
-
EuiAppHeaderComponent,
|
165
|
-
];
|
166
|
-
|
167
|
-
class EuiAppSidebarBodyComponent {
|
168
|
-
constructor() {
|
169
|
-
this.class = 'eui-app-sidebar-body';
|
170
|
-
}
|
171
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
172
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.3", type: EuiAppSidebarBodyComponent, isStandalone: true, selector: "eui-app-sidebar-body", host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<ng-content select=\"eui-app-sidebar-menu\"/>\n<ng-content/>\n", changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
173
|
-
}
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarBodyComponent, decorators: [{
|
175
|
-
type: Component,
|
176
|
-
args: [{ selector: 'eui-app-sidebar-body', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"eui-app-sidebar-menu\"/>\n<ng-content/>\n" }]
|
177
|
-
}], propDecorators: { class: [{
|
178
|
-
type: HostBinding
|
179
|
-
}] } });
|
180
|
-
|
181
|
-
class EuiAppSidebarDrawerComponent {
|
182
|
-
constructor() {
|
183
|
-
this._isExpanded = false;
|
184
|
-
}
|
185
|
-
get isExpanded() {
|
186
|
-
return this._isExpanded;
|
187
|
-
}
|
188
|
-
set isExpanded(value) {
|
189
|
-
this._isExpanded = coerceBooleanProperty(value);
|
190
|
-
}
|
191
|
-
get cssClasses() {
|
192
|
-
return this._getCssClasses();
|
193
|
-
}
|
194
|
-
onSidebarDrawerContentClick(event) {
|
195
|
-
event.stopPropagation();
|
196
|
-
}
|
197
|
-
_getCssClasses() {
|
198
|
-
return ['eui-app-sidebar-drawer', this.isExpanded ? 'eui-app-sidebar-drawer--expanded' : ''].join(' ').trim();
|
199
|
-
}
|
200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
201
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.3", type: EuiAppSidebarDrawerComponent, isStandalone: true, selector: "eui-app-sidebar-drawer", inputs: { isExpanded: "isExpanded" }, host: { properties: { "class": "this.cssClasses" } }, ngImport: i0, template: "<!-- HIDDEN APP DRAWER : scrolls up and revealing user info details or any other injected content -->\n<div class=\"eui-app-sidebar-drawer-content\" (click)=\"onSidebarDrawerContentClick($event)\">\n <ng-content></ng-content>\n</div>\n", encapsulation: i0.ViewEncapsulation.None }); }
|
202
|
-
}
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarDrawerComponent, decorators: [{
|
204
|
-
type: Component,
|
205
|
-
args: [{ selector: 'eui-app-sidebar-drawer', encapsulation: ViewEncapsulation.None, template: "<!-- HIDDEN APP DRAWER : scrolls up and revealing user info details or any other injected content -->\n<div class=\"eui-app-sidebar-drawer-content\" (click)=\"onSidebarDrawerContentClick($event)\">\n <ng-content></ng-content>\n</div>\n" }]
|
206
|
-
}], propDecorators: { isExpanded: [{
|
207
|
-
type: Input
|
208
|
-
}], cssClasses: [{
|
209
|
-
type: HostBinding,
|
210
|
-
args: ['class']
|
211
|
-
}] } });
|
212
|
-
|
213
|
-
class EuiAppSidebarFooterComponent {
|
214
|
-
constructor() {
|
215
|
-
this.class = 'eui-app-sidebar-footer';
|
216
|
-
this.asService = inject(EuiAppShellService);
|
217
|
-
this.document = inject(DOCUMENT);
|
218
|
-
}
|
219
|
-
ngOnInit() {
|
220
|
-
this.asService.activateSidebarFooter();
|
221
|
-
}
|
222
|
-
ngOnDestroy() {
|
223
|
-
this.document.documentElement.style.removeProperty('--eui-app-sidebar-footer-height');
|
224
|
-
}
|
225
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
226
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.3", type: EuiAppSidebarFooterComponent, isStandalone: true, selector: "eui-app-sidebar-footer", host: { properties: { "class": "this.class" } }, ngImport: i0, template: '<ng-content/>', isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
227
|
-
}
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarFooterComponent, decorators: [{
|
229
|
-
type: Component,
|
230
|
-
args: [{
|
231
|
-
selector: 'eui-app-sidebar-footer',
|
232
|
-
template: '<ng-content/>',
|
233
|
-
encapsulation: ViewEncapsulation.None,
|
234
|
-
}]
|
235
|
-
}], propDecorators: { class: [{
|
236
|
-
type: HostBinding
|
237
|
-
}] } });
|
238
|
-
|
239
|
-
class EuiAppSidebarHeaderUserProfileComponent {
|
240
|
-
constructor() {
|
241
|
-
this.welcomeLabel = 'Welcome';
|
242
|
-
this.impersonateLabel = 'acting as';
|
243
|
-
this.isShowUserInfos = true;
|
244
|
-
this.isShowAvatarInitials = false;
|
245
|
-
this.isOnline = true;
|
246
|
-
this.hasWelcomeLabel = true;
|
247
|
-
this.hasTabNavigation = false;
|
248
|
-
this.hasToggle = false;
|
249
|
-
this.hasProfileDrawer = false;
|
250
|
-
// eslint-disable-next-line
|
251
|
-
this.toggle = new EventEmitter();
|
252
|
-
this.toggleProfile = false;
|
253
|
-
}
|
254
|
-
get cssClasses() {
|
255
|
-
return this._getCssClasses();
|
256
|
-
}
|
257
|
-
// TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html
|
258
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
259
|
-
onProfileClick(event) {
|
260
|
-
this.toggleProfile = !this.toggleProfile;
|
261
|
-
consumeEvent(event);
|
262
|
-
this.toggle.emit();
|
263
|
-
}
|
264
|
-
onClick(event) {
|
265
|
-
if (this.hasProfileDrawer) {
|
266
|
-
this.onProfileClick(event);
|
267
|
-
}
|
268
|
-
consumeEvent(event);
|
269
|
-
}
|
270
|
-
_getCssClasses() {
|
271
|
-
return [
|
272
|
-
'eui-app-sidebar-header-user-profile',
|
273
|
-
this.hasProfileDrawer ? 'eui-app-sidebar-header-user-profile--has-drawer' : '',
|
274
|
-
].join(' ').trim();
|
275
|
-
}
|
276
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarHeaderUserProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
277
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0-next.3", type: EuiAppSidebarHeaderUserProfileComponent, isStandalone: true, selector: "eui-app-sidebar-header-user-profile", inputs: { welcomeLabel: "welcomeLabel", impersonateLabel: "impersonateLabel", avatarUrl: "avatarUrl", isShowUserInfos: ["isShowUserInfos", "isShowUserInfos", booleanAttribute], isShowAvatarInitials: ["isShowAvatarInitials", "isShowAvatarInitials", booleanAttribute], isOnline: ["isOnline", "isOnline", booleanAttribute], hasWelcomeLabel: ["hasWelcomeLabel", "hasWelcomeLabel", booleanAttribute], hasTabNavigation: ["hasTabNavigation", "hasTabNavigation", booleanAttribute], hasToggle: ["hasToggle", "hasToggle", booleanAttribute], hasProfileDrawer: ["hasProfileDrawer", "hasProfileDrawer", booleanAttribute] }, outputs: { toggle: "toggle" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class": "this.cssClasses" } }, queries: [{ propertyName: "userProfileMenu", predicate: i0.forwardRef(() => EuiUserProfileMenuComponent) }], ngImport: i0, template: "<eui-user-profile\n [hasWelcomeLabel]=\"hasWelcomeLabel\"\n [welcomeLabel]=\"welcomeLabel\"\n [impersonateLabel]=\"impersonateLabel\"\n [avatarUrl]=\"avatarUrl\"\n [hasMenu]=\"userProfileMenu.length !== 0\"\n [isShowUserInfos]=\"isShowUserInfos\"\n [isShowAvatarInitials]=\"isShowAvatarInitials\"\n [hasTabNavigation]=\"hasTabNavigation\"\n isReverse\n [hasToggle]=\"hasToggle\"\n #userProfile>\n <ng-content select=\"eui-user-profile-menu\" />\n</eui-user-profile>\n\n@if (hasProfileDrawer) {\n <button euiButton euiRounded euiIconButton euiBasicButton euiSecondary class=\"eui-u-ml-auto\" aria-label=\"Toggle user profile details\">\n <eui-icon-svg [icon]=\"toggleProfile ? 'chevron-up:sharp' : 'chevron-down:sharp'\"></eui-icon-svg>\n </button>\n}\n", styles: [".eui-app-sidebar-header-user-profile{border-bottom:1px solid var(--eui-c-divider);display:flex;height:var(--eui-app-sidebar-header-user-profile);padding:var(--eui-s-s) var(--eui-s-m);position:relative;width:100%}.eui-app-sidebar-header-user-profile--has-drawer,.eui-app-sidebar-header-user-profile--has-drawer .eui-user-profile-content--no-menu{cursor:pointer}@media screen and (min-width: 996px){.eui-app-sidebar-header-user-profile{display:none}}\n"], dependencies: [{ kind: "component", type: i1$1.EuiUserProfileComponent, selector: "eui-user-profile", inputs: ["welcomeLabel", "impersonateLabel", "avatarUrl", "subInfos", "statusVariant", "hasMenu", "hasWelcomeLabel", "isShowAvatarInitials", "hasTabNavigation", "isReverse", "hasToggle", "isHeaderUserProfile", "isToolbarUserProfile", "isShowUserInfos", "isMobileOnly", "euiStatusSecondary", "euiStatusSuccess", "euiStatusDanger", "reverseNameOrder"] }, { kind: "component", type: i2.EuiButtonComponent, selector: "button[euiButton], a[euiButton]", inputs: ["e2eAttr", "id", "euiBasicButton", "euiButtonCall", "euiCTAButton", "euiBlockButton", "euiIconButton", "euiAvatarButton", "euiLineWrap", "isCompact", "hasNoFocusRing", "isChecked", "euiDisabled"], outputs: ["buttonClick"] }, { kind: "component", type: i3.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "fillColor", "set", "size", "style", "iconUrl", "transform", "euiVariant", "aria-label", "ariaHidden", "focusable", "isLoading", "isInputIcon", "euiStart", "euiEnd"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
278
|
-
}
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarHeaderUserProfileComponent, decorators: [{
|
280
|
-
type: Component,
|
281
|
-
args: [{ selector: 'eui-app-sidebar-header-user-profile', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, imports: [
|
282
|
-
...EUI_USER_PROFILE,
|
283
|
-
...EUI_BUTTON,
|
284
|
-
...EUI_ICON,
|
285
|
-
], template: "<eui-user-profile\n [hasWelcomeLabel]=\"hasWelcomeLabel\"\n [welcomeLabel]=\"welcomeLabel\"\n [impersonateLabel]=\"impersonateLabel\"\n [avatarUrl]=\"avatarUrl\"\n [hasMenu]=\"userProfileMenu.length !== 0\"\n [isShowUserInfos]=\"isShowUserInfos\"\n [isShowAvatarInitials]=\"isShowAvatarInitials\"\n [hasTabNavigation]=\"hasTabNavigation\"\n isReverse\n [hasToggle]=\"hasToggle\"\n #userProfile>\n <ng-content select=\"eui-user-profile-menu\" />\n</eui-user-profile>\n\n@if (hasProfileDrawer) {\n <button euiButton euiRounded euiIconButton euiBasicButton euiSecondary class=\"eui-u-ml-auto\" aria-label=\"Toggle user profile details\">\n <eui-icon-svg [icon]=\"toggleProfile ? 'chevron-up:sharp' : 'chevron-down:sharp'\"></eui-icon-svg>\n </button>\n}\n", styles: [".eui-app-sidebar-header-user-profile{border-bottom:1px solid var(--eui-c-divider);display:flex;height:var(--eui-app-sidebar-header-user-profile);padding:var(--eui-s-s) var(--eui-s-m);position:relative;width:100%}.eui-app-sidebar-header-user-profile--has-drawer,.eui-app-sidebar-header-user-profile--has-drawer .eui-user-profile-content--no-menu{cursor:pointer}@media screen and (min-width: 996px){.eui-app-sidebar-header-user-profile{display:none}}\n"] }]
|
286
|
-
}], propDecorators: { cssClasses: [{
|
287
|
-
type: HostBinding,
|
288
|
-
args: ['class']
|
289
|
-
}], welcomeLabel: [{
|
290
|
-
type: Input
|
291
|
-
}], impersonateLabel: [{
|
292
|
-
type: Input
|
293
|
-
}], avatarUrl: [{
|
294
|
-
type: Input
|
295
|
-
}], isShowUserInfos: [{
|
296
|
-
type: Input,
|
297
|
-
args: [{ transform: booleanAttribute }]
|
298
|
-
}], isShowAvatarInitials: [{
|
299
|
-
type: Input,
|
300
|
-
args: [{ transform: booleanAttribute }]
|
301
|
-
}], isOnline: [{
|
302
|
-
type: Input,
|
303
|
-
args: [{ transform: booleanAttribute }]
|
304
|
-
}], hasWelcomeLabel: [{
|
305
|
-
type: Input,
|
306
|
-
args: [{ transform: booleanAttribute }]
|
307
|
-
}], hasTabNavigation: [{
|
308
|
-
type: Input,
|
309
|
-
args: [{ transform: booleanAttribute }]
|
310
|
-
}], hasToggle: [{
|
311
|
-
type: Input,
|
312
|
-
args: [{ transform: booleanAttribute }]
|
313
|
-
}], hasProfileDrawer: [{
|
314
|
-
type: Input,
|
315
|
-
args: [{ transform: booleanAttribute }]
|
316
|
-
}], toggle: [{
|
317
|
-
type: Output
|
318
|
-
}], userProfileMenu: [{
|
319
|
-
type: ContentChildren,
|
320
|
-
args: [forwardRef(() => EuiUserProfileMenuComponent)]
|
321
|
-
}], onClick: [{
|
322
|
-
type: HostListener,
|
323
|
-
args: ['click', ['$event']]
|
324
|
-
}] } });
|
325
|
-
|
326
|
-
class EuiAppSidebarHeaderComponent {
|
327
|
-
constructor() {
|
328
|
-
this.class = 'eui-app-sidebar-header';
|
329
|
-
this.asService = inject(EuiAppShellService);
|
330
|
-
this.document = inject(DOCUMENT);
|
331
|
-
}
|
332
|
-
ngOnInit() {
|
333
|
-
this.asService.activateSidebarHeader();
|
334
|
-
}
|
335
|
-
ngOnDestroy() {
|
336
|
-
this.document.documentElement.style.removeProperty('--eui-app-sidebar-header-height');
|
337
|
-
}
|
338
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
339
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.3", type: EuiAppSidebarHeaderComponent, isStandalone: true, selector: "eui-app-sidebar-header", host: { properties: { "class": "this.class" } }, ngImport: i0, template: '<ng-content/>', isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
340
|
-
}
|
341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarHeaderComponent, decorators: [{
|
342
|
-
type: Component,
|
343
|
-
args: [{
|
344
|
-
selector: 'eui-app-sidebar-header',
|
345
|
-
template: '<ng-content/>',
|
346
|
-
encapsulation: ViewEncapsulation.None,
|
347
|
-
}]
|
348
|
-
}], propDecorators: { class: [{
|
349
|
-
type: HostBinding
|
350
|
-
}] } });
|
351
|
-
|
352
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
353
|
-
class EuiAppSidebarMenuComponent {
|
354
|
-
constructor() {
|
355
|
-
this.asService = inject(EuiAppShellService);
|
356
|
-
this.class = 'eui-app-sidebar-menu';
|
357
|
-
this.hasFilter = false;
|
358
|
-
this.hasIcons = false;
|
359
|
-
this.hasIconsLabels = false;
|
360
|
-
this.hasTooltip = true;
|
361
|
-
this.hasTooltipOnExpanded = false;
|
362
|
-
this.expandAllItems = false;
|
363
|
-
this.isCollapsed = false;
|
364
|
-
this.hasCollapsedInitials = false;
|
365
|
-
this.isFlat = false;
|
366
|
-
this.hasScrollToItem = false;
|
367
|
-
this.hasBoldRootLevel = false;
|
368
|
-
this.sidebarItemClick = new EventEmitter();
|
369
|
-
this.sidebarItemToggle = new EventEmitter();
|
370
|
-
this.subs = new Subscription();
|
371
|
-
}
|
372
|
-
ngOnInit() {
|
373
|
-
if (this.items) {
|
374
|
-
this.asService.setState({
|
375
|
-
...this.asService.state,
|
376
|
-
sidebarLinks: this.items,
|
377
|
-
});
|
378
|
-
}
|
379
|
-
if (this.hasIconsLabels) {
|
380
|
-
this.asService.hasSidebarCollapsedVariant = this.hasIconsLabels;
|
381
|
-
}
|
382
|
-
this.subs.add(this.asService.state$.subscribe((state) => {
|
383
|
-
if (state?.breakpoints?.isMobile) {
|
384
|
-
this.items = state.combinedLinks;
|
385
|
-
}
|
386
|
-
else {
|
387
|
-
this.items = state.sidebarLinks;
|
388
|
-
}
|
389
|
-
}));
|
390
|
-
// subscribe to state changes
|
391
|
-
// this.subs.add(this.asService.getState<Items[]>('combinedLinks').subscribe((links) => (this.items = links)));
|
392
|
-
}
|
393
|
-
ngAfterViewInit() {
|
394
|
-
this.subs.add(this.asService.state$.subscribe((state) => {
|
395
|
-
if (state?.isSidebarFocused && this.menu) {
|
396
|
-
this.menu.menubar.nativeElement.focus();
|
397
|
-
}
|
398
|
-
}));
|
399
|
-
}
|
400
|
-
ngOnDestroy() {
|
401
|
-
this.subs.unsubscribe();
|
402
|
-
}
|
403
|
-
ngOnChanges(changes) {
|
404
|
-
if (changes.items) {
|
405
|
-
this.asService.setState({
|
406
|
-
...this.asService.state,
|
407
|
-
sidebarLinks: this.items,
|
408
|
-
});
|
409
|
-
}
|
410
|
-
}
|
411
|
-
onMenuItemClicked(event) {
|
412
|
-
// Auto-close sidebar menu after click when in mobile / tablet modes
|
413
|
-
if (event.url &&
|
414
|
-
(this.asService.state.breakpoints.isMobile || this.asService.state.breakpoints.isTablet || this.asService.state.isSidebarHidden)) {
|
415
|
-
this.asService.isSidebarOpen = false;
|
416
|
-
}
|
417
|
-
this.sidebarItemClick.emit(event);
|
418
|
-
}
|
419
|
-
onSidebarItemToggled(event) {
|
420
|
-
this.sidebarItemToggle.emit(event);
|
421
|
-
}
|
422
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
423
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.0.0-next.3", type: EuiAppSidebarMenuComponent, isStandalone: true, selector: "eui-app-sidebar-menu", inputs: { hasFilter: ["hasFilter", "hasFilter", booleanAttribute], hasIcons: ["hasIcons", "hasIcons", booleanAttribute], hasIconsLabels: ["hasIconsLabels", "hasIconsLabels", booleanAttribute], hasTooltip: ["hasTooltip", "hasTooltip", booleanAttribute], hasTooltipOnExpanded: ["hasTooltipOnExpanded", "hasTooltipOnExpanded", booleanAttribute], expandAllItems: ["expandAllItems", "expandAllItems", booleanAttribute], isCollapsed: ["isCollapsed", "isCollapsed", booleanAttribute], hasCollapsedInitials: ["hasCollapsedInitials", "hasCollapsedInitials", booleanAttribute], isFlat: ["isFlat", "isFlat", booleanAttribute], hasScrollToItem: ["hasScrollToItem", "hasScrollToItem", booleanAttribute], hasBoldRootLevel: ["hasBoldRootLevel", "hasBoldRootLevel", booleanAttribute], items: "items" }, outputs: { sidebarItemClick: "sidebarItemClick", sidebarItemToggle: "sidebarItemToggle" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<eui-menu\n #menu\n [items]=\"items\"\n [hasFilter]=\"hasFilter\"\n [hasIcons]=\"hasIcons\"\n [hasIconsLabels]=\"hasIconsLabels\"\n [hasTooltip]=\"hasTooltip\"\n [hasTooltipOnExpanded]=\"hasTooltipOnExpanded\"\n [expandAllItems]=\"expandAllItems\"\n [isFlat]=\"isFlat\"\n [hasScrollToItem]=\"hasScrollToItem\"\n [hasCollapsedInitials]=\"hasCollapsedInitials\"\n [hasBoldRootLevel]=\"hasBoldRootLevel\"\n [isCollapsed]=\"!(asService.state$ | async).isSidebarOpen\"\n (itemClick)=\"onMenuItemClicked($event)\"\n (expandToggle)=\"onSidebarItemToggled($event)\" />\n", dependencies: [{ kind: "component", type: i1$2.EuiMenuComponent, selector: "eui-menu", inputs: ["items", "searchFilterLabel", "externalLinkLabel", "fragmentId", "filterValue", "isCollapsed", "hasCollapsedInitials", "hasFilter", "hasIcons", "hasIconsLabels", "hasTooltip", "hasTooltipOnExpanded", "expandAllItems", "isFlat", "hasScrollToItem", "hasBoldRootLevel"], outputs: ["isClick", "itemClick", "expandToggle"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
424
|
-
}
|
425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarMenuComponent, decorators: [{
|
426
|
-
type: Component,
|
427
|
-
args: [{ selector: 'eui-app-sidebar-menu', encapsulation: ViewEncapsulation.None, imports: [
|
428
|
-
AsyncPipe,
|
429
|
-
...EUI_MENU,
|
430
|
-
], template: "<eui-menu\n #menu\n [items]=\"items\"\n [hasFilter]=\"hasFilter\"\n [hasIcons]=\"hasIcons\"\n [hasIconsLabels]=\"hasIconsLabels\"\n [hasTooltip]=\"hasTooltip\"\n [hasTooltipOnExpanded]=\"hasTooltipOnExpanded\"\n [expandAllItems]=\"expandAllItems\"\n [isFlat]=\"isFlat\"\n [hasScrollToItem]=\"hasScrollToItem\"\n [hasCollapsedInitials]=\"hasCollapsedInitials\"\n [hasBoldRootLevel]=\"hasBoldRootLevel\"\n [isCollapsed]=\"!(asService.state$ | async).isSidebarOpen\"\n (itemClick)=\"onMenuItemClicked($event)\"\n (expandToggle)=\"onSidebarItemToggled($event)\" />\n" }]
|
431
|
-
}], ctorParameters: () => [], propDecorators: { class: [{
|
432
|
-
type: HostBinding
|
433
|
-
}], hasFilter: [{
|
434
|
-
type: Input,
|
435
|
-
args: [{ transform: booleanAttribute }]
|
436
|
-
}], hasIcons: [{
|
437
|
-
type: Input,
|
438
|
-
args: [{ transform: booleanAttribute }]
|
439
|
-
}], hasIconsLabels: [{
|
440
|
-
type: Input,
|
441
|
-
args: [{ transform: booleanAttribute }]
|
442
|
-
}], hasTooltip: [{
|
443
|
-
type: Input,
|
444
|
-
args: [{ transform: booleanAttribute }]
|
445
|
-
}], hasTooltipOnExpanded: [{
|
446
|
-
type: Input,
|
447
|
-
args: [{ transform: booleanAttribute }]
|
448
|
-
}], expandAllItems: [{
|
449
|
-
type: Input,
|
450
|
-
args: [{ transform: booleanAttribute }]
|
451
|
-
}], isCollapsed: [{
|
452
|
-
type: Input,
|
453
|
-
args: [{ transform: booleanAttribute }]
|
454
|
-
}], hasCollapsedInitials: [{
|
455
|
-
type: Input,
|
456
|
-
args: [{ transform: booleanAttribute }]
|
457
|
-
}], isFlat: [{
|
458
|
-
type: Input,
|
459
|
-
args: [{ transform: booleanAttribute }]
|
460
|
-
}], hasScrollToItem: [{
|
461
|
-
type: Input,
|
462
|
-
args: [{ transform: booleanAttribute }]
|
463
|
-
}], hasBoldRootLevel: [{
|
464
|
-
type: Input,
|
465
|
-
args: [{ transform: booleanAttribute }]
|
466
|
-
}], items: [{
|
467
|
-
type: Input
|
468
|
-
}], sidebarItemClick: [{
|
469
|
-
type: Output
|
470
|
-
}], sidebarItemToggle: [{
|
471
|
-
type: Output
|
472
|
-
}], menu: [{
|
473
|
-
type: ViewChild,
|
474
|
-
args: ['menu', { static: false }]
|
475
|
-
}] } });
|
476
|
-
|
477
|
-
class EuiAppSidebarComponent {
|
478
|
-
constructor() {
|
479
|
-
this.string = 'eui-app-sidebar';
|
480
|
-
this.asService = inject(EuiAppShellService, { optional: true });
|
481
|
-
this.subscriptions = [];
|
482
|
-
this.document = inject(DOCUMENT);
|
483
|
-
}
|
484
|
-
close() {
|
485
|
-
if (this.asService &&
|
486
|
-
(this.asService.state.breakpoints.isMobile || this.asService.state.breakpoints.isTablet || this.asService.state.isSidebarHidden)) {
|
487
|
-
this.asService.isSidebarOpen = false;
|
488
|
-
}
|
489
|
-
}
|
490
|
-
ngOnInit() {
|
491
|
-
this.asService?.activateSidebar();
|
492
|
-
this.subscriptions.push(this.asService
|
493
|
-
?.getState('breakpoints.isMobile')
|
494
|
-
.pipe(filter((s) => s === true))
|
495
|
-
.subscribe(() => (this.asService.isSidebarOpen = false)));
|
496
|
-
this.subscriptions.push(this.asService
|
497
|
-
?.getState('breakpoints.isTablet')
|
498
|
-
.pipe(filter((s) => s === true))
|
499
|
-
.subscribe(() => (this.asService.isSidebarOpen = false)));
|
500
|
-
}
|
501
|
-
ngOnDestroy() {
|
502
|
-
this.subscriptions.forEach((s) => s.unsubscribe());
|
503
|
-
this.asService?.setState({
|
504
|
-
...this.asService.state,
|
505
|
-
hasSidebar: false,
|
506
|
-
});
|
507
|
-
CssUtils.removeSidebarCssVars(this.document);
|
508
|
-
}
|
509
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
510
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.3", type: EuiAppSidebarComponent, isStandalone: true, selector: "eui-app-sidebar", host: { listeners: { "body:click": "close()" }, properties: { "class": "this.string" } }, ngImport: i0, template: "<aside class=\"eui-app-sidebar-content\">\n <ng-content select=\"eui-app-sidebar-header-user-profile\"></ng-content>\n <ng-content select=\"eui-app-sidebar-header\"></ng-content>\n <ng-content select=\"eui-app-sidebar-body\"></ng-content>\n <ng-content select=\"eui-app-sidebar-footer\"></ng-content>\n <ng-content select=\"eui-app-sidebar-drawer\"></ng-content>\n</aside>\n", styles: [".eui-app-sidebar{background-color:var(--eui-c-surface-shell);height:100%;left:0;position:fixed;top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-toolbar-mega-menu-height) + var(--eui-app-top-message-height));transition:top .1s ease,width .1s ease-in,margin-left .1s ease-in;width:var(--eui-app-sidebar-width);box-shadow:var(--eui-sh-10)}.eui-app-sidebar-header{align-items:center;background-color:var(--eui-c-surface-shell);border-bottom:1px solid var(--eui-c-divider-light);display:flex;width:100%}.eui-app-sidebar-body{display:flex;height:100%;max-height:calc(100% - (var(--eui-app-sidebar-header-height) + var(--eui-app-sidebar-footer-height)));overflow-x:hidden;overflow-y:scroll}.eui-app-sidebar-body::-webkit-scrollbar{display:inherit;height:8px;width:8px;background-color:var(--eui-c-secondary-surface-light)}.eui-app-sidebar-body::-webkit-scrollbar-thumb{background-color:var(--_eui-scrollbars-foreground-color);border-radius:5rem}.eui-app-sidebar-body::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-secondary-surface)}.eui-app-sidebar-body::-webkit-scrollbar-track{background-color:var(--eui-c-secondary-surface-light);border-radius:0}@-moz-document url-prefix(){.eui-app-sidebar-body{scrollbar-color:var(--eui-c-secondary-surface) var(--eui-c-secondary-surface-light);scrollbar-width:auto}}.eui-app-sidebar-footer{align-items:center;display:flex;flex:0 0 auto;justify-content:center;padding:var(--eui-s-xs)}.sidebar--close:not(.sidebar--hover) .eui-app-sidebar-body{max-height:100%}.eui-app-sidebar-menu{display:flex;height:100%;width:100%}.eui-app-sidebar-content{border-right:1px solid var(--eui-c-divider-light);background-color:var(--eui-c-surface-shell);box-shadow:var(--eui-sh-2);display:flex;flex-direction:column;height:100%;max-height:calc(100% - (var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height)));overflow:hidden;position:relative}.modal-open .eui-app-sidebar{z-index:auto}@media screen and (max-width: 767px){.eui-app-sidebar{z-index:var(--eui-zi-sidebar)}.eui-app-sidebar-body{max-height:100%}.sidebar--close .eui-app-sidebar{box-shadow:none!important;margin-left:calc(var(--eui-app-sidebar-width-active) * -1)}.sidebar--open .eui-app-sidebar{display:initial;margin-left:0;width:75%}}@media screen and (min-width: 768px) and (max-width: 995px){.eui-app-sidebar{z-index:var(--eui-zi-sidebar)}.eui-app-sidebar-body{max-height:100%}.sidebar--close .eui-app-sidebar{box-shadow:none!important;margin-left:calc(var(--eui-app-sidebar-width-active) * -1)}.sidebar--open .eui-app-sidebar{display:initial;margin-left:0;width:50%}.sidebar--hidden.sidebar--open .eui-app-sidebar{box-shadow:var(--eui-sh-4);width:var(--eui-app-sidebar-width-active)}}@media screen and (min-width: 996px){.sidebar--hover .eui-app-sidebar{z-index:var(--eui-zi-sidebar)}.sidebar--close:not(.sidebar--hover) .eui-app-sidebar{width:var(--eui-app-sidebar-width-close)}.sidebar--close:not(.sidebar--hover) .eui-app-sidebar-header{display:none}.sidebar--close:not(.sidebar--hover) .eui-app-sidebar-footer{text-indent:-9999px}.sidebar--hidden.sidebar--close .eui-app-sidebar{margin-left:calc(var(--eui-app-sidebar-width-active) * -1)}.sidebar--hidden.sidebar--open .eui-app-sidebar{box-shadow:var(--eui-sh-4);display:initial;margin-left:0;width:var(--eui-app-sidebar-width-active);z-index:var(--eui-zi-sidebar)}}.eui-app-sidebar-drawer{display:none}.eui-app.sidebar--open.md .eui-app-sidebar-drawer,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer{display:flex;height:100%;position:fixed;top:100vh;transition:top .25s ease-in-out}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content{background:var(--eui-c-surface-shell);border-top:1px solid var(--eui-c-divider);height:calc(100% - var(--eui-app-sidebar-header-user-profile));overflow-y:auto;padding:var(--eui-s-s);width:100%}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content::-webkit-scrollbar,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content::-webkit-scrollbar,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content::-webkit-scrollbar{display:inherit;height:8px;width:8px;background-color:var(--eui-c-secondary-surface-light)}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb{background-color:var(--_eui-scrollbars-foreground-color);border-radius:5rem}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb:hover,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb:hover,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-secondary-surface)}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content::-webkit-scrollbar-track,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content::-webkit-scrollbar-track,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content::-webkit-scrollbar-track{background-color:var(--eui-c-secondary-surface-light);border-radius:0}@-moz-document url-prefix(){.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content{scrollbar-color:var(--eui-c-secondary-surface) var(--eui-c-secondary-surface-light);scrollbar-width:auto}}.eui-app.sidebar--open.md .eui-app-sidebar-drawer--expanded,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer--expanded,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer--expanded{top:var(--eui-app-sidebar-header-user-profile);position:absolute;width:100%}.eui-app.sidebar--close.md .eui-app-sidebar-drawer,.eui-app.sidebar--close.xs .eui-app-sidebar-drawer,.eui-app.sidebar--close.sm .eui-app-sidebar-drawer{position:fixed;top:100vh}@media screen and (max-width: 767px){.eui-app-sidebar-drawer,.eui-app-sidebar-drawer--expanded{width:75%}}@media screen and (min-width: 768px) and (max-width: 995px){.eui-app-sidebar-drawer,.eui-app-sidebar-drawer--expanded{width:50%}}\n"], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
511
|
-
}
|
512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppSidebarComponent, decorators: [{
|
513
|
-
type: Component,
|
514
|
-
args: [{ selector: 'eui-app-sidebar', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, template: "<aside class=\"eui-app-sidebar-content\">\n <ng-content select=\"eui-app-sidebar-header-user-profile\"></ng-content>\n <ng-content select=\"eui-app-sidebar-header\"></ng-content>\n <ng-content select=\"eui-app-sidebar-body\"></ng-content>\n <ng-content select=\"eui-app-sidebar-footer\"></ng-content>\n <ng-content select=\"eui-app-sidebar-drawer\"></ng-content>\n</aside>\n", styles: [".eui-app-sidebar{background-color:var(--eui-c-surface-shell);height:100%;left:0;position:fixed;top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-toolbar-mega-menu-height) + var(--eui-app-top-message-height));transition:top .1s ease,width .1s ease-in,margin-left .1s ease-in;width:var(--eui-app-sidebar-width);box-shadow:var(--eui-sh-10)}.eui-app-sidebar-header{align-items:center;background-color:var(--eui-c-surface-shell);border-bottom:1px solid var(--eui-c-divider-light);display:flex;width:100%}.eui-app-sidebar-body{display:flex;height:100%;max-height:calc(100% - (var(--eui-app-sidebar-header-height) + var(--eui-app-sidebar-footer-height)));overflow-x:hidden;overflow-y:scroll}.eui-app-sidebar-body::-webkit-scrollbar{display:inherit;height:8px;width:8px;background-color:var(--eui-c-secondary-surface-light)}.eui-app-sidebar-body::-webkit-scrollbar-thumb{background-color:var(--_eui-scrollbars-foreground-color);border-radius:5rem}.eui-app-sidebar-body::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-secondary-surface)}.eui-app-sidebar-body::-webkit-scrollbar-track{background-color:var(--eui-c-secondary-surface-light);border-radius:0}@-moz-document url-prefix(){.eui-app-sidebar-body{scrollbar-color:var(--eui-c-secondary-surface) var(--eui-c-secondary-surface-light);scrollbar-width:auto}}.eui-app-sidebar-footer{align-items:center;display:flex;flex:0 0 auto;justify-content:center;padding:var(--eui-s-xs)}.sidebar--close:not(.sidebar--hover) .eui-app-sidebar-body{max-height:100%}.eui-app-sidebar-menu{display:flex;height:100%;width:100%}.eui-app-sidebar-content{border-right:1px solid var(--eui-c-divider-light);background-color:var(--eui-c-surface-shell);box-shadow:var(--eui-sh-2);display:flex;flex-direction:column;height:100%;max-height:calc(100% - (var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height)));overflow:hidden;position:relative}.modal-open .eui-app-sidebar{z-index:auto}@media screen and (max-width: 767px){.eui-app-sidebar{z-index:var(--eui-zi-sidebar)}.eui-app-sidebar-body{max-height:100%}.sidebar--close .eui-app-sidebar{box-shadow:none!important;margin-left:calc(var(--eui-app-sidebar-width-active) * -1)}.sidebar--open .eui-app-sidebar{display:initial;margin-left:0;width:75%}}@media screen and (min-width: 768px) and (max-width: 995px){.eui-app-sidebar{z-index:var(--eui-zi-sidebar)}.eui-app-sidebar-body{max-height:100%}.sidebar--close .eui-app-sidebar{box-shadow:none!important;margin-left:calc(var(--eui-app-sidebar-width-active) * -1)}.sidebar--open .eui-app-sidebar{display:initial;margin-left:0;width:50%}.sidebar--hidden.sidebar--open .eui-app-sidebar{box-shadow:var(--eui-sh-4);width:var(--eui-app-sidebar-width-active)}}@media screen and (min-width: 996px){.sidebar--hover .eui-app-sidebar{z-index:var(--eui-zi-sidebar)}.sidebar--close:not(.sidebar--hover) .eui-app-sidebar{width:var(--eui-app-sidebar-width-close)}.sidebar--close:not(.sidebar--hover) .eui-app-sidebar-header{display:none}.sidebar--close:not(.sidebar--hover) .eui-app-sidebar-footer{text-indent:-9999px}.sidebar--hidden.sidebar--close .eui-app-sidebar{margin-left:calc(var(--eui-app-sidebar-width-active) * -1)}.sidebar--hidden.sidebar--open .eui-app-sidebar{box-shadow:var(--eui-sh-4);display:initial;margin-left:0;width:var(--eui-app-sidebar-width-active);z-index:var(--eui-zi-sidebar)}}.eui-app-sidebar-drawer{display:none}.eui-app.sidebar--open.md .eui-app-sidebar-drawer,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer{display:flex;height:100%;position:fixed;top:100vh;transition:top .25s ease-in-out}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content{background:var(--eui-c-surface-shell);border-top:1px solid var(--eui-c-divider);height:calc(100% - var(--eui-app-sidebar-header-user-profile));overflow-y:auto;padding:var(--eui-s-s);width:100%}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content::-webkit-scrollbar,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content::-webkit-scrollbar,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content::-webkit-scrollbar{display:inherit;height:8px;width:8px;background-color:var(--eui-c-secondary-surface-light)}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb{background-color:var(--_eui-scrollbars-foreground-color);border-radius:5rem}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb:hover,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb:hover,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-secondary-surface)}.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content::-webkit-scrollbar-track,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content::-webkit-scrollbar-track,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content::-webkit-scrollbar-track{background-color:var(--eui-c-secondary-surface-light);border-radius:0}@-moz-document url-prefix(){.eui-app.sidebar--open.md .eui-app-sidebar-drawer-content,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer-content,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer-content{scrollbar-color:var(--eui-c-secondary-surface) var(--eui-c-secondary-surface-light);scrollbar-width:auto}}.eui-app.sidebar--open.md .eui-app-sidebar-drawer--expanded,.eui-app.sidebar--open.xs .eui-app-sidebar-drawer--expanded,.eui-app.sidebar--open.sm .eui-app-sidebar-drawer--expanded{top:var(--eui-app-sidebar-header-user-profile);position:absolute;width:100%}.eui-app.sidebar--close.md .eui-app-sidebar-drawer,.eui-app.sidebar--close.xs .eui-app-sidebar-drawer,.eui-app.sidebar--close.sm .eui-app-sidebar-drawer{position:fixed;top:100vh}@media screen and (max-width: 767px){.eui-app-sidebar-drawer,.eui-app-sidebar-drawer--expanded{width:75%}}@media screen and (min-width: 768px) and (max-width: 995px){.eui-app-sidebar-drawer,.eui-app-sidebar-drawer--expanded{width:50%}}\n"] }]
|
515
|
-
}], propDecorators: { string: [{
|
516
|
-
type: HostBinding,
|
517
|
-
args: ['class']
|
518
|
-
}], close: [{
|
519
|
-
type: HostListener,
|
520
|
-
args: ['body:click']
|
521
|
-
}] } });
|
522
|
-
|
523
|
-
const EUI_APP_SIDEBAR = [
|
524
|
-
EuiAppSidebarComponent,
|
525
|
-
EuiAppSidebarHeaderComponent,
|
526
|
-
EuiAppSidebarBodyComponent,
|
527
|
-
EuiAppSidebarFooterComponent,
|
528
|
-
EuiAppSidebarMenuComponent,
|
529
|
-
EuiAppSidebarHeaderUserProfileComponent,
|
530
|
-
EuiAppSidebarDrawerComponent,
|
531
|
-
];
|
532
|
-
|
533
|
-
class EuiAppToolbarComponent {
|
534
|
-
constructor() {
|
535
|
-
this.role = 'banner';
|
536
|
-
this.euiSecondary = false;
|
537
|
-
this.asService = inject(EuiAppShellService);
|
538
|
-
this.document = inject(DOCUMENT);
|
539
|
-
}
|
540
|
-
get cssClasses() {
|
541
|
-
return [
|
542
|
-
'eui-app-toolbar',
|
543
|
-
this.euiSecondary ? 'eui-app-toolbar--secondary eui--secondary' : 'eui-app-toolbar--primary eui--primary',
|
544
|
-
].join(' ').trim();
|
545
|
-
}
|
546
|
-
ngOnInit() {
|
547
|
-
this.asService.activateToolbar();
|
548
|
-
}
|
549
|
-
ngOnDestroy() {
|
550
|
-
this.asService.setState({
|
551
|
-
...this.asService.state,
|
552
|
-
hasToolbar: false,
|
553
|
-
});
|
554
|
-
this.document.documentElement.style.removeProperty('--eui-app-toolbar-height');
|
555
|
-
}
|
556
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
557
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0-next.3", type: EuiAppToolbarComponent, isStandalone: true, selector: "eui-app-toolbar", inputs: { euiSecondary: ["euiSecondary", "euiSecondary", booleanAttribute] }, host: { properties: { "class": "this.cssClasses", "attr.role": "this.role" } }, ngImport: i0, template: "@if (asService.getState('hasSidebar') | async) {\n <eui-sidebar-toggle class=\"eui-app-toolbar__sidebar-toggle\"/>\n}\n\n<ng-content/>\n\n@if ((asService.getState('hasHeader') | async) && (asService.breakpoints$ | async).isMobile) {\n <eui-language-selector isToolbarSelector/>\n}\n", styles: [".eui-app-toolbar{align-items:center;width:100%;height:var(--eui-app-toolbar-height);display:flex;position:fixed;right:0;left:0;top:calc(var(--eui-app-header-height) + var(--eui-app-top-message-height));z-index:var(--eui-zi-nav);border-bottom:1px solid var(--eui-c-divider)}.eui-app-toolbar__sidebar-toggle{padding-left:var(--eui-s-xs);padding-right:var(--eui-s-xs)}.eui-app-toolbar--primary{background-color:var(--eui-c-branding);color:var(--eui-c-white)}.eui-app-toolbar--primary .eui-icon-svg{--_color: var(--eui-c-white)}.eui-app-toolbar--secondary{background-color:var(--eui-c-surface-shell);color:var(--eui-c-text)}.modal-open .eui-app-toolbar{z-index:auto}.eui-t-ec .eui-app-toolbar__sidebar-toggle{padding-top:calc(var(--eui-s-m) + 2px)}@media screen and (max-width: 767px){.eui-app-toolbar__sidebar-toggle{padding-right:0}}\n"], dependencies: [{ kind: "component", type: i1.EuiSidebarToggleComponent, selector: "eui-sidebar-toggle", inputs: ["e2eAttr", "iconSvgFillColor"] }, { kind: "component", type: i2$1.EuiLanguageSelectorComponent, selector: "eui-language-selector", inputs: ["hasLanguageSelection", "isToolbarSelector", "euiPrimary", "aria-label"], outputs: ["languageSelectorClick"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
558
|
-
}
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppToolbarComponent, decorators: [{
|
560
|
-
type: Component,
|
561
|
-
args: [{ selector: 'eui-app-toolbar', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, imports: [
|
562
|
-
AsyncPipe,
|
563
|
-
...EUI_SIDEBAR_TOGGLE,
|
564
|
-
...EUI_LANGUAGE_SELECTOR,
|
565
|
-
], template: "@if (asService.getState('hasSidebar') | async) {\n <eui-sidebar-toggle class=\"eui-app-toolbar__sidebar-toggle\"/>\n}\n\n<ng-content/>\n\n@if ((asService.getState('hasHeader') | async) && (asService.breakpoints$ | async).isMobile) {\n <eui-language-selector isToolbarSelector/>\n}\n", styles: [".eui-app-toolbar{align-items:center;width:100%;height:var(--eui-app-toolbar-height);display:flex;position:fixed;right:0;left:0;top:calc(var(--eui-app-header-height) + var(--eui-app-top-message-height));z-index:var(--eui-zi-nav);border-bottom:1px solid var(--eui-c-divider)}.eui-app-toolbar__sidebar-toggle{padding-left:var(--eui-s-xs);padding-right:var(--eui-s-xs)}.eui-app-toolbar--primary{background-color:var(--eui-c-branding);color:var(--eui-c-white)}.eui-app-toolbar--primary .eui-icon-svg{--_color: var(--eui-c-white)}.eui-app-toolbar--secondary{background-color:var(--eui-c-surface-shell);color:var(--eui-c-text)}.modal-open .eui-app-toolbar{z-index:auto}.eui-t-ec .eui-app-toolbar__sidebar-toggle{padding-top:calc(var(--eui-s-m) + 2px)}@media screen and (max-width: 767px){.eui-app-toolbar__sidebar-toggle{padding-right:0}}\n"] }]
|
566
|
-
}], propDecorators: { cssClasses: [{
|
567
|
-
type: HostBinding,
|
568
|
-
args: ['class']
|
569
|
-
}], role: [{
|
570
|
-
type: HostBinding,
|
571
|
-
args: ['attr.role']
|
572
|
-
}], euiSecondary: [{
|
573
|
-
type: Input,
|
574
|
-
args: [{ transform: booleanAttribute }]
|
575
|
-
}] } });
|
576
|
-
|
577
|
-
const EUI_APP_TOOLBAR = [
|
578
|
-
EuiAppToolbarComponent,
|
579
|
-
];
|
580
|
-
|
581
|
-
class EuiAppTopMessageComponent {
|
582
|
-
constructor() {
|
583
|
-
this.role = 'banner';
|
584
|
-
this.isCloseable = false;
|
585
|
-
this.hasCustomContent = false;
|
586
|
-
this.topMessageClose = new EventEmitter();
|
587
|
-
this.asService = inject(EuiAppShellService);
|
588
|
-
this._isVisible = true;
|
589
|
-
this.destroy$ = new Subject();
|
590
|
-
this.elRef = inject(ElementRef);
|
591
|
-
this.cd = inject(ChangeDetectorRef);
|
592
|
-
this.obs = inject(ContentObserver);
|
593
|
-
this.baseStatesDirective = inject(BaseStatesDirective);
|
594
|
-
this.document = inject(DOCUMENT);
|
595
|
-
}
|
596
|
-
get cssClasses() {
|
597
|
-
return [
|
598
|
-
this.baseStatesDirective.getCssClasses('eui-app-top-message'),
|
599
|
-
!this.isVisible ? 'eui-app-top-message--hidden' : '',
|
600
|
-
this.hasCustomContent ? 'eui-app-top-message--custom' : '',
|
601
|
-
].join(' ').trim();
|
602
|
-
}
|
603
|
-
set isVisible(value) {
|
604
|
-
this._isVisible = value;
|
605
|
-
this._calculateHeight();
|
606
|
-
}
|
607
|
-
get isVisible() {
|
608
|
-
return this._isVisible;
|
609
|
-
}
|
610
|
-
ngOnInit() {
|
611
|
-
// Trigger for recalculate when resizing viewport (works perfect)
|
612
|
-
this.asService.breakpoint$.pipe(takeUntil$1(this.destroy$)).subscribe(() => {
|
613
|
-
this._calculateHeight();
|
614
|
-
});
|
615
|
-
}
|
616
|
-
ngAfterViewInit() {
|
617
|
-
// TODO: This will not work when there are more than one top-message
|
618
|
-
this.appTopMessageChanges = this.obs
|
619
|
-
.observe(this.appTopMessage.nativeElement)
|
620
|
-
.pipe(startWith(0))
|
621
|
-
.subscribe(() => this._calculateHeight());
|
622
|
-
}
|
623
|
-
ngOnDestroy() {
|
624
|
-
this.asService.setState({
|
625
|
-
...this.asService.state,
|
626
|
-
hasTopMessage: false,
|
627
|
-
});
|
628
|
-
CssUtils.activateTopMessageCssVars(0, this.document);
|
629
|
-
this.appTopMessageChanges.unsubscribe();
|
630
|
-
this.destroy$.next(true);
|
631
|
-
this.destroy$.unsubscribe();
|
632
|
-
}
|
633
|
-
onCloseClick() {
|
634
|
-
this.isVisible = false;
|
635
|
-
CssUtils.activateTopMessageCssVars(0, this.document);
|
636
|
-
this.topMessageClose.emit();
|
637
|
-
}
|
638
|
-
_calculateHeight() {
|
639
|
-
// Differ DC from AfterViewInit due to the styles the are not yet applied when retrieving the CSS var value
|
640
|
-
setTimeout(() => {
|
641
|
-
this.cd.detach();
|
642
|
-
const height = this.elRef.nativeElement.offsetHeight;
|
643
|
-
this.asService.activateTopMessage(height);
|
644
|
-
this.cd.reattach();
|
645
|
-
this.cd.detectChanges();
|
646
|
-
}, 0);
|
647
|
-
}
|
648
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppTopMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
649
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0-next.3", type: EuiAppTopMessageComponent, isStandalone: true, selector: "eui-app-top-message", inputs: { isCloseable: ["isCloseable", "isCloseable", booleanAttribute], hasCustomContent: ["hasCustomContent", "hasCustomContent", booleanAttribute], isVisible: "isVisible" }, outputs: { topMessageClose: "topMessageClose" }, host: { properties: { "class": "this.cssClasses", "attr.role": "this.role" } }, viewQueries: [{ propertyName: "appTopMessage", first: true, predicate: ["appTopMessage"], descendants: true }], hostDirectives: [{ directive: i1$3.BaseStatesDirective, inputs: ["euiPrimary", "euiPrimary", "euiInfo", "euiInfo", "euiWarning", "euiWarning", "euiSuccess", "euiSuccess", "euiDanger", "euiDanger", "euiVariant", "euiVariant"] }], ngImport: i0, template: "<div class=\"eui-app-top-message__wrapper\" #appTopMessage>\n <div class=\"eui-app-top-message__content\">\n <ng-content></ng-content>\n </div>\n @if (isCloseable) {\n <eui-icon-button\n icon=\"eui-close\"\n (buttonClick)=\"onCloseClick()\"\n ariaLabel=\"Close top message\"\n fillColor=\"white\"\n euiRounded\n class=\"eui-app-top-message__close\"/>\n }\n</div>\n", styles: [".eui-app-top-message{padding:var(--eui-s-xs) var(--eui-s-s);position:fixed;width:100%;right:0;top:0;z-index:var(--eui-zi-top-message);background-color:var(--eui-c-danger-surface);color:var(--eui-c-danger-surface-contrast)}.eui-app-top-message__wrapper{display:flex;flex-direction:row;align-items:center;width:100%}.eui-app-top-message__content{display:flex;flex-direction:column;width:100%}.eui-app-top-message__close{margin-left:auto}.eui-app-top-message--primary{background-color:var(--eui-c-primary-surface);color:var(--eui-c-primary-surface-contrast)}.eui-app-top-message--primary .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-primary-surface-hover)!important}.eui-app-top-message--info{background-color:var(--eui-c-info-surface);color:var(--eui-c-info-surface-contrast)}.eui-app-top-message--info .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-info-surface-hover)!important}.eui-app-top-message--success{background-color:var(--eui-c-success-surface);color:var(--eui-c-success-surface-contrast)}.eui-app-top-message--success .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-success-surface-hover)!important}.eui-app-top-message--warning{background-color:var(--eui-c-warning-surface);color:var(--eui-c-warning-surface-contrast)}.eui-app-top-message--warning .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-warning-surface-hover)!important}.eui-app-top-message--danger{background-color:var(--eui-c-danger-surface);color:var(--eui-c-danger-surface-contrast)}.eui-app-top-message--danger .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-danger-surface-hover)!important}.eui-app-top-message--hidden{display:none}.eui-app-top-message--custom{padding:0}\n"], dependencies: [{ kind: "component", type: i2$2.EuiIconButtonComponent, selector: "eui-icon-button", inputs: ["icon", "iconUrl", "fillColor", "size", "ariaLabel", "tabindex", "hasNoPadding", "hasOverflowHover", "hasFocusHoverColor", "hasFocusHoverBg", "euiRounded", "euiDisabled"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
650
|
-
}
|
651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppTopMessageComponent, decorators: [{
|
652
|
-
type: Component,
|
653
|
-
args: [{ selector: 'eui-app-top-message', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, hostDirectives: [
|
654
|
-
{
|
655
|
-
directive: BaseStatesDirective,
|
656
|
-
inputs: [
|
657
|
-
'euiPrimary',
|
658
|
-
'euiInfo',
|
659
|
-
'euiWarning',
|
660
|
-
'euiSuccess',
|
661
|
-
'euiDanger',
|
662
|
-
'euiVariant',
|
663
|
-
],
|
664
|
-
},
|
665
|
-
], imports: [
|
666
|
-
...EUI_ICON_BUTTON,
|
667
|
-
], template: "<div class=\"eui-app-top-message__wrapper\" #appTopMessage>\n <div class=\"eui-app-top-message__content\">\n <ng-content></ng-content>\n </div>\n @if (isCloseable) {\n <eui-icon-button\n icon=\"eui-close\"\n (buttonClick)=\"onCloseClick()\"\n ariaLabel=\"Close top message\"\n fillColor=\"white\"\n euiRounded\n class=\"eui-app-top-message__close\"/>\n }\n</div>\n", styles: [".eui-app-top-message{padding:var(--eui-s-xs) var(--eui-s-s);position:fixed;width:100%;right:0;top:0;z-index:var(--eui-zi-top-message);background-color:var(--eui-c-danger-surface);color:var(--eui-c-danger-surface-contrast)}.eui-app-top-message__wrapper{display:flex;flex-direction:row;align-items:center;width:100%}.eui-app-top-message__content{display:flex;flex-direction:column;width:100%}.eui-app-top-message__close{margin-left:auto}.eui-app-top-message--primary{background-color:var(--eui-c-primary-surface);color:var(--eui-c-primary-surface-contrast)}.eui-app-top-message--primary .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-primary-surface-hover)!important}.eui-app-top-message--info{background-color:var(--eui-c-info-surface);color:var(--eui-c-info-surface-contrast)}.eui-app-top-message--info .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-info-surface-hover)!important}.eui-app-top-message--success{background-color:var(--eui-c-success-surface);color:var(--eui-c-success-surface-contrast)}.eui-app-top-message--success .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-success-surface-hover)!important}.eui-app-top-message--warning{background-color:var(--eui-c-warning-surface);color:var(--eui-c-warning-surface-contrast)}.eui-app-top-message--warning .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-warning-surface-hover)!important}.eui-app-top-message--danger{background-color:var(--eui-c-danger-surface);color:var(--eui-c-danger-surface-contrast)}.eui-app-top-message--danger .eui-app-top-message__close .eui-icon-button__button:hover{background-color:var(--eui-c-danger-surface-hover)!important}.eui-app-top-message--hidden{display:none}.eui-app-top-message--custom{padding:0}\n"] }]
|
668
|
-
}], propDecorators: { cssClasses: [{
|
669
|
-
type: HostBinding,
|
670
|
-
args: ['class']
|
671
|
-
}], role: [{
|
672
|
-
type: HostBinding,
|
673
|
-
args: ['attr.role']
|
674
|
-
}], appTopMessage: [{
|
675
|
-
type: ViewChild,
|
676
|
-
args: ['appTopMessage']
|
677
|
-
}], isCloseable: [{
|
678
|
-
type: Input,
|
679
|
-
args: [{ transform: booleanAttribute }]
|
680
|
-
}], hasCustomContent: [{
|
681
|
-
type: Input,
|
682
|
-
args: [{ transform: booleanAttribute }]
|
683
|
-
}], isVisible: [{
|
684
|
-
type: Input
|
685
|
-
}], topMessageClose: [{
|
686
|
-
type: Output
|
687
|
-
}] } });
|
688
|
-
|
689
|
-
const EUI_APP_TOP_MESSAGE = [
|
690
|
-
EuiAppTopMessageComponent,
|
691
|
-
];
|
692
|
-
|
693
|
-
class EuiAppComponent {
|
694
|
-
constructor() {
|
695
|
-
this.cssClasses = 'eui-app';
|
696
|
-
this.appSubTitle = '';
|
697
|
-
this.themeClass = '';
|
698
|
-
this.hasNoPageWrapper = false;
|
699
|
-
this.isSidebarOpen = true;
|
700
|
-
this.isShrinkHeaderActive = true;
|
701
|
-
this.isSidebarHidden = false;
|
702
|
-
this.asService = inject(EuiAppShellService);
|
703
|
-
this.euiGrowlService = inject(EuiGrowlService);
|
704
|
-
this.destroy$ = new Subject();
|
705
|
-
this.cdRef = inject(ChangeDetectorRef);
|
706
|
-
this.platformId = inject(PLATFORM_ID);
|
707
|
-
this.document = inject(DOCUMENT);
|
708
|
-
}
|
709
|
-
ngAfterContentInit() {
|
710
|
-
this.hasNoPageWrapper = !this.customPageWrapper;
|
711
|
-
this.isViewLoaded = true;
|
712
|
-
}
|
713
|
-
ngOnInit() {
|
714
|
-
this.isViewLoaded = false;
|
715
|
-
CssUtils.initCssVars(this.document, this.platformId);
|
716
|
-
CssUtils.setHtmlClass('eui-19', this.document);
|
717
|
-
if (isPlatformBrowser(this.platformId)) {
|
718
|
-
const browserAgent = window.navigator.userAgent.toLowerCase();
|
719
|
-
this.asService.setState({
|
720
|
-
...this.asService.state,
|
721
|
-
windowHeight: window.innerHeight,
|
722
|
-
windowWidth: window.innerWidth,
|
723
|
-
hasHeader: false,
|
724
|
-
hasSidebar: false,
|
725
|
-
deviceInfo: {
|
726
|
-
isChrome: browserAgent.indexOf('chrome') > -1,
|
727
|
-
isIE: browserAgent.indexOf('trident') > -1,
|
728
|
-
isFF: browserAgent.indexOf('firefox') > -1,
|
729
|
-
},
|
730
|
-
appBaseFontSize: this.asService.getBaseFontSize(),
|
731
|
-
});
|
732
|
-
}
|
733
|
-
this.asService
|
734
|
-
.getState('wrapperClasses')
|
735
|
-
.pipe(takeUntil(this.destroy$))
|
736
|
-
.subscribe((state) => {
|
737
|
-
this.cdRef.detach();
|
738
|
-
this.cssClasses = ['eui-app', state].join(' ');
|
739
|
-
this.cdRef.reattach();
|
740
|
-
this.cdRef.detectChanges();
|
741
|
-
});
|
742
|
-
if (isPlatformBrowser(this.platformId)) {
|
743
|
-
fromEvent(window, 'resize')
|
744
|
-
.pipe(debounceTime(50), takeUntil(this.destroy$))
|
745
|
-
.subscribe(() => {
|
746
|
-
this.asService?.setState({
|
747
|
-
...this.asService.state,
|
748
|
-
windowHeight: window.innerHeight,
|
749
|
-
windowWidth: window.innerWidth,
|
750
|
-
});
|
751
|
-
CssUtils.setAppViewportCssVars(this.platformId);
|
752
|
-
});
|
753
|
-
}
|
754
|
-
}
|
755
|
-
ngOnChanges(changes) {
|
756
|
-
if (changes.isSidebarHidden) {
|
757
|
-
this.asService.setState({
|
758
|
-
...this.asService.state,
|
759
|
-
isSidebarHidden: changes.isSidebarHidden.currentValue,
|
760
|
-
});
|
761
|
-
}
|
762
|
-
if (changes.isSidebarOpen) {
|
763
|
-
this.asService.setState({
|
764
|
-
...this.asService.state,
|
765
|
-
isSidebarOpen: changes.isSidebarOpen.currentValue,
|
766
|
-
});
|
767
|
-
}
|
768
|
-
}
|
769
|
-
ngOnDestroy() {
|
770
|
-
this.destroy$.next(true);
|
771
|
-
this.destroy$.unsubscribe();
|
772
|
-
}
|
773
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
774
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0-next.3", type: EuiAppComponent, isStandalone: true, selector: "eui-app", inputs: { appSubTitle: "appSubTitle", themeClass: "themeClass", isSidebarOpen: ["isSidebarOpen", "isSidebarOpen", booleanAttribute], isShrinkHeaderActive: ["isShrinkHeaderActive", "isShrinkHeaderActive", booleanAttribute], isSidebarHidden: ["isSidebarHidden", "isSidebarHidden", booleanAttribute] }, host: { properties: { "class": "this.cssClasses" } }, queries: [{ propertyName: "appSidebar", first: true, predicate: i0.forwardRef(() => EuiAppSidebarComponent), descendants: true }, { propertyName: "customPageWrapper", first: true, predicate: i0.forwardRef(() => EuiAppPageWrapperDirective), descendants: true }, { propertyName: "appToolbar", first: true, predicate: i0.forwardRef(() => EuiAppToolbarComponent), descendants: true }], usesOnChanges: true, ngImport: i0, template: "<eui-dimmer [isDimmerActive]=\"(asService.state$ | async).isDimmerActive\" />\n\n<ng-content select=\"eui-app-sidebar\" />\n@if (!appSidebar && (asService.state$ | async).menuLinks.length !== 0 && (asService.state$ | async).hasHeader && (asService.breakpoints$ | async).isMobile) {\n <eui-app-sidebar>\n <eui-app-sidebar-body>\n <eui-app-sidebar-menu [hasIcons]=\"true\" />\n </eui-app-sidebar-body>\n </eui-app-sidebar>\n}\n\n@if (isViewLoaded) {\n<div class=\"eui-app-main\">\n <ng-content select=\"eui-app-top-message\"></ng-content>\n\n <ng-content select=\"eui-app-header\"></ng-content>\n\n @if (\n (!appToolbar && (asService.state$ | async).hasHeader && (asService.breakpoints$ | async).isMobile) || \n (appToolbar && (asService.state$ | async).hasHeader && (asService.breakpoints$ | async).isMobile ) && (asService.state$ | async).menuLinks.length !== 0\n ) {\n <eui-app-toolbar>\n <eui-toolbar>\n <eui-toolbar-items>\n <eui-toolbar-item>\n <ng-content select=\"eui-user-profile\"/>\n </eui-toolbar-item>\n </eui-toolbar-items> \n </eui-toolbar>\n </eui-app-toolbar>\n } @else {\n <ng-content select=\"eui-app-toolbar\"></ng-content>\n }\n\n <ng-content select=\"eui-app-breadcrumb\"></ng-content>\n\n <div class=\"eui-app-main-content\" role=\"main\">\n <ng-content select=\"eui-app-page-wrapper\"></ng-content>\n @if (hasNoPageWrapper) {\n <router-outlet></router-outlet>\n }\n </div>\n\n <ng-content select=\"eui-app-footer\"></ng-content>\n</div>\n}\n\n<eui-growl\n [value]=\"euiGrowlService.growlMessages\"\n [sticky]=\"euiGrowlService.isGrowlSticky\"\n [closeAllSticky]=\"euiGrowlService.isCloseAllSticky\"\n [life]=\"euiGrowlService.growlLife\"\n [ariaLive]=\"euiGrowlService.ariaGrowlLive\"\n [position]=\"euiGrowlService.growlPosition\"\n (growlClick)=\"euiGrowlService.growlCallback ? euiGrowlService.growlCallback(): null\" />\n\n<eui-block-document [isBlocked]=\"(asService.state$ | async).isBlockDocumentActive\" />\n", styles: [".eui-app{display:flex;overflow:hidden}.eui-app-main-content{flex-grow:1;margin-top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-toolbar-mega-menu-height) + var(--eui-app-top-message-height) - var(--eui-app-breadcrumb-height));position:relative}.eui-app-main{min-height:100vh;background:var(--eui-c-surface-page);width:calc(100% - var(--eui-app-sidebar-width));margin-left:var(--eui-app-sidebar-width);transition:top .1s ease,width .1s ease-in,margin-left .1s ease-in-out;display:flex;flex-direction:column}eui-app-page-wrapper{display:flex;width:100%}@media screen and (max-width: 767px){.eui-app.sidebar--open:before{background:#0000004d;bottom:0;content:\"\";position:fixed;right:0;top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height));transition:all .1s ease;width:100vw;z-index:980}}@media screen and (min-width: 768px) and (max-width: 995px){.eui-app.sidebar--open:before{background:#0000004d;bottom:0;content:\"\";position:fixed;right:0;top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height));transition:all .1s ease;width:100vw;z-index:980}}@media screen and (min-width: 996px){.sidebar--hidden.eui-app.sidebar--open:before{background:#0000004d;bottom:0;content:\"\";position:fixed;right:0;top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height));transition:all .1s ease;width:100vw;z-index:980}}@media screen and (max-width: 767px){.eui-app-main{margin-left:0;width:100%}}@media screen and (min-width: 768px) and (max-width: 995px){.eui-app-main{margin-left:0;width:100%}}@media screen and (min-width: 996px){.sidebar--close .eui-app-main{margin-left:var(--eui-app-sidebar-width-close);width:calc(100% - var(--eui-app-sidebar-width-close))}.sidebar--hidden.sidebar--close .eui-app-main,.sidebar--hidden.sidebar--open .eui-app-main{margin-left:0;width:100%}}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: EuiAppSidebarComponent, selector: "eui-app-sidebar" }, { kind: "component", type: EuiAppSidebarBodyComponent, selector: "eui-app-sidebar-body" }, { kind: "component", type: EuiAppSidebarMenuComponent, selector: "eui-app-sidebar-menu", inputs: ["hasFilter", "hasIcons", "hasIconsLabels", "hasTooltip", "hasTooltipOnExpanded", "expandAllItems", "isCollapsed", "hasCollapsedInitials", "isFlat", "hasScrollToItem", "hasBoldRootLevel", "items"], outputs: ["sidebarItemClick", "sidebarItemToggle"] }, { kind: "component", type: EuiAppToolbarComponent, selector: "eui-app-toolbar", inputs: ["euiSecondary"] }, { kind: "component", type: i5.EuiToolbarComponent, selector: "eui-toolbar", inputs: ["euiSecondary", "euiPrimary"] }, { kind: "component", type: i5.EuiToolbarItemsComponent, selector: "eui-toolbar-items", inputs: ["euiEnd", "euiPositionRight"] }, { kind: "component", type: i5.EuiToolbarItemComponent, selector: "eui-toolbar-item" }, { kind: "component", type: i6.EuiGrowlComponent, selector: "eui-growl", inputs: ["e2eAttr", "ariaLive", "sticky", "life", "value", "closeAllSticky", "position"], outputs: ["growlClick"] }, { kind: "component", type: i7.EuiDimmerComponent, selector: "eui-dimmer", inputs: ["isDimmerActive", "e2eAttr"] }, { kind: "component", type: i8.EuiBlockDocumentComponent, selector: "eui-block-document", inputs: ["isBlocked", "ariaLabel"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
775
|
-
}
|
776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppComponent, decorators: [{
|
777
|
-
type: Component,
|
778
|
-
args: [{ selector: 'eui-app', encapsulation: ViewEncapsulation.None, imports: [
|
779
|
-
RouterOutlet,
|
780
|
-
AsyncPipe,
|
781
|
-
...EUI_APP_SIDEBAR,
|
782
|
-
...EUI_APP_TOOLBAR,
|
783
|
-
...EUI_TOOLBAR,
|
784
|
-
...EUI_USER_PROFILE,
|
785
|
-
...EUI_GROWL,
|
786
|
-
...EUI_DIMMER,
|
787
|
-
...EUI_BLOCK_DOCUMENT,
|
788
|
-
], template: "<eui-dimmer [isDimmerActive]=\"(asService.state$ | async).isDimmerActive\" />\n\n<ng-content select=\"eui-app-sidebar\" />\n@if (!appSidebar && (asService.state$ | async).menuLinks.length !== 0 && (asService.state$ | async).hasHeader && (asService.breakpoints$ | async).isMobile) {\n <eui-app-sidebar>\n <eui-app-sidebar-body>\n <eui-app-sidebar-menu [hasIcons]=\"true\" />\n </eui-app-sidebar-body>\n </eui-app-sidebar>\n}\n\n@if (isViewLoaded) {\n<div class=\"eui-app-main\">\n <ng-content select=\"eui-app-top-message\"></ng-content>\n\n <ng-content select=\"eui-app-header\"></ng-content>\n\n @if (\n (!appToolbar && (asService.state$ | async).hasHeader && (asService.breakpoints$ | async).isMobile) || \n (appToolbar && (asService.state$ | async).hasHeader && (asService.breakpoints$ | async).isMobile ) && (asService.state$ | async).menuLinks.length !== 0\n ) {\n <eui-app-toolbar>\n <eui-toolbar>\n <eui-toolbar-items>\n <eui-toolbar-item>\n <ng-content select=\"eui-user-profile\"/>\n </eui-toolbar-item>\n </eui-toolbar-items> \n </eui-toolbar>\n </eui-app-toolbar>\n } @else {\n <ng-content select=\"eui-app-toolbar\"></ng-content>\n }\n\n <ng-content select=\"eui-app-breadcrumb\"></ng-content>\n\n <div class=\"eui-app-main-content\" role=\"main\">\n <ng-content select=\"eui-app-page-wrapper\"></ng-content>\n @if (hasNoPageWrapper) {\n <router-outlet></router-outlet>\n }\n </div>\n\n <ng-content select=\"eui-app-footer\"></ng-content>\n</div>\n}\n\n<eui-growl\n [value]=\"euiGrowlService.growlMessages\"\n [sticky]=\"euiGrowlService.isGrowlSticky\"\n [closeAllSticky]=\"euiGrowlService.isCloseAllSticky\"\n [life]=\"euiGrowlService.growlLife\"\n [ariaLive]=\"euiGrowlService.ariaGrowlLive\"\n [position]=\"euiGrowlService.growlPosition\"\n (growlClick)=\"euiGrowlService.growlCallback ? euiGrowlService.growlCallback(): null\" />\n\n<eui-block-document [isBlocked]=\"(asService.state$ | async).isBlockDocumentActive\" />\n", styles: [".eui-app{display:flex;overflow:hidden}.eui-app-main-content{flex-grow:1;margin-top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-toolbar-mega-menu-height) + var(--eui-app-top-message-height) - var(--eui-app-breadcrumb-height));position:relative}.eui-app-main{min-height:100vh;background:var(--eui-c-surface-page);width:calc(100% - var(--eui-app-sidebar-width));margin-left:var(--eui-app-sidebar-width);transition:top .1s ease,width .1s ease-in,margin-left .1s ease-in-out;display:flex;flex-direction:column}eui-app-page-wrapper{display:flex;width:100%}@media screen and (max-width: 767px){.eui-app.sidebar--open:before{background:#0000004d;bottom:0;content:\"\";position:fixed;right:0;top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height));transition:all .1s ease;width:100vw;z-index:980}}@media screen and (min-width: 768px) and (max-width: 995px){.eui-app.sidebar--open:before{background:#0000004d;bottom:0;content:\"\";position:fixed;right:0;top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height));transition:all .1s ease;width:100vw;z-index:980}}@media screen and (min-width: 996px){.sidebar--hidden.eui-app.sidebar--open:before{background:#0000004d;bottom:0;content:\"\";position:fixed;right:0;top:calc(var(--eui-app-header-height) + var(--eui-app-toolbar-height) + var(--eui-app-top-message-height));transition:all .1s ease;width:100vw;z-index:980}}@media screen and (max-width: 767px){.eui-app-main{margin-left:0;width:100%}}@media screen and (min-width: 768px) and (max-width: 995px){.eui-app-main{margin-left:0;width:100%}}@media screen and (min-width: 996px){.sidebar--close .eui-app-main{margin-left:var(--eui-app-sidebar-width-close);width:calc(100% - var(--eui-app-sidebar-width-close))}.sidebar--hidden.sidebar--close .eui-app-main,.sidebar--hidden.sidebar--open .eui-app-main{margin-left:0;width:100%}}\n"] }]
|
789
|
-
}], propDecorators: { cssClasses: [{
|
790
|
-
type: HostBinding,
|
791
|
-
args: ['class']
|
792
|
-
}], appSubTitle: [{
|
793
|
-
type: Input
|
794
|
-
}], themeClass: [{
|
795
|
-
type: Input
|
796
|
-
}], isSidebarOpen: [{
|
797
|
-
type: Input,
|
798
|
-
args: [{ transform: booleanAttribute }]
|
799
|
-
}], isShrinkHeaderActive: [{
|
800
|
-
type: Input,
|
801
|
-
args: [{ transform: booleanAttribute }]
|
802
|
-
}], isSidebarHidden: [{
|
803
|
-
type: Input,
|
804
|
-
args: [{ transform: booleanAttribute }]
|
805
|
-
}], appSidebar: [{
|
806
|
-
type: ContentChild,
|
807
|
-
args: [forwardRef(() => EuiAppSidebarComponent)]
|
808
|
-
}], customPageWrapper: [{
|
809
|
-
type: ContentChild,
|
810
|
-
args: [forwardRef(() => EuiAppPageWrapperDirective)]
|
811
|
-
}], appToolbar: [{
|
812
|
-
type: ContentChild,
|
813
|
-
args: [forwardRef(() => EuiAppToolbarComponent)]
|
814
|
-
}] } });
|
815
|
-
/* eslint-disable */
|
816
|
-
class EuiAppPageWrapperDirective {
|
817
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppPageWrapperDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
818
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0-next.3", type: EuiAppPageWrapperDirective, isStandalone: true, selector: "eui-app-page-wrapper", ngImport: i0 }); }
|
819
|
-
}
|
820
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiAppPageWrapperDirective, decorators: [{
|
821
|
-
type: Directive,
|
822
|
-
args: [{ selector: 'eui-app-page-wrapper' }]
|
823
|
-
}] });
|
824
|
-
|
825
|
-
const EUI_APP = [
|
826
|
-
EuiAppComponent,
|
827
|
-
EuiAppPageWrapperDirective,
|
828
|
-
...EUI_APP_BREADCRUMB,
|
829
|
-
...EUI_APP_FOOTER,
|
830
|
-
...EUI_APP_HEADER,
|
831
|
-
...EUI_APP_SIDEBAR,
|
832
|
-
...EUI_APP_TOOLBAR,
|
833
|
-
...EUI_APP_TOP_MESSAGE,
|
834
|
-
];
|
835
|
-
|
836
|
-
/**
|
837
|
-
* Generated bundle index. Do not edit.
|
838
|
-
*/
|
839
|
-
|
840
|
-
export { EUI_APP, EUI_APP_BREADCRUMB, EUI_APP_FOOTER, EUI_APP_HEADER, EUI_APP_SIDEBAR, EUI_APP_TOOLBAR, EUI_APP_TOP_MESSAGE, EuiAppBreadcrumbComponent, EuiAppComponent, EuiAppFooterComponent, EuiAppHeaderComponent, EuiAppPageWrapperDirective, EuiAppSidebarBodyComponent, EuiAppSidebarComponent, EuiAppSidebarDrawerComponent, EuiAppSidebarFooterComponent, EuiAppSidebarHeaderComponent, EuiAppSidebarHeaderUserProfileComponent, EuiAppSidebarMenuComponent, EuiAppToolbarComponent, EuiAppTopMessageComponent };
|
841
|
-
//# sourceMappingURL=eui-components-layout-eui-app.mjs.map
|