@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/fesm2020/eui-core.mjs
CHANGED
|
@@ -179,6 +179,7 @@ class LogService extends Logger {
|
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
181
|
* Gets a logger by name. If the logger does not exist, it is created
|
|
182
|
+
*
|
|
182
183
|
* @param loggerName logger name
|
|
183
184
|
* @param persist optional parameter. Set it to true if you want to reuse the logger. By default, it is set to false
|
|
184
185
|
* @returns the logger
|
|
@@ -209,19 +210,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImpor
|
|
|
209
210
|
}] }]; } });
|
|
210
211
|
|
|
211
212
|
const LOG_INSTANCES = {};
|
|
212
|
-
/* tslint:disable */
|
|
213
213
|
/**
|
|
214
214
|
* Helper function to check if the log config is defined.
|
|
215
215
|
* Does not check only for empty object, because the config can have other (non-log) parameters
|
|
216
216
|
* @params config log configuration
|
|
217
217
|
* @returns true/false
|
|
218
218
|
*/
|
|
219
|
-
/* tslint:enable */
|
|
220
219
|
function isLogConfigDefined(config) {
|
|
221
220
|
return config && ('baseLoggerName' in config || 'logLevel' in config || 'logAppenders' in config);
|
|
222
221
|
}
|
|
223
222
|
/**
|
|
224
223
|
* Helper function to provide a list of log appenders from a log configuration
|
|
224
|
+
*
|
|
225
225
|
* @params config log configuration
|
|
226
226
|
* @returns an array of log appenders
|
|
227
227
|
*/
|
|
@@ -237,6 +237,7 @@ function getLogAppendersConfig(config = DEFAULT_LOG_CONFIG, injector = null) {
|
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
239
|
* Helper function to provide an instance of LogService from a configuration
|
|
240
|
+
*
|
|
240
241
|
* @params config log configuration
|
|
241
242
|
* @returns an instance of log service
|
|
242
243
|
*/
|
|
@@ -254,7 +255,7 @@ function euiLogServiceFactory(injector, rootBaseLoggerName, rootConfig, childBas
|
|
|
254
255
|
const forChild = isLogConfigDefined(childConfig);
|
|
255
256
|
const baseLoggerName = forChild ? childBaseLoggerName : rootBaseLoggerName;
|
|
256
257
|
// create the proper configuration
|
|
257
|
-
const config = Object.assign({ baseLoggerName
|
|
258
|
+
const config = Object.assign({ baseLoggerName }, forChild ? Object.assign({}, rootConfig, childConfig) : rootConfig);
|
|
258
259
|
// re-use the log service or create a new instance
|
|
259
260
|
const logService = LOG_INSTANCES[baseLoggerName] || logServiceFactory(config, injector);
|
|
260
261
|
LOG_INSTANCES[baseLoggerName] = logService;
|
|
@@ -476,33 +477,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImpor
|
|
|
476
477
|
}] }]; } });
|
|
477
478
|
|
|
478
479
|
function euiInitApp(injector) {
|
|
479
|
-
return () => {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
resolve(null);
|
|
503
|
-
});
|
|
480
|
+
return () => new Promise((resolve) => {
|
|
481
|
+
const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve(null));
|
|
482
|
+
locationInitialized.then(() => {
|
|
483
|
+
const appConfig = injector.get(CONFIG_TOKEN);
|
|
484
|
+
// necessary config parameters
|
|
485
|
+
let appVersion;
|
|
486
|
+
if (appConfig && appConfig.versions && appConfig.versions.app) {
|
|
487
|
+
appVersion = appConfig.versions.app;
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
appVersion = '0.0.0';
|
|
491
|
+
}
|
|
492
|
+
let storageType;
|
|
493
|
+
if (appConfig && appConfig.saveStateStorage) {
|
|
494
|
+
storageType = appConfig.saveStateStorage;
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
storageType = BrowserStorageType.local;
|
|
498
|
+
}
|
|
499
|
+
const storeService = injector.get(StoreService);
|
|
500
|
+
storeService.init(appVersion, storageType);
|
|
501
|
+
storeService.handleAutoSave();
|
|
502
|
+
resolve(null);
|
|
504
503
|
});
|
|
505
|
-
};
|
|
504
|
+
});
|
|
506
505
|
}
|
|
507
506
|
|
|
508
507
|
function getCoreProviders() {
|
|
@@ -615,6 +614,7 @@ class UpdateLocaleStateAction {
|
|
|
615
614
|
class I18nResourceImpl {
|
|
616
615
|
/**
|
|
617
616
|
* Resource constructor
|
|
617
|
+
*
|
|
618
618
|
* @param prefix the prefix of the resource
|
|
619
619
|
* @param suffix the suffix of the resource, optional parameter
|
|
620
620
|
* @param compileTranslations compiler function, optional parameter
|
|
@@ -628,6 +628,7 @@ class I18nResourceImpl {
|
|
|
628
628
|
}
|
|
629
629
|
/**
|
|
630
630
|
* Translations pre-processor
|
|
631
|
+
*
|
|
631
632
|
* @param translations the object to be pre-processed
|
|
632
633
|
* @param lang the translations language
|
|
633
634
|
* @returns the pre-processed translations
|
|
@@ -637,6 +638,7 @@ class I18nResourceImpl {
|
|
|
637
638
|
}
|
|
638
639
|
/**
|
|
639
640
|
* Indicates whether other object is equal-to this one.
|
|
641
|
+
*
|
|
640
642
|
* @param obj the reference object with which to compare
|
|
641
643
|
* @returns true if this object is the same as obj, false otherwise
|
|
642
644
|
*/
|
|
@@ -645,6 +647,7 @@ class I18nResourceImpl {
|
|
|
645
647
|
}
|
|
646
648
|
/**
|
|
647
649
|
* The path to the resource
|
|
650
|
+
*
|
|
648
651
|
* @param lang the resource language
|
|
649
652
|
* @returns the path
|
|
650
653
|
*/
|
|
@@ -667,6 +670,7 @@ class I18nLoader {
|
|
|
667
670
|
}
|
|
668
671
|
/**
|
|
669
672
|
* Gets the translations from the server
|
|
673
|
+
*
|
|
670
674
|
* @param lang
|
|
671
675
|
* @returns Observable<any>
|
|
672
676
|
*/
|
|
@@ -678,6 +682,7 @@ class I18nLoader {
|
|
|
678
682
|
}
|
|
679
683
|
/**
|
|
680
684
|
* Adds resources
|
|
685
|
+
*
|
|
681
686
|
* @param config loader configuration
|
|
682
687
|
* @returns Observable<any> | false
|
|
683
688
|
*/
|
|
@@ -699,6 +704,7 @@ class I18nLoader {
|
|
|
699
704
|
}
|
|
700
705
|
/**
|
|
701
706
|
* Loads an array of resources, by language
|
|
707
|
+
*
|
|
702
708
|
* @param resources the definition of the resources
|
|
703
709
|
* @param lang the resource language to load
|
|
704
710
|
* @returns Observable<any>
|
|
@@ -741,6 +747,7 @@ class I18nLoader {
|
|
|
741
747
|
}
|
|
742
748
|
/**
|
|
743
749
|
* Create resources from a config file
|
|
750
|
+
*
|
|
744
751
|
* @param config loader configuration
|
|
745
752
|
* @returns I18nResourceImpl[] resources
|
|
746
753
|
*/
|
|
@@ -773,6 +780,7 @@ class I18nLoader {
|
|
|
773
780
|
}
|
|
774
781
|
/**
|
|
775
782
|
* Loads a resource, by language
|
|
783
|
+
*
|
|
776
784
|
* @param resource the definition of the resource
|
|
777
785
|
* @param lang the resource language to load
|
|
778
786
|
* @returns Observable<any>
|
|
@@ -874,6 +882,7 @@ class I18nService extends EuiLazyService {
|
|
|
874
882
|
* e.g. ngx-translate i18n.onReady('my_module').pipe(switchMap(()=>translate.get('eui.KEY')));
|
|
875
883
|
* WARNING: onReady will emit only once for a loaded Module, going to another and then going back will not result
|
|
876
884
|
* into another emission.
|
|
885
|
+
*
|
|
877
886
|
* @param moduleName the name of the module that has been given through the eUI globalConfig. In case non provided
|
|
878
887
|
* fetch module name from the state.
|
|
879
888
|
*/
|
|
@@ -896,6 +905,7 @@ class I18nService extends EuiLazyService {
|
|
|
896
905
|
}
|
|
897
906
|
/**
|
|
898
907
|
* Add resources based of a config loader
|
|
908
|
+
*
|
|
899
909
|
* @param config I18nLoaderConfig
|
|
900
910
|
* @return Promise<EuiServiceStatus> an EuiServiceStatus when translation has fully loaded
|
|
901
911
|
*/
|
|
@@ -922,17 +932,15 @@ class I18nService extends EuiLazyService {
|
|
|
922
932
|
this.translateService.setTranslation(this.translateService.defaultLang, loadedResources.translations, true);
|
|
923
933
|
})));
|
|
924
934
|
}
|
|
925
|
-
return forkJoin(langSubscription).pipe(map((loadedResourcesArr) =>
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
{ success: false, error: loadedResourcesArr[0].errors };
|
|
929
|
-
}), tap(() => {
|
|
935
|
+
return forkJoin(langSubscription).pipe(map((loadedResourcesArr) => !loadedResourcesArr[0].hasError ?
|
|
936
|
+
{ success: true } :
|
|
937
|
+
{ success: false, error: loadedResourcesArr[0].errors }), tap(() => {
|
|
930
938
|
// emit status of module loading progress
|
|
931
939
|
this.onModuleLoad.next({ ready: true, name: moduleName });
|
|
932
940
|
}), catchError(error => {
|
|
933
941
|
// emit status of module loading progress
|
|
934
|
-
this.onModuleLoad.next({ ready: true, name: moduleName, error
|
|
935
|
-
return of({ success: false, error
|
|
942
|
+
this.onModuleLoad.next({ ready: true, name: moduleName, error });
|
|
943
|
+
return of({ success: false, error });
|
|
936
944
|
}));
|
|
937
945
|
}
|
|
938
946
|
else {
|
|
@@ -981,9 +989,7 @@ class I18nService extends EuiLazyService {
|
|
|
981
989
|
}
|
|
982
990
|
}
|
|
983
991
|
return { success: true };
|
|
984
|
-
}), catchError((error) => {
|
|
985
|
-
return of({ success: false, error: error });
|
|
986
|
-
}));
|
|
992
|
+
}), catchError((error) => of({ success: false, error })));
|
|
987
993
|
}
|
|
988
994
|
bindActiveLangStateToTranslateService() {
|
|
989
995
|
this.store.select(getActiveLang).subscribe((lang) => {
|
|
@@ -1012,6 +1018,7 @@ class I18nService extends EuiLazyService {
|
|
|
1012
1018
|
}
|
|
1013
1019
|
/**
|
|
1014
1020
|
* change the currently used language
|
|
1021
|
+
*
|
|
1015
1022
|
* @param lang is the language code based on the convention you used e.g. (en or en-EN)
|
|
1016
1023
|
* @returns Observable that returns an object contain the object translation for given language after language
|
|
1017
1024
|
* fully loaded.
|
|
@@ -1021,6 +1028,7 @@ class I18nService extends EuiLazyService {
|
|
|
1021
1028
|
}
|
|
1022
1029
|
/**
|
|
1023
1030
|
* updates the HTML element lang attribute
|
|
1031
|
+
*
|
|
1024
1032
|
* @private
|
|
1025
1033
|
*/
|
|
1026
1034
|
updateHTMLDOMLang(lang) {
|
|
@@ -1182,13 +1190,6 @@ class UxAppShellService {
|
|
|
1182
1190
|
get state() {
|
|
1183
1191
|
return this._state$.getValue();
|
|
1184
1192
|
}
|
|
1185
|
-
get isSidebarOpen() {
|
|
1186
|
-
return this.state.isSidebarOpen;
|
|
1187
|
-
}
|
|
1188
|
-
// Edit mode
|
|
1189
|
-
get isDimmerActive() {
|
|
1190
|
-
return this.state.isDimmerActive;
|
|
1191
|
-
}
|
|
1192
1193
|
// ----------------------------
|
|
1193
1194
|
// public setters and functions
|
|
1194
1195
|
// ----------------------------
|
|
@@ -1198,6 +1199,9 @@ class UxAppShellService {
|
|
|
1198
1199
|
isSidebarOpen: isOpen,
|
|
1199
1200
|
});
|
|
1200
1201
|
}
|
|
1202
|
+
get isSidebarOpen() {
|
|
1203
|
+
return this.state.isSidebarOpen;
|
|
1204
|
+
}
|
|
1201
1205
|
set isSidebarHover(isHover) {
|
|
1202
1206
|
if (this.state.isSidebarExpandOnHover) {
|
|
1203
1207
|
this.setState({
|
|
@@ -1240,6 +1244,9 @@ class UxAppShellService {
|
|
|
1240
1244
|
});
|
|
1241
1245
|
}
|
|
1242
1246
|
// Edit mode
|
|
1247
|
+
get isDimmerActive() {
|
|
1248
|
+
return this.state.isDimmerActive;
|
|
1249
|
+
}
|
|
1243
1250
|
set isDimmerActive(isActive) {
|
|
1244
1251
|
this.setState({
|
|
1245
1252
|
...this.state,
|
|
@@ -1287,6 +1294,7 @@ class UxAppShellService {
|
|
|
1287
1294
|
}
|
|
1288
1295
|
/**
|
|
1289
1296
|
* Emits a slice from the state whether that changes
|
|
1297
|
+
*
|
|
1290
1298
|
* @param key can be 'key' or 'key.sub.sub'
|
|
1291
1299
|
*/
|
|
1292
1300
|
getState(key) {
|
|
@@ -1920,12 +1928,10 @@ const coreReducers = Object.assign({}, {
|
|
|
1920
1928
|
});
|
|
1921
1929
|
|
|
1922
1930
|
const extend = extendProxy.default || extendProxy;
|
|
1923
|
-
/* tslint:disable */
|
|
1924
1931
|
/**
|
|
1925
1932
|
* Utility meta-reducer to load the state from the local storage
|
|
1926
1933
|
* @param reducer the action reducer
|
|
1927
1934
|
*/
|
|
1928
|
-
/* tslint:enable */
|
|
1929
1935
|
function localStorageSync(reducer) {
|
|
1930
1936
|
return cb(reducer, localStorage);
|
|
1931
1937
|
}
|
|
@@ -1938,12 +1944,10 @@ function sessionStorageSync(reducer) {
|
|
|
1938
1944
|
}
|
|
1939
1945
|
// Keys that are allowed to be synced with NgRx state from BrowserStorage
|
|
1940
1946
|
const disallowedKeys = ['loadedConfigModules', 'connect', 'currentModule', 'status', 'apiQueue'];
|
|
1941
|
-
/* tslint:disable */
|
|
1942
1947
|
/**
|
|
1943
1948
|
* filters the AppState by removing those keys from the state and return a new state Object
|
|
1944
1949
|
* @param app the AppState
|
|
1945
1950
|
*/
|
|
1946
|
-
/* tslint:enable */
|
|
1947
1951
|
const filterAppState = (app) => {
|
|
1948
1952
|
// in case app is undefined or null it should return empty object
|
|
1949
1953
|
if (!app) {
|
|
@@ -1958,13 +1962,11 @@ const filterAppState = (app) => {
|
|
|
1958
1962
|
return obj;
|
|
1959
1963
|
}, {});
|
|
1960
1964
|
};
|
|
1961
|
-
/* tslint:disable */
|
|
1962
1965
|
/**
|
|
1963
1966
|
*
|
|
1964
1967
|
* @param storageType
|
|
1965
1968
|
*/
|
|
1966
1969
|
const loadState = (storage = localStorage) => {
|
|
1967
|
-
/* tslint:enable */
|
|
1968
1970
|
try {
|
|
1969
1971
|
// by default falls back to localStorage
|
|
1970
1972
|
const serializedState = storage.getItem('state');
|
|
@@ -1981,9 +1983,7 @@ const loadState = (storage = localStorage) => {
|
|
|
1981
1983
|
return undefined;
|
|
1982
1984
|
}
|
|
1983
1985
|
};
|
|
1984
|
-
/* tslint:disable */
|
|
1985
1986
|
const cb = (reducer, storage) => {
|
|
1986
|
-
/* tslint:enable */
|
|
1987
1987
|
return function (state, action) {
|
|
1988
1988
|
if (action.type === CoreAppActionTypes.INIT_STORE) {
|
|
1989
1989
|
// This action must be dispatched from an app initializer
|
|
@@ -2113,14 +2113,12 @@ function euiCoreRootGuardClass() {
|
|
|
2113
2113
|
return new EuiCoreRootGuardClass();
|
|
2114
2114
|
}
|
|
2115
2115
|
|
|
2116
|
-
/* tslint:disable */
|
|
2117
2116
|
/**
|
|
2118
2117
|
* Function to be used before the AppModule is bootstrapped. It is currently used to load dynamic configurations.
|
|
2119
2118
|
* It needs to be added in your application main.ts file.
|
|
2120
2119
|
* @param envConfig the current environment configuration
|
|
2121
2120
|
* @returns the updated environment configuration, as a promise
|
|
2122
2121
|
*/
|
|
2123
|
-
/* tslint:enable */
|
|
2124
2122
|
async function preInitApp(envConfig) {
|
|
2125
2123
|
const envDynamicConfig = envConfig && envConfig.envDynamicConfig;
|
|
2126
2124
|
if (envDynamicConfig) {
|
|
@@ -2133,6 +2131,7 @@ async function preInitApp(envConfig) {
|
|
|
2133
2131
|
}
|
|
2134
2132
|
/**
|
|
2135
2133
|
* Function to load asynchronously a dynamic configuration (from a local path or a web service)
|
|
2134
|
+
*
|
|
2136
2135
|
* @param url the path to the configuration
|
|
2137
2136
|
* @param timeout possible timeout
|
|
2138
2137
|
* @returns EuiAppJsonConfig promise
|
|
@@ -2143,8 +2142,8 @@ async function loadEuiDynamicEnvironmentConfig(url, timeout) {
|
|
|
2143
2142
|
// fetch the config
|
|
2144
2143
|
try {
|
|
2145
2144
|
return await xhr({
|
|
2146
|
-
url
|
|
2147
|
-
timeout
|
|
2145
|
+
url,
|
|
2146
|
+
timeout,
|
|
2148
2147
|
});
|
|
2149
2148
|
}
|
|
2150
2149
|
catch (error) {
|
|
@@ -2242,6 +2241,7 @@ class HttpErrorHandlerInterceptor {
|
|
|
2242
2241
|
}
|
|
2243
2242
|
/**
|
|
2244
2243
|
* Search in the configuration for the first matching route
|
|
2244
|
+
*
|
|
2245
2245
|
* @param error http error response
|
|
2246
2246
|
* @returns HttpErrorRouteConfig or null
|
|
2247
2247
|
*/
|
|
@@ -2493,12 +2493,10 @@ const getStyle = (nativeEl, cssProp) => {
|
|
|
2493
2493
|
const isStaticPositioned = (nativeEl) => {
|
|
2494
2494
|
return (getStyle(nativeEl, 'position') || 'static') === 'static';
|
|
2495
2495
|
};
|
|
2496
|
-
/* tslint:disable */
|
|
2497
2496
|
/**
|
|
2498
2497
|
* returns the closest, non-statically positioned parentOffset of a given element
|
|
2499
2498
|
* @param nativeEl
|
|
2500
2499
|
*/
|
|
2501
|
-
/* tslint:enable */
|
|
2502
2500
|
const parentOffsetEl = (nativeEl) => {
|
|
2503
2501
|
let offsetParent = nativeEl.offsetParent || document;
|
|
2504
2502
|
while (offsetParent && offsetParent !== document &&
|
|
@@ -2571,9 +2569,8 @@ const markControlsTouched = (group) => {
|
|
|
2571
2569
|
});
|
|
2572
2570
|
};
|
|
2573
2571
|
const validateEmail = (c) => {
|
|
2574
|
-
|
|
2572
|
+
// eslint-disable-next-line max-len
|
|
2575
2573
|
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,}))$/;
|
|
2576
|
-
/* tslint:enable */
|
|
2577
2574
|
return EMAIL_REGEXP.test(c.value) ? null : {
|
|
2578
2575
|
validateEmail: {
|
|
2579
2576
|
valid: false
|
|
@@ -2587,7 +2584,6 @@ const validateEmail = (c) => {
|
|
|
2587
2584
|
const uniqueId = () => {
|
|
2588
2585
|
return Math.random().toString(36).substr(2, 9);
|
|
2589
2586
|
};
|
|
2590
|
-
/* tslint:disable */
|
|
2591
2587
|
/**
|
|
2592
2588
|
* Its job is to parse number and format it based on given input.
|
|
2593
2589
|
* @param value can be a number or a string number
|
|
@@ -2595,7 +2591,6 @@ const uniqueId = () => {
|
|
|
2595
2591
|
* @param inDecimalSeparator separator for decimal part of the number default is ','
|
|
2596
2592
|
* @param inThousandSeparator separator for the whole part of the number default is ''
|
|
2597
2593
|
*/
|
|
2598
|
-
/* tslint:enable */
|
|
2599
2594
|
const formatNumber = (value, fractionSize = 2, inDecimalSeparator = ',', inThousandSeparator = '') => {
|
|
2600
2595
|
if (inDecimalSeparator || inThousandSeparator) {
|
|
2601
2596
|
console.warn('The inDecimalSeparator and inThousandSeparator are deprecated. They will be a ' +
|
|
@@ -2663,6 +2658,7 @@ const handleError = (error) => {
|
|
|
2663
2658
|
|
|
2664
2659
|
/**
|
|
2665
2660
|
* check if a value is null or undefined. If it's not both returns true otherwise false
|
|
2661
|
+
*
|
|
2666
2662
|
* @param value
|
|
2667
2663
|
*/
|
|
2668
2664
|
function isDefined(value) {
|
|
@@ -3918,9 +3914,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImpor
|
|
|
3918
3914
|
type: Optional
|
|
3919
3915
|
}] }]; } });
|
|
3920
3916
|
|
|
3921
|
-
/* tslint:disable */
|
|
3922
3917
|
/** @internal */
|
|
3923
|
-
/* tslint:enable */
|
|
3924
3918
|
const localForage = 'defineDriver' in lf ? lf : lf['default'];
|
|
3925
3919
|
const LOCAL_FORAGE_SERVICE_CONFIG_TOKEN = new InjectionToken('LOCAL_FORAGE_SERVICE_CONFIG');
|
|
3926
3920
|
/**
|
|
@@ -4099,6 +4093,7 @@ class LocaleService extends EuiService {
|
|
|
4099
4093
|
}
|
|
4100
4094
|
/**
|
|
4101
4095
|
* load and register locale data dynamically
|
|
4096
|
+
*
|
|
4102
4097
|
* @param locale array of locale to load
|
|
4103
4098
|
*/
|
|
4104
4099
|
loadLocale(locale) {
|
|
@@ -4163,6 +4158,7 @@ class LocaleService extends EuiService {
|
|
|
4163
4158
|
}
|
|
4164
4159
|
/**
|
|
4165
4160
|
* retrieve locales from browser
|
|
4161
|
+
*
|
|
4166
4162
|
* @param options
|
|
4167
4163
|
*/
|
|
4168
4164
|
getBrowserLocales() {
|
|
@@ -4174,6 +4170,7 @@ class LocaleService extends EuiService {
|
|
|
4174
4170
|
}
|
|
4175
4171
|
/**
|
|
4176
4172
|
* if locale is already registered filtered out.
|
|
4173
|
+
*
|
|
4177
4174
|
* @param locales A string array contains all locale id e.g. ["el", "el-CY"]
|
|
4178
4175
|
*/
|
|
4179
4176
|
filterRegisteredLocales(locales) {
|
|
@@ -4189,6 +4186,7 @@ class LocaleService extends EuiService {
|
|
|
4189
4186
|
}
|
|
4190
4187
|
/**
|
|
4191
4188
|
* returns an Observable which loads the locale based on provided ID
|
|
4189
|
+
*
|
|
4192
4190
|
* @param id the locale id e.g. en, el-CY
|
|
4193
4191
|
* @private
|
|
4194
4192
|
*/
|
|
@@ -4209,6 +4207,7 @@ class LocaleService extends EuiService {
|
|
|
4209
4207
|
}
|
|
4210
4208
|
/**
|
|
4211
4209
|
* returns a Promise which loads the locale based on provided ID
|
|
4210
|
+
*
|
|
4212
4211
|
* @param id the locale id e.g. en, el-CY
|
|
4213
4212
|
* @private
|
|
4214
4213
|
*/
|
|
@@ -4229,6 +4228,7 @@ class LocaleService extends EuiService {
|
|
|
4229
4228
|
}
|
|
4230
4229
|
/**
|
|
4231
4230
|
* Imports Locale and then Extra. It returns the Object which registerLocale(...) function needs.
|
|
4231
|
+
*
|
|
4232
4232
|
* @param localeId The id of the locale
|
|
4233
4233
|
* @private
|
|
4234
4234
|
*/
|
|
@@ -4477,7 +4477,7 @@ class EuLoginSessionTimeoutHandlingInterceptor {
|
|
|
4477
4477
|
html.indexOf('<title>Mock Login Form</title>') >= 0 ||
|
|
4478
4478
|
html.indexOf('<title>Redirecting To ECAS</title>') >= 0 ||
|
|
4479
4479
|
html === '{ success : false, status : "ECAS_AUTHENTICATION_REQUIRED", code : 303, message : "session expired" }' ||
|
|
4480
|
-
//
|
|
4480
|
+
// eslint-disable-next-line max-len
|
|
4481
4481
|
JSON.stringify(JSON.parse(html)) === JSON.stringify({ success: false, status: 'ECAS_AUTHENTICATION_REQUIRED', code: 303, message: 'session expired' }));
|
|
4482
4482
|
}
|
|
4483
4483
|
catch (e) {
|
|
@@ -4559,7 +4559,10 @@ class OpenIdConnectInterceptor {
|
|
|
4559
4559
|
headers: newHeaders,
|
|
4560
4560
|
});
|
|
4561
4561
|
}
|
|
4562
|
-
|
|
4562
|
+
// Don't mix the next line with the line below it.
|
|
4563
|
+
// We would get a "Cannot access 'subscription' before initialization" error.
|
|
4564
|
+
let subscription = null;
|
|
4565
|
+
subscription = next.handle(newRequest)
|
|
4563
4566
|
.pipe(catchError((response) => {
|
|
4564
4567
|
return this.handleErrorResponse(response, request, next, retryCount, authorizedRequest, subscription);
|
|
4565
4568
|
}))
|