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