@eui/core 22.0.0-alpha.8 → 22.0.0-alpha.80
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/CHANGELOG.md +1149 -0
- package/assets/i18n-eui/bg.json +23 -1
- package/assets/i18n-eui/cs.json +23 -1
- package/assets/i18n-eui/da.json +23 -1
- package/assets/i18n-eui/de.json +23 -1
- package/assets/i18n-eui/el.json +23 -1
- package/assets/i18n-eui/en.json +23 -1
- package/assets/i18n-eui/es.json +23 -1
- package/assets/i18n-eui/et.json +31 -2
- package/assets/i18n-eui/fi.json +24 -2
- package/assets/i18n-eui/fr.json +23 -1
- package/assets/i18n-eui/ga.json +23 -1
- package/assets/i18n-eui/hr.json +23 -1
- package/assets/i18n-eui/hu.json +23 -1
- package/assets/i18n-eui/it.json +23 -1
- package/assets/i18n-eui/lt.json +23 -1
- package/assets/i18n-eui/lv.json +23 -1
- package/assets/i18n-eui/mt.json +23 -1
- package/assets/i18n-eui/nl.json +23 -1
- package/assets/i18n-eui/pl.json +23 -1
- package/assets/i18n-eui/pt.json +23 -1
- package/assets/i18n-eui/ro.json +23 -1
- package/assets/i18n-eui/sk.json +23 -1
- package/assets/i18n-eui/sl.json +23 -1
- package/assets/i18n-eui/sv.json +23 -1
- package/docs/changelog.html +1641 -0
- package/docs/classes/EuiAppShellServiceMock.html +3 -3
- package/docs/classes/TranslateServiceMock.html +8 -8
- package/docs/injectables/ApiQueueService.html +2 -2
- package/docs/injectables/EuiDynamicMenuService.html +4 -4
- package/docs/injectables/EuiTimezoneService.html +1 -1
- package/docs/injectables/I18nLoader.html +1 -1
- package/docs/injectables/I18nServiceMock.html +20 -5
- package/docs/injectables/StoreService.html +1 -1
- package/docs/interceptors/{UxRequestErrorModelInterceptor.html → RequestErrorInterceptor.html} +3 -3
- package/docs/interfaces/Annotation.html +402 -0
- package/docs/interfaces/Edit-1.html +1 -1
- package/docs/interfaces/Edit-10.html +395 -0
- package/docs/interfaces/Edit-11.html +395 -0
- package/docs/interfaces/Edit-12.html +395 -0
- package/docs/interfaces/Edit-13.html +395 -0
- package/docs/interfaces/Edit-14.html +395 -0
- package/docs/interfaces/Edit-15.html +395 -0
- package/docs/interfaces/Edit-16.html +395 -0
- package/docs/interfaces/Edit-2.html +1 -1
- package/docs/interfaces/Edit-3.html +1 -1
- package/docs/interfaces/Edit-4.html +1 -1
- package/docs/interfaces/Edit-5.html +395 -0
- package/docs/interfaces/Edit-6.html +395 -0
- package/docs/interfaces/Edit-7.html +395 -0
- package/docs/interfaces/Edit-8.html +395 -0
- package/docs/interfaces/Edit-9.html +395 -0
- package/docs/interfaces/Edit.html +1 -1
- package/docs/interfaces/IEuiTheme.html +4 -4
- package/docs/interfaces/LoadedResources.html +2 -2
- package/docs/interfaces/MigrateEclSchema.html +368 -0
- package/docs/interfaces/MigrateResult.html +39 -0
- package/docs/interfaces/ModuleLoadEvent.html +2 -2
- package/docs/interfaces/OutputFormatUsage.html +446 -0
- package/docs/interfaces/RemovedAttr.html +401 -0
- package/docs/interfaces/{TranslationKeys.html → RemovedIdentifier.html} +100 -16
- package/docs/interfaces/{ActionReducer.html → RemovedTag.html} +58 -19
- package/docs/interfaces/Schema-10.html +14 -1
- package/docs/interfaces/Schema-11.html +14 -1
- package/docs/interfaces/Schema-12.html +31 -1
- package/docs/interfaces/Schema-13.html +14 -1
- package/docs/interfaces/Schema-14.html +13 -1
- package/docs/interfaces/Schema-15.html +12 -1
- package/docs/interfaces/Schema-16.html +20 -1
- package/docs/interfaces/Schema-17.html +1 -1
- package/docs/interfaces/Schema-18.html +1 -1
- package/docs/interfaces/Schema-19.html +1 -1
- package/docs/interfaces/Schema-20.html +1 -1
- package/docs/interfaces/Schema-21.html +1 -1
- package/docs/interfaces/Schema-22.html +1 -1
- package/docs/interfaces/Schema-23.html +368 -0
- package/docs/interfaces/Schema-24.html +368 -0
- package/docs/interfaces/Schema-25.html +368 -0
- package/docs/interfaces/Schema-26.html +368 -0
- package/docs/interfaces/Schema-27.html +368 -0
- package/docs/interfaces/Schema-28.html +368 -0
- package/docs/interfaces/Schema-29.html +368 -0
- package/docs/interfaces/Schema-3.html +13 -64
- package/docs/interfaces/Schema-30.html +368 -0
- package/docs/interfaces/Schema-31.html +368 -0
- package/docs/interfaces/Schema-32.html +368 -0
- package/docs/interfaces/Schema-33.html +368 -0
- package/docs/interfaces/Schema-34.html +368 -0
- package/docs/interfaces/Schema-35.html +368 -0
- package/docs/interfaces/Schema-36.html +368 -0
- package/docs/interfaces/Schema-37.html +368 -0
- package/docs/interfaces/Schema-4.html +26 -1
- package/docs/interfaces/Schema-5.html +64 -1
- package/docs/interfaces/Schema-6.html +20 -1
- package/docs/interfaces/Schema-7.html +22 -1
- package/docs/interfaces/Schema-8.html +14 -1
- package/docs/interfaces/Schema-9.html +14 -1
- package/docs/interfaces/SelectorMapping.html +395 -0
- package/docs/interfaces/TemplateSource.html +395 -0
- package/docs/interfaces/TextEdit.html +395 -0
- package/docs/interfaces/TodoEdit.html +395 -0
- package/docs/js/menu-wc.js +114 -9
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/documentation.json +33518 -14116
- package/docs/llms.txt +901 -68
- package/docs/miscellaneous/functions.html +15233 -1676
- package/docs/miscellaneous/typealiases.html +70 -0
- package/docs/miscellaneous/variables.html +2552 -210
- package/docs/overview.html +1 -1
- package/docs/properties.html +1 -1
- package/fesm2022/eui-core.mjs +5790 -5463
- package/fesm2022/eui-core.mjs.map +1 -1
- package/migrations.json +191 -0
- package/package.json +2 -2
- package/schematics/add-eui-imports/index.js +1 -1
- package/schematics/add-eui-imports/index.js.map +1 -1
- package/schematics/collection.json +81 -0
- package/schematics/migrate/index.js +2 -2
- package/schematics/migrate/replacements/icons.d.ts +3 -1
- package/schematics/migrate/replacements/icons.js +15 -5
- package/schematics/migrate/replacements/icons.js.map +1 -1
- package/schematics/migrate/replacements/mwp.js +1 -0
- package/schematics/migrate/replacements/mwp.js.map +1 -1
- package/schematics/migrate-all/index.js +15 -0
- package/schematics/migrate-all/index.js.map +1 -1
- package/schematics/migrate-ecl/index.d.ts +21 -0
- package/schematics/migrate-ecl/index.js +40 -0
- package/schematics/migrate-ecl/index.js.map +1 -0
- package/schematics/migrate-ecl/schema.json +20 -0
- package/schematics/migrate-ecl-breadcrumb/index.d.ts +16 -0
- package/schematics/migrate-ecl-breadcrumb/index.js +179 -0
- package/schematics/migrate-ecl-breadcrumb/index.js.map +1 -0
- package/schematics/migrate-ecl-breadcrumb/schema.json +18 -0
- package/schematics/migrate-ecl-file/index.d.ts +28 -0
- package/schematics/migrate-ecl-file/index.js +273 -0
- package/schematics/migrate-ecl-file/index.js.map +1 -0
- package/schematics/migrate-ecl-file/schema.json +18 -0
- package/schematics/migrate-ecl-icon/index.d.ts +22 -0
- package/schematics/migrate-ecl-icon/index.js +259 -0
- package/schematics/migrate-ecl-icon/index.js.map +1 -0
- package/schematics/migrate-ecl-icon/schema.json +18 -0
- package/schematics/migrate-ecl-inpage-navigation/index.d.ts +17 -0
- package/schematics/migrate-ecl-inpage-navigation/index.js +179 -0
- package/schematics/migrate-ecl-inpage-navigation/index.js.map +1 -0
- package/schematics/migrate-ecl-inpage-navigation/schema.json +18 -0
- package/schematics/migrate-ecl-link/index.d.ts +25 -0
- package/schematics/migrate-ecl-link/index.js +300 -0
- package/schematics/migrate-ecl-link/index.js.map +1 -0
- package/schematics/migrate-ecl-link/schema.json +18 -0
- package/schematics/migrate-ecl-page-header/index.d.ts +16 -0
- package/schematics/migrate-ecl-page-header/index.js +179 -0
- package/schematics/migrate-ecl-page-header/index.js.map +1 -0
- package/schematics/migrate-ecl-page-header/schema.json +18 -0
- package/schematics/migrate-ecl-page-summary/index.d.ts +17 -0
- package/schematics/migrate-ecl-page-summary/index.js +179 -0
- package/schematics/migrate-ecl-page-summary/index.js.map +1 -0
- package/schematics/migrate-ecl-page-summary/schema.json +18 -0
- package/schematics/migrate-ecl-pagination/index.d.ts +17 -0
- package/schematics/migrate-ecl-pagination/index.js +179 -0
- package/schematics/migrate-ecl-pagination/index.js.map +1 -0
- package/schematics/migrate-ecl-pagination/schema.json +18 -0
- package/schematics/migrate-ecl-quiz/index.d.ts +17 -0
- package/schematics/migrate-ecl-quiz/index.js +192 -0
- package/schematics/migrate-ecl-quiz/index.js.map +1 -0
- package/schematics/migrate-ecl-quiz/schema.json +18 -0
- package/schematics/migrate-ecl-removed-components/index.d.ts +32 -0
- package/schematics/migrate-ecl-removed-components/index.js +289 -0
- package/schematics/migrate-ecl-removed-components/index.js.map +1 -0
- package/schematics/migrate-ecl-removed-components/schema.json +18 -0
- package/schematics/migrate-ecl-site-footer/index.d.ts +17 -0
- package/schematics/migrate-ecl-site-footer/index.js +179 -0
- package/schematics/migrate-ecl-site-footer/index.js.map +1 -0
- package/schematics/migrate-ecl-site-footer/schema.json +18 -0
- package/schematics/migrate-ecl-tabs/index.d.ts +15 -0
- package/schematics/migrate-ecl-tabs/index.js +180 -0
- package/schematics/migrate-ecl-tabs/index.js.map +1 -0
- package/schematics/migrate-ecl-tabs/schema.json +18 -0
- package/schematics/migrate-ecl-timeline/index.d.ts +22 -0
- package/schematics/migrate-ecl-timeline/index.js +184 -0
- package/schematics/migrate-ecl-timeline/index.js.map +1 -0
- package/schematics/migrate-ecl-timeline/schema.json +18 -0
- package/schematics/migrate-eui-alert/index.js +2 -2
- package/schematics/migrate-eui-alert/index.js.map +1 -1
- package/schematics/migrate-eui-chip-list/index.js +1 -1
- package/schematics/migrate-eui-chip-list/index.js.map +1 -1
- package/schematics/migrate-eui-date-range-selector/schema.json +19 -0
- package/schematics/migrate-eui-datepicker/index.d.ts +19 -0
- package/schematics/migrate-eui-datepicker/index.js +206 -0
- package/schematics/migrate-eui-datepicker/index.js.map +1 -0
- package/schematics/migrate-eui-datepicker/schema.json +19 -0
- package/schematics/migrate-eui-table/index.js +1 -1
- package/schematics/migrate-eui-table/index.js.map +1 -1
- package/schematics/migrate-eui-tabs/index.js +5 -5
- package/schematics/migrate-eui-tabs/index.js.map +1 -1
- package/schematics/migrate-eui-tooltip/index.js +2 -2
- package/schematics/migrate-eui-tooltip/index.js.map +1 -1
- package/schematics/migrate-eui-tooltip/schema.json +19 -0
- package/schematics/migrate-to-signals/ecl-signal-map.d.ts +17 -0
- package/schematics/migrate-to-signals/ecl-signal-map.js +342 -0
- package/schematics/migrate-to-signals/ecl-signal-map.js.map +1 -0
- package/schematics/migrate-to-signals/index.d.ts +3 -2
- package/schematics/migrate-to-signals/index.js +155 -26
- package/schematics/migrate-to-signals/index.js.map +1 -1
- package/schematics/migrate-to-signals/schema.json +19 -0
- package/schematics/utils/date-adapter.d.ts +30 -0
- package/schematics/utils/date-adapter.js +125 -0
- package/schematics/utils/date-adapter.js.map +1 -0
- package/schematics/utils/todo-comment.d.ts +25 -0
- package/schematics/utils/todo-comment.js +47 -0
- package/schematics/utils/todo-comment.js.map +1 -0
- package/types/eui-core.d.ts +2098 -2174
- package/types/eui-core.d.ts.map +1 -1
package/types/eui-core.d.ts
CHANGED
|
@@ -1,41 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
declare class EuiCoreRootGuardClass {
|
|
28
|
-
constructor();
|
|
1
|
+
import { ApiQueueItem, AppState, ConnectionStatus, CoreState, DeepPartial, ErrorMappingHandler, EuiAppConfig, EuiAppHandlersConfig, EuiAppJsonConfig, EuiConfig, EuiEnvConfig, EuiGrowlMessage, EuiLanguage, EuiLazyService, EuiMenuItem, EuiService, EuiServiceStatus, EuiUserRight, GlobalConfig, HttpErrorHandlerConfig, HttpErrorRouteConfig, I18nLoaderConfig, I18nServiceConfig, I18nState, LocaleServiceConfig, LocaleState, LogAppender, LogConfig, LogLevel, Logger, LoggerMock, ModuleConfig, NotificationsState, UserDetails, UserPreferences, UserState } from "@eui/base";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { AfterViewChecked, DebugElement, ElementRef, EnvironmentProviders, ErrorHandler, InjectionToken, Injector, ModuleWithProviders, OnDestroy, PipeTransform, Provider, Signal, Type } from "@angular/core";
|
|
4
|
+
import { HttpClient, HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponseBase } from "@angular/common/http";
|
|
5
|
+
import { ActivatedRoute, Router } from "@angular/router";
|
|
6
|
+
import { BehaviorSubject, Observable, Subject } from "rxjs";
|
|
7
|
+
import { LangChangeEvent, TranslateLoader, TranslateService, TranslationObject } from "@ngx-translate/core";
|
|
8
|
+
import { ComponentType, DomPortalOutlet } from "@angular/cdk/portal";
|
|
9
|
+
import { ComponentFixture } from "@angular/core/testing";
|
|
10
|
+
import { AbstractControl, FormArray, FormControl, FormGroup } from "@angular/forms";
|
|
11
|
+
export * from "@eui/base";
|
|
12
|
+
export declare const CORE_ROOT_GUARD: InjectionToken<void>;
|
|
13
|
+
export declare class CoreModule {
|
|
14
|
+
/**
|
|
15
|
+
* No more providing config from forRoot, you have to use EUI_CONFIG_TOKEN to pass config via providers.
|
|
16
|
+
*/
|
|
17
|
+
static forRoot(): ModuleWithProviders<CoreModule>;
|
|
18
|
+
static forChild(moduleName: string): ModuleWithProviders<CoreModule>;
|
|
19
|
+
constructor();
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoreModule, never>;
|
|
21
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CoreModule, never, never, never>;
|
|
22
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CoreModule>;
|
|
23
|
+
}
|
|
24
|
+
declare const createEuiCoreRootGuard: (core: unknown) => string;
|
|
25
|
+
export declare class EuiCoreRootGuardClass {
|
|
26
|
+
constructor();
|
|
29
27
|
}
|
|
30
28
|
declare const euiCoreRootGuardClass: () => EuiCoreRootGuardClass;
|
|
31
|
-
|
|
32
29
|
/**
|
|
33
30
|
* Function to be used before the AppModule is bootstrapped. It is currently used to load dynamic configurations.
|
|
34
31
|
* It needs to be added in your application main.ts file.
|
|
35
32
|
* @param envConfig the current environment configuration
|
|
36
33
|
* @returns the updated environment configuration, as a promise
|
|
37
34
|
*/
|
|
38
|
-
declare function preInitApp(envConfig: EuiEnvConfig): Promise<EuiEnvConfig>;
|
|
35
|
+
export declare function preInitApp(envConfig: EuiEnvConfig): Promise<EuiEnvConfig>;
|
|
39
36
|
/**
|
|
40
37
|
* Function to load asynchronously a dynamic configuration (from a local path or a web service)
|
|
41
38
|
*
|
|
@@ -43,493 +40,461 @@ declare function preInitApp(envConfig: EuiEnvConfig): Promise<EuiEnvConfig>;
|
|
|
43
40
|
* @param timeout possible timeout
|
|
44
41
|
* @returns EuiAppJsonConfig promise
|
|
45
42
|
*/
|
|
46
|
-
declare function loadEuiDynamicEnvironmentConfig(url: string, timeout?: number): Promise<EuiAppJsonConfig>;
|
|
47
|
-
|
|
43
|
+
export declare function loadEuiDynamicEnvironmentConfig(url: string, timeout?: number): Promise<EuiAppJsonConfig | null>;
|
|
48
44
|
/**
|
|
49
45
|
* Initializes the app with the necessary configurations. Use this in combination with `provideAppInitializer(euiInitApp_Env)`
|
|
50
46
|
*/
|
|
51
|
-
declare function provideEuiInitializer(): EnvironmentProviders;
|
|
52
|
-
|
|
53
|
-
declare function
|
|
54
|
-
declare function
|
|
55
|
-
declare
|
|
56
|
-
|
|
57
|
-
declare const
|
|
58
|
-
declare const
|
|
59
|
-
declare const
|
|
60
|
-
declare const
|
|
61
|
-
declare const
|
|
62
|
-
declare const
|
|
63
|
-
declare const
|
|
64
|
-
declare
|
|
65
|
-
declare
|
|
66
|
-
declare function
|
|
67
|
-
declare function
|
|
68
|
-
declare function
|
|
69
|
-
declare function
|
|
70
|
-
declare function
|
|
71
|
-
declare function
|
|
72
|
-
declare
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
declare const errorCodes: {
|
|
76
|
-
ERR_GENERIC: string;
|
|
47
|
+
export declare function provideEuiInitializer(): EnvironmentProviders;
|
|
48
|
+
export declare function getCoreProviders(): Provider[];
|
|
49
|
+
export declare function getDependencyProviders(): Provider[];
|
|
50
|
+
export declare function getCoreChildProviders(moduleName: string): Provider[];
|
|
51
|
+
export declare const EUI_CONFIG_TOKEN: InjectionToken<EuiConfig>;
|
|
52
|
+
export declare const MODULE_NAME_TOKEN: InjectionToken<string>;
|
|
53
|
+
export declare const MODULE_CONFIG_TOKEN: InjectionToken<ModuleConfig<any>>;
|
|
54
|
+
export declare const CONFIG_TOKEN: InjectionToken<EuiAppConfig>;
|
|
55
|
+
export declare const GLOBAL_CONFIG_TOKEN: InjectionToken<GlobalConfig<any>>;
|
|
56
|
+
export declare const BASE_NAME_TOKEN: InjectionToken<string>;
|
|
57
|
+
export declare const ROOT_LOG_CONFIG_TOKEN: InjectionToken<LogConfig>;
|
|
58
|
+
export declare const SHOW_CONNECTION_STATUS_TOKEN: InjectionToken<boolean>;
|
|
59
|
+
export declare const HTTP_ERROR_HANDLER_CONFIG_TOKEN: InjectionToken<HttpErrorHandlerConfig>;
|
|
60
|
+
export declare function getGlobalConfig(appConfig: EuiAppConfig): GlobalConfig;
|
|
61
|
+
export declare function getShowConnectionStatus(globalConfig: GlobalConfig): ConnectionStatus;
|
|
62
|
+
export declare function getModuleConfig(appConfig: EuiAppConfig, moduleName: string): ModuleConfig;
|
|
63
|
+
export declare function getHttpErrorHandlingConfig(appConfig: EuiAppConfig): HttpErrorHandlerConfig;
|
|
64
|
+
export declare function getRootLogConfig(appConfig: EuiAppConfig): LogConfig;
|
|
65
|
+
export declare function prepareEuiAppConfigToken(euiConfig: EuiConfig): EuiAppConfig;
|
|
66
|
+
export declare function mergeAppHandlerConfigToAppConfig(euiAppConfig: EuiAppConfig, envAppHandler: EuiAppHandlersConfig | undefined): EuiAppConfig;
|
|
67
|
+
export declare function mergeAppJsonConfigToAppConfig(euiAppConfig: EuiAppConfig, envAppJsonConfig: EuiAppJsonConfig | undefined, merge: string[], isDeepMerge: boolean): EuiAppConfig;
|
|
68
|
+
export declare const errorCodes: {
|
|
69
|
+
ERR_GENERIC: string;
|
|
77
70
|
};
|
|
78
|
-
declare class ErrorSubClass {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
71
|
+
export declare class ErrorSubClass {
|
|
72
|
+
code?: string;
|
|
73
|
+
message: string;
|
|
74
|
+
stack: string;
|
|
75
|
+
name: string;
|
|
76
|
+
constructor(code?: string, msg?: string, args?: any);
|
|
84
77
|
}
|
|
85
|
-
declare class EuiError extends ErrorSubClass {
|
|
86
|
-
|
|
78
|
+
export declare class EuiError extends ErrorSubClass {
|
|
79
|
+
constructor(code?: string, msg?: string, args?: any);
|
|
87
80
|
}
|
|
88
|
-
|
|
89
|
-
declare const
|
|
90
|
-
declare const
|
|
91
|
-
declare const LOG_APPENDERS_TOKEN: InjectionToken<LogAppender<_eui_base.LogAppenderConfig>[]>;
|
|
81
|
+
export declare const BASE_LOGGER_NAME_TOKEN: InjectionToken<string>;
|
|
82
|
+
export declare const LOG_LEVEL_TOKEN: InjectionToken<LogLevel>;
|
|
83
|
+
export declare const LOG_APPENDERS_TOKEN: InjectionToken<LogAppender<import("@eui/base").LogAppenderConfig>[]>;
|
|
92
84
|
/**
|
|
93
85
|
* Log service, responsible for getting or creating loggers. It itself acts as a base logger
|
|
94
86
|
*/
|
|
95
|
-
declare class LogService extends Logger {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
87
|
+
export declare class LogService extends Logger {
|
|
88
|
+
protected name: string;
|
|
89
|
+
protected level: LogLevel;
|
|
90
|
+
protected appenders: LogAppender[];
|
|
91
|
+
/** the list of persistent loggers */
|
|
92
|
+
protected loggers: Record<string, Logger>;
|
|
93
|
+
constructor();
|
|
94
|
+
/**
|
|
95
|
+
* Gets a logger by name. If the logger does not exist, it is created
|
|
96
|
+
*
|
|
97
|
+
* @param loggerName logger name
|
|
98
|
+
* @param persist optional parameter. Set it to true if you want to reuse the logger. By default, it is set to false
|
|
99
|
+
* @returns the logger
|
|
100
|
+
*/
|
|
101
|
+
getLogger(loggerName: string, persist?: boolean): Logger;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LogService, never>;
|
|
103
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
104
|
+
}
|
|
105
|
+
export declare class LogServiceMock extends LoggerMock {
|
|
106
|
+
getLogger(): LoggerMock;
|
|
107
|
+
}
|
|
118
108
|
/**
|
|
119
109
|
* Log Module
|
|
120
110
|
*/
|
|
121
|
-
declare class LogModule {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
declare function
|
|
155
|
-
declare function ConsoleHttpErrorCallbackFn(error: HttpErrorResponse): void;
|
|
156
|
-
declare function LogHttpErrorCallbackFn(error: HttpErrorResponse, injector: Injector): void;
|
|
157
|
-
declare function GrowlHttpErrorCallbackFn(error: HttpErrorResponse, injector: Injector): void;
|
|
158
|
-
|
|
111
|
+
export declare class LogModule {
|
|
112
|
+
/** method called in your root module to provide the LogService */
|
|
113
|
+
static forRoot(config?: LogConfig): ModuleWithProviders<LogModule>;
|
|
114
|
+
/** method called in your other (non root, lazy loaded) modules to import a different instance of LogService */
|
|
115
|
+
static forChild(config?: LogConfig): ModuleWithProviders<LogModule>;
|
|
116
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LogModule, never>;
|
|
117
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LogModule, never, never, never>;
|
|
118
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LogModule>;
|
|
119
|
+
}
|
|
120
|
+
export declare class GlobalErrorHandler extends ErrorHandler {
|
|
121
|
+
protected logService: LogService;
|
|
122
|
+
handleError(error: any): void;
|
|
123
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalErrorHandler, never>;
|
|
124
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
125
|
+
}
|
|
126
|
+
export declare class HttpErrorHandlerInterceptor implements HttpInterceptor {
|
|
127
|
+
protected config: HttpErrorHandlerConfig;
|
|
128
|
+
protected injector: Injector;
|
|
129
|
+
protected router: Router;
|
|
130
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
131
|
+
/**
|
|
132
|
+
* Search in the configuration for the first matching route
|
|
133
|
+
*
|
|
134
|
+
* @param error http error response
|
|
135
|
+
* @returns HttpErrorRouteConfig or null
|
|
136
|
+
*/
|
|
137
|
+
protected getRouteConfig(error: HttpErrorResponse): HttpErrorRouteConfig | null;
|
|
138
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpErrorHandlerInterceptor, never>;
|
|
139
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
140
|
+
}
|
|
141
|
+
export declare function AlertHttpErrorCallbackFn(error: HttpErrorResponse): void;
|
|
142
|
+
export declare function ConsoleHttpErrorCallbackFn(error: HttpErrorResponse): void;
|
|
143
|
+
export declare function LogHttpErrorCallbackFn(error: HttpErrorResponse, injector: Injector): void;
|
|
144
|
+
export declare function GrowlHttpErrorCallbackFn(error: HttpErrorResponse, injector: Injector): void;
|
|
159
145
|
/**
|
|
160
146
|
* A function that takes an `Action` and a `State`, and returns a `State`.
|
|
161
147
|
* See `createReducer`.
|
|
162
148
|
*/
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
type ActionReducerMap<T, V extends Action = Action> = {
|
|
167
|
-
[p in keyof T]: ActionReducer<T[p], V>;
|
|
168
|
-
};
|
|
149
|
+
type ActionReducer<T, V extends Action = Action> = (state: T | undefined, action: V) => T;
|
|
150
|
+
type ActionReducerMap<T, V extends Action = Action> = { [p in keyof T]: ActionReducer<T[p], V>; };
|
|
169
151
|
interface Action<Type extends string = string> {
|
|
170
|
-
|
|
152
|
+
type: Type;
|
|
171
153
|
}
|
|
172
|
-
|
|
173
154
|
/**
|
|
174
155
|
* @deprecated it will be removed in the next major version
|
|
175
156
|
*/
|
|
176
|
-
declare enum CoreAppActionTypes {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
157
|
+
export declare enum CoreAppActionTypes {
|
|
158
|
+
INIT_STORE = "[App] Init store",
|
|
159
|
+
UPDATE_APP_VERSION = "[App] Update version",
|
|
160
|
+
UPDATE_APP_CONNECTION = "[App] Update connection",
|
|
161
|
+
ADD_APP_LOADED_CONFIG_MODULES = "[App] Update app loaded config modules",
|
|
162
|
+
UPDATE_APP_STATUS = "[App] Update status",
|
|
163
|
+
UPDATE_CURRENT_MODULE = "[App] Update current module",
|
|
164
|
+
ACTIVATED_ROUTE = "[App] Activated route",
|
|
165
|
+
ADD_API_QUEUE_ITEM = "[App] Add API queue item",
|
|
166
|
+
REMOVE_API_QUEUE_ITEM = "[App] Remove API queue item",
|
|
167
|
+
EMPTY_API_QUEUE = "[App] empty API queue"
|
|
187
168
|
}
|
|
188
169
|
/**
|
|
189
170
|
* @deprecated it will be removed in the next major version
|
|
190
171
|
*/
|
|
191
|
-
declare class InitStoreAction implements Action {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
172
|
+
export declare class InitStoreAction implements Action {
|
|
173
|
+
payload: {
|
|
174
|
+
version?: string;
|
|
175
|
+
};
|
|
176
|
+
type: CoreAppActionTypes;
|
|
177
|
+
constructor(payload: {
|
|
178
|
+
version?: string;
|
|
179
|
+
});
|
|
199
180
|
}
|
|
200
181
|
/**
|
|
201
182
|
* @deprecated it will be removed in the next major version
|
|
202
183
|
*/
|
|
203
|
-
declare class UpdateAppVersionAction implements Action {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
184
|
+
export declare class UpdateAppVersionAction implements Action {
|
|
185
|
+
payload: string;
|
|
186
|
+
type: CoreAppActionTypes;
|
|
187
|
+
constructor(payload: string);
|
|
207
188
|
}
|
|
208
189
|
/**
|
|
209
190
|
* @deprecated it will be removed in the next major version
|
|
210
191
|
*/
|
|
211
|
-
declare class UpdateAppConnectionAction implements Action {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
192
|
+
export declare class UpdateAppConnectionAction implements Action {
|
|
193
|
+
payload: boolean;
|
|
194
|
+
type: CoreAppActionTypes;
|
|
195
|
+
constructor(payload: boolean);
|
|
215
196
|
}
|
|
216
197
|
/**
|
|
217
198
|
* @deprecated it will be removed in the next major version
|
|
218
199
|
*/
|
|
219
|
-
declare class AddAppLoadedConfigModulesAction implements Action {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
200
|
+
export declare class AddAppLoadedConfigModulesAction implements Action {
|
|
201
|
+
payload: {
|
|
202
|
+
moduleName: string;
|
|
203
|
+
moduleConfig: ModuleConfig;
|
|
204
|
+
};
|
|
205
|
+
type: CoreAppActionTypes;
|
|
206
|
+
constructor(payload: {
|
|
207
|
+
moduleName: string;
|
|
208
|
+
moduleConfig: ModuleConfig;
|
|
209
|
+
});
|
|
229
210
|
}
|
|
230
211
|
/**
|
|
231
212
|
* @deprecated it will be removed in the next major version
|
|
232
213
|
*/
|
|
233
|
-
declare class UpdateAppStatusAction implements Action {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
214
|
+
export declare class UpdateAppStatusAction implements Action {
|
|
215
|
+
payload: string;
|
|
216
|
+
type: CoreAppActionTypes;
|
|
217
|
+
constructor(payload: string);
|
|
237
218
|
}
|
|
238
219
|
/**
|
|
239
220
|
* @deprecated it will be removed in the next major version
|
|
240
221
|
*/
|
|
241
|
-
declare class UpdateCurrentModuleAction implements Action {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
222
|
+
export declare class UpdateCurrentModuleAction implements Action {
|
|
223
|
+
payload: string;
|
|
224
|
+
type: CoreAppActionTypes;
|
|
225
|
+
constructor(payload: string);
|
|
245
226
|
}
|
|
246
227
|
/**
|
|
247
228
|
* @deprecated it will be removed in the next major version
|
|
248
229
|
*/
|
|
249
|
-
declare class ActivatedRouteAction implements Action {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
230
|
+
export declare class ActivatedRouteAction implements Action {
|
|
231
|
+
payload: ActivatedRoute;
|
|
232
|
+
type: CoreAppActionTypes;
|
|
233
|
+
constructor(payload: ActivatedRoute);
|
|
253
234
|
}
|
|
254
235
|
/**
|
|
255
236
|
* @deprecated it will be removed in the next major version
|
|
256
237
|
*/
|
|
257
|
-
declare class AddApiQueueItemAction implements Action {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
238
|
+
export declare class AddApiQueueItemAction implements Action {
|
|
239
|
+
payload: {
|
|
240
|
+
id: string;
|
|
241
|
+
item: ApiQueueItem;
|
|
242
|
+
};
|
|
243
|
+
type: CoreAppActionTypes;
|
|
244
|
+
constructor(payload: {
|
|
245
|
+
id: string;
|
|
246
|
+
item: ApiQueueItem;
|
|
247
|
+
});
|
|
267
248
|
}
|
|
268
249
|
/**
|
|
269
250
|
* @deprecated it will be removed in the next major version
|
|
270
251
|
*/
|
|
271
|
-
declare class RemoveApiQueueItemAction implements Action {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
252
|
+
export declare class RemoveApiQueueItemAction implements Action {
|
|
253
|
+
payload: string;
|
|
254
|
+
type: CoreAppActionTypes;
|
|
255
|
+
constructor(payload: string);
|
|
275
256
|
}
|
|
276
257
|
/**
|
|
277
258
|
* @deprecated it will be removed in the next major version
|
|
278
259
|
*/
|
|
279
|
-
declare class EmptyApiQueueAction implements Action {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
260
|
+
export declare class EmptyApiQueueAction implements Action {
|
|
261
|
+
payload: any;
|
|
262
|
+
type: CoreAppActionTypes;
|
|
263
|
+
constructor(payload: any);
|
|
283
264
|
}
|
|
284
265
|
/**
|
|
285
266
|
* @deprecated it will be removed in the next major version
|
|
286
267
|
*/
|
|
287
|
-
type CoreAppActions = InitStoreAction | UpdateAppVersionAction | UpdateAppConnectionAction | AddAppLoadedConfigModulesAction | UpdateAppStatusAction | UpdateCurrentModuleAction | ActivatedRouteAction | AddApiQueueItemAction | RemoveApiQueueItemAction;
|
|
288
|
-
|
|
268
|
+
export type CoreAppActions = InitStoreAction | UpdateAppVersionAction | UpdateAppConnectionAction | AddAppLoadedConfigModulesAction | UpdateAppStatusAction | UpdateCurrentModuleAction | ActivatedRouteAction | AddApiQueueItemAction | RemoveApiQueueItemAction;
|
|
289
269
|
/**
|
|
290
270
|
* @deprecated it will be removed in the next major version
|
|
291
271
|
*/
|
|
292
|
-
declare enum CoreI18nActionTypes {
|
|
293
|
-
|
|
272
|
+
export declare enum CoreI18nActionTypes {
|
|
273
|
+
UPDATE_I18N_STATE = "[I18n] Update I18n State"
|
|
294
274
|
}
|
|
295
275
|
/**
|
|
296
276
|
* @deprecated it will be removed in the next major version
|
|
297
277
|
*/
|
|
298
|
-
declare class UpdateI18nStateAction implements Action {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
278
|
+
export declare class UpdateI18nStateAction implements Action {
|
|
279
|
+
payload: I18nState;
|
|
280
|
+
type: CoreI18nActionTypes;
|
|
281
|
+
constructor(payload: I18nState);
|
|
302
282
|
}
|
|
303
283
|
/**
|
|
304
284
|
* @deprecated it will be removed in the next major version
|
|
305
285
|
*/
|
|
306
|
-
type CoreI18nActions = UpdateI18nStateAction;
|
|
307
|
-
|
|
286
|
+
export type CoreI18nActions = UpdateI18nStateAction;
|
|
308
287
|
/**
|
|
309
288
|
* @deprecated it will be removed in the next major version
|
|
310
289
|
*/
|
|
311
|
-
declare enum CoreUserActionTypes {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
290
|
+
export declare enum CoreUserActionTypes {
|
|
291
|
+
UPDATE_USER_STATE = "[User] Update User state",
|
|
292
|
+
UPDATE_USER_DETAILS = "[User] Update details",
|
|
293
|
+
UPDATE_USER_PREFERENCES = "[User] Update preferences",
|
|
294
|
+
UPDATE_USER_RIGHTS = "[User] Update rights",
|
|
295
|
+
UPDATE_USER_DASHBOARD = "[User] Update dashboard"
|
|
317
296
|
}
|
|
318
297
|
/**
|
|
319
298
|
* @deprecated it will be removed in the next major version
|
|
320
299
|
*/
|
|
321
|
-
declare class UpdateUserStateAction implements Action {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
300
|
+
export declare class UpdateUserStateAction implements Action {
|
|
301
|
+
payload: UserState;
|
|
302
|
+
type: CoreUserActionTypes;
|
|
303
|
+
constructor(payload: UserState);
|
|
325
304
|
}
|
|
326
305
|
/**
|
|
327
306
|
* @deprecated it will be removed in the next major version
|
|
328
307
|
*/
|
|
329
|
-
declare class UpdateUserDetailsAction implements Action {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
308
|
+
export declare class UpdateUserDetailsAction implements Action {
|
|
309
|
+
payload: UserDetails;
|
|
310
|
+
type: CoreUserActionTypes;
|
|
311
|
+
constructor(payload: UserDetails);
|
|
333
312
|
}
|
|
334
313
|
/**
|
|
335
314
|
* @deprecated it will be removed in the next major version
|
|
336
315
|
*/
|
|
337
|
-
declare class UpdateUserPreferencesAction implements Action {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
316
|
+
export declare class UpdateUserPreferencesAction implements Action {
|
|
317
|
+
payload: UserPreferences;
|
|
318
|
+
type: CoreUserActionTypes;
|
|
319
|
+
constructor(payload: UserPreferences);
|
|
341
320
|
}
|
|
342
321
|
/**
|
|
343
322
|
* @deprecated it will be removed in the next major version
|
|
344
323
|
*/
|
|
345
|
-
declare class UpdateUserRightsAction implements Action {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
324
|
+
export declare class UpdateUserRightsAction implements Action {
|
|
325
|
+
payload: EuiUserRight[];
|
|
326
|
+
type: CoreUserActionTypes;
|
|
327
|
+
constructor(payload: EuiUserRight[]);
|
|
349
328
|
}
|
|
350
329
|
/**
|
|
351
330
|
* @deprecated it will be removed in the next major version
|
|
352
331
|
*/
|
|
353
|
-
declare class UpdateUserDashboardAction implements Action {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
332
|
+
export declare class UpdateUserDashboardAction implements Action {
|
|
333
|
+
payload: unknown;
|
|
334
|
+
type: CoreUserActionTypes;
|
|
335
|
+
constructor(payload: unknown);
|
|
357
336
|
}
|
|
358
337
|
/**
|
|
359
338
|
* @deprecated it will be removed in the next major version
|
|
360
339
|
*/
|
|
361
|
-
type CoreUserActions = UpdateUserDetailsAction | UpdateUserPreferencesAction | UpdateUserRightsAction | UpdateUserDashboardAction;
|
|
362
|
-
|
|
340
|
+
export type CoreUserActions = UpdateUserDetailsAction | UpdateUserPreferencesAction | UpdateUserRightsAction | UpdateUserDashboardAction;
|
|
363
341
|
/**
|
|
364
342
|
* @deprecated it will be removed in the next major version
|
|
365
343
|
*/
|
|
366
|
-
declare enum CoreNotificationsActionTypes {
|
|
367
|
-
|
|
344
|
+
export declare enum CoreNotificationsActionTypes {
|
|
345
|
+
UPDATE_NOTIFICATIONS_LIST = "[Notif] Update list"
|
|
368
346
|
}
|
|
369
347
|
/**
|
|
370
348
|
* @deprecated it will be removed in the next major version
|
|
371
349
|
*/
|
|
372
|
-
declare class UpdateNotificationsListAction implements Action {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
350
|
+
export declare class UpdateNotificationsListAction implements Action {
|
|
351
|
+
payload: any[];
|
|
352
|
+
type: CoreNotificationsActionTypes;
|
|
353
|
+
constructor(payload: any[]);
|
|
376
354
|
}
|
|
377
355
|
/**
|
|
378
356
|
* @deprecated it will be removed in the next major version
|
|
379
357
|
*/
|
|
380
|
-
type CoreNotificationsActions = UpdateNotificationsListAction;
|
|
381
|
-
|
|
358
|
+
export type CoreNotificationsActions = UpdateNotificationsListAction;
|
|
382
359
|
/**
|
|
383
360
|
* @deprecated it will be removed in the next major version
|
|
384
361
|
*/
|
|
385
|
-
declare enum CoreLocaleActionTypes {
|
|
386
|
-
|
|
362
|
+
export declare enum CoreLocaleActionTypes {
|
|
363
|
+
UPDATE_LOCALE_STATE = "[Locale] Update Locale State"
|
|
387
364
|
}
|
|
388
365
|
/**
|
|
389
366
|
* @deprecated it will be removed in the next major version
|
|
390
367
|
*/
|
|
391
|
-
declare class UpdateLocaleStateAction implements Action {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
368
|
+
export declare class UpdateLocaleStateAction implements Action {
|
|
369
|
+
payload: LocaleState;
|
|
370
|
+
type: CoreLocaleActionTypes;
|
|
371
|
+
constructor(payload: LocaleState);
|
|
395
372
|
}
|
|
396
373
|
/**
|
|
397
374
|
* @deprecated it will be removed in the next major version
|
|
398
375
|
*/
|
|
399
|
-
type CoreLocaleActions = UpdateLocaleStateAction;
|
|
400
|
-
|
|
376
|
+
export type CoreLocaleActions = UpdateLocaleStateAction;
|
|
401
377
|
/**
|
|
402
378
|
* @deprecated it will be removed in the next major version
|
|
403
379
|
*/
|
|
404
|
-
declare const coreAppReducers: (state: AppState, action: Action) => AppState;
|
|
405
|
-
|
|
380
|
+
export declare const coreAppReducers: (state: AppState | undefined, action: Action) => AppState;
|
|
406
381
|
/**
|
|
407
382
|
* @deprecated it will be removed in the next major version
|
|
408
383
|
*/
|
|
409
384
|
declare const coreReducers: ActionReducerMap<CoreState, any>;
|
|
410
|
-
|
|
411
385
|
/**
|
|
412
386
|
* @deprecated it will be removed in the next major version
|
|
413
387
|
*/
|
|
414
|
-
declare const corI18nReducers: (state: I18nState, action: Action) => I18nState;
|
|
415
|
-
|
|
388
|
+
export declare const corI18nReducers: (state: I18nState | undefined, action: Action) => I18nState;
|
|
416
389
|
/**
|
|
417
390
|
* @deprecated it will be removed in the next major version
|
|
418
391
|
*/
|
|
419
|
-
declare const coreUserReducers: (state: UserState, action: Action) => UserState;
|
|
420
|
-
|
|
392
|
+
export declare const coreUserReducers: (state: UserState | undefined, action: Action) => UserState;
|
|
421
393
|
/**
|
|
422
394
|
* @deprecated it will be removed in the next major version
|
|
423
395
|
*/
|
|
424
|
-
declare const coreNotificationsReducers: (state: NotificationsState, action: Action) => NotificationsState;
|
|
425
|
-
|
|
396
|
+
export declare const coreNotificationsReducers: (state: NotificationsState | undefined, action: Action) => NotificationsState;
|
|
426
397
|
/**
|
|
427
398
|
* Utility meta-reducer to load the state from the local storage
|
|
428
399
|
* @param platformId the platformId based on PLATFORM_ID token of Angular
|
|
429
400
|
* @deprecated it will be removed in the next major version
|
|
430
401
|
*/
|
|
431
|
-
declare function localStorageSync<S extends CoreState>(platformId: unknown): ((reducer: ActionReducer<S>) => (state: S, action: Action) => S);
|
|
402
|
+
export declare function localStorageSync<S extends CoreState>(platformId: unknown): ((reducer: ActionReducer<S>) => (state: S, action: Action) => S);
|
|
432
403
|
/**
|
|
433
404
|
* Utility meta-reducer to load the state from the local storage
|
|
434
405
|
* @param reducer the action reducer
|
|
435
406
|
*/
|
|
436
|
-
declare function localStorageSync<S extends CoreState>(reducer: ActionReducer<S>): (state: S, action: Action) => S;
|
|
407
|
+
export declare function localStorageSync<S extends CoreState>(reducer: ActionReducer<S>): (state: S, action: Action) => S;
|
|
437
408
|
/**
|
|
438
409
|
* Utility meta-reducer to load the state from the session storage
|
|
439
410
|
* @param platformId the platformId based on PLATFORM_ID token of Angular
|
|
440
411
|
* @deprecated it will be removed in the next major version
|
|
441
412
|
*/
|
|
442
|
-
declare function sessionStorageSync<S extends CoreState>(platformId: unknown): ((reducer: ActionReducer<S>) => (state: S, action: Action) => S);
|
|
413
|
+
export declare function sessionStorageSync<S extends CoreState>(platformId: unknown): ((reducer: ActionReducer<S>) => (state: S, action: Action) => S);
|
|
443
414
|
/**
|
|
444
415
|
* Utility meta-reducer to load the state from the session storage
|
|
445
416
|
* @param reducer the action reducer
|
|
446
417
|
* @deprecated it will be removed in the next major version
|
|
447
418
|
*/
|
|
448
|
-
declare function sessionStorageSync<S extends CoreState>(reducer: ActionReducer<S>): (state: S, action: Action) => S;
|
|
419
|
+
export declare function sessionStorageSync<S extends CoreState>(reducer: ActionReducer<S>): (state: S, action: Action) => S;
|
|
449
420
|
/**
|
|
450
421
|
*
|
|
451
422
|
* @param storage Type of storage to load the state from
|
|
452
423
|
* @deprecated it will be removed in the next major version
|
|
453
424
|
*/
|
|
454
|
-
declare const loadState: <S extends CoreState>(storage?: Storage | null) => S;
|
|
455
|
-
|
|
425
|
+
export declare const loadState: <S extends CoreState>(storage?: Storage | null) => S | undefined;
|
|
456
426
|
/**
|
|
457
427
|
* @deprecated it will be removed in the next major version
|
|
458
428
|
*/
|
|
459
|
-
declare const coreLocaleReducers: (state: LocaleState, action: Action) => LocaleState;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
select(): Observable<object>;
|
|
529
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StoreServiceMock, never>;
|
|
530
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<StoreServiceMock>;
|
|
531
|
-
}
|
|
532
|
-
|
|
429
|
+
export declare const coreLocaleReducers: (state: LocaleState | undefined, action: Action) => LocaleState;
|
|
430
|
+
export declare enum BrowserStorageType {
|
|
431
|
+
local = 0,
|
|
432
|
+
session = 1
|
|
433
|
+
}
|
|
434
|
+
export type Handler<T> = (state: T[keyof T]) => Partial<T[keyof T]>;
|
|
435
|
+
export declare class StoreService<T = any> {
|
|
436
|
+
protected logService: LogService | null;
|
|
437
|
+
private platformId;
|
|
438
|
+
/**
|
|
439
|
+
* autoSave handlers to call before saving in local Storage
|
|
440
|
+
*/
|
|
441
|
+
protected _autoSaveHandlers: Record<string, Handler<T>>;
|
|
442
|
+
/** storage instance e.g. localStorage, sessionStorage */
|
|
443
|
+
private _storage;
|
|
444
|
+
private state;
|
|
445
|
+
private isHandlingAutoSave;
|
|
446
|
+
constructor();
|
|
447
|
+
init(version?: string, storageType?: BrowserStorageType): void;
|
|
448
|
+
/**
|
|
449
|
+
* Add an autoSave handler for a specific state slice
|
|
450
|
+
* @param stateSlice
|
|
451
|
+
* @param handler
|
|
452
|
+
* @deprecated it will be removed in the next major version
|
|
453
|
+
*/
|
|
454
|
+
addAutoSaveHandler(stateSlice: string, handler: Handler<T>): void;
|
|
455
|
+
handleAutoSave(): void;
|
|
456
|
+
/**
|
|
457
|
+
* This method is used to update the state of the service with a new state.
|
|
458
|
+
*
|
|
459
|
+
* @param state
|
|
460
|
+
*/
|
|
461
|
+
updateState(state: DeepPartial<T>): void;
|
|
462
|
+
/**
|
|
463
|
+
* @deprecated it will be removed in next version. Use updateState(partialState: DeepPartial<T>) instead
|
|
464
|
+
* @param slice
|
|
465
|
+
* @param reducer
|
|
466
|
+
*/
|
|
467
|
+
updateState(slice: DeepPartial<T>, reducer: (state: T, action: DeepPartial<T>) => T): void;
|
|
468
|
+
select(key?: any): Observable<T[any]>;
|
|
469
|
+
/**
|
|
470
|
+
* filters and save the state with the Browser storage
|
|
471
|
+
* @param state type of CoreState
|
|
472
|
+
*/
|
|
473
|
+
protected saveState(state: CoreState): void;
|
|
474
|
+
/**
|
|
475
|
+
* deep merge two objects
|
|
476
|
+
* @param target the object that will be merged into
|
|
477
|
+
* @param source the object that will be merged from
|
|
478
|
+
*/
|
|
479
|
+
private deepMerge;
|
|
480
|
+
/**
|
|
481
|
+
* checks if the given item is an object
|
|
482
|
+
* @param item the item that will be checked
|
|
483
|
+
*/
|
|
484
|
+
private isObject;
|
|
485
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StoreService<any>, never>;
|
|
486
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
487
|
+
}
|
|
488
|
+
export declare const PLATFORM_BROWSER_ID = "browser";
|
|
489
|
+
export declare class StoreServiceMock extends StoreService {
|
|
490
|
+
constructor();
|
|
491
|
+
init(): void;
|
|
492
|
+
addAutoSaveHandler(): void;
|
|
493
|
+
handleAutoSave(): void;
|
|
494
|
+
select(): Observable<object>;
|
|
495
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StoreServiceMock, never>;
|
|
496
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
497
|
+
}
|
|
533
498
|
/**
|
|
534
499
|
* Service class for managing and processing a queue of API requests.
|
|
535
500
|
*
|
|
@@ -564,481 +529,473 @@ declare class StoreServiceMock extends StoreService {
|
|
|
564
529
|
* console.log('Processed all items in the queue with continuation on errors:', results);
|
|
565
530
|
* });
|
|
566
531
|
*/
|
|
567
|
-
declare class ApiQueueService {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
}
|
|
815
|
-
|
|
532
|
+
export declare class ApiQueueService {
|
|
533
|
+
protected store: StoreService<any>;
|
|
534
|
+
protected http: HttpClient;
|
|
535
|
+
protected logService: LogService | null;
|
|
536
|
+
private readonly logger;
|
|
537
|
+
private readonly getAppState;
|
|
538
|
+
private getApiQueue;
|
|
539
|
+
private getApiQueueItem;
|
|
540
|
+
constructor();
|
|
541
|
+
/**
|
|
542
|
+
* Adds an item to the queue by dispatching an action to the store.
|
|
543
|
+
* This function is specifically designed to enqueue API call requests represented by `ApiQueueItem` objects.
|
|
544
|
+
* Each item is identified by a unique `id`, which is used to manage the queue.
|
|
545
|
+
*
|
|
546
|
+
* @param {string} id - The unique identifier for the queue item. It's crucial to ensure that this ID is unique within the queue.
|
|
547
|
+
* If an item with the same ID already exists, the new item will overwrite the existing one.
|
|
548
|
+
* WARNING: Duplicate IDs will lead to overwriting of queue items.
|
|
549
|
+
*
|
|
550
|
+
* @param {ApiQueueItem} item - The item to be enqueued. This should be an object of type `ApiQueueItem`.
|
|
551
|
+
* The `method` property of the item must be one of the allowed methods ('post', 'put', 'get').
|
|
552
|
+
* If an unsupported method is provided, the function will throw an error.
|
|
553
|
+
*
|
|
554
|
+
* @throws {Error} Throws an error if the `method` property of the `item` is not one of the allowed methods.
|
|
555
|
+
* The error message is: `[ApiQueue] method "${item.method}" is not allowed`.
|
|
556
|
+
*
|
|
557
|
+
* @example
|
|
558
|
+
* // Example of adding an item to the API queue
|
|
559
|
+
* addQueueItem('12345', { method: 'post', url: '/api/data', payload: {...} });
|
|
560
|
+
*
|
|
561
|
+
* @returns {void} This function does not return a value. It adds the item to the queue via a dispatch action.
|
|
562
|
+
*/
|
|
563
|
+
addQueueItem(id: string, item: ApiQueueItem): void;
|
|
564
|
+
/**
|
|
565
|
+
* Retrieves the current state of the API queue and converts it into an array of Observables.
|
|
566
|
+
*
|
|
567
|
+
* This method subscribes to the store to access the API queue. It then maps the queue object,
|
|
568
|
+
* which is an associative array, into a linear array of ApiQueueItem instances. If the queue is empty,
|
|
569
|
+
* a warning is logged. This method is useful for tracking the state and contents of the API queue
|
|
570
|
+
* at a given moment.
|
|
571
|
+
*
|
|
572
|
+
* Note: This method takes a snapshot of the queue at the time of subscription. It does not provide
|
|
573
|
+
* a continuous stream of queue updates. To get real-time updates, consider subscribing directly
|
|
574
|
+
* to the store's observable.
|
|
575
|
+
*
|
|
576
|
+
* @returns {Observable<ApiQueueItem[]>} An Observable that emits an array of ApiQueueItem.
|
|
577
|
+
* The array represents all items currently in the queue. If the queue is empty, it emits an empty array.
|
|
578
|
+
*
|
|
579
|
+
* @example
|
|
580
|
+
* // Example usage
|
|
581
|
+
* this.getQueue().subscribe(queueItems => {
|
|
582
|
+
* console.log('Current queue items:', queueItems);
|
|
583
|
+
* });
|
|
584
|
+
*/
|
|
585
|
+
getQueue(): Observable<ApiQueueItem[]>;
|
|
586
|
+
/**
|
|
587
|
+
* Retrieves a specific item from the API queue by its ID.
|
|
588
|
+
*
|
|
589
|
+
* This method subscribes to the store and selects a single item from the API queue based on the provided ID.
|
|
590
|
+
* It employs a pipeline to fetch the item: the `getApiQueueItem` selector is used to retrieve the item,
|
|
591
|
+
* and a `map` operator processes the result. If the item with the specified ID does not exist in the queue,
|
|
592
|
+
* a warning is logged, and `null` is returned.
|
|
593
|
+
*
|
|
594
|
+
* This method is ideal for accessing a specific queue item when its ID is known, allowing for targeted
|
|
595
|
+
* operations or checks on that particular item.
|
|
596
|
+
*
|
|
597
|
+
* @param {string} id - The unique identifier of the item within the queue.
|
|
598
|
+
* @returns {Observable<ApiQueueItem | null>} An Observable emitting the requested ApiQueueItem.
|
|
599
|
+
* If no item with the given ID exists in the queue, the Observable emits `null`.
|
|
600
|
+
*
|
|
601
|
+
* @example
|
|
602
|
+
* // Example usage
|
|
603
|
+
* this.getQueueItem('item123').subscribe(item => {
|
|
604
|
+
* if (item) {
|
|
605
|
+
* console.log('Found item:', item);
|
|
606
|
+
* } else {
|
|
607
|
+
* console.log('Item not found in the queue');
|
|
608
|
+
* }
|
|
609
|
+
* });
|
|
610
|
+
*/
|
|
611
|
+
getQueueItem(id: string): Observable<ApiQueueItem | null>;
|
|
612
|
+
/**
|
|
613
|
+
* Removes a specific item from the API queue using its ID.
|
|
614
|
+
*
|
|
615
|
+
* This method dispatches an action to remove an item from the queue, identified by the provided ID.
|
|
616
|
+
* It is essential for managing the queue by eliminating items that are no longer needed or have been processed.
|
|
617
|
+
* The function does not return any value, as it primarily triggers an action within the store.
|
|
618
|
+
*
|
|
619
|
+
* Note: This method assumes the existence of the item in the queue. It does not perform a check
|
|
620
|
+
* to confirm the presence of the item before attempting to remove it. Therefore, it's recommended
|
|
621
|
+
* to verify the item's existence in the queue if uncertainty exists.
|
|
622
|
+
*
|
|
623
|
+
* @param {string} id - The unique identifier of the item to be removed from the queue.
|
|
624
|
+
*
|
|
625
|
+
* @example
|
|
626
|
+
* // Example usage
|
|
627
|
+
* this.removeQueueItem('item123');
|
|
628
|
+
* // The item with ID 'item123' will be dispatched for removal from the queue.
|
|
629
|
+
*/
|
|
630
|
+
removeQueueItem(id: string): void;
|
|
631
|
+
/**
|
|
632
|
+
* Clears all items from the API queue.
|
|
633
|
+
*
|
|
634
|
+
* This method dispatches an action to empty the entire API queue, effectively removing all items that are currently queued.
|
|
635
|
+
* It is useful for scenarios where a complete reset of the queue is required, such as during initialization or after processing
|
|
636
|
+
* a batch of items. The function does not return any value, as its primary purpose is to trigger a state change in the store.
|
|
637
|
+
*
|
|
638
|
+
* Note: Use this method with caution as it will irreversibly clear all items in the queue. Ensure that this action does not
|
|
639
|
+
* disrupt any ongoing processes that rely on the queue's contents.
|
|
640
|
+
*
|
|
641
|
+
* @example
|
|
642
|
+
* // Example usage
|
|
643
|
+
* this.removeAllQueueItem();
|
|
644
|
+
* // This will dispatch an action to empty the entire API queue.
|
|
645
|
+
*/
|
|
646
|
+
removeAllQueueItem(): void;
|
|
647
|
+
/**
|
|
648
|
+
* Processes an item from the API queue identified by its ID.
|
|
649
|
+
*
|
|
650
|
+
* Retrieves the specified item from the queue and applies processing logic as defined in `buildHttpRequest`.
|
|
651
|
+
* If the item is not found, logs a warning and returns an Observable emitting `null`.
|
|
652
|
+
*
|
|
653
|
+
* @param {string} id - The unique identifier of the item within the queue to be processed.
|
|
654
|
+
* @returns {Observable<any>} An Observable that emits the result of processing the queue item.
|
|
655
|
+
* If the item does not exist, the Observable emits `null`.
|
|
656
|
+
*
|
|
657
|
+
* @example
|
|
658
|
+
* // Example usage
|
|
659
|
+
* this.processQueueItem('item123').subscribe(result => {
|
|
660
|
+
* if (result) {
|
|
661
|
+
* console.log('Processing result:', result);
|
|
662
|
+
* } else {
|
|
663
|
+
* console.log('Item not found in the queue');
|
|
664
|
+
* }
|
|
665
|
+
* });
|
|
666
|
+
*/
|
|
667
|
+
processQueueItem<T>(id: string): Observable<T | null>;
|
|
668
|
+
/**
|
|
669
|
+
* Processes all items in the API queue and collects their responses.
|
|
670
|
+
*
|
|
671
|
+
* Iterates over each item in the queue and processes them using `buildHttpRequest`. If a request fails,
|
|
672
|
+
* the method can either continue processing the remaining items or stop, based on the `continueOnError` parameter.
|
|
673
|
+
* It returns an Observable that emits an array containing the responses or errors from all the processed items.
|
|
674
|
+
*
|
|
675
|
+
* The function currently returns `Observable<any[]>` indicating an array of any type. Future improvements
|
|
676
|
+
* should aim to specify a more accurate return type or utilize generics for increased type safety.
|
|
677
|
+
*
|
|
678
|
+
* @param {boolean} [continueOnError=true] - Determines whether to continue with the next item in the queue
|
|
679
|
+
* after a request failure. Defaults to `true`.
|
|
680
|
+
* @returns {Observable<any[]>} An Observable emitting an array of either responses or errors from the processed
|
|
681
|
+
* queue items.
|
|
682
|
+
*
|
|
683
|
+
* @example
|
|
684
|
+
* this.processAllQueueItems().subscribe(results => {
|
|
685
|
+
* // Handle the array of responses or errors
|
|
686
|
+
* });
|
|
687
|
+
*/
|
|
688
|
+
processAllQueueItems<T>(continueOnError?: boolean): Observable<T[]>;
|
|
689
|
+
/**
|
|
690
|
+
* Processes all items in the queue sequentially, based on their timestamp ordering.
|
|
691
|
+
*
|
|
692
|
+
* This method first orders the items in the API queue by their timestamp, either in ascending or descending
|
|
693
|
+
* order as specified by the `ascending` parameter. It then processes each item using `buildHttpRequest`, ensuring
|
|
694
|
+
* that each request is completed before the next begins. This sequential processing is crucial when the order of
|
|
695
|
+
* execution matters for HTTP requests in the queue. The method returns an Observable that emits the responses
|
|
696
|
+
* following the same order as the queue items were processed.
|
|
697
|
+
*
|
|
698
|
+
* The function currently returns `Observable<any>`, indicating a broad type. Future improvements should focus on
|
|
699
|
+
* specifying a more accurate return type or utilizing generics for increased type safety.
|
|
700
|
+
*
|
|
701
|
+
* @param {boolean} [ascending=true] - Determines whether the queue items are processed in ascending order of their
|
|
702
|
+
* timestamp. Defaults to `true`.
|
|
703
|
+
* @returns {Observable<any>} An Observable emitting the responses of the HTTP requests in the order they were processed.
|
|
704
|
+
*
|
|
705
|
+
* @example
|
|
706
|
+
* this.processAllQueueItemsSequential().subscribe(response => {
|
|
707
|
+
* // Handle each response in the order of queue processing
|
|
708
|
+
* });
|
|
709
|
+
*/
|
|
710
|
+
processAllQueueItemsSequential<T>(ascending?: boolean): Observable<T>;
|
|
711
|
+
/**
|
|
712
|
+
* Compares two queue items based on their timestamp and determines their order.
|
|
713
|
+
*
|
|
714
|
+
* This protected method is used to sort queue items. It takes two queue items as input, each represented
|
|
715
|
+
* as a tuple containing an item ID and the `ApiQueueItem` object. The method compares these items based on
|
|
716
|
+
* the `timestamp` property of the `ApiQueueItem` objects. It returns a number indicating the order in which
|
|
717
|
+
* these items should be sorted.
|
|
718
|
+
*
|
|
719
|
+
* A positive return value indicates that the first item should come after the second, a negative value
|
|
720
|
+
* indicates the opposite, and zero indicates that they are equal in terms of timestamp.
|
|
721
|
+
*
|
|
722
|
+
* @param {[string, ApiQueueItem]} a - The first queue item tuple for comparison.
|
|
723
|
+
* @param {[string, ApiQueueItem]} b - The second queue item tuple for comparison.
|
|
724
|
+
* @returns {number} A number indicating the order of the items: negative if `a` is earlier than `b`,
|
|
725
|
+
* positive if `a` is later than `b`, and zero if they are equal.
|
|
726
|
+
* @beta
|
|
727
|
+
*/
|
|
728
|
+
protected sortOnTimestamp(a: [string, ApiQueueItem], b: [string, ApiQueueItem]): number;
|
|
729
|
+
/**
|
|
730
|
+
* Constructs and executes an HTTP request based on the provided queue item details.
|
|
731
|
+
*
|
|
732
|
+
* This private method takes an ID and an `ApiQueueItem` object to build and execute an HTTP request.
|
|
733
|
+
* It determines the HTTP method (like GET, POST, etc.) from the `method` property of the `ApiQueueItem`,
|
|
734
|
+
* and uses the `uri` and `payload` properties for the request's URL and body, respectively. After the
|
|
735
|
+
* request is executed, the corresponding queue item is removed from the queue.
|
|
736
|
+
*
|
|
737
|
+
* The method is generic, allowing the caller to specify the expected response type `T`. By default,
|
|
738
|
+
* it uses `any` type, but specifying a more concrete type enhances type safety and clarity in usage.
|
|
739
|
+
*
|
|
740
|
+
* @param {string} id - The ID of the queue item being processed.
|
|
741
|
+
* @param {ApiQueueItem} item - The queue item containing details for the HTTP request.
|
|
742
|
+
* @returns {Observable<T>} An Observable of type T, representing the response of the HTTP request.
|
|
743
|
+
*
|
|
744
|
+
* @example
|
|
745
|
+
* // Example usage for a specific response type
|
|
746
|
+
* this.buildHttpRequest<MyResponseType>('item123', queueItem)
|
|
747
|
+
* .subscribe(response => {
|
|
748
|
+
* // Handle the response
|
|
749
|
+
* });
|
|
750
|
+
*
|
|
751
|
+
* @template T - The expected type of the HTTP response. Defaults to `any`.
|
|
752
|
+
*/
|
|
753
|
+
private buildHttpRequest;
|
|
754
|
+
/**
|
|
755
|
+
* A state reducer that adds an item to the API queue.
|
|
756
|
+
* @param state
|
|
757
|
+
* @param action
|
|
758
|
+
*/
|
|
759
|
+
private addApiQueueItem;
|
|
760
|
+
/**
|
|
761
|
+
* A state reducer that removes an item from the API queue.
|
|
762
|
+
* @param state
|
|
763
|
+
* @param action
|
|
764
|
+
*/
|
|
765
|
+
private removeApiQueueItem;
|
|
766
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApiQueueService, never>;
|
|
767
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
768
|
+
}
|
|
769
|
+
export declare class ApiQueueServiceMock extends ApiQueueService {
|
|
770
|
+
constructor();
|
|
771
|
+
getQueue(): Observable<ApiQueueItem[]>;
|
|
772
|
+
getQueueItem(id: string): Observable<ApiQueueItem>;
|
|
773
|
+
removeAllQueueItem(): void;
|
|
774
|
+
processAllQueueItems<T>(): Observable<T>;
|
|
775
|
+
addQueueItem(): void;
|
|
776
|
+
removeQueueItem(): void;
|
|
777
|
+
processQueueItem<T>(): Observable<T>;
|
|
778
|
+
}
|
|
816
779
|
/**
|
|
817
780
|
* Converts legacy ngx-translate interpolations ({{var}}) to ICU-compatible format ({var}).
|
|
818
781
|
* Double braces are never valid ICU syntax, so any {{word}} is guaranteed to be legacy.
|
|
819
782
|
*/
|
|
820
|
-
declare function convertLegacyInterpolations(value: string): string;
|
|
783
|
+
export declare function convertLegacyInterpolations(value: string): string;
|
|
821
784
|
/**
|
|
822
785
|
* Recursively walks a translation object and converts all legacy {{var}} interpolations
|
|
823
786
|
* to ICU-compatible {var} format in string leaf values.
|
|
824
787
|
*/
|
|
825
|
-
declare function transformTranslations<T>(translations: T): T;
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
getPath(lang: string): string;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
interface ResourceError {
|
|
864
|
-
isError: boolean;
|
|
865
|
-
error?: string;
|
|
866
|
-
resource?: I18nResourceImpl;
|
|
788
|
+
export declare function transformTranslations<T>(translations: T): T;
|
|
789
|
+
export declare class I18nResourceImpl {
|
|
790
|
+
protected prefix: string;
|
|
791
|
+
protected suffix: string;
|
|
792
|
+
protected compileTranslationsFn: (translations: unknown, lang: string) => unknown;
|
|
793
|
+
/**
|
|
794
|
+
* Resource constructor
|
|
795
|
+
*
|
|
796
|
+
* @param prefix the prefix of the resource
|
|
797
|
+
* @param suffix the suffix of the resource, optional parameter
|
|
798
|
+
* @param compileTranslationsFn compiler function, optional parameter
|
|
799
|
+
*/
|
|
800
|
+
constructor(prefix: string, suffix?: string, compileTranslationsFn?: (translations: unknown, lang: string) => unknown);
|
|
801
|
+
/**
|
|
802
|
+
* Translations pre-processor
|
|
803
|
+
*
|
|
804
|
+
* @param translations the object to be pre-processed
|
|
805
|
+
* @param lang the translations language
|
|
806
|
+
* @returns the pre-processed translations
|
|
807
|
+
*/
|
|
808
|
+
compileTranslations(translations: unknown, lang: string): unknown;
|
|
809
|
+
/**
|
|
810
|
+
* Indicates whether other object is equal-to this one.
|
|
811
|
+
*
|
|
812
|
+
* @param obj the reference object with which to compare
|
|
813
|
+
* @returns true if this object is the same as obj, false otherwise
|
|
814
|
+
*/
|
|
815
|
+
equals(obj: I18nResourceImpl): boolean;
|
|
816
|
+
/**
|
|
817
|
+
* The path to the resource
|
|
818
|
+
*
|
|
819
|
+
* @param lang the resource language
|
|
820
|
+
* @returns the path
|
|
821
|
+
*/
|
|
822
|
+
getPath(lang: string): string;
|
|
867
823
|
}
|
|
868
|
-
interface
|
|
869
|
-
|
|
824
|
+
interface ResourceError {
|
|
825
|
+
isError: boolean;
|
|
826
|
+
error?: string;
|
|
827
|
+
resource?: I18nResourceImpl;
|
|
828
|
+
}
|
|
829
|
+
export interface LoadedResources {
|
|
830
|
+
translations: TranslationObject;
|
|
831
|
+
hasError: boolean;
|
|
832
|
+
errors?: LoadedResourcesError[];
|
|
833
|
+
}
|
|
834
|
+
export interface LoadedResourcesError {
|
|
835
|
+
resource: I18nResourceImpl;
|
|
836
|
+
error: string;
|
|
837
|
+
}
|
|
838
|
+
export type TranslationKeys = Record<string, string>;
|
|
839
|
+
export declare class I18nLoader implements TranslateLoader {
|
|
840
|
+
protected http: HttpClient;
|
|
841
|
+
protected logService: LogService | null;
|
|
842
|
+
protected euiAppConfig: EuiAppConfig;
|
|
843
|
+
protected resources: I18nResourceImpl[];
|
|
844
|
+
protected failedResources: LoadedResourcesError[];
|
|
845
|
+
private logger;
|
|
846
|
+
private icuEnabled;
|
|
847
|
+
constructor();
|
|
848
|
+
/**
|
|
849
|
+
* Gets the translations from the server
|
|
850
|
+
*
|
|
851
|
+
* @param lang
|
|
852
|
+
* @returns Observable<object>
|
|
853
|
+
*/
|
|
854
|
+
getTranslation(lang: string): Observable<TranslationObject>;
|
|
855
|
+
/**
|
|
856
|
+
* Adds resources
|
|
857
|
+
*
|
|
858
|
+
* @param config loader configuration
|
|
859
|
+
* @returns Observable<any> | false
|
|
860
|
+
*/
|
|
861
|
+
addResources(config: I18nLoaderConfig): I18nResourceImpl[];
|
|
862
|
+
/**
|
|
863
|
+
* Removes resources from the loader instance
|
|
864
|
+
*/
|
|
865
|
+
removeResources(removedResources: I18nResourceImpl[]): void;
|
|
866
|
+
/**
|
|
867
|
+
* Loads an array of resources, by language
|
|
868
|
+
*
|
|
869
|
+
* @param resources the definition of the resources
|
|
870
|
+
* @param lang the resource language to load
|
|
871
|
+
* @returns Observable<any>
|
|
872
|
+
*/
|
|
873
|
+
loadResources(resources: I18nResourceImpl[], lang: string): Observable<{
|
|
870
874
|
hasError: boolean;
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
* @param config loader configuration
|
|
900
|
-
* @returns Observable<any> | false
|
|
901
|
-
*/
|
|
902
|
-
addResources(config: I18nLoaderConfig): I18nResourceImpl[];
|
|
903
|
-
/**
|
|
904
|
-
* Removes resources from the loader instance
|
|
905
|
-
*/
|
|
906
|
-
removeResources(removedResources: I18nResourceImpl[]): void;
|
|
907
|
-
/**
|
|
908
|
-
* Loads an array of resources, by language
|
|
909
|
-
*
|
|
910
|
-
* @param resources the definition of the resources
|
|
911
|
-
* @param lang the resource language to load
|
|
912
|
-
* @returns Observable<any>
|
|
913
|
-
*/
|
|
914
|
-
loadResources(resources: I18nResourceImpl[], lang: string): Observable<{
|
|
915
|
-
hasError: boolean;
|
|
916
|
-
translations: TranslationObject;
|
|
917
|
-
errors?: LoadedResourcesError[];
|
|
918
|
-
}>;
|
|
919
|
-
/**
|
|
920
|
-
* Returns resources that failed
|
|
921
|
-
*/
|
|
922
|
-
getFailedResources(): Array<LoadedResourcesError>;
|
|
923
|
-
/**
|
|
924
|
-
* Create resources from a config file
|
|
925
|
-
*
|
|
926
|
-
* @param config loader configuration
|
|
927
|
-
* @returns I18nResourceImpl[] resources
|
|
928
|
-
*/
|
|
929
|
-
protected createResources(config: I18nLoaderConfig): I18nResourceImpl[];
|
|
930
|
-
/**
|
|
931
|
-
* Loads a resource, by language
|
|
932
|
-
*
|
|
933
|
-
* @param resource the definition of the resource
|
|
934
|
-
* @param lang the resource language to load
|
|
935
|
-
* @returns Observable<any>
|
|
936
|
-
*/
|
|
937
|
-
protected loadResource(resource: I18nResourceImpl, lang: string): Observable<TranslationKeys | ResourceError>;
|
|
938
|
-
private getResourceCompileFunction;
|
|
939
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<I18nLoader, never>;
|
|
940
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<I18nLoader>;
|
|
941
|
-
}
|
|
942
|
-
declare const translateConfig: {
|
|
943
|
-
loader: i0.ClassProvider;
|
|
875
|
+
translations: TranslationObject;
|
|
876
|
+
errors?: LoadedResourcesError[];
|
|
877
|
+
}>;
|
|
878
|
+
/**
|
|
879
|
+
* Returns resources that failed
|
|
880
|
+
*/
|
|
881
|
+
getFailedResources(): LoadedResourcesError[];
|
|
882
|
+
/**
|
|
883
|
+
* Create resources from a config file
|
|
884
|
+
*
|
|
885
|
+
* @param config loader configuration
|
|
886
|
+
* @returns I18nResourceImpl[] resources
|
|
887
|
+
*/
|
|
888
|
+
protected createResources(config: I18nLoaderConfig): I18nResourceImpl[];
|
|
889
|
+
/**
|
|
890
|
+
* Loads a resource, by language
|
|
891
|
+
*
|
|
892
|
+
* @param resource the definition of the resource
|
|
893
|
+
* @param lang the resource language to load
|
|
894
|
+
* @returns Observable<any>
|
|
895
|
+
*/
|
|
896
|
+
protected loadResource(resource: I18nResourceImpl, lang: string): Observable<TranslationKeys | ResourceError>;
|
|
897
|
+
private getResourceCompileFunction;
|
|
898
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<I18nLoader, never>;
|
|
899
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
900
|
+
}
|
|
901
|
+
export declare const translateConfig: {
|
|
902
|
+
loader: import("@angular/core").ClassProvider;
|
|
944
903
|
};
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
}
|
|
1041
|
-
|
|
904
|
+
export interface ModuleLoadEvent {
|
|
905
|
+
ready: boolean;
|
|
906
|
+
name: string | null | undefined;
|
|
907
|
+
error?: any;
|
|
908
|
+
}
|
|
909
|
+
export declare class I18nService<T extends I18nState = I18nState> extends EuiLazyService<T | I18nState> implements OnDestroy {
|
|
910
|
+
protected config: I18nServiceConfig;
|
|
911
|
+
protected onModuleLoad: BehaviorSubject<ModuleLoadEvent>;
|
|
912
|
+
private static readonly DEFAULT_STATE;
|
|
913
|
+
protected baseGlobalConfig: GlobalConfig<any>;
|
|
914
|
+
protected translateService: TranslateService;
|
|
915
|
+
protected logService: LogService | null;
|
|
916
|
+
private translateLoader;
|
|
917
|
+
protected store: StoreService<T>;
|
|
918
|
+
private document;
|
|
919
|
+
/**
|
|
920
|
+
* a single signal holding the state - initial state is null
|
|
921
|
+
*/
|
|
922
|
+
private state;
|
|
923
|
+
/**
|
|
924
|
+
* a BehaviorSubject holding the state - initial state is null
|
|
925
|
+
* This is the main source of truth for the state
|
|
926
|
+
*/
|
|
927
|
+
private stateSubject;
|
|
928
|
+
private subNotifier;
|
|
929
|
+
constructor();
|
|
930
|
+
ngOnDestroy(): void;
|
|
931
|
+
getState(): Observable<T>;
|
|
932
|
+
/**
|
|
933
|
+
* @deprecated this will be removed in a future version
|
|
934
|
+
* @param mapFn
|
|
935
|
+
*/
|
|
936
|
+
getState<K = T>(mapFn?: (state: T) => K): Observable<K>;
|
|
937
|
+
getState<a extends keyof DeepPartial<T>>(key?: a): Observable<DeepPartial<a>>;
|
|
938
|
+
updateState(state: DeepPartial<T>): void;
|
|
939
|
+
/**
|
|
940
|
+
* @deprecated it will be removed in next version. Use updateState(partialState: DeepPartial<T>) instead
|
|
941
|
+
* @param slice
|
|
942
|
+
* @param reducer
|
|
943
|
+
*/
|
|
944
|
+
updateState(slice: DeepPartial<T>, reducer: (state: T, action: DeepPartial<T>) => T): void;
|
|
945
|
+
/**
|
|
946
|
+
* This method is used to get the state as readonly signal.
|
|
947
|
+
*/
|
|
948
|
+
getSignal(): Signal<T>;
|
|
949
|
+
init(langState?: T): Observable<EuiServiceStatus>;
|
|
950
|
+
/**
|
|
951
|
+
* A pipe function that could serve as a wrapper of another observable
|
|
952
|
+
* e.g. ngx-translate i18n.onReady('my_module').pipe(switchMap(()=>translate.get('eui.KEY')));
|
|
953
|
+
* WARNING: onReady will emit only once for a loaded Module, going to another and then going back will not result
|
|
954
|
+
* into another emission.
|
|
955
|
+
*
|
|
956
|
+
* @param moduleName the name of the module that has been given through the eUI globalConfig. In case non provided
|
|
957
|
+
* fetch module name from the state.
|
|
958
|
+
*/
|
|
959
|
+
onReady(moduleName?: string): Observable<ModuleLoadEvent>;
|
|
960
|
+
lazyLoad(config: I18nLoaderConfig): Observable<EuiServiceStatus>;
|
|
961
|
+
lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;
|
|
962
|
+
/**
|
|
963
|
+
* Add resources based of a config loader
|
|
964
|
+
*
|
|
965
|
+
* @param config I18nLoaderConfig
|
|
966
|
+
* @param moduleName
|
|
967
|
+
* @return Promise<EuiServiceStatus> an EuiServiceStatus when translation has fully loaded
|
|
968
|
+
*/
|
|
969
|
+
addResources(config: I18nLoaderConfig, moduleName?: string): Observable<EuiServiceStatus>;
|
|
970
|
+
/**
|
|
971
|
+
* Prepares the default language
|
|
972
|
+
*/
|
|
973
|
+
private preparedDefaultLanguage;
|
|
974
|
+
/**
|
|
975
|
+
* @param initLanguage if given default language to override default language coming from the
|
|
976
|
+
* configuration token.
|
|
977
|
+
*/
|
|
978
|
+
private setup;
|
|
979
|
+
private bindActiveLangStateToTranslateService;
|
|
980
|
+
private bindTranslateServiceLangChangeToState;
|
|
981
|
+
private setDefaultLanguage;
|
|
982
|
+
/**
|
|
983
|
+
* change the currently used language
|
|
984
|
+
*
|
|
985
|
+
* @param lang is the language code based on the convention you used e.g. (en or en-EN)
|
|
986
|
+
* @returns Observable that returns an object contain the object translation for given language after language
|
|
987
|
+
* fully loaded.
|
|
988
|
+
*/
|
|
989
|
+
private use;
|
|
990
|
+
/**
|
|
991
|
+
* updates the HTML element lang attribute
|
|
992
|
+
*
|
|
993
|
+
* @private
|
|
994
|
+
*/
|
|
995
|
+
private updateHTMLDOMLang;
|
|
996
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<I18nService<any>, never>;
|
|
997
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
998
|
+
}
|
|
1042
999
|
/**
|
|
1043
1000
|
* Service for managing user permissions within the application.
|
|
1044
1001
|
* This class extends `EuiService` and is responsible for handling user rights and permissions.
|
|
@@ -1056,832 +1013,820 @@ declare class I18nService<T extends I18nState = I18nState> extends EuiLazyServic
|
|
|
1056
1013
|
* console.log('User has ADMIN rights');
|
|
1057
1014
|
* }
|
|
1058
1015
|
*/
|
|
1059
|
-
declare class EuiPermissionService extends EuiService<EuiUserRight[]> {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
EH: string;
|
|
1620
|
-
YE: string;
|
|
1621
|
-
ZM: string;
|
|
1622
|
-
ZW: string;
|
|
1016
|
+
export declare class EuiPermissionService extends EuiService<EuiUserRight[]> {
|
|
1017
|
+
private log;
|
|
1018
|
+
protected store: StoreService<any>;
|
|
1019
|
+
private readonly logger;
|
|
1020
|
+
constructor();
|
|
1021
|
+
/**
|
|
1022
|
+
* Initializes the permission service with a set of user rights.
|
|
1023
|
+
* This method sets up the initial state of the service based on the provided user rights.
|
|
1024
|
+
* It should be called before using other methods of the service to ensure it is properly configured.
|
|
1025
|
+
*
|
|
1026
|
+
* @param {EuiUserRight[]} rights - An array of user rights to initialize the service with.
|
|
1027
|
+
* Each `EuiUserRight` object should contain at least an `id` property,
|
|
1028
|
+
* and optionally a `permissions` property which is an array of strings.
|
|
1029
|
+
*
|
|
1030
|
+
* @returns {Observable<EuiServiceStatus>} An Observable that emits the status of the initialization.
|
|
1031
|
+
* The status object includes a `success` boolean indicating
|
|
1032
|
+
* whether the initialization was successful, and an `error` property
|
|
1033
|
+
* with a message in case of failure.
|
|
1034
|
+
*
|
|
1035
|
+
* @example
|
|
1036
|
+
* // Example of initializing the service with two user rights
|
|
1037
|
+
* const userRights = [
|
|
1038
|
+
* { id: 'ADMIN', permissions: ['CREATE', 'READ', 'UPDATE', 'DELETE'] },
|
|
1039
|
+
* { id: 'USER', permissions: ['READ'] }
|
|
1040
|
+
* ];
|
|
1041
|
+
* permissionService.init(userRights).subscribe(status => {
|
|
1042
|
+
* if (status.success) {
|
|
1043
|
+
* console.log('Initialization successful');
|
|
1044
|
+
* } else {
|
|
1045
|
+
* console.error('Initialization failed:', status.error);
|
|
1046
|
+
* }
|
|
1047
|
+
* });
|
|
1048
|
+
*
|
|
1049
|
+
* @throws {Error} Throws an error if the `rights` parameter is not an array of `EuiUserRight` objects.
|
|
1050
|
+
*/
|
|
1051
|
+
init(rights: EuiUserRight[]): Observable<EuiServiceStatus>;
|
|
1052
|
+
/**
|
|
1053
|
+
* Retrieves the current user rights from the service's state.
|
|
1054
|
+
* This getter provides access to the array of `EuiUserRight` objects that represent the current rights
|
|
1055
|
+
* of the user. It is a protected method, intended for internal use within the service or by subclasses.
|
|
1056
|
+
*
|
|
1057
|
+
* @returns {EuiUserRight[]} An array of `EuiUserRight` objects representing the current user rights.
|
|
1058
|
+
* Each `EuiUserRight` object typically contains an `id` property, and may
|
|
1059
|
+
* also include a `permissions` property which is an array of strings.
|
|
1060
|
+
*
|
|
1061
|
+
* @example
|
|
1062
|
+
* // Example of accessing user rights within a subclass or within the service
|
|
1063
|
+
* const currentRights = this.userRights;
|
|
1064
|
+
* currentRights.forEach(right => {
|
|
1065
|
+
* console.log(`Right ID: ${right.id}, Permissions: ${right.permissions.join(', ')}`);
|
|
1066
|
+
* });
|
|
1067
|
+
*
|
|
1068
|
+
* @protected
|
|
1069
|
+
*/
|
|
1070
|
+
protected get userRights(): EuiUserRight[];
|
|
1071
|
+
/**
|
|
1072
|
+
* Retrieves the current state of user rights by subscribing to changes.
|
|
1073
|
+
* This method is used to access the current state of user rights in the service. It returns an Observable
|
|
1074
|
+
* that emits the current user rights. The method is generic and can be parameterized to return a specific
|
|
1075
|
+
* type that extends from `EuiUserRight[]`.
|
|
1076
|
+
*
|
|
1077
|
+
* @template K - The type of the user rights state to be returned. Defaults to `EuiUserRight[]` if not specified.
|
|
1078
|
+
*
|
|
1079
|
+
* @returns {Observable<K>} An Observable that emits the current state of user rights.
|
|
1080
|
+
* The type of the emitted value is `K`, which is `EuiUserRight[]` by default.
|
|
1081
|
+
*
|
|
1082
|
+
* @example
|
|
1083
|
+
* // Example of subscribing to the user rights state
|
|
1084
|
+
* permissionService.getState().subscribe(currentRights => {
|
|
1085
|
+
* console.log('Current User Rights:', currentRights);
|
|
1086
|
+
* });
|
|
1087
|
+
*
|
|
1088
|
+
* // Example with a specific type
|
|
1089
|
+
* permissionService.getState<CustomUserRightType[]>().subscribe(customRights => {
|
|
1090
|
+
* console.log('Custom User Rights:', customRights);
|
|
1091
|
+
* });
|
|
1092
|
+
*/
|
|
1093
|
+
getState<K = EuiUserRight[]>(): Observable<K>;
|
|
1094
|
+
/**
|
|
1095
|
+
* Updates the state of the service with a new set of user rights.
|
|
1096
|
+
* This method is used to modify the current user rights in the service. It takes an array of `EuiUserRight`
|
|
1097
|
+
* objects and updates the service's state. This change is then propagated to all subscribers of the state.
|
|
1098
|
+
*
|
|
1099
|
+
* @param {EuiUserRight[]} rights - An array of `EuiUserRight` objects to update the service's state with.
|
|
1100
|
+
* Each `EuiUserRight` object should contain an `id` property,
|
|
1101
|
+
* and optionally a `permissions` property which is an array of strings.
|
|
1102
|
+
*
|
|
1103
|
+
* @example
|
|
1104
|
+
* // Example of updating the service's state with new user rights
|
|
1105
|
+
* const newUserRights = [
|
|
1106
|
+
* { id: 'USER', permissions: ['READ', 'COMMENT'] },
|
|
1107
|
+
* { id: 'MODERATOR', permissions: ['READ', 'WRITE', 'DELETE'] }
|
|
1108
|
+
* ];
|
|
1109
|
+
* permissionService.updateState(newUserRights);
|
|
1110
|
+
*/
|
|
1111
|
+
updateState(rights: EuiUserRight[]): void;
|
|
1112
|
+
/**
|
|
1113
|
+
* Checks if the user has the specified attribute permission.
|
|
1114
|
+
* This method interprets a string that represents a combination of rights and/or permissions
|
|
1115
|
+
* and determines whether the user has the specified permissions. The string format can be
|
|
1116
|
+
* 'RIGHT.PERMISSION' or just 'RIGHT'. For multiple rights, it can be 'RIGHT1.RIGHT2.PERMISSION'.
|
|
1117
|
+
*
|
|
1118
|
+
* @param {string} rightsAndPermission - A string representing the rights and/or permissions to check.
|
|
1119
|
+
* Format can be 'RIGHT', 'RIGHT.PERMISSION', or 'RIGHT1.RIGHT2.PERMISSION'.
|
|
1120
|
+
*
|
|
1121
|
+
* @returns {boolean} True if the user has the specified attribute permission, false otherwise.
|
|
1122
|
+
*
|
|
1123
|
+
* @example
|
|
1124
|
+
* // Check a single right
|
|
1125
|
+
* const hasRight = permissionService.checkAttributePermission('VIEW');
|
|
1126
|
+
*
|
|
1127
|
+
* // Check a right with a specific permission
|
|
1128
|
+
* const hasRightWithPermission = permissionService.checkAttributePermission('EDIT.APPROVE');
|
|
1129
|
+
*
|
|
1130
|
+
* // Check multiple rights with a specific permission
|
|
1131
|
+
* const hasMultipleRights = permissionService.checkAttributePermission('ADMIN.VIEW.APPROVE');
|
|
1132
|
+
*/
|
|
1133
|
+
checkAttributePermission(rightsAndPermission: string): boolean;
|
|
1134
|
+
/**
|
|
1135
|
+
* Checks if the user has a specific right.
|
|
1136
|
+
* This method determines whether the user possesses a particular right identified by its ID.
|
|
1137
|
+
*
|
|
1138
|
+
* @param {string} rightId - The ID of the right to check.
|
|
1139
|
+
*
|
|
1140
|
+
* @returns {boolean} True if the user has the specified right, false otherwise.
|
|
1141
|
+
*
|
|
1142
|
+
* @example
|
|
1143
|
+
* // Check if the user has the 'ADMIN' right
|
|
1144
|
+
* const isAdmin = permissionService.checkRight('ADMIN');
|
|
1145
|
+
*/
|
|
1146
|
+
checkRight(rightId: string): boolean;
|
|
1147
|
+
/**
|
|
1148
|
+
* Checks if the user has a specific permission within a right.
|
|
1149
|
+
* This method determines whether the user has a specific permission associated with a given right.
|
|
1150
|
+
*
|
|
1151
|
+
* @param {string} rightId - The ID of the right.
|
|
1152
|
+
* @param {string} permission - The permission to check within the right.
|
|
1153
|
+
*
|
|
1154
|
+
* @returns {boolean} True if the user has the specified permission in the given right, false otherwise.
|
|
1155
|
+
*
|
|
1156
|
+
* @example
|
|
1157
|
+
* // Check if the user has 'APPROVE' permission in the 'EDIT' right
|
|
1158
|
+
* const canApproveEdit = permissionService.checkPermission('EDIT', 'APPROVE');
|
|
1159
|
+
*/
|
|
1160
|
+
checkPermission(rightId: string, permission: string): boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* Checks if the user has all the specified rights.
|
|
1163
|
+
* This private method determines whether the user possesses all the rights provided in the array.
|
|
1164
|
+
* Each right in the array is checked against the user's current rights.
|
|
1165
|
+
*
|
|
1166
|
+
* @param {EuiUserRight[]} rights - An array of rights to check against the user's rights.
|
|
1167
|
+
*
|
|
1168
|
+
* @returns {boolean} True if the user has all the specified rights, false otherwise.
|
|
1169
|
+
*
|
|
1170
|
+
* @example
|
|
1171
|
+
* // Example usage within the service
|
|
1172
|
+
* const requiredRights = [{ id: 'VIEW' }, { id: 'EDIT' }];
|
|
1173
|
+
* const hasAllRequiredRights = this.haveAllRights(requiredRights);
|
|
1174
|
+
*
|
|
1175
|
+
* @private
|
|
1176
|
+
*/
|
|
1177
|
+
private haveAllRights;
|
|
1178
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EuiPermissionService, never>;
|
|
1179
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1180
|
+
}
|
|
1181
|
+
export declare class EuiDynamicMenuService {
|
|
1182
|
+
menuLinks: EuiMenuItem[];
|
|
1183
|
+
private euiPermission;
|
|
1184
|
+
private store;
|
|
1185
|
+
constructor();
|
|
1186
|
+
getMenuLinks(): EuiMenuItem[];
|
|
1187
|
+
filterEuiMenuItemsWithRights(links: EuiMenuItem[]): EuiMenuItem[];
|
|
1188
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EuiDynamicMenuService, never>;
|
|
1189
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1190
|
+
}
|
|
1191
|
+
export declare const DYNAMIC_COMPONENT_CONFIG: InjectionToken<object>;
|
|
1192
|
+
export declare class EuiDynamicComponentService {
|
|
1193
|
+
private injector;
|
|
1194
|
+
private appRef;
|
|
1195
|
+
private portalHost;
|
|
1196
|
+
private portal;
|
|
1197
|
+
private portalComponentInstance;
|
|
1198
|
+
/**
|
|
1199
|
+
* Adds a component to portal host dynamically
|
|
1200
|
+
* @param component The component to be injected
|
|
1201
|
+
* @param el The element reference for the component to be injected
|
|
1202
|
+
* @param config The data to be passed (config) for the DYNAMIC_COMPONENT_CONFIG token
|
|
1203
|
+
*/
|
|
1204
|
+
add<T>(component: ComponentType<T>, el?: ElementRef, config?: any): any;
|
|
1205
|
+
/**
|
|
1206
|
+
* detaches a portalHost
|
|
1207
|
+
* @param portalHostRef reference of portal host to be detached
|
|
1208
|
+
*/
|
|
1209
|
+
remove(portalHostRef: DomPortalOutlet): void;
|
|
1210
|
+
/**
|
|
1211
|
+
* creates a custom injector to be used when providing custom injection tokens to components inside a portal
|
|
1212
|
+
* @param data to be used by DYNAMIC_COMPONENT_CONFIG token
|
|
1213
|
+
*/
|
|
1214
|
+
private createInjector;
|
|
1215
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EuiDynamicComponentService, never>;
|
|
1216
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1217
|
+
}
|
|
1218
|
+
export interface UIState<BP = any, DI = any, AMD = any, BPV = any> {
|
|
1219
|
+
appName?: string;
|
|
1220
|
+
appShortName?: string;
|
|
1221
|
+
appSubTitle?: string;
|
|
1222
|
+
appBaseFontSize?: string;
|
|
1223
|
+
isSidebarOpen?: boolean;
|
|
1224
|
+
isSidebarActive?: boolean;
|
|
1225
|
+
hasSidebar?: boolean;
|
|
1226
|
+
hasSideContainer?: boolean;
|
|
1227
|
+
hasBreadcrumb?: boolean;
|
|
1228
|
+
hasHeader?: boolean;
|
|
1229
|
+
isShrinkHeaderActive?: boolean;
|
|
1230
|
+
hasHeaderLogo?: boolean;
|
|
1231
|
+
hasHeaderEnvironment?: boolean;
|
|
1232
|
+
hasToolbar?: boolean;
|
|
1233
|
+
hasToolbarMegaMenu?: boolean;
|
|
1234
|
+
hasToolbarMenu?: boolean;
|
|
1235
|
+
environmentValue?: string;
|
|
1236
|
+
isSidebarHidden?: boolean;
|
|
1237
|
+
isSidebarFocused?: boolean;
|
|
1238
|
+
hasSidebarCollapsedVariant?: boolean;
|
|
1239
|
+
hasTopMessage?: boolean;
|
|
1240
|
+
hasFixedPosition?: boolean;
|
|
1241
|
+
windowWidth?: number;
|
|
1242
|
+
windowHeight?: number;
|
|
1243
|
+
mainContentHeight?: number;
|
|
1244
|
+
pageHeaderHeight?: number;
|
|
1245
|
+
breakpoint?: string;
|
|
1246
|
+
wrapperClasses?: string;
|
|
1247
|
+
breakpoints?: BP;
|
|
1248
|
+
breakpointValues?: BPV;
|
|
1249
|
+
menuLinks?: EuiMenuItem[];
|
|
1250
|
+
sidebarLinks?: EuiMenuItem[];
|
|
1251
|
+
combinedLinks?: EuiMenuItem[];
|
|
1252
|
+
isBlockDocumentActive?: boolean;
|
|
1253
|
+
deviceInfo: DI;
|
|
1254
|
+
activeLanguage: string;
|
|
1255
|
+
languages: (string | EuiLanguage)[];
|
|
1256
|
+
appMetadata: AMD;
|
|
1257
|
+
hasModalActive?: boolean;
|
|
1258
|
+
isDimmerActive?: boolean;
|
|
1259
|
+
}
|
|
1260
|
+
export declare class EuiAppShellService {
|
|
1261
|
+
navigationStartCustomHandler: () => void;
|
|
1262
|
+
navigationEndCustomHandler: () => void;
|
|
1263
|
+
protected config: GlobalConfig<any> | null;
|
|
1264
|
+
private http;
|
|
1265
|
+
private platformId;
|
|
1266
|
+
private document;
|
|
1267
|
+
private router;
|
|
1268
|
+
private storeService;
|
|
1269
|
+
private i18nService;
|
|
1270
|
+
get state$(): Observable<UIState>;
|
|
1271
|
+
get breakpoint$(): Observable<string>;
|
|
1272
|
+
get breakpoints$(): Observable<any>;
|
|
1273
|
+
get state(): UIState;
|
|
1274
|
+
set isSidebarOpen(isOpen: boolean);
|
|
1275
|
+
get isSidebarOpen(): boolean;
|
|
1276
|
+
set isSidebarActive(isActive: boolean);
|
|
1277
|
+
set sidebarLinks(links: EuiMenuItem[]);
|
|
1278
|
+
set hasSidebarCollapsedVariant(isActive: boolean);
|
|
1279
|
+
set menuLinks(links: EuiMenuItem[]);
|
|
1280
|
+
set isBlockDocumentActive(isActive: boolean);
|
|
1281
|
+
get hasHeader(): boolean;
|
|
1282
|
+
get isDimmerActive(): boolean;
|
|
1283
|
+
set isDimmerActive(isActive: boolean);
|
|
1284
|
+
private _state$;
|
|
1285
|
+
private _breakpoint$;
|
|
1286
|
+
private _breakpoints$;
|
|
1287
|
+
constructor();
|
|
1288
|
+
setState(nextState: UIState<any, any, any, any>, updateI18?: boolean): void;
|
|
1289
|
+
/**
|
|
1290
|
+
* Emits a slice from the state whether that changes
|
|
1291
|
+
*
|
|
1292
|
+
* @param key can be 'key' or 'key.sub.sub'
|
|
1293
|
+
*/
|
|
1294
|
+
getState<T = any>(key?: string): Observable<T>;
|
|
1295
|
+
sidebarToggle(): void;
|
|
1296
|
+
dimmerActiveToggle(): void;
|
|
1297
|
+
setDimmerActiveState(activeState: boolean): void;
|
|
1298
|
+
fetchAppMetadata(metadataFilePath?: string): void;
|
|
1299
|
+
activateSidebar(): void;
|
|
1300
|
+
activateSideContainer(): void;
|
|
1301
|
+
deactivateSideContainer(): void;
|
|
1302
|
+
activateSidebarHeader(): void;
|
|
1303
|
+
activateSidebarFooter(): void;
|
|
1304
|
+
activateHeader(): void;
|
|
1305
|
+
activateBreadcrumb(): void;
|
|
1306
|
+
activateTopMessage(height: number): void;
|
|
1307
|
+
activateToolbar(): void;
|
|
1308
|
+
activateToolbarMegaMenu(): void;
|
|
1309
|
+
activateToolbarMenu(): void;
|
|
1310
|
+
/**
|
|
1311
|
+
* Returns the current value of --eui-f-size-base CSS variable
|
|
1312
|
+
*/
|
|
1313
|
+
getBaseFontSize(): string;
|
|
1314
|
+
/**
|
|
1315
|
+
* Updates the current value of --eui-f-size-base CSS variable and the UIState appBaseFontSize
|
|
1316
|
+
*/
|
|
1317
|
+
setBaseFontSize(newsize: string): void;
|
|
1318
|
+
private getWrapperClasses;
|
|
1319
|
+
private getBreakpoint;
|
|
1320
|
+
private getBreakpoints;
|
|
1321
|
+
private getJson;
|
|
1322
|
+
private extractData;
|
|
1323
|
+
private handleError;
|
|
1324
|
+
private bindActiveLanguageToAppShellState;
|
|
1325
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EuiAppShellService, never>;
|
|
1326
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1327
|
+
}
|
|
1328
|
+
export declare const EUI_COUNTRIES: {
|
|
1329
|
+
AF: string;
|
|
1330
|
+
AX: string;
|
|
1331
|
+
AL: string;
|
|
1332
|
+
DZ: string;
|
|
1333
|
+
AS: string;
|
|
1334
|
+
AD: string;
|
|
1335
|
+
AO: string;
|
|
1336
|
+
AI: string;
|
|
1337
|
+
AQ: string;
|
|
1338
|
+
AG: string;
|
|
1339
|
+
AR: string;
|
|
1340
|
+
AM: string;
|
|
1341
|
+
AW: string;
|
|
1342
|
+
AU: string;
|
|
1343
|
+
AT: string;
|
|
1344
|
+
AZ: string;
|
|
1345
|
+
BS: string;
|
|
1346
|
+
BH: string;
|
|
1347
|
+
BD: string;
|
|
1348
|
+
BB: string;
|
|
1349
|
+
BY: string;
|
|
1350
|
+
BE: string;
|
|
1351
|
+
BZ: string;
|
|
1352
|
+
BJ: string;
|
|
1353
|
+
BM: string;
|
|
1354
|
+
BT: string;
|
|
1355
|
+
BO: string;
|
|
1356
|
+
BA: string;
|
|
1357
|
+
BW: string;
|
|
1358
|
+
BV: string;
|
|
1359
|
+
BR: string;
|
|
1360
|
+
VG: string;
|
|
1361
|
+
IO: string;
|
|
1362
|
+
BN: string;
|
|
1363
|
+
BG: string;
|
|
1364
|
+
BF: string;
|
|
1365
|
+
BI: string;
|
|
1366
|
+
KH: string;
|
|
1367
|
+
CM: string;
|
|
1368
|
+
CA: string;
|
|
1369
|
+
CV: string;
|
|
1370
|
+
KY: string;
|
|
1371
|
+
CF: string;
|
|
1372
|
+
TD: string;
|
|
1373
|
+
CL: string;
|
|
1374
|
+
CN: string;
|
|
1375
|
+
HK: string;
|
|
1376
|
+
MO: string;
|
|
1377
|
+
CX: string;
|
|
1378
|
+
CC: string;
|
|
1379
|
+
CO: string;
|
|
1380
|
+
KM: string;
|
|
1381
|
+
CG: string;
|
|
1382
|
+
CD: string;
|
|
1383
|
+
CK: string;
|
|
1384
|
+
CR: string;
|
|
1385
|
+
CI: string;
|
|
1386
|
+
HR: string;
|
|
1387
|
+
CU: string;
|
|
1388
|
+
CY: string;
|
|
1389
|
+
CZ: string;
|
|
1390
|
+
DK: string;
|
|
1391
|
+
DJ: string;
|
|
1392
|
+
DM: string;
|
|
1393
|
+
DO: string;
|
|
1394
|
+
EC: string;
|
|
1395
|
+
EG: string;
|
|
1396
|
+
SV: string;
|
|
1397
|
+
GQ: string;
|
|
1398
|
+
ER: string;
|
|
1399
|
+
EE: string;
|
|
1400
|
+
ET: string;
|
|
1401
|
+
FK: string;
|
|
1402
|
+
FO: string;
|
|
1403
|
+
FJ: string;
|
|
1404
|
+
FI: string;
|
|
1405
|
+
FR: string;
|
|
1406
|
+
GF: string;
|
|
1407
|
+
PF: string;
|
|
1408
|
+
TF: string;
|
|
1409
|
+
GA: string;
|
|
1410
|
+
GM: string;
|
|
1411
|
+
GE: string;
|
|
1412
|
+
DE: string;
|
|
1413
|
+
GH: string;
|
|
1414
|
+
GI: string;
|
|
1415
|
+
GR: string;
|
|
1416
|
+
GL: string;
|
|
1417
|
+
GD: string;
|
|
1418
|
+
GP: string;
|
|
1419
|
+
GU: string;
|
|
1420
|
+
GT: string;
|
|
1421
|
+
GG: string;
|
|
1422
|
+
GN: string;
|
|
1423
|
+
GW: string;
|
|
1424
|
+
GY: string;
|
|
1425
|
+
HT: string;
|
|
1426
|
+
HM: string;
|
|
1427
|
+
VA: string;
|
|
1428
|
+
HN: string;
|
|
1429
|
+
HU: string;
|
|
1430
|
+
IS: string;
|
|
1431
|
+
IN: string;
|
|
1432
|
+
ID: string;
|
|
1433
|
+
IR: string;
|
|
1434
|
+
IQ: string;
|
|
1435
|
+
IE: string;
|
|
1436
|
+
IM: string;
|
|
1437
|
+
IL: string;
|
|
1438
|
+
IT: string;
|
|
1439
|
+
JM: string;
|
|
1440
|
+
JP: string;
|
|
1441
|
+
JE: string;
|
|
1442
|
+
JO: string;
|
|
1443
|
+
KZ: string;
|
|
1444
|
+
KE: string;
|
|
1445
|
+
KI: string;
|
|
1446
|
+
KP: string;
|
|
1447
|
+
KR: string;
|
|
1448
|
+
KW: string;
|
|
1449
|
+
KG: string;
|
|
1450
|
+
LA: string;
|
|
1451
|
+
LV: string;
|
|
1452
|
+
LB: string;
|
|
1453
|
+
LS: string;
|
|
1454
|
+
LR: string;
|
|
1455
|
+
LY: string;
|
|
1456
|
+
LI: string;
|
|
1457
|
+
LT: string;
|
|
1458
|
+
LU: string;
|
|
1459
|
+
MK: string;
|
|
1460
|
+
MG: string;
|
|
1461
|
+
MW: string;
|
|
1462
|
+
MY: string;
|
|
1463
|
+
MV: string;
|
|
1464
|
+
ML: string;
|
|
1465
|
+
MT: string;
|
|
1466
|
+
MH: string;
|
|
1467
|
+
MQ: string;
|
|
1468
|
+
MR: string;
|
|
1469
|
+
MU: string;
|
|
1470
|
+
YT: string;
|
|
1471
|
+
MX: string;
|
|
1472
|
+
FM: string;
|
|
1473
|
+
MD: string;
|
|
1474
|
+
MC: string;
|
|
1475
|
+
MN: string;
|
|
1476
|
+
ME: string;
|
|
1477
|
+
MS: string;
|
|
1478
|
+
MA: string;
|
|
1479
|
+
MZ: string;
|
|
1480
|
+
MM: string;
|
|
1481
|
+
NA: string;
|
|
1482
|
+
NR: string;
|
|
1483
|
+
NP: string;
|
|
1484
|
+
NL: string;
|
|
1485
|
+
AN: string;
|
|
1486
|
+
NC: string;
|
|
1487
|
+
NZ: string;
|
|
1488
|
+
NI: string;
|
|
1489
|
+
NE: string;
|
|
1490
|
+
NG: string;
|
|
1491
|
+
NU: string;
|
|
1492
|
+
NF: string;
|
|
1493
|
+
MP: string;
|
|
1494
|
+
NO: string;
|
|
1495
|
+
OM: string;
|
|
1496
|
+
PK: string;
|
|
1497
|
+
PW: string;
|
|
1498
|
+
PS: string;
|
|
1499
|
+
PA: string;
|
|
1500
|
+
PG: string;
|
|
1501
|
+
PY: string;
|
|
1502
|
+
PE: string;
|
|
1503
|
+
PH: string;
|
|
1504
|
+
PN: string;
|
|
1505
|
+
PL: string;
|
|
1506
|
+
PT: string;
|
|
1507
|
+
PR: string;
|
|
1508
|
+
QA: string;
|
|
1509
|
+
RE: string;
|
|
1510
|
+
RO: string;
|
|
1511
|
+
RU: string;
|
|
1512
|
+
RW: string;
|
|
1513
|
+
BL: string;
|
|
1514
|
+
SH: string;
|
|
1515
|
+
KN: string;
|
|
1516
|
+
LC: string;
|
|
1517
|
+
MF: string;
|
|
1518
|
+
PM: string;
|
|
1519
|
+
VC: string;
|
|
1520
|
+
WS: string;
|
|
1521
|
+
SM: string;
|
|
1522
|
+
ST: string;
|
|
1523
|
+
SA: string;
|
|
1524
|
+
SN: string;
|
|
1525
|
+
RS: string;
|
|
1526
|
+
SC: string;
|
|
1527
|
+
SL: string;
|
|
1528
|
+
SG: string;
|
|
1529
|
+
SK: string;
|
|
1530
|
+
SI: string;
|
|
1531
|
+
SB: string;
|
|
1532
|
+
SO: string;
|
|
1533
|
+
ZA: string;
|
|
1534
|
+
GS: string;
|
|
1535
|
+
SS: string;
|
|
1536
|
+
ES: string;
|
|
1537
|
+
LK: string;
|
|
1538
|
+
SD: string;
|
|
1539
|
+
SR: string;
|
|
1540
|
+
SJ: string;
|
|
1541
|
+
SZ: string;
|
|
1542
|
+
SE: string;
|
|
1543
|
+
CH: string;
|
|
1544
|
+
SY: string;
|
|
1545
|
+
TW: string;
|
|
1546
|
+
TJ: string;
|
|
1547
|
+
TZ: string;
|
|
1548
|
+
TH: string;
|
|
1549
|
+
TL: string;
|
|
1550
|
+
TG: string;
|
|
1551
|
+
TK: string;
|
|
1552
|
+
TO: string;
|
|
1553
|
+
TT: string;
|
|
1554
|
+
TN: string;
|
|
1555
|
+
TR: string;
|
|
1556
|
+
TM: string;
|
|
1557
|
+
TC: string;
|
|
1558
|
+
TV: string;
|
|
1559
|
+
UG: string;
|
|
1560
|
+
UA: string;
|
|
1561
|
+
AE: string;
|
|
1562
|
+
GB: string;
|
|
1563
|
+
US: string;
|
|
1564
|
+
UM: string;
|
|
1565
|
+
UY: string;
|
|
1566
|
+
UZ: string;
|
|
1567
|
+
VU: string;
|
|
1568
|
+
VE: string;
|
|
1569
|
+
VN: string;
|
|
1570
|
+
VI: string;
|
|
1571
|
+
WF: string;
|
|
1572
|
+
EH: string;
|
|
1573
|
+
YE: string;
|
|
1574
|
+
ZM: string;
|
|
1575
|
+
ZW: string;
|
|
1623
1576
|
};
|
|
1624
|
-
interface EuiTimeZone {
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
}
|
|
1628
|
-
declare const EUI_TIMEZONES: EuiTimeZone[];
|
|
1629
|
-
declare class EuiTimezoneService {
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
COMPACT = "compact"
|
|
1577
|
+
export interface EuiTimeZone {
|
|
1578
|
+
name: string;
|
|
1579
|
+
desc: string;
|
|
1580
|
+
}
|
|
1581
|
+
export declare const EUI_TIMEZONES: EuiTimeZone[];
|
|
1582
|
+
export declare class EuiTimezoneService {
|
|
1583
|
+
/**
|
|
1584
|
+
* Convert country ISO code to country name (in english)
|
|
1585
|
+
*/
|
|
1586
|
+
iso2country(iso: string): string;
|
|
1587
|
+
/**
|
|
1588
|
+
* Gets the list of ISO-codes for all countries
|
|
1589
|
+
*/
|
|
1590
|
+
getCountries(): string[];
|
|
1591
|
+
getTimezones(): EuiTimeZone[];
|
|
1592
|
+
getTimezone(tz: string): EuiTimeZone | undefined;
|
|
1593
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EuiTimezoneService, never>;
|
|
1594
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1595
|
+
}
|
|
1596
|
+
export declare enum EuiTheme {
|
|
1597
|
+
DEFAULT = "default",
|
|
1598
|
+
ECL_EC = "ecl-ec",
|
|
1599
|
+
ECL_EC_RTL = "ecl-ec-rtl",
|
|
1600
|
+
ECL_EU = "ecl-eu",
|
|
1601
|
+
ECL_EU_RTL = "ecl-eu-rtl",
|
|
1602
|
+
DARK = "dark",
|
|
1603
|
+
HIGH_CONTRAST = "high-contrast",
|
|
1604
|
+
COMPACT = "compact"
|
|
1653
1605
|
}
|
|
1654
1606
|
interface IEuiTheme {
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
}
|
|
1660
|
-
interface ThemeState {
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
}
|
|
1664
|
-
declare class EuiThemeService {
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1607
|
+
name: EuiTheme;
|
|
1608
|
+
isActive: boolean;
|
|
1609
|
+
styleSheet: string | null;
|
|
1610
|
+
cssClass: string | null;
|
|
1611
|
+
}
|
|
1612
|
+
export interface ThemeState {
|
|
1613
|
+
themes: IEuiTheme[];
|
|
1614
|
+
theme: any;
|
|
1615
|
+
}
|
|
1616
|
+
export declare class EuiThemeService {
|
|
1617
|
+
private document;
|
|
1618
|
+
protected config: GlobalConfig<any> | null;
|
|
1619
|
+
private asService;
|
|
1620
|
+
private _themeLink;
|
|
1621
|
+
private _state$;
|
|
1622
|
+
constructor();
|
|
1623
|
+
get state$(): Observable<ThemeState>;
|
|
1624
|
+
get state(): ThemeState;
|
|
1625
|
+
isDefault(): boolean;
|
|
1626
|
+
isEclEc(): boolean;
|
|
1627
|
+
isEclEcRtl(): boolean;
|
|
1628
|
+
isEclEu(): boolean;
|
|
1629
|
+
isEclEuRtl(): boolean;
|
|
1630
|
+
isDark(): boolean;
|
|
1631
|
+
isHighContrast(): boolean;
|
|
1632
|
+
isCompact(): boolean;
|
|
1633
|
+
setActiveTheme(theme: EuiTheme, isActive: boolean): void;
|
|
1634
|
+
private _renderTheme;
|
|
1635
|
+
private _renderThemeCss;
|
|
1636
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EuiThemeService, never>;
|
|
1637
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1638
|
+
}
|
|
1687
1639
|
/**
|
|
1688
1640
|
* Generic storage service. Concrete storage services must extend this class
|
|
1689
1641
|
*/
|
|
1690
|
-
declare abstract class StorageService {
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1642
|
+
export declare abstract class StorageService {
|
|
1643
|
+
/**
|
|
1644
|
+
* utility function, to determine the storage implementation
|
|
1645
|
+
*/
|
|
1646
|
+
abstract name(): string;
|
|
1647
|
+
/**
|
|
1648
|
+
* retrieve an object from storage
|
|
1649
|
+
* @param key the associated key
|
|
1650
|
+
* @returns the value or undefined, if case of error
|
|
1651
|
+
*/
|
|
1652
|
+
abstract get(key: string): any;
|
|
1653
|
+
abstract get<T>(key: string): T;
|
|
1654
|
+
/**
|
|
1655
|
+
* sets an object in storage
|
|
1656
|
+
* @param key the associated key
|
|
1657
|
+
* @param value the value to set
|
|
1658
|
+
*/
|
|
1659
|
+
abstract set(key: string, value: any): void;
|
|
1660
|
+
abstract set<T>(key: string, value: T): void;
|
|
1661
|
+
/**
|
|
1662
|
+
* removes an object from storage
|
|
1663
|
+
* @param key the associated key
|
|
1664
|
+
*/
|
|
1665
|
+
abstract remove(key: string): void;
|
|
1666
|
+
}
|
|
1667
|
+
export declare class StorageServiceMock extends StorageService {
|
|
1668
|
+
name(): string;
|
|
1669
|
+
get(): null;
|
|
1670
|
+
set(): void;
|
|
1671
|
+
remove(): void;
|
|
1672
|
+
}
|
|
1723
1673
|
/**
|
|
1724
1674
|
* Generic asynchronous storage service. Concrete asynchronous storage services must extend this class
|
|
1725
1675
|
*/
|
|
1726
|
-
declare abstract class AsyncStorageService extends StorageService {
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1676
|
+
export declare abstract class AsyncStorageService extends StorageService {
|
|
1677
|
+
/**
|
|
1678
|
+
* reflects the readiness of the storage
|
|
1679
|
+
* @returns one time emission Observable<any>
|
|
1680
|
+
*/
|
|
1681
|
+
abstract ready(): Observable<any>;
|
|
1682
|
+
/**
|
|
1683
|
+
* retrieve an object from async storage
|
|
1684
|
+
* @param key the associated key
|
|
1685
|
+
* @returns one time emission Observable of value
|
|
1686
|
+
*/
|
|
1687
|
+
abstract get(key: string): Observable<any>;
|
|
1688
|
+
abstract get<T>(key: string): Observable<T>;
|
|
1689
|
+
/**
|
|
1690
|
+
* sets an object in async storage
|
|
1691
|
+
* @param key the associated key
|
|
1692
|
+
* @param value the value to set
|
|
1693
|
+
* @returns one time emission Observable
|
|
1694
|
+
*/
|
|
1695
|
+
abstract set(key: string, value: any): Observable<any>;
|
|
1696
|
+
abstract set<T>(key: string, value: T): Observable<any>;
|
|
1697
|
+
/**
|
|
1698
|
+
* removes an object from async storage
|
|
1699
|
+
* @param key the associated key
|
|
1700
|
+
* @returns one time emission Observable
|
|
1701
|
+
*/
|
|
1702
|
+
abstract remove(key: string): Observable<any>;
|
|
1703
|
+
/**
|
|
1704
|
+
* asynchronous helper for set function
|
|
1705
|
+
* @param key the associated key
|
|
1706
|
+
* @param value the value to set
|
|
1707
|
+
*/
|
|
1708
|
+
setAsync(key: string, value: any): void;
|
|
1709
|
+
/**
|
|
1710
|
+
* asynchronous helper for remove function
|
|
1711
|
+
* @param key the associated key
|
|
1712
|
+
*/
|
|
1713
|
+
removeAsync(key: string): void;
|
|
1714
|
+
}
|
|
1715
|
+
export declare class AsyncStorageServiceMock extends AsyncStorageService {
|
|
1716
|
+
ready(): Observable<any>;
|
|
1717
|
+
name(): string;
|
|
1718
|
+
get(): Observable<any>;
|
|
1719
|
+
set(): Observable<any>;
|
|
1720
|
+
remove(): Observable<any>;
|
|
1721
|
+
setAsync(): void;
|
|
1722
|
+
removeAsync(): void;
|
|
1723
|
+
}
|
|
1776
1724
|
/**
|
|
1777
1725
|
* localStorage service
|
|
1778
1726
|
*/
|
|
1779
|
-
declare class LocalStorageService extends StorageService {
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1727
|
+
export declare class LocalStorageService extends StorageService {
|
|
1728
|
+
static NAME: string;
|
|
1729
|
+
protected log: LogService | null;
|
|
1730
|
+
private platformId;
|
|
1731
|
+
/**
|
|
1732
|
+
* the name of the storage service
|
|
1733
|
+
*/
|
|
1734
|
+
name(): string;
|
|
1735
|
+
/**
|
|
1736
|
+
* retrieve an object from local storage
|
|
1737
|
+
* @param key the associated key
|
|
1738
|
+
* @returns the value or undefined, if case of error
|
|
1739
|
+
*/
|
|
1740
|
+
get(key: string): any;
|
|
1741
|
+
/**
|
|
1742
|
+
* sets an object in local storage
|
|
1743
|
+
* @param key the associated key
|
|
1744
|
+
* @param value the value to set
|
|
1745
|
+
*/
|
|
1746
|
+
set(key: string, value: any): void;
|
|
1747
|
+
/**
|
|
1748
|
+
* removes an object from local storage
|
|
1749
|
+
* @param key the associated key
|
|
1750
|
+
*/
|
|
1751
|
+
remove(key: string): void;
|
|
1752
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorageService, never>;
|
|
1753
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1754
|
+
}
|
|
1808
1755
|
/**
|
|
1809
1756
|
* sessionStorage service
|
|
1810
1757
|
*/
|
|
1811
|
-
declare class SessionStorageService extends StorageService {
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1758
|
+
export declare class SessionStorageService extends StorageService {
|
|
1759
|
+
protected log: LogService | null;
|
|
1760
|
+
static NAME: string;
|
|
1761
|
+
/**
|
|
1762
|
+
* the name of the storage service
|
|
1763
|
+
*/
|
|
1764
|
+
name(): string;
|
|
1765
|
+
/**
|
|
1766
|
+
* retrieve an object from session storage
|
|
1767
|
+
* @param key the associated key
|
|
1768
|
+
* @returns the value or undefined, if case of error
|
|
1769
|
+
*/
|
|
1770
|
+
get(key: string): any;
|
|
1771
|
+
/**
|
|
1772
|
+
* sets an object in session storage
|
|
1773
|
+
* @param key the associated key
|
|
1774
|
+
* @param value the value to set
|
|
1775
|
+
*/
|
|
1776
|
+
set(key: string, value: any): void;
|
|
1777
|
+
/**
|
|
1778
|
+
* removes an object from session storage
|
|
1779
|
+
* @param key the associated key
|
|
1780
|
+
*/
|
|
1781
|
+
remove(key: string): void;
|
|
1782
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SessionStorageService, never>;
|
|
1783
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1784
|
+
}
|
|
1839
1785
|
/** @internal */
|
|
1840
|
-
declare const localForage: any;
|
|
1841
|
-
declare const LOCAL_FORAGE_SERVICE_CONFIG_TOKEN: InjectionToken<any>;
|
|
1786
|
+
export declare const localForage: any;
|
|
1787
|
+
export declare const LOCAL_FORAGE_SERVICE_CONFIG_TOKEN: InjectionToken<any>;
|
|
1842
1788
|
/**
|
|
1843
1789
|
* localforage service, using the localForage javascript library
|
|
1844
1790
|
* https://localforage.github.io/localForage
|
|
1845
1791
|
*/
|
|
1846
|
-
declare class LocalForageService extends AsyncStorageService {
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
declare const LOCALE_ID_MAPPER: InjectionToken<LocaleMapper>;
|
|
1792
|
+
export declare class LocalForageService extends AsyncStorageService {
|
|
1793
|
+
protected config: any;
|
|
1794
|
+
protected log: LogService | null;
|
|
1795
|
+
static NAME: string;
|
|
1796
|
+
constructor();
|
|
1797
|
+
/**
|
|
1798
|
+
* the name of the storage service
|
|
1799
|
+
*/
|
|
1800
|
+
name(): string;
|
|
1801
|
+
/**
|
|
1802
|
+
* reflects the readiness of the storage
|
|
1803
|
+
* @returns one time emission Observable<void>
|
|
1804
|
+
*/
|
|
1805
|
+
ready(): Observable<any>;
|
|
1806
|
+
/**
|
|
1807
|
+
* retrieve an object from localforage
|
|
1808
|
+
* @param key the associated key
|
|
1809
|
+
* @returns one time emission Observable of value
|
|
1810
|
+
*/
|
|
1811
|
+
get(key: string): Observable<any>;
|
|
1812
|
+
/**
|
|
1813
|
+
* sets an object in localforage
|
|
1814
|
+
* @param key the associated key
|
|
1815
|
+
* @param value the value to set
|
|
1816
|
+
* @returns one time emission Observable
|
|
1817
|
+
*/
|
|
1818
|
+
set(key: string, value: any): Observable<any>;
|
|
1819
|
+
/**
|
|
1820
|
+
* removes an object from localforage
|
|
1821
|
+
* @param key the associated key
|
|
1822
|
+
* @returns one time emission Observable
|
|
1823
|
+
*/
|
|
1824
|
+
remove(key: string): Observable<any>;
|
|
1825
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocalForageService, never>;
|
|
1826
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1827
|
+
}
|
|
1828
|
+
export type LocaleMapper = (locale: string) => string;
|
|
1829
|
+
export declare const LOCALE_ID_MAPPER: InjectionToken<LocaleMapper>;
|
|
1885
1830
|
/**
|
|
1886
1831
|
* LocaleService is responsible for managing locale states and configurations in an Angular application.
|
|
1887
1832
|
* It utilizes the CLDR library to load and construct the locale for each region. This service allows
|
|
@@ -1895,107 +1840,105 @@ declare const LOCALE_ID_MAPPER: InjectionToken<LocaleMapper>;
|
|
|
1895
1840
|
* @template L - The type of the locale data.
|
|
1896
1841
|
* @extends EuiService<T | LocaleState>
|
|
1897
1842
|
*/
|
|
1898
|
-
declare class LocaleService<T extends LocaleState = LocaleState> extends EuiService<T | LocaleState> implements OnDestroy {
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1843
|
+
export declare class LocaleService<T extends LocaleState = LocaleState> extends EuiService<T | LocaleState> implements OnDestroy {
|
|
1844
|
+
protected store: StoreService<any>;
|
|
1845
|
+
protected baseGlobalConfig: GlobalConfig<any>;
|
|
1846
|
+
protected locale_id: string;
|
|
1847
|
+
private static readonly DEFAULT_STATE;
|
|
1848
|
+
private localeMapper;
|
|
1849
|
+
private i18n;
|
|
1850
|
+
private log;
|
|
1851
|
+
private readonly logger;
|
|
1852
|
+
private subNotifier;
|
|
1853
|
+
protected config: LocaleServiceConfig;
|
|
1854
|
+
/**
|
|
1855
|
+
* a single signal holding the state - initial state is null
|
|
1856
|
+
*/
|
|
1857
|
+
private state;
|
|
1858
|
+
/**
|
|
1859
|
+
* a BehaviorSubject holding the state - initial state is null
|
|
1860
|
+
* This is the main source of truth for the state
|
|
1861
|
+
*/
|
|
1862
|
+
private stateSubject;
|
|
1863
|
+
constructor();
|
|
1864
|
+
ngOnDestroy(): void;
|
|
1865
|
+
getState(): Observable<T>;
|
|
1866
|
+
/**
|
|
1867
|
+
* Retrieves the state of the locale service. This method is overloaded to allow different ways of accessing the state.
|
|
1868
|
+
*
|
|
1869
|
+
* @template K - The type of the value to be returned. Defaults to the type of the locale state (T).
|
|
1870
|
+
*
|
|
1871
|
+
* @param {((state: T) => K)} [mapFn] - A function that maps the state to a specific form.
|
|
1872
|
+
* Takes the current state as an argument and returns the transformed state.
|
|
1873
|
+
* @returns {Observable<K>} - An observable that emits the transformed state.
|
|
1874
|
+
*/
|
|
1875
|
+
getState<K = T>(mapFn?: (state: T) => K): Observable<K>;
|
|
1876
|
+
/**
|
|
1877
|
+
* @template a - A key that extends the keys of the state type T.
|
|
1878
|
+
* @param {a} [key] - A specific key to access a part of the state.
|
|
1879
|
+
* The key should be a property name of the state object.
|
|
1880
|
+
* @returns {Observable<Partial<a>>} - An observable that emits the value of the specified key in the state.
|
|
1881
|
+
* @param key
|
|
1882
|
+
*/
|
|
1883
|
+
getState<a extends keyof DeepPartial<T>>(key?: a): Observable<DeepPartial<a>>;
|
|
1884
|
+
/**
|
|
1885
|
+
* Initializes the LocaleService with necessary configurations and state.
|
|
1886
|
+
* Binds language changes to the state and dynamically loads the appropriate locales.
|
|
1887
|
+
*
|
|
1888
|
+
* @param {LocaleState} [state] - Optional initial state for the locale service.
|
|
1889
|
+
* @returns {Observable<EuiServiceStatus>} - Observable emitting the status of the initialization.
|
|
1890
|
+
*/
|
|
1891
|
+
init(state?: LocaleState): Observable<EuiServiceStatus>;
|
|
1892
|
+
/**
|
|
1893
|
+
* This method is used to update the state of the service with a new state.
|
|
1894
|
+
*
|
|
1895
|
+
* @param state
|
|
1896
|
+
*/
|
|
1897
|
+
updateState(state: DeepPartial<T>): void;
|
|
1898
|
+
/**
|
|
1899
|
+
* This method is used to get the state as readonly signal.
|
|
1900
|
+
*/
|
|
1901
|
+
getSignal(): Signal<T>;
|
|
1902
|
+
/**
|
|
1903
|
+
* Retrieves the previous locale used in the application.
|
|
1904
|
+
*
|
|
1905
|
+
* @returns {string} - The previous locale identifier.
|
|
1906
|
+
*/
|
|
1907
|
+
get previousLocale(): string;
|
|
1908
|
+
/**
|
|
1909
|
+
* Retrieves the current locale used in the application.
|
|
1910
|
+
*
|
|
1911
|
+
* @returns {string} - The current locale identifier.
|
|
1912
|
+
*/
|
|
1913
|
+
get currentLocale(): string;
|
|
1914
|
+
/**
|
|
1915
|
+
* Listens for language changes and dynamically sets the locale accordingly.
|
|
1916
|
+
*
|
|
1917
|
+
* @private
|
|
1918
|
+
*/
|
|
1919
|
+
private bindTranslateServiceLangChangeToState;
|
|
1920
|
+
/**
|
|
1921
|
+
* Checks if a given locale string is valid according to the Intl.Locale API. (based on BCP 47)
|
|
1922
|
+
* A valid locale string can be used to create a new Intl.Locale object without throwing an error.
|
|
1923
|
+
*
|
|
1924
|
+
* @param localeString - The locale string to be validated.
|
|
1925
|
+
* @returns {boolean} - Returns true if the locale string is valid, false otherwise.
|
|
1926
|
+
*/
|
|
1927
|
+
private isValidLocale;
|
|
1928
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocaleService<any>, never>;
|
|
1929
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1930
|
+
}
|
|
1931
|
+
export declare class LocaleServiceMock<T extends LocaleState = LocaleState> extends LocaleService<T> {
|
|
1932
|
+
protected locale_id: string;
|
|
1933
|
+
private DEFAULT_LOCALE;
|
|
1934
|
+
private stateSub;
|
|
1935
|
+
constructor();
|
|
1936
|
+
getState(): Observable<T>;
|
|
1937
|
+
updateState(state: T): void;
|
|
1938
|
+
init(state?: T): Observable<EuiServiceStatus>;
|
|
1939
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocaleServiceMock<any>, never>;
|
|
1940
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1941
|
+
}
|
|
1999
1942
|
/**
|
|
2000
1943
|
* The status of a library
|
|
2001
1944
|
* @enum Status
|
|
@@ -2003,10 +1946,10 @@ declare class LocaleServiceMock<T extends LocaleState = LocaleState> extends Loc
|
|
|
2003
1946
|
* @property {string} LOADED - the library is loaded
|
|
2004
1947
|
* @property {string} ERROR - the library failed to load
|
|
2005
1948
|
*/
|
|
2006
|
-
declare enum Status {
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
1949
|
+
export declare enum Status {
|
|
1950
|
+
LOADING = "loading",
|
|
1951
|
+
LOADED = "loaded",
|
|
1952
|
+
ERROR = "error"
|
|
2010
1953
|
}
|
|
2011
1954
|
/**
|
|
2012
1955
|
* A library is a set of script and style dependencies
|
|
@@ -2040,59 +1983,58 @@ declare enum Status {
|
|
|
2040
1983
|
* status: Status.LOADING,
|
|
2041
1984
|
* };
|
|
2042
1985
|
*/
|
|
2043
|
-
interface Library {
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
1986
|
+
export interface Library {
|
|
1987
|
+
/** global variable object name that the script will give to the library */
|
|
1988
|
+
name: string;
|
|
1989
|
+
/** a set of script and style dependencies */
|
|
1990
|
+
dependencies: Dependency[];
|
|
1991
|
+
/** the status of the library e.g. LOADED */
|
|
1992
|
+
status: Status;
|
|
2050
1993
|
}
|
|
2051
1994
|
/**
|
|
2052
1995
|
* A dependency is a script or style that can be loaded dynamically
|
|
2053
1996
|
*/
|
|
2054
|
-
interface Dependency {
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
1997
|
+
export interface Dependency {
|
|
1998
|
+
/** an identifier for the dependency */
|
|
1999
|
+
name: string;
|
|
2000
|
+
/**
|
|
2001
|
+
* the url of the dependency
|
|
2002
|
+
* @example
|
|
2003
|
+
* https://cdn.quilljs.com/1.3.6/quill.js
|
|
2004
|
+
*/
|
|
2005
|
+
url: string;
|
|
2006
|
+
/** the type of the dependency. Is it a style or script? */
|
|
2007
|
+
type: 'js' | 'css';
|
|
2008
|
+
/**
|
|
2009
|
+
* an array of dependencies corresponds to the Dependency.name
|
|
2010
|
+
* that must be loaded before this dependency
|
|
2011
|
+
* @example
|
|
2012
|
+
* ['quill-better-table']
|
|
2013
|
+
* where 'quill-better-table' is the name of the dependency
|
|
2014
|
+
* const betterTable: Dependency = {
|
|
2015
|
+
* name: 'quill-better-table',
|
|
2016
|
+
* url: 'https://cdn.quilljs.com/1.3.6/quill.js',
|
|
2017
|
+
* type: 'js',
|
|
2018
|
+
* requires: ['quill-better-table'],
|
|
2019
|
+
* }
|
|
2020
|
+
*/
|
|
2021
|
+
requires: string[];
|
|
2022
|
+
/** the status of the dependency */
|
|
2023
|
+
status?: Status;
|
|
2024
|
+
/** the number of times the dependency has been loaded */
|
|
2025
|
+
retries?: number;
|
|
2083
2026
|
}
|
|
2084
2027
|
/**
|
|
2085
2028
|
* Configuration for different policies
|
|
2086
2029
|
*/
|
|
2087
|
-
interface Policy {
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2030
|
+
export interface Policy {
|
|
2031
|
+
/** Maximum number of retry attempts */
|
|
2032
|
+
maxAttempts: number;
|
|
2033
|
+
/** Time between retries in milliseconds */
|
|
2034
|
+
retryInterval: number;
|
|
2035
|
+
/** Time in milliseconds before considering a load attempt as failed */
|
|
2036
|
+
timeout: number;
|
|
2094
2037
|
}
|
|
2095
|
-
|
|
2096
2038
|
/**
|
|
2097
2039
|
* A service for loading external dependencies dynamically to the DOM and keeping track of their status. Dependencies
|
|
2098
2040
|
* can be loaded in any order and can have prerequisites. The service will load the prerequisites first and then load
|
|
@@ -2128,163 +2070,160 @@ interface Policy {
|
|
|
2128
2070
|
* loader.addDependency('Quill', 'https://cdn.quilljs.com/1.3.6/quill.js', 'js', ['QuillStyle']);
|
|
2129
2071
|
* loader.addDependency('QuillStyle', 'https://cdn.quilljs.com/1.3.6/quill.snow.css', 'css');
|
|
2130
2072
|
*/
|
|
2131
|
-
declare class EuiLoaderService {
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<UserServiceMock<any>>;
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2073
|
+
export declare class EuiLoaderService {
|
|
2074
|
+
/**
|
|
2075
|
+
* Stores the status and details of each dependency
|
|
2076
|
+
*/
|
|
2077
|
+
private dependencies;
|
|
2078
|
+
/** Observable that emits the name of the dependency when its status changes */
|
|
2079
|
+
private onStatusChange;
|
|
2080
|
+
/**
|
|
2081
|
+
* Configuration for policies such as Retry and timeout for failed loads
|
|
2082
|
+
*/
|
|
2083
|
+
private policy;
|
|
2084
|
+
/**
|
|
2085
|
+
* Add a dependency with its type (JS or CSS) and dependencies
|
|
2086
|
+
*
|
|
2087
|
+
* @param name The name of the dependency
|
|
2088
|
+
* @param url The URL of the dependency
|
|
2089
|
+
* @param type The type of the dependency (JS or CSS)
|
|
2090
|
+
* @param requires The dependencies that must be loaded before this one (optional)
|
|
2091
|
+
*/
|
|
2092
|
+
addDependency(name: string, url: string, type: 'js' | 'css', requires?: string[]): void;
|
|
2093
|
+
/**
|
|
2094
|
+
* Remove a dependency from the DOM
|
|
2095
|
+
*
|
|
2096
|
+
* @param name The name of the dependency
|
|
2097
|
+
*/
|
|
2098
|
+
removeDependency(name: string): void;
|
|
2099
|
+
/**
|
|
2100
|
+
* Allow users to configure the retry policy
|
|
2101
|
+
*
|
|
2102
|
+
* @param maxAttempts The maximum number of retry attempts
|
|
2103
|
+
* @param retryInterval The time between retries in milliseconds
|
|
2104
|
+
*/
|
|
2105
|
+
setRetryPolicy(maxAttempts: number, retryInterval: number): void;
|
|
2106
|
+
/**
|
|
2107
|
+
* Allow users to configure the timeout policy
|
|
2108
|
+
*
|
|
2109
|
+
* @param time The time in milliseconds before considering a load attempt as failed
|
|
2110
|
+
* @see setRetryPolicy
|
|
2111
|
+
* @see statusChanges
|
|
2112
|
+
*/
|
|
2113
|
+
setTimeoutPolicy(time: number): void;
|
|
2114
|
+
/**
|
|
2115
|
+
* Get the status of a dependency
|
|
2116
|
+
*
|
|
2117
|
+
* @param name The name of the dependency
|
|
2118
|
+
* @returns The status of the dependency
|
|
2119
|
+
* @deprecated Prefer using statusChanges instead
|
|
2120
|
+
* @see statusChanges
|
|
2121
|
+
*/
|
|
2122
|
+
getDependencyStatus(name: string): Status | null;
|
|
2123
|
+
/**
|
|
2124
|
+
* Get the status of a dependency as an observable
|
|
2125
|
+
*
|
|
2126
|
+
* @param name The name of the dependency
|
|
2127
|
+
*/
|
|
2128
|
+
statusChanges(name: string): Observable<Status>;
|
|
2129
|
+
/**
|
|
2130
|
+
* Load a dependency and its prerequisites
|
|
2131
|
+
*
|
|
2132
|
+
* @param name The name of the dependency
|
|
2133
|
+
* @see loadDependency
|
|
2134
|
+
*/
|
|
2135
|
+
private loadDependency;
|
|
2136
|
+
/**
|
|
2137
|
+
* Load a JS script and append it to the root of the DOM
|
|
2138
|
+
* @param dependency
|
|
2139
|
+
*/
|
|
2140
|
+
private loadScript;
|
|
2141
|
+
/**
|
|
2142
|
+
* Load a CSS style and append it to the head of the document
|
|
2143
|
+
* @param dependency
|
|
2144
|
+
*/
|
|
2145
|
+
private loadStyle;
|
|
2146
|
+
/**
|
|
2147
|
+
* Error handling for a failed load
|
|
2148
|
+
* @param name
|
|
2149
|
+
* @param error
|
|
2150
|
+
*/
|
|
2151
|
+
private handleError;
|
|
2152
|
+
/**
|
|
2153
|
+
* Get the script element from the DOM
|
|
2154
|
+
*
|
|
2155
|
+
* @param url
|
|
2156
|
+
* @private
|
|
2157
|
+
*/
|
|
2158
|
+
private getScript;
|
|
2159
|
+
/**
|
|
2160
|
+
* Get the style element from the DOM
|
|
2161
|
+
*
|
|
2162
|
+
* @param url
|
|
2163
|
+
* @private
|
|
2164
|
+
*/
|
|
2165
|
+
private getStyle;
|
|
2166
|
+
/**
|
|
2167
|
+
* Reload a dependency which can be either a script or a style. First remove
|
|
2168
|
+
* the element from the DOM and then load it again.
|
|
2169
|
+
*
|
|
2170
|
+
* @param dependency
|
|
2171
|
+
* @private
|
|
2172
|
+
*/
|
|
2173
|
+
private reloadDependency;
|
|
2174
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EuiLoaderService, never>;
|
|
2175
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2176
|
+
}
|
|
2177
|
+
export declare class UserService<T extends UserState = UserState> extends EuiService<T | UserState> {
|
|
2178
|
+
protected store: StoreService<any>;
|
|
2179
|
+
private static readonly DEFAULT_STATE;
|
|
2180
|
+
/**
|
|
2181
|
+
* a single signal holding the state - initial state is null
|
|
2182
|
+
*/
|
|
2183
|
+
private state;
|
|
2184
|
+
/**
|
|
2185
|
+
* a BehaviorSubject holding the state - initial state is null
|
|
2186
|
+
* This is the main source of truth for the state
|
|
2187
|
+
*/
|
|
2188
|
+
private stateSubject;
|
|
2189
|
+
constructor();
|
|
2190
|
+
init(state: T): Observable<EuiServiceStatus>;
|
|
2191
|
+
getState(): Observable<T>;
|
|
2192
|
+
/**
|
|
2193
|
+
* @deprecated this will be removed in a future version
|
|
2194
|
+
* @param mapFn
|
|
2195
|
+
*/
|
|
2196
|
+
getState<K = T>(mapFn?: (state: T) => K): Observable<K>;
|
|
2197
|
+
getState<a extends keyof DeepPartial<T>>(key?: a): Observable<DeepPartial<a>>;
|
|
2198
|
+
/**
|
|
2199
|
+
* This method is used to update the state of the service with a new state.
|
|
2200
|
+
*
|
|
2201
|
+
* @param state
|
|
2202
|
+
*/
|
|
2203
|
+
updateState(state: DeepPartial<T>): void;
|
|
2204
|
+
/**
|
|
2205
|
+
* @deprecated it will be removed in next version. Use updateState(partialState: DeepPartial<T>) instead
|
|
2206
|
+
* @param slice
|
|
2207
|
+
* @param reducer
|
|
2208
|
+
*/
|
|
2209
|
+
updateState(slice: DeepPartial<T>, reducer: (state: T, action: DeepPartial<T>) => T): void;
|
|
2210
|
+
/**
|
|
2211
|
+
* This method is used to get the signal of the service.
|
|
2212
|
+
*/
|
|
2213
|
+
getSignal(): Signal<T>;
|
|
2214
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserService<any>, never>;
|
|
2215
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2216
|
+
}
|
|
2217
|
+
export declare class UserServiceMock<T> extends UserService {
|
|
2218
|
+
constructor();
|
|
2219
|
+
init(userState: UserState): Observable<EuiServiceStatus>;
|
|
2220
|
+
getState<K = T>(mapFn?: (state: T) => K): Observable<K>;
|
|
2221
|
+
getState<a extends keyof T>(key?: a): Observable<T[a]>;
|
|
2222
|
+
updateState(userState: UserState): void;
|
|
2223
|
+
updateState<a extends keyof T>(slice: T[a], reducer: (state: any, action: T[a]) => any): void;
|
|
2224
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserServiceMock<any>, never>;
|
|
2225
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2226
|
+
}
|
|
2288
2227
|
/**
|
|
2289
2228
|
* @description
|
|
2290
2229
|
* Centralized service for managing application-wide `eui-growl` notifications.
|
|
@@ -2293,175 +2232,162 @@ declare class UserServiceMock<T> extends UserService {
|
|
|
2293
2232
|
* Supports both temporary auto-dismissing messages and persistent sticky notifications.
|
|
2294
2233
|
* Injected at root level, ensuring a single instance across the entire application.
|
|
2295
2234
|
*/
|
|
2296
|
-
declare class EuiGrowlService {
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2360
|
-
declare const LANG_PARAM_KEY = "X-Lang-Param";
|
|
2235
|
+
export declare class EuiGrowlService {
|
|
2236
|
+
readonly growlMessages: BehaviorSubject<EuiGrowlMessage[]>;
|
|
2237
|
+
readonly isGrowlSticky: BehaviorSubject<boolean>;
|
|
2238
|
+
readonly isCloseAllSticky: BehaviorSubject<boolean>;
|
|
2239
|
+
readonly growlLife: BehaviorSubject<number>;
|
|
2240
|
+
readonly growlPosition: BehaviorSubject<string>;
|
|
2241
|
+
readonly growlCallback: BehaviorSubject<(() => void) | null>;
|
|
2242
|
+
readonly ariaGrowlLive: BehaviorSubject<"off" | "polite" | "assertive">;
|
|
2243
|
+
/**
|
|
2244
|
+
* Displays a growl notification message with customizable behavior and appearance.
|
|
2245
|
+
* Validates message severity and manages message lifecycle through reactive streams.
|
|
2246
|
+
* Danger severity messages default to sticky behavior unless explicitly configured.
|
|
2247
|
+
*
|
|
2248
|
+
* @param msg - Message object containing severity, summary, and detail properties
|
|
2249
|
+
* @param isSticky - When true, message persists until manually dismissed; defaults to false except for danger messages
|
|
2250
|
+
* @param isMultiple - When true, appends message to existing queue; when false, clears previous messages
|
|
2251
|
+
* @param life - Duration in milliseconds before auto-dismissal; defaults to 3000ms
|
|
2252
|
+
* @param position - Screen position for message display (e.g., 'bottom-right', 'top-center')
|
|
2253
|
+
* @param callback - Optional function executed when message is clicked
|
|
2254
|
+
* @param ariaLive - ARIA live region politeness level for screen reader announcements
|
|
2255
|
+
* @throws Error if message severity is not one of: 'info', 'warning', 'success', 'danger'
|
|
2256
|
+
*/
|
|
2257
|
+
growl(msg: EuiGrowlMessage, isSticky?: boolean, isMultiple?: boolean, life?: number, position?: string, callback?: () => void, ariaLive?: 'off' | 'polite' | 'assertive'): void;
|
|
2258
|
+
/**
|
|
2259
|
+
* Removes all currently displayed growl messages from the notification queue.
|
|
2260
|
+
* Clears both sticky and temporary messages immediately.
|
|
2261
|
+
*/
|
|
2262
|
+
clearGrowl(): void;
|
|
2263
|
+
/**
|
|
2264
|
+
* Displays a success growl notification with predefined styling and behavior.
|
|
2265
|
+
* Message is non-sticky and auto-dismisses after the default duration.
|
|
2266
|
+
*
|
|
2267
|
+
* @param msg - Detail text to display in the notification
|
|
2268
|
+
* @param position - Optional screen position override; defaults to service-configured position
|
|
2269
|
+
*/
|
|
2270
|
+
growlSuccess(msg: string, position?: string): void;
|
|
2271
|
+
/**
|
|
2272
|
+
* Displays an error growl notification with predefined styling and behavior.
|
|
2273
|
+
* Message is non-sticky but can be configured to persist based on severity handling.
|
|
2274
|
+
*
|
|
2275
|
+
* @param msg - Detail text to display in the notification
|
|
2276
|
+
* @param position - Optional screen position override; defaults to service-configured position
|
|
2277
|
+
*/
|
|
2278
|
+
growlError(msg: string, position?: string): void;
|
|
2279
|
+
/**
|
|
2280
|
+
* Displays a warning growl notification with predefined styling and behavior.
|
|
2281
|
+
* Message is non-sticky and auto-dismisses after the default duration.
|
|
2282
|
+
*
|
|
2283
|
+
* @param msg - Detail text to display in the notification
|
|
2284
|
+
* @param position - Optional screen position override; defaults to service-configured position
|
|
2285
|
+
*/
|
|
2286
|
+
growlWarning(msg: string, position?: string): void;
|
|
2287
|
+
/**
|
|
2288
|
+
* Displays an informational growl notification with predefined styling and behavior.
|
|
2289
|
+
* Message is non-sticky and auto-dismisses after the default duration.
|
|
2290
|
+
*
|
|
2291
|
+
* @param msg - Detail text to display in the notification
|
|
2292
|
+
* @param position - Optional screen position override; defaults to service-configured position
|
|
2293
|
+
*/
|
|
2294
|
+
growlInfo(msg: string, position?: string): void;
|
|
2295
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EuiGrowlService, never>;
|
|
2296
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2297
|
+
}
|
|
2298
|
+
export declare const LANG_PARAM_KEY = "X-Lang-Param";
|
|
2361
2299
|
/**
|
|
2362
2300
|
* Interceptor for adding the current language as parameter
|
|
2363
2301
|
* Add the header (LANG_PARAM_KEY, <language parameter>) to your request http headers
|
|
2364
2302
|
*/
|
|
2365
|
-
declare class AddLangParamInterceptor implements HttpInterceptor {
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
}
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CsrfPreventionInterceptor, never>;
|
|
2387
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CsrfPreventionInterceptor>;
|
|
2388
|
-
}
|
|
2389
|
-
|
|
2303
|
+
export declare class AddLangParamInterceptor implements HttpInterceptor {
|
|
2304
|
+
protected translateService: TranslateService;
|
|
2305
|
+
intercept<T>(req: HttpRequest<T>, next: HttpHandler): Observable<HttpEvent<T>>;
|
|
2306
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AddLangParamInterceptor, never>;
|
|
2307
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2308
|
+
}
|
|
2309
|
+
export declare class CachePreventionInterceptor implements HttpInterceptor {
|
|
2310
|
+
intercept<T>(req: HttpRequest<T>, next: HttpHandler): Observable<HttpEvent<T>>;
|
|
2311
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CachePreventionInterceptor, never>;
|
|
2312
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2313
|
+
}
|
|
2314
|
+
export declare class CorsSecurityInterceptor implements HttpInterceptor {
|
|
2315
|
+
intercept<T>(request: HttpRequest<T>, next: HttpHandler): Observable<HttpEvent<T>>;
|
|
2316
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CorsSecurityInterceptor, never>;
|
|
2317
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2318
|
+
}
|
|
2319
|
+
export declare class CsrfPreventionInterceptor implements HttpInterceptor {
|
|
2320
|
+
intercept<T>(request: HttpRequest<T>, next: HttpHandler): Observable<HttpEvent<T>>;
|
|
2321
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CsrfPreventionInterceptor, never>;
|
|
2322
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2323
|
+
}
|
|
2390
2324
|
interface body {
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
}
|
|
2396
|
-
declare class EuLoginSessionTimeoutHandlingInterceptor implements HttpInterceptor {
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
|
-
declare
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
declare const diffDays: (dateStart: Date, dateEnd: Date) => number;
|
|
2415
|
-
declare const diffDaysFromToday: (date: Date) => number;
|
|
2416
|
-
|
|
2325
|
+
success: boolean;
|
|
2326
|
+
status: string;
|
|
2327
|
+
code: number;
|
|
2328
|
+
message: string;
|
|
2329
|
+
}
|
|
2330
|
+
export declare class EuLoginSessionTimeoutHandlingInterceptor implements HttpInterceptor {
|
|
2331
|
+
intercept<T extends body>(request: HttpRequest<T>, next: HttpHandler): Observable<HttpEvent<T>>;
|
|
2332
|
+
protected checkRequestSuccessForEULoginSessionTimeout<T extends body, E>(request: HttpRequest<T>, event: HttpEvent<E>): void;
|
|
2333
|
+
protected checkRequestErrorForEULoginSessionTimeout<T = unknown>(request: HttpRequest<T>, response: HttpResponseBase): void;
|
|
2334
|
+
protected isSsoResponse(body: string | body | null): boolean;
|
|
2335
|
+
protected reauthenticate(): void;
|
|
2336
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EuLoginSessionTimeoutHandlingInterceptor, never>;
|
|
2337
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2338
|
+
}
|
|
2339
|
+
export declare const EUI_ERROR_MAPPING_HANDLER_TOKEN: InjectionToken<ErrorMappingHandler>;
|
|
2340
|
+
export declare class RequestErrorInterceptor implements HttpInterceptor {
|
|
2341
|
+
private errorMappingHandler;
|
|
2342
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
2343
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RequestErrorInterceptor, never>;
|
|
2344
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2345
|
+
}
|
|
2346
|
+
export declare const diffDays: (dateStart: Date, dateEnd: Date) => number;
|
|
2347
|
+
export declare const diffDaysFromToday: (date: Date) => number;
|
|
2417
2348
|
/**
|
|
2418
2349
|
* Provides read-only equivalent of jQuery's position function:
|
|
2419
2350
|
* http://api.jquery.com/position/
|
|
2420
2351
|
*/
|
|
2421
|
-
declare const position: (nativeEl: HTMLElement) => {
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2352
|
+
export declare const position: (nativeEl: HTMLElement) => {
|
|
2353
|
+
width: number;
|
|
2354
|
+
height: number;
|
|
2355
|
+
top: number;
|
|
2356
|
+
left: number;
|
|
2426
2357
|
};
|
|
2427
2358
|
/**
|
|
2428
2359
|
* Provides read-only equivalent of jQuery's offset function:
|
|
2429
2360
|
* http://api.jquery.com/offset/
|
|
2430
2361
|
*/
|
|
2431
|
-
declare const offset: (nativeEl: HTMLElement) => {
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2362
|
+
export declare const offset: (nativeEl: HTMLElement) => {
|
|
2363
|
+
width: number;
|
|
2364
|
+
height: number;
|
|
2365
|
+
top: number;
|
|
2366
|
+
left: number;
|
|
2436
2367
|
};
|
|
2437
2368
|
/**
|
|
2438
2369
|
* returns the closest, non-statically positioned parentOffset of a given element
|
|
2439
2370
|
* @param nativeEl
|
|
2440
2371
|
*/
|
|
2441
|
-
declare const parentOffsetEl: (nativeEl: HTMLElement) => Element | Document;
|
|
2442
|
-
declare const getViewElement: <F>(fixture: ComponentFixture<F>, componentClass: string, klass?: string) => {
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2372
|
+
export declare const parentOffsetEl: (nativeEl: HTMLElement) => Element | Document;
|
|
2373
|
+
export declare const getViewElement: <F>(fixture: ComponentFixture<F>, componentClass: string, klass?: string) => {
|
|
2374
|
+
de: DebugElement;
|
|
2375
|
+
el: HTMLElement;
|
|
2376
|
+
domElement: HTMLElement;
|
|
2446
2377
|
};
|
|
2447
|
-
declare const closestMatchingParent: (target: HTMLElement, className: string) => HTMLElement | null;
|
|
2448
|
-
|
|
2449
|
-
declare const
|
|
2450
|
-
|
|
2451
|
-
declare const
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
validateEmail: {
|
|
2457
|
-
valid: boolean;
|
|
2458
|
-
};
|
|
2459
|
-
};
|
|
2460
|
-
|
|
2378
|
+
export declare const closestMatchingParent: (target: HTMLElement, className: string) => HTMLElement | null;
|
|
2379
|
+
export declare const consumeEvent: (event: Event) => boolean;
|
|
2380
|
+
export declare const markFormGroupTouched: (FormControls: Record<string, AbstractControl> | AbstractControl[]) => void;
|
|
2381
|
+
export declare const markControlsTouched: (group: FormGroup | FormArray) => void;
|
|
2382
|
+
export declare const validateEmail: (c: FormControl) => {
|
|
2383
|
+
validateEmail: {
|
|
2384
|
+
valid: boolean;
|
|
2385
|
+
};
|
|
2386
|
+
} | null;
|
|
2461
2387
|
/**
|
|
2462
2388
|
* returns a random string with radix=36
|
|
2463
2389
|
*/
|
|
2464
|
-
declare const uniqueId: () => string;
|
|
2390
|
+
export declare const uniqueId: () => string;
|
|
2465
2391
|
/**
|
|
2466
2392
|
* Its job is to parse number and format it based on given input.
|
|
2467
2393
|
* @param value can be a number or a string number
|
|
@@ -2469,60 +2395,56 @@ declare const uniqueId: () => string;
|
|
|
2469
2395
|
* @param inDecimalSeparator separator for decimal part of the number default is ','
|
|
2470
2396
|
* @param inThousandSeparator separator for the whole part of the number default is ''
|
|
2471
2397
|
*/
|
|
2472
|
-
declare const formatNumber: (value: number | string, fractionSize?: number, inDecimalSeparator?: string, inThousandSeparator?: string) => string;
|
|
2473
|
-
|
|
2398
|
+
export declare const formatNumber: (value: number | string, fractionSize?: number, inDecimalSeparator?: string, inThousandSeparator?: string) => string | null;
|
|
2474
2399
|
/**
|
|
2475
2400
|
* @deprecated it will be removed in the future. Consult the angular documentation for a replacement.
|
|
2476
2401
|
* @param error
|
|
2477
2402
|
*/
|
|
2478
|
-
declare const handleError: (error: HttpErrorResponse) => Observable<never>;
|
|
2479
|
-
|
|
2403
|
+
export declare const handleError: (error: HttpErrorResponse) => Observable<never>;
|
|
2480
2404
|
/**
|
|
2481
2405
|
* check if a value is null or undefined. If it's not both returns true otherwise false
|
|
2482
2406
|
*
|
|
2483
2407
|
* @param value
|
|
2484
2408
|
*/
|
|
2485
|
-
declare const isDefined: <T>(value: T | undefined | null) => value is T;
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2409
|
+
export declare const isDefined: <T>(value: T | undefined | null) => value is T;
|
|
2410
|
+
export declare abstract class CssUtils {
|
|
2411
|
+
static readonly setHtmlClass: (inputClass: string, document: Document) => void;
|
|
2412
|
+
/**
|
|
2413
|
+
* Get the value of a CSS variable. Using getComputedStyle to get the value of the CSS variable (Browser Specific API)
|
|
2414
|
+
* @param inputProperty
|
|
2415
|
+
* @param document
|
|
2416
|
+
* @param platform
|
|
2417
|
+
*/
|
|
2418
|
+
static readonly getCssVarValue: (inputProperty: string, document: Document, platform: unknown) => string;
|
|
2419
|
+
static readonly setCssVarValue: (propertyName: string, propertyValue: string, document: Document) => void;
|
|
2420
|
+
static readonly setCssVar: (inputProperty: string, outputProperty: string, document: Document, platform: unknown) => void;
|
|
2421
|
+
static readonly initCssVars: (document: Document, platform: unknown) => void;
|
|
2422
|
+
static readonly getBreakpointValues: (document: Document, platform: unknown) => any;
|
|
2423
|
+
static readonly activateEditModeCssVars: (isActive: boolean, document: Document) => void;
|
|
2424
|
+
static readonly activateHeaderCssVars: (document: Document, platform: unknown) => void;
|
|
2425
|
+
static readonly activateBreadcrumbCssVars: (document: Document, platform: unknown) => void;
|
|
2426
|
+
static readonly activateTopMessageCssVars: (height: number, document: Document) => void;
|
|
2427
|
+
static readonly activateToolbarCssVars: (document: Document, platform: unknown) => void;
|
|
2428
|
+
static readonly activateToolbarMegaMenuCssVars: (document: Document, platform: unknown) => void;
|
|
2429
|
+
static readonly activateFooterCssVars: (document: Document, platform: unknown) => void;
|
|
2430
|
+
static readonly setHeaderShrinkCssVar: (active: boolean, document: Document, platform: unknown) => void;
|
|
2431
|
+
static readonly activateSidebarCssVars: (document: Document, platform: unknown, hasSidebarCollapsedVariant?: boolean) => void;
|
|
2432
|
+
static readonly activateSideContainerCssVars: (document: Document, platform: unknown) => void;
|
|
2433
|
+
static readonly deactivateSideContainerCssVars: (document: Document, platform: unknown) => void;
|
|
2434
|
+
static readonly setSideContainerWidth: (width: number, document: Document) => void;
|
|
2435
|
+
static readonly removeSidebarCssVars: (document: Document) => void;
|
|
2436
|
+
static readonly activateSidebarHeaderCssVars: (document: Document, platform: unknown) => void;
|
|
2437
|
+
static readonly activateSidebarFooterCssVars: (document: Document, platform: unknown) => void;
|
|
2438
|
+
/**
|
|
2439
|
+
* Gets the viewport height and width and multiply it by 1% to get a value for a vh/vw unit
|
|
2440
|
+
* Sets the value in the --eui-app-vh custom property to the root of the document
|
|
2441
|
+
* Sets the value in the --eui-app-vw custom property to the root of the document
|
|
2442
|
+
* Example for 100% height: calc(var(--eui-app-vh, 1vh) * 100);
|
|
2443
|
+
* Example for 50% height: calc(var(--eui-app-vh, 1vh) * 50);
|
|
2444
|
+
* Example for 50% width: calc(var(--eui-app-vw, 1vw) * 50);
|
|
2445
|
+
*/
|
|
2446
|
+
static setAppViewportCssVars(platform: unknown): void;
|
|
2447
|
+
}
|
|
2526
2448
|
/**
|
|
2527
2449
|
* Safely resolves a service from the injector only when needed.
|
|
2528
2450
|
* Avoids instantiation errors that can occur with `inject(..., { optional: true })`.
|
|
@@ -2531,62 +2453,64 @@ declare abstract class CssUtils {
|
|
|
2531
2453
|
* @param injector The injector to use (defaults to the current injector)
|
|
2532
2454
|
* @returns The service instance or null if unavailable
|
|
2533
2455
|
*/
|
|
2534
|
-
declare function injectOptional<T>(token: Type<T> | InjectionToken<T>, injector?: Injector): T | null;
|
|
2535
|
-
|
|
2536
|
-
declare const
|
|
2537
|
-
declare
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
}
|
|
2573
|
-
declare class TranslateMockModule {
|
|
2574
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateMockModule, never>;
|
|
2575
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TranslateMockModule, never, [typeof TranslateMockPipe, typeof TranslateMockDirective], [typeof TranslateMockPipe, typeof TranslateMockDirective]>;
|
|
2576
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<TranslateMockModule>;
|
|
2577
|
-
}
|
|
2578
|
-
|
|
2579
|
-
declare class EuiAppShellServiceMock {
|
|
2580
|
-
breakpointSubject: BehaviorSubject<string>;
|
|
2581
|
-
breakpoints$: Observable<string>;
|
|
2582
|
-
state$: Observable<any>;
|
|
2583
|
-
appRouter: {
|
|
2584
|
-
navigate: (url: any) => string;
|
|
2456
|
+
export declare function injectOptional<T>(token: Type<T> | InjectionToken<T>, injector?: Injector): T | null;
|
|
2457
|
+
export declare const TRANSLATED_STRING = "i18n";
|
|
2458
|
+
export declare const DEFAULT_LANGUAGE = "en";
|
|
2459
|
+
export declare class TranslateServiceMock {
|
|
2460
|
+
onLangChangeSubject: Subject<LangChangeEvent>;
|
|
2461
|
+
onTranslationChangeSubject: Subject<string>;
|
|
2462
|
+
onFallbackLangChangeSubject: Subject<string>;
|
|
2463
|
+
isLoadedSubject: BehaviorSubject<boolean>;
|
|
2464
|
+
onLangChange: Observable<LangChangeEvent>;
|
|
2465
|
+
onTranslationChange: Observable<string>;
|
|
2466
|
+
onFallbackLangChange: Observable<string>;
|
|
2467
|
+
isLoaded: Observable<boolean>;
|
|
2468
|
+
currentLang: import("@angular/core").WritableSignal<string | null>;
|
|
2469
|
+
languages: string[];
|
|
2470
|
+
get(content: string): Observable<string>;
|
|
2471
|
+
use(lang: string): void;
|
|
2472
|
+
addLangs(langs: string[]): void;
|
|
2473
|
+
getBrowserLang(): string;
|
|
2474
|
+
getLangs(): string[];
|
|
2475
|
+
getTranslation(): Observable<any>;
|
|
2476
|
+
instant(key: string | string[]): string;
|
|
2477
|
+
setFallbackLang(lang: string): void;
|
|
2478
|
+
}
|
|
2479
|
+
export declare class TranslateMockPipe implements PipeTransform {
|
|
2480
|
+
transform(text: string): string;
|
|
2481
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateMockPipe, never>;
|
|
2482
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TranslateMockPipe, "translate", true>;
|
|
2483
|
+
}
|
|
2484
|
+
export declare class TranslateMockDirective implements AfterViewChecked {
|
|
2485
|
+
readonly translateParams: import("@angular/core").InputSignal<unknown>;
|
|
2486
|
+
private readonly _element;
|
|
2487
|
+
ngAfterViewChecked(): void;
|
|
2488
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateMockDirective, never>;
|
|
2489
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TranslateMockDirective, "[translate]", never, {
|
|
2490
|
+
"translateParams": {
|
|
2491
|
+
"alias": "translateParams";
|
|
2492
|
+
"required": false;
|
|
2493
|
+
"isSignal": true;
|
|
2585
2494
|
};
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
export
|
|
2592
|
-
|
|
2495
|
+
}, {}, never, never, true, never>;
|
|
2496
|
+
}
|
|
2497
|
+
export declare class TranslateLoaderMock implements TranslateLoader {
|
|
2498
|
+
getTranslation(): Observable<Record<string, string>>;
|
|
2499
|
+
}
|
|
2500
|
+
export declare class TranslateMockModule {
|
|
2501
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateMockModule, never>;
|
|
2502
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TranslateMockModule, never, [typeof TranslateMockPipe, typeof TranslateMockDirective], [typeof TranslateMockPipe, typeof TranslateMockDirective]>;
|
|
2503
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TranslateMockModule>;
|
|
2504
|
+
}
|
|
2505
|
+
export declare class EuiAppShellServiceMock {
|
|
2506
|
+
breakpointSubject: BehaviorSubject<string>;
|
|
2507
|
+
breakpoints$: Observable<string>;
|
|
2508
|
+
state$: Observable<any>;
|
|
2509
|
+
appRouter: {
|
|
2510
|
+
navigate: (url: string) => string;
|
|
2511
|
+
};
|
|
2512
|
+
getState(): Observable<any>;
|
|
2513
|
+
consumeEvent(): void;
|
|
2514
|
+
}
|
|
2515
|
+
export { createEuiCoreRootGuard, euiCoreRootGuardClass, coreReducers as reducers };
|
|
2516
|
+
//# sourceMappingURL=eui-core.d.ts.map
|