@eui/core 14.0.3 → 14.0.4-snapshot-1661163930913
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 +40 -10
- package/docs/injectables/I18nService.html +2 -2
- package/docs/injectables/I18nServiceMock.html +2 -2
- package/docs/injectables/UxAppShellService.html +37 -37
- package/docs/js/menu-wc.js +6 -6
- package/docs/js/menu-wc_es5.js +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/miscellaneous/variables.html +1 -4
- package/esm2020/lib/helpers/dom-helpers.mjs +1 -3
- package/esm2020/lib/helpers/form-helpers.mjs +2 -3
- package/esm2020/lib/helpers/format-helpers.mjs +1 -3
- package/esm2020/lib/helpers/utils.mjs +2 -1
- package/esm2020/lib/interceptors/eu-login-session-timeout-handling.interceptor.mjs +2 -2
- package/esm2020/lib/interceptors/openid/openid-connect.interceptor.mjs +5 -2
- package/esm2020/lib/services/app/eui-init-app.mjs +25 -27
- package/esm2020/lib/services/app/eui-pre-init-app.mjs +4 -5
- package/esm2020/lib/services/app/factories/log.mjs +4 -4
- package/esm2020/lib/services/errors/eui.error.mjs +1 -1
- package/esm2020/lib/services/errors/http-error-handler.interceptor.mjs +2 -1
- package/esm2020/lib/services/i18n/i18n.loader.mjs +6 -1
- package/esm2020/lib/services/i18n/i18n.resource.mjs +5 -1
- package/esm2020/lib/services/i18n/i18n.service.mjs +11 -11
- package/esm2020/lib/services/locale/locale.service.mjs +7 -1
- package/esm2020/lib/services/log/log.service.mjs +2 -1
- package/esm2020/lib/services/storage/async-storage.service.mjs +1 -1
- package/esm2020/lib/services/storage/local-forage.service.mjs +1 -3
- package/esm2020/lib/services/storage/storage.service.mjs +1 -1
- package/esm2020/lib/services/store/reducers/meta.reducers.mjs +1 -9
- package/esm2020/lib/services/ux-app-shell.service.mjs +8 -8
- package/fesm2015/eui-core.mjs +71 -68
- package/fesm2015/eui-core.mjs.map +1 -1
- package/fesm2020/eui-core.mjs +71 -68
- package/fesm2020/eui-core.mjs.map +1 -1
- package/lib/helpers/dom-helpers.d.ts.map +1 -1
- package/lib/helpers/form-helpers.d.ts.map +1 -1
- package/lib/helpers/format-helpers.d.ts.map +1 -1
- package/lib/helpers/utils.d.ts +1 -0
- package/lib/helpers/utils.d.ts.map +1 -1
- package/lib/interceptors/openid/openid-connect.interceptor.d.ts.map +1 -1
- package/lib/services/app/eui-init-app.d.ts.map +1 -1
- package/lib/services/app/eui-pre-init-app.d.ts +1 -0
- package/lib/services/app/eui-pre-init-app.d.ts.map +1 -1
- package/lib/services/app/factories/log.d.ts +2 -0
- package/lib/services/app/factories/log.d.ts.map +1 -1
- package/lib/services/errors/http-error-handler.interceptor.d.ts +1 -0
- package/lib/services/errors/http-error-handler.interceptor.d.ts.map +1 -1
- package/lib/services/i18n/i18n.loader.d.ts +5 -0
- package/lib/services/i18n/i18n.loader.d.ts.map +1 -1
- package/lib/services/i18n/i18n.resource.d.ts +4 -0
- package/lib/services/i18n/i18n.resource.d.ts.map +1 -1
- package/lib/services/i18n/i18n.service.d.ts +4 -0
- package/lib/services/i18n/i18n.service.d.ts.map +1 -1
- package/lib/services/locale/locale.service.d.ts +6 -0
- package/lib/services/locale/locale.service.d.ts.map +1 -1
- package/lib/services/log/log.service.d.ts +1 -0
- package/lib/services/log/log.service.d.ts.map +1 -1
- package/lib/services/storage/async-storage.service.d.ts.map +1 -1
- package/lib/services/storage/local-forage.service.d.ts.map +1 -1
- package/lib/services/storage/storage.service.d.ts.map +1 -1
- package/lib/services/store/reducers/meta.reducers.d.ts.map +1 -1
- package/lib/services/ux-app-shell.service.d.ts +3 -2
- package/lib/services/ux-app-shell.service.d.ts.map +1 -1
- package/package.json +2 -2
package/fesm2015/eui-core.mjs
CHANGED
|
@@ -163,6 +163,7 @@ class LogService extends Logger {
|
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
165
165
|
* Gets a logger by name. If the logger does not exist, it is created
|
|
166
|
+
*
|
|
166
167
|
* @param loggerName logger name
|
|
167
168
|
* @param persist optional parameter. Set it to true if you want to reuse the logger. By default, it is set to false
|
|
168
169
|
* @returns the logger
|
|
@@ -195,19 +196,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImpor
|
|
|
195
196
|
} });
|
|
196
197
|
|
|
197
198
|
const LOG_INSTANCES = {};
|
|
198
|
-
/* tslint:disable */
|
|
199
199
|
/**
|
|
200
200
|
* Helper function to check if the log config is defined.
|
|
201
201
|
* Does not check only for empty object, because the config can have other (non-log) parameters
|
|
202
202
|
* @params config log configuration
|
|
203
203
|
* @returns true/false
|
|
204
204
|
*/
|
|
205
|
-
/* tslint:enable */
|
|
206
205
|
function isLogConfigDefined(config) {
|
|
207
206
|
return config && ('baseLoggerName' in config || 'logLevel' in config || 'logAppenders' in config);
|
|
208
207
|
}
|
|
209
208
|
/**
|
|
210
209
|
* Helper function to provide a list of log appenders from a log configuration
|
|
210
|
+
*
|
|
211
211
|
* @params config log configuration
|
|
212
212
|
* @returns an array of log appenders
|
|
213
213
|
*/
|
|
@@ -223,6 +223,7 @@ function getLogAppendersConfig(config = DEFAULT_LOG_CONFIG, injector = null) {
|
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
225
|
* Helper function to provide an instance of LogService from a configuration
|
|
226
|
+
*
|
|
226
227
|
* @params config log configuration
|
|
227
228
|
* @returns an instance of log service
|
|
228
229
|
*/
|
|
@@ -240,7 +241,7 @@ function euiLogServiceFactory(injector, rootBaseLoggerName, rootConfig, childBas
|
|
|
240
241
|
const forChild = isLogConfigDefined(childConfig);
|
|
241
242
|
const baseLoggerName = forChild ? childBaseLoggerName : rootBaseLoggerName;
|
|
242
243
|
// create the proper configuration
|
|
243
|
-
const config = Object.assign({ baseLoggerName
|
|
244
|
+
const config = Object.assign({ baseLoggerName }, forChild ? Object.assign({}, rootConfig, childConfig) : rootConfig);
|
|
244
245
|
// re-use the log service or create a new instance
|
|
245
246
|
const logService = LOG_INSTANCES[baseLoggerName] || logServiceFactory(config, injector);
|
|
246
247
|
LOG_INSTANCES[baseLoggerName] = logService;
|
|
@@ -464,33 +465,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImpor
|
|
|
464
465
|
} });
|
|
465
466
|
|
|
466
467
|
function euiInitApp(injector) {
|
|
467
|
-
return () => {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
resolve(null);
|
|
491
|
-
});
|
|
468
|
+
return () => new Promise((resolve) => {
|
|
469
|
+
const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve(null));
|
|
470
|
+
locationInitialized.then(() => {
|
|
471
|
+
const appConfig = injector.get(CONFIG_TOKEN);
|
|
472
|
+
// necessary config parameters
|
|
473
|
+
let appVersion;
|
|
474
|
+
if (appConfig && appConfig.versions && appConfig.versions.app) {
|
|
475
|
+
appVersion = appConfig.versions.app;
|
|
476
|
+
}
|
|
477
|
+
else {
|
|
478
|
+
appVersion = '0.0.0';
|
|
479
|
+
}
|
|
480
|
+
let storageType;
|
|
481
|
+
if (appConfig && appConfig.saveStateStorage) {
|
|
482
|
+
storageType = appConfig.saveStateStorage;
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
485
|
+
storageType = BrowserStorageType.local;
|
|
486
|
+
}
|
|
487
|
+
const storeService = injector.get(StoreService);
|
|
488
|
+
storeService.init(appVersion, storageType);
|
|
489
|
+
storeService.handleAutoSave();
|
|
490
|
+
resolve(null);
|
|
492
491
|
});
|
|
493
|
-
};
|
|
492
|
+
});
|
|
494
493
|
}
|
|
495
494
|
|
|
496
495
|
function getCoreProviders() {
|
|
@@ -603,6 +602,7 @@ class UpdateLocaleStateAction {
|
|
|
603
602
|
class I18nResourceImpl {
|
|
604
603
|
/**
|
|
605
604
|
* Resource constructor
|
|
605
|
+
*
|
|
606
606
|
* @param prefix the prefix of the resource
|
|
607
607
|
* @param suffix the suffix of the resource, optional parameter
|
|
608
608
|
* @param compileTranslations compiler function, optional parameter
|
|
@@ -616,6 +616,7 @@ class I18nResourceImpl {
|
|
|
616
616
|
}
|
|
617
617
|
/**
|
|
618
618
|
* Translations pre-processor
|
|
619
|
+
*
|
|
619
620
|
* @param translations the object to be pre-processed
|
|
620
621
|
* @param lang the translations language
|
|
621
622
|
* @returns the pre-processed translations
|
|
@@ -625,6 +626,7 @@ class I18nResourceImpl {
|
|
|
625
626
|
}
|
|
626
627
|
/**
|
|
627
628
|
* Indicates whether other object is equal-to this one.
|
|
629
|
+
*
|
|
628
630
|
* @param obj the reference object with which to compare
|
|
629
631
|
* @returns true if this object is the same as obj, false otherwise
|
|
630
632
|
*/
|
|
@@ -633,6 +635,7 @@ class I18nResourceImpl {
|
|
|
633
635
|
}
|
|
634
636
|
/**
|
|
635
637
|
* The path to the resource
|
|
638
|
+
*
|
|
636
639
|
* @param lang the resource language
|
|
637
640
|
* @returns the path
|
|
638
641
|
*/
|
|
@@ -655,6 +658,7 @@ class I18nLoader {
|
|
|
655
658
|
}
|
|
656
659
|
/**
|
|
657
660
|
* Gets the translations from the server
|
|
661
|
+
*
|
|
658
662
|
* @param lang
|
|
659
663
|
* @returns Observable<any>
|
|
660
664
|
*/
|
|
@@ -666,6 +670,7 @@ class I18nLoader {
|
|
|
666
670
|
}
|
|
667
671
|
/**
|
|
668
672
|
* Adds resources
|
|
673
|
+
*
|
|
669
674
|
* @param config loader configuration
|
|
670
675
|
* @returns Observable<any> | false
|
|
671
676
|
*/
|
|
@@ -687,6 +692,7 @@ class I18nLoader {
|
|
|
687
692
|
}
|
|
688
693
|
/**
|
|
689
694
|
* Loads an array of resources, by language
|
|
695
|
+
*
|
|
690
696
|
* @param resources the definition of the resources
|
|
691
697
|
* @param lang the resource language to load
|
|
692
698
|
* @returns Observable<any>
|
|
@@ -729,6 +735,7 @@ class I18nLoader {
|
|
|
729
735
|
}
|
|
730
736
|
/**
|
|
731
737
|
* Create resources from a config file
|
|
738
|
+
*
|
|
732
739
|
* @param config loader configuration
|
|
733
740
|
* @returns I18nResourceImpl[] resources
|
|
734
741
|
*/
|
|
@@ -761,6 +768,7 @@ class I18nLoader {
|
|
|
761
768
|
}
|
|
762
769
|
/**
|
|
763
770
|
* Loads a resource, by language
|
|
771
|
+
*
|
|
764
772
|
* @param resource the definition of the resource
|
|
765
773
|
* @param lang the resource language to load
|
|
766
774
|
* @returns Observable<any>
|
|
@@ -861,6 +869,7 @@ class I18nService extends EuiLazyService {
|
|
|
861
869
|
* e.g. ngx-translate i18n.onReady('my_module').pipe(switchMap(()=>translate.get('eui.KEY')));
|
|
862
870
|
* WARNING: onReady will emit only once for a loaded Module, going to another and then going back will not result
|
|
863
871
|
* into another emission.
|
|
872
|
+
*
|
|
864
873
|
* @param moduleName the name of the module that has been given through the eUI globalConfig. In case non provided
|
|
865
874
|
* fetch module name from the state.
|
|
866
875
|
*/
|
|
@@ -883,6 +892,7 @@ class I18nService extends EuiLazyService {
|
|
|
883
892
|
}
|
|
884
893
|
/**
|
|
885
894
|
* Add resources based of a config loader
|
|
895
|
+
*
|
|
886
896
|
* @param config I18nLoaderConfig
|
|
887
897
|
* @return Promise<EuiServiceStatus> an EuiServiceStatus when translation has fully loaded
|
|
888
898
|
*/
|
|
@@ -909,17 +919,15 @@ class I18nService extends EuiLazyService {
|
|
|
909
919
|
this.translateService.setTranslation(this.translateService.defaultLang, loadedResources.translations, true);
|
|
910
920
|
})));
|
|
911
921
|
}
|
|
912
|
-
return forkJoin(langSubscription).pipe(map((loadedResourcesArr) =>
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
{ success: false, error: loadedResourcesArr[0].errors };
|
|
916
|
-
}), tap(() => {
|
|
922
|
+
return forkJoin(langSubscription).pipe(map((loadedResourcesArr) => !loadedResourcesArr[0].hasError ?
|
|
923
|
+
{ success: true } :
|
|
924
|
+
{ success: false, error: loadedResourcesArr[0].errors }), tap(() => {
|
|
917
925
|
// emit status of module loading progress
|
|
918
926
|
this.onModuleLoad.next({ ready: true, name: moduleName });
|
|
919
927
|
}), catchError(error => {
|
|
920
928
|
// emit status of module loading progress
|
|
921
|
-
this.onModuleLoad.next({ ready: true, name: moduleName, error
|
|
922
|
-
return of({ success: false, error
|
|
929
|
+
this.onModuleLoad.next({ ready: true, name: moduleName, error });
|
|
930
|
+
return of({ success: false, error });
|
|
923
931
|
}));
|
|
924
932
|
}
|
|
925
933
|
else {
|
|
@@ -968,9 +976,7 @@ class I18nService extends EuiLazyService {
|
|
|
968
976
|
}
|
|
969
977
|
}
|
|
970
978
|
return { success: true };
|
|
971
|
-
}), catchError((error) => {
|
|
972
|
-
return of({ success: false, error: error });
|
|
973
|
-
}));
|
|
979
|
+
}), catchError((error) => of({ success: false, error })));
|
|
974
980
|
}
|
|
975
981
|
bindActiveLangStateToTranslateService() {
|
|
976
982
|
this.store.select(getActiveLang).subscribe((lang) => {
|
|
@@ -999,6 +1005,7 @@ class I18nService extends EuiLazyService {
|
|
|
999
1005
|
}
|
|
1000
1006
|
/**
|
|
1001
1007
|
* change the currently used language
|
|
1008
|
+
*
|
|
1002
1009
|
* @param lang is the language code based on the convention you used e.g. (en or en-EN)
|
|
1003
1010
|
* @returns Observable that returns an object contain the object translation for given language after language
|
|
1004
1011
|
* fully loaded.
|
|
@@ -1008,6 +1015,7 @@ class I18nService extends EuiLazyService {
|
|
|
1008
1015
|
}
|
|
1009
1016
|
/**
|
|
1010
1017
|
* updates the HTML element lang attribute
|
|
1018
|
+
*
|
|
1011
1019
|
* @private
|
|
1012
1020
|
*/
|
|
1013
1021
|
updateHTMLDOMLang(lang) {
|
|
@@ -1170,19 +1178,15 @@ class UxAppShellService {
|
|
|
1170
1178
|
get state() {
|
|
1171
1179
|
return this._state$.getValue();
|
|
1172
1180
|
}
|
|
1173
|
-
get isSidebarOpen() {
|
|
1174
|
-
return this.state.isSidebarOpen;
|
|
1175
|
-
}
|
|
1176
|
-
// Edit mode
|
|
1177
|
-
get isDimmerActive() {
|
|
1178
|
-
return this.state.isDimmerActive;
|
|
1179
|
-
}
|
|
1180
1181
|
// ----------------------------
|
|
1181
1182
|
// public setters and functions
|
|
1182
1183
|
// ----------------------------
|
|
1183
1184
|
set isSidebarOpen(isOpen) {
|
|
1184
1185
|
this.setState(Object.assign(Object.assign({}, this.state), { isSidebarOpen: isOpen }));
|
|
1185
1186
|
}
|
|
1187
|
+
get isSidebarOpen() {
|
|
1188
|
+
return this.state.isSidebarOpen;
|
|
1189
|
+
}
|
|
1186
1190
|
set isSidebarHover(isHover) {
|
|
1187
1191
|
if (this.state.isSidebarExpandOnHover) {
|
|
1188
1192
|
this.setState(Object.assign(Object.assign({}, this.state), { isSidebarHover: isHover }));
|
|
@@ -1207,6 +1211,9 @@ class UxAppShellService {
|
|
|
1207
1211
|
this.setState(Object.assign(Object.assign({}, this.state), { isBlockDocumentActive: isActive }));
|
|
1208
1212
|
}
|
|
1209
1213
|
// Edit mode
|
|
1214
|
+
get isDimmerActive() {
|
|
1215
|
+
return this.state.isDimmerActive;
|
|
1216
|
+
}
|
|
1210
1217
|
set isDimmerActive(isActive) {
|
|
1211
1218
|
this.setState(Object.assign(Object.assign({}, this.state), { isDimmerActive: isActive }));
|
|
1212
1219
|
}
|
|
@@ -1248,6 +1255,7 @@ class UxAppShellService {
|
|
|
1248
1255
|
}
|
|
1249
1256
|
/**
|
|
1250
1257
|
* Emits a slice from the state whether that changes
|
|
1258
|
+
*
|
|
1251
1259
|
* @param key can be 'key' or 'key.sub.sub'
|
|
1252
1260
|
*/
|
|
1253
1261
|
getState(key) {
|
|
@@ -1845,12 +1853,10 @@ const coreReducers = Object.assign({}, {
|
|
|
1845
1853
|
});
|
|
1846
1854
|
|
|
1847
1855
|
const extend = extendProxy.default || extendProxy;
|
|
1848
|
-
/* tslint:disable */
|
|
1849
1856
|
/**
|
|
1850
1857
|
* Utility meta-reducer to load the state from the local storage
|
|
1851
1858
|
* @param reducer the action reducer
|
|
1852
1859
|
*/
|
|
1853
|
-
/* tslint:enable */
|
|
1854
1860
|
function localStorageSync(reducer) {
|
|
1855
1861
|
return cb(reducer, localStorage);
|
|
1856
1862
|
}
|
|
@@ -1863,12 +1869,10 @@ function sessionStorageSync(reducer) {
|
|
|
1863
1869
|
}
|
|
1864
1870
|
// Keys that are allowed to be synced with NgRx state from BrowserStorage
|
|
1865
1871
|
const disallowedKeys = ['loadedConfigModules', 'connect', 'currentModule', 'status', 'apiQueue'];
|
|
1866
|
-
/* tslint:disable */
|
|
1867
1872
|
/**
|
|
1868
1873
|
* filters the AppState by removing those keys from the state and return a new state Object
|
|
1869
1874
|
* @param app the AppState
|
|
1870
1875
|
*/
|
|
1871
|
-
/* tslint:enable */
|
|
1872
1876
|
const filterAppState = (app) => {
|
|
1873
1877
|
// in case app is undefined or null it should return empty object
|
|
1874
1878
|
if (!app) {
|
|
@@ -1883,13 +1887,11 @@ const filterAppState = (app) => {
|
|
|
1883
1887
|
return obj;
|
|
1884
1888
|
}, {});
|
|
1885
1889
|
};
|
|
1886
|
-
/* tslint:disable */
|
|
1887
1890
|
/**
|
|
1888
1891
|
*
|
|
1889
1892
|
* @param storageType
|
|
1890
1893
|
*/
|
|
1891
1894
|
const loadState = (storage = localStorage) => {
|
|
1892
|
-
/* tslint:enable */
|
|
1893
1895
|
try {
|
|
1894
1896
|
// by default falls back to localStorage
|
|
1895
1897
|
const serializedState = storage.getItem('state');
|
|
@@ -1906,9 +1908,7 @@ const loadState = (storage = localStorage) => {
|
|
|
1906
1908
|
return undefined;
|
|
1907
1909
|
}
|
|
1908
1910
|
};
|
|
1909
|
-
/* tslint:disable */
|
|
1910
1911
|
const cb = (reducer, storage) => {
|
|
1911
|
-
/* tslint:enable */
|
|
1912
1912
|
return function (state, action) {
|
|
1913
1913
|
var _a;
|
|
1914
1914
|
if (action.type === CoreAppActionTypes.INIT_STORE) {
|
|
@@ -2041,14 +2041,12 @@ function euiCoreRootGuardClass() {
|
|
|
2041
2041
|
return new EuiCoreRootGuardClass();
|
|
2042
2042
|
}
|
|
2043
2043
|
|
|
2044
|
-
/* tslint:disable */
|
|
2045
2044
|
/**
|
|
2046
2045
|
* Function to be used before the AppModule is bootstrapped. It is currently used to load dynamic configurations.
|
|
2047
2046
|
* It needs to be added in your application main.ts file.
|
|
2048
2047
|
* @param envConfig the current environment configuration
|
|
2049
2048
|
* @returns the updated environment configuration, as a promise
|
|
2050
2049
|
*/
|
|
2051
|
-
/* tslint:enable */
|
|
2052
2050
|
function preInitApp(envConfig) {
|
|
2053
2051
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2054
2052
|
const envDynamicConfig = envConfig && envConfig.envDynamicConfig;
|
|
@@ -2063,6 +2061,7 @@ function preInitApp(envConfig) {
|
|
|
2063
2061
|
}
|
|
2064
2062
|
/**
|
|
2065
2063
|
* Function to load asynchronously a dynamic configuration (from a local path or a web service)
|
|
2064
|
+
*
|
|
2066
2065
|
* @param url the path to the configuration
|
|
2067
2066
|
* @param timeout possible timeout
|
|
2068
2067
|
* @returns EuiAppJsonConfig promise
|
|
@@ -2074,8 +2073,8 @@ function loadEuiDynamicEnvironmentConfig(url, timeout) {
|
|
|
2074
2073
|
// fetch the config
|
|
2075
2074
|
try {
|
|
2076
2075
|
return yield xhr({
|
|
2077
|
-
url
|
|
2078
|
-
timeout
|
|
2076
|
+
url,
|
|
2077
|
+
timeout,
|
|
2079
2078
|
});
|
|
2080
2079
|
}
|
|
2081
2080
|
catch (error) {
|
|
@@ -2174,6 +2173,7 @@ class HttpErrorHandlerInterceptor {
|
|
|
2174
2173
|
}
|
|
2175
2174
|
/**
|
|
2176
2175
|
* Search in the configuration for the first matching route
|
|
2176
|
+
*
|
|
2177
2177
|
* @param error http error response
|
|
2178
2178
|
* @returns HttpErrorRouteConfig or null
|
|
2179
2179
|
*/
|
|
@@ -2427,12 +2427,10 @@ const getStyle = (nativeEl, cssProp) => {
|
|
|
2427
2427
|
const isStaticPositioned = (nativeEl) => {
|
|
2428
2428
|
return (getStyle(nativeEl, 'position') || 'static') === 'static';
|
|
2429
2429
|
};
|
|
2430
|
-
/* tslint:disable */
|
|
2431
2430
|
/**
|
|
2432
2431
|
* returns the closest, non-statically positioned parentOffset of a given element
|
|
2433
2432
|
* @param nativeEl
|
|
2434
2433
|
*/
|
|
2435
|
-
/* tslint:enable */
|
|
2436
2434
|
const parentOffsetEl = (nativeEl) => {
|
|
2437
2435
|
let offsetParent = nativeEl.offsetParent || document;
|
|
2438
2436
|
while (offsetParent && offsetParent !== document &&
|
|
@@ -2505,9 +2503,8 @@ const markControlsTouched = (group) => {
|
|
|
2505
2503
|
});
|
|
2506
2504
|
};
|
|
2507
2505
|
const validateEmail = (c) => {
|
|
2508
|
-
|
|
2506
|
+
// eslint-disable-next-line max-len
|
|
2509
2507
|
let EMAIL_REGEXP = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
2510
|
-
/* tslint:enable */
|
|
2511
2508
|
return EMAIL_REGEXP.test(c.value) ? null : {
|
|
2512
2509
|
validateEmail: {
|
|
2513
2510
|
valid: false
|
|
@@ -2521,7 +2518,6 @@ const validateEmail = (c) => {
|
|
|
2521
2518
|
const uniqueId = () => {
|
|
2522
2519
|
return Math.random().toString(36).substr(2, 9);
|
|
2523
2520
|
};
|
|
2524
|
-
/* tslint:disable */
|
|
2525
2521
|
/**
|
|
2526
2522
|
* Its job is to parse number and format it based on given input.
|
|
2527
2523
|
* @param value can be a number or a string number
|
|
@@ -2529,7 +2525,6 @@ const uniqueId = () => {
|
|
|
2529
2525
|
* @param inDecimalSeparator separator for decimal part of the number default is ','
|
|
2530
2526
|
* @param inThousandSeparator separator for the whole part of the number default is ''
|
|
2531
2527
|
*/
|
|
2532
|
-
/* tslint:enable */
|
|
2533
2528
|
const formatNumber = (value, fractionSize = 2, inDecimalSeparator = ',', inThousandSeparator = '') => {
|
|
2534
2529
|
if (inDecimalSeparator || inThousandSeparator) {
|
|
2535
2530
|
console.warn('The inDecimalSeparator and inThousandSeparator are deprecated. They will be a ' +
|
|
@@ -2597,6 +2592,7 @@ const handleError = (error) => {
|
|
|
2597
2592
|
|
|
2598
2593
|
/**
|
|
2599
2594
|
* check if a value is null or undefined. If it's not both returns true otherwise false
|
|
2595
|
+
*
|
|
2600
2596
|
* @param value
|
|
2601
2597
|
*/
|
|
2602
2598
|
function isDefined(value) {
|
|
@@ -3858,9 +3854,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImpor
|
|
|
3858
3854
|
}] }];
|
|
3859
3855
|
} });
|
|
3860
3856
|
|
|
3861
|
-
/* tslint:disable */
|
|
3862
3857
|
/** @internal */
|
|
3863
|
-
/* tslint:enable */
|
|
3864
3858
|
const localForage = 'defineDriver' in lf ? lf : lf['default'];
|
|
3865
3859
|
const LOCAL_FORAGE_SERVICE_CONFIG_TOKEN = new InjectionToken('LOCAL_FORAGE_SERVICE_CONFIG');
|
|
3866
3860
|
/**
|
|
@@ -4044,6 +4038,7 @@ class LocaleService extends EuiService {
|
|
|
4044
4038
|
}
|
|
4045
4039
|
/**
|
|
4046
4040
|
* load and register locale data dynamically
|
|
4041
|
+
*
|
|
4047
4042
|
* @param locale array of locale to load
|
|
4048
4043
|
*/
|
|
4049
4044
|
loadLocale(locale) {
|
|
@@ -4108,6 +4103,7 @@ class LocaleService extends EuiService {
|
|
|
4108
4103
|
}
|
|
4109
4104
|
/**
|
|
4110
4105
|
* retrieve locales from browser
|
|
4106
|
+
*
|
|
4111
4107
|
* @param options
|
|
4112
4108
|
*/
|
|
4113
4109
|
getBrowserLocales() {
|
|
@@ -4119,6 +4115,7 @@ class LocaleService extends EuiService {
|
|
|
4119
4115
|
}
|
|
4120
4116
|
/**
|
|
4121
4117
|
* if locale is already registered filtered out.
|
|
4118
|
+
*
|
|
4122
4119
|
* @param locales A string array contains all locale id e.g. ["el", "el-CY"]
|
|
4123
4120
|
*/
|
|
4124
4121
|
filterRegisteredLocales(locales) {
|
|
@@ -4134,6 +4131,7 @@ class LocaleService extends EuiService {
|
|
|
4134
4131
|
}
|
|
4135
4132
|
/**
|
|
4136
4133
|
* returns an Observable which loads the locale based on provided ID
|
|
4134
|
+
*
|
|
4137
4135
|
* @param id the locale id e.g. en, el-CY
|
|
4138
4136
|
* @private
|
|
4139
4137
|
*/
|
|
@@ -4154,6 +4152,7 @@ class LocaleService extends EuiService {
|
|
|
4154
4152
|
}
|
|
4155
4153
|
/**
|
|
4156
4154
|
* returns a Promise which loads the locale based on provided ID
|
|
4155
|
+
*
|
|
4157
4156
|
* @param id the locale id e.g. en, el-CY
|
|
4158
4157
|
* @private
|
|
4159
4158
|
*/
|
|
@@ -4174,6 +4173,7 @@ class LocaleService extends EuiService {
|
|
|
4174
4173
|
}
|
|
4175
4174
|
/**
|
|
4176
4175
|
* Imports Locale and then Extra. It returns the Object which registerLocale(...) function needs.
|
|
4176
|
+
*
|
|
4177
4177
|
* @param localeId The id of the locale
|
|
4178
4178
|
* @private
|
|
4179
4179
|
*/
|
|
@@ -4426,7 +4426,7 @@ class EuLoginSessionTimeoutHandlingInterceptor {
|
|
|
4426
4426
|
html.indexOf('<title>Mock Login Form</title>') >= 0 ||
|
|
4427
4427
|
html.indexOf('<title>Redirecting To ECAS</title>') >= 0 ||
|
|
4428
4428
|
html === '{ success : false, status : "ECAS_AUTHENTICATION_REQUIRED", code : 303, message : "session expired" }' ||
|
|
4429
|
-
//
|
|
4429
|
+
// eslint-disable-next-line max-len
|
|
4430
4430
|
JSON.stringify(JSON.parse(html)) === JSON.stringify({ success: false, status: 'ECAS_AUTHENTICATION_REQUIRED', code: 303, message: 'session expired' }));
|
|
4431
4431
|
}
|
|
4432
4432
|
catch (e) {
|
|
@@ -4510,7 +4510,10 @@ class OpenIdConnectInterceptor {
|
|
|
4510
4510
|
headers: newHeaders,
|
|
4511
4511
|
});
|
|
4512
4512
|
}
|
|
4513
|
-
|
|
4513
|
+
// Don't mix the next line with the line below it.
|
|
4514
|
+
// We would get a "Cannot access 'subscription' before initialization" error.
|
|
4515
|
+
let subscription = null;
|
|
4516
|
+
subscription = next.handle(newRequest)
|
|
4514
4517
|
.pipe(catchError((response) => {
|
|
4515
4518
|
return this.handleErrorResponse(response, request, next, retryCount, authorizedRequest, subscription);
|
|
4516
4519
|
}))
|