@eui/core 15.0.0-rc.6 → 15.0.0-rc.7
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/dependencies.html +2 -2
- package/docs/injectables/UxAppShellService.html +10 -10
- package/docs/interfaces/UIState.html +6 -6
- package/docs/js/search/search_index.js +2 -2
- package/docs/miscellaneous/variables.html +1 -1
- package/esm2020/lib/services/locale/locale.service.mock.mjs +14 -3
- package/esm2020/lib/services/ux-app-shell.service.mjs +10 -10
- package/fesm2015/eui-core.mjs +21 -11
- package/fesm2015/eui-core.mjs.map +1 -1
- package/fesm2020/eui-core.mjs +21 -11
- package/fesm2020/eui-core.mjs.map +1 -1
- package/lib/services/locale/locale.service.mock.d.ts +1 -0
- package/lib/services/locale/locale.service.mock.d.ts.map +1 -1
- package/lib/services/ux-app-shell.service.d.ts +3 -3
- package/lib/services/ux-app-shell.service.d.ts.map +1 -1
- package/package.json +1 -1
package/fesm2020/eui-core.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { InjectionToken, Injectable, Inject, Injector, NgModule, Optional, APP_I
|
|
|
6
6
|
import * as extendProxy from 'extend';
|
|
7
7
|
import { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core';
|
|
8
8
|
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
9
|
-
import { LOCATION_INITIALIZED, DOCUMENT, isPlatformBrowser, getLocaleId } from '@angular/common';
|
|
9
|
+
import { LOCATION_INITIALIZED, DOCUMENT, isPlatformBrowser, getLocaleId, registerLocaleData } from '@angular/common';
|
|
10
10
|
import { throwError, forkJoin, of, BehaviorSubject, defer, merge, fromEvent, Observable, Subject, from } from 'rxjs';
|
|
11
11
|
import { debounceTime, distinctUntilChanged, map, catchError, switchMap, tap, filter, take, mapTo, mergeMap, concatMap, takeUntil } from 'rxjs/operators';
|
|
12
12
|
import * as i1$1 from '@ngrx/store';
|
|
@@ -25,6 +25,8 @@ import { By } from '@angular/platform-browser';
|
|
|
25
25
|
import { FormGroup, FormArray } from '@angular/forms';
|
|
26
26
|
import { DomPortalOutlet, ComponentPortal, PortalInjector } from '@angular/cdk/portal';
|
|
27
27
|
import * as lf from 'localforage';
|
|
28
|
+
import localeFr from '@angular/common/locales/fr';
|
|
29
|
+
import localeEl from '@angular/common/locales/el';
|
|
28
30
|
|
|
29
31
|
/** default log configuration */
|
|
30
32
|
const DEFAULT_LOG_CONFIG = {
|
|
@@ -1101,7 +1103,7 @@ const initialState = {
|
|
|
1101
1103
|
isSidebarExpandOnHover: true,
|
|
1102
1104
|
hasSidebar: false,
|
|
1103
1105
|
hasHeader: false,
|
|
1104
|
-
|
|
1106
|
+
hasBreadcrumb: false,
|
|
1105
1107
|
hasHeaderLogo: false,
|
|
1106
1108
|
hasHeaderEnvironment: false,
|
|
1107
1109
|
hasToolbar: false,
|
|
@@ -1374,12 +1376,12 @@ class UxAppShellService {
|
|
|
1374
1376
|
});
|
|
1375
1377
|
this.activateHeaderCssVars();
|
|
1376
1378
|
}
|
|
1377
|
-
|
|
1379
|
+
activateBreadcrumb() {
|
|
1378
1380
|
this.setState({
|
|
1379
1381
|
...this.state,
|
|
1380
|
-
|
|
1382
|
+
hasBreadcrumb: true,
|
|
1381
1383
|
});
|
|
1382
|
-
this.
|
|
1384
|
+
this.activateBreadcrumbCssVars();
|
|
1383
1385
|
}
|
|
1384
1386
|
activateTopMessage(height) {
|
|
1385
1387
|
this.setState({
|
|
@@ -1406,8 +1408,8 @@ class UxAppShellService {
|
|
|
1406
1408
|
'--eui-app-header-height-default',
|
|
1407
1409
|
'--eui-app-header-height-active',
|
|
1408
1410
|
'--eui-app-header-height-shrink',
|
|
1409
|
-
'--eui-app-
|
|
1410
|
-
'--eui-app-
|
|
1411
|
+
'--eui-app-breadcrumb-height-default',
|
|
1412
|
+
'--eui-app-breadcrumb-height-active',
|
|
1411
1413
|
'--eui-app-top-message-height-default',
|
|
1412
1414
|
'--eui-app-top-message-height-active',
|
|
1413
1415
|
'--eui-app-top-message-height-shrink',
|
|
@@ -1428,7 +1430,7 @@ class UxAppShellService {
|
|
|
1428
1430
|
}
|
|
1429
1431
|
initCssVars() {
|
|
1430
1432
|
this.setCssVar('--eui-app-header-height-default', '--eui-app-header-height');
|
|
1431
|
-
this.setCssVar('--eui-app-
|
|
1433
|
+
this.setCssVar('--eui-app-breadcrumb-height-default', '--eui-app-breadcrumb-height');
|
|
1432
1434
|
this.setCssVar('--eui-app-top-message-height-default', '--eui-app-top-message-height');
|
|
1433
1435
|
this.setCssVar('--eui-app-toolbar-height-default', '--eui-app-toolbar-height');
|
|
1434
1436
|
this.setCssVar('--eui-app-sidebar-width-default', '--eui-app-sidebar-width');
|
|
@@ -1439,8 +1441,8 @@ class UxAppShellService {
|
|
|
1439
1441
|
activateHeaderCssVars() {
|
|
1440
1442
|
this.setCssVar('--eui-app-header-height-active', '--eui-app-header-height');
|
|
1441
1443
|
}
|
|
1442
|
-
|
|
1443
|
-
this.setCssVar('--eui-app-
|
|
1444
|
+
activateBreadcrumbCssVars() {
|
|
1445
|
+
this.setCssVar('--eui-app-breadcrumb-height-active', '--eui-app-breadcrumb-height');
|
|
1444
1446
|
}
|
|
1445
1447
|
activateTopMessageCssVars(height) {
|
|
1446
1448
|
this._setCssVarValue('--eui-app-top-message-height', `${height}px`);
|
|
@@ -4249,12 +4251,20 @@ class LocaleServiceMock extends LocaleService {
|
|
|
4249
4251
|
super(null, { locale: { id: 'en', available: [] } }, locale_id, null, null, null);
|
|
4250
4252
|
this.locale_id = locale_id;
|
|
4251
4253
|
this.DEFAULT_LOCALE = 'en';
|
|
4254
|
+
this.stateSubject = new BehaviorSubject({ id: this.DEFAULT_LOCALE });
|
|
4252
4255
|
}
|
|
4253
4256
|
getState() {
|
|
4254
|
-
return
|
|
4257
|
+
return this.stateSubject.asObservable();
|
|
4255
4258
|
}
|
|
4256
4259
|
updateState(state) {
|
|
4257
4260
|
this.DEFAULT_LOCALE = state.id || 'en';
|
|
4261
|
+
if (state.id === 'fr') {
|
|
4262
|
+
registerLocaleData(localeFr, 'fr');
|
|
4263
|
+
}
|
|
4264
|
+
else if (state.id === 'el') {
|
|
4265
|
+
registerLocaleData(localeEl, 'fr');
|
|
4266
|
+
}
|
|
4267
|
+
this.stateSubject.next(state);
|
|
4258
4268
|
}
|
|
4259
4269
|
init(state) {
|
|
4260
4270
|
this.DEFAULT_LOCALE = state.id || 'en';
|